View Revisions: Issue #4424
Summary | 0004424: Log monitor fails to insert because of duplicate key when logs are shared across instances of a node | ||
---|---|---|---|
Revision | 2020-06-11 13:03 by pmarzullo | ||
Description | In a clustered environment, when SymmetricDS is deployed to a servlet container, and the servlet containers write to the same log file (log files are on a shared drive), the execution of the log monitor on each instance of the cluster sees the same error in the log, causing duplicate key errors because the create time of the log entry is part of the primary key. Two choices that I can think of: 1. Create a new parameter that makes the Log Monitor in cluster mode. 2. Change the insert of sym_monitor_event to a update/insert. Possible loss of real monitor entries because of exact same time of create time. ------------- The monitor job runs on both nodes. The logs are shared. Both nodes can see the same log entry and tries to insert when the query returns no log entry. The query to get the unresolved events is run outside of the monitor lock. Either the cluster lock should wrap all of the code, or the insertMonitorEvent should be changed to saveMonitorEvent. |
||
Revision | 2020-06-11 13:01 by pmarzullo | ||
Description | In a clustered environment, when SymmetricDS is deployed to a servlet container, and the servlet containers write to the same log file (log files are on a shared drive), the execution of the log monitor on each instance of the cluster sees the same error in the log, causing duplicate key errors because the create time of the log entry is part of the primary key. Two choices that I can think of: 1. Create a new parameter that makes the Log Monitor in cluster mode. 2. Change the insert of sym_monitor_event to a update/insert. Possible loss of real monitor entries because of exact same time of create time. |