CassandraClientBase nodes collection is not getting cleared #185

Closed
rickcole3 opened this Issue Feb 27, 2013 · 6 comments

2 participants

@rickcole3

I am getting some inconsistent behavior when using batch mode in Kundera. After committing the transaction, I notice that the Batcher.clear() method (which is implemented on the ThriftClient/PelopsClient) is never called to clear out the nodes collection. As a result, every transaction adds to this list, and the list of nodes gets executed over and over again as well as growing infinitely. The only place I see clear called in in the close() method and onBatchRollBack(). Any ideas on how to get this fixed?

@mevivs
Collaborator

i will look into this.

-Vivek

@mevivs
Collaborator

Hi,
I had a look. It is an issue and a trivial fix for this issue is to modify finally block as :

In CassandraClientBase.java=> executeBatch method,

        finally
        {
            clear();
            releaseConnection(pooledConnection);
        }

        return mutationMap.size();

Just before returining map size.

Let me know, if it works for you. I will get this fixed in 2.4

-Vivek

@mevivs mevivs was assigned Feb 28, 2013
@rickcole3

That's awesome. Thanks for the quick response. When do you expect 2.4 will be released? I am having a couple of other issues that I want to see if 2.4 has addressed.

@mevivs
Collaborator

Did it work for you?
It will be releasing within a week or so. Feel free to share more on issues.

-Vivek

@rickcole3

This looks like it will work. I will create another thread for the other issues I am seeing.

@mevivs mevivs added a commit that referenced this issue Mar 1, 2013
@mevivs mevivs Fixed issue #185 2e48752
@mevivs
Collaborator

Closing. Releasing with 2.4

@mevivs mevivs closed this Mar 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment