Admin tool event cleanup - #4935
Conversation
dimas-b
left a comment
There was a problem hiding this comment.
Hi @nandorKollar , I know the PR is a draft, but I could not resist posting a couple of comments about the general module structure 🙂
| import java.time.Instant; | ||
|
|
||
| /** Maintenance operations for Polaris storage backends. */ | ||
| public interface MaintenanceManager { |
There was a problem hiding this comment.
It does not look like this interface is used in polaris-core... what's the rationale for defining it there? 🤔
If it's only that polaris-core is the only common module between Persistence and Runtime, why not add a new small module dedicated to maintenance interfaces?
From my POV overloading polaris-core with SPI classes is not ideal. Core is more of a utility library than a service. WDYT?
| * Purge events older than the given cutoff from the event store. Events with a timestamp before | ||
| * {@code cutoff} are deleted. Pass {@link Instant#now()} to purge all events. | ||
| */ | ||
| void purgeEvents(Instant cutoff); |
There was a problem hiding this comment.
Since it's about events, why not use a more specific name for the interface? e.g. EventsMaintenanceManager?
There was a problem hiding this comment.
For now, it is only about events, yes. But in the future, I think we can add additional maintenance related operations here, like for example metrics related methods.
That's one reason why I opened it as a draft PR: to get some thoughts and ideas. 🙂 Appreciate any feedback! |
|
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Draft for event cleanup command in admin tool. The maintenance command can be extended with further subcommands for other entity cleanup tasks, like for example metrics.
Checklist
CHANGELOG.md(if needed)site/content/in-dev/unreleased(if needed)