MCPcopy
hub / github.com/uber/aresdb / AcquireToken

Method AcquireToken

memstore/common/types.go:27–27  ·  view source on GitHub ↗

Call AcquireToken to reserve usage token before any data purge operation when return result is true, then you can proceed to the purge operation and later call ReleaseToken to release the token when return result is false, then some bootstrap work is going on, no purge operation is permitted

(table string, shard uint32)

Source from the content-addressed store, hash-verified

25 // when return result is true, then you can proceed to the purge operation and later call ReleaseToken to release the token
26 // when return result is false, then some bootstrap work is going on, no purge operation is permitted
27 AcquireToken(table string, shard uint32) bool
28 // Call ReleaseToken wheneven you call AcquireToken with true return value to release token
29 ReleaseToken(table string, shard uint32)
30}

Callers 5

PurgeMethod · 0.65
ArchiveMethod · 0.65

Implementers 2

BootStrapTokenmemstore/common/mocks/BootStrapToken.g
PeerDataNodeServerImpldatanode/bootstrap/bootstrap_server.go

Calls

no outgoing calls

Tested by

no test coverage detected