You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using ShedLock Provider Elasticsearch8 5.13.0.
The issue is that the Elasticsearch Lock Provider uses hardcoded field names such as 'lockUntil', 'lockedAt' and others. This causes errors when ElasticsearchClient is configured with JsonpMapper using SNAKE_CASE.
Successful Flow:
The first attempt to acquire the lock leads to the creation of the ShedLock index and insertion of the record:
When attempting to lock again, the provider checks the 'lockUntil' field using this script.
Error Scenario:
An error occurs when we skip step 2 (unlocking) and try to lock again. The query fails with the message: [es/update] failed: [illegal_argument_exception] failed to execute script. The issue is that the script checks for the 'lockUntil' field, which does not exist because only 'lock_until' is present.
This issue arises when using SNAKE_CASE with JsonpMapper.
Thank you.
The text was updated successfully, but these errors were encountered:
Hi, thanks for reporting. Can you please send a PR with the fix? Either somehow taking the JsonpMapper settings into account or at least make the column names configurable similar to the JDBC lock provider. Thanks a lot
I'm using ShedLock Provider Elasticsearch8 5.13.0.
The issue is that the Elasticsearch Lock Provider uses hardcoded field names such as 'lockUntil', 'lockedAt' and others. This causes errors when ElasticsearchClient is configured with JsonpMapper using SNAKE_CASE.
Successful Flow:
Here, all fields are in snake_case because JsonpMapper is configured this way.
Error Scenario:
An error occurs when we skip step 2 (unlocking) and try to lock again. The query fails with the message:
[es/update] failed: [illegal_argument_exception] failed to execute script.
The issue is that the script checks for the 'lockUntil' field, which does not exist because only 'lock_until' is present.This issue arises when using SNAKE_CASE with JsonpMapper.
Thank you.
The text was updated successfully, but these errors were encountered: