Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: remove decodeMVCCKey #72895

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions pkg/storage/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,9 @@ func (r *RocksDBBatchReader) Key() []byte {
return r.key
}

func decodeMVCCKey(k []byte) (MVCCKey, error) {
k, ts, err := enginepb.DecodeKey(k)
return MVCCKey{k, ts}, err
}

// MVCCKey returns the MVCC key of the current batch entry.
func (r *RocksDBBatchReader) MVCCKey() (MVCCKey, error) {
return decodeMVCCKey(r.Key())
return DecodeMVCCKey(r.Key())
}

// EngineKey returns the EngineKey for the current batch entry.
Expand All @@ -236,7 +231,7 @@ func (r *RocksDBBatchReader) MVCCEndKey() (MVCCKey, error) {
if r.typ != BatchTypeRangeDeletion {
panic("can only ask for EndKey on a range deletion entry")
}
return decodeMVCCKey(r.Value())
return DecodeMVCCKey(r.Value())
}

// EngineEndKey returns the engine end key of the current batch entry.
Expand Down