πŸ” Execution Order and Processor State

Execution Order

By default, handlers are executed in parallel for data belong to different blocks to achieve maximum performance. The data within a block is processed sequentially.

  • Interval Handlers (e.g. block handlers, time handlers) are always executed in the end of the block. For multiple interval handler at the same block, the handlers are executed in definition order
  • Event and Function handlers are executed ordered by transaction index
  • Within the same transaction
    • Function handlers are executed before Event handlers
    • Event handlers are execute by log index

If you want the processor be to execute in a fully sequential manner, you could do the following

GLOBAL_CONFIG.execution = {
  sequential: true,
};

State

DO NOT assume processor in-memory state is restart-safe. Thus, please DO NOT rely on global variables being persistent. As alternative, use Entity and ctx.store.upsert/get to do that.