Sumit6307 commented on issue #7993: URL: https://github.com/apache/incubator-seata/issues/7993#issuecomment-3876225109
> DataBaseDistributedLocker is limited to task coordination within the TC cluster to prevent multiple TC nodes from executing the same task simultaneously. If a node cannot acquire the distributed lock, it simply exits the attempt on the assumption that another node is already handling the task; additionally, each task is executed by a single-threaded thread pool, so there is no risk of exhausting or blocking a thread pool. Optimization proposals for increasing asynchronous task throughput are being discussed in issue [#7993](https://github.com/apache/incubator-seata/issues/7993). The global locks used by the AT mode are implemented in subclasses of the Locker class at https://github.com/apache/incubator-seata/blob/2.x/core/src/main/java/org/apache/seata/core/lock/Locker.java @funky-eyes Thanks for the clarification regarding the scope of DataBaseDistributedLocker. I understand it is used for task coordination within the TC cluster and runs in a single-threaded pool, rather than for AT mode global locks. However, I believe the "NoWait" mechanism is still a valuable optimization for this specific component: 1) Fail Fast: currently, if a lock is contended, the thread blocks until the database timeout (which can be seconds). NOWAIT would allow the attempt to fail immediately, freeing up the thread instantly rather than blocking it. 2)Existing TODO: There is an explicit // TODO: need nowait adaptation in DataBaseDistributedLocker.java (line 150), suggesting this was a planned improvement by the original authors. Would you be open to a PR implementing this NOWAIT adaptation for DataBaseDistributedLocker to resolve that TODO and improve coordination efficiency? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
