Commit b2c3b40d authored by chiaming2000's avatar chiaming2000
Browse files

Update batch operation protocol to include Batch message construct.

parent a5e192b2
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -187,6 +187,27 @@ message Command {

		// Perform Pin-based operations
		optional PinOperation pinOp = 8;
                
		// batch operation
		// This is included in the END_BATCH and END_BATCH_RESPONSE.
		optional Batch batch = 9;
	}

        // This is included in the END_BATCH and END_BATCH_RESPONSE.
        message Batch {
            // set by the client library in END_BATCH request message.
            // the total number of operations in the batch
            optional int32 count = 1;

            // set by the drive in END_BATCH_RESPONSE message.
            // If a batch is committed successfully, all sequence Ids of those
            // commands (PUT/DELETE) performed in the batch are
            // added in the END_BATCH_RESPONSE message.
            repeated int64 sequence = 2 [packed=true];

            // This field is set by the drive if a batch commit failed.
            // The first failed operation sequence in the batch is set as value.
            optional int64 failedSequence = 3;
	}

	//operation status