Skip to content

Commit f9c389e

Browse files
authored
fix(interactive): fix gc not triggered error (#4497)
Garbage collect may not be triggered after coordinator is restarted.
1 parent 508c420 commit f9c389e

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

interactive_engine/executor/store/groot/src/db/graph/store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ impl MultiVersionGraph for GraphStore {
670670
if Path::new(data_file_path.as_str()).exists() {
671671
if let Ok(metadata) = fs::metadata(data_file_path.clone()) {
672672
let size = metadata.len();
673-
println!("Ingesting file: {} with size: {} bytes", data_file_path, size);
673+
info!("Ingesting file: {} with size: {} bytes", data_file_path, size);
674674
}
675675
self.ingest(data_file_path.as_str())?
676676
}

interactive_engine/groot-module/src/main/java/com/alibaba/graphscope/groot/coordinator/GarbageCollectManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ public void start() {
5151
logger.info("Offline version updated to {}", offlineVersion);
5252
}
5353
}
54+
} else {
55+
logger.error("hashmap is empty");
5456
}
5557
} catch (Exception e) {
5658
logger.error(

interactive_engine/groot-module/src/main/java/com/alibaba/graphscope/groot/store/StoreService.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,15 @@ private Map<Integer, OperationBatch> writeStore(
285285
ex);
286286
attrs.put("message", ex.getMessage());
287287
String msg = "Not supported operation in secondary mode";
288+
String msg2 = "less than current si_guard";
288289
if (ex.getMessage().contains(msg)) {
289290
logger.warn("Ignored write in secondary instance, {}", msg);
290291
attrs.put("success", true);
292+
} else if (ex.getMessage().contains(msg2)) {
293+
// Non recoverable failure
294+
logger.error("Write batch failed. {}", batch.toProto(), ex);
295+
attrs.put("success", false);
296+
this.writeCounter.add(batch.getOperationCount(), attrs.build());
291297
} else {
292298
attrs.put("success", false);
293299
this.writeCounter.add(batch.getOperationCount(), attrs.build());

interactive_engine/groot-server/src/main/java/com/alibaba/graphscope/groot/servers/ir/FrontendQueryManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public void run() {
117117
} else {
118118
minSnapshotId = queryQueue.peek().snapshotId;
119119
}
120-
if (minSnapshotId > oldSnapshotId) {
120+
if (minSnapshotId >= oldSnapshotId) {
121121
committer.getClient(0).updateSnapshot(frontendId, minSnapshotId);
122122
oldSnapshotId = minSnapshotId;
123123
}

0 commit comments

Comments
 (0)