Skip to content

Some questions about S3-FIFO #40

Answered by 1a1a11a
maypok86 asked this question in Q&A
Nov 18, 2023 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

This is very clear!

  1. there are two options, one is to use pointers, while the other is to leave a tombstone (and waste the space). From my experience, most workloads do not have a lot of delete, and when they have delete, they mostly happen soon after insertion (happening in the small queue, and since the small queue recycles much faster, this makes ring buffer more suitable). So I think the ring buffer approach is better.
  2. I see the confusion now. This happens because you store data in the hash table. I think you can store the ghost queue in a separate data structure. For example, you can use a ring buffer and hash set to implement it. Or you can just use a new (and small) hash table that…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@maypok86
Comment options

@1a1a11a
Comment options

Answer selected by maypok86
@maypok86
Comment options

@1a1a11a
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants