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

Make EK logging less verbose & perf improvements #15410

merged 3 commits into from Jan 11, 2019


None yet
2 participants
Copy link

joshblum commented Jan 10, 2019

patch does the following:

  • reduces logging around caches, was extremely verbose previously
  • removes a pukring.Sync() call which would always hit the network but is only needed when generating a new user ek
  • reduces calls to CleanupStaleUserAndDeviceEKs and GetOrCreateTeamEK, could slow things down unnecessarily when unboxing a large number of messages

we should get in before next release

@joshblum joshblum requested a review from mmaxim Jan 10, 2019

@@ -456,7 +437,10 @@ func (e *EKLib) PurgeCachesForTeamIDAndGeneration(ctx context.Context, teamID ke

func (e *EKLib) GetOrCreateLatestTeamEK(ctx context.Context, teamID keybase1.TeamID) (teamEK keybase1.TeamEk, err error) {
defer e.G().CTraceTimed(ctx, "GetOrCreateLatestTeamEK", func() error { return err })()
if err = e.checkLogin(ctx); err != nil {

This comment has been minimized.


joshblum Jan 10, 2019


this was hoisted out of the inner function which has a retry loop

@joshblum joshblum force-pushed the joshblum/ek-cleanup-CORE-9874 branch from 1f918fb to ef3695a Jan 10, 2019

if generation == maxGeneration {
if _, cerr := e.GetOrCreateLatestTeamEK(ctx, teamID); cerr != nil {

This comment has been minimized.


mmaxim Jan 11, 2019


Use a background context

This comment has been minimized.


@joshblum joshblum force-pushed the joshblum/ek-cleanup-CORE-9874 branch from ef3695a to 4d72cdd Jan 11, 2019


mmaxim approved these changes Jan 11, 2019


@joshblum joshblum merged commit e64f002 into master Jan 11, 2019

2 checks passed

ci/circleci Your tests passed on CircleCI!
continuous-integration/jenkins/pr-head This commit looks good

@joshblum joshblum deleted the joshblum/ek-cleanup-CORE-9874 branch Jan 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment