authgear-server
authgear-server copied to clipboard
Elasticsearch reindex command cannot be run on HK cluster
2024/05/01 15:38:26 App): reindexing
Failed to update last_indexed_at of user
Error: sql: transaction has already been committed or rolled back
I suspect there is some race condition in this line:
The problem maybe UpdateLastIndexedAt
is using the same db handle used by QueryPage
, which internally assigning a same variable in HookHandle tx
. I guess maybe they are running at the same time causing the problem.
Maybe we should UpdateLastIndexedAt
in a queue.
@tung2744 do we still observe this problem in staging?