{"action":"created","comment":{"url":"https://api.github.com/repos/lsst/qserv/pulls/comments/40732223","id":40732223,"diff_hunk":"@@ -92,14 +94,26 @@ KvInterfaceImplMem::KvInterfaceImplMem(string const& filename) {\n KvInterfaceImplMem::~KvInterfaceImplMem() {\n }\n \n-void\n-KvInterfaceImplMem::create(string const& key, string const& value) {\n-    LOGF_DEBUG(\"create(%1%, %2%)\" % key % value);\n-    if (exists(key)) {\n-        throw KeyExistsError(key);\n+std::string\n+KvInterfaceImplMem::create(string const& key, string const& value, bool unique) {\n+    LOGF_DEBUG(\"create(%1%, %2%, unique=%3%)\" % key % value % int(unique));\n+\n+    string path = key;\n+    if (unique) {\n+        // append unique suffix, in-memory KVI is not meant for large-scale\n+        // storage, so we can do dumb brute-force loop\n+        int seq = 0;","path":"core/modules/css/KvInterfaceImplMem.cc","position":33,"original_position":33,"commit_id":"a505f43b46275d1314f083ea1e988e0efe98bee0","original_commit_id":"a505f43b46275d1314f083ea1e988e0efe98bee0","user":{"login":"jgates108","id":6558057,"avatar_url":"https://avatars.githubusercontent.com/u/6558057?v=3","gravatar_id":"","url":"https://api.github.com/users/jgates108","html_url":"https://github.com/jgates108","followers_url":"https://api.github.com/users/jgates108/followers","following_url":"https://api.github.com/users/jgates108/following{/other_user}","gists_url":"https://api.github.com/users/jgates108/gists{/gist_id}","starred_url":"https://api.github.com/users/jgates108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgates108/subscriptions","organizations_url":"https://api.github.com/users/jgates108/orgs","repos_url":"https://api.github.com/users/jgates108/repos","events_url":"https://api.github.com/users/jgates108/events{/privacy}","received_events_url":"https://api.github.com/users/jgates108/received_events","type":"User","site_admin":false},"body":"Would it make sense to use a random number here?","created_at":"2015-09-29T21:27:15Z","updated_at":"2015-09-29T21:27:15Z","html_url":"https://github.com/lsst/qserv/pull/136#discussion_r40732223","pull_request_url":"https://api.github.com/repos/lsst/qserv/pulls/136","_links":{"self":{"href":"https://api.github.com/repos/lsst/qserv/pulls/comments/40732223"},"html":{"href":"https://github.com/lsst/qserv/pull/136#discussion_r40732223"},"pull_request":{"href":"https://api.github.com/repos/lsst/qserv/pulls/136"}}},"pull_request":{"url":"https://api.github.com/repos/lsst/qserv/pulls/136","id":46119940,"html_url":"https://github.com/lsst/qserv/pull/136","diff_url":"https://github.com/lsst/qserv/pull/136.diff","patch_url":"https://github.com/lsst/qserv/pull/136.patch","issue_url":"https://api.github.com/repos/lsst/qserv/issues/136","number":136,"state":"open","locked":false,"title":"Add CssAccess class providing new interface for CSS (DM-2733)","user":{"login":"andy-z","id":9602964,"avatar_url":"https://avatars.githubusercontent.com/u/9602964?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-z","html_url":"https://github.com/andy-z","followers_url":"https://api.github.com/users/andy-z/followers","following_url":"https://api.github.com/users/andy-z/following{/other_user}","gists_url":"https://api.github.com/users/andy-z/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-z/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-z/subscriptions","organizations_url":"https://api.github.com/users/andy-z/orgs","repos_url":"https://api.github.com/users/andy-z/repos","events_url":"https://api.github.com/users/andy-z/events{/privacy}","received_events_url":"https://api.github.com/users/andy-z/received_events","type":"User","site_admin":false},"body":"This new class replaces Facade and has additional methods for update operations on CSS. Many methods of Facade that returned individual bits were replaced with methods returning combined info (like TableParams, PartTableParams, etc.) to keep data consistent. Unit tests for practically all methods of CssAccess are added as well.\r\n\r\nCzar is now using new CssAccess class, Facade has been removed. Passess all unit tests and integration tests.\r\n\r\nExtend KvInterface API to support operations needed by CssAccess.","created_at":"2015-09-28T04:39:02Z","updated_at":"2015-09-29T21:27:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4677cec8b613a82875284cd179578db8543d1a7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lsst/qserv/pulls/136/commits","review_comments_url":"https://api.github.com/repos/lsst/qserv/pulls/136/comments","review_comment_url":"https://api.github.com/repos/lsst/qserv/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lsst/qserv/issues/136/comments","statuses_url":"https://api.github.com/repos/lsst/qserv/statuses/a505f43b46275d1314f083ea1e988e0efe98bee0","head":{"label":"lsst:tickets/DM-2733","ref":"tickets/DM-2733","sha":"a505f43b46275d1314f083ea1e988e0efe98bee0","user":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"repo":{"id":23013460,"name":"qserv","full_name":"lsst/qserv","owner":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lsst/qserv","description":"LSST Query Services","fork":false,"url":"https://api.github.com/repos/lsst/qserv","forks_url":"https://api.github.com/repos/lsst/qserv/forks","keys_url":"https://api.github.com/repos/lsst/qserv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/qserv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/qserv/teams","hooks_url":"https://api.github.com/repos/lsst/qserv/hooks","issue_events_url":"https://api.github.com/repos/lsst/qserv/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/qserv/events","assignees_url":"https://api.github.com/repos/lsst/qserv/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/qserv/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/qserv/tags","blobs_url":"https://api.github.com/repos/lsst/qserv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/qserv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/qserv/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/qserv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/qserv/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/qserv/languages","stargazers_url":"https://api.github.com/repos/lsst/qserv/stargazers","contributors_url":"https://api.github.com/repos/lsst/qserv/contributors","subscribers_url":"https://api.github.com/repos/lsst/qserv/subscribers","subscription_url":"https://api.github.com/repos/lsst/qserv/subscription","commits_url":"https://api.github.com/repos/lsst/qserv/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/qserv/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/qserv/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/qserv/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/qserv/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/qserv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/qserv/merges","archive_url":"https://api.github.com/repos/lsst/qserv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/qserv/downloads","issues_url":"https://api.github.com/repos/lsst/qserv/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/qserv/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/qserv/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/qserv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/qserv/labels{/name}","releases_url":"https://api.github.com/repos/lsst/qserv/releases{/id}","created_at":"2014-08-16T07:50:36Z","updated_at":"2015-05-08T02:01:15Z","pushed_at":"2015-09-29T20:40:49Z","git_url":"git://github.com/lsst/qserv.git","ssh_url":"git@github.com:lsst/qserv.git","clone_url":"https://github.com/lsst/qserv.git","svn_url":"https://github.com/lsst/qserv","homepage":"http://dm.lsst.org/","size":21658,"stargazers_count":4,"watchers_count":4,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":4,"default_branch":"master"}},"base":{"label":"lsst:master","ref":"master","sha":"f1395665bcd6c0a23a472201ebb8e99dbce6627e","user":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"repo":{"id":23013460,"name":"qserv","full_name":"lsst/qserv","owner":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lsst/qserv","description":"LSST Query Services","fork":false,"url":"https://api.github.com/repos/lsst/qserv","forks_url":"https://api.github.com/repos/lsst/qserv/forks","keys_url":"https://api.github.com/repos/lsst/qserv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/qserv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/qserv/teams","hooks_url":"https://api.github.com/repos/lsst/qserv/hooks","issue_events_url":"https://api.github.com/repos/lsst/qserv/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/qserv/events","assignees_url":"https://api.github.com/repos/lsst/qserv/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/qserv/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/qserv/tags","blobs_url":"https://api.github.com/repos/lsst/qserv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/qserv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/qserv/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/qserv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/qserv/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/qserv/languages","stargazers_url":"https://api.github.com/repos/lsst/qserv/stargazers","contributors_url":"https://api.github.com/repos/lsst/qserv/contributors","subscribers_url":"https://api.github.com/repos/lsst/qserv/subscribers","subscription_url":"https://api.github.com/repos/lsst/qserv/subscription","commits_url":"https://api.github.com/repos/lsst/qserv/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/qserv/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/qserv/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/qserv/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/qserv/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/qserv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/qserv/merges","archive_url":"https://api.github.com/repos/lsst/qserv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/qserv/downloads","issues_url":"https://api.github.com/repos/lsst/qserv/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/qserv/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/qserv/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/qserv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/qserv/labels{/name}","releases_url":"https://api.github.com/repos/lsst/qserv/releases{/id}","created_at":"2014-08-16T07:50:36Z","updated_at":"2015-05-08T02:01:15Z","pushed_at":"2015-09-29T20:40:49Z","git_url":"git://github.com/lsst/qserv.git","ssh_url":"git@github.com:lsst/qserv.git","clone_url":"https://github.com/lsst/qserv.git","svn_url":"https://github.com/lsst/qserv","homepage":"http://dm.lsst.org/","size":21658,"stargazers_count":4,"watchers_count":4,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lsst/qserv/pulls/136"},"html":{"href":"https://github.com/lsst/qserv/pull/136"},"issue":{"href":"https://api.github.com/repos/lsst/qserv/issues/136"},"comments":{"href":"https://api.github.com/repos/lsst/qserv/issues/136/comments"},"review_comments":{"href":"https://api.github.com/repos/lsst/qserv/pulls/136/comments"},"review_comment":{"href":"https://api.github.com/repos/lsst/qserv/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lsst/qserv/pulls/136/commits"},"statuses":{"href":"https://api.github.com/repos/lsst/qserv/statuses/a505f43b46275d1314f083ea1e988e0efe98bee0"}}}}