Fix Issue #110 -- Prevent infinite recursion in login code path #111

Merged
merged 2 commits into from Jan 29, 2013

Projects

None yet

2 participants

@clamanna

GetClient / Login have a cyclic dependency. When we fetch the client, we do not always want to Login -- as a result, add a boolean flag to indicate whether or not a login is required.

@clamanna clamanna Fix Issue #110 -- Prevent infinite recursion in login code path
GetClient / Login have a cyclic dependency. When we fetch the client, we
do not always want to Login -- as a result, add a boolean flag to
indicate whether or not a login is required.
92a59f4
@nberardi nberardi commented on an outdated diff Jan 28, 2013
src/CassandraSession.cs
@@ -94,7 +94,7 @@ public CassandraSession(IConnectionProvider connectionProvider, ConsistencyLevel
/// </summary>
/// <param name="setKeyspace"></param>
/// <returns></returns>
- internal CassandraClientWrapper GetClient(bool setKeyspace = true, bool? setCqlVersion = null)
+ internal CassandraClientWrapper GetClient(bool setKeyspace = true, bool? setCqlVersion = null, bool login = true)
@nberardi
nberardi Jan 28, 2013

Are we sure we want login turned on by default, because most setups don't use login.

@nberardi
nberardi Jan 28, 2013

Nevermind I see what you are doing. You are copying the behavior of setKeyspace. I think it would make more sense if you kept with the standard and renamed to setLogin = true.

@clamanna

Renamed it to "setLogin" per your comment. Let me know if you have any other thoughts

@nberardi nberardi merged commit 21e3480 into fluentcassandra:master Jan 29, 2013
@nberardi

Thanks for the commit.

@clamanna

No problem -- could you push it out through Nuget so I can pull it down? (currently have to rebuild locally & include)

Thanks!

@clamanna

And, thank you for this great library -- we use it for all our cassandra clients (e.g. interview here http://planetcassandra.org/blog/post/5-minute-interview-metricshub)

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