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

rpc: ignore offline/unassigned regions during cache warmup #274

Merged
merged 1 commit into from
Oct 23, 2024
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: 7 additions & 2 deletions rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ func createAllRegionSearchKey(table []byte) []byte {
return metaKey
}

// metaLookupForTable checks meta table for all the region in which the given table is.
// metaLookupForTable checks meta table for all the open table regions.
func (c *client) metaLookupForTable(ctx context.Context,
table []byte) ([]regionInfoAndAddr, error) {
metaKey := createAllRegionSearchKey(table)
Expand All @@ -780,7 +780,12 @@ func (c *client) metaLookupForTable(ctx context.Context,

reg, addr, err := region.ParseRegionInfo(resp)
if err != nil {
return nil, err
// Ignore error, but log if it's anything else than OfflineRegionError. This really
// shouldn't happen unless HBase meta table is corrupted/changed format.
if _, ok := err.(region.OfflineRegionError); !ok {
c.logger.Debug("failed to parse region", "err", err)
}
continue
}

regions = append(regions, regionInfoAndAddr{regionInfo: reg, addr: addr})
Expand Down
Loading