Skip to content

Commit

Permalink
kvpb: removed disused Path field from ExportResp
Browse files Browse the repository at this point in the history
Release note: none.
Epic: none.
  • Loading branch information
dt committed Nov 18, 2024
1 parent 83f3395 commit d15a257
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion pkg/ccl/backupccl/backup_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,6 @@ func runBackupProcessor(
// on-disk anywhere yet.
metadata: backuppb.BackupManifest_File{
Span: file.Span,
Path: file.Path,
EntryCounts: entryCounts,
LocalityKV: destLocalityKV,
ApproximatePhysicalSize: uint64(len(file.SST)),
Expand Down
2 changes: 1 addition & 1 deletion pkg/kv/kvpb/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1954,7 +1954,7 @@ message ExportResponse {
(gogoproto.nullable) = false,
(gogoproto.customname) = "EndKeyTS"
];
string path = 2;
reserved 2;

BulkOpSummary exported = 6 [(gogoproto.nullable) = false];

Expand Down
16 changes: 8 additions & 8 deletions pkg/kv/kvserver/batcheval/cmd_export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ func TestExportCmd(t *testing.T) {

exportAndSlurpOne := func(
t *testing.T, start hlc.Timestamp, mvccFilter kvpb.MVCCFilter, maxResponseSSTBytes int64,
) ([]string, []storage.MVCCKeyValue, kvpb.ResponseHeader) {
) (int, []storage.MVCCKeyValue, kvpb.ResponseHeader) {
res, pErr := export(t, start, mvccFilter, maxResponseSSTBytes)
if pErr != nil {
t.Fatalf("%+v", pErr)
}

var paths []string
var files int
var kvs []storage.MVCCKeyValue
for _, file := range res.(*kvpb.ExportResponse).Files {
paths = append(paths, file.Path)
files++
iterOpts := storage.IterOptions{
KeyTypes: storage.IterKeyTypePointsOnly,
LowerBound: keys.LocalMax,
Expand Down Expand Up @@ -116,13 +116,13 @@ func TestExportCmd(t *testing.T) {
}
}

return paths, kvs, res.(*kvpb.ExportResponse).Header()
return files, kvs, res.(*kvpb.ExportResponse).Header()
}
type ExportAndSlurpResult struct {
end hlc.Timestamp
mvccLatestFiles []string
mvccLatestFiles int
mvccLatestKVs []storage.MVCCKeyValue
mvccAllFiles []string
mvccAllFiles int
mvccAllKVs []storage.MVCCKeyValue
mvccLatestResponseHeader kvpb.ResponseHeader
mvccAllResponseHeader kvpb.ResponseHeader
Expand All @@ -143,9 +143,9 @@ func TestExportCmd(t *testing.T) {
mvccLatestFilesLen int, mvccLatestKVsLen int, mvccAllFilesLen int, mvccAllKVsLen int,
) {
t.Helper()
require.Len(t, res.mvccLatestFiles, mvccLatestFilesLen, "unexpected files in latest export")
require.Equal(t, res.mvccLatestFiles, mvccLatestFilesLen, "unexpected files in latest export")
require.Len(t, res.mvccLatestKVs, mvccLatestKVsLen, "unexpected kvs in latest export")
require.Len(t, res.mvccAllFiles, mvccAllFilesLen, "unexpected files in all export")
require.Equal(t, res.mvccAllFiles, mvccAllFilesLen, "unexpected files in all export")
require.Len(t, res.mvccAllKVs, mvccAllKVsLen, "unexpected kvs in all export")
}

Expand Down

0 comments on commit d15a257

Please sign in to comment.