tile38/vendor/github.com
tidwall 9e68703841 Update expiration logic
This commit changes the logic for managing the expiration of
objects in the database.

Before: There was a server-wide hashmap that stored the
collection key, id, and expiration timestamp for all objects
that had a TTL. The hashmap was occasionally probed at 20
random positions, looking for objects that have expired. Those
expired objects were immediately deleted, and if there was 5
or more objects deleted, then the probe happened again, with
no delay. If the number of objects was less than 5 then the
there was a 1/10th of a second delay before the next probe.

Now: Rather than a server-wide hashmap, each collection has
its own ordered priority queue that stores objects with TTLs.
Rather than probing, there is a background routine that
executes every 1/10th of a second, which pops the expired
objects from the collection queues, and deletes them.

The collection/queue method is a more stable approach than
the hashmap/probing method. With probing, we can run into
major cache misses for some cases where there is wide
TTL duration, such as in the hours or days. This may cause
the system to occasionally fall behind, leaving should-be
expired objects in memory. Using a queue, there is no
cache misses, all objects that should be expired will be
right away, regardless of the TTL durations.

Fixes #616
2021-07-12 13:37:50 -07:00
..
BurntSushi/toml fix: distance if point and object have the same coordinates 2021-07-08 06:45:31 -07:00
Shopify/sarama Various updates 2021-07-08 06:36:05 -07:00
aws/aws-sdk-go Various updates 2021-07-08 06:36:05 -07:00
beorn7/perks vendor dir 2021-07-08 06:46:28 -07:00
cespare/xxhash/v2 Update expiration logic 2021-07-12 13:37:50 -07:00
davecgh/go-spew Updated Kafka client 2021-07-08 06:34:09 -07:00
eapache Updated Kafka client 2021-07-08 06:34:09 -07:00
eclipse/paho.mqtt.golang Various updates 2021-07-08 06:36:05 -07:00
golang fix: distance if point and object have the same coordinates 2021-07-08 06:45:31 -07:00
gomodule/redigo Merge distance updates 2021-07-08 07:03:36 -07:00
google/go-cmp Merge distance updates 2021-07-08 07:03:36 -07:00
googleapis/gax-go/v2 fix: distance if point and object have the same coordinates 2021-07-08 06:45:31 -07:00
gorilla/websocket Various updates 2021-07-08 06:36:05 -07:00
hashicorp/go-uuid Updated Kafka client 2021-07-08 06:34:09 -07:00
jcmturner/gofork Updated Kafka client 2021-07-08 06:34:09 -07:00
jmespath/go-jmespath Updated dependencies 2021-07-08 06:34:44 -07:00
jstemmer/go-junit-report fix: distance if point and object have the same coordinates 2021-07-08 06:45:31 -07:00
klauspost/compress Various updates 2021-07-08 06:36:05 -07:00
mattn/go-runewidth Updated dependencies 2021-07-08 06:34:44 -07:00
matttproud/golang_protobuf_extensions vendor dir 2021-07-08 06:46:28 -07:00
mmcloughlin/geohash Updated dependencies 2021-07-08 06:34:44 -07:00
nats-io Various updates 2021-07-08 06:36:05 -07:00
peterh/liner Various updates 2021-07-08 06:36:05 -07:00
pierrec/lz4 Various updates 2021-07-08 06:36:05 -07:00
prometheus vendor dir 2021-07-08 06:46:28 -07:00
rcrowley/go-metrics Various updates 2021-07-08 06:36:05 -07:00
streadway/amqp Updated dependencies 2021-07-08 06:34:44 -07:00
tidwall Update expiration logic 2021-07-12 13:37:50 -07:00
xdg Add sasl 2021-07-08 06:46:57 -07:00
yuin/gopher-lua Updated dependencies 2021-07-08 06:34:44 -07:00