zeroshade commented on code in PR #1442:
URL: https://github.com/apache/iceberg-go/pull/1442#discussion_r3566791386
##########
catalog/hive/hive.go:
##########
@@ -373,6 +373,16 @@ func (c *Catalog) DropTable(ctx context.Context,
identifier table.Identifier) er
return err
}
+ lock, err := acquireLock(ctx, c.client, database, tableName, c.opts)
Review Comment:
Micro-nit: the exclusive lock is acquired before confirming the table
exists, so dropping a nonexistent table still takes and releases a lock (as the
updated `TestHiveDropTableNotExists` reflects). Harmless — and lock-before-read
is arguably safer for concurrency — just flagging in case you'd prefer to
short-circuit obviously-missing tables before locking.
--
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]