Skip to content

Conversation

@kmg-stripe
Copy link
Collaborator

@kmg-stripe kmg-stripe commented Aug 14, 2024

  1. All source job connectors have ZK config hard-coded due to parameter-less
    MantisSourceJobConnectorFactory. Configuring a MantisClient in this context
    doesn't make sense, since we can reference the configured HighAvailabilityServices

  2. DynamoDBMasterMonitor was erroneously logging parse errors when reading
    leadership info from the DB.

  3. HighAvailabilityServicesImpl was setting the leader state to NULL, which lead
    to ResourceClusterGatewayClient constructing an invalid URI. Updating to not
    update the ResourceClusterGatewayClient when master is NULL.

Context

Explain context and other details for this pull request.

Checklist

  • ./gradlew build compiles code correctly
  • Added new tests where applicable
  • ./gradlew test passes all tests
  • Extended README or added javadocs where applicable

1. All source job connectors have ZK config hard-coded due to parameter-less
MantisSourceJobConnectorFactory.  Configuring a MantisClient in this context
doesn't make sense, since we can reference the configured HighAvailabilityServices

2. DynamoDBMasterMonitor was erroneuously logging parse errors when reading
leadership info from the DB.

3. HighAvailabilityServicesImpl was setting the leader state to NULL, which lead
to ResourceClusterGatewayClient constructing an invalid URI.  Updating to not
update the ResourceClusterGatewayClient when master is NULL.
@github-actions
Copy link

github-actions bot commented Aug 15, 2024

Test Results

537 tests  ±0   531 ✅ ±0   7m 44s ⏱️ ±0s
139 suites ±0     6 💤 ±0 
139 files   ±0     0 ❌ ±0 

Results for commit 39d3a18. ± Comparison against base commit 2589509.

♻️ This comment has been updated with latest results.

this(new MantisClient(properties));
}

public Builder() {
Copy link
Collaborator Author

@kmg-stripe kmg-stripe Aug 15, 2024

Choose a reason for hiding this comment

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

We were seeing log spam, where a JobSource triggers this code path. It doesn't appear to break anything, but seems a bit weird and leads to log spam. HighAvailabilityServicesUtil logs a few warnings (i.e. "HA service running in local mode. This is only valid in local test."), because this path attempts to "create" the HA services with no properties. I think it is a little weird because I wouldn't expect a job writer to pass Mantis platform configuration for discovering the master, so it seems best to use HighAvailabilityServicesUtil. That is, unless I am missing something...

My understanding is that the HA services should generally be configured if we are here, so should just try to get the reference to HA services.

@kmg-stripe kmg-stripe marked this pull request as ready for review August 15, 2024 01:45
@kmg-stripe
Copy link
Collaborator Author

cc: @codyrioux

@kmg-stripe
Copy link
Collaborator Author

@Andyz26 - Just a ping... I was also hoping to cut a release after this one.

Copy link
Collaborator

@crioux-stripe crioux-stripe left a comment

Choose a reason for hiding this comment

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

LGTM.

this.clientWrapper = clientWrapper;
}

public MantisClient(HighAvailabilityServices haServices) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would suggest adding a javadoc here to let user know this will start running the HAService. Also in this case who should be closing the haService if it creates other threads?


public MantisSourceJobConnector() {
props = new Properties();
// todo(kmg-stripe): Can we remove this? It seems it is only used by main in this class for testing.
Copy link
Collaborator

Choose a reason for hiding this comment

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

feel free to remove this (or move it to test).

@kmg-stripe kmg-stripe merged commit 46e8c23 into Netflix:master Aug 21, 2024
@kmg-stripe kmg-stripe had a problem deploying to Integrate Pull Request September 18, 2024 15:13 — with GitHub Actions Failure
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.

3 participants