mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-03-31 14:00:06 +08:00
pstore ds: enforce order in gc queries.
This commit is contained in:
parent
fd9c9287e2
commit
f0eb25b3c5
@ -23,8 +23,16 @@ var (
|
|||||||
// in GC routines, how many operations do we place in a batch before it's committed.
|
// in GC routines, how many operations do we place in a batch before it's committed.
|
||||||
gcOpsPerBatch = 20
|
gcOpsPerBatch = 20
|
||||||
// queries
|
// queries
|
||||||
purgeQuery = query.Query{Prefix: gcLookaheadBase.String(), KeysOnly: true}
|
purgeQuery = query.Query{
|
||||||
populateLookaheadQuery = query.Query{Prefix: addrBookBase.String(), KeysOnly: true}
|
Prefix: gcLookaheadBase.String(),
|
||||||
|
Orders: []query.Order{query.OrderByKey{}},
|
||||||
|
KeysOnly: true,
|
||||||
|
}
|
||||||
|
populateLookaheadQuery = query.Query{
|
||||||
|
Prefix: addrBookBase.String(),
|
||||||
|
Orders: []query.Order{query.OrderByKey{}},
|
||||||
|
KeysOnly: true,
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// cyclicBatch is similar to go-datastore autobatch, but it's driven by an actual Batch facility offered by the
|
// cyclicBatch is similar to go-datastore autobatch, but it's driven by an actual Batch facility offered by the
|
||||||
|
Loading…
Reference in New Issue
Block a user