Repository navigation
Add versioned BSON persistence with legacy pickle compatibility - #989
Conversation
|
Draft decision required (renewed review) A maintainer must approve the pickle-to-BSON version/deprecation/migration/rollback policy, integrate accepted per-location inventory grouping, and use payload-level compare-and-set migration. Normal reads and writes must not break existing databases; keep this PR draft until that plan is complete. |
|
Human decision required: persistence and migration policy. Recommendation: normal readers never execute pickle fallback; new writes use versioned BSON only, without dual writes; legacy conversion is an explicit trusted migration; and Inventory is migrated losslessly only when a complete trusted source exists. Any lossy synthetic fallback should be a separate explicit tool/PR. This Draft also still needs #962 integration, payload-level CAS updates, mixed-document handling, strict native decoder reuse, rollout documentation, and full CI. |
|
Maintainer decision (supersedes the previous review note): legacy pickle persistence remains supported. Revised contract: readers auto-detect a versioned BSON document versus pickle bytes and decode either; new writes default to BSON; the established explicit SpectrumDatabase.save_data(format="pickle") option remains supported; no dual write is required; and in-place migration is optional because old records remain directly readable. Mixed documents must resolve each payload independently. This PR remains Draft until #962 is integrated and the compatibility tests and full CI pass. |
0088d0a to
114203a
Compare
fcffd8b to
8143a26
Compare
|
Final review decision: backward compatibility is required. Normal readers now auto-detect versioned BSON documents and legacy pickle bytes per payload; new writes default to BSON, while SpectrumDatabase retains an explicit pickle output option. The previous reject-old-data and explicit migration design was removed because it added risk and was unnecessary once legacy records remain readable. No human policy decision remains; this PR stays draft only until the rebuilt C++/Python CI matrix passes. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #989 +/- ##
========================================
Coverage 73.44% 73.44%
========================================
Files 182 183 +1
Lines 36160 36448 +288
Branches 2532 2540 +8
========================================
+ Hits 26559 26771 +212
- Misses 8696 8764 +68
- Partials 905 913 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
SpectrumDatabase.save_data(format="pickle")as an explicit compatibility option; its default is now"bson".Compatibility
New MsPASS releases read both old pickle records and new BSON records. Existing databases therefore require no migration and writes are not duplicated. Older MsPASS releases are not expected to read newly written BSON records.
Validation
Closes #841