Skip to content

sync: The start-time/end-time parameters, %Y-%m-%d and %H:%M:%S are strengthened for parameter verification #6148

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

Closed
YunhuiChen opened this issue May 27, 2025 · 1 comment · Fixed by #6154
Assignees

Comments

@YunhuiChen
Copy link
Contributor

What happened:

When --start-time 2025-05-27 14:10:00 was used without quotation marks, no error was reported, but 14:10:00 did not take effect.

root@chaos-k8s-002:~/chenyunhui/juicefs# ll /juicefs1/1
-rw-r--r-- 1 root root 2 May 27 14:06 /juicefs1/1
root@chaos-k8s-002:~/chenyunhui/juicefs# ./juicefs sync /juicefs1/1 /juicefs1/2 --start-time 2025-05-27 14:10:00
2025/05/27 14:21:41.993170 juicefs[3377230] <INFO>: Prometheus metrics listening on 127.0.0.1:9567 [[email protected]:134]
2025/05/27 14:21:41.993818 juicefs[3377230] <INFO>: Syncing from file:///juicefs1/1 to file:///juicefs1/2 [[email protected]:1741]
 Scanned objects: 1/1 [==============================================================]  553.8/s used: 1.81822ms
Excluded objects: 0                 0.0/s
  Excluded bytes: 0.0 b (0 Bytes)   0.0 b/s
 Skipped objects: 0                 0.0/s
   Skipped bytes: 0.0 b (0 Bytes)   0.0 b/s
   Extra objects: 0                 0.0/s
     Extra bytes: 0.0 b (0 Bytes)   0.0 b/s
 Pending objects: 0                 0.0/s
  Copied objects: 1                 744.7/s
    Copied bytes: 2.0 b (2 Bytes)   1.5 KiB/s
  Failed objects: 0                 0.0/s
2025/05/27 14:21:41.995506 juicefs[3377230] <INFO>: Found: 1, excluded: 0 (0 B), skipped: 0 (0 B), copied: 1 (2 B), extra: 0 (0 B), failed: 0 [[email protected]:1676]


What you expected to happen:
jfs version:

root@chaos-k8s-001:~/chenyunhui/jfs-main# juicefs sync /jfs1/1 /jfs1/2 --start-time 2025-05-27 10:10:10
ERROR: This command accept at most 2 arguments but got [/jfs1/1 /jfs1/2 10:10:10]
USAGE:
juicefs sync [command options] SRC DST

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?

Environment:

  • JuiceFS version (use juicefs --version) or Hadoop Java SDK version:
  • Cloud provider or hardware configuration running JuiceFS:
  • OS (e.g cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Object storage (cloud provider and region, or self maintained):
  • Metadata engine info (version, cloud provider managed or self maintained):
  • Network connectivity (JuiceFS to metadata engine, JuiceFS to object storage):
  • Others:
@YunhuiChen YunhuiChen added the kind/bug Something isn't working label May 27, 2025
@davies
Copy link
Contributor

davies commented May 27, 2025

'2025-05-27' was supported as a format, so I'd say this is a feature.

We can add a warning for extra unused args.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants