)]}'
{"src/couchdb/couch_db.erl":[{"author":{"_account_id":1000147,"name":"Filipe David Borba Manana","username":"fdmanana","avatars":[{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}],"inactive":true},"change_message_id":"41c63da42e6b473b5be25b0cf4c2dd33f8035f20","unresolved":false,"context_lines":[{"line_number":687,"context_line":"    end;"},{"line_number":688,"context_line":"open_doc_int(Db, #doc_info{id\u003dId,deleted\u003dIsDeleted,rev\u003dRevInfo, body_ptr\u003dBp,"},{"line_number":689,"context_line":"        content_meta\u003dContentMeta}\u003dDocInfo, Options) -\u003e"},{"line_number":690,"context_line":"    Body \u003d case Bp of"},{"line_number":691,"context_line":"        0 -\u003e \u003c\u003c\u003e\u003e;"},{"line_number":692,"context_line":"        _ -\u003e {ok, Body0} \u003d couch_file:pread_iolist(Db#db.fd, Bp),"},{"line_number":693,"context_line":"            Body0"}],"source_content_type":"text/x-erlang","patch_set":1,"id":"AAACIn%2F%2F%2Fdw%3D","line":690,"updated":"2013-02-13 23:52:02.000000000","message":"Also it seems better to skip the read if bp is 0 and IsDeleted is true.\n\nIt happens today that at offset 0 in the file we can\u0027t have a body (there\u0027s an header there normally), but if this changes in the future, we might have here a bug hard to track.","commit_id":"8b3a3f5138315456b9dc66466cdf15d431f0016f"},{"author":{"_account_id":1000147,"name":"Filipe David Borba Manana","username":"fdmanana","avatars":[{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}],"inactive":true},"change_message_id":"e341b25aec0c214f91c54b06a550e367b65ae101","unresolved":false,"context_lines":[{"line_number":687,"context_line":"    end;"},{"line_number":688,"context_line":"open_doc_int(Db, #doc_info{id\u003dId,deleted\u003dIsDeleted,rev\u003dRevInfo, body_ptr\u003dBp,"},{"line_number":689,"context_line":"        content_meta\u003dContentMeta}\u003dDocInfo, Options) -\u003e"},{"line_number":690,"context_line":"    Body \u003d case Bp of"},{"line_number":691,"context_line":"        0 -\u003e \u003c\u003c\u003e\u003e;"},{"line_number":692,"context_line":"        _ -\u003e {ok, Body0} \u003d couch_file:pread_iolist(Db#db.fd, Bp),"},{"line_number":693,"context_line":"            Body0"}],"source_content_type":"text/x-erlang","patch_set":1,"id":"AAACIn%2F%2F%2FfU%3D","line":690,"updated":"2013-02-13 23:19:20.000000000","message":"The case style (indentation) should be like everywhere else in this file. Look at clauses above and below.","commit_id":"8b3a3f5138315456b9dc66466cdf15d431f0016f"},{"author":{"_account_id":1000147,"name":"Filipe David Borba Manana","username":"fdmanana","avatars":[{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}],"inactive":true},"change_message_id":"d85fac0ae651a1586fa9db227b793e41c5b97d2b","unresolved":false,"context_lines":[{"line_number":687,"context_line":"    end;"},{"line_number":688,"context_line":"open_doc_int(Db, #doc_info{id\u003dId,deleted\u003dIsDeleted,rev\u003dRevInfo, body_ptr\u003dBp,"},{"line_number":689,"context_line":"        content_meta\u003dContentMeta}\u003dDocInfo, Options) -\u003e"},{"line_number":690,"context_line":"    Body \u003d case Bp of"},{"line_number":691,"context_line":"        0 -\u003e \u003c\u003c\u003e\u003e;"},{"line_number":692,"context_line":"        _ -\u003e {ok, Body0} \u003d couch_file:pread_iolist(Db#db.fd, Bp),"},{"line_number":693,"context_line":"            Body0"}],"source_content_type":"text/x-erlang","patch_set":1,"id":"AAACIn%2F%2F%2FcU%3D","line":690,"in_reply_to":"AAACIn%2F%2F%2Fc4%3D","updated":"2013-02-14 01:16:54.000000000","message":"What was the bug?\n\nSeems a bit of a fragile way to indicate absence of a body. A flag in content_meta would be more clean.\nIf on database creation we decide one day to not write an empty header, it means first document written will have its body written at offset 0 (assuming that like in couchdb, couchstore writes first the bodies and then btree nodes).","commit_id":"8b3a3f5138315456b9dc66466cdf15d431f0016f"},{"author":{"_account_id":1000152,"name":"Aaron Miller","email":"apage43@ninjawhale.com","username":"apage43","avatars":[{"url":"https://www.gravatar.com/avatar/eee3b47a26586bb79e0a832466c066be.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/eee3b47a26586bb79e0a832466c066be.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/eee3b47a26586bb79e0a832466c066be.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/eee3b47a26586bb79e0a832466c066be.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"22507357bc7c512f51da8bb4a22702fa101e1303","unresolved":false,"context_lines":[{"line_number":687,"context_line":"    end;"},{"line_number":688,"context_line":"open_doc_int(Db, #doc_info{id\u003dId,deleted\u003dIsDeleted,rev\u003dRevInfo, body_ptr\u003dBp,"},{"line_number":689,"context_line":"        content_meta\u003dContentMeta}\u003dDocInfo, Options) -\u003e"},{"line_number":690,"context_line":"    Body \u003d case Bp of"},{"line_number":691,"context_line":"        0 -\u003e \u003c\u003c\u003e\u003e;"},{"line_number":692,"context_line":"        _ -\u003e {ok, Body0} \u003d couch_file:pread_iolist(Db#db.fd, Bp),"},{"line_number":693,"context_line":"            Body0"}],"source_content_type":"text/x-erlang","patch_set":1,"id":"AAACIn%2F%2F%2FcE%3D","line":690,"in_reply_to":"AAACIn%2F%2F%2FcU%3D","updated":"2013-02-14 01:46:47.000000000","message":"Couchstore\u0027s compactor writes bodies before writing a header, it just writes the first body at 1.\n\nIn fact, doing that I believe writes _exactly_ the same sequence of bytes as writing it at 0, since 0 necessarily always contains the first block prefix, so I think it\u0027s not unreasonable to just write bp 1 if you would write bp 0 and actually intend for there to be a body there.\n\nThe content_meta flag might be a good idea, but at the time this was all put together content_meta was opaque to Couchstore and was just for user flags.","commit_id":"8b3a3f5138315456b9dc66466cdf15d431f0016f"},{"author":{"_account_id":1000152,"name":"Aaron Miller","email":"apage43@ninjawhale.com","username":"apage43","avatars":[{"url":"https://www.gravatar.com/avatar/eee3b47a26586bb79e0a832466c066be.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/eee3b47a26586bb79e0a832466c066be.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/eee3b47a26586bb79e0a832466c066be.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/eee3b47a26586bb79e0a832466c066be.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"52ca26705f7f89d6e7bc13487f35bc53d53df4e1","unresolved":false,"context_lines":[{"line_number":687,"context_line":"    end;"},{"line_number":688,"context_line":"open_doc_int(Db, #doc_info{id\u003dId,deleted\u003dIsDeleted,rev\u003dRevInfo, body_ptr\u003dBp,"},{"line_number":689,"context_line":"        content_meta\u003dContentMeta}\u003dDocInfo, Options) -\u003e"},{"line_number":690,"context_line":"    Body \u003d case Bp of"},{"line_number":691,"context_line":"        0 -\u003e \u003c\u003c\u003e\u003e;"},{"line_number":692,"context_line":"        _ -\u003e {ok, Body0} \u003d couch_file:pread_iolist(Db#db.fd, Bp),"},{"line_number":693,"context_line":"            Body0"}],"source_content_type":"text/x-erlang","patch_set":1,"id":"AAACIn%2F%2F%2Fc4%3D","line":690,"in_reply_to":"AAACIn%2F%2F%2Fdw%3D","updated":"2013-02-14 01:05:09.000000000","message":"Couchstore currently considers BP\u003d0 to be empty body, (and this is in fact, the only way to signify an empty body, as we intentionally allow deleted items to have bodies)\n\nI remember at least one confusing bug related to this, so I\u0027d rather leave this as-is, unless we want to change the semantics of the file format.","commit_id":"8b3a3f5138315456b9dc66466cdf15d431f0016f"},{"author":{"_account_id":1000147,"name":"Filipe David Borba Manana","username":"fdmanana","avatars":[{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/00000000000000000000000000000000.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}],"inactive":true},"change_message_id":"e341b25aec0c214f91c54b06a550e367b65ae101","unresolved":false,"context_lines":[{"line_number":688,"context_line":"open_doc_int(Db, #doc_info{id\u003dId,deleted\u003dIsDeleted,rev\u003dRevInfo, body_ptr\u003dBp,"},{"line_number":689,"context_line":"        content_meta\u003dContentMeta}\u003dDocInfo, Options) -\u003e"},{"line_number":690,"context_line":"    Body \u003d case Bp of"},{"line_number":691,"context_line":"        0 -\u003e \u003c\u003c\u003e\u003e;"},{"line_number":692,"context_line":"        _ -\u003e {ok, Body0} \u003d couch_file:pread_iolist(Db#db.fd, Bp),"},{"line_number":693,"context_line":"            Body0"},{"line_number":694,"context_line":"    end,"}],"source_content_type":"text/x-erlang","patch_set":1,"id":"AAACIn%2F%2F%2Few%3D","line":691,"updated":"2013-02-13 23:19:20.000000000","message":"Will an empty binary be ok? \u003c\u003c\"{}\"\u003e\u003e might be better.\nMany places in couch_doc expect a body to be either raw json (non-empty) or snappy compressed binary.","commit_id":"8b3a3f5138315456b9dc66466cdf15d431f0016f"},{"author":{"_account_id":1000152,"name":"Aaron Miller","email":"apage43@ninjawhale.com","username":"apage43","avatars":[{"url":"https://www.gravatar.com/avatar/eee3b47a26586bb79e0a832466c066be.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/eee3b47a26586bb79e0a832466c066be.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/eee3b47a26586bb79e0a832466c066be.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/eee3b47a26586bb79e0a832466c066be.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"52ca26705f7f89d6e7bc13487f35bc53d53df4e1","unresolved":false,"context_lines":[{"line_number":688,"context_line":"open_doc_int(Db, #doc_info{id\u003dId,deleted\u003dIsDeleted,rev\u003dRevInfo, body_ptr\u003dBp,"},{"line_number":689,"context_line":"        content_meta\u003dContentMeta}\u003dDocInfo, Options) -\u003e"},{"line_number":690,"context_line":"    Body \u003d case Bp of"},{"line_number":691,"context_line":"        0 -\u003e \u003c\u003c\u003e\u003e;"},{"line_number":692,"context_line":"        _ -\u003e {ok, Body0} \u003d couch_file:pread_iolist(Db#db.fd, Bp),"},{"line_number":693,"context_line":"            Body0"},{"line_number":694,"context_line":"    end,"}],"source_content_type":"text/x-erlang","patch_set":1,"id":"AAACIn%2F%2F%2Fc0%3D","line":691,"in_reply_to":"AAACIn%2F%2F%2Few%3D","updated":"2013-02-14 01:05:09.000000000","message":"Doc body can be any arbitrary binary data right now, compressed or not, so this should not be an issue.","commit_id":"8b3a3f5138315456b9dc66466cdf15d431f0016f"}]}
