Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ private void listenChanges() {
schema.name());
this.nameCache.invalidate(prefixedName);
}
this.resetCachedAll(type);
return true;
} else if (ACTION_CLEAR.equals(args[0])) {
this.clearCache();
Expand All @@ -137,6 +138,11 @@ private void listenChanges() {
}
}

private final void resetCachedAll(HugeType type) {
// Set the cache all flag of the schema type to false
this.cachedTypes().put(type, false);
}

private void clearCache() {
this.idCache.clear();
this.nameCache.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private void applyCommand(StoreType type, StoreAction action,

@Override
public void onSnapshotSave(SnapshotWriter writer, Closure done) {
LOG.debug("The node {} start snapshot save", this.node().nodeId());
LOG.info("The node {} start snapshot saving", this.node().nodeId());
this.snapshotFile.save(writer, done, this.context.snapshotExecutor());
}

Expand All @@ -206,6 +206,12 @@ public boolean onSnapshotLoad(SnapshotReader reader) {
LOG.warn("Leader is not supposed to load snapshot.");
return false;
}
/*
* Snapshot load occured in RaftNode constructor, specifically at step
* `this.node = this.initRaftNode()`, at this time the NodeImpl is null
* in RaftNode so we can't call `this.node().nodeId()`
*/
LOG.info("The node {} start snapshot loading", this.context.endpoint());
return this.snapshotFile.load(reader);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ public static synchronized RocksDBOptions instance() {
"rocksdb.data_disks",
false,
"The optimized disks for storing data of RocksDB. " +
"The format of each element: `STORE/TABLE: /path/to/disk`." +
"Allowed keys are [graph/vertex, graph/edge_out, graph/edge_in, " +
"graph/secondary_index, graph/range_index]",
"The format of each element: `STORE/TABLE: /path/disk`." +
"Allowed keys are [g/vertex, g/edge_out, g/edge_in, " +
"g/secondary_index, g/range_index]",
null,
String.class,
ImmutableList.of()
Expand Down