)]}'
{"specs/approved/nodes-tagging.rst":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"71d0fca1c0a429124f1af1a07b0ddf3069249b83","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,"},{"line_number":55,"context_line":"        tag VARCHAR(255) CHARACTER SET utf8 NOT NULL,"},{"line_number":56,"context_line":"        KEY (tag),"},{"line_number":57,"context_line":"    )"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    CREATE TABLE node_tags ("},{"line_number":60,"context_line":"        node_id INT(11) NOT NULL,"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a740942_3eaeb998","line":57,"updated":"2015-12-07 11:58:01.000000000","message":"now you have to state how you populate and clean up this table.","commit_id":"fd25c7caf1c44c27db43cd5651209dd724806427"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3b29c1d57e1a63806365c31b9cd9e144d1b742c4","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    CREATE TABLE tags ("},{"line_number":54,"context_line":"        id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,"},{"line_number":55,"context_line":"        tag VARCHAR(255) CHARACTER SET utf8 NOT NULL,"},{"line_number":56,"context_line":"        KEY (tag),"},{"line_number":57,"context_line":"    )"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"da6ed579_49070fca","line":55,"updated":"2016-01-14 15:39:11.000000000","message":"This tag then should be a unique constraint right? Since we are not going to have duplicated tag names","commit_id":"db0f43de53863b69ca298088a117a5ce2e6a5c54"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"1b61f22559c27300192b7baa784855aeb0e5c35c","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    CREATE TABLE tags ("},{"line_number":54,"context_line":"        id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,"},{"line_number":55,"context_line":"        tag VARCHAR(255) CHARACTER SET utf8 NOT NULL,"},{"line_number":56,"context_line":"        KEY (tag),"},{"line_number":57,"context_line":"    )"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"da6ed579_54a78da9","line":55,"in_reply_to":"da6ed579_49070fca","updated":"2016-01-15 02:05:52.000000000","message":"yes, it should be a unique constraint, thanks Lucas.","commit_id":"db0f43de53863b69ca298088a117a5ce2e6a5c54"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3b29c1d57e1a63806365c31b9cd9e144d1b742c4","unresolved":false,"context_lines":[{"line_number":73,"context_line":"then insert the tags to `tags` table and return the `tag_id`, if got a"},{"line_number":74,"context_line":"DBDuplicateEntry exception which indicates the tag already exist, just"},{"line_number":75,"context_line":"return the tag id. While deleting node tags, we should also delete them"},{"line_number":76,"context_line":"from `tags` table if not used by other nodes."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"REST API impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"da6ed579_49a38fb2","line":76,"updated":"2016-01-14 15:39:11.000000000","message":"I\u0027m not expert on db, but can we elaborate how the delete will work? Because it sounds a bit racy, what if a node is tagged after the check to see if no other nodes are using the tag and before the deletion of the tag? How are we going to prevent such race?","commit_id":"db0f43de53863b69ca298088a117a5ce2e6a5c54"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"1b61f22559c27300192b7baa784855aeb0e5c35c","unresolved":false,"context_lines":[{"line_number":73,"context_line":"then insert the tags to `tags` table and return the `tag_id`, if got a"},{"line_number":74,"context_line":"DBDuplicateEntry exception which indicates the tag already exist, just"},{"line_number":75,"context_line":"return the tag id. While deleting node tags, we should also delete them"},{"line_number":76,"context_line":"from `tags` table if not used by other nodes."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"REST API impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"da6ed579_742411c4","line":76,"in_reply_to":"da6ed579_49a38fb2","updated":"2016-01-15 02:05:52.000000000","message":"I\u0027m not sure how to prevent the race, seems that would be more complex, then I doubt whether the little optimization is worth.","commit_id":"db0f43de53863b69ca298088a117a5ce2e6a5c54"}]}
