)]}'
{"doc/source/specs/distributed_lock.rst":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"4766069a0843c1ace2f640d2fba03486a1779a0d","unresolved":false,"context_lines":[{"line_number":8,"context_line":"Currently Dragonflow relies on Neutron database for the implemention"},{"line_number":9,"context_line":"of distributed locks to protect the Northbound DB CUD operations."},{"line_number":10,"context_line":"In order to run Dragonflow independently from Neutron (use-cases:"},{"line_number":11,"context_line":"direct Kuryr support or running with Dragonflow independent api)"},{"line_number":12,"context_line":"a distributed locking mechanism that does not rely on Neutron DB"},{"line_number":13,"context_line":"should be present."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f96bb07_4b9dd164","line":11,"range":{"start_line":11,"start_character":48,"end_line":11,"end_character":63},"updated":"2018-01-21 12:12:03.000000000","message":"stand-alone","commit_id":"6edd9448c2aab70dada1291022852e024a759b33"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"036b31a513daff4ee9a318214d1be4e39d2ba9ec","unresolved":false,"context_lines":[{"line_number":21,"context_line":"is better, a full spec should be provided"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Option 1 - add \"lock\" and \"unlock\" operations to db-api"},{"line_number":25,"context_line":"-------------------------------------------------------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"2 function will be added to db-api:"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f96bb07_3035e28f","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":55},"updated":"2018-01-16 13:29:18.000000000","message":"+1\n\nI prefer this way. We can maybe provide an implementation a la option 3 for databases that don\u0027t support distributed lock out of the box.","commit_id":"6edd9448c2aab70dada1291022852e024a759b33"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"17aa32392d03704d0ec8097889110abb00ae16b0","unresolved":false,"context_lines":[{"line_number":21,"context_line":"is better, a full spec should be provided"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Option 1 - add \"lock\" and \"unlock\" operations to db-api"},{"line_number":25,"context_line":"-------------------------------------------------------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"2 function will be added to db-api:"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f96bb07_146c05cc","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":55},"in_reply_to":"7f96bb07_3035e28f","updated":"2018-01-18 15:26:13.000000000","message":"+1","commit_id":"6edd9448c2aab70dada1291022852e024a759b33"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"4766069a0843c1ace2f640d2fba03486a1779a0d","unresolved":false,"context_lines":[{"line_number":39,"context_line":"for rethinkDB)."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Pros:"},{"line_number":42,"context_line":"  * Native implantation for redis, etcd and zookeeper."},{"line_number":43,"context_line":"  * Reuse the northbound DB to create the lock"},{"line_number":44,"context_line":"Cons:"},{"line_number":45,"context_line":"  * cassandra/rethinkDB/ramcloud  - Non-native implantation, it will be hard to"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f96bb07_eb87fd0e","line":42,"range":{"start_line":42,"start_character":11,"end_line":42,"end_character":23},"updated":"2018-01-21 12:12:03.000000000","message":"implementation?","commit_id":"6edd9448c2aab70dada1291022852e024a759b33"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"036b31a513daff4ee9a318214d1be4e39d2ba9ec","unresolved":false,"context_lines":[{"line_number":45,"context_line":"  * cassandra/rethinkDB/ramcloud  - Non-native implantation, it will be hard to"},{"line_number":46,"context_line":"    implement, and it increases the chances for bugs."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Option 2 - use dedicated db for locks"},{"line_number":49,"context_line":"-------------------------------------"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Create a software module that uses a dedicated DB for managing the locks."}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f96bb07_f080da48","line":48,"range":{"start_line":48,"start_character":0,"end_line":48,"end_character":37},"updated":"2018-01-16 13:29:18.000000000","message":"-1\n\nAnother DB in the system is, in my opinion, too much overhead and adds unnecessary complications.","commit_id":"6edd9448c2aab70dada1291022852e024a759b33"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"786e1da672f69ca12d90973059f922d5f7d74d08","unresolved":false,"context_lines":[{"line_number":45,"context_line":"  * cassandra/rethinkDB/ramcloud  - Non-native implantation, it will be hard to"},{"line_number":46,"context_line":"    implement, and it increases the chances for bugs."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Option 2 - use dedicated db for locks"},{"line_number":49,"context_line":"-------------------------------------"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Create a software module that uses a dedicated DB for managing the locks."}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f96bb07_ae6d1ccd","line":48,"range":{"start_line":48,"start_character":25,"end_line":48,"end_character":27},"updated":"2018-01-16 09:03:47.000000000","message":"DB","commit_id":"6edd9448c2aab70dada1291022852e024a759b33"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"786e1da672f69ca12d90973059f922d5f7d74d08","unresolved":false,"context_lines":[{"line_number":45,"context_line":"  * cassandra/rethinkDB/ramcloud  - Non-native implantation, it will be hard to"},{"line_number":46,"context_line":"    implement, and it increases the chances for bugs."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Option 2 - use dedicated db for locks"},{"line_number":49,"context_line":"-------------------------------------"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Create a software module that uses a dedicated DB for managing the locks."}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f96bb07_4e457842","line":48,"range":{"start_line":48,"start_character":0,"end_line":48,"end_character":37},"updated":"2018-01-16 09:03:47.000000000","message":"If we say that in the OpenStack use-case we will use the Neutron DB as the DB for locks, it is my preferred option, as it does not change the current logic, and will require some DB for the new scenarios. That DB should be configurable to allow reuse of any DB that is present in the specific environment.","commit_id":"6edd9448c2aab70dada1291022852e024a759b33"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"4766069a0843c1ace2f640d2fba03486a1779a0d","unresolved":false,"context_lines":[{"line_number":45,"context_line":"  * cassandra/rethinkDB/ramcloud  - Non-native implantation, it will be hard to"},{"line_number":46,"context_line":"    implement, and it increases the chances for bugs."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Option 2 - use dedicated db for locks"},{"line_number":49,"context_line":"-------------------------------------"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Create a software module that uses a dedicated DB for managing the locks."}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f96bb07_ab79f52f","line":48,"range":{"start_line":48,"start_character":0,"end_line":48,"end_character":37},"in_reply_to":"7f96bb07_f080da48","updated":"2018-01-21 12:12:03.000000000","message":"There can be a compromise option for the DB  that does not have its own support. So etcd for example can be used for them while it serves the solution for etcd DB in alternative 1.","commit_id":"6edd9448c2aab70dada1291022852e024a759b33"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"036b31a513daff4ee9a318214d1be4e39d2ba9ec","unresolved":false,"context_lines":[{"line_number":62,"context_line":"  * Yet another DB in the system."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"Option 3 - run a lock logic without a DB"},{"line_number":66,"context_line":"----------------------------------------"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"There are many distributed locks algorithms, for example :"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f96bb07_50198e1f","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":40},"updated":"2018-01-16 13:29:18.000000000","message":"0. Not opposed, but prefer option 1, since I think it is simpler.","commit_id":"6edd9448c2aab70dada1291022852e024a759b33"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"786e1da672f69ca12d90973059f922d5f7d74d08","unresolved":false,"context_lines":[{"line_number":62,"context_line":"  * Yet another DB in the system."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"Option 3 - run a lock logic without a DB"},{"line_number":66,"context_line":"----------------------------------------"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"There are many distributed locks algorithms, for example :"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f96bb07_0e8bf06d","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":40},"updated":"2018-01-16 09:03:47.000000000","message":"In case we do not continue to use the Neutron as the sync DB, and create some standard mechanism for all install types, I prefer this solution as it is self-contained, and does not require installation of additional components.","commit_id":"6edd9448c2aab70dada1291022852e024a759b33"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"17aa32392d03704d0ec8097889110abb00ae16b0","unresolved":false,"context_lines":[{"line_number":62,"context_line":"  * Yet another DB in the system."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"Option 3 - run a lock logic without a DB"},{"line_number":66,"context_line":"----------------------------------------"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"There are many distributed locks algorithms, for example :"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f96bb07_54ca8da0","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":40},"in_reply_to":"7f96bb07_50198e1f","updated":"2018-01-18 15:26:13.000000000","message":"This is also an interesting option. How will it work with redis/etcd pubsub?\nWill it be external service, or will it run within the controller?\nHow will it use ZMQ?","commit_id":"6edd9448c2aab70dada1291022852e024a759b33"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"c51d58231a18680512af6d12b50d1b15c925824d","unresolved":false,"context_lines":[{"line_number":62,"context_line":"  * Yet another DB in the system."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"Option 3 - run a lock logic without a DB"},{"line_number":66,"context_line":"----------------------------------------"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"There are many distributed locks algorithms, for example :"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f96bb07_3c2c3498","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":40},"in_reply_to":"7f96bb07_54ca8da0","updated":"2018-01-22 17:06:59.000000000","message":"-1 on that option - \n\nafter reading little bit about the distributed locks , it\u0027s not a kindergraden  to implement these locks alogrithems, i think that it\u0027s will cost us a lot of time and bugs . \n\nMost of software that used distributed uses distributed  db\u0027s in the back-end. \n\nI think that is better to relay on system that already implemented that.","commit_id":"6edd9448c2aab70dada1291022852e024a759b33"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"4766069a0843c1ace2f640d2fba03486a1779a0d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"  * Hard to impalement with many corner-cases and potential bugs."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f96bb07_2b93a551","line":80,"updated":"2018-01-21 12:12:03.000000000","message":"I think we should consider to have pluggable DB lock module, so given any NB DB choice the best lock option can be used. For the DBs that have the dist. lock support, the native lock  seems to be the best option. For the rest, thee can be one reference implementation provided by Dragonflow, while allowing easy addition of out of the tree lock.","commit_id":"6edd9448c2aab70dada1291022852e024a759b33"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"c51d58231a18680512af6d12b50d1b15c925824d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"  * Hard to impalement with many corner-cases and potential bugs."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f96bb07_bcaa84cf","line":80,"in_reply_to":"7f96bb07_2b93a551","updated":"2018-01-22 17:06:59.000000000","message":"+1 on that. \nNeed to take in account that the native lock will not be available on standalone-api ,and in kuryr-df drivers. \n\nI will add this option to the spec.","commit_id":"6edd9448c2aab70dada1291022852e024a759b33"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cbb0d9e5936393b6a844ba7691eb5d81b4a027a2","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                if the lock isn\u0027t free an exception will"},{"line_number":42,"context_line":"                be raised"},{"line_number":43,"context_line":"  \"\"\""},{"line_number":44,"context_line":"  def lock(object_id, block\u003dTrue):"},{"line_number":45,"context_line":"    pass"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"  \"\"\"Release the lock for object"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_2b10fe58","line":44,"range":{"start_line":44,"start_character":22,"end_line":44,"end_character":27},"updated":"2018-02-22 06:53:46.000000000","message":"If block \u003d\u003d False, how does the caller know lock failed?\n\nIf block \u003d\u003d True, do we want a timeout param?","commit_id":"92d6fb1bd32d9de9da9f6290221ca8cbe84e9bf8"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"9e2bce79ae1b5247db470427cbc4aac795457d9a","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                if the lock isn\u0027t free an exception will"},{"line_number":42,"context_line":"                be raised"},{"line_number":43,"context_line":"  \"\"\""},{"line_number":44,"context_line":"  def lock(object_id, block\u003dTrue):"},{"line_number":45,"context_line":"    pass"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"  \"\"\"Release the lock for object"}],"source_content_type":"text/x-rst","patch_set":3,"id":"df7087c5_ac928e4a","line":44,"range":{"start_line":44,"start_character":22,"end_line":44,"end_character":27},"in_reply_to":"3fa0c359_2b10fe58","updated":"2018-03-18 10:12:36.000000000","message":"Omer: I believe the caller will get the exception if the lock failed.\n+1 for the timeout - maybe throw the same exception on timeout","commit_id":"92d6fb1bd32d9de9da9f6290221ca8cbe84e9bf8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cbb0d9e5936393b6a844ba7691eb5d81b4a027a2","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"In the first stage the current DB-lock logic should be implemented as"},{"line_number":59,"context_line":"a driver. In addition drivers that implements locks by redis [1]_,"},{"line_number":60,"context_line":"etcd [2]_ and zookeeper [3]_ could be easy to implement as those dbs"},{"line_number":61,"context_line":"have a builtin support for distributed-locks , and it\u0027s"},{"line_number":62,"context_line":"could be nice if deployment\u0027s that uses those databases as their northbound"},{"line_number":63,"context_line":"DB could use the same database for the distributed lock."}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_0b22e2b9","line":60,"range":{"start_line":60,"start_character":5,"end_line":60,"end_character":8},"updated":"2018-02-22 06:53:46.000000000","message":"The link order is wrong. etcd is 1, redis is 2.","commit_id":"92d6fb1bd32d9de9da9f6290221ca8cbe84e9bf8"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"9e2bce79ae1b5247db470427cbc4aac795457d9a","unresolved":false,"context_lines":[{"line_number":59,"context_line":"a driver. In addition drivers that implements locks by redis [1]_,"},{"line_number":60,"context_line":"etcd [2]_ and zookeeper [3]_ could be easy to implement as those dbs"},{"line_number":61,"context_line":"have a builtin support for distributed-locks , and it\u0027s"},{"line_number":62,"context_line":"could be nice if deployment\u0027s that uses those databases as their northbound"},{"line_number":63,"context_line":"DB could use the same database for the distributed lock."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":".. [#] https://github.com/coreos/etcd/blob/master/Documentation/dev-guide/api_concurrency_reference_v3.md#service-lock-etcdserverapiv3lockv3lockpbv3lockproto"}],"source_content_type":"text/x-rst","patch_set":3,"id":"df7087c5_6c9c765d","line":62,"range":{"start_line":62,"start_character":17,"end_line":62,"end_character":29},"updated":"2018-03-18 10:12:36.000000000","message":"deployments","commit_id":"92d6fb1bd32d9de9da9f6290221ca8cbe84e9bf8"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"9e2bce79ae1b5247db470427cbc4aac795457d9a","unresolved":false,"context_lines":[{"line_number":58,"context_line":"In the first stage the current DB-lock logic should be implemented as"},{"line_number":59,"context_line":"a driver. In addition drivers that implements locks by redis [1]_,"},{"line_number":60,"context_line":"etcd [2]_ and zookeeper [3]_ could be easy to implement as those dbs"},{"line_number":61,"context_line":"have a builtin support for distributed-locks , and it\u0027s"},{"line_number":62,"context_line":"could be nice if deployment\u0027s that uses those databases as their northbound"},{"line_number":63,"context_line":"DB could use the same database for the distributed lock."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":".. [#] https://github.com/coreos/etcd/blob/master/Documentation/dev-guide/api_concurrency_reference_v3.md#service-lock-etcdserverapiv3lockv3lockpbv3lockproto"}],"source_content_type":"text/x-rst","patch_set":3,"id":"df7087c5_4c97323c","line":62,"range":{"start_line":61,"start_character":51,"end_line":62,"end_character":5},"updated":"2018-03-18 10:12:36.000000000","message":"it would be preferrable","commit_id":"92d6fb1bd32d9de9da9f6290221ca8cbe84e9bf8"}]}
