You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "snazy (via GitHub)" <gi...@apache.org> on 2025/08/07 14:48:21 UTC
[I] `IcebergCatalog.validateNoLocationOverlap` is prone to data race conditions [polaris]
snazy opened a new issue, #2295:
URL: https://github.com/apache/polaris/issues/2295
### Describe the bug
The design of the persistence infrastructure makes the `validateNoLocationOverlap()` prone to false results.
With the right timing, it is possible to create multiple tables with the same base location. The flow is relatively simple and applies to tables and views and namespaces.
```
Time Create 'A' Create 'B'
==== ---------- ----------
0 create operation starts
1 create operation start
2 validateNoLocationOverlap("s3://foo/bar/")
--> OK (not used)
3 validateNoLocationOverlap("s3://foo/bar/")
--> OK (not used)
4 create entity
with base location `s3://foo/bar/`
5 create entity
with base location `s3://foo/bar/`
```
This is possible, because the `validateNoLocationOverlap()` performs 1 or many individual calls to `PolarisMetaStoreManager`, and each of those runs in within its own isolation (atomic or transactional). This means even serializable isolation would not help here.
The setting of `OPTIMIZED_SIBLING_CHECK` is irrelevant here, setting it may just make this issue harder to exploit (timing) in practice.
### To Reproduce
_No response_
### Actual Behavior
_No response_
### Expected Behavior
_No response_
### Additional context
_No response_
### System information
_No response_
--
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: issues-unsubscribe@polaris.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `IcebergCatalog.validateNoLocationOverlap` is prone to data race conditions [polaris]
Posted by "snazy (via GitHub)" <gi...@apache.org>.
snazy commented on issue #2295:
URL: https://github.com/apache/polaris/issues/2295#issuecomment-3173511440
I thought about adding a constraint there, but that seems to conflict with ALLOW_*_OVERLAP.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `IcebergCatalog.validateNoLocationOverlap` is prone to data race conditions [polaris]
Posted by "eric-maynard (via GitHub)" <gi...@apache.org>.
eric-maynard commented on issue #2295:
URL: https://github.com/apache/polaris/issues/2295#issuecomment-3168924641
With `OPTIMIZED_SIBLING_CHECK`, we are pretty close to resolving this -- I think the simplest fix for the JDBC backend is to add a constraint, e.g.:
```
ALTER TABLE entities
ADD CONSTRAINT unique_locations
UNIQUE (realm_id, parent_id, location_without_scheme);
```
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org