Skip to content
New issue

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

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

Already on GitHub? # to your account

Drainer's memory usage exponentially increases when filtering too many DELETE events, leading to OOM #1317

Open
kennytm opened this issue Aug 27, 2024 · 2 comments

Comments

@kennytm
Copy link
Contributor

kennytm commented Aug 27, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.

    TiDB -> Pump -> Drainer -> MySQL

    1. On upstream, DELETE many rows only in every transaction, repeat for many times
    2. On drainer, use the binlog-filter-rule to filter out all DELETE events, so nothing will be replicated.
  2. What did you expect to see?

    • Synchronize normally.
  3. What did you see instead?

    • The memory usage of drainer grows exponentially and eventually triggered kernel OOM.
  4. Please provide the relate downstream type and version of drainer.
    (run drainer -V in terminal to get drainer's version)

    • Both Drainer v5.4.1 and Drainer v6.5.3.
@kennytm
Copy link
Contributor Author

kennytm commented Aug 27, 2024

Config:

[syncer.binlog-filter-rule]
[syncer.binlog-filter-rule.rule1]
ignore-event = ["delete"]

[[syncer.table-migrate-rule]]
binlog-filter-rule = ["rule1"]
source = { schema = "db", table = "tbl1" }

[[syncer.table-migrate-rule]]
binlog-filter-rule = ["rule1"]
source = { schema = "db", table = "tbl2" }

...

@kennytm
Copy link
Contributor Author

kennytm commented Aug 27, 2024

Heap profile (DM me if you need the actual pprof file)
m1KBMf6WLL

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant