File tree 1 file changed +22
-0
lines changed
core/src/main/java/com/arangodb/model
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ public final class StreamTransactionOptions {
36
36
private Boolean allowImplicit ;
37
37
@ JsonIgnore
38
38
private Boolean allowDirtyRead ;
39
+ private Boolean skipFastLockRound ;
39
40
40
41
public StreamTransactionOptions () {
41
42
super ();
@@ -148,4 +149,25 @@ public StreamTransactionOptions allowDirtyRead(final Boolean allowDirtyRead) {
148
149
return this ;
149
150
}
150
151
152
+ public Boolean getSkipFastLockRound () {
153
+ return skipFastLockRound ;
154
+ }
155
+
156
+ /**
157
+ * @param skipFastLockRound Whether to disable fast locking for write operations. Skipping the fast lock round can
158
+ * be faster overall if there are many concurrent Stream Transactions queued that all try
159
+ * to lock the same collection exclusively. It avoids deadlocking and retrying which can
160
+ * occur with the fast locking by guaranteeing a deterministic locking order at the expense
161
+ * of each actual locking operation taking longer.
162
+ * Fast locking should not be skipped for read-only Stream Transactions because it degrades
163
+ * performance if there are no concurrent transactions that use exclusive locks on the same
164
+ * collection.
165
+ * Default: {@code false}
166
+ * @return options
167
+ * @since ArangoDB 3.12.0
168
+ */
169
+ public StreamTransactionOptions skipFastLockRound (final Boolean skipFastLockRound ) {
170
+ this .skipFastLockRound = skipFastLockRound ;
171
+ return this ;
172
+ }
151
173
}
You can’t perform that action at this time.
0 commit comments