if you are using mysql replication to replicate data across data centres and using statement replication then dont use the DEFAULT and on UPDATE fields
last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
We recently did a simple RING replication across 3 datacentres to manage our user account identities and ran into this issue. Due to this when the same statement is applied on other data centre the timestamp column gets a different value. For now we would remove this and generate the time from Java so that we can use do a hash based consistency checker on replicated rows.
last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
We recently did a simple RING replication across 3 datacentres to manage our user account identities and ran into this issue. Due to this when the same statement is applied on other data centre the timestamp column gets a different value. For now we would remove this and generate the time from Java so that we can use do a hash based consistency checker on replicated rows.
Comments
Post a Comment