Commit b5c3fb9
committed
Fix pending batch being skipped after reorg detection
Move the pending batch check to BEFORE fetching a new batch from the stream.
Previously, after a reorg was detected:
1. The data batch was stored as _pending_batch
2. A reorg batch was returned
3. On next __next__() call, a NEW batch was fetched BEFORE checking _pending_batch
4. This caused the pending batch to be lost or returned out of order
Now the pending batch check happens first, ensuring proper ordering:
reorg_batch -> pending_data_batch -> next_batch1 parent 8ce25f1 commit b5c3fb9
1 file changed
+6
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
| |||
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
| |||
0 commit comments