>From Murtadha Hubail <[email protected]>:
Murtadha Hubail has uploaded this change for review. (
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18777 )
Change subject: [NO ISSUE][STO] Add a way to wait only for flushes
......................................................................
[NO ISSUE][STO] Add a way to wait only for flushes
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Add a method that can be used by extentions to wait only for
pending fllushes on a dataset rather than all IO ops.
Ext-ref: MB-63316
Change-Id: I02daf3cd9680070d02fd133572950e37e68fe319
---
M
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetInfo.java
1 file changed, 33 insertions(+), 0 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/77/18777/1
diff --git
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetInfo.java
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetInfo.java
index 87a3c2f..bb28ef1 100644
---
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetInfo.java
+++
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetInfo.java
@@ -280,6 +280,20 @@
}
}
+ public void waitForFlushes() throws HyracksDataException {
+ logManager.log(waitLog);
+ synchronized (this) {
+ while (pendingFlushes > 0) {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw HyracksDataException.create(e);
+ }
+ }
+ }
+ }
+
public synchronized int getPendingFlushes() {
return pendingFlushes;
}
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18777
To unsubscribe, or for help writing mail filters, visit
https://asterix-gerrit.ics.uci.edu/settings
Gerrit-Project: asterixdb
Gerrit-Branch: trinity
Gerrit-Change-Id: I02daf3cd9680070d02fd133572950e37e68fe319
Gerrit-Change-Number: 18777
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail <[email protected]>
Gerrit-MessageType: newchange