You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the code of rem_port::batch_create(P_BATCH_CREATE* batch, PACKET* sendL) in server.cpp, it looks like sending multiple op_batch_create requests for the same statement handle could leak a previously created batch, as it doesn't call statement->rsr_batch->release() before assigning a new batch to statement->rsr_batch.
I see several options:
Check if there is a current batch and return an error
Release the existing batch and allocate a new one
Continue using existing batch, but clear/cancel it if non-empty
A combination, depending on whether or not there is data in the batch (i.e. throw error when non-empty, and either 2 or 3 when empty)
The advantage of 1 or 4 is clarity, the advantage of 2 or 3 is that it allows a client to more easily recover if they lost track of the state of the batch.
The text was updated successfully, but these errors were encountered:
Looking at the code of
rem_port::batch_create(P_BATCH_CREATE* batch, PACKET* sendL)
in server.cpp, it looks like sending multipleop_batch_create
requests for the same statement handle could leak a previously created batch, as it doesn't callstatement->rsr_batch->release()
before assigning a new batch tostatement->rsr_batch
.I see several options:
The advantage of 1 or 4 is clarity, the advantage of 2 or 3 is that it allows a client to more easily recover if they lost track of the state of the batch.
The text was updated successfully, but these errors were encountered: