mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 10:37:23 +01:00
durable: the provider's assigned format level in its own file
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b7d84cbd39
commit
cea4274fd4
2 files changed
+8
-7
No files matched your search
@@ -645,13 +645,6 @@ type layoutRemoteCapabilities interface {
|
||||
// 0 (also when absent) keeps a v1.0 store on v1.0; 1 lets the attach
|
||||
// upgrade it. A higher level than this binary knows is read as 1, the
|
||||
// highest format it writes.
|
||||
// FormatLevel is the cluster format level the provider's current
|
||||
// assignment carries (0 or 1): the level its HEAD writes and its snapshot
|
||||
// delete route run at.
|
||||
func (p *DurableProvider) FormatLevel() uint8 {
|
||||
return attachFormatLevel(p.view.Projection().FormatLevel)
|
||||
}
|
||||
|
||||
func attachFormatLevel(assigned uint32) uint8 {
|
||||
if assigned >= 1 {
|
||||
return 1
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package durable
|
||||
|
||||
// FormatLevel is the cluster format level the provider's current
|
||||
// assignment carries (0 or 1): the level its holder's snapshot deletes
|
||||
// run their HEAD writes at.
|
||||
func (p *DurableProvider) FormatLevel() uint8 {
|
||||
return attachFormatLevel(p.view.Projection().FormatLevel)
|
||||
}
|
||||
Reference in new issue
Block a user