-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
During startup, don't upsert initial schema if it already exists. #3374
Conversation
Currently, there are lots of schema insertions during startup. This change optimizes the insertion of the schema for the initial/reserved predicates by only doing it if the predicate is not currently being served by any group. Tested by starting and stoping a container and looking at the logs. Without this change, a lot of logs about schema changes are printed after the stopped container is restarted. With the change, the amount of logs is greatly reduced.
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.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @golangcibot and @manishrjain)
worker/groups.go, line 187 at r1 (raw file):
Previously, golangcibot (Bot from GolangCI) wrote…
File is not
goimports
-ed (fromgoimports
)
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.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @golangcibot and @manishrjain)
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.
Reviewed 2 of 2 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @golangcibot and @martinmr)
worker/groups.go, line 193 at r2 (raw file):
} else { // The schema for this predicate has already been proposed. continue
Add glog.V(1).Infof() 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.
Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @golangcibot and @manishrjain)
worker/groups.go, line 193 at r2 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
Add glog.V(1).Infof() here.
Done.
…permodeinc#3374) * During startup, don't upsert initial schema if it already exists. Currently, there are lots of schema insertions during startup. This change optimizes the insertion of the schema for the initial/reserved predicates by only doing it if the predicate is not currently being served by any group or the definition in storage is different from the proposed schema. Tested by starting and stoping a container and looking at the logs. Without this change, a lot of logs about schema changes are printed after the stopped container is restarted. With the change, the amount of logs is greatly reduced.
Currently, there are lots of schema insertions during startup. This
change optimizes the insertion of the schema for the initial/reserved
predicates by only doing it if the predicate is not currently being
served by any group.
Tested by starting and stoping a container and looking at the logs.
Without this change, a lot of logs about schema changes are printed
after the stopped container is restarted. With the change, the amount of
logs is greatly reduced.
This change is