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

indexserver: log name of freshly minted compound shard #849

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

stefanhengl
Copy link
Member

@stefanhengl stefanhengl commented Oct 24, 2024

Relates to SPLF-615

This updates zoekt-merge-index to print the name of a new compound shard to stdout. Indexserver picks it up and logs it. This has the nice property that indexserver now has all the info. If we want to log this to a file in the future, we don't have to worry as much about competing writes to the file.

Together with a new log line in vacuum we can now follow the full lifecycle of a compound shard in the logs.

Test plan:

  • updated unit tests
  • manual testing
image

This updates zoekt-merge-index to print the name of new compound shard
to stdout. Indexserver picks it up and logs it.

Together with a new log line in `vacuum` we can now follow the full
lifecycle of a compound shard in the logs.

Test plan:
updated unit tests
@cla-bot cla-bot bot added the cla-signed label Oct 24, 2024
@stefanhengl stefanhengl requested a review from a team October 24, 2024 12:54
@stefanhengl stefanhengl marked this pull request as ready for review October 24, 2024 12:54

metricShardMergingDuration.WithLabelValues(strconv.FormatBool(err != nil)).Observe(time.Since(start).Seconds())
if err != nil {
log.Printf("mergeCmd: out=%s, err=%s", out, err)
log.Printf("error merging shards: stdout=%s, stderr=%s, err=%s", stdoutBuf.String(), stderrBuf.String(), err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: duration might also be useful when things go wrong.

@stefanhengl stefanhengl merged commit b3b74a2 into main Oct 24, 2024
9 checks passed
@stefanhengl stefanhengl deleted the sh/log-name-of-freshly-minted-compound-shard branch October 24, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants