Blacklist Refactoring #89

Merged
merged 3 commits into from Nov 21, 2012

Conversation

Projects
None yet
2 participants
Contributor

eplowe commented Nov 21, 2012

Some bug fixes and small tweaks to the blacklisting enhancements.

Bug Fixes

  • When removing a server from the blacklist it was not being sent back to the serverqueue
  • Added some additional exception types to handle in Operation::TryExecute()
  • Added an additional input parameter on Operation::ExceptionOccuredRetryExecution called: bool markClientAsUnhealthy so that we can selectively blacklist a server when retrying.
  • In Operation::TryExecute() after Execute() is called must mark HasError = false and Error = null. If not and there is an exception thrown on the first pass but the next pass results in a valid execution the exception was still being thrown.

Additions

  • Added ServerRecoveryInterval to ConnectionString/Builder.
  • Turned the recovery timer into a "one shot" timer and calling the Timer::Change() method at the end of the callback to avoid potential overlap. We could consider using Timers.Timer but then we'd need to think about to handle overlap there as well. Potentially with a Monitor.TryEnter? I am open to suggestions.

eplowe added some commits Nov 20, 2012

Some bug tweaks to blacklisting enhancements
	*When removing a server from the blacklist it was not being sent back to the serverqueue
	*Added some additional exception types to handle in Operation::TryExecute()
	*Added an additional input parameter on Operation::ExceptionOccuredRetryExecution called: bool markClientAsUnhealthy
	so that we can selectively blacklist a server when retrying.
	*In Operation::TryExecute() after Execute() is called must mark HasError = false and Error = null. If not and there is
	an exception thrown on the first pass but the next pass results in a valid execution the exception was still being thrown.

Added ServerRecoveryInterval to ConnectionString/Builder.
	Turned the recovery timer into a "one shot" timer and calling the Timer::Change() method at the end of the callback
	to avoid potential overlap. We could consider using Timers.Timer but then we'd need to think about to handle overlap there as well.
	Potentially with a Monitor.TryEnter? I am open to suggestions.

nberardi added a commit that referenced this pull request Nov 21, 2012

@nberardi nberardi merged commit 895edb5 into fluentcassandra:master Nov 21, 2012

nberardi added a commit that referenced this pull request Nov 21, 2012

nberardi added a commit that referenced this pull request Nov 21, 2012

changed connection name from Server Recovery Interval to Server Polli…
…ng Interval incase we want to preemptively check for bad servers in the future, issue #89
Contributor

nberardi commented Nov 21, 2012

The only real change I made was the constant in RoundRobinServerManager. The default value really shouldn't be on a configurable thing like a manager, since it can easily change and the server polling interval can be used in other non round robin implementations.

Contributor

nberardi commented Nov 21, 2012

Overall a good command thanks.

Contributor

eplowe commented Nov 21, 2012

Good call.
On Nov 21, 2012 3:55 PM, "Nick Berardi" notifications@github.com wrote:

The only real change I made was the constant in RoundRobinServerManager.
The default value really shouldn't be on a configurable thing like a
manager, since it can easily change and the server polling interval can be
used in other non round robin implementations.


Reply to this email directly or view it on GitHubhttps://github.com/managedfusion/fluentcassandra/pull/89#issuecomment-10613932.

@ghost ghost assigned nberardi Jan 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment