You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu> on 2022/03/11 17:46:15 UTC

Change in asterixdb[neo]: [NO ISSUE][STO] Make IO operation completed state volatile

From Murtadha Hubail <mh...@apache.org>:

Murtadha Hubail has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/15663 )


Change subject: [NO ISSUE][STO] Make IO operation completed state volatile
......................................................................

[NO ISSUE][STO] Make IO operation completed state volatile

- user model changes: no
- storage format changes: no
- interface changes: no

Details:

- To avoid a deadlock between checking an IO operation completed
  state and scheduling another flush operation using the same
  IO scheduler, make the IO operation state volatile rather
  synchronizing on the operation.

Change-Id: Ibef0fe3dc52a5a6b36cc29bbac0fb38936944cee
---
M hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/63/15663/1

diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
index 8317ca7..a5f70d9 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
@@ -44,7 +44,7 @@
     private volatile Throwable failure;
     private LSMIOOperationStatus status = LSMIOOperationStatus.SUCCESS;
     private ILSMDiskComponent newComponent;
-    private boolean completed = false;
+    private volatile boolean completed = false;
     private List<IoOperationCompleteListener> completeListeners;
 
     private final AtomicBoolean isActive = new AtomicBoolean(true);
@@ -203,7 +203,7 @@
     }
 
     @Override
-    public synchronized boolean isCompleted() {
+    public boolean isCompleted() {
         return completed;
     }
 

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/15663
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Ibef0fe3dc52a5a6b36cc29bbac0fb38936944cee
Gerrit-Change-Number: 15663
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail <mh...@apache.org>
Gerrit-MessageType: newchange

Change in asterixdb[neo]: [NO ISSUE][STO] Make IO operation completed state volatile

Posted by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu>.
From Murtadha Hubail <mh...@apache.org>:

Murtadha Hubail has submitted this change. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/15663 )

Change subject: [NO ISSUE][STO] Make IO operation completed state volatile
......................................................................

[NO ISSUE][STO] Make IO operation completed state volatile

- user model changes: no
- storage format changes: no
- interface changes: no

Details:

- To avoid a deadlock between checking an IO operation completed
  state and scheduling another flush operation using the same
  IO scheduler, make the IO operation state volatile rather
  synchronizing on the operation.

Change-Id: Ibef0fe3dc52a5a6b36cc29bbac0fb38936944cee
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/15663
Reviewed-by: Ali Alsuliman <al...@gmail.com>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
---
M hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Ali Alsuliman: Looks good to me, approved
  Jenkins: Verified; Verified

Objections:
  Anon. E. Moose #1000171: Violations found



diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
index 8317ca7..a5f70d9 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
@@ -44,7 +44,7 @@
     private volatile Throwable failure;
     private LSMIOOperationStatus status = LSMIOOperationStatus.SUCCESS;
     private ILSMDiskComponent newComponent;
-    private boolean completed = false;
+    private volatile boolean completed = false;
     private List<IoOperationCompleteListener> completeListeners;
 
     private final AtomicBoolean isActive = new AtomicBoolean(true);
@@ -203,7 +203,7 @@
     }
 
     @Override
-    public synchronized boolean isCompleted() {
+    public boolean isCompleted() {
         return completed;
     }
 

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/15663
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Ibef0fe3dc52a5a6b36cc29bbac0fb38936944cee
Gerrit-Change-Number: 15663
Gerrit-PatchSet: 2
Gerrit-Owner: Murtadha Hubail <mh...@apache.org>
Gerrit-Reviewer: Ali Alsuliman <al...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Murtadha Hubail <mh...@apache.org>
Gerrit-MessageType: merged

Change in asterixdb[neo]: [NO ISSUE][STO] Make IO operation completed state volatile

Posted by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu>.
From Murtadha Hubail <mh...@apache.org>:

Murtadha Hubail has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/15663 )


Change subject: [NO ISSUE][STO] Make IO operation completed state volatile
......................................................................

[NO ISSUE][STO] Make IO operation completed state volatile

- user model changes: no
- storage format changes: no
- interface changes: no

Details:

- To avoid a deadlock between checking an IO operation completed
  state and scheduling another flush operation using the same
  IO scheduler, make the IO operation state volatile rather
  synchronizing on the operation.

Change-Id: Ibef0fe3dc52a5a6b36cc29bbac0fb38936944cee
---
M hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/63/15663/1

diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
index 8317ca7..a5f70d9 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
@@ -44,7 +44,7 @@
     private volatile Throwable failure;
     private LSMIOOperationStatus status = LSMIOOperationStatus.SUCCESS;
     private ILSMDiskComponent newComponent;
-    private boolean completed = false;
+    private volatile boolean completed = false;
     private List<IoOperationCompleteListener> completeListeners;
 
     private final AtomicBoolean isActive = new AtomicBoolean(true);
@@ -203,7 +203,7 @@
     }
 
     @Override
-    public synchronized boolean isCompleted() {
+    public boolean isCompleted() {
         return completed;
     }
 

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/15663
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Ibef0fe3dc52a5a6b36cc29bbac0fb38936944cee
Gerrit-Change-Number: 15663
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail <mh...@apache.org>
Gerrit-MessageType: newchange

Change in asterixdb[neo]: [NO ISSUE][STO] Make IO operation completed state volatile

Posted by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu>.
From Ali Alsuliman <al...@gmail.com>:

Ali Alsuliman has posted comments on this change. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/15663 )

Change subject: [NO ISSUE][STO] Make IO operation completed state volatile
......................................................................


Patch Set 1: Code-Review+2


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/15663
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Ibef0fe3dc52a5a6b36cc29bbac0fb38936944cee
Gerrit-Change-Number: 15663
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail <mh...@apache.org>
Gerrit-Reviewer: Ali Alsuliman <al...@gmail.com>
Gerrit-CC: Anon. E. Moose #1000171
Gerrit-CC: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Comment-Date: Fri, 11 Mar 2022 18:04:51 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment