You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Yifan Cai (Jira)" <ji...@apache.org> on 2020/01/18 06:35:00 UTC
[jira] [Comment Edited] (CASSANDRA-15514) Properly clean up
DefaultSessionProvider#sessionCache when closing QueryReplayer
[ https://issues.apache.org/jira/browse/CASSANDRA-15514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17018520#comment-17018520 ]
Yifan Cai edited comment on CASSANDRA-15514 at 1/18/20 6:34 AM:
----------------------------------------------------------------
[PR|https://github.com/apache/cassandra/pull/427], [code|https://github.com/yifan-c/cassandra/tree/CASSANDRA-15514], [test|https://app.circleci.com/github/yifan-c/cassandra/pipelines/538442be-e3c6-4b1d-844a-5ff48a37fa55/workflows/658295e7-331a-4f6d-a014-f8fa189043a9]
Briefly, the patch includes
* Remove the session from cache when the {{DefaultSessionProvider}} is being closed as closing the query replayer.
* Add in-jvm dtest to simulate replaying queries end-to-end. Replay and close twice to show the sessions are released.
was (Author: yifanc):
[PR|https://github.com/apache/cassandra/pull/427], [code|https://github.com/yifan-c/cassandra/tree/CASSANDRA-15514], [test|https://app.circleci.com/github/yifan-c/cassandra/pipelines/52714adb-1e2e-4d5e-9cca-fa8652364576/workflows/4d732111-1e44-4c2b-939e-f01049b923ec]
Briefly, the patch includes
* Remove the session from cache when the {{DefaultSessionProvider}} is being closed as closing the query replayer.
* Add in-jvm dtest to simulate replaying queries end-to-end. Replay and close twice to show the sessions are released.
> Properly clean up DefaultSessionProvider#sessionCache when closing QueryReplayer
> --------------------------------------------------------------------------------
>
> Key: CASSANDRA-15514
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15514
> Project: Cassandra
> Issue Type: Bug
> Components: Tool/fql
> Reporter: Yifan Cai
> Assignee: Yifan Cai
> Priority: Normal
> Fix For: 4.0-beta
>
>
> The {{DefaultSessionProvider}} used by the {{QueryReplayer}} caches the sessions by hostname. When closing, the sessions and their associated clusters are closed but they never get removed from the cache.
> When connecting to the same host, the closed session is returned, which is unexpected.
> Besides the unexpected behavior, the session references remaining in the cache leaks resources.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org