Commit 6c6aa4e
Optimize UsageJobDaoImpl.updateJobSuccess to use direct UPDATE instead of row-level lock
Replace lockRow + explicit transaction with a single update(jobId,
jobForUpdate) call. All field values are parameters passed by the
caller — nothing is read from the locked row.
The TransactionLegacy.open(USAGE_DB) is kept since this method
explicitly targets the usage database. The txn.start/commit/rollback
are removed since the single update() call is autocommit.
The lock was redundant because the usage server model is single-owner:
one server processes one job at a time.1 parent a289bb0 commit 6c6aa4e
1 file changed
Lines changed: 1 addition & 7 deletions
Lines changed: 1 addition & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | 64 | | |
68 | 65 | | |
69 | 66 | | |
70 | 67 | | |
71 | 68 | | |
72 | 69 | | |
73 | 70 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 71 | + | |
77 | 72 | | |
78 | | - | |
79 | 73 | | |
80 | 74 | | |
81 | 75 | | |
| |||
0 commit comments