Page MenuHomeSoftware Heritage

Don't create a transaction for content_get_partition
ClosedPublic

Authored by olasd on Mar 18 2020, 12:06 PM.

Details

Summary

It just calls out to another function which, itself, creates a transaction.

Test Plan

tox tests unchanged

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vlorentz added a subscriber: vlorentz.

To be consistent with other methods, you could pass db and cur, but that works too

This revision is now accepted and ready to land.Mar 18 2020, 12:26 PM

To be consistent with other methods, you could pass db and cur, but that works too

That's fair. In that case, I erred on the side of minimizing the size of the db transaction.

Yeah, and it spares a transaction creation in case of invalid arguments

This revision was landed with ongoing or failed builds.Mar 18 2020, 12:52 PM
This revision was automatically updated to reflect the committed changes.