Skip to content

Commit

Permalink
chore(metarepos): fix typo from NewStoragenodeUncommitReport to NewSt…
Browse files Browse the repository at this point in the history
…orageNodeUncommitReport
  • Loading branch information
ijsong committed Jul 28, 2023
1 parent 57d8039 commit 9be796f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions internal/metarepos/report_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ func (rce *reportCollectExecutor) getReport(ctx context.Context) error {
}

func (rce *reportCollectExecutor) processReport(response *snpb.GetReportResponse) *mrpb.StorageNodeUncommitReport {
report := mrpb.NewStoragenodeUncommitReport(response.StorageNodeID)
report := mrpb.NewStorageNodeUncommitReport(response.StorageNodeID)
report.UncommitReports = response.UncommitReports

if report.Len() == 0 {
Expand All @@ -662,7 +662,7 @@ func (rce *reportCollectExecutor) processReport(response *snpb.GetReportResponse
return report
}

diff := mrpb.NewStoragenodeUncommitReport(report.StorageNodeID)
diff := mrpb.NewStorageNodeUncommitReport(report.StorageNodeID)
diff.UncommitReports = make([]snpb.LogStreamUncommitReport, 0, len(report.UncommitReports))
defer report.Release()

Expand Down Expand Up @@ -917,7 +917,7 @@ func (rc *reportContext) saveReport(report *mrpb.StorageNodeUncommitReport) {
rc.mu.Lock()
defer rc.mu.Unlock()

rc.report = mrpb.NewStoragenodeUncommitReport(report.StorageNodeID)
rc.report = mrpb.NewStorageNodeUncommitReport(report.StorageNodeID)
rc.report.UncommitReports = report.UncommitReports
}

Expand All @@ -931,7 +931,7 @@ func (rc *reportContext) swapReport(newReport *mrpb.StorageNodeUncommitReport) (
rc.report.Release()
}

rc.report = mrpb.NewStoragenodeUncommitReport(newReport.StorageNodeID)
rc.report = mrpb.NewStorageNodeUncommitReport(newReport.StorageNodeID)
rc.report.UncommitReports = newReport.UncommitReports

return old, ok
Expand Down
2 changes: 1 addition & 1 deletion internal/metarepos/report_collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ func (rc *testReportContextPtr) saveReport(report *mrpb.StorageNodeUncommitRepor
rc.mu.Lock()
defer rc.mu.Unlock()

rc.report = mrpb.NewStoragenodeUncommitReport(report.StorageNodeID)
rc.report = mrpb.NewStorageNodeUncommitReport(report.StorageNodeID)
rc.report.UncommitReports = report.UncommitReports
}

Expand Down
2 changes: 1 addition & 1 deletion proto/mrpb/raft_metadata_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ var storageNodeUncommitReportPool = sync.Pool{
},
}

func NewStoragenodeUncommitReport(snid types.StorageNodeID) *StorageNodeUncommitReport {
func NewStorageNodeUncommitReport(snid types.StorageNodeID) *StorageNodeUncommitReport {
r := storageNodeUncommitReportPool.Get().(*StorageNodeUncommitReport)
r.StorageNodeID = snid
return r
Expand Down

0 comments on commit 9be796f

Please sign in to comment.