Skip to content
Snippets Groups Projects
Commit 41e99b72 authored by Libor Peltan's avatar Libor Peltan
Browse files

ddns: failing updates silently skipped

This is a serious change in DDNS's behaviour with unapplicable updates.
Please think of this before merging ;)

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
parent 2a8bc9d6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment