Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
62533: kvclient: fix iface name in comments r=andreimatei a=andreimatei

txnReqInterceptor had become txnInterceptor a long time ago.

Release note: None

Co-authored-by: Andrei Matei <[email protected]>
  • Loading branch information
craig[bot] and andreimatei committed Mar 24, 2021
2 parents 8aace6d + 5e7f8bd commit 3632098
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions pkg/kv/kvclient/kvcoord/txn_interceptor_committer.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,16 +509,16 @@ func (*txnCommitter) populateLeafFinalState(*roachpb.LeafTxnFinalState) {}
// importLeafFinalState is part of the txnInterceptor interface.
func (*txnCommitter) importLeafFinalState(context.Context, *roachpb.LeafTxnFinalState) {}

// epochBumpedLocked implements the txnReqInterceptor interface.
// epochBumpedLocked implements the txnInterceptor interface.
func (tc *txnCommitter) epochBumpedLocked() {}

// createSavepointLocked is part of the txnReqInterceptor interface.
// createSavepointLocked is part of the txnInterceptor interface.
func (*txnCommitter) createSavepointLocked(context.Context, *savepoint) {}

// rollbackToSavepointLocked is part of the txnReqInterceptor interface.
// rollbackToSavepointLocked is part of the txnInterceptor interface.
func (*txnCommitter) rollbackToSavepointLocked(context.Context, savepoint) {}

// closeLocked implements the txnReqInterceptor interface.
// closeLocked implements the txnInterceptor interface.
func (tc *txnCommitter) closeLocked() {}

func cloneWithStatus(txn *roachpb.Transaction, s roachpb.TransactionStatus) *roachpb.Transaction {
Expand Down
4 changes: 2 additions & 2 deletions pkg/kv/kvclient/kvcoord/txn_interceptor_heartbeater.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ func (*txnHeartbeater) importLeafFinalState(context.Context, *roachpb.LeafTxnFin
// epochBumpedLocked is part of the txnInterceptor interface.
func (h *txnHeartbeater) epochBumpedLocked() {}

// createSavepointLocked is part of the txnReqInterceptor interface.
// createSavepointLocked is part of the txnInterceptor interface.
func (*txnHeartbeater) createSavepointLocked(context.Context, *savepoint) {}

// rollbackToSavepointLocked is part of the txnReqInterceptor interface.
// rollbackToSavepointLocked is part of the txnInterceptor interface.
func (*txnHeartbeater) rollbackToSavepointLocked(context.Context, savepoint) {}

// closeLocked is part of the txnInterceptor interface.
Expand Down
4 changes: 2 additions & 2 deletions pkg/kv/kvclient/kvcoord/txn_interceptor_metric_recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ func (*txnMetricRecorder) importLeafFinalState(context.Context, *roachpb.LeafTxn
// epochBumpedLocked is part of the txnInterceptor interface.
func (*txnMetricRecorder) epochBumpedLocked() {}

// createSavepointLocked is part of the txnReqInterceptor interface.
// createSavepointLocked is part of the txnInterceptor interface.
func (*txnMetricRecorder) createSavepointLocked(context.Context, *savepoint) {}

// rollbackToSavepointLocked is part of the txnReqInterceptor interface.
// rollbackToSavepointLocked is part of the txnInterceptor interface.
func (*txnMetricRecorder) rollbackToSavepointLocked(context.Context, savepoint) {}

// closeLocked is part of the txnInterceptor interface.
Expand Down
8 changes: 4 additions & 4 deletions pkg/kv/kvclient/kvcoord/txn_interceptor_pipeliner.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ func (tp *txnPipeliner) populateLeafFinalState(*roachpb.LeafTxnFinalState) {}
// importLeafFinalState is part of the txnInterceptor interface.
func (tp *txnPipeliner) importLeafFinalState(context.Context, *roachpb.LeafTxnFinalState) {}

// epochBumpedLocked implements the txnReqInterceptor interface.
// epochBumpedLocked implements the txnInterceptor interface.
func (tp *txnPipeliner) epochBumpedLocked() {
// Move all in-flight writes into the lock footprint. These writes no longer
// need to be tracked precisely, but we don't want to forget about them and
Expand All @@ -649,10 +649,10 @@ func (tp *txnPipeliner) epochBumpedLocked() {
}
}

// createSavepointLocked is part of the txnReqInterceptor interface.
// createSavepointLocked is part of the txnInterceptor interface.
func (tp *txnPipeliner) createSavepointLocked(context.Context, *savepoint) {}

// rollbackToSavepointLocked is part of the txnReqInterceptor interface.
// rollbackToSavepointLocked is part of the txnInterceptor interface.
func (tp *txnPipeliner) rollbackToSavepointLocked(ctx context.Context, s savepoint) {
// Move all the writes in txnPipeliner that are not in the savepoint to the
// lock footprint. We no longer care if these write succeed or fail, so we're
Expand Down Expand Up @@ -681,7 +681,7 @@ func (tp *txnPipeliner) rollbackToSavepointLocked(ctx context.Context, s savepoi
}
}

// closeLocked implements the txnReqInterceptor interface.
// closeLocked implements the txnInterceptor interface.
func (tp *txnPipeliner) closeLocked() {}

// hasAcquiredLocks returns whether the interceptor has made an attempt to
Expand Down
4 changes: 2 additions & 2 deletions pkg/kv/kvclient/kvcoord/txn_interceptor_seq_num_allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ func (s *txnSeqNumAllocator) epochBumpedLocked() {
s.readSeq = 0
}

// createSavepointLocked is part of the txnReqInterceptor interface.
// createSavepointLocked is part of the txnInterceptor interface.
func (s *txnSeqNumAllocator) createSavepointLocked(ctx context.Context, sp *savepoint) {
sp.seqNum = s.writeSeq
}

// rollbackToSavepointLocked is part of the txnReqInterceptor interface.
// rollbackToSavepointLocked is part of the txnInterceptor interface.
func (*txnSeqNumAllocator) rollbackToSavepointLocked(context.Context, savepoint) {
// Nothing to restore. The seq nums keep increasing. The TxnCoordSender has
// added a range of sequence numbers to the ignored list.
Expand Down
4 changes: 2 additions & 2 deletions pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,14 +679,14 @@ func (sr *txnSpanRefresher) epochBumpedLocked() {
sr.refreshedTimestamp.Reset()
}

// createSavepointLocked is part of the txnReqInterceptor interface.
// createSavepointLocked is part of the txnInterceptor interface.
func (sr *txnSpanRefresher) createSavepointLocked(ctx context.Context, s *savepoint) {
s.refreshSpans = make([]roachpb.Span, len(sr.refreshFootprint.asSlice()))
copy(s.refreshSpans, sr.refreshFootprint.asSlice())
s.refreshInvalid = sr.refreshInvalid
}

// rollbackToSavepointLocked is part of the txnReqInterceptor interface.
// rollbackToSavepointLocked is part of the txnInterceptor interface.
func (sr *txnSpanRefresher) rollbackToSavepointLocked(ctx context.Context, s savepoint) {
sr.refreshFootprint.clear()
sr.refreshFootprint.insert(s.refreshSpans...)
Expand Down

0 comments on commit 3632098

Please sign in to comment.