{"action":"created","comment":{"url":"https://api.github.com/repos/ncalexan/datomish/pulls/comments/77212802","id":77212802,"diff_hunk":"@@ -72,11 +73,19 @@\n (defn- report? [x]\n   (and (instance? TxReport x)))\n \n-(defonce -eid (atom (- 0x200 1)))\n-\n-;; TODO: better here.\n-(defn- next-eid [db]\n-  (swap! -eid inc))\n+(defn- -next-eid! [part-map-atom tempid]","path":"src/datomish/transact.cljc","position":17,"original_position":17,"commit_id":"a3b3326ebe6322e55fd40e7983b159e4e2afaafc","original_commit_id":"a3b3326ebe6322e55fd40e7983b159e4e2afaafc","user":{"login":"rnewman","id":91722,"avatar_url":"https://avatars.githubusercontent.com/u/91722?v=3","gravatar_id":"","url":"https://api.github.com/users/rnewman","html_url":"https://github.com/rnewman","followers_url":"https://api.github.com/users/rnewman/followers","following_url":"https://api.github.com/users/rnewman/following{/other_user}","gists_url":"https://api.github.com/users/rnewman/gists{/gist_id}","starred_url":"https://api.github.com/users/rnewman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnewman/subscriptions","organizations_url":"https://api.github.com/users/rnewman/orgs","repos_url":"https://api.github.com/users/rnewman/repos","events_url":"https://api.github.com/users/rnewman/events{/privacy}","received_events_url":"https://api.github.com/users/rnewman/received_events","type":"User","site_admin":false},"body":"Perhaps generalize this: take a `part` instead of a `tempid`, and allow this to allocate more than one eid…\r\n\r\nThat seems like it'd be useful for bulk insertion, or even within our own transactor: find all the tempids and do the allocation up-front with a single `swap!`, rather than one at a time with >N `swap!`s..","created_at":"2016-09-01T16:58:53Z","updated_at":"2016-09-01T16:58:53Z","html_url":"https://github.com/ncalexan/datomish/pull/5#discussion_r77212802","pull_request_url":"https://api.github.com/repos/ncalexan/datomish/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/ncalexan/datomish/pulls/comments/77212802"},"html":{"href":"https://github.com/ncalexan/datomish/pull/5#discussion_r77212802"},"pull_request":{"href":"https://api.github.com/repos/ncalexan/datomish/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/ncalexan/datomish/pulls/5","id":83545856,"html_url":"https://github.com/ncalexan/datomish/pull/5","diff_url":"https://github.com/ncalexan/datomish/pull/5.diff","patch_url":"https://github.com/ncalexan/datomish/pull/5.patch","issue_url":"https://api.github.com/repos/ncalexan/datomish/issues/5","number":5,"state":"open","locked":false,"title":"Cache partition map and update materialized partition view once. Fixes #47.","user":{"login":"ncalexan","id":1097182,"avatar_url":"https://avatars.githubusercontent.com/u/1097182?v=3","gravatar_id":"","url":"https://api.github.com/users/ncalexan","html_url":"https://github.com/ncalexan","followers_url":"https://api.github.com/users/ncalexan/followers","following_url":"https://api.github.com/users/ncalexan/following{/other_user}","gists_url":"https://api.github.com/users/ncalexan/gists{/gist_id}","starred_url":"https://api.github.com/users/ncalexan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncalexan/subscriptions","organizations_url":"https://api.github.com/users/ncalexan/orgs","repos_url":"https://api.github.com/users/ncalexan/repos","events_url":"https://api.github.com/users/ncalexan/events{/privacy}","received_events_url":"https://api.github.com/users/ncalexan/received_events","type":"User","site_admin":false},"body":"This caches a partition map per DB, which is helpful because it exposes what the point in time DB partition state is, but is unhelpful because the partition state can advance underneath the DB cache.  This is generally true of the approach — this can happen to the ident/entid\r\nmaps, and the datoms themselves — so we'll roll with it for now.\r\n\r\nThis reduces the number of SQL `UPDATE` operations from linear in the number of id-literals used to constant in the number of known partitions.\r\n\r\n@rnewman over to you for review.","created_at":"2016-08-31T23:14:17Z","updated_at":"2016-09-01T16:58:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ccd66e39ab975f00b6a462b8fcc24385b5117ef1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ncalexan/datomish/pulls/5/commits","review_comments_url":"https://api.github.com/repos/ncalexan/datomish/pulls/5/comments","review_comment_url":"https://api.github.com/repos/ncalexan/datomish/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ncalexan/datomish/issues/5/comments","statuses_url":"https://api.github.com/repos/ncalexan/datomish/statuses/a3b3326ebe6322e55fd40e7983b159e4e2afaafc","head":{"label":"ncalexan:cache-parts","ref":"cache-parts","sha":"a3b3326ebe6322e55fd40e7983b159e4e2afaafc","user":{"login":"ncalexan","id":1097182,"avatar_url":"https://avatars.githubusercontent.com/u/1097182?v=3","gravatar_id":"","url":"https://api.github.com/users/ncalexan","html_url":"https://github.com/ncalexan","followers_url":"https://api.github.com/users/ncalexan/followers","following_url":"https://api.github.com/users/ncalexan/following{/other_user}","gists_url":"https://api.github.com/users/ncalexan/gists{/gist_id}","starred_url":"https://api.github.com/users/ncalexan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncalexan/subscriptions","organizations_url":"https://api.github.com/users/ncalexan/orgs","repos_url":"https://api.github.com/users/ncalexan/repos","events_url":"https://api.github.com/users/ncalexan/events{/privacy}","received_events_url":"https://api.github.com/users/ncalexan/received_events","type":"User","site_admin":false},"repo":{"id":62674602,"name":"datomish","full_name":"ncalexan/datomish","owner":{"login":"ncalexan","id":1097182,"avatar_url":"https://avatars.githubusercontent.com/u/1097182?v=3","gravatar_id":"","url":"https://api.github.com/users/ncalexan","html_url":"https://github.com/ncalexan","followers_url":"https://api.github.com/users/ncalexan/followers","following_url":"https://api.github.com/users/ncalexan/following{/other_user}","gists_url":"https://api.github.com/users/ncalexan/gists{/gist_id}","starred_url":"https://api.github.com/users/ncalexan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncalexan/subscriptions","organizations_url":"https://api.github.com/users/ncalexan/orgs","repos_url":"https://api.github.com/users/ncalexan/repos","events_url":"https://api.github.com/users/ncalexan/events{/privacy}","received_events_url":"https://api.github.com/users/ncalexan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ncalexan/datomish","description":"A persistent, relational store inspired by Datomic and DataScript.","fork":false,"url":"https://api.github.com/repos/ncalexan/datomish","forks_url":"https://api.github.com/repos/ncalexan/datomish/forks","keys_url":"https://api.github.com/repos/ncalexan/datomish/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ncalexan/datomish/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ncalexan/datomish/teams","hooks_url":"https://api.github.com/repos/ncalexan/datomish/hooks","issue_events_url":"https://api.github.com/repos/ncalexan/datomish/issues/events{/number}","events_url":"https://api.github.com/repos/ncalexan/datomish/events","assignees_url":"https://api.github.com/repos/ncalexan/datomish/assignees{/user}","branches_url":"https://api.github.com/repos/ncalexan/datomish/branches{/branch}","tags_url":"https://api.github.com/repos/ncalexan/datomish/tags","blobs_url":"https://api.github.com/repos/ncalexan/datomish/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ncalexan/datomish/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ncalexan/datomish/git/refs{/sha}","trees_url":"https://api.github.com/repos/ncalexan/datomish/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ncalexan/datomish/statuses/{sha}","languages_url":"https://api.github.com/repos/ncalexan/datomish/languages","stargazers_url":"https://api.github.com/repos/ncalexan/datomish/stargazers","contributors_url":"https://api.github.com/repos/ncalexan/datomish/contributors","subscribers_url":"https://api.github.com/repos/ncalexan/datomish/subscribers","subscription_url":"https://api.github.com/repos/ncalexan/datomish/subscription","commits_url":"https://api.github.com/repos/ncalexan/datomish/commits{/sha}","git_commits_url":"https://api.github.com/repos/ncalexan/datomish/git/commits{/sha}","comments_url":"https://api.github.com/repos/ncalexan/datomish/comments{/number}","issue_comment_url":"https://api.github.com/repos/ncalexan/datomish/issues/comments{/number}","contents_url":"https://api.github.com/repos/ncalexan/datomish/contents/{+path}","compare_url":"https://api.github.com/repos/ncalexan/datomish/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ncalexan/datomish/merges","archive_url":"https://api.github.com/repos/ncalexan/datomish/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ncalexan/datomish/downloads","issues_url":"https://api.github.com/repos/ncalexan/datomish/issues{/number}","pulls_url":"https://api.github.com/repos/ncalexan/datomish/pulls{/number}","milestones_url":"https://api.github.com/repos/ncalexan/datomish/milestones{/number}","notifications_url":"https://api.github.com/repos/ncalexan/datomish/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ncalexan/datomish/labels{/name}","releases_url":"https://api.github.com/repos/ncalexan/datomish/releases{/id}","deployments_url":"https://api.github.com/repos/ncalexan/datomish/deployments","created_at":"2016-07-05T22:48:01Z","updated_at":"2016-07-13T20:00:41Z","pushed_at":"2016-08-31T23:17:41Z","git_url":"git://github.com/ncalexan/datomish.git","ssh_url":"git@github.com:ncalexan/datomish.git","clone_url":"https://github.com/ncalexan/datomish.git","svn_url":"https://github.com/ncalexan/datomish","homepage":null,"size":360,"stargazers_count":1,"watchers_count":1,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"ncalexan:master","ref":"master","sha":"b2a1af30ed6f13ca72012a317b81a5a8127ecf3f","user":{"login":"ncalexan","id":1097182,"avatar_url":"https://avatars.githubusercontent.com/u/1097182?v=3","gravatar_id":"","url":"https://api.github.com/users/ncalexan","html_url":"https://github.com/ncalexan","followers_url":"https://api.github.com/users/ncalexan/followers","following_url":"https://api.github.com/users/ncalexan/following{/other_user}","gists_url":"https://api.github.com/users/ncalexan/gists{/gist_id}","starred_url":"https://api.github.com/users/ncalexan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncalexan/subscriptions","organizations_url":"https://api.github.com/users/ncalexan/orgs","repos_url":"https://api.github.com/users/ncalexan/repos","events_url":"https://api.github.com/users/ncalexan/events{/privacy}","received_events_url":"https://api.github.com/users/ncalexan/received_events","type":"User","site_admin":false},"repo":{"id":62674602,"name":"datomish","full_name":"ncalexan/datomish","owner":{"login":"ncalexan","id":1097182,"avatar_url":"https://avatars.githubusercontent.com/u/1097182?v=3","gravatar_id":"","url":"https://api.github.com/users/ncalexan","html_url":"https://github.com/ncalexan","followers_url":"https://api.github.com/users/ncalexan/followers","following_url":"https://api.github.com/users/ncalexan/following{/other_user}","gists_url":"https://api.github.com/users/ncalexan/gists{/gist_id}","starred_url":"https://api.github.com/users/ncalexan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncalexan/subscriptions","organizations_url":"https://api.github.com/users/ncalexan/orgs","repos_url":"https://api.github.com/users/ncalexan/repos","events_url":"https://api.github.com/users/ncalexan/events{/privacy}","received_events_url":"https://api.github.com/users/ncalexan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ncalexan/datomish","description":"A persistent, relational store inspired by Datomic and DataScript.","fork":false,"url":"https://api.github.com/repos/ncalexan/datomish","forks_url":"https://api.github.com/repos/ncalexan/datomish/forks","keys_url":"https://api.github.com/repos/ncalexan/datomish/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ncalexan/datomish/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ncalexan/datomish/teams","hooks_url":"https://api.github.com/repos/ncalexan/datomish/hooks","issue_events_url":"https://api.github.com/repos/ncalexan/datomish/issues/events{/number}","events_url":"https://api.github.com/repos/ncalexan/datomish/events","assignees_url":"https://api.github.com/repos/ncalexan/datomish/assignees{/user}","branches_url":"https://api.github.com/repos/ncalexan/datomish/branches{/branch}","tags_url":"https://api.github.com/repos/ncalexan/datomish/tags","blobs_url":"https://api.github.com/repos/ncalexan/datomish/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ncalexan/datomish/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ncalexan/datomish/git/refs{/sha}","trees_url":"https://api.github.com/repos/ncalexan/datomish/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ncalexan/datomish/statuses/{sha}","languages_url":"https://api.github.com/repos/ncalexan/datomish/languages","stargazers_url":"https://api.github.com/repos/ncalexan/datomish/stargazers","contributors_url":"https://api.github.com/repos/ncalexan/datomish/contributors","subscribers_url":"https://api.github.com/repos/ncalexan/datomish/subscribers","subscription_url":"https://api.github.com/repos/ncalexan/datomish/subscription","commits_url":"https://api.github.com/repos/ncalexan/datomish/commits{/sha}","git_commits_url":"https://api.github.com/repos/ncalexan/datomish/git/commits{/sha}","comments_url":"https://api.github.com/repos/ncalexan/datomish/comments{/number}","issue_comment_url":"https://api.github.com/repos/ncalexan/datomish/issues/comments{/number}","contents_url":"https://api.github.com/repos/ncalexan/datomish/contents/{+path}","compare_url":"https://api.github.com/repos/ncalexan/datomish/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ncalexan/datomish/merges","archive_url":"https://api.github.com/repos/ncalexan/datomish/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ncalexan/datomish/downloads","issues_url":"https://api.github.com/repos/ncalexan/datomish/issues{/number}","pulls_url":"https://api.github.com/repos/ncalexan/datomish/pulls{/number}","milestones_url":"https://api.github.com/repos/ncalexan/datomish/milestones{/number}","notifications_url":"https://api.github.com/repos/ncalexan/datomish/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ncalexan/datomish/labels{/name}","releases_url":"https://api.github.com/repos/ncalexan/datomish/releases{/id}","deployments_url":"https://api.github.com/repos/ncalexan/datomish/deployments","created_at":"2016-07-05T22:48:01Z","updated_at":"2016-07-13T20:00:41Z","pushed_at":"2016-08-31T23:17:41Z","git_url":"git://github.com/ncalexan/datomish.git","ssh_url":"git@github.com:ncalexan/datomish.git","clone_url":"https://github.com/ncalexan/datomish.git","svn_url":"https://github.com/ncalexan/datomish","homepage":null,"size":360,"stargazers_count":1,"watchers_count":1,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ncalexan/datomish/pulls/5"},"html":{"href":"https://github.com/ncalexan/datomish/pull/5"},"issue":{"href":"https://api.github.com/repos/ncalexan/datomish/issues/5"},"comments":{"href":"https://api.github.com/repos/ncalexan/datomish/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/ncalexan/datomish/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/ncalexan/datomish/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ncalexan/datomish/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/ncalexan/datomish/statuses/a3b3326ebe6322e55fd40e7983b159e4e2afaafc"}}}}
{"actor":{"display_login":"rnewman"}}