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

clean up logging around on-demand downloads #4030

Merged
merged 3 commits into from
Apr 27, 2023

Commits on Apr 26, 2023

  1. clean up logging around on-demand downloads

    - Remove repeated tenant & timeline from span
    - Demote logging of the path to debug level
    - Log completion at info level, in the same function where we log errors
    - distinguish between layer file download success & on-demand download
      succeeding as a whole in the log message wording
    - Assert that the span contains a tenant id and a timeline id
    
    The assert uncovered that walreceiver_connection uses TenantTimelineId
    in the span. I changed that to tenant_id and timeline_id.
    
    fixes #3945
    
    Before:
    
    ```
      INFO compaction_loop{tenant_id=$TENANT_ID}:compact_timeline{timeline=$TIMELINE_ID}:download_remote_layer{tenant_id=$TENANT_ID timeline_id=$TIMELINE_ID layer=000000000000000000000000000000000000-FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF__00000000020C8A71-00000000020CAF91}: download complete: /storage/pageserver/data/tenants/$TENANT_ID/timelines/$TIMELINE_ID/000000000000000000000000000000000000-FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF__00000000020C8A71-00000000020CAF91
      INFO compaction_loop{tenant_id=$TENANT_ID}:compact_timeline{timeline=$TIMELINE_ID}:download_remote_layer{tenant_id=$TENANT_ID timeline_id=$TIMELINE_ID layer=000000000000000000000000000000000000-FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF__00000000020C8A71-00000000020CAF91}: Rebuilt layer map. Did 9 insertions to process a batch of 1 updates.
    ```
    
    After:
    
    ```
      INFO compaction_loop{tenant_id=$TENANT_ID}:compact_timeline{timeline=$TIMELINE_ID}:download_remote_layer{layer=000000000000000000000000000000000000-FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF__00000000020C8A71-00000000020CAF91}: layer file download finished
      INFO compaction_loop{tenant_id=$TENANT_ID}:compact_timeline{timeline=$TIMELINE_ID}:download_remote_layer{layer=000000000000000000000000000000000000-FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF__00000000020C8A71-00000000020CAF91}: Rebuilt layer map. Did 9 insertions to process a batch of 1 updates.
      INFO compaction_loop{tenant_id=$TENANT_ID}:compact_timeline{timeline=$TIMELINE_ID}:download_remote_layer{layer=000000000000000000000000000000000000-FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF__00000000020C8A71-00000000020CAF91}: on-demand download successful
    ```
    problame committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    6d5a7fc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e0ebe4b View commit details
    Browse the repository at this point in the history
  3. fixups previous commit

    problame committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    50d8430 View commit details
    Browse the repository at this point in the history