Copilot commented on code in PR #430:
URL: https://github.com/apache/fluss-rust/pull/430#discussion_r2901178979
##########
crates/examples/src/example_table.rs:
##########
@@ -15,6 +15,10 @@
// specific language governing permissions and limitations
// under the License.
+#[cfg(not(target_env = "msvc"))]
+#[global_allocator]
+static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
Review Comment:
The `#[global_allocator]` declaration is only added to `example_table.rs`.
The two other example binaries (`example-upsert-lookup` pointing to
`example_kv_table.rs`, and `example-partitioned-upsert-lookup` pointing to
`example_partitioned_kv_table.rs`) are each registered as their own standalone
`[[example]]` entry in `Cargo.toml` and will therefore be compiled as
independent binaries that do NOT use jemalloc as the global allocator. Since
`tikv-jemallocator` is listed as a dependency for the whole `fluss-examples`
crate, users who run the other two examples will link jemalloc but will not
activate it as the global allocator, which contradicts the intent of this
change. Consider adding the `#[global_allocator]` declaration to
`example_kv_table.rs` and `example_partitioned_kv_table.rs` as well.
##########
crates/examples/Cargo.toml:
##########
@@ -27,6 +27,9 @@ version = { workspace = true }
fluss = { workspace = true, features = ["storage-all"] }
tokio = { workspace = true }
clap = { workspace = true }
+
+[target.'cfg(not(target_env = "msvc"))'.dependencies]
+tikv-jemallocator = "0.6"
Review Comment:
A blank line is missing between the `[target.'cfg(not(target_env =
"msvc"))'.dependencies]` section and the first `[[example]]` table. TOML is
still parseable without it, but this is a formatting/readability issue — all
other sections in this file are separated by blank lines. Consider adding a
blank line after `tikv-jemallocator = "0.6"` and before `[[example]]`.
```suggestion
tikv-jemallocator = "0.6"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]