{"action":"created","comment":{"url":"https://api.github.com/repos/azkaban/azkaban/pulls/comments/171027781","pull_request_review_id":99809200,"id":171027781,"diff_hunk":"@@ -103,6 +103,21 @@ public void testCreateProject() throws Exception {\n     Assert.assertEquals(project.getLastModifiedUser(), \"testUser1\");\n   }\n \n+  @Test\n+  public void testCreateProjectsWithDifferentCases() {\n+    final String projectName = \"mytestproject\";\n+    final String projectDescription = \"This is my new project with lower cases.\";\n+    final User user = new User(\"testUser1\");","path":"azkaban-common/src/test/java/azkaban/project/JdbcProjectImplTest.java","position":8,"original_position":8,"commit_id":"45c8c1faab433ab59779edfbf36c876751c43516","original_commit_id":"45c8c1faab433ab59779edfbf36c876751c43516","user":{"login":"HappyRay","id":6646529,"avatar_url":"https://avatars1.githubusercontent.com/u/6646529?v=4","gravatar_id":"","url":"https://api.github.com/users/HappyRay","html_url":"https://github.com/HappyRay","followers_url":"https://api.github.com/users/HappyRay/followers","following_url":"https://api.github.com/users/HappyRay/following{/other_user}","gists_url":"https://api.github.com/users/HappyRay/gists{/gist_id}","starred_url":"https://api.github.com/users/HappyRay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HappyRay/subscriptions","organizations_url":"https://api.github.com/users/HappyRay/orgs","repos_url":"https://api.github.com/users/HappyRay/repos","events_url":"https://api.github.com/users/HappyRay/events{/privacy}","received_events_url":"https://api.github.com/users/HappyRay/received_events","type":"User","site_admin":false},"body":"Thanks for adding new test cases","created_at":"2018-02-27T18:52:35Z","updated_at":"2018-02-27T18:52:35Z","html_url":"https://github.com/azkaban/azkaban/pull/1657#discussion_r171027781","pull_request_url":"https://api.github.com/repos/azkaban/azkaban/pulls/1657","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/comments/171027781"},"html":{"href":"https://github.com/azkaban/azkaban/pull/1657#discussion_r171027781"},"pull_request":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/1657"}},"in_reply_to_id":170783644},"pull_request":{"url":"https://api.github.com/repos/azkaban/azkaban/pulls/1657","id":170889916,"html_url":"https://github.com/azkaban/azkaban/pull/1657","diff_url":"https://github.com/azkaban/azkaban/pull/1657.diff","patch_url":"https://github.com/azkaban/azkaban/pull/1657.patch","issue_url":"https://api.github.com/repos/azkaban/azkaban/issues/1657","number":1657,"state":"open","locked":false,"title":"Change project cache to case insensitive.","user":{"login":"jamiesjc","id":23324945,"avatar_url":"https://avatars0.githubusercontent.com/u/23324945?v=4","gravatar_id":"","url":"https://api.github.com/users/jamiesjc","html_url":"https://github.com/jamiesjc","followers_url":"https://api.github.com/users/jamiesjc/followers","following_url":"https://api.github.com/users/jamiesjc/following{/other_user}","gists_url":"https://api.github.com/users/jamiesjc/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiesjc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiesjc/subscriptions","organizations_url":"https://api.github.com/users/jamiesjc/orgs","repos_url":"https://api.github.com/users/jamiesjc/repos","events_url":"https://api.github.com/users/jamiesjc/events{/privacy}","received_events_url":"https://api.github.com/users/jamiesjc/received_events","type":"User","site_admin":false},"body":"The issue happened when a user uploaded a project through our internal deployment with project name mismatched in case (e.g. expected was my_project, actual was MY_PROJECT). From the UI page, it showed the project was deployed successfully but the lastModifiedTime of the project was not updated. Also, the job properties sometimes disappeared. When the user ran the flow, it actually picked up the old project version.\r\nWe figured out that the root cause of these issues is the inconsistency between project cache and Mysql database. The project name key in project cache is case sensitive whereas in Mysql DB it's case insensitive by default. When the case of project name does not match, the project couldn't be found in project cache, but it could be found in DB. As a result, the project object returned was a new instance, and the original cache was not updated.\r\nTo fix the inconsistency issue, either we can change Mysql DB to case sensitive by changing the COLLATION, e.g.:\r\nmysql> ALTER TABLE projects MODIFY name VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin;\r\nOr we can change project cache to case insensitive. \r\nI've tried and verified that both can work properly. Since changing the COLLATION would involve creating index in DB, I would prefer changing the project cache instead. Besides, users wouldn't be allowed to create two projects with same letters but different cases, which remains the same behavior as of today.\r\nI shared a document with more details in our internal ticket: LIHADOOP-34114\r\nAlso, I explicitly set Mysql DB to case insensitive and changed the H2 DB for unit tests to case insensitive as well.","created_at":"2018-02-22T22:57:50Z","updated_at":"2018-02-27T18:52:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"299b8ca5fe4a9057b008dc2f822428078274f85f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/azkaban/azkaban/pulls/1657/commits","review_comments_url":"https://api.github.com/repos/azkaban/azkaban/pulls/1657/comments","review_comment_url":"https://api.github.com/repos/azkaban/azkaban/pulls/comments{/number}","comments_url":"https://api.github.com/repos/azkaban/azkaban/issues/1657/comments","statuses_url":"https://api.github.com/repos/azkaban/azkaban/statuses/45c8c1faab433ab59779edfbf36c876751c43516","head":{"label":"jamiesjc:changeProjectNameToCaseSensitiveInDB","ref":"changeProjectNameToCaseSensitiveInDB","sha":"45c8c1faab433ab59779edfbf36c876751c43516","user":{"login":"jamiesjc","id":23324945,"avatar_url":"https://avatars0.githubusercontent.com/u/23324945?v=4","gravatar_id":"","url":"https://api.github.com/users/jamiesjc","html_url":"https://github.com/jamiesjc","followers_url":"https://api.github.com/users/jamiesjc/followers","following_url":"https://api.github.com/users/jamiesjc/following{/other_user}","gists_url":"https://api.github.com/users/jamiesjc/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiesjc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiesjc/subscriptions","organizations_url":"https://api.github.com/users/jamiesjc/orgs","repos_url":"https://api.github.com/users/jamiesjc/repos","events_url":"https://api.github.com/users/jamiesjc/events{/privacy}","received_events_url":"https://api.github.com/users/jamiesjc/received_events","type":"User","site_admin":false},"repo":{"id":73132656,"name":"azkaban","full_name":"jamiesjc/azkaban","owner":{"login":"jamiesjc","id":23324945,"avatar_url":"https://avatars0.githubusercontent.com/u/23324945?v=4","gravatar_id":"","url":"https://api.github.com/users/jamiesjc","html_url":"https://github.com/jamiesjc","followers_url":"https://api.github.com/users/jamiesjc/followers","following_url":"https://api.github.com/users/jamiesjc/following{/other_user}","gists_url":"https://api.github.com/users/jamiesjc/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiesjc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiesjc/subscriptions","organizations_url":"https://api.github.com/users/jamiesjc/orgs","repos_url":"https://api.github.com/users/jamiesjc/repos","events_url":"https://api.github.com/users/jamiesjc/events{/privacy}","received_events_url":"https://api.github.com/users/jamiesjc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamiesjc/azkaban","description":"Azkaban workflow manager.","fork":true,"url":"https://api.github.com/repos/jamiesjc/azkaban","forks_url":"https://api.github.com/repos/jamiesjc/azkaban/forks","keys_url":"https://api.github.com/repos/jamiesjc/azkaban/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamiesjc/azkaban/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamiesjc/azkaban/teams","hooks_url":"https://api.github.com/repos/jamiesjc/azkaban/hooks","issue_events_url":"https://api.github.com/repos/jamiesjc/azkaban/issues/events{/number}","events_url":"https://api.github.com/repos/jamiesjc/azkaban/events","assignees_url":"https://api.github.com/repos/jamiesjc/azkaban/assignees{/user}","branches_url":"https://api.github.com/repos/jamiesjc/azkaban/branches{/branch}","tags_url":"https://api.github.com/repos/jamiesjc/azkaban/tags","blobs_url":"https://api.github.com/repos/jamiesjc/azkaban/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamiesjc/azkaban/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamiesjc/azkaban/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamiesjc/azkaban/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamiesjc/azkaban/statuses/{sha}","languages_url":"https://api.github.com/repos/jamiesjc/azkaban/languages","stargazers_url":"https://api.github.com/repos/jamiesjc/azkaban/stargazers","contributors_url":"https://api.github.com/repos/jamiesjc/azkaban/contributors","subscribers_url":"https://api.github.com/repos/jamiesjc/azkaban/subscribers","subscription_url":"https://api.github.com/repos/jamiesjc/azkaban/subscription","commits_url":"https://api.github.com/repos/jamiesjc/azkaban/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamiesjc/azkaban/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamiesjc/azkaban/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamiesjc/azkaban/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamiesjc/azkaban/contents/{+path}","compare_url":"https://api.github.com/repos/jamiesjc/azkaban/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamiesjc/azkaban/merges","archive_url":"https://api.github.com/repos/jamiesjc/azkaban/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamiesjc/azkaban/downloads","issues_url":"https://api.github.com/repos/jamiesjc/azkaban/issues{/number}","pulls_url":"https://api.github.com/repos/jamiesjc/azkaban/pulls{/number}","milestones_url":"https://api.github.com/repos/jamiesjc/azkaban/milestones{/number}","notifications_url":"https://api.github.com/repos/jamiesjc/azkaban/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamiesjc/azkaban/labels{/name}","releases_url":"https://api.github.com/repos/jamiesjc/azkaban/releases{/id}","deployments_url":"https://api.github.com/repos/jamiesjc/azkaban/deployments","created_at":"2016-11-08T00:13:14Z","updated_at":"2016-11-08T00:13:20Z","pushed_at":"2018-02-26T05:19:08Z","git_url":"git://github.com/jamiesjc/azkaban.git","ssh_url":"git@github.com:jamiesjc/azkaban.git","clone_url":"https://github.com/jamiesjc/azkaban.git","svn_url":"https://github.com/jamiesjc/azkaban","homepage":"https://azkaban.github.io","size":47428,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"azkaban:master","ref":"master","sha":"c614e25263d6d26cc674df416cdbecd4003dde44","user":{"login":"azkaban","id":213618,"avatar_url":"https://avatars0.githubusercontent.com/u/213618?v=4","gravatar_id":"","url":"https://api.github.com/users/azkaban","html_url":"https://github.com/azkaban","followers_url":"https://api.github.com/users/azkaban/followers","following_url":"https://api.github.com/users/azkaban/following{/other_user}","gists_url":"https://api.github.com/users/azkaban/gists{/gist_id}","starred_url":"https://api.github.com/users/azkaban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azkaban/subscriptions","organizations_url":"https://api.github.com/users/azkaban/orgs","repos_url":"https://api.github.com/users/azkaban/repos","events_url":"https://api.github.com/users/azkaban/events{/privacy}","received_events_url":"https://api.github.com/users/azkaban/received_events","type":"Organization","site_admin":false},"repo":{"id":6271421,"name":"azkaban","full_name":"azkaban/azkaban","owner":{"login":"azkaban","id":213618,"avatar_url":"https://avatars0.githubusercontent.com/u/213618?v=4","gravatar_id":"","url":"https://api.github.com/users/azkaban","html_url":"https://github.com/azkaban","followers_url":"https://api.github.com/users/azkaban/followers","following_url":"https://api.github.com/users/azkaban/following{/other_user}","gists_url":"https://api.github.com/users/azkaban/gists{/gist_id}","starred_url":"https://api.github.com/users/azkaban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azkaban/subscriptions","organizations_url":"https://api.github.com/users/azkaban/orgs","repos_url":"https://api.github.com/users/azkaban/repos","events_url":"https://api.github.com/users/azkaban/events{/privacy}","received_events_url":"https://api.github.com/users/azkaban/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azkaban/azkaban","description":"Azkaban workflow manager.","fork":false,"url":"https://api.github.com/repos/azkaban/azkaban","forks_url":"https://api.github.com/repos/azkaban/azkaban/forks","keys_url":"https://api.github.com/repos/azkaban/azkaban/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azkaban/azkaban/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azkaban/azkaban/teams","hooks_url":"https://api.github.com/repos/azkaban/azkaban/hooks","issue_events_url":"https://api.github.com/repos/azkaban/azkaban/issues/events{/number}","events_url":"https://api.github.com/repos/azkaban/azkaban/events","assignees_url":"https://api.github.com/repos/azkaban/azkaban/assignees{/user}","branches_url":"https://api.github.com/repos/azkaban/azkaban/branches{/branch}","tags_url":"https://api.github.com/repos/azkaban/azkaban/tags","blobs_url":"https://api.github.com/repos/azkaban/azkaban/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azkaban/azkaban/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azkaban/azkaban/git/refs{/sha}","trees_url":"https://api.github.com/repos/azkaban/azkaban/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azkaban/azkaban/statuses/{sha}","languages_url":"https://api.github.com/repos/azkaban/azkaban/languages","stargazers_url":"https://api.github.com/repos/azkaban/azkaban/stargazers","contributors_url":"https://api.github.com/repos/azkaban/azkaban/contributors","subscribers_url":"https://api.github.com/repos/azkaban/azkaban/subscribers","subscription_url":"https://api.github.com/repos/azkaban/azkaban/subscription","commits_url":"https://api.github.com/repos/azkaban/azkaban/commits{/sha}","git_commits_url":"https://api.github.com/repos/azkaban/azkaban/git/commits{/sha}","comments_url":"https://api.github.com/repos/azkaban/azkaban/comments{/number}","issue_comment_url":"https://api.github.com/repos/azkaban/azkaban/issues/comments{/number}","contents_url":"https://api.github.com/repos/azkaban/azkaban/contents/{+path}","compare_url":"https://api.github.com/repos/azkaban/azkaban/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azkaban/azkaban/merges","archive_url":"https://api.github.com/repos/azkaban/azkaban/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azkaban/azkaban/downloads","issues_url":"https://api.github.com/repos/azkaban/azkaban/issues{/number}","pulls_url":"https://api.github.com/repos/azkaban/azkaban/pulls{/number}","milestones_url":"https://api.github.com/repos/azkaban/azkaban/milestones{/number}","notifications_url":"https://api.github.com/repos/azkaban/azkaban/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azkaban/azkaban/labels{/name}","releases_url":"https://api.github.com/repos/azkaban/azkaban/releases{/id}","deployments_url":"https://api.github.com/repos/azkaban/azkaban/deployments","created_at":"2012-10-18T01:34:53Z","updated_at":"2018-02-27T16:12:59Z","pushed_at":"2018-02-27T00:16:25Z","git_url":"git://github.com/azkaban/azkaban.git","ssh_url":"git@github.com:azkaban/azkaban.git","clone_url":"https://github.com/azkaban/azkaban.git","svn_url":"https://github.com/azkaban/azkaban","homepage":"https://azkaban.github.io","size":47307,"stargazers_count":1631,"watchers_count":1631,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":785,"mirror_url":null,"archived":false,"open_issues_count":396,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":785,"open_issues":396,"watchers":1631,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/1657"},"html":{"href":"https://github.com/azkaban/azkaban/pull/1657"},"issue":{"href":"https://api.github.com/repos/azkaban/azkaban/issues/1657"},"comments":{"href":"https://api.github.com/repos/azkaban/azkaban/issues/1657/comments"},"review_comments":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/1657/comments"},"review_comment":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/1657/commits"},"statuses":{"href":"https://api.github.com/repos/azkaban/azkaban/statuses/45c8c1faab433ab59779edfbf36c876751c43516"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"HappyRay"}}