Skip to content

Commit

Permalink
PWX-23502: populate the revision info after creating a key (portworx#107
Browse files Browse the repository at this point in the history
)

Populate the revision of the key that was just created. This may be
useful for some clients.

Signed-off-by: Neelesh Thakur <[email protected]>
  • Loading branch information
pureneelesh authored Apr 15, 2022
1 parent cdbc1e0 commit ffffa7f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions etcd/v3/kv_etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ func (et *etcdKV) Create(

rangeResponse := txnResponse.Responses[1].GetResponseRange()
kvPair := et.resultToKv(rangeResponse.Kvs[0], "create")
kvPair.KVDBIndex = uint64(txnResponse.Header.Revision)
return kvPair, nil
}

Expand Down

0 comments on commit ffffa7f

Please sign in to comment.