Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,10 @@ private synchronized ElasticsearchDirectoryReader getOrOpenReader() throws IOExc
}

@SuppressForbidden(reason = "we manage references explicitly here")
private synchronized ElasticsearchDirectoryReader getReader() {
if (lastOpenedReader != null && lastOpenedReader.tryIncRef()) {
return lastOpenedReader;
private ElasticsearchDirectoryReader getReader() {
final ElasticsearchDirectoryReader readerRef = lastOpenedReader; // volatile read
if (readerRef != null && readerRef.tryIncRef()) {
return readerRef;
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.carrotsearch.hppc.cursors.ObjectCursor;
import org.apache.lucene.search.TotalHits;
import org.apache.lucene.store.AlreadyClosedException;
import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.ExceptionsHelper;
import org.elasticsearch.ResourceNotFoundException;
import org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse;
Expand Down Expand Up @@ -117,7 +116,6 @@
import static org.hamcrest.Matchers.oneOf;
import static org.hamcrest.Matchers.sameInstance;

@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/69336")
public class SearchableSnapshotsIntegTests extends BaseSearchableSnapshotsIntegTestCase {

public void testCreateAndRestoreSearchableSnapshot() throws Exception {
Expand Down