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

Refactor ImageLayerWriter to avoid passing a Timeline to finish() #9028

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

hlinnaka
Copy link
Contributor

@hlinnaka hlinnaka commented Sep 17, 2024

Commit ca5390a made a similar change to DeltaLayerWriter.

We bumped into this with Stas with our hackathon project, to create a standalong program to create image layers directly from a Postgres data directory. It needs to create image layers without having a Timeline and other pageserver machinery.

This downgrades the "created image layer {}" message from INFO to TRACE level. TRACE is used for the corresponding message on delta layer creation too. The path logged in the message is now the temporary path, before the file is renamed to its final name. Again commit ca5390a made the same change for the message on delta layer creation.

Commit ca5390a made a similar change to DeltaLayerWriter.

We bumped into this with Stas with our hackathon project, to create a
standalong program to create image layers directly from a Postgres
data directory. It needs to create image layers without having a
Timeline and other pageserver machinery.

This downgrades the "created image layer {}" message from INFO to
TRACE level. TRACE is used for the corresponding message on delta
layer creation too. The path logged in the message is now the
temporary path, before the file is renamed to its final name. Again
commit ca5390a made the same change for the message on delta layer
creation.
Copy link

github-actions bot commented Sep 17, 2024

4968 tests run: 4804 passed, 0 failed, 164 skipped (full report)


Flaky tests (3)

Postgres 17

Code coverage* (full report)

  • functions: 31.8% (7419 of 23304 functions)
  • lines: 49.8% (59592 of 119740 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
b98daa8 at 2024-09-17T22:30:07.045Z :recycle:

@hlinnaka hlinnaka merged commit 3454ef7 into main Sep 18, 2024
78 checks passed
@hlinnaka hlinnaka deleted the refactor-layer-writer branch September 18, 2024 10:16
skyzh added a commit that referenced this pull request Sep 19, 2024
#9028 changed the image layer
creation log into trace level. However, I personally find logging image
layer creation useful when reading the logs -- it makes it clear that
the image layer creation is happening and gives a clear idea of the
progress. Therefore, I propose to continue logging them for
create_image_layers set of functions.

## Summary of changes

* Add info logging for all image layers created in legacy compaction.
* Add info logging for all layers creation in testing functions.

Signed-off-by: Alex Chi Z <chi@neon.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants