[ 
https://issues.apache.org/jira/browse/KUDU-1621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16442950#comment-16442950
 ] 

Alexey Serbin commented on KUDU-1621:
-------------------------------------

Yep, that makes sense to me.

As of now, the destructor of KuduSession looks like the following:

{noformat}
KuduSession::~KuduSession() {
  WARN_NOT_OK(data_->Close(true), "Closed Session with pending operations.");
  delete data_;
}
{noformat}

However, due to force closure {{Close(true)}}, that warning would not be 
reported anyway.  Indeed, some clean-up is needed there.

> Flush lingering operations upon destruction of an AUTO_FLUSH_BACKGROUND 
> session
> -------------------------------------------------------------------------------
>
>                 Key: KUDU-1621
>                 URL: https://issues.apache.org/jira/browse/KUDU-1621
>             Project: Kudu
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 1.0.0
>            Reporter: Alexey Serbin
>            Priority: Major
>
> In current implementation of AUTO_FLUSH_BACKGROUND mode, it's necessary to 
> call KuduSession::Flush() or KuduSession::FlushAsync() explicitly before 
> destroying/abandoning a session if it's desired to have any pending 
> operations flushed.
> As [~adar] noticed during review of https://gerrit.cloudera.org/#/c/4432/ , 
> it might make sense to change this behavior to automatically flush any 
> pending operations upon closing Kudu AUTO_FLUSH_BACKGROUND session.  That 
> would be more consistent with the semantics of the AUTO_FLUSH_BACKGROUND mode 
> and more user-friendly.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to