Comment 5 for bug 721163

Revision history for this message
Andrew Bennetts (spiv) wrote :

FWIW, the error John reported on the mailing list is:

ErrorFromSmartServer: Error received from smart server: ('error', "bytes must be a string, got <type 'bzrlib._static_tuple_c.StaticTuple'>")

So something is passing a StaticTuple to _bytes_to_text_key, which sounds like some code already has a key but thinks it has the bytes representation it. The callers of that are in bzrlib/repofmt/groupcompress_repo.py; the only one of those I'd expect to be triggered on stream insertion is in GCRepositoryPackCollection._check_new_inventories, which is invoked at the end of inserting a stream, which matches the original report here and John's report on the mailing list.

The mystery then is why that code path is failing for them, because I'm pretty sure basically every write to a 2a repository would exercise that call, so presumably something earlier during receiving the stream is getting muddled. There's nothing obviously wrong with that code that I can see, and it's especially weird that it's only happening for some people sometimes, rather than constantly.