tanmayrauth commented on code in PR #1396:
URL: https://github.com/apache/iceberg-go/pull/1396#discussion_r3525698574
##########
io/mem.go:
##########
@@ -80,8 +80,13 @@ func (m *MemFS) Open(name string) (File, error) {
func (m *MemFS) Remove(name string) error {
m.mu.Lock()
+ defer m.mu.Unlock()
Review Comment:
Nice catch switching to `defer m.mu.Unlock()` here — without it the new
early return on a missing key would've leaked the lock. And using `Op:
"remove"` matches os.Remove's own PathError.Op, so error strings stay
consistent between the mem and local backends. This also means
table/orphan_cleanup.go:858's `!os.IsNotExist(rmErr)` guard is now actually
exercised under mem://, which it wasn't before. LGTM.
--
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]