Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v2 fast rebuilding #3401

Merged
merged 3 commits into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions controller/engine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@ func (ec *EngineController) removeUnknownReplica(e *longhorn.Engine) error {
defer engineClientProxy.Close()

ec.eventRecorder.Eventf(e, corev1.EventTypeNormal, constant.EventReasonDelete, "Removing unknown replica %v in mode %v from engine", url, unknownReplicaMap[url])
if err := engineClientProxy.ReplicaRemove(e, url); err != nil {
if err := engineClientProxy.ReplicaRemove(e, url, ""); err != nil {
ec.eventRecorder.Eventf(e, corev1.EventTypeWarning, constant.EventReasonFailedDeleting, "Failed to remove unknown replica %v in mode %v from engine: %v", url, unknownReplicaMap[url], err)
} else {
ec.eventRecorder.Eventf(e, corev1.EventTypeNormal, constant.EventReasonDelete, "Removed unknown replica %v in mode %v from engine", url, unknownReplicaMap[url])
Expand Down Expand Up @@ -1858,7 +1858,7 @@ func (ec *EngineController) startRebuilding(e *longhorn.Engine, replicaName, add
// the replica to failed.
// user can decide to delete it then we will try again
log.Infof("Removing failed rebuilding replica %v", addr)
if err := engineClientProxy.ReplicaRemove(e, replicaURL); err != nil {
if err := engineClientProxy.ReplicaRemove(e, replicaURL, replicaName); err != nil {
log.WithError(err).Warnf("Failed to remove rebuilding replica %v", addr)
ec.eventRecorder.Eventf(e, corev1.EventTypeWarning, constant.EventReasonFailedDeleting,
"Failed to remove rebuilding replica %v with address %v for engine %v and volume %v due to rebuilding failure: %v",
Expand Down
12 changes: 10 additions & 2 deletions controller/volume_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -4988,9 +4988,17 @@ func (c *VolumeController) shouldCleanUpFailedReplica(v *longhorn.Volume, r *lon
log.Warnf("Replica %v failed to rebuild too many times", r.Name)
return true
}
// TODO: Remove it once we can reuse failed replicas during v2 rebuilding

if types.IsDataEngineV2(v.Spec.DataEngine) {
return true
V2DataEngineFastReplicaRebuilding, err := c.ds.GetSettingAsBool(types.SettingNameV2DataEngineFastReplicaRebuilding)
if err != nil {
log.WithError(err).Warnf("Failed to get the setting %v, will consider it as false", types.SettingDefinitionV2DataEngineFastReplicaRebuilding)
V2DataEngineFastReplicaRebuilding = false
}
Comment on lines +4993 to +4997
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make it optional?

if !V2DataEngineFastReplicaRebuilding {
log.Infof("Failed replica %v should be cleaned up blindly since setting %v is not enabled", r.Name, types.SettingNameV2DataEngineFastReplicaRebuilding)
return true
}
}
// Failed too long ago to be useful during a rebuild.
if v.Spec.StaleReplicaTimeout > 0 &&
Expand Down
2 changes: 1 addition & 1 deletion engineapi/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (e *EngineBinary) ReplicaAdd(engine *longhorn.Engine, replicaName, url stri

// ReplicaRemove calls engine binary
// TODO: Deprecated, replaced by gRPC proxy
func (e *EngineBinary) ReplicaRemove(engine *longhorn.Engine, url string) error {
func (e *EngineBinary) ReplicaRemove(engine *longhorn.Engine, url, replicaName string) error {
if err := ValidateReplicaURL(url); err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion engineapi/enginesim.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (e *EngineSimulator) ReplicaAdd(engine *longhorn.Engine, replicaName, url s
return nil
}

func (e *EngineSimulator) ReplicaRemove(engine *longhorn.Engine, addr string) error {
func (e *EngineSimulator) ReplicaRemove(engine *longhorn.Engine, addr, replicaName string) error {
e.mutex.Lock()
defer e.mutex.Unlock()

Expand Down
2 changes: 1 addition & 1 deletion engineapi/enginesim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (s *TestSuite) TestBasic(c *C) {
c.Assert(replicas[Replica1Addr].Mode, Equals, longhorn.ReplicaModeRW)
c.Assert(replicas[Replica2Addr].Mode, Equals, longhorn.ReplicaModeRW)

err = sim.ReplicaRemove(e, Replica2Addr)
err = sim.ReplicaRemove(e, Replica2Addr, "")
c.Assert(err, IsNil)

replicas, err = sim.ReplicaList(e)
Expand Down
4 changes: 2 additions & 2 deletions engineapi/proxy_replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ func (p *Proxy) ReplicaAdd(e *longhorn.Engine, replicaName, replicaAddress strin
int(replicaFileSyncHTTPClientTimeout), fastSync, localSync, grpcTimeoutSeconds)
}

func (p *Proxy) ReplicaRemove(e *longhorn.Engine, address string) (err error) {
return p.grpcClient.ReplicaRemove(string(e.Spec.DataEngine), p.DirectToURL(e), e.Name, address, "")
func (p *Proxy) ReplicaRemove(e *longhorn.Engine, address, replicaName string) (err error) {
return p.grpcClient.ReplicaRemove(string(e.Spec.DataEngine), p.DirectToURL(e), e.Name, address, replicaName)
}

func (p *Proxy) ReplicaList(e *longhorn.Engine) (replicas map[string]*Replica, err error) {
Expand Down
2 changes: 1 addition & 1 deletion engineapi/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ type EngineClient interface {

ReplicaList(*longhorn.Engine) (map[string]*Replica, error)
ReplicaAdd(engine *longhorn.Engine, replicaName, url string, isRestoreVolume, fastSync bool, localSync *etypes.FileLocalSync, replicaFileSyncHTTPClientTimeout, grpcTimeoutSeconds int64) error
ReplicaRemove(engine *longhorn.Engine, url string) error
ReplicaRemove(engine *longhorn.Engine, url, replicaName string) error
ReplicaRebuildStatus(*longhorn.Engine) (map[string]*longhorn.RebuildStatus, error)
ReplicaRebuildVerify(engine *longhorn.Engine, replicaName, url string) error
ReplicaModeUpdate(engine *longhorn.Engine, url string, mode string) error
Expand Down
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ require (
github.com/jinzhu/copier v0.4.0
github.com/kubernetes-csi/csi-lib-utils v0.20.0
github.com/longhorn/backing-image-manager v1.8.0-rc1
github.com/longhorn/backupstore v0.0.0-20241221053416-1143c265f7b7
github.com/longhorn/go-common-libs v0.0.0-20241221040404-3f84afedcca8
github.com/longhorn/go-iscsi-helper v0.0.0-20241221094330-a9d2760ee13b
github.com/longhorn/go-spdk-helper v0.0.0-20241221094302-f0c0c2a62a57
github.com/longhorn/backupstore v0.0.0-20241227145911-8de988de7eff
github.com/longhorn/go-common-libs v0.0.0-20241227132452-5a6ca245288a
github.com/longhorn/go-iscsi-helper v0.0.0-20241227145851-edeefa73a30d
github.com/longhorn/go-spdk-helper v0.0.0-20241227145830-6187c6354129
github.com/longhorn/longhorn-engine v1.8.0-rc1
github.com/longhorn/longhorn-instance-manager v1.8.0-rc1
github.com/longhorn/longhorn-instance-manager v1.8.0-dev-20241215.0.20241227163223-4c1a672e3759
github.com/longhorn/longhorn-share-manager v1.8.0-rc1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.20.5
Expand Down Expand Up @@ -110,7 +110,7 @@ require (
github.com/google/gnostic-models v0.6.9 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/longhorn/types v0.0.0-20241220104939-0d566342b51d // indirect
github.com/longhorn/types v0.0.0-20241225162202-00d3a5fd7502 // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
github.com/moby/term v0.5.0 // indirect
Expand Down Expand Up @@ -143,7 +143,7 @@ require (
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/gammazero/deque v1.0.0 // indirect
github.com/gammazero/workerpool v1.1.3 // indirect
github.com/go-logr/logr v1.4.2 // indirect
Expand Down Expand Up @@ -206,7 +206,7 @@ require (
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0
google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda // indirect
google.golang.org/protobuf v1.36.0
google.golang.org/protobuf v1.36.1
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
k8s.io/apiserver v0.32.0 // indirect
Expand Down
32 changes: 16 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lSh
github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
github.com/gammazero/deque v1.0.0 h1:LTmimT8H7bXkkCy6gZX7zNLtkbz4NdS2z8LZuor3j34=
Expand Down Expand Up @@ -153,22 +153,22 @@ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhn
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
github.com/longhorn/backing-image-manager v1.8.0-rc1 h1:QdhKlTFgj+4licWW/EbTsKpj7+x+74BfTCRkkHCOV2g=
github.com/longhorn/backing-image-manager v1.8.0-rc1/go.mod h1:KKliQkKPM5bI4JwzSuM372nRV6NN23piDEMX00rDeCw=
github.com/longhorn/backupstore v0.0.0-20241221053416-1143c265f7b7 h1:kqqIIT6LrG7EDl5pwMLNmbKxhQLSPq8f/vxTqzLhPdM=
github.com/longhorn/backupstore v0.0.0-20241221053416-1143c265f7b7/go.mod h1:pPul9m4i3AUun7AV4SW+z3z3XGw9iWScLGcz4Zm+Y7Y=
github.com/longhorn/go-common-libs v0.0.0-20241221040404-3f84afedcca8 h1:SkLNk7XOhprnW7uDTrwI7tHyoCd4j3J/Q4tPXhQYYfY=
github.com/longhorn/go-common-libs v0.0.0-20241221040404-3f84afedcca8/go.mod h1:HXqYyTXGh0ssBYKA4duXGQcZ7YfDd9wkVasu6bsipEc=
github.com/longhorn/go-iscsi-helper v0.0.0-20241221094330-a9d2760ee13b h1:LKKymnP4ipsdAvcu4hpAlWvBK+LI6oNQ1asa66x77x4=
github.com/longhorn/go-iscsi-helper v0.0.0-20241221094330-a9d2760ee13b/go.mod h1:wpbmDwCzeJikHgeg+dgZgXCqwFqffgScHnsev+BuWVA=
github.com/longhorn/go-spdk-helper v0.0.0-20241221094302-f0c0c2a62a57 h1:FbqQ8I0usMekWSbqquunzDPdJWAtE/bOWbXdiXsKNk0=
github.com/longhorn/go-spdk-helper v0.0.0-20241221094302-f0c0c2a62a57/go.mod h1:sav2M2RlF29fcZZubyrtPHpwUvimTw65JCUoQGy4ZMk=
github.com/longhorn/backupstore v0.0.0-20241227145911-8de988de7eff h1:GvXQhCilk28qlayMeJddW9AjDOkZugGMlRmBHEpyd1I=
github.com/longhorn/backupstore v0.0.0-20241227145911-8de988de7eff/go.mod h1:tnw2Pgvpyl9kvDXQry9y9mcvHPhWC52jWImhwL5GPCg=
github.com/longhorn/go-common-libs v0.0.0-20241227132452-5a6ca245288a h1:1WXJgPg0jDzw0ibWzc/0wU8gIjOE6DMhpmfh8BSdFDU=
github.com/longhorn/go-common-libs v0.0.0-20241227132452-5a6ca245288a/go.mod h1:CH3Zs86gt8KyM/dw5vk8KYYn4Gg6ly61ws6lt+W+z+w=
github.com/longhorn/go-iscsi-helper v0.0.0-20241227145851-edeefa73a30d h1:45RzTLBBtiB9Rg+r2FRNNuFRGpLaZ3O4Rv3DwALNYpo=
github.com/longhorn/go-iscsi-helper v0.0.0-20241227145851-edeefa73a30d/go.mod h1:ilZRIxi3WNp1C/hFjuNFPLMT3qOaoVEKAd/ky1pXPcI=
github.com/longhorn/go-spdk-helper v0.0.0-20241227145830-6187c6354129 h1:yPsm0Lu6wXDH/XRfTqrBiFaIcDduApu3gb38XBX++qI=
github.com/longhorn/go-spdk-helper v0.0.0-20241227145830-6187c6354129/go.mod h1:gt5O4pBZlkrrQrsEpli+1d6g43clsuMaF/NIhOQ3Oyo=
github.com/longhorn/longhorn-engine v1.8.0-rc1 h1:xsYDlDTXUQbBuxTz6UtGEueEsbWfG1fE1eFYDwLWb1w=
github.com/longhorn/longhorn-engine v1.8.0-rc1/go.mod h1:D1BGJd4+htKXHa+6aLYBV/5c8qoSm4yJB6jXlhVUsr8=
github.com/longhorn/longhorn-instance-manager v1.8.0-rc1 h1:qlVzW4Om8QGWJioK6T30K886BlLb/qOnmB0tp84oL2I=
github.com/longhorn/longhorn-instance-manager v1.8.0-rc1/go.mod h1:3kCzQ70Zsm0ocH5CLbKBc4pHIabqYBWDqB01hNSOB0o=
github.com/longhorn/longhorn-instance-manager v1.8.0-dev-20241215.0.20241227163223-4c1a672e3759 h1:lME+J/wWdJJRSzSdk2RU1k7FXdDGnaDsR8X2m14H7r0=
github.com/longhorn/longhorn-instance-manager v1.8.0-dev-20241215.0.20241227163223-4c1a672e3759/go.mod h1:8z9BoG+iGNguTBXxRvWBoXJrWiL58+Y0GMHA3Wir8jM=
github.com/longhorn/longhorn-share-manager v1.8.0-rc1 h1:zhdYrpeuTtQyB/ACQlC3VsbpKtpedwhT/ZDkO5xvWps=
github.com/longhorn/longhorn-share-manager v1.8.0-rc1/go.mod h1:5jWEgBft1qa6bLEJ1c8aIxciLAvxTIAJilywhI/8wlA=
github.com/longhorn/types v0.0.0-20241220104939-0d566342b51d h1:OyDv2D0n/IadXlYUWy+FL5ADqrBej8eXbWzJQ0FVlfU=
github.com/longhorn/types v0.0.0-20241220104939-0d566342b51d/go.mod h1:3jHuVDtpkXQzpnp4prguDBskVRric2kmF8aSPkRJ4jw=
github.com/longhorn/types v0.0.0-20241225162202-00d3a5fd7502 h1:jgw7nosooLe1NQEdCGzM/nEOFzPcurNO+0PDsicc5+A=
github.com/longhorn/types v0.0.0-20241225162202-00d3a5fd7502/go.mod h1:3jHuVDtpkXQzpnp4prguDBskVRric2kmF8aSPkRJ4jw=
github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4=
github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
Expand Down Expand Up @@ -393,8 +393,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20241216192217-9240e9c98484 h1:
google.golang.org/genproto/googleapis/rpc v0.0.0-20241216192217-9240e9c98484/go.mod h1:lcTa1sDdWEIHMWlITnIczmw5w60CF9ffkb8Z+DVmmjA=
google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU=
google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4=
google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ=
google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk=
google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
Expand Down
22 changes: 18 additions & 4 deletions scheduler/replica_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,16 @@ func filterActiveReplicas(replicas map[string]*longhorn.Replica) map[string]*lon
}

func (rcs *ReplicaScheduler) CheckAndReuseFailedReplica(replicas map[string]*longhorn.Replica, volume *longhorn.Volume, hardNodeAffinity string) (*longhorn.Replica, error) {
// TODO: Remove it once we can reuse failed replicas during v2 rebuilding
if types.IsDataEngineV2(volume.Spec.DataEngine) {
return nil, nil
V2DataEngineFastReplicaRebuilding, err := rcs.ds.GetSettingAsBool(types.SettingNameV2DataEngineFastReplicaRebuilding)
if err != nil {
logrus.WithError(err).Warnf("Failed to get the setting %v, will consider it as false", types.SettingDefinitionV2DataEngineFastReplicaRebuilding)
V2DataEngineFastReplicaRebuilding = false
}
if !V2DataEngineFastReplicaRebuilding {
logrus.Infof("Skip checking and reusing replicas for volume %v since setting %v is not enabled", volume.Name, types.SettingNameV2DataEngineFastReplicaRebuilding)
return nil, nil
}
}

replicas = filterActiveReplicas(replicas)
Expand Down Expand Up @@ -659,9 +666,16 @@ func (rcs *ReplicaScheduler) RequireNewReplica(replicas map[string]*longhorn.Rep
return 0
}

// TODO: Remove it once we can reuse failed replicas during v2 rebuilding
if types.IsDataEngineV2(volume.Spec.DataEngine) {
return 0
V2DataEngineFastReplicaRebuilding, err := rcs.ds.GetSettingAsBool(types.SettingNameV2DataEngineFastReplicaRebuilding)
if err != nil {
logrus.WithError(err).Warnf("Failed to get the setting %v, will consider it as false", types.SettingDefinitionV2DataEngineFastReplicaRebuilding)
V2DataEngineFastReplicaRebuilding = false
}
if !V2DataEngineFastReplicaRebuilding {
logrus.Infof("Skip checking potentially reusable replicas for volume %v since setting %v is not enabled", volume.Name, types.SettingNameV2DataEngineFastReplicaRebuilding)
return 0
}
}

timeUntilNext, timeOfNext, err := rcs.timeToReplacementReplica(volume)
Expand Down
13 changes: 13 additions & 0 deletions types/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ const (
SettingNameV2DataEngineCPUMask = SettingName("v2-data-engine-cpu-mask")
SettingNameV2DataEngineLogLevel = SettingName("v2-data-engine-log-level")
SettingNameV2DataEngineLogFlags = SettingName("v2-data-engine-log-flags")
SettingNameV2DataEngineFastReplicaRebuilding = SettingName("v2-data-engine-fast-replica-rebuilding")
SettingNameFreezeFilesystemForSnapshot = SettingName("freeze-filesystem-for-snapshot")
SettingNameAutoCleanupSnapshotWhenDeleteBackup = SettingName("auto-cleanup-when-delete-backup")
SettingNameDefaultMinNumberOfBackingImageCopies = SettingName("default-min-number-of-backing-image-copies")
Expand Down Expand Up @@ -225,6 +226,7 @@ var (
SettingNameV2DataEngineCPUMask,
SettingNameV2DataEngineLogLevel,
SettingNameV2DataEngineLogFlags,
SettingNameV2DataEngineFastReplicaRebuilding,
SettingNameReplicaDiskSoftAntiAffinity,
SettingNameAllowEmptyNodeSelectorVolume,
SettingNameAllowEmptyDiskSelectorVolume,
Expand Down Expand Up @@ -344,6 +346,7 @@ var (
SettingNameV2DataEngineCPUMask: SettingDefinitionV2DataEngineCPUMask,
SettingNameV2DataEngineLogLevel: SettingDefinitionV2DataEngineLogLevel,
SettingNameV2DataEngineLogFlags: SettingDefinitionV2DataEngineLogFlags,
SettingNameV2DataEngineFastReplicaRebuilding: SettingDefinitionV2DataEngineFastReplicaRebuilding,
SettingNameReplicaDiskSoftAntiAffinity: SettingDefinitionReplicaDiskSoftAntiAffinity,
SettingNameAllowEmptyNodeSelectorVolume: SettingDefinitionAllowEmptyNodeSelectorVolume,
SettingNameAllowEmptyDiskSelectorVolume: SettingDefinitionAllowEmptyDiskSelectorVolume,
Expand Down Expand Up @@ -1443,6 +1446,16 @@ var (
Default: "",
}

SettingDefinitionV2DataEngineFastReplicaRebuilding = SettingDefinition{
DisplayName: "V2 Data Engine Fast Replica Rebuilding",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this setting is temporary before v2 becomes GA, as delta replica rebuilding should be eventually enabled always. Right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YES! Next, I will check when we can launch a setting similar to v1 Snapshot Data Integrity instead. If we can do that before v1.8 official release, V2 Data Engine Fast Replica Rebuilding won't be delivered to users at all.

Description: "This setting enables the fast replica rebuilding feature for v2 data engine. It relies on the snapshot checksums, so setting the snapshot-data-integrity to **enable** or **fast-check** is a prerequisite.",
Category: SettingCategoryV2DataEngine,
Type: SettingTypeBool,
Required: true,
ReadOnly: false,
Default: "false",
}

SettingDefinitionAutoCleanupSnapshotWhenDeleteBackup = SettingDefinition{
DisplayName: "Automatically Cleanup Snapshot When Deleting Backup",
Description: "This setting enables Longhorn to automatically cleanup snapshots when removing backup.",
Expand Down
7 changes: 4 additions & 3 deletions vendor/github.com/fsnotify/fsnotify/.cirrus.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions vendor/github.com/fsnotify/fsnotify/.editorconfig

This file was deleted.

1 change: 0 additions & 1 deletion vendor/github.com/fsnotify/fsnotify/.gitattributes

This file was deleted.

3 changes: 3 additions & 0 deletions vendor/github.com/fsnotify/fsnotify/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading