[engine] bug fix: to pickle/unpickle within the proper context

Review Request #3761 - Created April 26, 2016 and submitted

Information
Peiyu Wang
pants
3149, 3274
Reviewers
pants-reviews
jsirois, kwlzn, patricklaw, stuhood

We have two places that pickle and unpickle functions are not used within
the proper context.

  • StringIO buffer for write, saving buffer to storage happens outside its context.
  • lmdb buffer for read, the invalid buffer was used outside transction context.

The earlier attemp is probably red herring: https://rbcommons.com/s/twitter/r/3751/.
Thanks Stu for catching!

These two behaviors are clearly documented, see [1] and [2].
[1] https://docs.python.org/2/library/stringio.html
[2] https://lmdb.readthedocs.org/en/release/

https://travis-ci.org/peiyuwang/pants/builds/125890340 passed.
https://travis-ci.org/peiyuwang/pants/builds/125941151 passed.

Issues

  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Stu Hood
Peiyu Wang
Stu Hood
Stu Hood
Peiyu Wang
Stu Hood
Peiyu Wang
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as f22f8ccc282bf497dc49dbf3c6b4fe487cf1466d

Loading...