xcherryio / xcherry

server and main repo of xCherry project
Apache License 2.0
26 stars 1 forks source link

Add timer queue and backoff retry for state API #39

Closed longquanzheng closed 11 months ago

longquanzheng commented 11 months ago

Why make this pull request?

Add backoff retry for state API

What has changed

How to test this pull request?

codecov[bot] commented 11 months ago

Codecov Report

Attention: 380 lines in your changes are missing coverage. Please review.

Comparison is base (070973a) 57.92% compared to head (6302808) 68.96%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #39 +/- ## =========================================== + Coverage 57.92% 68.96% +11.04% =========================================== Files 39 46 +7 Lines 2550 4031 +1481 =========================================== + Hits 1477 2780 +1303 - Misses 959 1064 +105 - Partials 114 187 +73 ``` | [Files](https://app.codecov.io/gh/xdblab/xdb/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdblab) | Coverage Δ | | |---|---|---| | [common/log/tag/tags.go](https://app.codecov.io/gh/xdblab/xdb/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdblab#diff-Y29tbW9uL2xvZy90YWcvdGFncy5nbw==) | `81.13% <100.00%> (+37.99%)` | :arrow_up: | | [config/config.go](https://app.codecov.io/gh/xdblab/xdb/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdblab#diff-Y29uZmlnL2NvbmZpZy5nbw==) | `61.05% <100.00%> (+16.27%)` | :arrow_up: | | [extensions/postgres/db\_session.go](https://app.codecov.io/gh/xdblab/xdb/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdblab#diff-ZXh0ZW5zaW9ucy9wb3N0Z3Jlcy9kYl9zZXNzaW9uLmdv) | `72.22% <100.00%> (ø)` | | | [extensions/postgres/extension.go](https://app.codecov.io/gh/xdblab/xdb/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdblab#diff-ZXh0ZW5zaW9ucy9wb3N0Z3Jlcy9leHRlbnNpb24uZ28=) | `73.33% <ø> (ø)` | | | [integTests/init.go](https://app.codecov.io/gh/xdblab/xdb/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdblab#diff-aW50ZWdUZXN0cy9pbml0Lmdv) | `83.33% <100.00%> (+16.66%)` | :arrow_up: | | [persistence/data\_models.go](https://app.codecov.io/gh/xdblab/xdb/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdblab#diff-cGVyc2lzdGVuY2UvZGF0YV9tb2RlbHMuZ28=) | `46.15% <100.00%> (+15.38%)` | :arrow_up: | | [persistence/sql/sqltest/base\_backoff.go](https://app.codecov.io/gh/xdblab/xdb/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdblab#diff-cGVyc2lzdGVuY2Uvc3FsL3NxbHRlc3QvYmFzZV9iYWNrb2ZmLmdv) | `100.00% <100.00%> (ø)` | | | [persistence/sql/sqltest/base\_basic.go](https://app.codecov.io/gh/xdblab/xdb/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdblab#diff-cGVyc2lzdGVuY2Uvc3FsL3NxbHRlc3QvYmFzZV9iYXNpYy5nbw==) | `100.00% <100.00%> (ø)` | | | [persistence/sql/sqltest/common.go](https://app.codecov.io/gh/xdblab/xdb/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdblab#diff-cGVyc2lzdGVuY2Uvc3FsL3NxbHRlc3QvY29tbW9uLmdv) | `100.00% <100.00%> (ø)` | | | [service/api/default\_server.go](https://app.codecov.io/gh/xdblab/xdb/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdblab#diff-c2VydmljZS9hcGkvZGVmYXVsdF9zZXJ2ZXIuZ28=) | `94.73% <ø> (ø)` | | | ... and [17 more](https://app.codecov.io/gh/xdblab/xdb/pull/39?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdblab) | | ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/xdblab/xdb/pull/39/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xdblab)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

longquanzheng commented 11 months ago

I am still working on adding more tests. Will appreciate any early review feedback!