Skip to content

Conversation

@paulius-sladkevicius
Copy link

This happens when chunk is created in synchronous mode.
PEP-8 valid imports.

Same issue #4 that can be closed.

@paulius-sladkevicius paulius-sladkevicius changed the title connector_flow: raise import script exception instead error of failed… connector_flow: raise import script exception instead error of failed write Aug 13, 2016
… write

This happens when chunk is created in synchronous mode.
PEP-8 valid imports.
@paulius-sladkevicius paulius-sladkevicius force-pushed the 8.0-connector_flow-chunk-state branch from 96ee16a to 0a50e2c Compare August 13, 2016 14:32
@tremlin
Copy link
Member

tremlin commented Aug 25, 2016

What kind of exceptions do you observe in the finally part? We usually encounter database serialization issues here, which may be worth re-trying.

@paulius-sladkevicius
Copy link
Author

We're getting MissingError, because looks rollback is done, so chunk is not found anymore.

try:
chunk.write({'state': new_state})
except:
pass

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not correct. If an error occurs during writing the state to the chunk I think the whole transaction will roll back, so it's missleading to silently catch the exeption here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, but now if any error happens in read_chunk(), final error is not what happen there, but error related with failed chunk write. In such case it's hard to understand why read_chunck() failed (found out it while writing unit tests).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants