GitHub PullRequestReviewCommentEvent at 2014-11-25 23:28:55
Repository: hermitage
Actor: ept
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/ept/hermitage/pulls/comments/20905712","id":20905712,"diff_hunk":"@@ -0,0 +1,177 @@\n+Testing FoundationDB SQL Layer transaction isolation levels\n+===========================================================\n+\n+These tests were run with FoundationDB Key-Value Store 2.0.5 and SQL Layer 2.0.2.\n+\n+Key-Value Store does not use locking to meet its isolation guarantees. Instead, the database uses optimistic concurrency control. It checks for conflicts at commit-time, rejecting transactions that conflict. Typically applications simply try the transaction again. Key-Value Store does not have configurable isolation levels - it is always serializable.\n+\n+Key-Value Store enforces a 5 second limit on transactions to maintain a reasonable window of time for detecting conflicts. Because of this time constraint, testing isolation manually, like the other tests in Hermitage, is unworkable. So this test utilizes tmux to automate the Hermitage tests.\n+\n+````bat\n+#!/bin/bash\n+\n+if [ -z $1 ]\n+then\n+  echo \"Specify a test to continue. Options are: g0, g1a, g1b, g1c, otv, pmp, p4, g-single, g2-item, g2\"\n+  exit 2\n+elif [ -n $1 ]\n+then\n+  test=$1\n+fi\n+\n+tmux kill-session -t SQL || true\n+tmux new-session -d -n SQL -s SQL \"fdbsqlcli test | tee /tmp/SQL0.out\"\n+tmux split-window -t SQL \"fdbsqlcli test | tee /tmp/SQL1.out\"\n+\n+count_prompts()\n+{\n+  grep \"=>\" /tmp/SQL$1.out | wc -l\n+}\n+\n+wait_for_prompts()\n+{\n+  until [ $2 -ne $(count_prompts $1) ]; do\n+    echo -n '.'\n+  done\n+}\n+\n+tell()\n+{\n+  BEFORE=$(count_prompts $1)\n+  tmux send-keys -t $1 \"$2\\\\;\" c-M\n+  wait_for_prompts $1 $BEFORE\n+}\n+\n+wait_for_prompts 0 0\n+wait_for_prompts 1 0\n+\n+tell 0 \"drop table if exists test\"\n+tell 0 \"create table test (id int primary key, value int)\"\n+tell 0 \"insert into test (id, value) values (1, 10), (2, 20)\"\n+\n+case $test in\n+  \"g0\")\n+    echo \"Running g0 test.\"\n+    tell 0 \"begin\"\n+    tell 1 \"begin\"\n+    tell 0 \"update test set value = 11 where id = 1\"\n+    tell 1 \"update test set value = 12 where id = 1\"\n+    tell 0 \"update test set value = 21 where id = 2\"\n+    tell 0 \"commit\"\n+    tell 0 \"select * from test\"\n+    tell 1 \"update test set value = 22 where id = 2\"\n+    #Rejected due to optimistic concurrency controls \n+    tell 1 \"commit\"\n+    tell 0 \"select * from test\"\n+    tell 1 \"select * from test\"\n+    ;;\n+  \"g1a\")\n+    echo \"Running g1a test.\"\n+    tell 0 \"begin\"\n+    tell 1 \"begin\"\n+    tell 0 \"update test set value = 101 where id = 1\"\n+    #Still shows 1 => 10\n+    tell 1 \"select * from test\"\n+    tell 0 \"rollback\"\n+    #Still shows 1 => 10\n+    tell 1 \"select * from test\"\n+    tell 1 \"commit\"\n+    ;;\n+  \"g1b\")\n+    echo \"Running g1b test.\"\n+    tell 0 \"begin\"\n+    tell 1 \"begin\"\n+    tell 0 \"update test set value = 101 where id = 1\"\n+    #Still shows 1 => 10\n+    tell 1 \"select * from test\"\n+    tell 0 \"update test set value = 11 where id = 1\"\n+    tell 0 \"commit\"\n+    #Still shows 1 => 10. A new transaction must be started to see the commits of other transactions.\n+    tell 1 \"select * from test\"\n+    tell 1 \"commit\"\n+    ;;\n+  \"g1c\")\n+    echo \"Running g1c test.\"\n+    tell 0 \"begin\"\n+    tell 1 \"begin\"\n+    tell 0 \"update test set value = 11 where id = 1\"\n+    tell 1 \"update test set value = 22 where id = 2\"\n+    #Still shows 2 => 20\n+    tell 0 \"select * from test\"\n+    #Still shows 1 => 10\n+    tell 1 \"select * from test\"\n+    tell 0 \"commit\"\n+    tell 1 \"commit\"\n+    ;;\n+  \"otv\")\n+    echo \"Running otv test.\"","path":"foundationdb.md","position":107,"original_position":107,"commit_id":"d615663a916bc3bcb830f612c52c9b0c0a446ec8","original_commit_id":"d615663a916bc3bcb830f612c52c9b0c0a446ec8","user":{"login":"ept","id":27544,"avatar_url":"https://avatars.githubusercontent.com/u/27544?v=3","gravatar_id":"","url":"https://api.github.com/users/ept","html_url":"https://github.com/ept","followers_url":"https://api.github.com/users/ept/followers","following_url":"https://api.github.com/users/ept/following{/other_user}","gists_url":"https://api.github.com/users/ept/gists{/gist_id}","starred_url":"https://api.github.com/users/ept/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ept/subscriptions","organizations_url":"https://api.github.com/users/ept/orgs","repos_url":"https://api.github.com/users/ept/repos","events_url":"https://api.github.com/users/ept/events{/privacy}","received_events_url":"https://api.github.com/users/ept/received_events","type":"User","site_admin":false},"body":"The OTV test is missing, could you add it?","created_at":"2014-11-25T23:28:55Z","updated_at":"2014-11-25T23:28:55Z","html_url":"https://github.com/ept/hermitage/pull/1#discussion_r20905712","pull_request_url":"https://api.github.com/repos/ept/hermitage/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ept/hermitage/pulls/comments/20905712"},"html":{"href":"https://github.com/ept/hermitage/pull/1#discussion_r20905712"},"pull_request":{"href":"https://api.github.com/repos/ept/hermitage/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ept/hermitage/pulls/1","id":25046061,"html_url":"https://github.com/ept/hermitage/pull/1","diff_url":"https://github.com/ept/hermitage/pull/1.diff","patch_url":"https://github.com/ept/hermitage/pull/1.patch","issue_url":"https://api.github.com/repos/ept/hermitage/issues/1","number":1,"state":"open","locked":false,"title":"Added support for FoundationDB SQL Layer","user":{"login":"jrullmann","id":1865328,"avatar_url":"https://avatars.githubusercontent.com/u/1865328?v=3","gravatar_id":"","url":"https://api.github.com/users/jrullmann","html_url":"https://github.com/jrullmann","followers_url":"https://api.github.com/users/jrullmann/followers","following_url":"https://api.github.com/users/jrullmann/following{/other_user}","gists_url":"https://api.github.com/users/jrullmann/gists{/gist_id}","starred_url":"https://api.github.com/users/jrullmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrullmann/subscriptions","organizations_url":"https://api.github.com/users/jrullmann/orgs","repos_url":"https://api.github.com/users/jrullmann/repos","events_url":"https://api.github.com/users/jrullmann/events{/privacy}","received_events_url":"https://api.github.com/users/jrullmann/received_events","type":"User","site_admin":false},"body":"This pull request adds support for FoundationDB SQL Layer, and reports the results in the README.\r\n\r\nPlease note there are a few requirements to run the tests in foundationdb.md:\r\n\r\n* FoundationDB Key-Value Store (server and client packages)\r\n* FoundationDB SQL Layer\r\n* tmux\r\n\r\nBecause Key-Value Store enforces a 5 second transaction limit I couldn't run the tests manually. Instead I'm submitting the tests as a batch file while relies on tmux to create the transactions.","created_at":"2014-11-25T22:28:56Z","updated_at":"2014-11-25T23:28:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2358547839feb27a82ec173ddca2da21ff4d30e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ept/hermitage/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ept/hermitage/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ept/hermitage/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ept/hermitage/issues/1/comments","statuses_url":"https://api.github.com/repos/ept/hermitage/statuses/d615663a916bc3bcb830f612c52c9b0c0a446ec8","head":{"label":"jrullmann:foundationdb","ref":"foundationdb","sha":"d615663a916bc3bcb830f612c52c9b0c0a446ec8","user":{"login":"jrullmann","id":1865328,"avatar_url":"https://avatars.githubusercontent.com/u/1865328?v=3","gravatar_id":"","url":"https://api.github.com/users/jrullmann","html_url":"https://github.com/jrullmann","followers_url":"https://api.github.com/users/jrullmann/followers","following_url":"https://api.github.com/users/jrullmann/following{/other_user}","gists_url":"https://api.github.com/users/jrullmann/gists{/gist_id}","starred_url":"https://api.github.com/users/jrullmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrullmann/subscriptions","organizations_url":"https://api.github.com/users/jrullmann/orgs","repos_url":"https://api.github.com/users/jrullmann/repos","events_url":"https://api.github.com/users/jrullmann/events{/privacy}","received_events_url":"https://api.github.com/users/jrullmann/received_events","type":"User","site_admin":false},"repo":{"id":27147778,"name":"hermitage","full_name":"jrullmann/hermitage","owner":{"login":"jrullmann","id":1865328,"avatar_url":"https://avatars.githubusercontent.com/u/1865328?v=3","gravatar_id":"","url":"https://api.github.com/users/jrullmann","html_url":"https://github.com/jrullmann","followers_url":"https://api.github.com/users/jrullmann/followers","following_url":"https://api.github.com/users/jrullmann/following{/other_user}","gists_url":"https://api.github.com/users/jrullmann/gists{/gist_id}","starred_url":"https://api.github.com/users/jrullmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrullmann/subscriptions","organizations_url":"https://api.github.com/users/jrullmann/orgs","repos_url":"https://api.github.com/users/jrullmann/repos","events_url":"https://api.github.com/users/jrullmann/events{/privacy}","received_events_url":"https://api.github.com/users/jrullmann/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jrullmann/hermitage","description":"What are the differences between the transaction isolation levels in databases? This is a suite of test cases which differentiate isolation levels.","fork":true,"url":"https://api.github.com/repos/jrullmann/hermitage","forks_url":"https://api.github.com/repos/jrullmann/hermitage/forks","keys_url":"https://api.github.com/repos/jrullmann/hermitage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jrullmann/hermitage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jrullmann/hermitage/teams","hooks_url":"https://api.github.com/repos/jrullmann/hermitage/hooks","issue_events_url":"https://api.github.com/repos/jrullmann/hermitage/issues/events{/number}","events_url":"https://api.github.com/repos/jrullmann/hermitage/events","assignees_url":"https://api.github.com/repos/jrullmann/hermitage/assignees{/user}","branches_url":"https://api.github.com/repos/jrullmann/hermitage/branches{/branch}","tags_url":"https://api.github.com/repos/jrullmann/hermitage/tags","blobs_url":"https://api.github.com/repos/jrullmann/hermitage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jrullmann/hermitage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jrullmann/hermitage/git/refs{/sha}","trees_url":"https://api.github.com/repos/jrullmann/hermitage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jrullmann/hermitage/statuses/{sha}","languages_url":"https://api.github.com/repos/jrullmann/hermitage/languages","stargazers_url":"https://api.github.com/repos/jrullmann/hermitage/stargazers","contributors_url":"https://api.github.com/repos/jrullmann/hermitage/contributors","subscribers_url":"https://api.github.com/repos/jrullmann/hermitage/subscribers","subscription_url":"https://api.github.com/repos/jrullmann/hermitage/subscription","commits_url":"https://api.github.com/repos/jrullmann/hermitage/commits{/sha}","git_commits_url":"https://api.github.com/repos/jrullmann/hermitage/git/commits{/sha}","comments_url":"https://api.github.com/repos/jrullmann/hermitage/comments{/number}","issue_comment_url":"https://api.github.com/repos/jrullmann/hermitage/issues/comments/{number}","contents_url":"https://api.github.com/repos/jrullmann/hermitage/contents/{+path}","compare_url":"https://api.github.com/repos/jrullmann/hermitage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jrullmann/hermitage/merges","archive_url":"https://api.github.com/repos/jrullmann/hermitage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jrullmann/hermitage/downloads","issues_url":"https://api.github.com/repos/jrullmann/hermitage/issues{/number}","pulls_url":"https://api.github.com/repos/jrullmann/hermitage/pulls{/number}","milestones_url":"https://api.github.com/repos/jrullmann/hermitage/milestones{/number}","notifications_url":"https://api.github.com/repos/jrullmann/hermitage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jrullmann/hermitage/labels{/name}","releases_url":"https://api.github.com/repos/jrullmann/hermitage/releases{/id}","created_at":"2014-11-25T21:52:59Z","updated_at":"2014-11-25T21:44:16Z","pushed_at":"2014-11-25T22:14:40Z","git_url":"git://github.com/jrullmann/hermitage.git","ssh_url":"git@github.com:jrullmann/hermitage.git","clone_url":"https://github.com/jrullmann/hermitage.git","svn_url":"https://github.com/jrullmann/hermitage","homepage":null,"size":176,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ept:master","ref":"master","sha":"b843b7b1ad02bec9b3d4bcc8f61d11ede927a4f0","user":{"login":"ept","id":27544,"avatar_url":"https://avatars.githubusercontent.com/u/27544?v=3","gravatar_id":"","url":"https://api.github.com/users/ept","html_url":"https://github.com/ept","followers_url":"https://api.github.com/users/ept/followers","following_url":"https://api.github.com/users/ept/following{/other_user}","gists_url":"https://api.github.com/users/ept/gists{/gist_id}","starred_url":"https://api.github.com/users/ept/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ept/subscriptions","organizations_url":"https://api.github.com/users/ept/orgs","repos_url":"https://api.github.com/users/ept/repos","events_url":"https://api.github.com/users/ept/events{/privacy}","received_events_url":"https://api.github.com/users/ept/received_events","type":"User","site_admin":false},"repo":{"id":26289803,"name":"hermitage","full_name":"ept/hermitage","owner":{"login":"ept","id":27544,"avatar_url":"https://avatars.githubusercontent.com/u/27544?v=3","gravatar_id":"","url":"https://api.github.com/users/ept","html_url":"https://github.com/ept","followers_url":"https://api.github.com/users/ept/followers","following_url":"https://api.github.com/users/ept/following{/other_user}","gists_url":"https://api.github.com/users/ept/gists{/gist_id}","starred_url":"https://api.github.com/users/ept/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ept/subscriptions","organizations_url":"https://api.github.com/users/ept/orgs","repos_url":"https://api.github.com/users/ept/repos","events_url":"https://api.github.com/users/ept/events{/privacy}","received_events_url":"https://api.github.com/users/ept/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ept/hermitage","description":"What are the differences between the transaction isolation levels in databases? This is a suite of test cases which differentiate isolation levels.","fork":false,"url":"https://api.github.com/repos/ept/hermitage","forks_url":"https://api.github.com/repos/ept/hermitage/forks","keys_url":"https://api.github.com/repos/ept/hermitage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ept/hermitage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ept/hermitage/teams","hooks_url":"https://api.github.com/repos/ept/hermitage/hooks","issue_events_url":"https://api.github.com/repos/ept/hermitage/issues/events{/number}","events_url":"https://api.github.com/repos/ept/hermitage/events","assignees_url":"https://api.github.com/repos/ept/hermitage/assignees{/user}","branches_url":"https://api.github.com/repos/ept/hermitage/branches{/branch}","tags_url":"https://api.github.com/repos/ept/hermitage/tags","blobs_url":"https://api.github.com/repos/ept/hermitage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ept/hermitage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ept/hermitage/git/refs{/sha}","trees_url":"https://api.github.com/repos/ept/hermitage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ept/hermitage/statuses/{sha}","languages_url":"https://api.github.com/repos/ept/hermitage/languages","stargazers_url":"https://api.github.com/repos/ept/hermitage/stargazers","contributors_url":"https://api.github.com/repos/ept/hermitage/contributors","subscribers_url":"https://api.github.com/repos/ept/hermitage/subscribers","subscription_url":"https://api.github.com/repos/ept/hermitage/subscription","commits_url":"https://api.github.com/repos/ept/hermitage/commits{/sha}","git_commits_url":"https://api.github.com/repos/ept/hermitage/git/commits{/sha}","comments_url":"https://api.github.com/repos/ept/hermitage/comments{/number}","issue_comment_url":"https://api.github.com/repos/ept/hermitage/issues/comments/{number}","contents_url":"https://api.github.com/repos/ept/hermitage/contents/{+path}","compare_url":"https://api.github.com/repos/ept/hermitage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ept/hermitage/merges","archive_url":"https://api.github.com/repos/ept/hermitage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ept/hermitage/downloads","issues_url":"https://api.github.com/repos/ept/hermitage/issues{/number}","pulls_url":"https://api.github.com/repos/ept/hermitage/pulls{/number}","milestones_url":"https://api.github.com/repos/ept/hermitage/milestones{/number}","notifications_url":"https://api.github.com/repos/ept/hermitage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ept/hermitage/labels{/name}","releases_url":"https://api.github.com/repos/ept/hermitage/releases{/id}","created_at":"2014-11-06T20:57:55Z","updated_at":"2014-11-25T23:17:12Z","pushed_at":"2014-11-25T17:22:31Z","git_url":"git://github.com/ept/hermitage.git","ssh_url":"git@github.com:ept/hermitage.git","clone_url":"https://github.com/ept/hermitage.git","svn_url":"https://github.com/ept/hermitage","homepage":null,"size":176,"stargazers_count":29,"watchers_count":29,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ept/hermitage/pulls/1"},"html":{"href":"https://github.com/ept/hermitage/pull/1"},"issue":{"href":"https://api.github.com/repos/ept/hermitage/issues/1"},"comments":{"href":"https://api.github.com/repos/ept/hermitage/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ept/hermitage/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ept/hermitage/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ept/hermitage/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ept/hermitage/statuses/d615663a916bc3bcb830f612c52c9b0c0a446ec8"}}}}