NoSQL: Add maintenance service to Polaris admin tool#3395
NoSQL: Add maintenance service to Polaris admin tool#3395snazy wants to merge 5 commits intoapache:mainfrom
Conversation
dimas-b
left a comment
There was a problem hiding this comment.
LGTM 👍 just a few minor comments 🙂
| NoSqlMaintenanceRunCommand.class, | ||
| }, | ||
| mixinStandardHelpOptions = true, | ||
| description = "Polaris persistence maintenance.") |
There was a problem hiding this comment.
Should we flag it as "beta" as discussed in the last community sync call?.. or perhaps "preview" since the actual persistent storage that can be maintained via this command has not been hooked up yet (IIRC).
There was a problem hiding this comment.
I think we also probably shouldn't call it persistence maintenance unless we plan on having maintenance for other backends?
| @CommandLine.Command( | ||
| name = "run", | ||
| mixinStandardHelpOptions = true, | ||
| description = {"Run Polaris persistence maintenance."}) |
There was a problem hiding this comment.
maybe Run Polaris NoSQL persistence maintenance for the sake of clarity?
There was a problem hiding this comment.
... and similar description changes in the other new commands?
| # - MongoDb - configure the via the Quarkus extension | ||
| polaris.persistence.nosql.backend=InMemory | ||
|
|
||
| ## MongoDB version store specific configuration |
There was a problem hiding this comment.
MongoDB version store specific configuration defaults? I suppose the user can change any of these settings.
There was a problem hiding this comment.
Same comments request here as on the service pr, These properties should probably be commented out by default since they aren't used
| quarkus.mongodb.database=polaris | ||
| quarkus.mongodb.metrics.enabled=true | ||
| #quarkus.mongodb.connection-string=mongodb://localhost:27017 | ||
| quarkus.mongodb.devservices.enabled=false |
There was a problem hiding this comment.
Is it a runtime setting or build-time (the latter have a dedicated section)?
There was a problem hiding this comment.
Per https://quarkus.io/guides/mongodb-dev-services quarkus.mongodb.devservices.enabled is a build-time config. Please move to the Build-time configuration section (lines 20-38) for the sake of consistency.
|
|
||
| quarkus.arc.ignored-split-packages=\ | ||
| org.apache.polaris.admintool.config,\ | ||
| org.apache.polaris.admintool.maintenance,\ |
There was a problem hiding this comment.
Could we refactor this code to avoid split packages upfront?
There was a problem hiding this comment.
Note: this package no longer exists.
There was a problem hiding this comment.
Package org.apache.polaris.admintool.nosql.maintenance only exists in one module, that is in runtime/admin... Is this config required anymore? 🤔
There was a problem hiding this comment.
Actually, I see different split package warnings in my build:
2026-02-03T00:51:08.714249614Z build-15 WARN Detected a split package usage which is considered a bad practice and should be avoided. Following packages were detected in multiple archives:
- "org.apache.polaris.service.catalog.api" found in [org.apache.polaris:polaris-api-catalog-service:1.4.0-incubating-SNAPSHOT, org.apache.polaris:polaris-api-iceberg-service:1.4.0-incubating-SNAPSHOT]
- "org.apache.polaris.service.catalog.api.impl" found in [org.apache.polaris:polaris-api-catalog-service:1.4.0-incubating-SNAPSHOT, org.apache.polaris:polaris-api-iceberg-service:1.4.0-incubating-SNAPSHOT]
- "org.apache.polaris.service.types" found in [org.apache.polaris:polaris-api-catalog-service:1.4.0-incubating-SNAPSHOT, org.apache.polaris:polaris-api-iceberg-service:1.4.0-incubating-SNAPSHOT]
There was a problem hiding this comment.
I've added a commit to remove this prop.
There was a problem hiding this comment.
I'll deal with the other warnings on main later.
flyrain
left a comment
There was a problem hiding this comment.
I do not think the NoSQL maintenance tool belongs in the runtime admin module. NoSQL is just one persistence impl., and this maintenance logic is only applicable to that specific backend. Other persistence implementations do not need it, yet this change pulls NoSQL specific behavior into a shared admin layer. This creates unnecessary coupling, complicates the module boundaries, and makes the admin tooling harder to reason about and extend going forward.
cc @dennishuo @collado-mike @singhpk234 @jbonofre @HonahX @RussellSpitzer
|
The admin-tool is meant for all persistence implementations, because it is a tool to perform administrative tasks. We have discussed before that other persistence specific operations like schema setup for JDBC would go into the admin-tool. |
|
@flyrain :
NoSQL persistence (by design) needs periodic maintenance by admin users. Not providing a tool for this will mean that no Apache Polaris user will be able to use NoSQL persistence efficiently. As to the location of the tool, Admin CLI is a natural place as it hosts code for I believe this is the minimum the project community can do for OSS users. |
singhpk234
left a comment
There was a problem hiding this comment.
NoSQL maintenance service introduces constructs which are not agreed upon in Apache Polaris, neither have ever been discussed and agreed upon the community. for example retention expression, dependency on an unmaintained project nessie library here mentioned here #3268 (review), other than question to where this should be in Polaris tools or Polaris repo has not been agreed upon, despite being called out.
It has been requested to start dev thread discussion to establish concencus for the same, despite that underlying PR was merged
#3268 (comment)
To avoid any confusion and explicitly mark my objection i am requesting changes, kindly please start thread establish concencus upon the semantics that Polaris should support .
|
Related |
| out.println("use the 'help maintenance' command."); | ||
| out.println(); | ||
|
|
||
| checkInMemory(); |
There was a problem hiding this comment.
Shouldn't we be failing for everything that isn't NoSql not just InMemory?
| checkInMemory(); | ||
|
|
||
| out.println(); | ||
| out.println("Information: selected NoSql persistence backend: " + backend.type()); |
There was a problem hiding this comment.
In the current formulation this isn't correct since you can call this with any backend right?
| @Inject protected MaintenanceConfig maintenanceConfig; | ||
|
|
||
| protected void checkInMemory() { | ||
| if ("InMemory".equals(backend.type())) { |
There was a problem hiding this comment.
Do we need a check here for the persistence not being NoSQL?
|
As discussed on the mailing list, I think this is fine to add into the Admin tool but the current PR needs a bit of work to make it clear to end users that it is just for NoSQL. |
| import picocli.CommandLine; | ||
|
|
||
| @CommandLine.Command( | ||
| name = "nosql", |
RussellSpitzer
left a comment
There was a problem hiding this comment.
LGTM +1, I notice there are still some comments from @dimas-b though that are still not addressed?
I can agree to disagree here, I don't need to agree here either (dismissing my request changes), as we definitely want to, imho this tool doesn't belong in admin module, specially strictly speaking from the MetaStorageManager interface POV bootstrap and purge are well defined in this manage interface. and admin tool documentation its for metastore management.
| NoSqlMaintenanceRunCommand.class, | ||
| }, | ||
| mixinStandardHelpOptions = true, | ||
| description = "Polaris NoSQL persistence.") |
There was a problem hiding this comment.
nit: suggestion: Sub-commands specific to NoSQL persistence.
| import picocli.CommandLine; | ||
|
|
||
| @CommandLine.Command( | ||
| name = "maintenance-info", |
There was a problem hiding this comment.
nit: Maybe add maintenance as another sub-command group?
Current: java -jar ... nosql maintenance-info
Proposed: java -jar ... nosql maintenance info
I hope the latter in nicer in terms of UX.
| quarkus.mongodb.database=polaris | ||
| quarkus.mongodb.metrics.enabled=true | ||
| #quarkus.mongodb.connection-string=mongodb://localhost:27017 | ||
| quarkus.mongodb.devservices.enabled=false |
There was a problem hiding this comment.
Per https://quarkus.io/guides/mongodb-dev-services quarkus.mongodb.devservices.enabled is a build-time config. Please move to the Build-time configuration section (lines 20-38) for the sake of consistency.
| quarkus.index-dependency.agrona.group-id=org.agrona | ||
| quarkus.index-dependency.agrona.artifact-id=agrona |
There was a problem hiding this comment.
I tried building locally without these settings (with the workaround to get build warnings), but agrona was not flagged as needing an index... Is this setting required for the admin tool?
There was a problem hiding this comment.
I re-ran my local build after the recent rebase without this property and I did not see any build warnings about Agrona being unindexed.
@snazy : WDYT about removing this property?
|
Summarizing the dev discussion.
|
|
@flyrain : Would you please reconsider your -1 on this PR given the above discussion? |
|
@RussellSpitzer : just FYI: I re-requested your review my accident 😅 but fresh comments are welcome, of course 🙂 |
|
@snazy : could you rebase this PR? I suspect some of the config concerns are related to the other NoSQL modules merged to |
292cec4 to
3472306
Compare
3472306 to
a1a65a6
Compare
|
Rebased + force-pushed |
dimas-b
left a comment
There was a problem hiding this comment.
I believe this PR is good to merge. We can deal with minor remaining concerns on main after merging.
0914824 to
f5e0d40
Compare
|
@flyrain : Could you review again, please? There were code updates and fresh discussion points after your previous -1 review. |
|
Sorry for the late reply, I have posted the concern in the dev ML https://lists.apache.org/thread/93nvjwwbvv77fz16rsdcwsm1m8nc5trt |
This change wires the maintenance service up to the Polaris admin tool.
f5e0d40 to
a87bfdc
Compare
This change wires the maintenance service up to the Polaris admin tool.