flyrain opened a new pull request, #4606:
URL: https://github.com/apache/polaris/pull/4606
New tables and views created without an explicit location now get a unique,
unpredictable location: defaultWarehouseLocation appends a random UUID,
controlled by the new DEFAULT_TABLE_LOCATION_USE_UUID feature flag (on by
default), so no two tables share a path prefix. Here is an example.
Before:
```
s3://my-bucket/warehouse/sales/orders
Format: <namespace location>/<table name>
```
After (default, DEFAULT_TABLE_LOCATION_USE_UUID=true):
```
s3://my-bucket/warehouse/sales/orders-3f2a8b1c-9d4e-4a7b-8c21-5e6f0a1b2c3d
Format: <namespace location>/<table name>-<random UUID>
```
Caller-specified locations are now rejected by default, controlled by the
new ALLOW_CLIENT_SPECIFIED_TABLE_LOCATION flag (off by default). I'm OK if
people think we should set it to `on` by default given `off` is another
behavior change. This covers the top-level `location` field, a `SetLocation`
update, and the `write.data.path`/`write.metadata.path` properties, on both
create (create-table/create-view) and update (update-table/replace-view)
requests. Staged-create commits, register table/view, and federated catalogs
are unaffected.
Existing tables and views are untouched. To restore the previous behavior,
set `polaris.config.default-table-location.use-uuid=false` and
`polaris.config.allow.client-specified.table.location=true`.
Followup optimization:
1. We could skip the location check when uuid location is applied, which
improve the overall perf.
## Checklist
- [ ] ๐ก๏ธ Don't disclose security issues! (contact [email protected])
- [ ] ๐ Clearly explained why the changes are needed, or linked related
issues: Fixes #
- [ ] ๐งช Added/updated tests with good coverage, or manually tested (and
explained how)
- [ ] ๐ก Added comments for complex logic
- [ ] ๐งพ Updated `CHANGELOG.md` (if needed)
- [ ] ๐ Updated documentation in `site/content/in-dev/unreleased` (if needed)
--
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]