Skip to content

Commit

Permalink
more logs for saving
Browse files Browse the repository at this point in the history
  • Loading branch information
firestar committed Dec 30, 2023
1 parent dc28939 commit 91f9c13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

group = 'com.nucleodb'
version = '1.14.0'
version = '1.14.1'

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,9 @@ private boolean deleteInternalConsumer(DataEntry entry, Consumer<DataEntry> cons
if (consumer != null) consumer.accept(null);
return false;
}
DataEntry entryDelete = createNewObject(entry);
String changeUUID = UUID.randomUUID().toString();
entryDelete.versionIncrease();
Delete delete = new Delete(changeUUID, entryDelete);
entry.versionIncrease();
Delete delete = new Delete(changeUUID, entry);
if (consumer != null) {
consumers.put(changeUUID, consumer);
}
Expand Down Expand Up @@ -723,19 +722,19 @@ public void modify(Modification mod, Object modification) {
try {
itemProcessed();
if (this.config.getReadToTime() != null && u.getTime().isAfter(this.config.getReadToTime())) {
//System.out.println("Update after target db date");
logger.info("Update after target db date");
consumerResponse(null, u.getChangeUUID());
fireListeners(Modification.UPDATE, null);
return;
}
DataEntry de = keyToEntry.get(u.getKey());
if (de != null) {
if (de.getVersion() >= u.getVersion()) {
//logger.info("Ignore already saved change. " + de.getKey()+" table: "+ getConfig().table);
logger.info("Ignore already saved change. " + de.getKey()+" table: "+ getConfig().table);
return; // ignore change
}
if (de.getVersion() + 1 != u.getVersion()) {
//logger.info("Version not ready!" + de.getKey()+" table: "+ getConfig().table);
logger.info("Version not ready!" + de.getKey()+" table: "+ getConfig().table);
itemRequeue();
modqueue.add(new ModificationQueueItem(mod, modification));
leftInModQueue.incrementAndGet();
Expand Down

0 comments on commit 91f9c13

Please sign in to comment.