Skip to content

fix(sdk): OrderTracker is getting out of sync #5896

@Hywan

Description

@Hywan

In EventLinkedChunk::reset, the OrderTracker isn't reset properly:

/// Clear all events.
///
/// All events, all gaps, everything is dropped, move into the void, into
/// the ether, forever.
pub fn reset(&mut self) {
self.chunks.clear();
}

which then later can create an error in linked_chunk::AsVector:

// Chunk has not been found.
ControlFlow::Continue(..) => {
// SAFETY: Assuming `LinkedChunk` and `ObservableUpdates` are not buggy, and
// assuming `Self::chunks` is correctly initialized, it is not possible to work
// on a chunk that does not exist. If this predicate fails, it means
// `LinkedChunk` or `ObservableUpdates` contain a bug.
panic!("The chunk is not found");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions