-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: do not run bloom in case of ephemeral node #2953
Conversation
|
||
func DefaultCacheOpts() CacheOpts { | ||
return CacheOpts{ | ||
512 * 8 * 1024, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont leave out the field names please
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
d225a1d
to
3b8980d
Compare
@whyrusleeping sorry for messing it up at first try. This should be working as intended. |
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
3b8980d
to
af77782
Compare
func CachedBlockstore(bs GCBlockstore, | ||
ctx context.Context, opts CacheOpts) (cbs GCBlockstore, err error) { | ||
if ctx == nil { | ||
ctx = context.TODO() // For tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont like this, youre only saving yourself typing this in two other places.
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
@whyrusleeping updated |
This LGTM |
@@ -27,6 +27,10 @@ type BuildCfg struct { | |||
// If online is set, the node will have networking enabled | |||
Online bool | |||
|
|||
// If permament then node should run more expensive processes | |||
// that will improve performance in long run | |||
Permament bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a good name. the node wont ever be Permanent
. you're using it here to signify "NotEphemeral", so just use Ephemeral
and set it to false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't use Ephemeral
as it would be hard to find all tests and places where node is created and set it there to true.
This part is on my list to refactor for the split to: Online
, Offline
and Ephemeral
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
split to:
Online
,Offline
andEphemeral
those aren't good distinctions. an ephemeral node may be online and may be offline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we don't have Online Ephemeral, but very good point.
I will do nice and full refactor of the Online vs Ephemeral modes.
This PR includes parts of #2942 which cleanup passing of the context and options to the caches.
The important change is 697a345