Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ref: #1271
Plugin Implementation
The plugin interacts with JuiceFS via TCP or Unix Domain Socket (UDS).
Other approaches (e.g. Go native plugin) are not considered at this time due to concerns over platform compatibility, upgrade compatibility, or usability.
Usage
JFS_PLUGIN_URL=tcp://localhost:8080 ./juicefs format sqlite3://test.db test --bucket=/tmp/jfs-plugin --storage=pluginCompatibility (Hot‑Reload)
New Plugin vs. Old JuiceFS
• Launch a new instance of the plugin bound to the new address.
• Use a new environment variable JFS_PLUGIN_URL to point to the new plugin.
• Gracefully restart JuiceFS to switch over to the new plugin without downtime.
Old Plugin vs. New JuiceFS
• Just perform a graceful restart with the new JuiceFS version.
Performance
BenchmarkPlugin/UDS/Put-8 2638 443185 ns/op 369 B/op 14 allocs/op
BenchmarkPlugin/UDS/Get-8 1185 905237 ns/op 4203320 B/op 20 allocs/op
BenchmarkPlugin/UDS/Limits-8 143218 8609 ns/op 296 B/op 11 allocs/op
BenchmarkPlugin/TCP/Put-8 3274 362298 ns/op 366 B/op 14 allocs/op
BenchmarkPlugin/TCP/Get-8 1363 807282 ns/op 4203392 B/op 21 allocs/op
BenchmarkPlugin/TCP/Limits-8 106866 12811 ns/op 296 B/op 11 allocs/op
Ref
projects about go plugin that some might be usable.