@@ -315,22 +315,19 @@ func (d *DisaggregatedSubDefaultController) PersistentVolumeBuildVolumesVolumeMo
315315 }
316316
317317 pathName := map [string ]string {} /*key=path, value=name*/
318- namePath := map [string ]string {} /*key=name, value=path*/
319318 var requiredPaths []string
320319 switch componentType {
321320 case v1 .DisaggregatedMS :
322321 //if logNotStore anywhere is true, not build pvc.
323322 if ! commonSpec .PersistentVolume .LogNotStore && ! commonSpec .LogNotStore {
324323 logPath := d .getLogPath (confMap , componentType )
325324 pathName [logPath ] = MSLogStoreName
326- namePath [MSLogStoreName ] = logPath
327325 requiredPaths = append (requiredPaths , logPath )
328326 }
329327 case v1 .DisaggregatedFE :
330328 if ! commonSpec .PersistentVolume .LogNotStore && ! commonSpec .LogNotStore {
331329 logPath := d .getLogPath (confMap , componentType )
332330 pathName [logPath ] = FELogStoreName
333- namePath [MSLogStoreName ] = logPath
334331 requiredPaths = append (requiredPaths , logPath )
335332 }
336333 metaPath := d .getFEMetaPath (confMap )
@@ -340,14 +337,12 @@ func (d *DisaggregatedSubDefaultController) PersistentVolumeBuildVolumesVolumeMo
340337 if ! commonSpec .PersistentVolume .LogNotStore && ! commonSpec .LogNotStore {
341338 logPath := d .getLogPath (confMap , componentType )
342339 pathName [logPath ] = BELogStoreName
343- namePath [MSLogStoreName ] = logPath
344340 requiredPaths = append (requiredPaths , logPath )
345341 }
346342 cachePaths , _ := d .getCacheMaxSizeAndPaths (confMap )
347343 for i , _ := range cachePaths {
348344 path_i := BECacheStorePreName + strconv .Itoa (i )
349345 pathName [cachePaths [i ]] = path_i
350- namePath [path_i ] = cachePaths [i ]
351346 requiredPaths = append (requiredPaths , cachePaths [i ])
352347 }
353348 default :
@@ -361,28 +356,7 @@ func (d *DisaggregatedSubDefaultController) PersistentVolumeBuildVolumesVolumeMo
361356 }
362357
363358 requiredPaths = append (requiredPaths , path )
364- //use unix path separator.
365- sp := strings .Split (path , "/" )
366- name := ""
367- for i := 1 ; i <= len (sp ); i ++ {
368- //avoid sp[i]=="/"
369- if sp [len (sp )- i ] == "" {
370- continue
371- }
372-
373- if name == "" {
374- name = sp [len (sp )- i ]
375- } else {
376- name = sp [len (sp )- i ] + "-" + name
377- }
378-
379- if _ , ok := namePath [name ]; ! ok {
380- break
381- }
382- }
383-
384- namePath [name ] = path
385- pathName [path ] = name
359+ pathName [path ] = BECacheStorePreName + strconv .Itoa (len (requiredPaths ))
386360 }
387361
388362 var vs []corev1.Volume
0 commit comments