You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Robert Collins (JIRA)" <ji...@apache.org> on 2019/01/25 16:44:00 UTC

[jira] [Work started] (BEAM-6494) We do not sync pipeline with server at bundle end, only during teardown

     [ https://issues.apache.org/jira/browse/BEAM-6494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on BEAM-6494 started by Robert Collins.
--------------------------------------------
> We do not sync pipeline with server at bundle end, only during teardown
> -----------------------------------------------------------------------
>
>                 Key: BEAM-6494
>                 URL: https://issues.apache.org/jira/browse/BEAM-6494
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-redis
>    Affects Versions: 2.9.0
>            Reporter: Robert Collins
>            Assignee: Robert Collins
>            Priority: Major
>
> The redis pipeline object only sends executed commands to the redis server when sync() or close() are called. If these are not called, the calls stay inside the buffer. As teardown is not guaranteed to be called, we should call pipeline.sync() inside finishBundle, after pipeline.exec(). [docs|https://beam.apache.org/releases/javadoc/2.5.0/org/apache/beam/sdk/transforms/DoFn.Teardown.html]
>  
> @FinishBundle
> public void finishBundle() {
>  if (pipeline.isInMulti()) {
>  pipeline.exec();
>  }
>  batchCount = 0;
> }
> @Teardown
> public void teardown() {
>  jedis.close();
> }



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