[
https://issues.apache.org/jira/browse/BEAM-7917?focusedWorklogId=304362&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-304362
]
ASF GitHub Bot logged work on BEAM-7917:
----------------------------------------
Author: ASF GitHub Bot
Created on: 30/Aug/19 16:27
Start Date: 30/Aug/19 16:27
Worklog Time Spent: 10m
Work Description: udim commented on issue #9294: [BEAM-7917] Fix
datastore writes failing on retry
URL: https://github.com/apache/beam/pull/9294#issuecomment-526664781
> Pushed an update, please take another look.
>
Made a pass today. Sorry for the delay!
> If we stop constructing batch object in `DatastoreMutateFn` then it's more
complicated to calculate the batch size in bytes so far -- we would still have
to convert entity/key into protobuf, so performance hit since we are doing it
twice (when adding new element and when building a batch). This _could_ be an
issue when writing a lot of data.
I believe it is possible to avoid converting and calculating more than once.
See my other comments.
> There's also no public API for commiting a bunch of protobufs directly
(which would be perfect for us).
Yes, that's the tradeoff with using the new client.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 304362)
Time Spent: 2h (was: 1h 50m)
> Python datastore v1new fails on retry
> -------------------------------------
>
> Key: BEAM-7917
> URL: https://issues.apache.org/jira/browse/BEAM-7917
> Project: Beam
> Issue Type: Bug
> Components: io-py-gcp, runner-dataflow
> Affects Versions: 2.14.0
> Environment: Python 3.7 on Dataflow
> Reporter: Dmytro Sadovnychyi
> Assignee: Dmytro Sadovnychyi
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2h
> Remaining Estimate: 0h
>
> Traceback (most recent call last):
> File "apache_beam/runners/common.py", line 782, in
> apache_beam.runners.common.DoFnRunner.process
> File "apache_beam/runners/common.py", line 454, in
> apache_beam.runners.common.SimpleInvoker.invoke_process
> File
> "/usr/local/lib/python3.7/site-packages/apache_beam/io/gcp/datastore/v1new/datastoreio.py",
> line 334, in process
> self._flush_batch()
> File
> "/usr/local/lib/python3.7/site-packages/apache_beam/io/gcp/datastore/v1new/datastoreio.py",
> line 349, in _flush_batch
> throttle_delay=util.WRITE_BATCH_TARGET_LATENCY_MS // 1000)
> File "/usr/local/lib/python3.7/site-packages/apache_beam/utils/retry.py",
> line 197, in wrapper
> return fun(*args, **kwargs)
> File
> "/usr/local/lib/python3.7/site-packages/apache_beam/io/gcp/datastore/v1new/helper.py",
> line 99, in write_mutations
> batch.commit()
> File
> "/usr/local/lib/python3.7/site-packages/google/cloud/datastore/batch.py",
> line 271, in commit
> raise ValueError("Batch must be in progress to commit()")
> ValueError: Batch must be in progress to commit()
--
This message was sent by Atlassian Jira
(v8.3.2#803003)