Skip to content

cli: debug zip truncates rangelog and event data at 1000 entries #73021

Open
@erikgrinaker

Description

@erikgrinaker

When cockroach debug zip retrieves data via the admin APIs, it does not specify a per-request limit:

func makeClusterWideZipRequests(
admin serverpb.AdminClient, status serverpb.StatusClient,
) []zipRequest {
return []zipRequest{
// NB: we intentionally omit liveness since it's already pulled manually (we
// act on the output to special case decommissioned nodes).
{
fn: func(ctx context.Context) (interface{}, error) {
return admin.Events(ctx, &serverpb.EventsRequest{})
},
pathName: eventsName,
},
{
fn: func(ctx context.Context) (interface{}, error) {
return admin.RangeLog(ctx, &serverpb.RangeLogRequest{})
},
pathName: rangelogName,
},
{
fn: func(ctx context.Context) (interface{}, error) {
return admin.Settings(ctx, &serverpb.SettingsRequest{})
},
pathName: settingsName,
},
{
fn: func(ctx context.Context) (interface{}, error) {
return status.ProblemRanges(ctx, &serverpb.ProblemRangesRequest{})
},
pathName: problemRangesName,
},
}
}

This causes it to apply a default limit of 1000 entries for the Events and RangeLog endpoints (which ends up in rangelog.json and events.json).

defaultAPIEventLimit = 1000

This is problematic, since e.g. the rangelog may often contain older data of interest. debug zip should paginate in order to include older data.

Jira issue: CRDB-11387

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debug-automationIssues or feature requests for debug automationC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-observability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions