Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
encoding/gob: not decodable from another instance of same program #24126
I have the same program running on 2 different nodes (kubernetes scaling).
This works as intended and perfectly if the
If the decode occurs from the other instance it fails.
I suspect the
Is this a bug. If not, this greatly detracts from the portability of the gob package.
Please add a minimal self-contained reproducer.
Side note: registering interface type assigns a number -> type mapping. The decoding process must register the same types in the same order otherwise the type numbers do not match. Is you program written in such a way that the type-registering order is deterministic and repeatable? I've had a similar problem in cznic/ql#67.
That's the only option ;-) But the interesting information is if the're only a single call to
Closing. Gob is working as intended.
We were doing something along the lines of this: https://github.com/pjebs/GAE-Toolkit-Go/blob/master/cache/cache.go#L84