Skip to content

Commit

Permalink
[9.x] Do not randomize readOnce contexts (#13607)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHegarty authored Jul 24, 2024
1 parent 6beebfb commit 6712823
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1838,8 +1838,8 @@ public static IOContext newIOContext(Random random) {

/** TODO: javadoc */
public static IOContext newIOContext(Random random, IOContext oldContext) {
if (oldContext == IOContext.READONCE) {
return oldContext; // don't mess with the READONCE singleton
if (oldContext.readOnce) {
return oldContext; // don't mess with readOnce contexts
}
final int randomNumDocs = random.nextInt(4192);
final int size = random.nextInt(512) * randomNumDocs;
Expand Down

0 comments on commit 6712823

Please sign in to comment.