Trendyol / Jdempotent

Make your consumer, API, etc. idempotent easily.
MIT License
100 stars 25 forks source link

Query about Jdempotent States #34

Open IOhacker opened 2 years ago

IOhacker commented 2 years ago

Jdempotent supports the following states and conditions?

  1. unlocked - lock doesn't exist and can be locked locked - lock exists and is used by a process to guard a write i. typically we set a ttl on the lock according to the amount of time the write would take ii. i.e. DB write in JTA transaction of 120 seconds would use a 120 second ttl iii. if the lock doesn't transition to failed/committed in this time the lock is expired
  2. expired - lock expired TTL (vm, jvm, thread error) i. a retry can transition this from expired to locked
  3. failed - the owning process released with error (no DB connection, etc) i. a retry can transition this from failed to locked
  4. committed - write process completed all work, this is an immutable state
memojja commented 2 years ago

Now jdempotent has not locking system, but it will be good. i will get this task to backlog