diff options
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo/sleepycat')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java | 8 |
1 files changed, 6 insertions, 2 deletions
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;
}
}
|