-
Notifications
You must be signed in to change notification settings - Fork 168
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
Logging of schema migrations #7070
Conversation
dd990e2
to
9c9a244
Compare
9c9a244
to
977064c
Compare
Pull Request Test Coverage Report for Build github_pull_request_281342
💛 - Coveralls |
12fdc9c
to
f7c10a7
Compare
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.
Looks good to me, but I am not sure whether measuring the time that the migration function has taken is ok to have or not.
uint64_t target_schema_version, SchemaMode mode, | ||
std::vector<SchemaChange> const& changes, bool handle_automatically_backlinks, | ||
std::function<void()> migration_function) | ||
{ | ||
create_metadata_tables(group); | ||
using namespace std::chrono; | ||
auto t1 = steady_clock::now(); |
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.
Are you sure you want to measure this every time we do a migration? From the code, it seems we expect the logger to be always on. It shouldn't be a huge pessimization, but isn't the migration a hot path?
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.
You will only do migration once. And getting the time does not cost.
What, How & Why?
☑️ ToDos