Skip to content
This repository was archived by the owner on Aug 19, 2019. It is now read-only.

Conversation

@supriyagarg
Copy link
Contributor

No description provided.

@supriyagarg supriyagarg force-pushed the request_count_limit branch 3 times, most recently from 2eb3b98 to c54b554 Compare April 4, 2018 16:46
@supriyagarg supriyagarg force-pushed the request_count_limit branch from c54b554 to 4f83350 Compare April 4, 2018 16:47
Copy link
Contributor

@ACEmilG ACEmilG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good, however I do wonder about making this configurable above 1k. Given that there is a limit on the server-side, should we enforce this limit on the client? ie the limit is min(1k, configuration)

"v1beta2/projects/{{project_id}}/resourceMetadata:batchUpdate",
config.MetadataIngestionEndpointFormat());
EXPECT_EQ(8*1024*1024, config.MetadataIngestionRequestSizeLimitBytes());
EXPECT_EQ(1000, config.MetadataIngestionRequestSizeLimitCount());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add a check in the PopulatedConfig test for the non-default case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

src/reporter.cc Outdated
continue;
}
if (total_size + size > limit_bytes) {
if (entries.size() > limit_count || total_size + size > limit_bytes) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused by this line. Seems like we're already violating these bounds no? Unless SendMetadataEntry does some special batching.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, there should be an equality here since the count does not include the latest entry. Updated.

@supriyagarg supriyagarg force-pushed the request_count_limit branch from 7012443 to 8d66b62 Compare April 4, 2018 19:10
Copy link
Contributor

@dhrupadb dhrupadb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👌

Copy link
Contributor

@ACEmilG ACEmilG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@supriyagarg supriyagarg merged commit 01b0082 into Stackdriver:master Apr 4, 2018
@supriyagarg supriyagarg deleted the request_count_limit branch April 4, 2018 22:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants