-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Second iteration of mining cache reimplementation.
- Reimplement ar_chunk_cache -> ar_mining_cache module - Rework cache reservation logic - Rework ar_mining_io workflow - Rework cache cleanup routines - Remove cache cycling
- Loading branch information
Showing
8 changed files
with
837 additions
and
929 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-ifndef(AR_MINING_CACHE_HRL). | ||
-define(AR_MINING_CACHE_HRL, true). | ||
|
||
-record(ar_mining_cache_value, { | ||
chunk1 :: binary() | undefined, | ||
chunk2 :: binary() | undefined, | ||
chunk2_missing :: boolean(), | ||
h1 :: binary() | undefined, | ||
h2 :: binary() | undefined | ||
}). | ||
|
||
-record(ar_mining_cache_session, { | ||
mining_cache = #{} :: #{term() => #ar_mining_cache_value{}}, | ||
mining_cache_size_bytes = 0 :: non_neg_integer(), | ||
reserved_mining_cache_bytes = 0 :: non_neg_integer() | ||
}). | ||
|
||
|
||
-record(ar_mining_cache, { | ||
mining_cache_sessions = #{} :: #{term() => #ar_mining_cache_session{}}, | ||
mining_cache_sessions_queue = queue:new() :: queue:queue(), | ||
mining_cache_limit_bytes = 0 :: non_neg_integer() | ||
}). | ||
|
||
-endif. |
Oops, something went wrong.