diff options
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java | 5 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java b/src/main/java/com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java index 21c7215..9e69935 100644 --- a/src/main/java/com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java +++ b/src/main/java/com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java @@ -92,6 +92,11 @@ class DerivedIndexesTrigger<S extends Storable, D extends Storable> extends Trig }
@Override
+ public int hashCode() {
+ return mFetcher.hashCode();
+ }
+
+ @Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java index 4bf4e2b..f12a58e 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java @@ -553,8 +553,12 @@ abstract class BDBRepository<Txn> extends AbstractRepository<Txn> break;
}
- if (mSuspendUntil != Long.MIN_VALUE) {
- if (System.currentTimeMillis() < mSuspendUntil) {
+ long suspendUntil;
+ synchronized (this) {
+ suspendUntil = mSuspendUntil;
+ }
+ if (suspendUntil != Long.MIN_VALUE) {
+ if (System.currentTimeMillis() < suspendUntil) {
continue;
}
}
|