if (writer == null) {
throw new EngineClosedException(shardId, failedEngine);
}
return writer;
}
<BUG>private void refreshVersioningTable(long time) {
</BUG>
refresh(new Refresh("version_table").force(true));
<BUG>for (Map.Entry<HashedBytesRef, VersionValue> entry : versionMap.entrySet()) {

HashedBytesRef uid = entry.getKey();
synchronized (dirtyLock(uid.bytes)) { // can we do it without this lock on each value? maybe batch to a set and get the lock once per set?
VersionValue versionValue = versionMap.get(uid);
</BUG>
if (versionValue == null) {

if (writer == null) {
throw new EngineClosedException(shardId, failedEngine);
}
return writer;
}
private void pruneDeletedVersions(long time) {
refresh(new Refresh("version_table").force(true));
for (Map.Entry<BytesRef, VersionValue> entry : versionMap.getAllDeletes()) {
BytesRef uid = entry.getKey();
synchronized (dirtyLock(uid)) { // can we do it without this lock on each value? maybe batch to a set and get the lock once per set?
VersionValue versionValue = versionMap.getDeleteUnderLock(uid);
if (versionValue == null) {
