Open stcheng opened 7 years ago
What if by mistake table will never be created? Need to check whether consumer logic isn't broken if some doTask() will leave a record in consumer.m_toSync. Are there any cases in other daemons we skip erasing some entries from consumer.m_toSync?
yes. there any many examples that some tasks are not erased but waiting for dependencies. this fix is added because different tables are processed independently without guaranteeing the orders across different tables. it is possible that rules are processed before tables are processed and rules will be lost.
later callback logics will be added to replace the current retry logic.
I don't think that from the user perspective and rule should be created before it creates the table. table should be first created and only then rules should be added. this also goes on the delete flow. you should delete a table only if all the rules associated to it will be removed first.
Let us first do the quick fix and then have a further discussion on what is the best way to resolve the above scenario.
In
aclorch.cpp
line 1014, it checks thetable_oid
. When table is not yet create, we cannot get thetable_oid
and we need to wait for the table to be created instead of dropping this task away.