You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polaris.apache.org by ad...@apache.org on 2026/10/07 18:46:09 UTC
(polaris) branch main updated: Enable MongoDB health check only for MongoDB persistence (#5665)
This is an automated email from the ASF dual-hosted git repository.
adutra pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new c9c6b6eb42 Enable MongoDB health check only for MongoDB persistence (#5665)
c9c6b6eb42 is described below
commit c9c6b6eb426f975031302da5d6665fa86e1abc64
Author: fivetran-ashokborra <12...@users.noreply.github.com>
AuthorDate: Thu Oct 8 00:16:02 2026 +0530
Enable MongoDB health check only for MongoDB persistence (#5665)
---
CHANGELOG.md | 3 +++
.../nosql/mongodb/quarkus/MongoDBConfigSourceFactory.java | 10 +++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 30d5b8d8a8..05ec419257 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -213,6 +213,9 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
generic-table paths used by the Spark plugin, now encode spaces in namespace and table names as
`%20` instead of `+`. Previously, credential refresh failed for tables whose namespace or name
contained a space.
+- The MongoDB readiness check is now shown in `/q/health` only when the NoSQL MongoDB backend is
+ selected. Other persistence backends no longer show the unused check. MongoDB deployments keep
+ readiness monitoring without configuration changes.
### Commits
diff --git a/persistence/nosql/persistence/db/mongodb/src/main/java/org/apache/polaris/persistence/nosql/mongodb/quarkus/MongoDBConfigSourceFactory.java b/persistence/nosql/persistence/db/mongodb/src/main/java/org/apache/polaris/persistence/nosql/mongodb/quarkus/MongoDBConfigSourceFactory.java
index bfb9b9c488..f200c3cd2c 100644
--- a/persistence/nosql/persistence/db/mongodb/src/main/java/org/apache/polaris/persistence/nosql/mongodb/quarkus/MongoDBConfigSourceFactory.java
+++ b/persistence/nosql/persistence/db/mongodb/src/main/java/org/apache/polaris/persistence/nosql/mongodb/quarkus/MongoDBConfigSourceFactory.java
@@ -43,7 +43,10 @@ public class MongoDBConfigSourceFactory implements ConfigSourceFactory {
return List.of(
new ConfigSource() {
static final String ACTIVE_PROPERTY = "quarkus.mongodb.active";
- static final Set<String> PROPERTY_NAMES = Set.of(ACTIVE_PROPERTY);
+ static final String HEALTH_ENABLED_PROPERTY =
+ "quarkus.smallrye-health.check.\"io.quarkus.mongodb.health.MongoHealthCheck\".enabled";
+ static final Set<String> PROPERTY_NAMES =
+ Set.of(ACTIVE_PROPERTY, HEALTH_ENABLED_PROPERTY);
private String activeValue() {
var persistenceType = context.getValue("polaris.persistence.type");
@@ -59,7 +62,8 @@ public class MongoDBConfigSourceFactory implements ConfigSourceFactory {
@Override
public Map<String, String> getProperties() {
- return Map.of(ACTIVE_PROPERTY, activeValue());
+ String enabled = activeValue();
+ return Map.of(ACTIVE_PROPERTY, enabled, HEALTH_ENABLED_PROPERTY, enabled);
}
@Override
@@ -76,7 +80,7 @@ public class MongoDBConfigSourceFactory implements ConfigSourceFactory {
@Override
public String getValue(String propertyName) {
- if (ACTIVE_PROPERTY.equals(propertyName)) {
+ if (PROPERTY_NAMES.contains(propertyName)) {
return activeValue();
}
return null;