stefan-egli commented on a change in pull request #499:
URL: https://github.com/apache/jackrabbit-oak/pull/499#discussion_r812093212
##########
File path:
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
##########
@@ -805,7 +805,10 @@ private long getNumPreviousDocuments() {
private void addPreviousDocuments(Iterator<String> ids) throws
IOException {
while (ids.hasNext()) {
- prevDocIdsToDelete.add(ids.next());
+ String id = ids.next();
+ if (id != null) {
+ prevDocIdsToDelete.add(id);
+ }
Review comment:
Was thinking to add a log.debug in case it is null. In which case you'd
also need something meaningful to log - so maybe the `doc` or just the `id` (eg
as `deletedId`) could be passed to this method and that could be logged. (and
just at debug shouldn't hurt)
```suggestion
} else if (log.isDebugEnabled()) {
log.debug("addPreviousDocuments: null id found via
deletedId={}", deletedId);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]