{"action":"created","issue":{"url":"https://api.github.com/repos/couchbase/moss/issues/41","repository_url":"https://api.github.com/repos/couchbase/moss","labels_url":"https://api.github.com/repos/couchbase/moss/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/couchbase/moss/issues/41/comments","events_url":"https://api.github.com/repos/couchbase/moss/issues/41/events","html_url":"https://github.com/couchbase/moss/issues/41","id":243054566,"number":41,"title":"partial compaction of index/kvs only.","user":{"login":"steveyen","id":30640,"avatar_url":"https://avatars7.githubusercontent.com/u/30640?v=4","gravatar_id":"","url":"https://api.github.com/users/steveyen","html_url":"https://github.com/steveyen","followers_url":"https://api.github.com/users/steveyen/followers","following_url":"https://api.github.com/users/steveyen/following{/other_user}","gists_url":"https://api.github.com/users/steveyen/gists{/gist_id}","starred_url":"https://api.github.com/users/steveyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveyen/subscriptions","organizations_url":"https://api.github.com/users/steveyen/orgs","repos_url":"https://api.github.com/users/steveyen/repos","events_url":"https://api.github.com/users/steveyen/events{/privacy}","received_events_url":"https://api.github.com/users/steveyen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-07-14T17:04:01Z","updated_at":"2017-07-14T19:37:58Z","closed_at":null,"body":"In the segment.kvs array, there's 16^H^H 8 bits that are currently unused / RESERVED for the future, out of the 128 bits for each entry... https://github.com/couchbase/moss/blob/master/segment.go#L149\r\n\r\nMaybe we can use those 16^H^H 8 bits somehow.  One thought is as moss is appending dirty segments to the end of the file, perhaps it might opportunistically sometimes decide to compact some of the kvs arrays of the segment stack into a big kvs array.  That is, leave all the old, already persisted buf's as-is/untouched, but the latest \"compacted kvs\" would use (some of?) the 16 bits to refer to the old buf that each entry points to.\r\n\r\nThe thinking is instead of performing binary search on the multiple kvs arrays down through the segment stack, there'd be only a single kvs array to binary search.\r\n\r\n(Update: 16 -> 8 bits (thanks marty!); also if 8 bits ain't enough, then it's possible that keys and vals at runtime might not be near the max-keyLen and max-valLen limits, so that might be another place to get bits; and another place might be the offset into the buf)"},"comment":{"url":"https://api.github.com/repos/couchbase/moss/issues/comments/315448975","html_url":"https://github.com/couchbase/moss/issues/41#issuecomment-315448975","issue_url":"https://api.github.com/repos/couchbase/moss/issues/41","id":315448975,"user":{"login":"hisundar","id":4744280,"avatar_url":"https://avatars6.githubusercontent.com/u/4744280?v=4","gravatar_id":"","url":"https://api.github.com/users/hisundar","html_url":"https://github.com/hisundar","followers_url":"https://api.github.com/users/hisundar/followers","following_url":"https://api.github.com/users/hisundar/following{/other_user}","gists_url":"https://api.github.com/users/hisundar/gists{/gist_id}","starred_url":"https://api.github.com/users/hisundar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hisundar/subscriptions","organizations_url":"https://api.github.com/users/hisundar/orgs","repos_url":"https://api.github.com/users/hisundar/repos","events_url":"https://api.github.com/users/hisundar/events{/privacy}","received_events_url":"https://api.github.com/users/hisundar/received_events","type":"User","site_admin":false},"created_at":"2017-07-14T19:37:57Z","updated_at":"2017-07-14T19:37:57Z","body":"The kvs/index arrays can only be merged when there are no key space overlaps right?"}}
{"actor":{"display_login":"hisundar"}}