k3s-io / kine

Run Kubernetes on MySQL, Postgres, sqlite, dqlite, not etcd.
Apache License 2.0
1.64k stars 238 forks source link

[Help Wanted] Watch paused when encoutering a large gap of incremental id #82

Closed zqzten closed 3 years ago

zqzten commented 3 years ago

Currently we are using OceanBase as a MySQL flavored db backend of kine, this db is able to act almost the same as MySQL except one key difference: it cannot promise that the incremental id would be incremented with step 1. For example, in normal cases, the id colomn of table kine will be 1->2->3->... as inserting, but when OB switches its master (may happen several times a day), the next id will be a million number, resulting the id colomn to be 1->2->1000001->1000002->..., and this will cause kine ending up to insert numerious gaps and pause the whole watch.

So here's my questions:

  1. In normal cases, which situation will lead to a MODREVISION GAP?
  2. What's the purpose of filling gaps (as it will soon be deleted by compact)?
  3. In the case above, is there a way to avoid watch pause?
zqzten commented 3 years ago

friendly ping @ibuildthecloud, any idea on this?

brandond commented 3 years ago

I believe this is a duplicate of https://github.com/k3s-io/kine/issues/71#issuecomment-754115854

zqzten commented 3 years ago

Solved by removing the FILL logic, see #71 (comment)