subkanthi commented on PR #678:
URL: https://github.com/apache/iceberg-go/pull/678#issuecomment-3774327814
The current implementation of `commitTable` is not atomic, using Hive
Locking API similar to iceberg-python
```
#
https://github.com/apache/hive/blob/master/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift#L1232
with self._client as open_client:
lock: LockResponse =
open_client.lock(self._create_lock_request(database_name, table_name))
try:
if lock.state != LockState.ACQUIRED:
if lock.state == LockState.WAITING:
self._wait_for_lock(database_name, table_name,
lock.lockid, open_client)
else:
raise CommitFailedException(f"Failed to acquire lock
for {table_identifier}, state: {lock.state}")
```
--
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]