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

Beam JIRA Bot commented on BEAM-10004:
--------------------------------------

This issue is assigned but has not received an update in 30 days so it has been 
labeled "stale-assigned". If you are still working on the issue, please give an 
update and remove the label. If you are no longer working on the issue, please 
unassign so someone else may work on it. In 7 days the issue will be 
automatically unassigned.

> ZeroDivisionError if source bundle smaller than 1mb
> ---------------------------------------------------
>
>                 Key: BEAM-10004
>                 URL: https://issues.apache.org/jira/browse/BEAM-10004
>             Project: Beam
>          Issue Type: Bug
>          Components: io-py-mongodb
>    Affects Versions: 2.20.0
>            Reporter: Corvin Deboeser
>            Assignee: Corvin Deboeser
>            Priority: P2
>              Labels: stale-assigned
>
> If the desired_bundle_size is lower than 1mb, then split returns only 
> SourceBundles with weight=0 which leads to a ZeroDivisionError down the line. 
> {noformat}
> ZeroDivisionError: float division by zero{noformat}
> This error is raised from _compute_cumulative_weights here:
> [https://github.com/apache/beam/blob/9f0cb649d39ee6236ea27f111acb4b66591a80ec/sdks/python/apache_beam/io/concat_source.py#L154]
>  
> Worked for me: Pulling the truncation from _get_split_keys 
> ([here|https://github.com/apache/beam/blob/9f0cb649d39ee6236ea27f111acb4b66591a80ec/sdks/python/apache_beam/io/mongodbio.py#L226])
>  into split instead.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to