Skip to content
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
20 changes: 19 additions & 1 deletion pkg/coveragedb/coveragedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,25 @@ func RegenerateSubsystems(ctx context.Context, ns string, sss []*subsystem.Subsy

func getFilePaths(ctx context.Context, ns string, client spannerclient.SpannerClient) ([]string, error) {
iter := client.Single().Query(ctx, spanner.Statement{
SQL: `select filepath from file_subsystems where namespace=$1`,
// Take file names from 1 quarterly, 1 monthly and 1 daily aggregations.
SQL: `
select
distinct files.filepath
from files
where files.session in (
select session from (
select
session
from
merge_history
where
namespace = $1
order by dateto desc, duration desc
limit 3
) as sub
)
order by files.filepath
`,
Params: map[string]any{
"p1": ns,
},
Expand Down
Loading