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

Remove Get/SetZenithCurrentClusterSize from Postgres core #7196

Merged
merged 4 commits into from Mar 22, 2024

Conversation

knizhnik
Copy link
Contributor

Problem

See https://neondb.slack.com/archives/C04DGM6SMTM/p1711003752072899

Summary of changes

Move keeping of cluster size to neon extension

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

Copy link

github-actions bot commented Mar 21, 2024

2736 tests run: 2604 passed, 0 failed, 132 skipped (full report)


Flaky tests (5)

Postgres 16

  • test_sharding_split_smoke: release
  • test_create_churn_during_restart: debug

Postgres 15

  • test_sharding_split_smoke: debug

Postgres 14

Code coverage* (full report)

  • functions: 28.0% (6209 of 22164 functions)
  • lines: 46.7% (43709 of 93657 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
bc3e1d5 at 2024-03-22T10:51:12.557Z :recycle:

@petuhovskiy
Copy link
Member

Build is failing due to Rust codegen from C structures, you need to add currentClusterSize initialization when walproposer::bindings::WalproposerShmemState is created in walproposer_api.rs

Compiling attachment_service v0.1.0 (/__w/neon/neon/control_plane/attachment_service)
error[E0063]: missing field `currentClusterSize` in initializer of `WalproposerShmemState`
   --> safekeeper/tests/walproposer_sim/walproposer_api.rs:243:36
    |
243 |             shmem: UnsafeCell::new(walproposer::bindings::WalproposerShmemState {
    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `currentClusterSize`

For more information about this error, try `rustc --explain E0063`.
error: could not compile `safekeeper` (test "simple_test") due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `safekeeper` (test "random_test") due to 1 previous error
error: could not compile `safekeeper` (test "misc_test") due to 1 previous error

For example, I recently did a similar thing here https://github.com/neondatabase/neon/pull/7100/files#diff-c11d763f45c03fa45b4d3b82634b8ef48177e6f1ebe1098471078aea6b66753cR248

@knizhnik
Copy link
Contributor Author

Build is failing due to Rust codegen from C structures, you need to add currentClusterSize initialization when walproposer::bindings::WalproposerShmemState is created in walproposer_api.rs

Compiling attachment_service v0.1.0 (/__w/neon/neon/control_plane/attachment_service)
error[E0063]: missing field `currentClusterSize` in initializer of `WalproposerShmemState`
   --> safekeeper/tests/walproposer_sim/walproposer_api.rs:243:36
    |
243 |             shmem: UnsafeCell::new(walproposer::bindings::WalproposerShmemState {
    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `currentClusterSize`

For more information about this error, try `rustc --explain E0063`.
error: could not compile `safekeeper` (test "simple_test") due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `safekeeper` (test "random_test") due to 1 previous error
error: could not compile `safekeeper` (test "misc_test") due to 1 previous error

For example, I recently did a similar thing here https://github.com/neondatabase/neon/pull/7100/files#diff-c11d763f45c03fa45b4d3b82634b8ef48177e6f1ebe1098471078aea6b66753cR248

Thank you!
Fixed

@skyzh
Copy link
Member

skyzh commented Mar 22, 2024

merging to unblock #7209

@skyzh skyzh merged commit 35f4c04 into main Mar 22, 2024
54 checks passed
@skyzh skyzh deleted the neon_cluster_size branch March 22, 2024 17:14
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.

None yet

4 participants