Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Bucket Support #136

Merged
merged 41 commits into from
Jun 24, 2021
Merged

Multiple Bucket Support #136

merged 41 commits into from
Jun 24, 2021

Conversation

rccarper
Copy link
Contributor

@rccarper rccarper commented Jun 23, 2021

Description of changes:

  • Adding support for multiple buckets/endpoints per client. I've removed the manual connection management and tracking of individual IP addresses. Instead, we track endpoint names that each have a connection manager via aws-c-http. Some logic is still done around the number of IP's for a particular endpoint, but we know longer track each actual IP.
  • The name "aws_s3_vip_connection" no longer makes sense because we no longer track connections in relation to VIPs. That will be done here: Renaming vip_connection #137

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@justinboswell justinboswell left a comment

Choose a reason for hiding this comment

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

Fix-n-ship!

/* Connection manager shared by all VIP connections. */
struct aws_http_connection_manager *http_connection_manager;
/* Callback for when the reference count of this endpoint hits zero. */
aws_s3_endpoint_ref_zero_fn *ref_count_zero_callback;
Copy link
Contributor

Choose a reason for hiding this comment

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

just call this a destructor, I know it's nomenclature that aws_refcount uses, but this is weird to read


void (*schedule_process_work_synced)(struct aws_s3_client *client);

void (*process_work)(struct aws_s3_client *client);

void (
*setup_vip_connection_retry_token)(struct aws_s3_client *client, struct aws_s3_vip_connection *vip_connection);
bool (*endpoint_ref_count_zero)(struct aws_s3_endpoint *endpoint);
Copy link
Contributor

Choose a reason for hiding this comment

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

Destructor!

static const uint16_t s_http_port = 80;
static const uint16_t s_https_port = 443;

static size_t s_dns_host_address_ttl_seconds = 5 * 60;
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be on the options struct, and default values like this should be centralized (so that when we hook all of this up to ENV vars and config APIs it's easy to find)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants