tonbo-io / tonbo

A portable embedded database using Arrow.
https://tonbo.io
Apache License 2.0
606 stars 42 forks source link

Bug: `test::version_log_snap_shot` often errors occur in macos ci #142

Open KKould opened 1 week ago

KKould commented 1 week ago

Bug Report

manually cycled 30,000 times in window and ubuntu without error, not tested on macos yet

image

crwen commented 1 week ago

I think the problem is here: there are more than one log file, and you get wrong log file when list the files. Maybe you could delete or rename the old log file here: https://github.com/tonbo-io/tonbo/blob/564fb3f4e99236290fc0127a74e70eeec0f08ca5/src/version/set.rs#L200-L209

KKould commented 1 week ago

The strange thing about this problem is that it only occurs in macos. I think it is probably related to FileProvider::list, and the existence of multiple logs at the same time is within the scope of the design, because there may be a sudden downtime, choose the second latest one log (this is an overlooked point now, I will improve it now)