commit f8ce43a21891ae2cc00d0770895b556eea9c7845
Author: Darrell Bishop <email address hidden>
Date: Sun Aug 5 00:51:49 2012 -0700
Use custom encoding for RingData, not pickle.
Serialize RingData in a versioned, custom format which is a combination
of a JSON-encoded header and .tostring() dumps of the
replica2part2dev_id arrays. This format deserializes hundreds of times
faster than rings serialized with Python 2.7's pickle (a significant
performance regression for ring loading between Python 2.6 and Python
2.7). Fixes bug 1031954.
swift.common.ring.ring.RingData is now responsible for serialization and
deserialization of its data via a new load() class method and save()
object method. The new implementation is backward-compatible; if a ring
does not begin with a new-style magic string, it is assumed to be an
old-style pickle-dumped ring and is handled as before. So new Swift
code can read old rings, but old Swift code will not be able to read
newly-serialized rings. THIS SHOULD BE MENTIONED PROMINENTLY IN THE
RELEASE NOTES.
I didn't want to bite of more than necessary, so I didn't mess with
builder file serialization.
Reviewed: https:/ /review. openstack. org/10846 github. com/openstack/ swift/commit/ f8ce43a21891ae2 cc00d0770895b55 6eea9c7845
Committed: http://
Submitter: Jenkins
Branch: master
commit f8ce43a21891ae2 cc00d0770895b55 6eea9c7845
Author: Darrell Bishop <email address hidden>
Date: Sun Aug 5 00:51:49 2012 -0700
Use custom encoding for RingData, not pickle.
Serialize RingData in a versioned, custom format which is a combination t2dev_id arrays. This format deserializes hundreds of times
of a JSON-encoded header and .tostring() dumps of the
replica2par
faster than rings serialized with Python 2.7's pickle (a significant
performance regression for ring loading between Python 2.6 and Python
2.7). Fixes bug 1031954.
swift. common. ring.ring. RingData is now responsible for serialization and compatible; if a ring serialized rings. THIS SHOULD BE MENTIONED PROMINENTLY IN THE
deserialization of its data via a new load() class method and save()
object method. The new implementation is backward-
does not begin with a new-style magic string, it is assumed to be an
old-style pickle-dumped ring and is handled as before. So new Swift
code can read old rings, but old Swift code will not be able to read
newly-
RELEASE NOTES.
I didn't want to bite of more than necessary, so I didn't mess with
builder file serialization.
Change-Id: I799b9a4c894d54 fb16592443904ac 055b2638e2d