Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues 271&281 #285

Merged
merged 6 commits into from
Jul 5, 2018

Conversation

lumip
Copy link
Contributor

@lumip lumip commented Jul 5, 2018

Closes issue #271 and closes issue #281

This makes method flush() obsolete, so it was removed.
JSONEncoder previously did not check whether subpulses are identical to already known pulses with the same id but just replaced them with a reference to the already known subpulse in the serialization. This could lead to unexpected behavior. JSONEncoder now raises a RuntimeError instead in this case.
PulseStorage adopts a transaction model and takes care that in case of such an exception, a pulse is not partially serialized, i.e., if a pulse serialization aborts due to a duplicated subpulse identifier, no changes to the storage is made (that is, new subpulses that were already succesfully serialized will be discarded if an error is encountered for another subpulse).
@lumip lumip added this to the New Serialization Routines milestone Jul 5, 2018
@lumip lumip changed the title Fix issue #271 Fix issue #281 Jul 5, 2018
@lumip lumip changed the title Fix issue #281 Fix issues 271&281 Jul 5, 2018
@coveralls
Copy link

coveralls commented Jul 5, 2018

Coverage Status

Coverage increased (+0.009%) to 93.519% when pulling 441b95b on issues/281_pulse_storage_flushing into 0354e18 on issues/250_serialization.


self._temporary_storage[identifier] = self.StorageEntry(serialized, serializable)
if is_transaction_begin:
for id in self._transaction_storage:
Copy link
Member

Choose a reason for hiding this comment

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

Please do not overwrite builtins

lumip added 4 commits July 5, 2018 16:22
Signed-off-by: Lukas Prediger <lukas.prediger@rwth-aachen.de>
NestedDummySerializable's constructor now passed the registry argument through to superclass.

Signed-off-by: Lukas Prediger <lukas.prediger@rwth-aachen.de>
@lumip lumip merged commit eee6037 into issues/250_serialization Jul 5, 2018
@lumip lumip deleted the issues/281_pulse_storage_flushing branch July 9, 2018 11:07
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