)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1004864,"name":"Navdeep S Boparai","email":"navdeep.boparai@couchbase.com","username":"boparai11","avatars":[{"url":"https://www.gravatar.com/avatar/252f618cf58ad1e3520667e948f516af.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/252f618cf58ad1e3520667e948f516af.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/252f618cf58ad1e3520667e948f516af.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/252f618cf58ad1e3520667e948f516af.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"0328d7d78534f6297d9e2fcfed768aa98609e989","unresolved":true,"context_lines":[{"line_number":22,"context_line":"create_bucket."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change #2:"},{"line_number":25,"context_line":"Threat not_found in set_active_key as ok, but only when ns_memcached"},{"line_number":26,"context_line":"process doesn\u0027t exist before set_active_key attempt."},{"line_number":27,"context_line":"This is important in order to avoid races when set_active_key and"},{"line_number":28,"context_line":"create_bucket are called in parallel. Basically the following scenario:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"2518aaef_2729f9a9","line":25,"updated":"2025-02-24 21:10:55.000000000","message":"typo","commit_id":"36edea29b3a28a6788b50d10dfa4973338ba4256"},{"author":{"_account_id":1004257,"name":"Timofey Barmin","email":"timofey.barmin@couchbase.com","username":"timofey-barmin","avatars":[{"url":"https://www.gravatar.com/avatar/f3d67f253451b9d3d488bd28a7020b53.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/f3d67f253451b9d3d488bd28a7020b53.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/f3d67f253451b9d3d488bd28a7020b53.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/f3d67f253451b9d3d488bd28a7020b53.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"05ef1c15f367469ddbf3ac8cc079953937ba0a4e","unresolved":false,"context_lines":[{"line_number":22,"context_line":"create_bucket."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change #2:"},{"line_number":25,"context_line":"Threat not_found in set_active_key as ok, but only when ns_memcached"},{"line_number":26,"context_line":"process doesn\u0027t exist before set_active_key attempt."},{"line_number":27,"context_line":"This is important in order to avoid races when set_active_key and"},{"line_number":28,"context_line":"create_bucket are called in parallel. Basically the following scenario:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3e1bc657_f1e874e7","line":25,"in_reply_to":"2518aaef_2729f9a9","updated":"2025-02-25 18:12:16.000000000","message":"Done","commit_id":"36edea29b3a28a6788b50d10dfa4973338ba4256"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1004257,"name":"Timofey Barmin","email":"timofey.barmin@couchbase.com","username":"timofey-barmin","avatars":[{"url":"https://www.gravatar.com/avatar/f3d67f253451b9d3d488bd28a7020b53.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/f3d67f253451b9d3d488bd28a7020b53.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/f3d67f253451b9d3d488bd28a7020b53.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/f3d67f253451b9d3d488bd28a7020b53.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"a445fb814d1f356b0405cbaf8b8396a89d84591b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"e17dde06_2b95820e","updated":"2025-02-19 22:17:05.000000000","message":"make ns-test\nmake cluster-test","commit_id":"92aad500642d07584fa46b7a2c6cdf9ab1ef3daf"}],"apps/ns_server/src/ns_memcached.erl":[{"author":{"_account_id":1004864,"name":"Navdeep S Boparai","email":"navdeep.boparai@couchbase.com","username":"boparai11","avatars":[{"url":"https://www.gravatar.com/avatar/252f618cf58ad1e3520667e948f516af.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/252f618cf58ad1e3520667e948f516af.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/252f618cf58ad1e3520667e948f516af.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/252f618cf58ad1e3520667e948f516af.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"0328d7d78534f6297d9e2fcfed768aa98609e989","unresolved":true,"context_lines":[{"line_number":1887,"context_line":"set_active_dek_for_bucket(Bucket, _ActiveDek) -\u003e"},{"line_number":1888,"context_line":"    {ok, DeksSnapshot} \u003d cb_crypto:fetch_deks_snapshot({bucketDek, Bucket}),"},{"line_number":1889,"context_line":"    NsMemcachedExists \u003d (whereis(server(Bucket)) \u003d/\u003d undefined),"},{"line_number":1890,"context_line":"    case set_active_dek(Bucket, DeksSnapshot) of"},{"line_number":1891,"context_line":"        ok -\u003e ok;"},{"line_number":1892,"context_line":"        {error, not_found} -\u003e %% bucket does not exist"},{"line_number":1893,"context_line":"            case NsMemcachedExists of"}],"source_content_type":"text/x-erlang","patch_set":5,"id":"660757e7_a6a8b968","line":1890,"range":{"start_line":1890,"start_character":9,"end_line":1890,"end_character":23},"updated":"2025-02-24 21:10:55.000000000","message":"Seems if ns_memcached doesn\u0027t exist then either the bucket doesn\u0027t need to be created) or it will be created with the latest keys when it starts, so don\u0027t see why set_active_dek needs to be called at all if NsMemcachedExists is false. Can it just skip calling set_active_dek in that case?","commit_id":"36edea29b3a28a6788b50d10dfa4973338ba4256"},{"author":{"_account_id":1004864,"name":"Navdeep S Boparai","email":"navdeep.boparai@couchbase.com","username":"boparai11","avatars":[{"url":"https://www.gravatar.com/avatar/252f618cf58ad1e3520667e948f516af.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/252f618cf58ad1e3520667e948f516af.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/252f618cf58ad1e3520667e948f516af.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/252f618cf58ad1e3520667e948f516af.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"b393fdc2b453291134b7ea7f1ffaf8ef8d043ced","unresolved":false,"context_lines":[{"line_number":1887,"context_line":"set_active_dek_for_bucket(Bucket, _ActiveDek) -\u003e"},{"line_number":1888,"context_line":"    {ok, DeksSnapshot} \u003d cb_crypto:fetch_deks_snapshot({bucketDek, Bucket}),"},{"line_number":1889,"context_line":"    NsMemcachedExists \u003d (whereis(server(Bucket)) \u003d/\u003d undefined),"},{"line_number":1890,"context_line":"    case set_active_dek(Bucket, DeksSnapshot) of"},{"line_number":1891,"context_line":"        ok -\u003e ok;"},{"line_number":1892,"context_line":"        {error, not_found} -\u003e %% bucket does not exist"},{"line_number":1893,"context_line":"            case NsMemcachedExists of"}],"source_content_type":"text/x-erlang","patch_set":5,"id":"fdfe8e13_7fc83f97","line":1890,"range":{"start_line":1890,"start_character":9,"end_line":1890,"end_character":23},"in_reply_to":"4bc39af0_f0d8d33a","updated":"2025-02-26 02:27:42.000000000","message":"Makes sense, thanks!","commit_id":"36edea29b3a28a6788b50d10dfa4973338ba4256"},{"author":{"_account_id":1004257,"name":"Timofey Barmin","email":"timofey.barmin@couchbase.com","username":"timofey-barmin","avatars":[{"url":"https://www.gravatar.com/avatar/f3d67f253451b9d3d488bd28a7020b53.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/f3d67f253451b9d3d488bd28a7020b53.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/f3d67f253451b9d3d488bd28a7020b53.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/f3d67f253451b9d3d488bd28a7020b53.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"05ef1c15f367469ddbf3ac8cc079953937ba0a4e","unresolved":true,"context_lines":[{"line_number":1887,"context_line":"set_active_dek_for_bucket(Bucket, _ActiveDek) -\u003e"},{"line_number":1888,"context_line":"    {ok, DeksSnapshot} \u003d cb_crypto:fetch_deks_snapshot({bucketDek, Bucket}),"},{"line_number":1889,"context_line":"    NsMemcachedExists \u003d (whereis(server(Bucket)) \u003d/\u003d undefined),"},{"line_number":1890,"context_line":"    case set_active_dek(Bucket, DeksSnapshot) of"},{"line_number":1891,"context_line":"        ok -\u003e ok;"},{"line_number":1892,"context_line":"        {error, not_found} -\u003e %% bucket does not exist"},{"line_number":1893,"context_line":"            case NsMemcachedExists of"}],"source_content_type":"text/x-erlang","patch_set":5,"id":"4bc39af0_f0d8d33a","line":1890,"range":{"start_line":1890,"start_character":9,"end_line":1890,"end_character":23},"in_reply_to":"660757e7_a6a8b968","updated":"2025-02-25 18:12:16.000000000","message":"I think it is important to go to memcached and check that the bucket actually doesn\u0027t exist.\nIf I understand it correctly, the fact that ns_memcached doesn\u0027t exist doesn\u0027t necessarily mean that bucket doesn\u0027t exist in memcached (in other words it is not guaranteed that create_bucket will be called).\nIn do_ensure_bucket we call create_bucket only if select_and_ensure_bucket returns enoent.","commit_id":"36edea29b3a28a6788b50d10dfa4973338ba4256"}]}
