WriteMarshallable writer = index2index ? index2IndexTemplate : indexTemplate;
writer.writeMarshallable(wire);
wire.updateHeader(position, true);
return position;
}
<BUG>long newIndex(StoreRecovery recovery, ExcerptContext ec, LongArrayValues index2Index, long index2, long timeoutMS) throws EOFException, UnrecoverableTimeoutException, StreamCorruptedException, TimeoutException {
try {</BUG>
if (index2Index.compareAndSet(index2, NOT_INITIALIZED, BinaryLongReference.LONG_NOT_COMPLETE)) {
long pos = newIndex(recovery, ec, false, timeoutMS);
if (pos < 0)

WriteMarshallable writer = index2index ? index2IndexTemplate : indexTemplate;
writer.writeMarshallable(wire);
wire.updateHeader(position, true);
return position;
}
long newIndex(StoreRecovery recovery, ExcerptContext ec, LongArrayValues index2Index, long index2, long timeoutMS)
throws EOFException, UnrecoverableTimeoutException, StreamCorruptedException, TimeoutException {
try {
if (index2Index.compareAndSet(index2, NOT_INITIALIZED, BinaryLongReference.LONG_NOT_COMPLETE)) {
long pos = newIndex(recovery, ec, false, timeoutMS);
if (pos < 0)
