Skip to content

Commit

Permalink
Improve gc_flush_delay documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
szajbus committed Jul 14, 2023
1 parent 1997869 commit eb1e727
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/nebulex/adapters/local/generation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ defmodule Nebulex.Adapters.Local.Generation do
The deletion of the oldest generation happens in two steps. First, the
underlying ets table is flushed to release space and only marked for deletion
as there may still be processes referencing it. Flushing is a blocking
operation, once started, such processes will need to wait until it finishes
before they can access the table. Flushing can be delayed by configuring
`:gc_flush_delay` to allow time for these processes to finish their work
without being accidentally blocked. The actual deletion of the ets table
happens at next GC run.
as there may still be processes referencing it. The actual deletion of the
ets table happens at next GC run.
However, flushing is a blocking operation, once started, processes wanting
to access the table will need to wait until it finishes. To circumvent this,
flushing can be delayed by configuring `:gc_flush_delay` to allow time for
these processes to finish their work without being accidentally blocked.
The only way to create new generations is through this module (this server
is the metadata owner) calling `new/2` function. When a Cache is created,
Expand Down

0 comments on commit eb1e727

Please sign in to comment.