Skip to content

refactor(s3stream/object-wal): complete appends sequentially #2426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
May 14, 2025

Conversation

Chillax-0v0
Copy link
Contributor

@Chillax-0v0 Chillax-0v0 commented Apr 17, 2025

resolve #2432

Performance Test

  • Before
2025-04-18 07:42:14 - INFO Summary | Prod rate   1600.46 msg/s /  79.71 MiB/s | Prod total   0.48 M msg /  23.36 GiB /   0.00 K err | Cons rate   1600.44 msg/s /  79.71 MiB/s | Cons total   0.48 M msg /  23.36 GiB | Prod Latency (ms) avg:   267.319 - 50%:   233.070 - 75%:   276.479 - 90%:   416.589 - 95%:   545.547 - 99%:   759.195 - 99.9%:   972.191 - 99.99%:  1230.271 - Max:  1250.511 | E2E Latency (ms) avg:   272.780 - 50%:   237.312 - 75%:   280.909 - 90%:   436.249 - 95%:   547.739 - 99%:   778.615 - 99.9%:   981.371 - 99.99%:  1238.991 - Max:  1381.615
  • After
2025-04-18 08:11:08 - INFO Summary | Prod rate   1601.42 msg/s /  79.76 MiB/s | Prod total   0.48 M msg /  23.40 GiB /   0.00 K err | Cons rate   1600.99 msg/s /  79.74 MiB/s | Cons total   0.48 M msg /  23.40 GiB | Prod Latency (ms) avg:   285.990 - 50%:   243.027 - 75%:   301.301 - 90%:   484.555 - 95%:   598.403 - 99%:   784.067 - 99.9%:   912.219 - 99.99%:  1027.723 - Max:  1064.903 | E2E Latency (ms) avg:   302.057 - 50%:   250.507 - 75%:   324.333 - 90%:   521.625 - 95%:   628.719 - 99%:   831.655 - 99.9%:  1001.287 - 99.99%:  1099.751 - Max:  1202.439

@Chillax-0v0 Chillax-0v0 self-assigned this Apr 17, 2025
@Chillax-0v0 Chillax-0v0 linked an issue Apr 18, 2025 that may be closed by this pull request
@daniel-y
Copy link
Contributor

Should add unit tests to cover this refactor, and consider creating subsequent issues and PRs to simplify the upper-level logic.

@Chillax-0v0 Chillax-0v0 force-pushed the refactor-object-wal-sequentially-succeed branch from 876bf28 to fe5e8d0 Compare May 13, 2025 03:03
Signed-off-by: Ning Yu <ningyu@automq.com>
Signed-off-by: Ning Yu <ningyu@automq.com>
…very

Signed-off-by: Ning Yu <ningyu@automq.com>
Signed-off-by: Ning Yu <ningyu@automq.com>
Signed-off-by: Ning Yu <ningyu@automq.com>
Signed-off-by: Ning Yu <ningyu@automq.com>
Signed-off-by: Ning Yu <ningyu@automq.com>
Signed-off-by: Ning Yu <ningyu@automq.com>
Signed-off-by: Ning Yu <ningyu@automq.com>
Signed-off-by: Ning Yu <ningyu@automq.com>
Signed-off-by: Ning Yu <ningyu@automq.com>
Signed-off-by: Ning Yu <ningyu@automq.com>
Signed-off-by: Ning Yu <ningyu@automq.com>
Signed-off-by: Ning Yu <ningyu@automq.com>
@Chillax-0v0 Chillax-0v0 force-pushed the refactor-object-wal-sequentially-succeed branch from fe5e8d0 to 93c5cb1 Compare May 14, 2025 09:33
Signed-off-by: Ning Yu <ningyu@automq.com>
@superhx superhx merged commit 8afe1d4 into 1.4 May 14, 2025
6 checks passed
@superhx superhx deleted the refactor-object-wal-sequentially-succeed branch May 14, 2025 09:55
Chillax-0v0 added a commit that referenced this pull request May 14, 2025
* chore: add todos

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor(s3stream/object-wal): sequentially succeed

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor(s3stream/object-wal): drop discontinuous objects during recovery

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: introduce `MockObjectStorage`

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test sequentially succeed

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor: record endOffset in the object path

Signed-off-by: Ning Yu <ningyu@automq.com>

* feat: different version of wal object header

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor: adapt to the new object header format

Signed-off-by: Ning Yu <ningyu@automq.com>

* feat: recover from the trim offset

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover continuous objects from trim offset

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test marshal and unmarshal wal object header

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: fix tests

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover from discontinuous objects

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover from v0 and v1 objects

Signed-off-by: Ning Yu <ningyu@automq.com>

* style: fix lint

Signed-off-by: Ning Yu <ningyu@automq.com>

---------

Signed-off-by: Ning Yu <ningyu@automq.com>
Chillax-0v0 added a commit that referenced this pull request May 14, 2025
* chore: add todos

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor(s3stream/object-wal): sequentially succeed

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor(s3stream/object-wal): drop discontinuous objects during recovery

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: introduce `MockObjectStorage`

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test sequentially succeed

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor: record endOffset in the object path

Signed-off-by: Ning Yu <ningyu@automq.com>

* feat: different version of wal object header

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor: adapt to the new object header format

Signed-off-by: Ning Yu <ningyu@automq.com>

* feat: recover from the trim offset

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover continuous objects from trim offset

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test marshal and unmarshal wal object header

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: fix tests

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover from discontinuous objects

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover from v0 and v1 objects

Signed-off-by: Ning Yu <ningyu@automq.com>

