[ 
https://issues.apache.org/jira/browse/BEAM-12092?focusedWorklogId=703977&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-703977
 ]

ASF GitHub Bot logged work on BEAM-12092:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Jan/22 14:01
            Start Date: 05/Jan/22 14:01
    Worklog Time Spent: 10m 
      Work Description: masahitojp commented on a change in pull request #16287:
URL: https://github.com/apache/beam/pull/16287#discussion_r778839801



##########
File path: 
sdks/java/io/redis/src/main/java/org/apache/beam/sdk/io/redis/RedisIO.java
##########
@@ -889,28 +886,33 @@ public void processElement(ProcessContext c) {
         batchCount++;
 
         if (batchCount >= DEFAULT_BATCH_SIZE) {
-          pipeline.exec();
-          pipeline.sync();
-          pipeline.multi();
+          transaction.exec();
+          transaction.multi();
           batchCount = 0;
         }
       }
 
       private void writeRecord(KV<String, Map<String, String>> record) {
         String key = record.getKey();
         Map<String, String> value = record.getValue();
+        final XAddParams commonParams = new 
XAddParams().id(StreamEntryID.NEW_ENTRY);
+        final XAddParams params;
         if (spec.maxLen() > 0L) {
-          pipeline.xadd(key, StreamEntryID.NEW_ENTRY, value, spec.maxLen(), 
spec.approximateTrim());
+          if (spec.approximateTrim()) {
+            params = commonParams.maxLen(spec.maxLen()).approximateTrimming();
+          } else {
+            params = commonParams.maxLen(spec.maxLen());
+          }
         } else {
-          pipeline.xadd(key, StreamEntryID.NEW_ENTRY, value);
+          params = commonParams;
         }
+        transaction.xadd(key, params, value);
       }
 
       @FinishBundle
       public void finishBundle() {
-        if (pipeline.isInMulti()) {
-          pipeline.exec();
-          pipeline.sync();
+        if (transaction != null) {

Review comment:
       I updated too




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 703977)
    Time Spent: 8.5h  (was: 8h 20m)

> Beam Dependency Update Request: redis.clients:jedis
> ---------------------------------------------------
>
>                 Key: BEAM-12092
>                 URL: https://issues.apache.org/jira/browse/BEAM-12092
>             Project: Beam
>          Issue Type: Sub-task
>          Components: dependencies
>            Reporter: Beam JIRA Bot
>            Assignee: Masato Matthew Nakamura
>            Priority: P2
>          Time Spent: 8.5h
>  Remaining Estimate: 0h
>
>  ------------------------- 2021-04-05 12:36:47.531731 
> -------------------------
>         Please consider upgrading the dependency redis.clients:jedis. 
>         The current version is 3.3.0. The latest version is 3.6.0-RC1 
>         cc: 
>  Please refer to [Beam Dependency Guide 
> |https://beam.apache.org/contribute/dependencies/]for more information. 
> Do Not Modify The Description Above. 
>  ------------------------- 2021-11-18 05:22:50.372513 
> -------------------------
>         Please consider upgrading the dependency redis.clients:jedis. 
>         The current version is 3.5.2. The latest version is 4.0.0-beta3 
>         cc: 
>  Please refer to [Beam Dependency Guide 
> |https://beam.apache.org/contribute/dependencies/]for more information. 
> Do Not Modify The Description Above. 
>  ------------------------- 2021-11-22 12:26:47.108803 
> -------------------------
>         Please consider upgrading the dependency redis.clients:jedis. 
>         The current version is 3.5.2. The latest version is 4.0.0-beta3 
>         cc: 
>  Please refer to [Beam Dependency Guide 
> |https://beam.apache.org/contribute/dependencies/]for more information. 
> Do Not Modify The Description Above. 
>  ------------------------- 2021-11-29 12:24:41.680747 
> -------------------------
>         Please consider upgrading the dependency redis.clients:jedis. 
>         The current version is 3.5.2. The latest version is 4.0.0-beta4 
>         cc: 
>  Please refer to [Beam Dependency Guide 
> |https://beam.apache.org/contribute/dependencies/]for more information. 
> Do Not Modify The Description Above. 
>  ------------------------- 2021-12-06 12:26:33.947612 
> -------------------------
>         Please consider upgrading the dependency redis.clients:jedis. 
>         The current version is 3.5.2. The latest version is 4.0.0-beta4 
>         cc: 
>  Please refer to [Beam Dependency Guide 
> |https://beam.apache.org/contribute/dependencies/]for more information. 
> Do Not Modify The Description Above. 
>  ------------------------- 2021-12-13 12:28:45.115963 
> -------------------------
>         Please consider upgrading the dependency redis.clients:jedis. 
>         The current version is 3.5.2. The latest version is 4.0.0-RC1 
>         cc: 
>  Please refer to [Beam Dependency Guide 
> |https://beam.apache.org/contribute/dependencies/]for more information. 
> Do Not Modify The Description Above. 
>  ------------------------- 2021-12-20 12:28:51.627017 
> -------------------------
>         Please consider upgrading the dependency redis.clients:jedis. 
>         The current version is 3.5.2. The latest version is 4.0.0 
>         cc: 
>  Please refer to [Beam Dependency Guide 
> |https://beam.apache.org/contribute/dependencies/]for more information. 
> Do Not Modify The Description Above. 
>  ------------------------- 2021-12-27 12:24:20.957849 
> -------------------------
>         Please consider upgrading the dependency redis.clients:jedis. 
>         The current version is 3.5.2. The latest version is 4.0.0 
>         cc: 
>  Please refer to [Beam Dependency Guide 
> |https://beam.apache.org/contribute/dependencies/]for more information. 
> Do Not Modify The Description Above. 
>  ------------------------- 2022-01-03 12:25:03.497573 
> -------------------------
>         Please consider upgrading the dependency redis.clients:jedis. 
>         The current version is 3.8.0. The latest version is 4.0.1 
>         cc: 
>  Please refer to [Beam Dependency Guide 
> |https://beam.apache.org/contribute/dependencies/]for more information. 
> Do Not Modify The Description Above. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to