You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Beryllium: Rename SourceAndVersion to Version / Improve HLV comments. (#6614)
* - Rename `SourceAndVersion` to just `Version`, and rename `SourceAndVersion.Version` to `Value`.
- Add/Improve comments.
* Update db/hybrid_logical_vector.go
returnfmt.Errorf("attempting to add new verison vector entry with a CAS that is less than the current version CAS value. Current cas: %d new cas %d", hlv.Version, newVersion.Version)
89
+
// AddVersion adds newVersion to the in memory representation of the HLV.
returnfmt.Errorf("attempting to add new verison vector entry with a CAS that is less than the current version CAS value. Current cas: %d new cas %d", hlv.Version, newVersion.Value)
81
93
}
82
94
// check if this is the first time we're adding a source - version pair
83
95
ifhlv.SourceID=="" {
84
-
hlv.Version=newVersion.Version
96
+
hlv.Version=newVersion.Value
85
97
hlv.SourceID=newVersion.SourceID
86
98
returnnil
87
99
}
88
100
// if new entry has the same source we simple just update the version
89
101
ifnewVersion.SourceID==hlv.SourceID {
90
-
hlv.Version=newVersion.Version
102
+
hlv.Version=newVersion.Value
91
103
returnnil
92
104
}
93
105
// if we get here this is a new version from a different sourceID thus need to move current sourceID to previous versions and update current version
0 commit comments