[
https://issues.apache.org/jira/browse/SOLR-10777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16030648#comment-16030648
]
Hrishikesh Gadre commented on SOLR-10777:
-----------------------------------------
[~singh.nilesh]
bq. also in OldBackUpDirectory`s pattern match should haver matcher.matches(),
to fetch the group(1) value.
Since the regular expression has explicitly defined the start (^) and end ($),
I think find() and matches() should return identical results (which I verified
by writing a small program). Also refer to
https://stackoverflow.com/questions/4450045/difference-between-matches-and-find-in-java-regex
BTW can you post the actual stack trace of the error you found? I am a bit
surprised since we fixed NPE in the same codebase few months ago. Refer to
SOLR-9536
> Replication Backup creation fails with NPE, while deleting the old backups
> --------------------------------------------------------------------------
>
> Key: SOLR-10777
> URL: https://issues.apache.org/jira/browse/SOLR-10777
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Backup/Restore, replication (java)
> Affects Versions: 6.2.1, 6.5.1
> Reporter: Nilesh Singh
> Priority: Minor
> Attachments: Screen Shot 2017-05-30 at 7.53.50 PM.png, Screen Shot
> 2017-05-30 at 7.54.18 PM.png, SOLR-10777.patch
>
> Original Estimate: 20m
> Remaining Estimate: 20m
>
> in Solr back up SnapShooter will try to delete the old backups saved on the
> disk automatically, but deletion fails as the files may not be the pattern
> type expected by the OldBackUpDirectory.
> ```
> private static final Pattern dirNamePattern =
> Pattern.compile("^snapshot[.](.*)$");
> ```
> In this case the following code throws NPE.
> ```
> if (obd.getTimestamp().isPresent()) {
> dirs.add(obd);
> }
> ```
> also in OldBackUpDirectory`s pattern match should haver matcher.matches(), to
> fetch the group(1) value.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]