Skip to content

Commit b198397

Browse files
committed
[CR] Correctly count KV ops in comments, and some minor cleanups
1 parent 3cc70c9 commit b198397

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

pkg/config/defaults.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,14 @@ func setDefaults(cfgType string) {
154154
// KV with these settings:
155155
//
156156
// - Cleanly acquiring ownership performs 1 read operation and 1
157-
// write operation.
157+
// write operation. Releasing ownership performs another 1 read
158+
// operation and 1 write operation.
158159
//
159160
// - While ownership is held, add 2.5 read and 2.5 write operation
160-
// per second, and an additional ~7 read and write operations
161-
// per second per branch operation waiting to acquire ownership.
161+
// per second, an additional ~7 read operations per second per
162+
// branch operation waiting to acquire ownership, and an
163+
// additional write operation per branch operation acquiring
164+
// ownership.
162165

163166
// See comments on WeakOwner for how to compute these numbers.
164167
viper.SetDefault("graveler.branch_ownership.refresh", 400*time.Millisecond)

pkg/kv/util/weak_owner.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ func (w *WeakOwner) releaseIf(ctx context.Context, owner string, prefixedKey []b
262262
log.Info("Lost ownership race before trying to release")
263263
return nil
264264
}
265-
ownership.Owner = fmt.Sprintf("[released] %s", ownership.Owner)
266265
// Set expiration to the beginning of time - definitely expired.
267266
ownership.Expires.Reset()
268267
err = kv.SetMsgIf(ctx, w.Store, weakOwnerPartition, prefixedKey, &ownership, predicate)

pkg/testutil/stress/stats.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (t *TotalStats) String() string {
3838
if t.FirstError != nil {
3939
ret = fmt.Sprintf("First error: %s\n", t.FirstError)
4040
}
41-
ret = ret + fmt.Sprintf("%d total with %d failures in %s\n%f successes/s\n%f failures/s",
41+
ret += fmt.Sprintf("%d total with %d failures in %s\n%f successes/s\n%f failures/s",
4242
t.NumTotal, t.NumErrors, t.Duration,
4343
float64(t.NumTotal)/t.Duration.Seconds(),
4444
float64(t.NumErrors)/t.Duration.Seconds(),
@@ -63,9 +63,6 @@ type ResultCollector struct {
6363
totalCompleted int64
6464
totalErrors int64
6565
currentCompleted int64
66-
// startTime is when collection started. It is roughly equal to the
67-
// start of the experiment.
68-
startTime time.Time
6966
}
7067

7168
func (rc *ResultCollector) flushCurrent() *Stats {

0 commit comments

Comments
 (0)