mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 10:06:14 +00:00
fix(lcnode): init ExtentConfig with metaWrapper
close:#23007284 Signed-off-by: chihe <chihe@oppo.com>
This commit is contained in:
parent
621017b3b3
commit
c65d6c19df
@ -272,6 +272,7 @@ func (c *Client) Start() (err error) {
|
||||
VolCacheDpStorageClass: c.volCacheDpStorageClass,
|
||||
OnRenewalForbiddenMigration: mw.RenewalForbiddenMigration,
|
||||
OnForbiddenMigration: mw.ForbiddenMigration,
|
||||
MetaWrapper: mw,
|
||||
}); err != nil {
|
||||
log.LogErrorf("newClient NewExtentClient failed(%v)", err)
|
||||
return
|
||||
|
||||
@ -1594,6 +1594,7 @@ func (c *client) start() (err error) {
|
||||
VolCacheDpStorageClass: c.cacheDpStorageClass,
|
||||
OnRenewalForbiddenMigration: mw.RenewalForbiddenMigration,
|
||||
OnForbiddenMigration: mw.ForbiddenMigration,
|
||||
MetaWrapper: mw,
|
||||
}); err != nil {
|
||||
log.LogErrorf("newClient NewExtentClient failed(%v)", err)
|
||||
return
|
||||
|
||||
@ -150,6 +150,7 @@ func NewS3Scanner(adminTask *proto.AdminTask, l *LcNode) (*LcScanner, error) {
|
||||
VolCacheDpStorageClass: volumeInfo.CacheDpStorageClass,
|
||||
OnForbiddenMigration: metaWrapper.ForbiddenMigration,
|
||||
InnerReq: true,
|
||||
MetaWrapper: metaWrapper,
|
||||
}
|
||||
log.LogInfof("[NewS3Scanner] extentConfig: vol(%v) volStorageClass(%v) allowedStorageClass(%v), followerRead(%v)",
|
||||
extentConfig.Volume, extentConfig.VolStorageClass, extentConfig.VolAllowedStorageClass, extentConfig.FollowerRead)
|
||||
|
||||
@ -493,6 +493,7 @@ func (l *LcNode) httpServiceGetFile(w http.ResponseWriter, r *http.Request) {
|
||||
VolAllowedStorageClass: asc,
|
||||
OnForbiddenMigration: metaWrapper.ForbiddenMigration,
|
||||
InnerReq: true,
|
||||
MetaWrapper: metaWrapper,
|
||||
}
|
||||
var extentClient *stream.ExtentClient
|
||||
if extentClient, err = stream.NewExtentClient(extentConfig); err != nil {
|
||||
|
||||
@ -3078,6 +3078,7 @@ func NewVolume(config *VolumeConfig) (*Volume, error) {
|
||||
VolAllowedStorageClass: volumeInfo.AllowedStorageClass,
|
||||
VolCacheDpStorageClass: volumeInfo.CacheDpStorageClass,
|
||||
OnForbiddenMigration: metaWrapper.ForbiddenMigration,
|
||||
MetaWrapper: metaWrapper,
|
||||
}
|
||||
|
||||
if proto.IsCold(volumeInfo.VolType) || proto.IsStorageClassBlobStore(volumeInfo.VolStorageClass) {
|
||||
|
||||
@ -159,6 +159,7 @@ func NewClient(config PreloadConfig) *PreLoadClient {
|
||||
VolCacheDpStorageClass: view.CacheDpStorageClass,
|
||||
OnRenewalForbiddenMigration: mw.RenewalForbiddenMigration,
|
||||
OnForbiddenMigration: mw.ForbiddenMigration,
|
||||
MetaWrapper: mw,
|
||||
}); err != nil {
|
||||
log.LogErrorf("newClient NewExtentClient failed(%v)", err)
|
||||
return nil
|
||||
|
||||
Loading…
Reference in New Issue
Block a user