You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/05/15 01:53:27 UTC

[GitHub] [incubator-druid] jon-wei commented on issue #7661: Fix compareAndSwap() in SQLMetadataConnector

jon-wei commented on issue #7661: Fix compareAndSwap() in SQLMetadataConnector
URL: https://github.com/apache/incubator-druid/pull/7661#issuecomment-492473666
 
 
   Marking this WIP, while testing just found that Postgres has somewhat different behavior from Derby/MySQL:
   
   https://www.postgresql.org/docs/10/transaction-iso.html#XACT-REPEATABLE-READ
   
   > ...if the first updater commits (and actually updated or deleted the row, not just locked it) then the repeatable read transaction will be rolled back with the message `ERROR:  could not serialize access due to concurrent update` because a repeatable read transaction cannot modify or lock rows changed by other transactions after the repeatable read transaction began. When an application receives this error message, it should abort the current transaction and retry the whole transaction from the beginning.
   
   So I'll need to add retries for that case for postgres
   
   > Do we need similar changes in IndexerSQLMetadataStorageCoordinator's announceHistoricalSegments method? There's a similar kind of CAS going on there.
   
   I'll take a look at that, thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org