Skip to content

Commit 4026a0e

Browse files
committed
fixes
1 parent 154960f commit 4026a0e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

storage/aws/aws.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,12 +1214,12 @@ func (s *mySQLSequencer) nextIndex(ctx context.Context) (uint64, error) {
12141214
//
12151215
// This function uses PubCoord with an exclusive lock to guarantee that only one tessera instance can attempt to publish
12161216
// a checkpoint at any given time.
1217-
func (s *mySQLSequencer) publishCheckpoint(ctx context.Context, minStaleActive, minStaleRepub time.Duration, f func(context.Context, uint64, []byte) error) (err error) {
1217+
func (s *mySQLSequencer) publishCheckpoint(ctx context.Context, minStaleActive, minStaleRepub time.Duration, f func(context.Context, uint64, []byte) error) (errR error) {
12181218
start := time.Now()
12191219
defer func() {
12201220
// Detect any errors and update metrics accordingly.
12211221
// Non-error cases are explicitly handled in the body of the function below.
1222-
if err != nil {
1222+
if errR != nil {
12231223
publishCount.Add(ctx, 1, metric.WithAttributes(errorTypeKey.String("error")))
12241224
}
12251225
}()

storage/gcp/gcp.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ func (s *spannerCoordinator) nextIndex(ctx context.Context) (uint64, error) {
10161016
//
10171017
// This function uses PubCoord with an exclusive lock to guarantee that only one tessera instance can attempt to publish
10181018
// a checkpoint at any given time.
1019-
func (s *spannerCoordinator) publishCheckpoint(ctx context.Context, minStaleActive, minStaleRepub time.Duration, f func(context.Context, uint64, []byte) error) (err error) {
1019+
func (s *spannerCoordinator) publishCheckpoint(ctx context.Context, minStaleActive, minStaleRepub time.Duration, f func(context.Context, uint64, []byte) error) error {
10201020
ctx, span := tracer.Start(ctx, "tessera.storage.gcp.publishCheckpoint")
10211021
defer span.End()
10221022

@@ -1117,7 +1117,7 @@ func (s *spannerCoordinator) garbageCollect(ctx context.Context, treeSize uint64
11171117
eg := errgroup.Group{}
11181118
// GC the tree in "vertical" chunks defined by entry bundles.
11191119
for ri := range layout.Range(fromSize, treeSize-fromSize, treeSize) {
1120-
// Only known-full bundles are in-scope for for GC, so exit if the current bundle is partial or
1120+
// Only known-full bundles are in-scope for GC, so exit if the current bundle is partial or
11211121
// we've reached our limit of chunks.
11221122
if ri.Partial > 0 || d > maxBundles {
11231123
break

storage/posix/files.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,12 +602,12 @@ func (s *Storage) readTreeState(ctx context.Context) (uint64, []byte, error) {
602602
// publishCheckpoint checks whether the currently published checkpoint (if any) is more than
603603
// minStaleness old, and, if so, creates and published a fresh checkpoint from the current
604604
// stored tree state.
605-
func (a *appender) publishCheckpoint(ctx context.Context, minStalenessActive, minStalenessRepub time.Duration) (err error) {
605+
func (a *appender) publishCheckpoint(ctx context.Context, minStalenessActive, minStalenessRepub time.Duration) (errR error) {
606606
now := time.Now()
607607
defer func() {
608608
// Detect any errors and update metrics accordingly.
609609
// Non-error cases are explicitly handled in the body of the function below.
610-
if err != nil {
610+
if errR != nil {
611611
publishCount.Add(ctx, 1, metric.WithAttributes(errorTypeKey.String("error")))
612612
}
613613
}()

0 commit comments

Comments
 (0)