Skip to main content

Timeline for answer to Lock management for isolation in SAGA Pattern by Steve

Current License: CC BY-SA 4.0

Post Revisions

6 events
when toggle format what by license comment
Jan 19, 2025 at 14:22 comment added Steve @tusharRawat, if you want the same state to be consistent across the system, then you use one database engine to store and update that data, in the standard way - do what is necessary to make that so. If that's not possible, then you're going to be buggered on consistency, it really will be that simple. Use a standard database engine and consolidate storage, or do without transactional consistency, those are the real-world alternatives.
Jan 19, 2025 at 13:07 comment added tusharRawat "reverting to consistent state" means that, all system has same order state, either prepaid or cod, as I mentioned time bounding process, will allow the complete operation to get executed in a certain time-period, if after that any update event request comes than that's not going to be honor, so there's a possibility that some system got updated while others did not because of timeout exceeded for the system. And we want to restore the system to previous state where updates were performed.
Jan 19, 2025 at 9:07 comment added Steve @tusharRawat, it's not entirely clear what you mean by "reverting to a consistent state", or that you are asking about circumstances which are normally considered an recording inconsistency by developers. And the "different usecases" is not an excuse to have two databases, if you need the transactional consistency of a single database.
Jan 19, 2025 at 5:09 comment added tusharRawat We also don't want to block processing on order by using long living locks - with no ttl. So want to understand if there can be some safe approach to time bound update operation in saga, ensuring system doesn't become in-consistent (e.g- some system has prepaid other has cod order), or if that happens we should have a way to revert/recon system to consistent state.
Jan 19, 2025 at 5:09 comment added tusharRawat Hey, Using single DB isn't option currently, as I mentioned order-data is present across separate DB for diff usecase - user-order & seller-order. Yes you are correct, possibility of order cancel & payment same time is thin but it's still exist and there are other type of cancel that can trigger by diff actor in system- seller, admin, automated etc so by using locks we want to minimise such cases.
Jan 10, 2025 at 0:31 history answered Steve CC BY-SA 4.0