We have this use case where there are about 500 policy records in a single zone. When we update a policy, the Zone.build_tree does the following:
adds a change batch for updating the tree
adds 500 updates to the batch, for each policy record, for making an alias between record and tree
We should improve the process so that it deals with this case.
create a batch which updates the tree, deletes the orphaned records and commit it
split the batch for making the alias to the policy record into multiple batches with 100 items. Also we should consider for updating only records which don't have the correct alias.
We have this use case where there are about 500 policy records in a single zone. When we update a policy, the
Zone.build_tree
does the following:We should improve the process so that it deals with this case.