-
-
Notifications
You must be signed in to change notification settings - Fork 1
rekalogika:analytics:refresh doesn't delete the full partition #646
Description
Hey @priyadi! Finally I can work more on testing your bundle.
It seems like entity deletion doesn't delete the full partition. When I delete a record the following record is written to rekalogika_summary_dirty:
| id | created | class | level | key |
|---|---|---|---|---|
| 12640 | 2025-11-04 10:40:37 | App\Entity\TestSummary20251103 | 22 | 1761230192640 |
When I now run bin/console rekalogika:analytics:refresh App\Entity\TestSummary20251103 it uses the following query to clean up the summary table:
DELETE FROM app_test_summary_20251103 WHERE partition_key >= ? AND partition_key < ? AND partition_level = ?
Params are 1761230192640, 1761234386944, 22.
But the app_test_summary_20251103 table has the follwowing entries:

As you can see there line 1-12 have partition_level 22, but line 13+14 have partition_level 27. So after the query (transaction) is finished, there are 2 rows left.
So when I now look at my summary, the total count didn't change. I expect it to decrement by X after deleting X source entities.
Can I provide you with any more information? Or do you already have an idea what it could be related to?