{"action":"created","comment":{"url":"https://api.github.com/repos/vast-io/vast/pulls/comments/210957602","pull_request_review_id":147287029,"id":210957602,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDk1NzYwMg==","diff_hunk":"@@ -0,0 +1,201 @@\n+/******************************************************************************\n+ *                    _   _____   __________                                  *\n+ *                   | | / / _ | / __/_  __/     Visibility                   *\n+ *                   | |/ / __ |_\\ \\  / /          Across                     *\n+ *                   |___/_/ |_/___/ /_/       Space and Time                 *\n+ *                                                                            *\n+ * This file is part of VAST. It is subject to the license terms in the       *\n+ * LICENSE file found in the top-level directory of this distribution and at  *\n+ * http://vast.io/license. No part of VAST, including this file, may be       *\n+ * copied, modified, propagated, or distributed except according to the terms *\n+ * contained in the LICENSE file.                                             *\n+ ******************************************************************************/\n+\n+#include <caf/stream_deserializer.hpp>\n+\n+#include <caf/detail/scope_guard.hpp>\n+\n+#include \"vast/bitmap_algorithms.hpp\"\n+#include \"vast/const_table_slice_handle.hpp\"\n+#include \"vast/ids.hpp\"\n+#include \"vast/segment.hpp\"\n+#include \"vast/si_literals.hpp\"\n+#include \"vast/table_slice.hpp\"\n+\n+#include \"vast/detail/assert.hpp\"\n+#include \"vast/detail/byte_swap.hpp\"\n+#include \"vast/detail/coded_deserializer.hpp\"\n+#include \"vast/detail/coded_serializer.hpp\"\n+#include \"vast/detail/narrow.hpp\"\n+\n+namespace vast {\n+\n+using namespace binary_byte_literals;\n+\n+namespace {\n+\n+template <class T>\n+T to_little_endian(T x) {\n+  return detail::swap<detail::host_endian, detail::little_endian>(x);\n+}\n+\n+template <class T>\n+T from_little_endian(T x) {\n+  return detail::swap<detail::little_endian, detail::host_endian>(x);\n+}\n+\n+segment::header make_header(chunk_ptr chunk) {","path":"libvast/src/segment.cpp","position":47,"original_position":47,"commit_id":"b9c1db5330a954b609ee4a27a6a241aabf8c452d","original_commit_id":"b9c1db5330a954b609ee4a27a6a241aabf8c452d","user":{"login":"mavam","id":53797,"node_id":"MDQ6VXNlcjUzNzk3","avatar_url":"https://avatars0.githubusercontent.com/u/53797?v=4","gravatar_id":"","url":"https://api.github.com/users/mavam","html_url":"https://github.com/mavam","followers_url":"https://api.github.com/users/mavam/followers","following_url":"https://api.github.com/users/mavam/following{/other_user}","gists_url":"https://api.github.com/users/mavam/gists{/gist_id}","starred_url":"https://api.github.com/users/mavam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavam/subscriptions","organizations_url":"https://api.github.com/users/mavam/orgs","repos_url":"https://api.github.com/users/mavam/repos","events_url":"https://api.github.com/users/mavam/events{/privacy}","received_events_url":"https://api.github.com/users/mavam/received_events","type":"User","site_admin":false},"body":"I can follow on the splitting aspect. But why have a function `to_network_order`? The header is written in little endian on disk, but network order is big endian. So `to_host_endian` or `from_little_endian` would make make more sense in my eyes.","created_at":"2018-08-17T16:02:36Z","updated_at":"2018-08-17T16:02:36Z","html_url":"https://github.com/vast-io/vast/pull/256#discussion_r210957602","pull_request_url":"https://api.github.com/repos/vast-io/vast/pulls/256","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/vast-io/vast/pulls/comments/210957602"},"html":{"href":"https://github.com/vast-io/vast/pull/256#discussion_r210957602"},"pull_request":{"href":"https://api.github.com/repos/vast-io/vast/pulls/256"}},"in_reply_to_id":210924811},"pull_request":{"url":"https://api.github.com/repos/vast-io/vast/pulls/256","id":208903600,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4OTAzNjAw","html_url":"https://github.com/vast-io/vast/pull/256","diff_url":"https://github.com/vast-io/vast/pull/256.diff","patch_url":"https://github.com/vast-io/vast/pull/256.patch","issue_url":"https://api.github.com/repos/vast-io/vast/issues/256","number":256,"state":"open","locked":false,"title":"Convert segment store to operate with table slices (WIP)","user":{"login":"mavam","id":53797,"node_id":"MDQ6VXNlcjUzNzk3","avatar_url":"https://avatars0.githubusercontent.com/u/53797?v=4","gravatar_id":"","url":"https://api.github.com/users/mavam","html_url":"https://github.com/mavam","followers_url":"https://api.github.com/users/mavam/followers","following_url":"https://api.github.com/users/mavam/following{/other_user}","gists_url":"https://api.github.com/users/mavam/gists{/gist_id}","starred_url":"https://api.github.com/users/mavam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavam/subscriptions","organizations_url":"https://api.github.com/users/mavam/orgs","repos_url":"https://api.github.com/users/mavam/repos","events_url":"https://api.github.com/users/mavam/events{/privacy}","received_events_url":"https://api.github.com/users/mavam/received_events","type":"User","site_admin":false},"body":"The archive currently uses a pretty inefficient way to store events internally: it serializes events individually into blocks, and then groups those blocks into segments.\r\n\r\nThis PR rewrites the segment store in terms of table slices. It also lays the foundation for the memory-mapped backend to support different table slice implementations.","created_at":"2018-08-16T15:44:50Z","updated_at":"2018-08-17T16:02:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81a164bb688fd72e8558c212fb3c0a254c7e6ed2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":12105903,"node_id":"MDU6TGFiZWwxMjEwNTkwMw==","url":"https://api.github.com/repos/vast-io/vast/labels/performance","name":"performance","color":"207de5","default":false},{"id":97610992,"node_id":"MDU6TGFiZWw5NzYxMDk5Mg==","url":"https://api.github.com/repos/vast-io/vast/labels/refactoring","name":"refactoring","color":"02d7e1","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/vast-io/vast/pulls/256/commits","review_comments_url":"https://api.github.com/repos/vast-io/vast/pulls/256/comments","review_comment_url":"https://api.github.com/repos/vast-io/vast/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vast-io/vast/issues/256/comments","statuses_url":"https://api.github.com/repos/vast-io/vast/statuses/b9c1db5330a954b609ee4a27a6a241aabf8c452d","head":{"label":"vast-io:story/ch3214","ref":"story/ch3214","sha":"b9c1db5330a954b609ee4a27a6a241aabf8c452d","user":{"login":"vast-io","id":18351410,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MzUxNDEw","avatar_url":"https://avatars2.githubusercontent.com/u/18351410?v=4","gravatar_id":"","url":"https://api.github.com/users/vast-io","html_url":"https://github.com/vast-io","followers_url":"https://api.github.com/users/vast-io/followers","following_url":"https://api.github.com/users/vast-io/following{/other_user}","gists_url":"https://api.github.com/users/vast-io/gists{/gist_id}","starred_url":"https://api.github.com/users/vast-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vast-io/subscriptions","organizations_url":"https://api.github.com/users/vast-io/orgs","repos_url":"https://api.github.com/users/vast-io/repos","events_url":"https://api.github.com/users/vast-io/events{/privacy}","received_events_url":"https://api.github.com/users/vast-io/received_events","type":"Organization","site_admin":false},"repo":{"id":932314,"node_id":"MDEwOlJlcG9zaXRvcnk5MzIzMTQ=","name":"vast","full_name":"vast-io/vast","owner":{"login":"vast-io","id":18351410,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MzUxNDEw","avatar_url":"https://avatars2.githubusercontent.com/u/18351410?v=4","gravatar_id":"","url":"https://api.github.com/users/vast-io","html_url":"https://github.com/vast-io","followers_url":"https://api.github.com/users/vast-io/followers","following_url":"https://api.github.com/users/vast-io/following{/other_user}","gists_url":"https://api.github.com/users/vast-io/gists{/gist_id}","starred_url":"https://api.github.com/users/vast-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vast-io/subscriptions","organizations_url":"https://api.github.com/users/vast-io/orgs","repos_url":"https://api.github.com/users/vast-io/repos","events_url":"https://api.github.com/users/vast-io/events{/privacy}","received_events_url":"https://api.github.com/users/vast-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vast-io/vast","description":":crystal_ball: Visibility Across Space and Time","fork":false,"url":"https://api.github.com/repos/vast-io/vast","forks_url":"https://api.github.com/repos/vast-io/vast/forks","keys_url":"https://api.github.com/repos/vast-io/vast/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vast-io/vast/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vast-io/vast/teams","hooks_url":"https://api.github.com/repos/vast-io/vast/hooks","issue_events_url":"https://api.github.com/repos/vast-io/vast/issues/events{/number}","events_url":"https://api.github.com/repos/vast-io/vast/events","assignees_url":"https://api.github.com/repos/vast-io/vast/assignees{/user}","branches_url":"https://api.github.com/repos/vast-io/vast/branches{/branch}","tags_url":"https://api.github.com/repos/vast-io/vast/tags","blobs_url":"https://api.github.com/repos/vast-io/vast/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vast-io/vast/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vast-io/vast/git/refs{/sha}","trees_url":"https://api.github.com/repos/vast-io/vast/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vast-io/vast/statuses/{sha}","languages_url":"https://api.github.com/repos/vast-io/vast/languages","stargazers_url":"https://api.github.com/repos/vast-io/vast/stargazers","contributors_url":"https://api.github.com/repos/vast-io/vast/contributors","subscribers_url":"https://api.github.com/repos/vast-io/vast/subscribers","subscription_url":"https://api.github.com/repos/vast-io/vast/subscription","commits_url":"https://api.github.com/repos/vast-io/vast/commits{/sha}","git_commits_url":"https://api.github.com/repos/vast-io/vast/git/commits{/sha}","comments_url":"https://api.github.com/repos/vast-io/vast/comments{/number}","issue_comment_url":"https://api.github.com/repos/vast-io/vast/issues/comments{/number}","contents_url":"https://api.github.com/repos/vast-io/vast/contents/{+path}","compare_url":"https://api.github.com/repos/vast-io/vast/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vast-io/vast/merges","archive_url":"https://api.github.com/repos/vast-io/vast/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vast-io/vast/downloads","issues_url":"https://api.github.com/repos/vast-io/vast/issues{/number}","pulls_url":"https://api.github.com/repos/vast-io/vast/pulls{/number}","milestones_url":"https://api.github.com/repos/vast-io/vast/milestones{/number}","notifications_url":"https://api.github.com/repos/vast-io/vast/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vast-io/vast/labels{/name}","releases_url":"https://api.github.com/repos/vast-io/vast/releases{/id}","deployments_url":"https://api.github.com/repos/vast-io/vast/deployments","created_at":"2010-09-23T01:19:19Z","updated_at":"2018-08-15T10:44:44Z","pushed_at":"2018-08-16T15:44:51Z","git_url":"git://github.com/vast-io/vast.git","ssh_url":"git@github.com:vast-io/vast.git","clone_url":"https://github.com/vast-io/vast.git","svn_url":"https://github.com/vast-io/vast","homepage":"http://vast.io","size":11630,"stargazers_count":91,"watchers_count":91,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":26,"open_issues":3,"watchers":91,"default_branch":"master"}},"base":{"label":"vast-io:master","ref":"master","sha":"77af44570c8c65000524575d596199e4b512546a","user":{"login":"vast-io","id":18351410,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MzUxNDEw","avatar_url":"https://avatars2.githubusercontent.com/u/18351410?v=4","gravatar_id":"","url":"https://api.github.com/users/vast-io","html_url":"https://github.com/vast-io","followers_url":"https://api.github.com/users/vast-io/followers","following_url":"https://api.github.com/users/vast-io/following{/other_user}","gists_url":"https://api.github.com/users/vast-io/gists{/gist_id}","starred_url":"https://api.github.com/users/vast-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vast-io/subscriptions","organizations_url":"https://api.github.com/users/vast-io/orgs","repos_url":"https://api.github.com/users/vast-io/repos","events_url":"https://api.github.com/users/vast-io/events{/privacy}","received_events_url":"https://api.github.com/users/vast-io/received_events","type":"Organization","site_admin":false},"repo":{"id":932314,"node_id":"MDEwOlJlcG9zaXRvcnk5MzIzMTQ=","name":"vast","full_name":"vast-io/vast","owner":{"login":"vast-io","id":18351410,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MzUxNDEw","avatar_url":"https://avatars2.githubusercontent.com/u/18351410?v=4","gravatar_id":"","url":"https://api.github.com/users/vast-io","html_url":"https://github.com/vast-io","followers_url":"https://api.github.com/users/vast-io/followers","following_url":"https://api.github.com/users/vast-io/following{/other_user}","gists_url":"https://api.github.com/users/vast-io/gists{/gist_id}","starred_url":"https://api.github.com/users/vast-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vast-io/subscriptions","organizations_url":"https://api.github.com/users/vast-io/orgs","repos_url":"https://api.github.com/users/vast-io/repos","events_url":"https://api.github.com/users/vast-io/events{/privacy}","received_events_url":"https://api.github.com/users/vast-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vast-io/vast","description":":crystal_ball: Visibility Across Space and Time","fork":false,"url":"https://api.github.com/repos/vast-io/vast","forks_url":"https://api.github.com/repos/vast-io/vast/forks","keys_url":"https://api.github.com/repos/vast-io/vast/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vast-io/vast/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vast-io/vast/teams","hooks_url":"https://api.github.com/repos/vast-io/vast/hooks","issue_events_url":"https://api.github.com/repos/vast-io/vast/issues/events{/number}","events_url":"https://api.github.com/repos/vast-io/vast/events","assignees_url":"https://api.github.com/repos/vast-io/vast/assignees{/user}","branches_url":"https://api.github.com/repos/vast-io/vast/branches{/branch}","tags_url":"https://api.github.com/repos/vast-io/vast/tags","blobs_url":"https://api.github.com/repos/vast-io/vast/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vast-io/vast/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vast-io/vast/git/refs{/sha}","trees_url":"https://api.github.com/repos/vast-io/vast/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vast-io/vast/statuses/{sha}","languages_url":"https://api.github.com/repos/vast-io/vast/languages","stargazers_url":"https://api.github.com/repos/vast-io/vast/stargazers","contributors_url":"https://api.github.com/repos/vast-io/vast/contributors","subscribers_url":"https://api.github.com/repos/vast-io/vast/subscribers","subscription_url":"https://api.github.com/repos/vast-io/vast/subscription","commits_url":"https://api.github.com/repos/vast-io/vast/commits{/sha}","git_commits_url":"https://api.github.com/repos/vast-io/vast/git/commits{/sha}","comments_url":"https://api.github.com/repos/vast-io/vast/comments{/number}","issue_comment_url":"https://api.github.com/repos/vast-io/vast/issues/comments{/number}","contents_url":"https://api.github.com/repos/vast-io/vast/contents/{+path}","compare_url":"https://api.github.com/repos/vast-io/vast/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vast-io/vast/merges","archive_url":"https://api.github.com/repos/vast-io/vast/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vast-io/vast/downloads","issues_url":"https://api.github.com/repos/vast-io/vast/issues{/number}","pulls_url":"https://api.github.com/repos/vast-io/vast/pulls{/number}","milestones_url":"https://api.github.com/repos/vast-io/vast/milestones{/number}","notifications_url":"https://api.github.com/repos/vast-io/vast/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vast-io/vast/labels{/name}","releases_url":"https://api.github.com/repos/vast-io/vast/releases{/id}","deployments_url":"https://api.github.com/repos/vast-io/vast/deployments","created_at":"2010-09-23T01:19:19Z","updated_at":"2018-08-15T10:44:44Z","pushed_at":"2018-08-16T15:44:51Z","git_url":"git://github.com/vast-io/vast.git","ssh_url":"git@github.com:vast-io/vast.git","clone_url":"https://github.com/vast-io/vast.git","svn_url":"https://github.com/vast-io/vast","homepage":"http://vast.io","size":11630,"stargazers_count":91,"watchers_count":91,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":26,"open_issues":3,"watchers":91,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vast-io/vast/pulls/256"},"html":{"href":"https://github.com/vast-io/vast/pull/256"},"issue":{"href":"https://api.github.com/repos/vast-io/vast/issues/256"},"comments":{"href":"https://api.github.com/repos/vast-io/vast/issues/256/comments"},"review_comments":{"href":"https://api.github.com/repos/vast-io/vast/pulls/256/comments"},"review_comment":{"href":"https://api.github.com/repos/vast-io/vast/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vast-io/vast/pulls/256/commits"},"statuses":{"href":"https://api.github.com/repos/vast-io/vast/statuses/b9c1db5330a954b609ee4a27a6a241aabf8c452d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mavam"}}