fix(lcnode): init ExtentConfig with metaWrapper

close:#23007284

Signed-off-by: chihe <chihe@oppo.com>
This commit is contained in:
chihe 2025-01-22 11:28:36 +08:00 committed by zhumingze1108
parent 621017b3b3
commit c65d6c19df
6 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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 {

View File

@ -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) {

View File

@ -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