Hi,
Ive been testing running two metabase nodes as described in the documentation. All seems to be working fine but occasionally, I will see an error as below especially when syncs are being done
ERROR events.view-log :: Failed to increment view counts
clojure.lang.ExceptionInfo: Failed to run statement with cluster lock {:retries 5}
#011at metabase.util.cluster_lock$do_with_cluster_lock76302__76303.invokeStatic(cluster_lock.clj:78)
#011at metabase.util.cluster_lock$do_with_cluster_lock76302__76303.invoke(cluster_lock.clj:56)
#011at metabase.util.cluster_lock$do_with_cluster_lock76302__76303.invokeStatic(cluster_lock.clj:68)
#011at metabase.util.cluster_lock$do_with_cluster_lock76302__76303.invoke(cluster_lock.clj:56)
#011at metabase.events.view_log$increment_view_counts_BANG__STAR_.invokeStatic(view_log.clj:44)
#011at metabase.events.view_log$increment_view_counts_BANG__STAR_.invoke(view_log.clj:29)
#011at grouper.core$body_fn$fn__66421.invoke(core.clj:72)
#011at grouper.core$start_BANG_$thread__66464.invoke(core.clj:135)
#011at clojure.lang.AFn.run(AFn.java:22)
#011at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: clojure.lang.ExceptionInfo: ERROR: canceling statement due to user request
Where: while locking tuple (0,4) in relation "metabase_cluster_lock" {:toucan2/context-trace [["resolve connection" {:toucan2.connection/connectable metabase.db.connection.ApplicationDB}] ["resolve connection" {:toucan2.connection/connectable :default}] ["resolve connection" {:toucan2.connection/connectable nil}]]}
I'm curious to know the following:-
- Is there a way to do syncs from just one node?
- Are there recommended improvements I can make to ensure optimal performance from both nodes?
Asking as from the documentation, all you need to do is add another instance and add both nodes to an LB. Nothing more to do. But if locks do happen or syncs happen on both nodes with conflict, might be an issue?
Regards,