-
Notifications
You must be signed in to change notification settings - Fork 485
orchestratord test: Introduce workflow for downtime measurement #34286
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
Conversation
f887e54 to
b036c0d
Compare
|
@jubrad Does this make sense as the way to measure downtime? I'm counting the time to run Edit: The initial connection took 2.2 s, after the 0dt upgrade 9.6 s. This is with no objects created at all. |
b036c0d to
c2558f8
Compare
febf00e to
86d9bce
Compare
86d9bce to
73b0c42
Compare
|
All green in CI, ready for review! |
|
Ready for review! |
jubrad
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm debating whether we should add a standard set of items to the catalog to ensure that catalog migration doesn't explode the time in a more realistic scenario. - we can follow up with this later as well.
test/orchestratord/mzcompose.py
Outdated
| preexec_fn=os.setpgrp, | ||
| ) | ||
| connect_port_forward = False | ||
| time.sleep(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we sleeping 1 here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't want to retry too quickly, but after I removed the print below, I could also remove the sleep again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| "jsonpath={.items[0].metadata.name}", | ||
| ] | ||
| ).strip() | ||
| port_forward_process = subprocess.Popen( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The port forward connection can drop... it might be worth spinning up a task to maintain and reopen the portforward if it closes, or use a loop in your subprocess while true; do...<port forward>; done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the SQL connection fails, we reopen it.
| if runtime > 2: | ||
| print(f"Downtime: {runtime}s") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not always print?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So spammy. Only the ones > 2 s looked interesting, otherwise it's pretty much instant.
Yeah, I think this is a pretty reasonable approach. |
Sure, we can do that, but then it starts overlapping more with what we already have in test/0dt/mzcompose.py's |
73b0c42 to
f6495ec
Compare
Fixes: https://github.com/MaterializeInc/database-issues/issues/9929
Test run: https://buildkite.com/materialize/nightly/builds/14267
Checklist
$T ⇔ Proto$Tmapping (possibly in a backwards-incompatible way), then it is tagged with aT-protolabel.