vanus-labs / vanus

Vanus is a Serverless, event streaming system with processing capabilities. It easily connects SaaS, Cloud Services, and Databases to help users build next-gen Event-driven Applications.
https://vanus.ai
Apache License 2.0
2.29k stars 113 forks source link

fix(store): unexpected compaction after restart #603

Closed ifplusor closed 1 year ago

ifplusor commented 1 year ago

What problem does this PR solve?

Issue Number: None

Fix #437 is incomplete.

Problem Summary

What is changed and how does it work?

Check List

Tests

codecov[bot] commented 1 year ago

Codecov Report

Merging #603 (61c7097) into main (ee76217) will decrease coverage by 2.52%. The diff coverage is 46.82%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/vanus-labs/vanus/pull/603/graphs/tree.svg?width=650&height=150&src=pr&token=RSXSIMEY4V&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs)](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs) ```diff @@ Coverage Diff @@ ## main #603 +/- ## ========================================== - Coverage 57.07% 54.55% -2.52% ========================================== Files 190 211 +21 Lines 15191 17036 +1845 ========================================== + Hits 8670 9294 +624 - Misses 5884 7038 +1154 - Partials 637 704 +67 ``` | [Impacted Files](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs) | Coverage Δ | | |---|---|---| | [internal/controller/trigger/storage/storage.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvY29udHJvbGxlci90cmlnZ2VyL3N0b3JhZ2Uvc3RvcmFnZS5nbw==) | `0.00% <ø> (ø)` | | | [...ernal/controller/trigger/validation/subscripton.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvY29udHJvbGxlci90cmlnZ2VyL3ZhbGlkYXRpb24vc3Vic2NyaXB0b24uZ28=) | `66.12% <ø> (-3.17%)` | :arrow_down: | | [internal/controller/trigger/worker/manager.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvY29udHJvbGxlci90cmlnZ2VyL3dvcmtlci9tYW5hZ2VyLmdv) | `85.76% <ø> (+0.83%)` | :arrow_up: | | [internal/controller/trigger/worker/policy.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvY29udHJvbGxlci90cmlnZ2VyL3dvcmtlci9wb2xpY3kuZ28=) | `100.00% <ø> (ø)` | | | [internal/controller/trigger/worker/scheduler.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvY29udHJvbGxlci90cmlnZ2VyL3dvcmtlci9zY2hlZHVsZXIuZ28=) | `71.01% <ø> (+1.01%)` | :arrow_up: | | [internal/controller/trigger/worker/worker.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvY29udHJvbGxlci90cmlnZ2VyL3dvcmtlci93b3JrZXIuZ28=) | `78.45% <ø> (-1.55%)` | :arrow_down: | | [internal/gateway/config.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvZ2F0ZXdheS9jb25maWcuZ28=) | `60.60% <ø> (-0.51%)` | :arrow_down: | | [internal/gateway/gateway.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvZ2F0ZXdheS9nYXRld2F5Lmdv) | `57.64% <ø> (-10.03%)` | :arrow_down: | | [internal/gateway/proxy/auth.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvZ2F0ZXdheS9wcm94eS9hdXRoLmdv) | `0.00% <ø> (ø)` | | | [internal/gateway/proxy/deadletter.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvZ2F0ZXdheS9wcm94eS9kZWFkbGV0dGVyLmdv) | `0.00% <ø> (ø)` | | | ... and [70 more](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs) | | ... and [59 files with indirect coverage changes](https://app.codecov.io/gh/vanus-labs/vanus/pull/603/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs). Last update [43db43b...61c7097](https://app.codecov.io/gh/vanus-labs/vanus/pull/603?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs).