forked from TrueCloudLab/rclone
backend/tardigrade: Upgrade to uplink v1.0.6
This fixes an important bug with listing that affects users with more than 500 objects in a listing operation.
This commit is contained in:
parent
764b90a519
commit
e7bd392a69
154 changed files with 1242 additions and 1028 deletions
19
vendor/github.com/spacemonkeygo/monkit/v3/trace.go
generated
vendored
19
vendor/github.com/spacemonkeygo/monkit/v3/trace.go
generated
vendored
|
@ -108,6 +108,17 @@ func removeObserverFrom(parent **spanObserverTuple, ref *spanObserverTuple) (
|
|||
// Id returns the id of the Trace
|
||||
func (t *Trace) Id() int64 { return t.id }
|
||||
|
||||
// GetAll returns values associated with a trace. See SetAll.
|
||||
func (t *Trace) GetAll() (val map[interface{}]interface{}) {
|
||||
t.mtx.Lock()
|
||||
defer t.mtx.Unlock()
|
||||
new := make(map[interface{}]interface{}, len(t.vals))
|
||||
for k, v := range t.vals {
|
||||
new[k] = v
|
||||
}
|
||||
return new
|
||||
}
|
||||
|
||||
// Get returns a value associated with a key on a trace. See Set.
|
||||
func (t *Trace) Get(key interface{}) (val interface{}) {
|
||||
t.mtx.Lock()
|
||||
|
@ -129,6 +140,14 @@ func (t *Trace) Set(key, val interface{}) {
|
|||
t.mtx.Unlock()
|
||||
}
|
||||
|
||||
// copyFrom replace all key/value on a trace with a new sets of key/value.
|
||||
func (t *Trace) copyFrom(s *Trace) {
|
||||
vals := s.GetAll()
|
||||
t.mtx.Lock()
|
||||
defer t.mtx.Unlock()
|
||||
t.vals = vals
|
||||
}
|
||||
|
||||
func (t *Trace) incrementSpans() { atomic.AddInt64(&t.spanCount, 1) }
|
||||
func (t *Trace) decrementSpans() { atomic.AddInt64(&t.spanCount, -1) }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue