mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-11-26 12:44:10 +00:00
* fix(datanode): keep remote dynamic filter registrations that race with query state removal A region could register its remote dynamic filters into a per-query state that a concurrent removal had just dropped from the registry while it was empty. The registration returned its filter ids, but the lookup at plan time found nothing for the query, so the region scanned without the dynamic filter. Registration now checks, after releasing the per-query lock, that the registry still holds the state it registered into, and registers again otherwise. The registry entry gauge follows the lifetime of RegisteredDynFilter, so entries written into a discarded state are counted out when it drops. Signed-off-by: jeremyhi <fengjiachun@gmail.com> * test(datanode): require the race test to remove the query state Signed-off-by: jeremyhi <fengjiachun@gmail.com> * docs(datanode): state why the registration check follows the query lock Signed-off-by: jeremyhi <fengjiachun@gmail.com> * docs(datanode): drop a doc line that restates is_current_query Signed-off-by: jeremyhi <fengjiachun@gmail.com> * docs(datanode): describe the remote dynamic filter gauge as live registrations Signed-off-by: jeremyhi <fengjiachun@gmail.com> * test(datanode): give each racing region its own remote dynamic filter A shared filter id let another region's live registration satisfy the lookup, so a lost registration failed the test only by chance. Also note why the deterministic race test removes the query state directly. Signed-off-by: jeremyhi <fengjiachun@gmail.com> --------- Signed-off-by: jeremyhi <fengjiachun@gmail.com>