[
https://issues.apache.org/jira/browse/BEAM-10004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kenneth Knowles reassigned BEAM-10004:
--------------------------------------
Assignee: (was: Yichi Zhang)
> 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
> Priority: Critical
>
> 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)