{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/durabletask/pulls/comments/195860812","pull_request_review_id":129314134,"id":195860812,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTg2MDgxMg==","diff_hunk":"@@ -513,10 +535,22 @@ public override Task StartAsync()\n                 Utils.ExtensionVersion);\n         }\n \n-        void UpdateEstimatedBytes(ref int estimatedBytes, string payload)\n+        static int GetEstimatedByteCount(DynamicTableEntity entity)\n         {\n-            int payloadBytes = Encoding.Unicode.GetByteCount(payload);\n-            estimatedBytes += payloadBytes > MaxStorageQueuePayloadSizeInBytes ? GuidByteSize : payloadBytes;\n+            // Assume at least 1 KB of data per entity to account for static-length properties\n+            int estimatedByteCount = 1024;\n+\n+            // Count the bytes for variable-length properties, which are assumed to always be strings\n+            foreach (string propertyName in VariableSizeEntityProperties)\n+            {\n+                EntityProperty property;\n+                if (entity.Properties.TryGetValue(propertyName, out property) && !string.IsNullOrEmpty(property.StringValue))\n+                {\n+                    estimatedByteCount += Encoding.Unicode.GetByteCount(property.StringValue);","path":"src/DurableTask.AzureStorage/Tracking/AzureTableTrackingStore.cs","position":111,"original_position":111,"commit_id":"7236b776fccdb0819bff5702b603a77dc939a73e","original_commit_id":"7236b776fccdb0819bff5702b603a77dc939a73e","user":{"login":"kashimiz","id":17170862,"node_id":"MDQ6VXNlcjE3MTcwODYy","avatar_url":"https://avatars1.githubusercontent.com/u/17170862?v=4","gravatar_id":"","url":"https://api.github.com/users/kashimiz","html_url":"https://github.com/kashimiz","followers_url":"https://api.github.com/users/kashimiz/followers","following_url":"https://api.github.com/users/kashimiz/following{/other_user}","gists_url":"https://api.github.com/users/kashimiz/gists{/gist_id}","starred_url":"https://api.github.com/users/kashimiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kashimiz/subscriptions","organizations_url":"https://api.github.com/users/kashimiz/orgs","repos_url":"https://api.github.com/users/kashimiz/repos","events_url":"https://api.github.com/users/kashimiz/events{/privacy}","received_events_url":"https://api.github.com/users/kashimiz/received_events","type":"User","site_admin":false},"body":"Curious; why UTF-16? Is this the format Table Storage uses?","created_at":"2018-06-15T21:00:57Z","updated_at":"2018-06-15T21:10:53Z","html_url":"https://github.com/Azure/durabletask/pull/194#discussion_r195860812","pull_request_url":"https://api.github.com/repos/Azure/durabletask/pulls/194","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Azure/durabletask/pulls/comments/195860812"},"html":{"href":"https://github.com/Azure/durabletask/pull/194#discussion_r195860812"},"pull_request":{"href":"https://api.github.com/repos/Azure/durabletask/pulls/194"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/durabletask/pulls/194","id":195265565,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MjY1NTY1","html_url":"https://github.com/Azure/durabletask/pull/194","diff_url":"https://github.com/Azure/durabletask/pull/194.diff","patch_url":"https://github.com/Azure/durabletask/pull/194.patch","issue_url":"https://api.github.com/repos/Azure/durabletask/issues/194","number":194,"state":"open","locked":false,"title":"DurableTask.AzureStorage: Alternate fix for the 4 MB max entity size which covers more scenarios.","user":{"login":"cgillum","id":2704139,"node_id":"MDQ6VXNlcjI3MDQxMzk=","avatar_url":"https://avatars2.githubusercontent.com/u/2704139?v=4","gravatar_id":"","url":"https://api.github.com/users/cgillum","html_url":"https://github.com/cgillum","followers_url":"https://api.github.com/users/cgillum/followers","following_url":"https://api.github.com/users/cgillum/following{/other_user}","gists_url":"https://api.github.com/users/cgillum/gists{/gist_id}","starred_url":"https://api.github.com/users/cgillum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgillum/subscriptions","organizations_url":"https://api.github.com/users/cgillum/orgs","repos_url":"https://api.github.com/users/cgillum/repos","events_url":"https://api.github.com/users/cgillum/events{/privacy}","received_events_url":"https://api.github.com/users/cgillum/received_events","type":"User","site_admin":false},"body":"This is a revised version of a previous pull request: https://github.com/Azure/durabletask/pull/191.  After merging, I did some testing and found a few issues. This new version addresses those issues.\r\n\r\nFYI @tohling and @gled4er ","created_at":"2018-06-15T19:39:02Z","updated_at":"2018-06-15T21:10:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e97d23b0839825969268c0298907ae19486ca4b0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/durabletask/pulls/194/commits","review_comments_url":"https://api.github.com/repos/Azure/durabletask/pulls/194/comments","review_comment_url":"https://api.github.com/repos/Azure/durabletask/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/durabletask/issues/194/comments","statuses_url":"https://api.github.com/repos/Azure/durabletask/statuses/7236b776fccdb0819bff5702b603a77dc939a73e","head":{"label":"Azure:azure-storage-entitybatchsize","ref":"azure-storage-entitybatchsize","sha":"7236b776fccdb0819bff5702b603a77dc939a73e","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":24898533,"node_id":"MDEwOlJlcG9zaXRvcnkyNDg5ODUzMw==","name":"durabletask","full_name":"Azure/durabletask","owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/durabletask","description":"Durable Task Framework allows users to write long running persistent workflows in C# using the async/await capabilities.","fork":false,"url":"https://api.github.com/repos/Azure/durabletask","forks_url":"https://api.github.com/repos/Azure/durabletask/forks","keys_url":"https://api.github.com/repos/Azure/durabletask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/durabletask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/durabletask/teams","hooks_url":"https://api.github.com/repos/Azure/durabletask/hooks","issue_events_url":"https://api.github.com/repos/Azure/durabletask/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/durabletask/events","assignees_url":"https://api.github.com/repos/Azure/durabletask/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/durabletask/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/durabletask/tags","blobs_url":"https://api.github.com/repos/Azure/durabletask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/durabletask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/durabletask/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/durabletask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/durabletask/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/durabletask/languages","stargazers_url":"https://api.github.com/repos/Azure/durabletask/stargazers","contributors_url":"https://api.github.com/repos/Azure/durabletask/contributors","subscribers_url":"https://api.github.com/repos/Azure/durabletask/subscribers","subscription_url":"https://api.github.com/repos/Azure/durabletask/subscription","commits_url":"https://api.github.com/repos/Azure/durabletask/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/durabletask/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/durabletask/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/durabletask/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/durabletask/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/durabletask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/durabletask/merges","archive_url":"https://api.github.com/repos/Azure/durabletask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/durabletask/downloads","issues_url":"https://api.github.com/repos/Azure/durabletask/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/durabletask/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/durabletask/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/durabletask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/durabletask/labels{/name}","releases_url":"https://api.github.com/repos/Azure/durabletask/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/durabletask/deployments","created_at":"2014-10-07T15:58:45Z","updated_at":"2018-06-12T08:42:05Z","pushed_at":"2018-06-15T19:56:21Z","git_url":"git://github.com/Azure/durabletask.git","ssh_url":"git@github.com:Azure/durabletask.git","clone_url":"https://github.com/Azure/durabletask.git","svn_url":"https://github.com/Azure/durabletask","homepage":null,"size":2686,"stargazers_count":340,"watchers_count":340,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":95,"mirror_url":null,"archived":false,"open_issues_count":52,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":95,"open_issues":52,"watchers":340,"default_branch":"master"}},"base":{"label":"Azure:azure-storage","ref":"azure-storage","sha":"b7bdbdfecbe2ed5ec27ee14b7b92a427461e1421","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":24898533,"node_id":"MDEwOlJlcG9zaXRvcnkyNDg5ODUzMw==","name":"durabletask","full_name":"Azure/durabletask","owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/durabletask","description":"Durable Task Framework allows users to write long running persistent workflows in C# using the async/await capabilities.","fork":false,"url":"https://api.github.com/repos/Azure/durabletask","forks_url":"https://api.github.com/repos/Azure/durabletask/forks","keys_url":"https://api.github.com/repos/Azure/durabletask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/durabletask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/durabletask/teams","hooks_url":"https://api.github.com/repos/Azure/durabletask/hooks","issue_events_url":"https://api.github.com/repos/Azure/durabletask/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/durabletask/events","assignees_url":"https://api.github.com/repos/Azure/durabletask/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/durabletask/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/durabletask/tags","blobs_url":"https://api.github.com/repos/Azure/durabletask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/durabletask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/durabletask/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/durabletask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/durabletask/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/durabletask/languages","stargazers_url":"https://api.github.com/repos/Azure/durabletask/stargazers","contributors_url":"https://api.github.com/repos/Azure/durabletask/contributors","subscribers_url":"https://api.github.com/repos/Azure/durabletask/subscribers","subscription_url":"https://api.github.com/repos/Azure/durabletask/subscription","commits_url":"https://api.github.com/repos/Azure/durabletask/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/durabletask/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/durabletask/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/durabletask/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/durabletask/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/durabletask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/durabletask/merges","archive_url":"https://api.github.com/repos/Azure/durabletask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/durabletask/downloads","issues_url":"https://api.github.com/repos/Azure/durabletask/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/durabletask/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/durabletask/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/durabletask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/durabletask/labels{/name}","releases_url":"https://api.github.com/repos/Azure/durabletask/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/durabletask/deployments","created_at":"2014-10-07T15:58:45Z","updated_at":"2018-06-12T08:42:05Z","pushed_at":"2018-06-15T19:56:21Z","git_url":"git://github.com/Azure/durabletask.git","ssh_url":"git@github.com:Azure/durabletask.git","clone_url":"https://github.com/Azure/durabletask.git","svn_url":"https://github.com/Azure/durabletask","homepage":null,"size":2686,"stargazers_count":340,"watchers_count":340,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":95,"mirror_url":null,"archived":false,"open_issues_count":52,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":95,"open_issues":52,"watchers":340,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/durabletask/pulls/194"},"html":{"href":"https://github.com/Azure/durabletask/pull/194"},"issue":{"href":"https://api.github.com/repos/Azure/durabletask/issues/194"},"comments":{"href":"https://api.github.com/repos/Azure/durabletask/issues/194/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/durabletask/pulls/194/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/durabletask/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/durabletask/pulls/194/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/durabletask/statuses/7236b776fccdb0819bff5702b603a77dc939a73e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"kashimiz"}}