Skip to content

OAK-10584 : catch exception in getOldestRevisionToKeep when in read-o…#1251

Merged
rishabhdaim merged 3 commits intotrunkfrom
OAK-10584
Dec 18, 2023
Merged

OAK-10584 : catch exception in getOldestRevisionToKeep when in read-o…#1251
rishabhdaim merged 3 commits intotrunkfrom
OAK-10584

Conversation

@stefan-egli
Copy link
Copy Markdown
Contributor

…nly mode

@sonarqubecloud
Copy link
Copy Markdown

store.findAndUpdate(Collection.SETTINGS, op);
LOG.debug("Purged {} expired checkpoints", op.getChanges().size());
} catch (UnsupportedOperationException uoe) {
LOG.info("getOldestRevisionToKeep : could not clean up expired checkpoints"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be LOG.warn at least.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason for info was that using this in read-only (eg via oak-run revisions info), this exception is likely met. In which case a warn would be confusing. I think we'd need to expose whether or not a DocumentStore is read-only somehow - without that we're left with catching this exception (which I agree is not nice)

@rishabhdaim rishabhdaim merged commit f5dcec9 into trunk Dec 18, 2023
@rishabhdaim rishabhdaim deleted the OAK-10584 branch December 18, 2023 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants