{"action":"created","comment":{"url":"https://api.github.com/repos/AquaQAnalytics/TorQ/pulls/comments/199106478","pull_request_review_id":133153457,"id":199106478,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTEwNjQ3OA==","diff_hunk":"@@ -240,21 +240,41 @@ setcompression:{[compression] if[3=count compression;\n \t\t\t\t]}\n resetcompression:{setcompression 16 0 0 }\n \n+//check if the hdb directory contains current partition\n+//if yes check if patition is empty and if it is not see if any of the tables exist in both the \n+//temporary parition and the hdb partition. If there is a clash abort operation otherwise copy \n+//each table to the hdb partition\n+movetohdb:{[dw;hw;pt] //break1; \n+  $[not(`$string[pt])in key hsym`$-10 _ hw;\n+     .[.os.ren;(dw;hw);{.lg.e[`mvtohdb;\"Failed to move data from wdb \",x,\" to hdb directory \",y,\" : \",z]}[dw;hw]];\n+      not any a[dw]in(a:{key hsym`$x})[hw];\n+      [{[y;x] //break2; \n+        $[not(`$last\"/\"vs x)in key hsym`$y;\n+          [.[.os.ren;(x;y);{.lg.e[`mvtohdb;\"Table \",(last\"/\"vs x),\" has failed to copy to \",y]}];\n+           .lg.o[`mvtohdb;\"Table \",(last\"/\"vs x),\" has been successfully moved to \",y]];\n+          .lg.e[`mvtohdb;\"Table \",(last\"/\"vs x),\" was skipped because it already exists in \",y]];\n+        }[hw]'[dw,/:\"/\",/:system\"ls \",dw];\n+        if[0=count key hsym`$dw;@[.os.deldir;dw;{.lg.e[`mvtohdb;\"Folder \",x,\" was not deleted\"]}]]];\n+     .lg.e[`mvtohdb;\"Folder \",hw,\" contains \",\",\"sv string key hsym`$hw]]\n+ }\n+\n+//.wdb.endofdaysortdate[.wdb.savedir;.wdb.getpartition[];`;.wdb.hdbsettings]","path":"code/processes/wdb.q","position":50,"original_position":49,"commit_id":"7b192e86f78c530753a15273a5ca846d59b0058b","original_commit_id":"680b923b8ea0c5106d65c80a67555e3183307ec9","user":{"login":"ThomasSmyth","id":13536681,"node_id":"MDQ6VXNlcjEzNTM2Njgx","avatar_url":"https://avatars3.githubusercontent.com/u/13536681?v=4","gravatar_id":"","url":"https://api.github.com/users/ThomasSmyth","html_url":"https://github.com/ThomasSmyth","followers_url":"https://api.github.com/users/ThomasSmyth/followers","following_url":"https://api.github.com/users/ThomasSmyth/following{/other_user}","gists_url":"https://api.github.com/users/ThomasSmyth/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasSmyth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasSmyth/subscriptions","organizations_url":"https://api.github.com/users/ThomasSmyth/orgs","repos_url":"https://api.github.com/users/ThomasSmyth/repos","events_url":"https://api.github.com/users/ThomasSmyth/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasSmyth/received_events","type":"User","site_admin":false},"body":"Need removed?","created_at":"2018-06-29T09:35:27Z","updated_at":"2018-06-29T09:37:27Z","html_url":"https://github.com/AquaQAnalytics/TorQ/pull/101#discussion_r199106478","pull_request_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/pulls/101","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/AquaQAnalytics/TorQ/pulls/comments/199106478"},"html":{"href":"https://github.com/AquaQAnalytics/TorQ/pull/101#discussion_r199106478"},"pull_request":{"href":"https://api.github.com/repos/AquaQAnalytics/TorQ/pulls/101"}}},"pull_request":{"url":"https://api.github.com/repos/AquaQAnalytics/TorQ/pulls/101","id":197750874,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3NzUwODc0","html_url":"https://github.com/AquaQAnalytics/TorQ/pull/101","diff_url":"https://github.com/AquaQAnalytics/TorQ/pull/101.diff","patch_url":"https://github.com/AquaQAnalytics/TorQ/pull/101.patch","issue_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/issues/101","number":101,"state":"open","locked":false,"title":"WDB end-of-day HDB folder structure error","user":{"login":"Aqualex","id":34272934,"node_id":"MDQ6VXNlcjM0MjcyOTM0","avatar_url":"https://avatars2.githubusercontent.com/u/34272934?v=4","gravatar_id":"","url":"https://api.github.com/users/Aqualex","html_url":"https://github.com/Aqualex","followers_url":"https://api.github.com/users/Aqualex/followers","following_url":"https://api.github.com/users/Aqualex/following{/other_user}","gists_url":"https://api.github.com/users/Aqualex/gists{/gist_id}","starred_url":"https://api.github.com/users/Aqualex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aqualex/subscriptions","organizations_url":"https://api.github.com/users/Aqualex/orgs","repos_url":"https://api.github.com/users/Aqualex/repos","events_url":"https://api.github.com/users/Aqualex/events{/privacy}","received_events_url":"https://api.github.com/users/Aqualex/received_events","type":"User","site_admin":false},"body":"There's a bug in the WDB when it moves data from its temp directory to the main HDB directory. Lets assume current date is 2018.01.01. At EOD, when the WDB tries to move the new data into the HDB and create the 2018.01.01 partition, then if there is already a 2018.01.01 in the HDB it ends up with an additional subdirectory i.e. 2018.01.01/2018.01.01/trade.\r\n\r\nIt shouldn't do this.\r\n","created_at":"2018-06-27T14:24:29Z","updated_at":"2018-06-29T09:37:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d899bfb3352e6aa99f3f41f89e17ba9f4779aad","assignee":{"login":"Aqualex","id":34272934,"node_id":"MDQ6VXNlcjM0MjcyOTM0","avatar_url":"https://avatars2.githubusercontent.com/u/34272934?v=4","gravatar_id":"","url":"https://api.github.com/users/Aqualex","html_url":"https://github.com/Aqualex","followers_url":"https://api.github.com/users/Aqualex/followers","following_url":"https://api.github.com/users/Aqualex/following{/other_user}","gists_url":"https://api.github.com/users/Aqualex/gists{/gist_id}","starred_url":"https://api.github.com/users/Aqualex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aqualex/subscriptions","organizations_url":"https://api.github.com/users/Aqualex/orgs","repos_url":"https://api.github.com/users/Aqualex/repos","events_url":"https://api.github.com/users/Aqualex/events{/privacy}","received_events_url":"https://api.github.com/users/Aqualex/received_events","type":"User","site_admin":false},"assignees":[{"login":"Aqualex","id":34272934,"node_id":"MDQ6VXNlcjM0MjcyOTM0","avatar_url":"https://avatars2.githubusercontent.com/u/34272934?v=4","gravatar_id":"","url":"https://api.github.com/users/Aqualex","html_url":"https://github.com/Aqualex","followers_url":"https://api.github.com/users/Aqualex/followers","following_url":"https://api.github.com/users/Aqualex/following{/other_user}","gists_url":"https://api.github.com/users/Aqualex/gists{/gist_id}","starred_url":"https://api.github.com/users/Aqualex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aqualex/subscriptions","organizations_url":"https://api.github.com/users/Aqualex/orgs","repos_url":"https://api.github.com/users/Aqualex/repos","events_url":"https://api.github.com/users/Aqualex/events{/privacy}","received_events_url":"https://api.github.com/users/Aqualex/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":165446015,"node_id":"MDU6TGFiZWwxNjU0NDYwMTU=","url":"https://api.github.com/repos/AquaQAnalytics/TorQ/labels/bug","name":"bug","color":"fc2929","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/pulls/101/commits","review_comments_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/pulls/101/comments","review_comment_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/issues/101/comments","statuses_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/statuses/7b192e86f78c530753a15273a5ca846d59b0058b","head":{"label":"AquaQAnalytics:wdbdatepart","ref":"wdbdatepart","sha":"7b192e86f78c530753a15273a5ca846d59b0058b","user":{"login":"AquaQAnalytics","id":10453416,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNDUzNDE2","avatar_url":"https://avatars3.githubusercontent.com/u/10453416?v=4","gravatar_id":"","url":"https://api.github.com/users/AquaQAnalytics","html_url":"https://github.com/AquaQAnalytics","followers_url":"https://api.github.com/users/AquaQAnalytics/followers","following_url":"https://api.github.com/users/AquaQAnalytics/following{/other_user}","gists_url":"https://api.github.com/users/AquaQAnalytics/gists{/gist_id}","starred_url":"https://api.github.com/users/AquaQAnalytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AquaQAnalytics/subscriptions","organizations_url":"https://api.github.com/users/AquaQAnalytics/orgs","repos_url":"https://api.github.com/users/AquaQAnalytics/repos","events_url":"https://api.github.com/users/AquaQAnalytics/events{/privacy}","received_events_url":"https://api.github.com/users/AquaQAnalytics/received_events","type":"Organization","site_admin":false},"repo":{"id":29142313,"node_id":"MDEwOlJlcG9zaXRvcnkyOTE0MjMxMw==","name":"TorQ","full_name":"AquaQAnalytics/TorQ","owner":{"login":"AquaQAnalytics","id":10453416,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNDUzNDE2","avatar_url":"https://avatars3.githubusercontent.com/u/10453416?v=4","gravatar_id":"","url":"https://api.github.com/users/AquaQAnalytics","html_url":"https://github.com/AquaQAnalytics","followers_url":"https://api.github.com/users/AquaQAnalytics/followers","following_url":"https://api.github.com/users/AquaQAnalytics/following{/other_user}","gists_url":"https://api.github.com/users/AquaQAnalytics/gists{/gist_id}","starred_url":"https://api.github.com/users/AquaQAnalytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AquaQAnalytics/subscriptions","organizations_url":"https://api.github.com/users/AquaQAnalytics/orgs","repos_url":"https://api.github.com/users/AquaQAnalytics/repos","events_url":"https://api.github.com/users/AquaQAnalytics/events{/privacy}","received_events_url":"https://api.github.com/users/AquaQAnalytics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AquaQAnalytics/TorQ","description":"kdb+ production framework.  Read the doc: http://aquaqanalytics.github.io/TorQ/.  Join the group!","fork":false,"url":"https://api.github.com/repos/AquaQAnalytics/TorQ","forks_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/forks","keys_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/teams","hooks_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/hooks","issue_events_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/issues/events{/number}","events_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/events","assignees_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/assignees{/user}","branches_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/branches{/branch}","tags_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/tags","blobs_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/git/refs{/sha}","trees_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/statuses/{sha}","languages_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/languages","stargazers_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/stargazers","contributors_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/contributors","subscribers_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/subscribers","subscription_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/subscription","commits_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/commits{/sha}","git_commits_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/git/commits{/sha}","comments_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/comments{/number}","issue_comment_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/issues/comments{/number}","contents_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/contents/{+path}","compare_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/merges","archive_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/downloads","issues_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/issues{/number}","pulls_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/pulls{/number}","milestones_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/milestones{/number}","notifications_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/labels{/name}","releases_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/releases{/id}","deployments_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/deployments","created_at":"2015-01-12T15:38:54Z","updated_at":"2018-06-14T08:50:31Z","pushed_at":"2018-06-29T09:36:49Z","git_url":"git://github.com/AquaQAnalytics/TorQ.git","ssh_url":"git@github.com:AquaQAnalytics/TorQ.git","clone_url":"https://github.com/AquaQAnalytics/TorQ.git","svn_url":"https://github.com/AquaQAnalytics/TorQ","homepage":"http://goo.gl/8YupnC","size":13462,"stargazers_count":133,"watchers_count":133,"language":"q","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":24,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":24,"open_issues":7,"watchers":133,"default_branch":"master"}},"base":{"label":"AquaQAnalytics:master","ref":"master","sha":"3023b9ef4d095d9f175652c4315508ab54c2d9c2","user":{"login":"AquaQAnalytics","id":10453416,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNDUzNDE2","avatar_url":"https://avatars3.githubusercontent.com/u/10453416?v=4","gravatar_id":"","url":"https://api.github.com/users/AquaQAnalytics","html_url":"https://github.com/AquaQAnalytics","followers_url":"https://api.github.com/users/AquaQAnalytics/followers","following_url":"https://api.github.com/users/AquaQAnalytics/following{/other_user}","gists_url":"https://api.github.com/users/AquaQAnalytics/gists{/gist_id}","starred_url":"https://api.github.com/users/AquaQAnalytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AquaQAnalytics/subscriptions","organizations_url":"https://api.github.com/users/AquaQAnalytics/orgs","repos_url":"https://api.github.com/users/AquaQAnalytics/repos","events_url":"https://api.github.com/users/AquaQAnalytics/events{/privacy}","received_events_url":"https://api.github.com/users/AquaQAnalytics/received_events","type":"Organization","site_admin":false},"repo":{"id":29142313,"node_id":"MDEwOlJlcG9zaXRvcnkyOTE0MjMxMw==","name":"TorQ","full_name":"AquaQAnalytics/TorQ","owner":{"login":"AquaQAnalytics","id":10453416,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNDUzNDE2","avatar_url":"https://avatars3.githubusercontent.com/u/10453416?v=4","gravatar_id":"","url":"https://api.github.com/users/AquaQAnalytics","html_url":"https://github.com/AquaQAnalytics","followers_url":"https://api.github.com/users/AquaQAnalytics/followers","following_url":"https://api.github.com/users/AquaQAnalytics/following{/other_user}","gists_url":"https://api.github.com/users/AquaQAnalytics/gists{/gist_id}","starred_url":"https://api.github.com/users/AquaQAnalytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AquaQAnalytics/subscriptions","organizations_url":"https://api.github.com/users/AquaQAnalytics/orgs","repos_url":"https://api.github.com/users/AquaQAnalytics/repos","events_url":"https://api.github.com/users/AquaQAnalytics/events{/privacy}","received_events_url":"https://api.github.com/users/AquaQAnalytics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AquaQAnalytics/TorQ","description":"kdb+ production framework.  Read the doc: http://aquaqanalytics.github.io/TorQ/.  Join the group!","fork":false,"url":"https://api.github.com/repos/AquaQAnalytics/TorQ","forks_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/forks","keys_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/teams","hooks_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/hooks","issue_events_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/issues/events{/number}","events_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/events","assignees_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/assignees{/user}","branches_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/branches{/branch}","tags_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/tags","blobs_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/git/refs{/sha}","trees_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/statuses/{sha}","languages_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/languages","stargazers_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/stargazers","contributors_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/contributors","subscribers_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/subscribers","subscription_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/subscription","commits_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/commits{/sha}","git_commits_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/git/commits{/sha}","comments_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/comments{/number}","issue_comment_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/issues/comments{/number}","contents_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/contents/{+path}","compare_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/merges","archive_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/downloads","issues_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/issues{/number}","pulls_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/pulls{/number}","milestones_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/milestones{/number}","notifications_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/labels{/name}","releases_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/releases{/id}","deployments_url":"https://api.github.com/repos/AquaQAnalytics/TorQ/deployments","created_at":"2015-01-12T15:38:54Z","updated_at":"2018-06-14T08:50:31Z","pushed_at":"2018-06-29T09:36:49Z","git_url":"git://github.com/AquaQAnalytics/TorQ.git","ssh_url":"git@github.com:AquaQAnalytics/TorQ.git","clone_url":"https://github.com/AquaQAnalytics/TorQ.git","svn_url":"https://github.com/AquaQAnalytics/TorQ","homepage":"http://goo.gl/8YupnC","size":13462,"stargazers_count":133,"watchers_count":133,"language":"q","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":24,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":24,"open_issues":7,"watchers":133,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AquaQAnalytics/TorQ/pulls/101"},"html":{"href":"https://github.com/AquaQAnalytics/TorQ/pull/101"},"issue":{"href":"https://api.github.com/repos/AquaQAnalytics/TorQ/issues/101"},"comments":{"href":"https://api.github.com/repos/AquaQAnalytics/TorQ/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/AquaQAnalytics/TorQ/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/AquaQAnalytics/TorQ/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AquaQAnalytics/TorQ/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/AquaQAnalytics/TorQ/statuses/7b192e86f78c530753a15273a5ca846d59b0058b"}},"author_association":"NONE"}}
{"actor":{"display_login":"ThomasSmyth"}}