Skip to content

Conversation

@TrafalgarZZZ
Copy link
Member

@TrafalgarZZZ TrafalgarZZZ commented Aug 15, 2024

Ⅰ. Describe what this PR does

Code changes in this PR:

Ⅱ. Does this pull request fix one issue?

fixes #4273

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

There is a corner case that backward incompatibility may happen in this PR. Please have a loot at my comment below for more information.

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
…ing `dataset.spec.mounts[*].path`

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
err = fileUitls.Mount(mountPathInJindo, mount.MountPoint)
if err != nil {
return err
}
Copy link
Member Author

Choose a reason for hiding this comment

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

A corner case of backward incompatibility is not handled here. Previous implementation allows users to define mount.Path without a prefix "/", and JindoEngine passes mount.Path to JindoFileUtils.Mount(). Inside JindoFileUtils.Mount(), the function automatically add a prefix "/" to mount.Path and try to mount on it.

That is to say, if a user used to set Dataset.spec.mounts[*].path to a string without a prefix "/", he or she may see different behavior before and after this PR is merged. For example:

apiVersion: data.fluid.io/v1alpha1
kind: Dataset
metadata:
  name: demo2
spec:
  placement: Shared
  accessModes:
  - ReadOnlyMany
  mounts:
      mountPoint: <mountPoint>
      name: demo2 # After this pr is merged, mountPoint is mounted to /demo2
      path: mybucket # Before this pr is merged, mountPoint is mounted to /mybucket

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
@sonarqubecloud
Copy link

Copy link
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@fluid-e2e-bot
Copy link

fluid-e2e-bot bot commented Aug 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fluid-e2e-bot fluid-e2e-bot bot merged commit f32b09d into fluid-cloudnative:master Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Incorrect UFS total size when setting spec.mounts[].path with JindoRuntime

2 participants