-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Conversation
…actions in progress
transaction_trace_ptr trace = std::make_shared<transaction_trace>(); | ||
trace->id = itr->trx_meta->id(); |
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 isn't isn't creating the real transaction_trace. It's only initializing the fields needed for your specific use, which seems pretty fragile.
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.
Yeah, I agree. I switched this to indicate duplicate transaction which is what it would have generated before this was integrated into the unapplied_transaction_queue.
@@ -221,8 +221,9 @@ class unapplied_transaction_queue { | |||
iterator incoming_begin() { return queue.get<by_type>().lower_bound( trx_enum_type::incoming_persisted ); } | |||
iterator incoming_end() { return queue.get<by_type>().end(); } // if changed to upper_bound, verify usage performance | |||
|
|||
/// callers responsibilty to call next() if applicable |
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.
caller's
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.
done
@@ -242,10 +243,15 @@ class unapplied_transaction_queue { | |||
} | |||
|
|||
template<typename Itr> | |||
void removed( Itr itr ) { | |||
void removed( Itr itr, bool call_next = true ) { |
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'm not sure that I like using a default argument that's only used at a single call site. Especially when the new default is different from the existing behavior.
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.
Removed this and made it explicitly the callers responsibility.
@@ -221,8 +221,9 @@ class unapplied_transaction_queue { | |||
iterator incoming_begin() { return queue.get<by_type>().lower_bound( trx_enum_type::incoming_persisted ); } | |||
iterator incoming_end() { return queue.get<by_type>().end(); } // if changed to upper_bound, verify usage performance | |||
|
|||
/// callers responsibilty to call next() if applicable |
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.
Also, at least one caller (
eos/plugins/producer_plugin/producer_plugin.cpp
Line 1599 in f7affa0
itr = _unapplied_transactions.erase( itr ); |
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.
These should never have a next
. However, to be extra safe I added in a check and call.
…te trx instead of partial trace.
Change Description
net_plugin
uses a callback on transaction processing to track size of transactions in progress. Therefore we need to always call transaction callback for proper accounting of transactions in progress.Consensus Changes
API Changes
Documentation Additions