tkalkirill commented on code in PR #1506:
URL: https://github.com/apache/ignite-3/pull/1506#discussion_r1072275714
##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/AbstractPageMemoryMvPartitionStorage.java:
##########
@@ -157,35 +141,31 @@ protected AbstractPageMemoryMvPartitionStorage(
* Starts a partition by initializing its internal structures.
*/
public void start() {
- if (!closeBusyLock.enterBusy()) {
- throwStorageClosedException();
- }
+ busy(() -> {
Review Comment:
Tried to fix it.
##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/AbstractPageMemoryMvPartitionStorage.java:
##########
@@ -528,20 +516,16 @@ private static byte[] rowBytes(@Nullable BinaryRow row) {
@Override
public @Nullable BinaryRow addWrite(RowId rowId, @Nullable BinaryRow row,
UUID txId, UUID commitTableId, int commitPartitionId)
throws TxIdMismatchException, StorageException {
- assert rowId.partitionId() == partitionId : rowId;
-
- if (!closeBusyLock.enterBusy()) {
- throwStorageClosedException();
- }
+ return busy(() -> {
+ assert rowId.partitionId() == partitionId : rowId;
- try {
VersionChain currentChain = findVersionChain(rowId);
if (currentChain == null) {
RowVersion newVersion = insertRowVersion(row, NULL_LINK);
- VersionChain versionChain =
VersionChain.createUncommitted(rowId, txId, commitTableId, commitPartitionId,
newVersion.link(),
- NULL_LINK);
+ VersionChain versionChain =
VersionChain.createUncommitted(rowId, txId, commitTableId, commitPartitionId,
+ newVersion.link(), NULL_LINK);
Review Comment:
Fix it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]