Yieldable queues for pallet MessageQueue#13424
Yieldable queues for pallet MessageQueue#13424paritytech-processbot[bot] merged 15 commits intomasterfrom
MessageQueue#13424Conversation
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
|
bot bench $ pallet dev pallet_message_queue |
|
@ggwpez https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2442244 was started for your command Comment |
|
@ggwpez Command |
|
bot merge |
|
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/polkadot-release-analysis-v0-9-40/2468/1 |
* Add Yield message processing error Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add NoopServiceQueues Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Implement temporary error aka Yield Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make NoopMessageProcessor generic Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Mock pausable message processor Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Test paused queues Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Integration test paused queues Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use WeightMeter instead of weight return Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make compile Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_message_queue * Fix test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: command-bot <>
* Add Yield message processing error Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add NoopServiceQueues Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Implement temporary error aka Yield Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make NoopMessageProcessor generic Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Mock pausable message processor Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Test paused queues Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Integration test paused queues Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use WeightMeter instead of weight return Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make compile Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_message_queue * Fix test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: command-bot <>
Preparation for: paritytech/cumulus#2157
Changes:
Yieldvariant to theProcessMessageErrorenum. This indicates that a queue wants to yield its service slot.Can be used to "pause" queues in a trivial way; the MQ pallet does not need to store any additional state about paused queues and the processor needs to re-check his paused-condition on each invocation anyway.
NoopServiceQueuesimpl, sinceServiceQueuescannot be implemented for()due to its associated type.process_messageto use a&mut WeightMeterinstead ofWeightreturn to also consume weight in the error case.