Normal termination on receipt of SIGTERM when inside a transaction

Final Release Note

A YottaDB process that does transaction processing (using TSTART / TCOMMIT in M, ydb_tp_s()/ydb_tp_st() in C and languages that use the C API, etc.) terminates normally when it receives a SIGTERM signal (SIG-15 or MUPIP STOP). Previously it could in rare case terminate with a TPLOCK error. This was only observed in in development / test environments, and was never reported by a user. [#577 (closed)]

Description

In internal testing, the go/sigterm test occasionally showed processes using the YDBGo wrapper terminated with a TPLOCK error after a SIGTERM was sent. While termination is expected, the TPLOCK error was not. Turns out the TPLOCK error occurred because the SIGTERM was received while the process was in the middle of the TSTART and this incomplete set up of the TP frame resulted in exit handling code (which would be invoked due to the SIGTERM) getting confused by this incompletely set up TP frame. Since the process is anyways on its way out, it should continue the exit handling code without issuing the TPLOCK error in this case.

Draft Release Note

A YottaDB process that does TP transactions (using TSTART in M, ydb_tp_s() in SimpelAPI etc.) terminates normally when it receives a SIGTERM signal (SIG-15 or MUPIP STOP). Previously it could rarely terminate with a TPLOCK error.

Edited by K.S. Bhaskar