Skip to content

Commit 946ee4b

Browse files
snazyrenovate-botflyrainfivetran-ashokborrasinghpk234
authored
Dremio merge 2025 05 14 / Adopt config keys (#65)
Last merged commit f2d4b55 The NoSQL-parts contains changes to align the nosql-specific configuration keys + values as follows. No immediate action needed for Dremio, as `org.apache.polaris.persistence.nosql.quarkus.config.ConfigBackwardsCompat` takes care of relocating old config keys + values. ``` polaris.persistence.type=persistence polaris.backend.name=... ``` to ``` polaris.persistence.type=noqsl polaris.persistence.backend.type=... ``` * main: Update dependency io.micrometer:micrometer-bom to v1.14.7 (apache#1570) * JDBC: Simplify JDBC entity conversion (apache#1564) * fix(Catalog): Add List PolarisStorageAction for all metadata read operations (apache#1391) * fix(Catalog): Add List PolarisStorageAction for all metadata read operations * Site : Update cloud providers quickstart to use (apache#1554) * [JDBC] Add retries with delay (apache#1517) [JDBC] Add retries with delay This change adds retries in the JDBC persistence layer, these retries are with jitter and are tunable in the following ways : a. max_retries : Total number of retries we expect the persistence to do on Connection Reset exception and serializable error exceptions, before giving up. b. max_duaration_in_ms : Time in ms since the first attempt this retries should be done. For ex on configured 500 ms the total time spent in retrying should not exceed 500ms (optimistically) c. initial_delay_in_ms : initial delay before the first attempt * [Docs] Add JDBC retry properties (apache#1550) * Use env var in spark container (apache#1522) * added Signed-off-by: owenowenisme <[email protected]> * fix Signed-off-by: owenowenisme <[email protected]> * add export Signed-off-by: owenowenisme <[email protected]> * update docs using .env Signed-off-by: owenowenisme <[email protected]> * update docs Signed-off-by: owenowenisme <[email protected]> * change back from using .env to export Signed-off-by: owenowenisme <[email protected]> * Apply suggestions from code review Co-authored-by: Adnan Hemani <[email protected]> --------- Signed-off-by: owenowenisme <[email protected]> Co-authored-by: Adnan Hemani <[email protected]> * Migrate catalog configs to the new reserved prefix (apache#1557) * rewrite * rewrite * stable * changes per comments * Remove unused javadoc parameter in BasePersistence (apache#1580) * Site: Publish table maintenance policies (apache#1581) * Add schema symlinks to static site directory Co-authored-by: Yufei Gu <yufei.apache.org> * Remove `defaults` / `overrides` from feature configurations (apache#1572) * double WithParentName * autolint * Revert some * autolint * add to BCconfigs * autolint * yank * copy yuns test * autolint * remove defaults * repair test * autolint * stablize test * stable * autolint * configmap change * copypaste * regen helm docs * autolint * no dots in props * remove accidental file * small changes per review * clean out defaults * BCC fix * autolint * typefix * autolint * main: Update dependency io.prometheus:prometheus-metrics-exporter-servlet-jakarta to v1.3.7 (apache#1578) * main: Update dependency io.micrometer:micrometer-bom to v1.15.0 (apache#1575) * main: Update dependency io.projectreactor.netty:reactor-netty-http to v1.2.6 (apache#1577) * main: Update dependency boto3 to v1.38.15 (apache#1574) * NoSQL: BREAKING: Change NoSQL configuration options Requires changing the Quarkus configuration(s) from ``` polaris.persistence.type=persistence polaris.backend.name=... ``` to ``` polaris.persistence.type=noqsl polaris.persistence.backend.type=... ``` * DREMIO: Use 'nosql' persistence by default * DREMIO: backwards-compatible configuations * Revert "DREMIO: Use 'nosql' persistence by default" This reverts commit ccba4976b5398511c1c987a242ac11517278c700. Causes test failures :( * damn defaults refactoring 😡 * try fix helm --------- Signed-off-by: owenowenisme <[email protected]> Co-authored-by: Mend Renovate <[email protected]> Co-authored-by: Yufei Gu <[email protected]> Co-authored-by: fivetran-ashokborra <[email protected]> Co-authored-by: Prashant Singh <[email protected]> Co-authored-by: Owen Lin (You-Cheng Lin) <[email protected]> Co-authored-by: Adnan Hemani <[email protected]> Co-authored-by: Eric Maynard <[email protected]> Co-authored-by: Dmitri Bourlatchkov <[email protected]>
1 parent 4974353 commit 946ee4b

File tree

119 files changed

+1531
-595
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+1531
-595
lines changed

bom/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ dependencies {
8989
api(project(":polaris-jpa-model"))
9090

9191
api(project(":polaris-quarkus-admin"))
92+
api(project(":polaris-quarkus-common"))
9293
api(project(":polaris-quarkus-test-commons"))
9394
api(project(":polaris-quarkus-defaults"))
9495
api(project(":polaris-quarkus-server"))

client/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ dependencies = [
3434
"python-dateutil>=2.8.2",
3535
"pydantic>=2.0.0",
3636
"typing-extensions>=4.7.1",
37-
"boto3==1.38.13",
37+
"boto3==1.38.15",
3838
]
3939

4040
[project.urls]

extension/persistence/nosql/persistence/api/src/main/java/org/apache/polaris/persistence/nosql/api/backend/Backend.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
public interface Backend extends AutoCloseable {
3636
/** Name of this backend. This value serves as an identifier to select the correct backend. */
3737
@Nonnull
38-
String name();
38+
String type();
3939

4040
/**
4141
* Called to set up the database schema.

extension/persistence/nosql/persistence/api/src/main/java/org/apache/polaris/persistence/nosql/api/backend/BackendConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
import org.apache.polaris.immutables.PolarisImmutable;
2626

2727
/** Polaris persistence backend configuration. */
28-
@ConfigMapping(prefix = "polaris.backend")
28+
@ConfigMapping(prefix = "polaris.persistence.backend")
2929
@JsonSerialize(as = ImmutableBuildableBackendConfiguration.class)
3030
@JsonDeserialize(as = ImmutableBuildableBackendConfiguration.class)
3131
public interface BackendConfiguration {
3232
/** Name of the persistence backend to use. */
33-
Optional<String> name();
33+
Optional<String> type();
3434

3535
@PolarisImmutable
3636
interface BuildableBackendConfiguration extends BackendConfiguration {
@@ -39,6 +39,6 @@ static ImmutableBuildableBackendConfiguration.Builder builder() {
3939
}
4040

4141
@Override
42-
Optional<String> name();
42+
Optional<String> type();
4343
}
4444
}

extension/persistence/nosql/persistence/benchmark/NOTES.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ podman run --rm -ti \
2828

2929
```bash
3030
./gradlew :polaris-persistence-nosql-benchmark:jmhJar && java \
31-
-Dpolaris.backend.name=InMemory \
31+
-Dpolaris.persistence.backend.type=InMemory \
3232
-jar persistence/benchmark/build/libs/polaris-persistence-nosql-benchmark-1.0.0-incubating-SNAPSHOT-jmh.jar
3333
```
3434

3535
```bash
3636
./gradlew :polaris-persistence-nosql-benchmark:jmhJar && java \
37-
-Dpolaris.backend.name=MongoDb \
38-
-Dpolaris.backend.mongodb.connection-string=mongodb://localhost:27017/ \
39-
-Dpolaris.backend.mongodb.database-name=test \
37+
-Dpolaris.persistence.backend.type=MongoDb \
38+
-Dpolaris.persistence.backend.mongodb.connection-string=mongodb://localhost:27017/ \
39+
-Dpolaris.persistence.backend.mongodb.database-name=test \
4040
-jar persistence/benchmark/build/libs/polaris-persistence-nosql-benchmark-1.0.0-incubating-SNAPSHOT-jmh.jar
4141
```

extension/persistence/nosql/persistence/benchmark/src/jmh/java/org/apache/polaris/persistence/nosql/benchmark/BaseParam.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void setupPersistence() {
4141
this.clock = MonotonicClockImpl.newDefaultInstance();
4242
this.backend = configurer.buildBackendFromConfiguration(factory);
4343
var info = backend.setupSchema().orElse("");
44-
System.out.printf("Opened new persistence backend '%s' %s%n", backend.name(), info);
44+
System.out.printf("Opened new persistence backend '%s' %s%n", backend.type(), info);
4545

4646
var idGenerator =
4747
new SnowflakeIdGeneratorFactory()

extension/persistence/nosql/persistence/cdi/quarkus/src/main/java/org/apache/polaris/persistence/nosql/quarkus/backend/BackendProvider.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ Backend backend(
4242

4343
var backendName =
4444
backendConfiguration
45-
.name()
45+
.type()
4646
.orElseThrow(
4747
() ->
4848
new IllegalStateException(
49-
"Mandatory configuration option polaris.backend.name is missing!"));
49+
"Mandatory configuration option polaris.persistence.backend.type is missing!"));
5050

5151
var backendBuilder = backendBuilders.select(BackendType.Literal.of(backendName));
5252
if (!backendBuilder.isResolvable()) {
5353
throw new IllegalStateException(
5454
format(
55-
"Backend '%s' provided in configuration polaris.backend.name is not available. Available backends: %s",
55+
"Backend '%s' provided in configuration polaris.persistence.backend.type is not available. Available backends: %s",
5656
backendName,
5757
backendBuilders
5858
.handlesStream()
@@ -70,7 +70,7 @@ Backend backend(
7070
if (backendBuilder.isAmbiguous()) {
7171
throw new IllegalStateException(
7272
format(
73-
"Multiple implementations match the backend name '%s' provided in configuration polaris.backend.name is not available. All available backends: %s",
73+
"Multiple implementations match the backend name '%s' provided in configuration polaris.persistence.backend.type is not available. All available backends: %s",
7474
backendName,
7575
backendBuilders
7676
.handlesStream()
@@ -90,7 +90,7 @@ Backend backend(
9090
var backend = builder.buildBackend();
9191
try {
9292
var setupSchemaResult = backend.setupSchema().orElse("");
93-
LOGGER.info("Opened new persistence backend '{}' {}", backend.name(), setupSchemaResult);
93+
LOGGER.info("Opened new persistence backend '{}' {}", backend.type(), setupSchemaResult);
9494

9595
return builder.buildBackend();
9696
} catch (Exception e) {

extension/persistence/nosql/persistence/cdi/quarkus/src/main/java/org/apache/polaris/persistence/nosql/quarkus/backend/ObservingBackend.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public ObservingBackend(@NotObserved Backend backend) {
6464

6565
@Nonnull
6666
@Override
67-
public String name() {
68-
return backend.name();
67+
public String type() {
68+
return backend.type();
6969
}
7070

7171
@Nonnull

extension/persistence/nosql/persistence/cdi/quarkus/src/main/java/org/apache/polaris/persistence/nosql/quarkus/backend/QuarkusJdbcConfig.java

Lines changed: 0 additions & 39 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
package org.apache.polaris.persistence.nosql.quarkus.config;
20+
21+
import io.smallrye.config.ConfigSourceInterceptorContext;
22+
import io.smallrye.config.ConfigValue;
23+
import io.smallrye.config.RelocateConfigSourceInterceptor;
24+
import org.slf4j.Logger;
25+
import org.slf4j.LoggerFactory;
26+
27+
public class ConfigBackwardsCompat extends RelocateConfigSourceInterceptor {
28+
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigBackwardsCompat.class);
29+
30+
public ConfigBackwardsCompat() {
31+
super(
32+
name -> {
33+
if ("polaris.backend.name".equals(name)) {
34+
name = newName(name, "polaris.persistence.backend.type");
35+
} else if (name.startsWith("polaris.persistence.cache-invalidations.")) {
36+
name =
37+
newName(
38+
name,
39+
"polaris.persistence.distributed-cache-invalidations."
40+
+ name.substring("polaris.persistence.cache-invalidations.".length()));
41+
}
42+
return name;
43+
});
44+
}
45+
46+
private static String newName(String name, String newName) {
47+
LOGGER.warn("Using legacy configuration key '{}', migrate to '{}'", name, newName);
48+
return newName;
49+
}
50+
51+
@Override
52+
public ConfigValue getValue(ConfigSourceInterceptorContext context, String name) {
53+
var value = super.getValue(context, name);
54+
if ("polaris.persistence.type".equals(name)) {
55+
if ("persistence".equals(value.getValue())) {
56+
LOGGER.warn(
57+
"Using legacy value for 'polaris.persistence.type=persistence', migrate to 'polaris.persistence.type=nosql'");
58+
value = value.withValue("nosql");
59+
}
60+
}
61+
return value;
62+
}
63+
}

0 commit comments

Comments
 (0)