Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Bugfix/Data inconsistency caused by updateEventHandler (#3843)
Browse files Browse the repository at this point in the history
* remove previous index of event handlers by event if event handler's event gets updated

* run ./gradlew spotlessApply
  • Loading branch information
wy-hua authored Nov 12, 2023
1 parent 8981878 commit be790a4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public void updateEventHandler(EventHandler eventHandler) {
throw new NotFoundException(
"EventHandler with name %s not found!", eventHandler.getName());
}
if (!existing.getEvent().equals(eventHandler.getEvent())) {
removeIndex(existing);
}
index(eventHandler);
jedisProxy.hset(nsKey(EVENT_HANDLERS), eventHandler.getName(), toJson(eventHandler));
recordRedisDaoRequests("updateEventHandler");
Expand Down

0 comments on commit be790a4

Please sign in to comment.