@@ -33,13 +33,13 @@ class RecoveryPrepareForTranslogOperationsRequest extends TransportRequest {
3333 private final long recoveryId ;
3434 private final ShardId shardId ;
3535 private final int totalTranslogOps ;
36- private final boolean deleteLocalTranslog ;
36+ private final boolean createNewTranslog ;
3737
38- RecoveryPrepareForTranslogOperationsRequest (long recoveryId , ShardId shardId , int totalTranslogOps , boolean deleteLocalTranslog ) {
38+ RecoveryPrepareForTranslogOperationsRequest (long recoveryId , ShardId shardId , int totalTranslogOps , boolean createNewTranslog ) {
3939 this .recoveryId = recoveryId ;
4040 this .shardId = shardId ;
4141 this .totalTranslogOps = totalTranslogOps ;
42- this .deleteLocalTranslog = deleteLocalTranslog ;
42+ this .createNewTranslog = createNewTranslog ;
4343 }
4444
4545 RecoveryPrepareForTranslogOperationsRequest (StreamInput in ) throws IOException {
@@ -51,9 +51,9 @@ class RecoveryPrepareForTranslogOperationsRequest extends TransportRequest {
5151 in .readLong (); // maxUnsafeAutoIdTimestamp
5252 }
5353 if (in .getVersion ().onOrAfter (Version .V_7_0_0_alpha1 )) {
54- deleteLocalTranslog = in .readBoolean ();
54+ createNewTranslog = in .readBoolean ();
5555 } else {
56- deleteLocalTranslog = true ;
56+ createNewTranslog = true ;
5757 }
5858 }
5959
@@ -70,10 +70,10 @@ public int totalTranslogOps() {
7070 }
7171
7272 /**
73- * Whether or not the recover target should delete its local translog
73+ * Whether or not the recover target should create a new local translog
7474 */
75- boolean deleteLocalTranslog () {
76- return deleteLocalTranslog ;
75+ boolean createNewTranslog () {
76+ return createNewTranslog ;
7777 }
7878
7979 @ Override
@@ -86,7 +86,7 @@ public void writeTo(StreamOutput out) throws IOException {
8686 out .writeLong (IndexRequest .UNSET_AUTO_GENERATED_TIMESTAMP ); // maxUnsafeAutoIdTimestamp
8787 }
8888 if (out .getVersion ().onOrAfter (Version .V_7_0_0_alpha1 )) {
89- out .writeBoolean (deleteLocalTranslog );
89+ out .writeBoolean (createNewTranslog );
9090 }
9191 }
9292}
0 commit comments