Skip to content

Commit

Permalink
Merge pull request #466 from OpenNTF/feature/issue-461-server-name
Browse files Browse the repository at this point in the history
Modify QRP database mod check to skip the server name when it’s local (fixes #461)
  • Loading branch information
jesse-gallagher authored Sep 13, 2023
2 parents d7ae1a1 + 515a889 commit 063c0d9
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,13 @@ public Stream<DocumentEntity> select(DocumentQuery query) {
// Check to see if we need to "expire" it based on the data mod time of the DB
DateTime created = view.getCreated();
try {
long dataMod = NotesSession.getLastDataModificationDateByName(database.getServer(), database.getFilePath());
// Skip using the server name when it's local, as that can cause resolution trouble
// if the server doesn't know it's itself (Issue #461)
String serverName = database.getServer();
if(StringUtil.equals(database.getParent().getUserName(), serverName)) {
serverName = ""; //$NON-NLS-1$
}
long dataMod = NotesSession.getLastDataModificationDateByName(serverName, database.getFilePath());
if(dataMod > (created.toJavaDate().getTime() / 1000)) {
view.remove();
view.recycle();
Expand Down

0 comments on commit 063c0d9

Please sign in to comment.