-
Notifications
You must be signed in to change notification settings - Fork 269
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
Refactor log_messages_bytes_limit
parameter usage
#949
base: master
Are you sure you want to change the base?
Refactor log_messages_bytes_limit
parameter usage
#949
Conversation
1c68b4d
to
f0feb94
Compare
@steviez What do you think about this? |
f0feb94
to
45334e7
Compare
45334e7
to
7d647fe
Compare
@CriesofCarrots Do you think this PR could be helpful? |
Hey @andreisilviudragnea thanks for the contributions! I'd like to ask respectfully that you don't tag maintainers. One of us will definitely have a look at your proposed changes, we are just very busy! Conceptually this looks like a nice cleanup. I'll look at this as soon as possible, unless someone beats me to it! |
7d647fe
to
cfd0afc
Compare
I see some failures in https://buildkite.com/anza/agave/builds/3584#018f1cb8-3593-42cd-9f49-c5cf61cb8fdf:
But they do not seem related to this PR, since the same test fails on I will rebase my PR and wait for CI tag to run CI again. |
cfd0afc
to
140bcea
Compare
@@ -4961,7 +4956,6 @@ impl Bank { | |||
enable_return_data_recording: true, | |||
}, | |||
&mut ExecuteTimings::default(), | |||
Some(1000 * 1000), |
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.
Generally, I like this change as we have lots of bloated argument lists in the codebase. That being said, this one looks like it might be a slight change of behavior.
- Currently, callers of this function will always get a value of
Some(1e6)
- With your change, the value will be whatever is initialized in the first
Bank
(ie CLI arg)
It looks like we have this caller here; I'm not super familiar with BanksServer so will need to dig a little (or let someone else chime in) to ensure we're good with the change:
agave/banks-server/src/banks_server.rs
Line 371 in b35e17c
match bank.process_transaction_with_metadata(transaction) { |
df227a9
to
f4798f0
Compare
a1515ed
to
59dac8c
Compare
12f7274
to
64b48d3
Compare
9511a45
to
975397d
Compare
Replacing `log_messages_bytes_limit` parameter inside `TransactionBatchProcessor::execute_loaded_transaction()` with `self.runtime_config.log_messages_bytes_limit` allows removing many `log_messages_bytes_limit` parameters propagated across the codebase.
975397d
to
a0eb94f
Compare
Problem
There are many functions with a long list of parameters and some of them can be removed by refactoring how those parameters are used. For example,
log_messages_bytes_limit
parameter can be retrieved directly fromRuntimeConfig
struct.Summary of Changes
Replacing
log_messages_bytes_limit
parameter insideTransactionBatchProcessor::execute_loaded_transaction()
withself.runtime_config.log_messages_bytes_limit
allows removing manylog_messages_bytes_limit
parameters propagated across the codebase.