summaryrefslogtreecommitdiff
path: root/designate/storage/impl_sqlalchemy/tables.py
diff options
context:
space:
mode:
authorErik Olof Gunnar Andersson <eandersson@blizzard.com>2023-01-21 18:13:31 -0800
committerErik Olof Gunnar Andersson <eandersson@blizzard.com>2023-04-04 03:48:34 +0000
commitfb9c2da977a36afc695b1e75a81aa85d8e56ef0a (patch)
treeaffaab8de5db9e4d7c5003769e8caa2c66fe18fe /designate/storage/impl_sqlalchemy/tables.py
parent0f6a837a23f218158e487f99219c4a63d80696cb (diff)
downloaddesignate-fb9c2da977a36afc695b1e75a81aa85d8e56ef0a.tar.gz
Move to a batch model for incrementing serial
This patch moves the responsibility of incrementing the serial on a zone from central to the producer. This also means that NOTIFY is triggered by the producer after the serial has been incremented. The advantage of this approach is that we can now batch requests which means less work for the DNS servers, and it removes the risk of race-conditions when updating the serial. Finally, the producer is sharded and is easy to scale which means that this approach should scale well with many zones. The disadvantage is that it may take up to 5 seconds longer for the DNS record to be updated on the DNS server. This can be lowered by increasing the frequency of the task that is responsible for incrementing the serial. Depends-On: https://review.opendev.org/#/c/871266/ Change-Id: I5e9733abaaa40c874e1d80d7b57e563df0f12cee
Diffstat (limited to 'designate/storage/impl_sqlalchemy/tables.py')
-rw-r--r--designate/storage/impl_sqlalchemy/tables.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/designate/storage/impl_sqlalchemy/tables.py b/designate/storage/impl_sqlalchemy/tables.py
index eacaf8d3..aa815ed9 100644
--- a/designate/storage/impl_sqlalchemy/tables.py
+++ b/designate/storage/impl_sqlalchemy/tables.py
@@ -139,6 +139,7 @@ zones = Table('zones', metadata,
Column('pool_id', UUID, default=None, nullable=True),
Column('reverse_name', String(255), nullable=False),
Column('delayed_notify', Boolean, default=False),
+ Column('increment_serial', Boolean, default=False),
UniqueConstraint('name', 'deleted', 'pool_id', name='unique_zone_name'),
ForeignKeyConstraint(['parent_zone_id'],