databend icon indicating copy to clipboard operation
databend copied to clipboard

bug: assertion failed: root_snapshot.timestamp.is_some()

Open lichuang opened this issue 1 year ago • 0 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Version

1.2.233

What's Wrong?

when vacuum table, assert fail:

vacuum table database1.test_numeric retain 0 hours;
Error: APIError: ResponseError with 1104: assertion failed: root_snapshot.timestamp.is_some()

it is the check in this function:

    #[async_backtrace::framed]
    pub async fn navigate_for_purge(
        &self,
        ctx: &Arc<dyn TableContext>,
        instant: Option<NavigationPoint>,
    ) -> Result<(Arc<FuseTable>, Vec<String>)> {
        let retention = Duration::hours(ctx.get_settings().get_retention_period()? as i64);
        let root_snapshot = if let Some(snapshot) = self.read_table_snapshot().await? {
            snapshot
        } else {
            return Err(ErrorCode::TableHistoricalDataNotFound(
                "No historical data found at given point",
            ));
        };

        assert!(root_snapshot.timestamp.is_some());

       // ....
}

How to Reproduce?

No response

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

lichuang avatar Dec 12 '23 13:12 lichuang