Skip to content

Commit

Permalink
Merge #36571
Browse files Browse the repository at this point in the history
36571: sql: reduce log spam in WaitForOneVersion r=vivekmenezes a=vivekmenezes

fixes #36560

Release note: None

Co-authored-by: Vivek Menezes <[email protected]>
  • Loading branch information
craig[bot] and vivekmenezes committed Apr 5, 2019
2 parents d2ebf14 + 70ee92b commit d6a33f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/sql/lease.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func (s LeaseStore) WaitForOneVersion(
desc := &sqlbase.Descriptor{}
descKey := sqlbase.MakeDescMetadataKey(tableID)
var tableDesc *sqlbase.TableDescriptor
for r := retry.Start(retryOpts); r.Next(); {
for lastCount, r := 0, retry.Start(retryOpts); r.Next(); {
// Get the current version of the table descriptor non-transactionally.
//
// TODO(pmattis): Do an inconsistent read here?
Expand All @@ -304,7 +304,10 @@ func (s LeaseStore) WaitForOneVersion(
if count == 0 {
break
}
log.Infof(context.TODO(), "publish (%d leases): desc=%v", count, tables)
if count != lastCount {
lastCount = count
log.Infof(ctx, "waiting for %d leases to expire: desc=%v", count, tables)
}
}
return tableDesc.Version, nil
}
Expand Down

0 comments on commit d6a33f1

Please sign in to comment.