dynamodb-lock-client-golang icon indicating copy to clipboard operation
dynamodb-lock-client-golang copied to clipboard

Why scan in hasLock()?

Open alertedsnake opened this issue 5 years ago • 0 comments

So I noticed that there's a scan in hasLock() - is there a reason why this is not just a get? I see there's some timestamp comparison in here, but with a lot of things using the lock table, this scan could get expensive. The get is very simple and since lock keys are unique, and any timestamp comparisons could be done in code.

Just wondering if I'm missing something here.

alertedsnake avatar Feb 08 '19 14:02 alertedsnake