)]}'
{"src/dcp/consumer.cc":[{"author":{"_account_id":1000097,"name":"Chiyoung Seo","email":"chiyoung@northscale.com","username":"chiyoung","avatars":[{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"8a342666e5aaf8c428f2e8305bdc4cada4410e14","unresolved":false,"context_lines":[{"line_number":36,"context_line":"public:"},{"line_number":37,"context_line":"    Processer(EventuallyPersistentEngine* e, connection_t c,"},{"line_number":38,"context_line":"                const Priority \u0026p, double sleeptime \u003d 1,"},{"line_number":39,"context_line":"                bool completeBeforeShutdown \u003d true)"},{"line_number":40,"context_line":"        : GlobalTask(e, p, sleeptime, completeBeforeShutdown), conn(c) {}"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    bool run();"}],"source_content_type":"text/x-c","patch_set":4,"id":"3dc0e167_40ee82e9","line":39,"updated":"2015-10-23 05:14:19.000000000","message":"passing \u0027true\u0027 can make a force shutdown (very) slow. Note that a force shutdown option is given by the ns-server at runtime.","commit_id":"61d4c24c0e51211e3e541738e1354f01cf24612c"},{"author":{"_account_id":1000338,"name":"Abhi Dangeti","email":"abhinav@couchbase.com","username":"abhinavdangeti","avatars":[{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"8301f0da9d79bb4a34b11246057e5d29169666e8","unresolved":false,"context_lines":[{"line_number":36,"context_line":"public:"},{"line_number":37,"context_line":"    Processer(EventuallyPersistentEngine* e, connection_t c,"},{"line_number":38,"context_line":"                const Priority \u0026p, double sleeptime \u003d 1,"},{"line_number":39,"context_line":"                bool completeBeforeShutdown \u003d true)"},{"line_number":40,"context_line":"        : GlobalTask(e, p, sleeptime, completeBeforeShutdown), conn(c) {}"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    bool run();"}],"source_content_type":"text/x-c","patch_set":4,"id":"3dc0e167_009aca58","line":39,"in_reply_to":"3dc0e167_40ee82e9","updated":"2015-10-23 15:16:14.000000000","message":"A force shutdown will always by-pass the completeBeforeShutdown flag for any task.\n\nSee http://src.couchbase.org/source/xref/watson/ep-engine/src/executorpool.cc#565","commit_id":"61d4c24c0e51211e3e541738e1354f01cf24612c"}],"src/dcp/stream.cc":[{"author":{"_account_id":1000097,"name":"Chiyoung Seo","email":"chiyoung@northscale.com","username":"chiyoung","avatars":[{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"8a342666e5aaf8c428f2e8305bdc4cada4410e14","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"     */"},{"line_number":1027,"context_line":"    uint32_t totalBytes \u003d 0;"},{"line_number":1028,"context_line":"    process_items_error_t process_ret \u003d cannot_process;"},{"line_number":1029,"context_line":"    if (!engine-\u003egetEpStats().forceShutdown) {"},{"line_number":1030,"context_line":"        uint32_t bytes_processed;"},{"line_number":1031,"context_line":"        do {"},{"line_number":1032,"context_line":"            bytes_processed \u003d 0;"}],"source_content_type":"text/x-c","patch_set":4,"id":"3dc0e167_0019aa3b","side":"PARENT","line":1029,"updated":"2015-10-23 05:14:19.000000000","message":"As I mentioned, \u0027forceShutdown\u0027 flag will be set depending on soft or force shutdown. We should determine whether all the buffered items should be processed or not depending on this flag value.","commit_id":"13d4f9072f169d07835f82cc030c6aba70a7305c"},{"author":{"_account_id":1000338,"name":"Abhi Dangeti","email":"abhinav@couchbase.com","username":"abhinavdangeti","avatars":[{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"8301f0da9d79bb4a34b11246057e5d29169666e8","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"     */"},{"line_number":1027,"context_line":"    uint32_t totalBytes \u003d 0;"},{"line_number":1028,"context_line":"    process_items_error_t process_ret \u003d cannot_process;"},{"line_number":1029,"context_line":"    if (!engine-\u003egetEpStats().forceShutdown) {"},{"line_number":1030,"context_line":"        uint32_t bytes_processed;"},{"line_number":1031,"context_line":"        do {"},{"line_number":1032,"context_line":"            bytes_processed \u003d 0;"}],"source_content_type":"text/x-c","patch_set":4,"id":"3dc0e167_e09eb64a","side":"PARENT","line":1029,"in_reply_to":"3dc0e167_0019aa3b","updated":"2015-10-23 15:16:14.000000000","message":"Yes Chiyoung, so in case of a soft shutdown, the processer task is made to complete before shutdown, but in case of force shutdown, the task will be cancelled immediately.","commit_id":"13d4f9072f169d07835f82cc030c6aba70a7305c"},{"author":{"_account_id":1000097,"name":"Chiyoung Seo","email":"chiyoung@northscale.com","username":"chiyoung","avatars":[{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"8a342666e5aaf8c428f2e8305bdc4cada4410e14","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"}"},{"line_number":1484,"context_line":""},{"line_number":1485,"context_line":"uint32_t PassiveStream::clearBuffer() {"},{"line_number":1486,"context_line":"    LockHolder lh(buffer.bufMutex);"},{"line_number":1487,"context_line":"    uint32_t unackedBytes \u003d buffer.bytes;"},{"line_number":1488,"context_line":""},{"line_number":1489,"context_line":"    while (!buffer.messages.empty()) {"}],"source_content_type":"text/x-c","patch_set":4,"id":"3dc0e167_e01d9627","side":"PARENT","line":1486,"updated":"2015-10-23 05:14:19.000000000","message":"Why do we need to remove this lock? It seems to me that this is not related to the issue to be fixed by this commit.","commit_id":"13d4f9072f169d07835f82cc030c6aba70a7305c"},{"author":{"_account_id":1000338,"name":"Abhi Dangeti","email":"abhinav@couchbase.com","username":"abhinavdangeti","avatars":[{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"a9829792427df641b48c14d22044ab296b2d3606","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"}"},{"line_number":1484,"context_line":""},{"line_number":1485,"context_line":"uint32_t PassiveStream::clearBuffer() {"},{"line_number":1486,"context_line":"    LockHolder lh(buffer.bufMutex);"},{"line_number":1487,"context_line":"    uint32_t unackedBytes \u003d buffer.bytes;"},{"line_number":1488,"context_line":""},{"line_number":1489,"context_line":"    while (!buffer.messages.empty()) {"}],"source_content_type":"text/x-c","patch_set":4,"id":"3dc0e167_a00f9eaa","side":"PARENT","line":1486,"in_reply_to":"3dc0e167_a0f67e84","updated":"2015-10-23 17:19:51.000000000","message":"I\u0027ll think this through a bit, and address this particular lock inversion case in an other patch.","commit_id":"13d4f9072f169d07835f82cc030c6aba70a7305c"},{"author":{"_account_id":1000097,"name":"Chiyoung Seo","email":"chiyoung@northscale.com","username":"chiyoung","avatars":[{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/ec517f4126dd292151b452ce4d1edf31.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"bfc73f4be066b4c3fb6eb64342e0d65e5456c92d","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"}"},{"line_number":1484,"context_line":""},{"line_number":1485,"context_line":"uint32_t PassiveStream::clearBuffer() {"},{"line_number":1486,"context_line":"    LockHolder lh(buffer.bufMutex);"},{"line_number":1487,"context_line":"    uint32_t unackedBytes \u003d buffer.bytes;"},{"line_number":1488,"context_line":""},{"line_number":1489,"context_line":"    while (!buffer.messages.empty()) {"}],"source_content_type":"text/x-c","patch_set":4,"id":"3dc0e167_a0f67e84","side":"PARENT","line":1486,"in_reply_to":"3dc0e167_c0a3b28c","updated":"2015-10-23 16:53:43.000000000","message":"I\u0027m not sure if that\u0027s the right assumption. This function basically clears the passive stream\u0027s buffer without grabbing the lock that is used to synchronize the access to the passive buffer. On the other hand, PassiveStream::messageReceived() function grabs this lock to add an item to the buffer. The code seems confusing and might cause potential issues when this function is used in other places later.","commit_id":"13d4f9072f169d07835f82cc030c6aba70a7305c"},{"author":{"_account_id":1000338,"name":"Abhi Dangeti","email":"abhinav@couchbase.com","username":"abhinavdangeti","avatars":[{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"8301f0da9d79bb4a34b11246057e5d29169666e8","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"}"},{"line_number":1484,"context_line":""},{"line_number":1485,"context_line":"uint32_t PassiveStream::clearBuffer() {"},{"line_number":1486,"context_line":"    LockHolder lh(buffer.bufMutex);"},{"line_number":1487,"context_line":"    uint32_t unackedBytes \u003d buffer.bytes;"},{"line_number":1488,"context_line":""},{"line_number":1489,"context_line":"    while (!buffer.messages.empty()) {"}],"source_content_type":"text/x-c","patch_set":4,"id":"3dc0e167_c0a3b28c","side":"PARENT","line":1486,"in_reply_to":"3dc0e167_e01d9627","updated":"2015-10-23 15:16:14.000000000","message":"This lock causes a lock order inversion. This function is only ever called in the setDead function which already acquires the streamMutex. Thread sanitizer didn\u0027t point out any data races without this lock.","commit_id":"13d4f9072f169d07835f82cc030c6aba70a7305c"}]}
