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

chore(metarepos): fix typo from NewStoragenodeUncommitReport to NewStorageNodeUncommitReport #538

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
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
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