Skip to content

Commit b18da94

Browse files
committed
fix: force deletion of WAL file after timeout
1 parent 9dcbffb commit b18da94

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

engine/src/main/java/com/arcadedb/engine/TransactionManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public void close(final boolean drop) {
132132
}
133133
}
134134

135-
if (!cleanWALFiles(drop, false))
135+
if (!cleanWALFiles(drop, drop))
136136
LogManager.instance()
137137
.log(this, Level.WARNING, "Error on removing all transaction files. Remained: %s", null, inactiveWALFilePool);
138138
else {

gremlin/src/test/java/com/arcadedb/server/gremlin/GremlinMergeVStressTest.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ public String call() {
104104
List<Map<String, Object>> queryInputParams = createQueryInputParams(batchSize, threadId, iteration, nOfProperties);
105105
Map<String, Object> params = Map.of("rows", queryInputParams);
106106

107-
if (attempt > 0) {
108-
System.out.println(Thread.currentThread().getName() + " (id=" + Thread.currentThread().threadId() +
109-
") Iteration " + iteration + " RETRY #" + attempt + " importing " + batchSize + " entries");
110-
} else {
111-
System.out.println(Thread.currentThread().getName() + " (id=" + Thread.currentThread().threadId() +
112-
") Iteration " + iteration + " importing " + batchSize + " entries");
113-
}
107+
// if (attempt > 0) {
108+
// System.out.println(Thread.currentThread().getName() + " (id=" + Thread.currentThread().threadId() +
109+
// ") Iteration " + iteration + " RETRY #" + attempt + " importing " + batchSize + " entries");
110+
// } else {
111+
// System.out.println(Thread.currentThread().getName() + " (id=" + Thread.currentThread().threadId() +
112+
// ") Iteration " + iteration + " importing " + batchSize + " entries");
113+
// }
114114

115115
int nOfResults = client.submit(query, params).all().join().size();
116116
totalInserted.addAndGet(nOfResults);
@@ -126,8 +126,8 @@ public String call() {
126126
if (errorMsg != null && (errorMsg.contains("Concurrent modification") ||
127127
errorMsg.contains("ConcurrentModificationException"))) {
128128
attempt++;
129-
System.out.println(Thread.currentThread().getName() + " iteration " + iteration +
130-
" - Concurrent modification detected, retry " + attempt + "/" + maxRetries);
129+
// System.out.println(Thread.currentThread().getName() + " iteration " + iteration +
130+
// " - Concurrent modification detected, retry " + attempt + "/" + maxRetries);
131131

132132
// Brief pause before retry
133133
try {
@@ -186,7 +186,7 @@ private List<Map<String, Object>> createQueryInputParams(int batchSize, int thre
186186

187187
// Run multiple iterations with high concurrency
188188
for (int iteration = 0; iteration < iterations; iteration++) {
189-
System.out.println("\n=== Starting iteration " + iteration + " with " + nOfThreads + " threads ===");
189+
// System.out.println("\n=== Starting iteration " + iteration + " with " + nOfThreads + " threads ===");
190190

191191
ExecutorService executorService = Executors.newFixedThreadPool(nOfThreads);
192192
ExecutorCompletionService<String> completionService = new ExecutorCompletionService<>(executorService);
@@ -200,7 +200,7 @@ private List<Map<String, Object>> createQueryInputParams(int batchSize, int thre
200200
try {
201201
Future<String> future = completionService.take();
202202
String result = future.get();
203-
System.out.println("Results from " + result);
203+
// System.out.println("Results from " + result);
204204
receivedResults++;
205205
} catch (InterruptedException e) {
206206
Thread.currentThread().interrupt();
@@ -231,8 +231,8 @@ private List<Map<String, Object>> createQueryInputParams(int batchSize, int thre
231231
.next().getProperty("count");
232232

233233
long expectedCount = (long) nOfThreads * batchSize * iterations;
234-
System.out.println("\nTotal vertices created: " + count + ", expected: " + expectedCount);
235-
System.out.println("Total inserted reported by threads: " + totalInserted.get());
234+
// System.out.println("\nTotal vertices created: " + count + ", expected: " + expectedCount);
235+
// System.out.println("Total inserted reported by threads: " + totalInserted.get());
236236

237237
assertThat(count.longValue()).isEqualTo(expectedCount);
238238
assertThat(totalInserted.get()).isEqualTo(expectedCount);

0 commit comments

Comments
 (0)