YottaDB / YDB

Mirrored from https://gitlab.com/YottaDB/DB/YDB
Other
76 stars 37 forks source link

[#312] Fix assert that is not accurate in one case exposed by r124/ydb312_gtm8182d subtest #326

Closed nars1 closed 6 years ago

nars1 commented 6 years ago

In this subtest, we do a jnlpool_init(GTMRELAXED) for a read access because ydb_custom_errors/gtm_custom_errors env var is set. But the jnlpool is not set up yet. And so the jnlpool_init(GTMRELAXED) call allocates a "jnlpool" structure but has a "jnlpool_ctl" pointer set to NULL when it returns. Later the test starts the source server (using a zsystem) and then attempts an update on a database. This does a jnlpool_init(GTMPROC) call which finds the previously allocated "jnlpool" structure and reuses it correctly but has an assert that the jnlpool pointer from the gld should be NULL. It is not NULL due to the prior jnlpool_init(GTMRELAXED) call. The fix is to add an || condition which verifies this particular scenario.