WIP: ddns: failing updates silently skipped
This is a serious change in DDNS's behaviour with unapplicable updates. Please think of this before merging ;)
WIP: there is NO work-in-progress, the tag is just to prevent random merge temptation.
Before:
- some unapplicable updates were ignored (e.g. removing nonexistent)
- most unapplicable updates led to discarding whole DDNS query queue (e.g. out-of-zone addition, DNAME child, DNSSEC-protected records)
- proper (not really, see below) error code returned
- this is good in simpler cases where the user usually puts one query a time and can see the result
After:
- all unapplicable updates are silently ignored. DDNS always returns EOK (except for ENOMEM or so...) even if some (or even all) updates fail
- all (even partially) applicable queries are (partially) applied
- this fixes the case of busy-DDNS to not discard randomly some queries that are completely okay
- the ddns/basic test had to be simplified, not checking error codes and not employing rollback records, just SOA (un)change check remained
Additional thoughts:
- there is no way (except deep refactoring) how to return proper errcode per single query anyway. All the time there was just one errcode returned for whole query queue
- it would be nice if we could ignore whole queries with at least one unapplicable update, and apply just completely clean queries. However, this is not possible without shallow-copying zone contents for each query: there is no possibility of failed-partial-query rollback
- one alternative is to process queries optimisticly and fast, and do an expensive restart in case of each failed update. This would allow to return proper errcode and have everything nice - except the case of too many failing updates, causing performance disaster