Skip to content

Commit da54eb1

Browse files
authored
Improve documentation wording (#4329)
1 parent c98d610 commit da54eb1

3 files changed

Lines changed: 54 additions & 22 deletions

File tree

polaris-core/src/main/java/org/apache/polaris/core/config/FeatureConfiguration.java

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,10 @@ public static void enforceFeatureEnabledOrThrow(
155155
.catalogConfig("polaris.config.allow.overlapping.table.location")
156156
.legacyCatalogConfig("allow.overlapping.table.location")
157157
.description(
158-
"If set to true, allow one table's location to reside within another table's location. "
159-
+ "This is only enforced within a given namespace.")
158+
"If set to true, Polaris allows table or view locations to overlap existing table "
159+
+ "or namespace locations. This disables Polaris location-overlap protection "
160+
+ "for table-like objects in the catalog and should only be used for "
161+
+ "compatibility cases where storage isolation is enforced outside Polaris.")
160162
.defaultValue(false)
161163
.buildFeatureConfiguration();
162164

@@ -173,7 +175,10 @@ public static void enforceFeatureEnabledOrThrow(
173175
PolarisConfiguration.<Boolean>builder()
174176
.key("ALLOW_EXTERNAL_METADATA_FILE_LOCATION")
175177
.description(
176-
"If set to true, allows metadata files to be located outside the default metadata directory.")
178+
"If set to true, Polaris allows metadata files to be located outside the table's "
179+
+ "default metadata directory. This relaxes the normal check that metadata "
180+
+ "stays under the table location and should only be used when metadata is "
181+
+ "intentionally stored in separately controlled locations.")
177182
.defaultValue(false)
178183
.buildFeatureConfiguration();
179184

@@ -189,7 +194,12 @@ public static void enforceFeatureEnabledOrThrow(
189194
.key("ALLOW_UNSTRUCTURED_TABLE_LOCATION")
190195
.catalogConfig("polaris.config.allow.unstructured.table.location")
191196
.legacyCatalogConfig("allow.unstructured.table.location")
192-
.description("If set to true, allows unstructured table locations.")
197+
.description(
198+
"If set to true, Polaris allows caller-specified table and view locations outside "
199+
+ "the structured namespace layout. This removes the default constraint that "
200+
+ "confines new table locations to the parent namespace location. Allowed-"
201+
+ "location validation still applies, but this should only be enabled for "
202+
+ "catalogs that must support externally managed or migrated table locations.")
193203
.defaultValue(false)
194204
.buildFeatureConfiguration();
195205

@@ -199,7 +209,11 @@ public static void enforceFeatureEnabledOrThrow(
199209
.catalogConfig("polaris.config.allow.external.table.location")
200210
.legacyCatalogConfig("allow.external.table.location")
201211
.description(
202-
"If set to true, allows tables to have external locations outside the default structure.")
212+
"If set to true, Polaris treats table locations as externally managed instead of "
213+
+ "assuming the default managed structure. Allowed-location validation still "
214+
+ "applies, but metadata location checks are relaxed, so operators should keep "
215+
+ "allowed locations narrow and specific. This setting is typically used "
216+
+ "together with ALLOW_UNSTRUCTURED_TABLE_LOCATION.")
203217
.defaultValue(false)
204218
.buildFeatureConfiguration();
205219

@@ -216,8 +230,11 @@ public static void enforceFeatureEnabledOrThrow(
216230
PolarisConfiguration.<Boolean>builder()
217231
.key("ALLOW_WILDCARD_LOCATION")
218232
.description(
219-
"Indicates whether asterisks ('*') in configuration values defining allowed"
220-
+ " storage locations are processed as meaning 'any location'.")
233+
"Indicates whether asterisks ('*') in configured allowed locations are processed "
234+
+ "as meaning 'any location'. If enabled and '*' is present in an allowed-"
235+
+ "locations list, Polaris accepts every requested location. This removes the "
236+
+ "normal location allowlist boundary and should only be used for tightly "
237+
+ "controlled compatibility or test scenarios.")
221238
.defaultValue(false)
222239
.buildFeatureConfiguration();
223240

@@ -427,21 +444,26 @@ public static void enforceFeatureEnabledOrThrow(
427444
PolarisConfiguration.<Boolean>builder()
428445
.key("ALLOW_OPTIMIZED_SIBLING_CHECK")
429446
.description(
430-
"When set to true, Polaris will permit enabling the feature OPTIMIZED_SIBLING_CHECK "
431-
+ "for catalogs, this is done to prevent accidental enabling the feature in cases such as schema migrations, without backfill and hence leading to potential data integrity issues.\n"
432-
+ "This will be removed in 2.0.0 when polaris ships with the necessary migrations to backfill the index.")
447+
"When set to true, Polaris permits OPTIMIZED_SIBLING_CHECK to be enabled after "
448+
+ "explicit operator acknowledgment. Only acknowledge this when the realm has "
449+
+ "the required index and backfill state; enabling the check in previously used "
450+
+ "realms without that state may lead to incorrect overlap validation. This "
451+
+ "flag is temporary and will be removed when Polaris can backfill the required "
452+
+ "data automatically.")
433453
.defaultValue(false)
434454
.buildFeatureConfiguration();
435455

436456
public static final FeatureConfiguration<Boolean> OPTIMIZED_SIBLING_CHECK =
437457
PolarisConfiguration.<Boolean>builder()
438458
.key("OPTIMIZED_SIBLING_CHECK")
439459
.description(
440-
"When set, an index is used to perform the sibling check between tables, views, and namespaces. New "
441-
+ "locations will be checked against previous ones based on components, so the new location "
442-
+ "/foo/bar/ will check for a sibling at /, /foo/ and /foo/bar/%. In order for this check to "
443-
+ "be correct, locations should end with a slash. See ADD_TRAILING_SLASH_TO_LOCATION for a way "
444-
+ "to enforce this when new locations are added. Only supported by the JDBC metastore.")
460+
"When set, Polaris uses an index to perform sibling overlap checks between tables, "
461+
+ "views, and namespaces. This is not a bypass mode, but enabling or disabling "
462+
+ "it can change overlap-detection coverage for non-standard location layouts. "
463+
+ "Only enable it when the required index and backfill state is known to be "
464+
+ "correct. For correct results, locations should end with a slash; see "
465+
+ "ADD_TRAILING_SLASH_TO_LOCATION. Supported by the JDBC and NoSQL metastore "
466+
+ "implementations.")
445467
.defaultValue(false)
446468
.buildFeatureConfiguration();
447469

site/content/in-dev/unreleased/configuration/config-sections/flags-polaris_features.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ If set to true, allow credential vending for external catalogs.
5757

5858
##### `polaris.features."ALLOW_EXTERNAL_METADATA_FILE_LOCATION"`
5959

60-
If set to true, allows metadata files to be located outside the default metadata directory.
60+
If set to true, Polaris allows metadata files to be located outside the table's default metadata directory. This relaxes the normal check that metadata stays under the table location and should only be used when metadata is intentionally stored in separately controlled locations.
6161

6262
- **Type:** `Boolean`
6363
- **Default:** `false`
@@ -66,7 +66,7 @@ If set to true, allows metadata files to be located outside the default metadata
6666

6767
##### `polaris.features."ALLOW_EXTERNAL_TABLE_LOCATION"`
6868

69-
If set to true, allows tables to have external locations outside the default structure.
69+
If set to true, Polaris treats table locations as externally managed instead of assuming the default managed structure. Allowed-location validation still applies, but metadata location checks are relaxed, so operators should keep allowed locations narrow and specific. This setting is typically used together with ALLOW_UNSTRUCTURED_TABLE_LOCATION.
7070

7171
- **Type:** `Boolean`
7272
- **Default:** `false`
@@ -104,7 +104,7 @@ If set to true, allow one namespace's location to reside within another namespac
104104

105105
##### `polaris.features."ALLOW_OPTIMIZED_SIBLING_CHECK"`
106106

107-
When set to true, Polaris will permit enabling the feature OPTIMIZED_SIBLING_CHECK for catalogs, this is done to prevent accidental enabling the feature in cases such as schema migrations, without backfill and hence leading to potential data integrity issues. This will be removed in 2.0.0 when polaris ships with the necessary migrations to backfill the index.
107+
When set to true, Polaris permits OPTIMIZED_SIBLING_CHECK to be enabled after explicit operator acknowledgment. Only acknowledge this when the realm has the required index and backfill state; enabling the check in previously used realms without that state may lead to incorrect overlap validation. This flag is temporary and will be removed when Polaris can backfill the required data automatically.
108108

109109
- **Type:** `Boolean`
110110
- **Default:** `false`
@@ -149,7 +149,7 @@ Config key for whether to allow setting the FILE_IO_IMPL using catalog propertie
149149

150150
##### `polaris.features."ALLOW_TABLE_LOCATION_OVERLAP"`
151151

152-
If set to true, allow one table's location to reside within another table's location. This is only enforced within a given namespace.
152+
If set to true, Polaris allows table or view locations to overlap existing table or namespace locations. This disables Polaris location-overlap protection for table-like objects in the catalog and should only be used for compatibility cases where storage isolation is enforced outside Polaris.
153153

154154
- **Type:** `Boolean`
155155
- **Default:** `false`
@@ -159,7 +159,7 @@ If set to true, allow one table's location to reside within another table's loca
159159

160160
##### `polaris.features."ALLOW_UNSTRUCTURED_TABLE_LOCATION"`
161161

162-
If set to true, allows unstructured table locations.
162+
If set to true, Polaris allows caller-specified table and view locations outside the structured namespace layout. This removes the default constraint that confines new table locations to the parent namespace location. Allowed-location validation still applies, but this should only be enabled for catalogs that must support externally managed or migrated table locations.
163163

164164
- **Type:** `Boolean`
165165
- **Default:** `false`
@@ -169,7 +169,7 @@ If set to true, allows unstructured table locations.
169169

170170
##### `polaris.features."ALLOW_WILDCARD_LOCATION"`
171171

172-
Indicates whether asterisks ('*') in configuration values defining allowed storage locations are processed as meaning 'any location'.
172+
Indicates whether asterisks ('*') in configured allowed locations are processed as meaning 'any location'. If enabled and '*' is present in an allowed-locations list, Polaris accepts every requested location. This removes the normal location allowlist boundary and should only be used for tightly controlled compatibility or test scenarios.
173173

174174
- **Type:** `Boolean`
175175
- **Default:** `false`
@@ -376,7 +376,7 @@ How many times to retry refreshing metadata when the previous error was retryabl
376376

377377
##### `polaris.features."OPTIMIZED_SIBLING_CHECK"`
378378

379-
When set, an index is used to perform the sibling check between tables, views, and namespaces. New locations will be checked against previous ones based on components, so the new location /foo/bar/ will check for a sibling at /, /foo/ and /foo/bar/%. In order for this check to be correct, locations should end with a slash. See ADD_TRAILING_SLASH_TO_LOCATION for a way to enforce this when new locations are added. Only supported by the JDBC metastore.
379+
When set, Polaris uses an index to perform sibling overlap checks between tables, views, and namespaces. This is not a bypass mode, but enabling or disabling it can change overlap-detection coverage for non-standard location layouts. Only enable it when the required index and backfill state is known to be correct. For correct results, locations should end with a slash; see ADD_TRAILING_SLASH_TO_LOCATION. Supported by the JDBC and NoSQL metastore implementations.
380380

381381
- **Type:** `Boolean`
382382
- **Default:** `false`

site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/_index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,16 @@ polaris.features."SUPPORTED_CATALOG_STORAGE_TYPES" = [ "S3", "Azure" ]
221221
```
222222
Leave out `FILE` to prevent its use. Only include the storage types your setup needs.
223223

224+
### Review Location Compatibility Flags
225+
226+
Treat non-default location compatibility flags as part of your production deployment review.
227+
`ALLOW_UNSTRUCTURED_TABLE_LOCATION`, `ALLOW_EXTERNAL_TABLE_LOCATION`,
228+
`ALLOW_EXTERNAL_METADATA_FILE_LOCATION`, `ALLOW_TABLE_LOCATION_OVERLAP`, and wildcard allowed
229+
locations all relax the default storage boundary model and should only be enabled for specific
230+
interoperability or migration requirements. `OPTIMIZED_SIBLING_CHECK` is not a bypass mode, but it
231+
changes how overlap detection is performed and should only be enabled when the required index and
232+
backfill state is known to be correct.
233+
224234
### Polaris Server Header
225235

226236
Polaris can emit an informational `Server` HTTP response header using Quarkus' built-in header

0 commit comments

Comments
 (0)