{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/rocksdb/pulls/comments/42168041","id":42168041,"diff_hunk":"@@ -172,6 +174,15 @@ bool VersionEdit::EncodeTo(std::string* dst) const {\n         char p = static_cast<char>(1);\n         PutLengthPrefixedSlice(dst, Slice(&p, 1));\n       }\n+      if (f.priv_meta != nullptr) {\n+        PutVarint32(dst, CustomTag::kPrivMeta);\n+        // EncodePrivateMetadata returns a string formatted by the storage\n+        // backend following the PutVarint* convention in coding.h\n+        std::string tmp;\n+        f.EncodePrivateMetadata(&tmp);\n+        PutLengthPrefixedSlice(dst, tmp);\n+        dst->append(tmp);","path":"db/version_edit.cc","position":36,"original_position":36,"commit_id":"747d64d56b20a88ff8751443e4b3143ddf3d498a","original_commit_id":"747d64d56b20a88ff8751443e4b3143ddf3d498a","user":{"login":"javigon","id":902977,"avatar_url":"https://avatars.githubusercontent.com/u/902977?v=3","gravatar_id":"","url":"https://api.github.com/users/javigon","html_url":"https://github.com/javigon","followers_url":"https://api.github.com/users/javigon/followers","following_url":"https://api.github.com/users/javigon/following{/other_user}","gists_url":"https://api.github.com/users/javigon/gists{/gist_id}","starred_url":"https://api.github.com/users/javigon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javigon/subscriptions","organizations_url":"https://api.github.com/users/javigon/orgs","repos_url":"https://api.github.com/users/javigon/repos","events_url":"https://api.github.com/users/javigon/events{/privacy}","received_events_url":"https://api.github.com/users/javigon/received_events","type":"User","site_admin":false},"body":"You are right... My mistake. I'll fix that and push again tomorrow.","created_at":"2015-10-15T19:19:54Z","updated_at":"2015-10-15T19:19:54Z","html_url":"https://github.com/facebook/rocksdb/pull/731#discussion_r42168041","pull_request_url":"https://api.github.com/repos/facebook/rocksdb/pulls/731","_links":{"self":{"href":"https://api.github.com/repos/facebook/rocksdb/pulls/comments/42168041"},"html":{"href":"https://github.com/facebook/rocksdb/pull/731#discussion_r42168041"},"pull_request":{"href":"https://api.github.com/repos/facebook/rocksdb/pulls/731"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/rocksdb/pulls/731","id":45673171,"html_url":"https://github.com/facebook/rocksdb/pull/731","diff_url":"https://github.com/facebook/rocksdb/pull/731.diff","patch_url":"https://github.com/facebook/rocksdb/pull/731.patch","issue_url":"https://api.github.com/repos/facebook/rocksdb/issues/731","number":731,"state":"open","locked":false,"title":"Allow storage backend to store metadata in manifest","user":{"login":"javigon","id":902977,"avatar_url":"https://avatars.githubusercontent.com/u/902977?v=3","gravatar_id":"","url":"https://api.github.com/users/javigon","html_url":"https://github.com/javigon","followers_url":"https://api.github.com/users/javigon/followers","following_url":"https://api.github.com/users/javigon/following{/other_user}","gists_url":"https://api.github.com/users/javigon/gists{/gist_id}","starred_url":"https://api.github.com/users/javigon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javigon/subscriptions","organizations_url":"https://api.github.com/users/javigon/orgs","repos_url":"https://api.github.com/users/javigon/repos","events_url":"https://api.github.com/users/javigon/events{/privacy}","received_events_url":"https://api.github.com/users/javigon/received_events","type":"User","site_admin":false},"body":"Allow storage backend to store private metadata\r\n\r\nSummary: This patch provides a set of helper functions that would enable\r\na storage backend (e.g., posix, HDFS) to store sstable private metadata\r\nin the manifest. This frees the storage backend from implementing its\r\nown metadata mechanisms by reusing the functionality already present in\r\nthe manifest. This same idea can be applied to the WAL and MANIFEST; if\r\nthe mechanism is correct, patches for these will follow.\r\n\r\nTest Plan: This patch has been tested in posix and in a new backend for\r\nOpenChannel SSDs [1], where the private metadata functions have been\r\nimplemented. The idea is that testing functions are provided by the\r\nstorage backend when used.\r\n\r\n[1] https://github.com/OpenChannelSSD","created_at":"2015-09-22T14:52:56Z","updated_at":"2015-10-15T19:19:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5393ac97e116668fd6ef11150902cdf5caf86d5a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/rocksdb/pulls/731/commits","review_comments_url":"https://api.github.com/repos/facebook/rocksdb/pulls/731/comments","review_comment_url":"https://api.github.com/repos/facebook/rocksdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/rocksdb/issues/731/comments","statuses_url":"https://api.github.com/repos/facebook/rocksdb/statuses/747d64d56b20a88ff8751443e4b3143ddf3d498a","head":{"label":"OpenChannelSSD:to_fb_master","ref":"to_fb_master","sha":"747d64d56b20a88ff8751443e4b3143ddf3d498a","user":{"login":"OpenChannelSSD","id":8308288,"avatar_url":"https://avatars.githubusercontent.com/u/8308288?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenChannelSSD","html_url":"https://github.com/OpenChannelSSD","followers_url":"https://api.github.com/users/OpenChannelSSD/followers","following_url":"https://api.github.com/users/OpenChannelSSD/following{/other_user}","gists_url":"https://api.github.com/users/OpenChannelSSD/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenChannelSSD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenChannelSSD/subscriptions","organizations_url":"https://api.github.com/users/OpenChannelSSD/orgs","repos_url":"https://api.github.com/users/OpenChannelSSD/repos","events_url":"https://api.github.com/users/OpenChannelSSD/events{/privacy}","received_events_url":"https://api.github.com/users/OpenChannelSSD/received_events","type":"Organization","site_admin":false},"repo":{"id":40109443,"name":"rocksdb","full_name":"OpenChannelSSD/rocksdb","owner":{"login":"OpenChannelSSD","id":8308288,"avatar_url":"https://avatars.githubusercontent.com/u/8308288?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenChannelSSD","html_url":"https://github.com/OpenChannelSSD","followers_url":"https://api.github.com/users/OpenChannelSSD/followers","following_url":"https://api.github.com/users/OpenChannelSSD/following{/other_user}","gists_url":"https://api.github.com/users/OpenChannelSSD/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenChannelSSD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenChannelSSD/subscriptions","organizations_url":"https://api.github.com/users/OpenChannelSSD/orgs","repos_url":"https://api.github.com/users/OpenChannelSSD/repos","events_url":"https://api.github.com/users/OpenChannelSSD/events{/privacy}","received_events_url":"https://api.github.com/users/OpenChannelSSD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenChannelSSD/rocksdb","description":"A library that provides an embeddable, persistent key-value store for fast storage.","fork":true,"url":"https://api.github.com/repos/OpenChannelSSD/rocksdb","forks_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/forks","keys_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/teams","hooks_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/hooks","issue_events_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/issues/events{/number}","events_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/events","assignees_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/assignees{/user}","branches_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/branches{/branch}","tags_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/tags","blobs_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/languages","stargazers_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/stargazers","contributors_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/contributors","subscribers_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/subscribers","subscription_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/subscription","commits_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/contents/{+path}","compare_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/merges","archive_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/downloads","issues_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/issues{/number}","pulls_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/labels{/name}","releases_url":"https://api.github.com/repos/OpenChannelSSD/rocksdb/releases{/id}","created_at":"2015-08-03T06:49:40Z","updated_at":"2015-10-08T05:03:06Z","pushed_at":"2015-10-15T14:44:34Z","git_url":"git://github.com/OpenChannelSSD/rocksdb.git","ssh_url":"git@github.com:OpenChannelSSD/rocksdb.git","clone_url":"https://github.com/OpenChannelSSD/rocksdb.git","svn_url":"https://github.com/OpenChannelSSD/rocksdb","homepage":"http://rocksdb.org","size":66542,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"63e507c59cee3e2d810eafe68b7e9d6883b5de7d","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":6934395,"name":"rocksdb","full_name":"facebook/rocksdb","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/rocksdb","description":"A library that provides an embeddable, persistent key-value store for fast storage.","fork":false,"url":"https://api.github.com/repos/facebook/rocksdb","forks_url":"https://api.github.com/repos/facebook/rocksdb/forks","keys_url":"https://api.github.com/repos/facebook/rocksdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/rocksdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/rocksdb/teams","hooks_url":"https://api.github.com/repos/facebook/rocksdb/hooks","issue_events_url":"https://api.github.com/repos/facebook/rocksdb/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/rocksdb/events","assignees_url":"https://api.github.com/repos/facebook/rocksdb/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/rocksdb/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/rocksdb/tags","blobs_url":"https://api.github.com/repos/facebook/rocksdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/rocksdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/rocksdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/rocksdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/rocksdb/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/rocksdb/languages","stargazers_url":"https://api.github.com/repos/facebook/rocksdb/stargazers","contributors_url":"https://api.github.com/repos/facebook/rocksdb/contributors","subscribers_url":"https://api.github.com/repos/facebook/rocksdb/subscribers","subscription_url":"https://api.github.com/repos/facebook/rocksdb/subscription","commits_url":"https://api.github.com/repos/facebook/rocksdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/rocksdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/rocksdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/rocksdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/rocksdb/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/rocksdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/rocksdb/merges","archive_url":"https://api.github.com/repos/facebook/rocksdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/rocksdb/downloads","issues_url":"https://api.github.com/repos/facebook/rocksdb/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/rocksdb/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/rocksdb/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/rocksdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/rocksdb/labels{/name}","releases_url":"https://api.github.com/repos/facebook/rocksdb/releases{/id}","created_at":"2012-11-30T06:16:18Z","updated_at":"2015-10-15T18:13:29Z","pushed_at":"2015-10-15T18:08:03Z","git_url":"git://github.com/facebook/rocksdb.git","ssh_url":"git@github.com:facebook/rocksdb.git","clone_url":"https://github.com/facebook/rocksdb.git","svn_url":"https://github.com/facebook/rocksdb","homepage":"http://rocksdb.org","size":74623,"stargazers_count":4184,"watchers_count":4184,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":807,"mirror_url":null,"open_issues_count":118,"forks":807,"open_issues":118,"watchers":4184,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/rocksdb/pulls/731"},"html":{"href":"https://github.com/facebook/rocksdb/pull/731"},"issue":{"href":"https://api.github.com/repos/facebook/rocksdb/issues/731"},"comments":{"href":"https://api.github.com/repos/facebook/rocksdb/issues/731/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/rocksdb/pulls/731/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/rocksdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/rocksdb/pulls/731/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/rocksdb/statuses/747d64d56b20a88ff8751443e4b3143ddf3d498a"}}}}