diff options
Diffstat (limited to 'src/main/java/com/amazon/carbonado/spi')
-rw-r--r-- | src/main/java/com/amazon/carbonado/spi/SequenceValueGenerator.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/amazon/carbonado/spi/SequenceValueGenerator.java b/src/main/java/com/amazon/carbonado/spi/SequenceValueGenerator.java index c7bfc78..21b0676 100644 --- a/src/main/java/com/amazon/carbonado/spi/SequenceValueGenerator.java +++ b/src/main/java/com/amazon/carbonado/spi/SequenceValueGenerator.java @@ -110,7 +110,9 @@ public class SequenceValueGenerator extends AbstractSequenceValueProducer { mStoredSequence.setInitialValue(initialValue);
// Start as small as possible to allow signed long comparisons to work.
mStoredSequence.setNextValue(Long.MIN_VALUE);
- mStoredSequence.insert();
+ if (!mStoredSequence.tryInsert()) {
+ mStoredSequence.load();
+ }
}
txn.commit();
} finally {
|