forked from BigDataAnalyticsGroup/fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-10540] stop getting tx sim for qscc/cscc
The state database transaction manager uses a read/write lock to serialize access to the state database. FAB-7595 introduced an additional lock in the block storage layer to prevent stale reads from the block access APIs after a commit event. During block commit processing, an exclusive lock is acquired at the block storage layer. While this lock is held, the state database transaction manager is called to perform its commit processing. During commit processing, the state database transaction manager attempts to acquire exclusive access to its commit lock and blocks while waiting for the associated readers to complete. At this layer, read locks are held by open transaction simulators associated with chaincode invocations. In the case of qscc, since it's chaincode, a transaction simulator is obtained for it and a read lock is held while is running. If the query happens to execute concurrent to commit processing, qscc will be unable to access the block storage layer because of the exclusive lock held during commit. The commit processing fails to complete as it is unable to acquire exclusive access to the commit lock maintained by the state database transaction manager because the query chaincode is currently holding the lock as a reader. This commit removes the acquisition of a transaction simulator for the query and configuration system chaincode as they do not require the simulator. This prevents the read lock from getting obtained by the state database transaction manager. Change-Id: Icde801b583b2bf8a2c9953a6c160b0478816ef64 Signed-off-by: Matthew Sykes <[email protected]>
- Loading branch information
Showing
3 changed files
with
89 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters