Skip to content

Commit

Permalink
less synchronization
Browse files Browse the repository at this point in the history
  • Loading branch information
cmacdonald committed Jan 8, 2025
1 parent 44580f7 commit 047a087
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ public DocumentIndexEntry getDocumentEntry(int docid) throws IOException {
}

public int getDocumentLength(int docid) throws IOException {
synchronized (parent) {
return parent.getDocumentLength(docid);
}
// we dont synchronize on getDocumentLength() - we assume this is always in memory and reentrant
return parent.getDocumentLength(docid);
}

public int getNumberOfDocuments() {
Expand Down

0 comments on commit 047a087

Please sign in to comment.