turiya / keyczar

Automatically exported from code.google.com/p/keyczar
0 stars 0 forks source link

Patch: Write the metadata last #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We should write the metadata after writing the keys.  Otherwise if we fail to 
write the primary key, then the metadata will be pointing to a non-existent key 
i.e. we're broken.  There's also a race condition along the same lines.

Easy to fix: just write the metadata last:

https://github.com/justinsb/keyczar/commit/fa1f9296d2329e353e01cd564041dcf2caba0
1a7.diff

Original issue reported on code.google.com by jus...@fathomdb.com on 12 Aug 2013 at 9:58

GoogleCodeExporter commented 9 years ago

Original comment by jtu...@gmail.com on 13 Aug 2013 at 4:54

GoogleCodeExporter commented 9 years ago
This seems like a good change to me. If anyone else wants to give feedback: 
https://code.google.com/p/keyczar/source/detail?r=f311555ad196822298cd54e1a1fdac
62ba27c6f2

Original comment by dlundb...@google.com on 27 Aug 2013 at 5:55

GoogleCodeExporter commented 9 years ago
Merged into master 
https://code.google.com/p/keyczar/source/detail?r=4552588afd18a2ef4b4b7d72f00b27
75e066a15f

Original comment by dlundb...@google.com on 6 Sep 2013 at 5:18

GoogleCodeExporter commented 9 years ago

Original comment by dlundb...@google.com on 9 Sep 2013 at 5:50