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
{{ message }}
This repository was archived by the owner on Apr 7, 2026. It is now read-only.
But a BatchReadOnlyTransaction can also be created from an existing shared BatchTransaction: batchReadOnlyTransaction(BatchTransactionId).
In this case, the Session is not created for this transaction, but is taken from the SessionID from the BatchTransactionId, and so it is a shared session so should not be closed when this transaction is closed.
Therefore the close() method should be fixed to only close the session when the session has been created for this transaction.
Modify the code so that each thread creates a new separate batchReadOnlyTransaction, and uses that to perform the read (so that a different channel is used for the read)
class
BatchReadOnlyTransactionImplis an AutoClosable (viaMultiUseReadOnlyTransaction->AbstractReadContext->ReadContext->AutoClosable)The
close()method always closes both the session and the transaction.This is fine if a session has been created for this transaction, using
batchReadOnlyTransaction(TimestampBound)But a BatchReadOnlyTransaction can also be created from an existing shared BatchTransaction:
batchReadOnlyTransaction(BatchTransactionId).In this case, the Session is not created for this transaction, but is taken from the
SessionIDfrom theBatchTransactionId, and so it is a shared session so should not be closed when this transaction is closed.Therefore the
close()method should be fixed to only close the session when the session has been created for this transaction.Environment details
Steps to reproduce