Skip to content

Commit

Permalink
reviews lifecycle of updateLastAccess and reopenIfClosed
Browse files Browse the repository at this point in the history
refs #7555
  • Loading branch information
robfrank authored and tglman committed Jul 28, 2017
1 parent a6ae677 commit d943f92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ public Query buildQuery(Object query) {

@Override
public Object getInTx(Object key, OLuceneTxChanges changes) {
updateLastAccess();
openIfClosed();

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ public Analyzer queryAnalyzer() {

@Override
public boolean remove(Object key, OIdentifiable value) {
openIfClosed();
updateLastAccess();

Query query = deleteQuery(key, value);
Expand Down Expand Up @@ -503,6 +504,7 @@ public void load(String indexName, OBinarySerializer valueSerializer, boolean is

@Override
public void clear() {
updateLastAccess();
openIfClosed();
try {
reopenToken = mgrWriter.deleteAll();
Expand Down Expand Up @@ -550,6 +552,8 @@ public long size(final ValuesTransformer transformer) {
}

protected void release(IndexSearcher searcher) {
updateLastAccess();
openIfClosed();
try {
searcherManager.release(searcher);
} catch (IOException e) {
Expand Down

0 comments on commit d943f92

Please sign in to comment.