* style: fix lint

Signed-off-by: Ning Yu <ningyu@automq.com>

---------

Signed-off-by: Ning Yu <ningyu@automq.com>
Chillax-0v0 added a commit that referenced this pull request May 14, 2025
* chore: add todos

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor(s3stream/object-wal): sequentially succeed

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor(s3stream/object-wal): drop discontinuous objects during recovery

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: introduce `MockObjectStorage`

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test sequentially succeed

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor: record endOffset in the object path

Signed-off-by: Ning Yu <ningyu@automq.com>

* feat: different version of wal object header

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor: adapt to the new object header format

Signed-off-by: Ning Yu <ningyu@automq.com>

* feat: recover from the trim offset

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover continuous objects from trim offset

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test marshal and unmarshal wal object header

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: fix tests

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover from discontinuous objects

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover from v0 and v1 objects

Signed-off-by: Ning Yu <ningyu@automq.com>

* style: fix lint

Signed-off-by: Ning Yu <ningyu@automq.com>

---------

Signed-off-by: Ning Yu <ningyu@automq.com>
Chillax-0v0 added a commit that referenced this pull request May 14, 2025
* chore: add todos

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor(s3stream/object-wal): sequentially succeed

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor(s3stream/object-wal): drop discontinuous objects during recovery

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: introduce `MockObjectStorage`

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test sequentially succeed

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor: record endOffset in the object path

Signed-off-by: Ning Yu <ningyu@automq.com>

* feat: different version of wal object header

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor: adapt to the new object header format

Signed-off-by: Ning Yu <ningyu@automq.com>

* feat: recover from the trim offset

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover continuous objects from trim offset

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test marshal and unmarshal wal object header

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: fix tests

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover from discontinuous objects

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover from v0 and v1 objects

Signed-off-by: Ning Yu <ningyu@automq.com>

* style: fix lint

Signed-off-by: Ning Yu <ningyu@automq.com>

---------

Signed-off-by: Ning Yu <ningyu@automq.com>
superhx pushed a commit that referenced this pull request May 15, 2025
refactor(s3stream/object-wal): complete appends sequentially (#2426)

* chore: add todos



* refactor(s3stream/object-wal): sequentially succeed



* refactor(s3stream/object-wal): drop discontinuous objects during recovery



* test: introduce `MockObjectStorage`



* test: test sequentially succeed



* refactor: record endOffset in the object path



* feat: different version of wal object header



* refactor: adapt to the new object header format



* feat: recover from the trim offset



* test: test recover continuous objects from trim offset



* test: test marshal and unmarshal wal object header



* test: fix tests



* test: test recover from discontinuous objects



* test: test recover from v0 and v1 objects



* style: fix lint



---------

Signed-off-by: Ning Yu <ningyu@automq.com>
superhx pushed a commit that referenced this pull request May 15, 2025
refactor(s3stream/object-wal): complete appends sequentially (#2426)

* chore: add todos



* refactor(s3stream/object-wal): sequentially succeed



* refactor(s3stream/object-wal): drop discontinuous objects during recovery



* test: introduce `MockObjectStorage`



* test: test sequentially succeed



* refactor: record endOffset in the object path



* feat: different version of wal object header



* refactor: adapt to the new object header format



* feat: recover from the trim offset



* test: test recover continuous objects from trim offset



* test: test marshal and unmarshal wal object header



* test: fix tests



* test: test recover from discontinuous objects



* test: test recover from v0 and v1 objects



* style: fix lint



---------

Signed-off-by: Ning Yu <ningyu@automq.com>
superhx pushed a commit that referenced this pull request May 15, 2025
refactor(s3stream/object-wal): complete appends sequentially (#2426)

* chore: add todos



* refactor(s3stream/object-wal): sequentially succeed



* refactor(s3stream/object-wal): drop discontinuous objects during recovery



* test: introduce `MockObjectStorage`



* test: test sequentially succeed



* refactor: record endOffset in the object path



* feat: different version of wal object header



* refactor: adapt to the new object header format



* feat: recover from the trim offset



* test: test recover continuous objects from trim offset



* test: test marshal and unmarshal wal object header



* test: fix tests



* test: test recover from discontinuous objects



* test: test recover from v0 and v1 objects



* style: fix lint



---------

Signed-off-by: Ning Yu <ningyu@automq.com>
superhx pushed a commit that referenced this pull request May 15, 2025
* refactor(s3stream/object-wal): complete appends sequentially (#2426)

* chore: add todos

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor(s3stream/object-wal): sequentially succeed

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor(s3stream/object-wal): drop discontinuous objects during recovery

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: introduce `MockObjectStorage`

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test sequentially succeed

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor: record endOffset in the object path

Signed-off-by: Ning Yu <ningyu@automq.com>

* feat: different version of wal object header

Signed-off-by: Ning Yu <ningyu@automq.com>

* refactor: adapt to the new object header format

Signed-off-by: Ning Yu <ningyu@automq.com>

* feat: recover from the trim offset

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover continuous objects from trim offset

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test marshal and unmarshal wal object header

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: fix tests

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover from discontinuous objects

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: test recover from v0 and v1 objects

Signed-off-by: Ning Yu <ningyu@automq.com>

* style: fix lint

Signed-off-by: Ning Yu <ningyu@automq.com>

---------

Signed-off-by: Ning Yu <ningyu@automq.com>

* test: fix tests

Signed-off-by: Ning Yu <ningyu@automq.com>

---------

Signed-off-by: Ning Yu <ningyu@automq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure Sequential Success in ObjectWALService
3 participants