From 14eb28dcd65cd9f5ccd60e5643b5a0350886a990 Mon Sep 17 00:00:00 2001 From: Hauser Date: Wed, 7 Oct 2026 18:02:39 +0800 Subject: [PATCH] chore(deps): refresh workspace dependencies and hotpath profiling (#8380) * chore(deps): update workspace dependencies Co-Authored-By: heihutu Co-Authored-By: zhi22915 * fix: allow hotpath label marker attributes Co-Authored-By: heihutu Co-Authored-By: zhi22915 * fix: refine hotpath profiling attribution Co-Authored-By: heihutu Co-Authored-By: zhi22915 * test: guard object hotpath attribution Co-Authored-By: heihutu Co-Authored-By: zhi22915 * Add ProfileReasonCode to CPU profile capture Signed-off-by: Hauser * fix: restore CPU profile test import Co-Authored-By: heihutu Co-Authored-By: zhi22915 --------- Signed-off-by: Hauser Co-authored-by: zhi22915 Co-authored-by: Chris --- Cargo.lock | 299 +++++++++--------- Cargo.toml | 32 +- crates/ecstore/src/erasure/coding/bitrot.rs | 2 +- crates/ecstore/src/erasure/coding/erasure.rs | 6 +- .../hotpath_cpu_attribution_contract_test.rs | 4 +- crates/rio/src/hash_reader.rs | 2 + rustfs/src/app/object/get.rs | 1 + rustfs/src/app/object/mod.rs | 9 +- rustfs/src/app/object/put.rs | 1 + rustfs/tests/connect_profile_cpu.rs | 4 +- ...otpath_object_attribution_contract_test.rs | 47 +++ 11 files changed, 221 insertions(+), 186 deletions(-) create mode 100644 rustfs/tests/hotpath_object_attribution_contract_test.rs diff --git a/Cargo.lock b/Cargo.lock index 5298036bb..5374c9ecd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,16 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - [[package]] name = "addr2line" version = "0.25.1" @@ -773,9 +763,9 @@ dependencies = [ [[package]] name = "async-rs" -version = "0.8.12" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f55b2bcef73a79a2feb5496478693077b60b7337896f0b72431cd5311d988a" +checksum = "407bdac3815af195d2d63fa50595610ea8ba4d47b7fc5a37895b05d3b571c241" dependencies = [ "async-compat", "async-global-executor", @@ -1037,9 +1027,9 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.113.0" +version = "1.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87184f36ade012f46cdc773c7be10031b4545a1aea70a9a22a044e8f36f1e5c5" +checksum = "12be2f9c8eef7f5fc919c96d538e629698469a02b4cb75408b26b1bd984ebe79" dependencies = [ "arc-swap", "aws-credential-types", @@ -1062,9 +1052,9 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.115.0" +version = "1.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84edc7495d56e006dff0031cbc9782784902456f7024651c2da902a3d2336262" +checksum = "d7645db8724ea3b82fdccfb67e1b0f637c9d8ab0e7ef29d84884d8d8d73f805d" dependencies = [ "arc-swap", "aws-credential-types", @@ -1695,18 +1685,18 @@ dependencies = [ [[package]] name = "bon" -version = "3.10.1" +version = "3.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60eafe0d77c3a2fc292c1d1346c3041b33c0a108085a2afabf672b70f69dbbc9" +checksum = "214f5df094ce551a10a30ffb9c70243d61f121a3d985a6495933e181dee6a7d2" dependencies = [ "bon-macros", ] [[package]] name = "bon-macros" -version = "3.10.1" +version = "3.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0f9631d8aaaee112c41985d675ef269e02acbd4f33122836af4f0c5f699ff6" +checksum = "2706da6c749998cc555d04184909608956a69ad3f8ab1a076fbc867b4a3c3ce5" dependencies = [ "darling 0.24.1", "ident_case", @@ -1960,9 +1950,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f360145194ee8e21db5ee7f3fcd4fe52210864c75c985dae33218202c8bbe040" +checksum = "f74872d07caf508b30a21f6836e7d7016a2eaf7d9ff4f48deaa58cd8a0407630" dependencies = [ "find-msvc-tools", "jobserver", @@ -2632,9 +2622,9 @@ dependencies = [ [[package]] name = "ctutils" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e" +checksum = "03bb0e1cc970d482d121d9a1744999169b69a07470b3d644a7894e53fcaf4574" dependencies = [ "cmov", "subtle", @@ -3777,9 +3767,9 @@ dependencies = [ [[package]] name = "dial9" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6b45b31143736103e8dca37f060493047908aa2c6ce02624c423ffaf38dca37" +checksum = "b35f95885a2167602b457c77caf898670c02eb0aaba72bef76ac5b0faef86e14" dependencies = [ "bon", "dial9-core", @@ -3794,10 +3784,11 @@ dependencies = [ [[package]] name = "dial9-core" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e917e087ee3b643449ac7dd23786c80734bd4a255984802154fe8fad04facb3b" +checksum = "82f826078c782919cf9a4fb0b2b6755dab24d6c908b5181469b23cf6eb8f6fff" dependencies = [ + "ahash", "arc-swap", "bon", "bytes", @@ -3827,9 +3818,9 @@ dependencies = [ [[package]] name = "dial9-metrique" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef5c59184dc198a59300361f876874106f0faeb09a7339fa15b10e71ccb5b099" +checksum = "9c59e35e7b38ce255d3dc6310b48c3ea54307c42a0589eda44ea91ba24eadf67" dependencies = [ "dial9-core", "dial9-trace-format", @@ -3841,9 +3832,9 @@ dependencies = [ [[package]] name = "dial9-perf-self-profile" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "951556d3105a96b5daf28782d7628fde16c104fe014a1366925a6dde2f9979fd" +checksum = "3c429b209bc07612b2e60267e8bca80cd2b249f498e9a0b83f7caf514d5f5388" dependencies = [ "blazesym", "bon", @@ -3860,9 +3851,9 @@ dependencies = [ [[package]] name = "dial9-tokio-telemetry" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89efd773588cfecbaa1b686baec990544ea184fa416e92da92084cc76359d993" +checksum = "aee46c0a97dd88ba151f9688c79de60c41cd7efc6855e6eb369af06326cba8f3" dependencies = [ "bon", "bytes", @@ -3885,10 +3876,11 @@ dependencies = [ [[package]] name = "dial9-trace-format" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a74503a498a7fe5616f0ad4952c333f5237473bf7e3c4d40f94ceed376a6cbe" +checksum = "258116805212db80e607656c81d2bf9830e66d5747e6ed6a29d17eeb2e673ff2" dependencies = [ + "ahash", "dial9-trace-format-derive", "serde", "typeid", @@ -3896,9 +3888,9 @@ dependencies = [ [[package]] name = "dial9-trace-format-derive" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7062a8c4af86a878843c8ac2f99d9ecbce30de9069700e70b1aef333976719f" +checksum = "23b6700840c894de4a66d698850647560a1ae889183d419211877d049a063aad" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3985,6 +3977,12 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "780955b8b195a21ab8e4ac6b60dd1dbdcec1dc6c51c0617964b08c81785e12c9" +[[package]] +name = "dtoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" + [[package]] name = "dunce" version = "1.0.5" @@ -4094,7 +4092,7 @@ dependencies = [ "elliptic-curve 0.14.1", "rfc6979 0.6.0", "signature 3.0.0", - "spki 0.8.0", + "spki 0.8.1", "zeroize", ] @@ -4151,9 +4149,9 @@ dependencies = [ [[package]] name = "either" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" [[package]] name = "elliptic-curve" @@ -4988,9 +4986,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8e5e5a340588f4452631496976cf8636d4a7ecf600239fdc27615d2530bc16" +checksum = "7d29020232d6aa3fb1daca64c1127cf662cf97f254ae16c18c05b8ab635fc118" dependencies = [ "atomic-waker", "bytes", @@ -5271,9 +5269,9 @@ dependencies = [ [[package]] name = "hotpath" -version = "0.28.4" +version = "0.28.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92f8d56370b4cf47b04cf873315d2d0a226a3766ca74f5131521b7aa8bc3d41f" +checksum = "34aabdeba3c81cef2075a2961a370ebfe1d9cc3f8d2242fd400ce6ef6f3bbfcb" dependencies = [ "arc-swap", "async-channel", @@ -5306,15 +5304,15 @@ dependencies = [ [[package]] name = "hotpath-drain" -version = "0.28.4" +version = "0.28.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9b046ca03d797e6728d43593d7d6aca9782a217cdaa1d81ea9c632993d78292" +checksum = "b4b61a4a77e6563bdc37f831cd6aa5e2089429b62ea377dd759bbabafc207d7a" [[package]] name = "hotpath-macros" -version = "0.28.4" +version = "0.28.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b846c9cd71ddc939fa4f3ca40fef97505e2d4838580cfed2328a02f345a94761" +checksum = "8c6275c8d1931d280bd505debb7ef91dbeae2c23477aabbfe10487b7430bdeb3" dependencies = [ "proc-macro2", "quote", @@ -5403,9 +5401,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.11.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b501faa50e7a26c3d3560ca625132f4078a17771f4810baf70475ae48cbe43" +checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c" dependencies = [ "atomic-waker", "bytes", @@ -5658,9 +5656,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.48.0" +version = "1.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0f8fee8c926415c58d6ae43a08523a26faccb2323f5e6b644fe7dd4ef6b82" +checksum = "b67d3d2e287e4b86c10b3f3b641033d1f89b74bdb39d05f34952e2b9a6fe21cd" dependencies = [ "console", "once_cell", @@ -5789,9 +5787,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jiff" -version = "0.2.37" +version = "0.2.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1baf72f08796de0260609515130699b890ac25f30e610ad894bc5856cafdb" +checksum = "b2b005715dcbeb0089a3c0dab99f2ff1cc3b2525323552703d648585d342a383" dependencies = [ "defmt 1.1.1", "jiff-core", @@ -5816,9 +5814,9 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.37" +version = "0.2.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "378268a1116ad67ae6228701118ac9f491d78fda38a40a1f1a9e1348de6f7212" +checksum = "2cc9817253cf7c7ee4684451bd327e88d6f3658014e54a29198625590650695c" dependencies = [ "jiff-core", "proc-macro2", @@ -5828,9 +5826,9 @@ dependencies = [ [[package]] name = "jiff-tzdb" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142bd39932ad231f10513df9ab62661fead8719872150b7ad02a2df79f4e141e" +checksum = "fa8377070c6bae868759445e5a77f66d84f0b72f3a054bfb00e6d038b8282da7" [[package]] name = "jiff-tzdb-platform" @@ -6011,9 +6009,9 @@ dependencies = [ [[package]] name = "lazy-regex" -version = "3.6.1" +version = "3.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4994ba703f78b083e2f7946dac9251abd83fd43a0365f030e99b69be5b4b9ef9" +checksum = "f0a2cce8a22920a29fdcc8c9170aa5d29edd9fbcf8bea856e24c2cb1c2419f67" dependencies = [ "lazy-regex-proc_macros", "once_cell", @@ -6022,14 +6020,14 @@ dependencies = [ [[package]] name = "lazy-regex-proc_macros" -version = "3.6.1" +version = "3.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd97232314824e6dbef1918a871bb93f51070455e3715bf26e19a6d01aa977a0" +checksum = "6f1e4b1f1d8c71edb4ff2b2150ec4606445fd2ddf67ddc097655daf59286baa6" dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.119", + "syn 3.0.6", ] [[package]] @@ -6106,9 +6104,9 @@ checksum = "34b357333733e8260735ba5894eb928c02ecc69c78715f01a8019e7fa7f2db4c" [[package]] name = "libc" -version = "0.2.189" +version = "0.2.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" +checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78" [[package]] name = "libflate" @@ -6472,9 +6470,9 @@ dependencies = [ [[package]] name = "metrique" -version = "0.1.31" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b55bfa39e6f5e44a37a59a794915ce36d04371471cf62ae365cd9703f58a5e0" +checksum = "2d73091a31175e903e78e876a246659bd2b2c8e2bd87b7b29bfc9ce2ad337015" dependencies = [ "itoa", "metrique-core", @@ -6490,9 +6488,9 @@ dependencies = [ [[package]] name = "metrique-core" -version = "0.1.22" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd60ab3f5d8e13e36aa1d1dd9cc4920012dd21a25bd7311ae3c39810648e068" +checksum = "ef48bd0b3616269daf647473b43a5a832db438392a2956c3a928ff859f9d2dac" dependencies = [ "itertools 0.14.0", "metrique-writer-core", @@ -6500,23 +6498,22 @@ dependencies = [ [[package]] name = "metrique-macro" -version = "0.1.22" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7605c49951713cce25af6bee77ed4432dde0839c5d9935bcb6f9643e6e82c7c3" +checksum = "2c35873982fe77f6876b701e095058785491bb415eb6bdcfc5b0b291ead76099" dependencies = [ - "Inflector", - "darling 0.23.0", + "darling 0.24.1", "metrique-core", "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.6", ] [[package]] name = "metrique-service-metrics" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ee17caa35f83b730a83c8fa8f7a9aaa61a0becc7a71feb5bfb854bc75440d7" +checksum = "2f3174803bacaeaa025a7b8ff998b415892d0bd0272d4694cb22ee55f93ee027" dependencies = [ "metrique-writer", ] @@ -6529,9 +6526,9 @@ checksum = "2faca4e4480069ff02b1763b3b79f5cec7e8628e24d9dc5b6073f53d2577a4d9" [[package]] name = "metrique-writer" -version = "0.1.27" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb97854dd4e2a92fe54b30e6e19976dcc0b2b7d39da3e84e86e2ce1e2ed8ce0d" +checksum = "d3b3d251bde7a2ef3cb27371d41751770191041ffe56f6ac22d2fa30ca99e68b" dependencies = [ "ahash", "crossbeam-queue", @@ -6550,28 +6547,30 @@ dependencies = [ [[package]] name = "metrique-writer-core" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71c9fc241cff4eedc2b6c3e2edece7f3edab2920e7531f62aac864ce933cdbb6" +checksum = "5e253373268b34ae3f1b0e0348dd56fd0924f45ea49b086913e18d273ee03098" dependencies = [ "derive-where", + "dtoa", "itertools 0.14.0", + "itoa", "serde", "smallvec", ] [[package]] name = "metrique-writer-macro" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1eef190f855405b9df4166ee0495925162fb2a7985bac62c6ae44f40061fac00" +checksum = "4f0c50a61ecf0e0afd1778768ccb662ae5aa759b7ff15748003a4a920d61ff51" dependencies = [ - "darling 0.23.0", + "darling 0.24.1", + "metrique-core", "proc-macro2", "quote", - "str_inflector", - "syn 2.0.119", - "synstructure 0.13.2", + "syn 3.0.6", + "synstructure 0.14.0", ] [[package]] @@ -6626,9 +6625,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.3" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b18443e9c262bfe8fa82f51666e2642c53393f7e5c27b3e1aeab922cff5b9d8" +checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" dependencies = [ "libc", "wasi 0.11.1+wasi-snapshot-preview1", @@ -7109,9 +7108,9 @@ dependencies = [ [[package]] name = "objc2" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" dependencies = [ "objc2-encode", ] @@ -7572,9 +7571,9 @@ dependencies = [ [[package]] name = "pageant" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d8eab09a361a4afe0b1668be978cd97e4f052e927a92b0b608cf902965d49ce" +checksum = "f0786409b5aaa884655c9b4065681db0835db0cc185a6fb19fb17a5d38656866" dependencies = [ "base16ct 1.0.0", "byteorder", @@ -7926,7 +7925,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "986d2e952779af96ea048f160fd9194e1751b4faea78bcf3ceb456efe008088e" dependencies = [ "der 0.8.2", - "spki 0.8.0", + "spki 0.8.1", ] [[package]] @@ -7973,7 +7972,7 @@ dependencies = [ "rand_core 0.10.1", "scrypt 0.12.0", "sha2 0.11.0", - "spki 0.8.0", + "spki 0.8.1", ] [[package]] @@ -7995,7 +7994,7 @@ dependencies = [ "der 0.8.2", "pkcs5 0.8.1", "rand_core 0.10.1", - "spki 0.8.0", + "spki 0.8.1", ] [[package]] @@ -8118,9 +8117,9 @@ dependencies = [ [[package]] name = "powerfmt" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" [[package]] name = "ppmd-rust" @@ -8497,24 +8496,24 @@ dependencies = [ [[package]] name = "qrcode-core" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26252cf2e15d05b24b4a2cb9335952d697e54f07949f79ee721951d563b19a71" +checksum = "217eaaa981eea8acfefa0af24d0d48f7a63f43b966a0c4f054d90f9dccb76019" [[package]] name = "qrcode-decode" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3054ba7f6b1906502789970337da290b1da2069d7225c9ec1c3f8351de807f78" +checksum = "905ca22d33d7e3fb5d49efe38a183cdcfd96b069fd0863cf99fca6149065fb89" dependencies = [ "qrcode-core", ] [[package]] name = "qrcode-eps" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7a9f889b4a03011b029f20ad6b68450eac25c1be04d13ee22f7682496c1f069" +checksum = "27ca6245ed82c10793d6aa40e56713197d522aaf2f3c1c8e6aeae0a5823c45d3" dependencies = [ "qrcode-core", "qrcode-render", @@ -8522,9 +8521,9 @@ dependencies = [ [[package]] name = "qrcode-html" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "454af1fc1b8b56b2e38913f0aeba20241e0790dd031d3595ae1a098174944478" +checksum = "782da10a42d39d8b835be9d77d6ee343e58cf4755dc578afbde0a4e3d280d467" dependencies = [ "qrcode-core", "qrcode-render", @@ -8532,9 +8531,9 @@ dependencies = [ [[package]] name = "qrcode-image" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9336db7ceee96a7909ebf412c9734fbfe498825ab29246d4dee27c9398baa9f9" +checksum = "3e145e4a5b673a5aca2fe2a07c5c156015bf5c46e2f43f24a9bf827833e1329c" dependencies = [ "qrcode-core", "qrcode-render", @@ -8542,15 +8541,15 @@ dependencies = [ [[package]] name = "qrcode-parse" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ae80b5d21e40035a88f449e2031985522de0d6a2c16bbfacc75b983698bf731" +checksum = "674b81fb75c3ae22430804961c50286c35312e278ae729499fa4cf4e1367b77a" [[package]] name = "qrcode-pdf" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "123246123420fdc135533e47f47b00636c4138bf71adf141c5de846f94f811ad" +checksum = "21f31cff40711b9192e1501d179c635a24bd2524cc846944fca00511fd5f2207" dependencies = [ "qrcode-core", "qrcode-render", @@ -8558,9 +8557,9 @@ dependencies = [ [[package]] name = "qrcode-pic" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18cbc03b812474442622453c1b9f925a4025cc00d9100255ecb1accef7953411" +checksum = "3cab8b28113bd94c2d45421fab2fa7fabaa7e6d3f23b9a1838bed4b38e05b9f1" dependencies = [ "qrcode-core", "qrcode-render", @@ -8568,18 +8567,18 @@ dependencies = [ [[package]] name = "qrcode-render" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74445b565ffecbed5c6ad34096df2a81f487c4befd6b91b75d11bdbe61d73094" +checksum = "a8fd91fc36ca088759ec7b701c41aecf3581d613a6edc055c7060ab222dc14a5" dependencies = [ "qrcode-core", ] [[package]] name = "qrcode-rs" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320f7c1c48a10a0850746b87d5adf95f1db5209320c7f1853556c0bb774fc0f6" +checksum = "8de6acff5236b527bc35e00a462bce45f4fccbcacdbbd39d98528e03e2d1b629" dependencies = [ "qrcode-core", "qrcode-decode", @@ -8595,9 +8594,9 @@ dependencies = [ [[package]] name = "qrcode-svg" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daea027c13f12e97bc32aeefda12c4ce0298307e9094fe45731a731f544dabd0" +checksum = "e257fb833e290961b12beec7c4a7582d35f3926910e13703ced9eabc20e3c590" dependencies = [ "qrcode-core", "qrcode-render", @@ -9229,7 +9228,7 @@ dependencies = [ "rand_core 0.10.1", "sha2 0.11.0", "signature 3.0.0", - "spki 0.8.0", + "spki 0.8.1", "zeroize", ] @@ -9287,9 +9286,9 @@ dependencies = [ [[package]] name = "russh" -version = "0.63.3" +version = "0.64.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "036204edbd199552a5b3832f63c60dcdf395dc44c7f06b4af1c0e8139cc11bce" +checksum = "ba61e87b9ec9a39a59a6bbed4c0b8ff7fb07073405b24a767a1f2c8560ac8f58" dependencies = [ "aes 0.9.3", "aws-lc-rs", @@ -9345,7 +9344,7 @@ dependencies = [ "sha2 0.11.0", "sha3 0.12.0", "signature 3.0.0", - "spki 0.8.0", + "spki 0.8.1", "ssh-encoding", "ssh-key", "subtle", @@ -12029,9 +12028,9 @@ dependencies = [ [[package]] name = "spki" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9efca8738c78ee9484207732f728b1ef517bbb1833d6fc0879ca898a522f6f" +checksum = "7ef958a98b9d5da290cfc78946e9f3e61e1e62a18db0d92cac0b83cc161491a9" dependencies = [ "base64ct", "der 0.8.2", @@ -12146,9 +12145,9 @@ dependencies = [ [[package]] name = "starshard" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4155f6127729fef4a7b2aff334e9f05e697f52b67a8512e789b640e036195544" +checksum = "fc45de5060fab0de00d7a42230877543ae00c37caf6f49975e69851089b023ac" dependencies = [ "async-trait", "hashbrown 0.17.1", @@ -12175,16 +12174,6 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "str_inflector" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0b848d5a7695b33ad1be00f84a3c079fe85c9278a325ff9159e6c99cef4ef7" -dependencies = [ - "lazy_static", - "regex", -] - [[package]] name = "stringprep" version = "0.1.5" @@ -12457,7 +12446,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom 0.4.3", "once_cell", "rustix", "windows-sys 0.61.2", @@ -12657,9 +12646,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.53.1" +version = "1.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +checksum = "e95f91fcc7a621e8b030f6aa23c71fe9838ae2fb4d8118b75602a328f5144044" dependencies = [ "bytes", "libc", @@ -13127,9 +13116,9 @@ dependencies = [ [[package]] name = "twox-hash" -version = "2.1.4" +version = "2.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5283634e518fe9e82c7b20520bb4bc209009fd16c82077c802f8111ecbb0117a" +checksum = "86a801b3cea342a06d468c8710662aa29e5e05e4f5c0d62f00bbb7f2ad7941c2" [[package]] name = "typed-path" @@ -13183,9 +13172,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" [[package]] name = "unicode-bidi" @@ -13287,9 +13276,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.26.1" +version = "1.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ef6dac1e96601b4fb3acccccff2139741fcb757cb9a36089bf5be91cfb285ce" +checksum = "97277d36b9c3ace13e58fa6e753f8b0bbbf302a18dd193240d70f9e29681059a" dependencies = [ "getrandom 0.4.3", "js-sys", @@ -13357,9 +13346,9 @@ dependencies = [ [[package]] name = "want" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b" dependencies = [ "try-lock", ] @@ -14021,18 +14010,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.59" +version = "0.8.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6df92bf3d9227be3d53173901ddbffac2babc27ae50f397776ffd6dc33f800cb" +checksum = "6400fc4bb7426f6faac3fb07566122bb18622e3022bd2c36426a92ed489b1dbe" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.59" +version = "0.8.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac4f328cf2f05d084e496c3e9c3f33ed0a183656a16e1fcec4d464d8373aec82" +checksum = "99c27cc7525bad4df59a45e073c45b2c2aa820efb588234cc23a547ec69a34db" dependencies = [ "proc-macro2", "quote", @@ -14062,9 +14051,9 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" +checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" dependencies = [ "zeroize_derive", ] diff --git a/Cargo.toml b/Cargo.toml index 25d8cac2c..edef4184e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,7 +73,7 @@ resolver = "3" edition = "2024" license = "Apache-2.0" repository = "https://github.com/rustfs/rustfs" -rust-version = "1.98.1" +rust-version = "1.99.0" version = "1.0.1" homepage = "https://rustfs.com" description = "RustFS is a high-performance distributed object storage software built using Rust, one of the most popular languages worldwide. " @@ -157,7 +157,7 @@ futures-util = "0.3.34" pollster = "1.0.1" pulsar = { default-features = false, version = "6.9.0" } lapin = { default-features = false, version = "4.12.0" } -hyper = { version = "1.11.1" } +hyper = { version = "1.12.0" } hyper-rustls = { default-features = false, version = "0.27.10" } hyper-util = { version = "0.1.21" } http = "1.5.0" @@ -168,7 +168,7 @@ minlz = "1.2.3" reqwest = "0.13.5" rustfs-kafka-async = { version = "1.3.1" } socket2 = { version = "0.6.5" } -tokio = { version = "1.53.1" } +tokio = { version = "1.53.2" } tokio-rustls = { default-features = false, version = "0.26.6" } tokio-stream = { version = "0.1.19" } tokio-test = "0.4.6" @@ -219,13 +219,13 @@ x509-parser = "0.18.1" sha1 = "0.11.0" sha2 = "0.11.0" subtle = "2.6" -zeroize = { version = "1.9.0" } +zeroize = { version = "1.9.1" } proptest = "1" # Time and Date chrono = { version = "0.4.45" } humantime = "2.4.0" -jiff = { version = "0.2.37" } +jiff = { version = "0.2.38" } time = { version = "0.3.55" } # Database @@ -244,9 +244,9 @@ atoi = "3.1.0" atomic_enum = "0.3.0" aws-config = { version = "1.12.0" } aws-credential-types = { version = "1.3.0" } -aws-sdk-kms = { default-features = false, version = "1.122.0" } -aws-sdk-s3 = { default-features = false, version = "1.151.0" } -aws-sdk-sts = { default-features = false, version = "1.118.0" } +aws-sdk-kms = { default-features = false, version = "1.123.0" } +aws-sdk-s3 = { default-features = false, version = "1.152.0" } +aws-sdk-sts = { default-features = false, version = "1.119.0" } aws-smithy-async = { version = "1.3.0" } aws-smithy-http-client = { default-features = false, version = "1.5.0" } aws-smithy-runtime-api = { version = "1.19.0" } @@ -279,7 +279,7 @@ highway = { version = "1.3.0" } hostname = "0.4.2" ipnetwork = { version = "0.21.1" } lazy_static = "1.5.1" -libc = "0.2.189" +libc = "0.2.190" libsystemd = "0.7.2" local-ip-address = "0.6.13" log = "0.4" @@ -299,7 +299,7 @@ percent-encoding = "2.3.2" # Server-side QR rendering for TOTP enrollment, so neither the console nor the # CLI needs its own QR encoder. No default features: the image/render backends # pull in an image stack this only needs SVG and text output from. -qrcode-rs = { version = "2.1.1", default-features = false, features = ["std", "svg"] } +qrcode-rs = { version = "2.2.0", default-features = false, features = ["std", "svg"] } pin-project-lite = "0.2.17" pretty_assertions = "1.4.1" rand = { version = "0.10.3" } @@ -322,7 +322,7 @@ siphasher = "1.0.4" smallvec = { version = "1.16.2" } compact_str = "0.10.0" snap = "1.1.2" -starshard = { version = "2.3.0" } +starshard = { version = "2.4.0" } strum = { version = "0.28.0" } sysinfo = "0.39.6" temp-env = "0.3.6" @@ -338,7 +338,7 @@ tracing-subscriber = { version = "0.3.23" } transform-stream = "0.3.1" url = "2.5.8" urlencoding = "2.1.3" -uuid = { version = "1.26.1" } +uuid = { version = "1.27.0" } vaultrs = { version = "0.8.0" } tar = "0.4.46" walkdir = "2.5.0" @@ -352,7 +352,7 @@ zstd = "0.14.0" # Observability and Metrics metrics = "0.24.6" metrics-util = "0.20" -dial9 = { version = "0.5.2", default-features = false } +dial9 = { version = "0.5.3", default-features = false } opentelemetry = { version = "0.33.0" } opentelemetry-appender-tracing = { version = "0.33.0" } opentelemetry-otlp = { version = "0.33.0" } @@ -367,7 +367,7 @@ libunftp = { version = "0.23.1" } unftp-core = "0.1.0" suppaftp = { version = "12.1.1" } rcgen = { version = "0.14.10", default-features = false, features = ["aws_lc_rs", "crypto", "pem"] } -russh = { version = "0.63.3" } +russh = { version = "0.64.1" } russh-sftp = "3.0.1" # WebDAV @@ -376,9 +376,9 @@ dav-server = "0.11.0" # Performance Analysis and Memory Profiling rustfs-mimalloc = { version = "0.5.6" } # Preserve Unicode focus filters until rustfs/backlog#2302 is resolved. -hotpath = { version = "0.28.0", default-features = false } +hotpath = { version = "0.28.5", default-features = false } # Snapshot testing for output format regression detection -insta = { version = "1.48" } +insta = { version = "1.49" } [workspace.metadata.cargo-shear] ignored = ["hotpath", "rustfs"] diff --git a/crates/ecstore/src/erasure/coding/bitrot.rs b/crates/ecstore/src/erasure/coding/bitrot.rs index 389565520..d30fc19ee 100644 --- a/crates/ecstore/src/erasure/coding/bitrot.rs +++ b/crates/ecstore/src/erasure/coding/bitrot.rs @@ -497,7 +497,7 @@ where /// Write a (hash+data) block. Returns the number of data bytes written. /// Returns an error if called after a short write or if data exceeds shard_size. - #[hotpath::measure(label = "BitrotWriter::write", impl_type = "BitrotWriter")] + #[hotpath::measure(impl_type = "BitrotWriter", future = true)] pub async fn write(&mut self, buf: &[u8]) -> std::io::Result { if buf.is_empty() { return Ok(0); diff --git a/crates/ecstore/src/erasure/coding/erasure.rs b/crates/ecstore/src/erasure/coding/erasure.rs index 4548816e8..b51b763b4 100644 --- a/crates/ecstore/src/erasure/coding/erasure.rs +++ b/crates/ecstore/src/erasure/coding/erasure.rs @@ -791,7 +791,7 @@ impl Erasure { } #[tracing::instrument(level = "debug", skip_all, fields(data_len=data.len()))] - #[hotpath::measure(label = "Erasure::encode_data", impl_type = "Erasure")] + #[hotpath::measure(impl_type = "Erasure")] pub(crate) fn encode_data_block(&self, data: &[u8]) -> io::Result { self.encode_data_block_inner(data) } @@ -810,7 +810,7 @@ impl Erasure { .map(|block| block.into_shards(self.total_shard_count())) } - #[hotpath::measure(label = "Erasure::encode_data_owned", impl_type = "Erasure")] + #[hotpath::measure(impl_type = "Erasure")] pub(crate) fn encode_data_owned_block(&self, data: Vec) -> io::Result { self.encode_data_owned_block_inner(data) } @@ -844,7 +844,7 @@ impl Erasure { .map(|block| block.into_shards(self.total_shard_count())) } - #[hotpath::measure(label = "Erasure::encode_data_bytes_mut", impl_type = "Erasure")] + #[hotpath::measure(impl_type = "Erasure")] pub(crate) fn encode_data_bytes_mut_block(&self, data_buffer: BytesMut, data_len: usize) -> io::Result { self.encode_buffer(data_buffer, data_len) } diff --git a/crates/ecstore/tests/hotpath_cpu_attribution_contract_test.rs b/crates/ecstore/tests/hotpath_cpu_attribution_contract_test.rs index 00e91653e..b990f3889 100644 --- a/crates/ecstore/tests/hotpath_cpu_attribution_contract_test.rs +++ b/crates/ecstore/tests/hotpath_cpu_attribution_contract_test.rs @@ -67,8 +67,8 @@ fn inherent_hotpath_measurements_have_cpu_attribution_types() { } assert_measured_as(BITROT, "BitrotReader", "read"); assert!( - BITROT.contains("#[hotpath::measure(label = \"BitrotWriter::write\", impl_type = \"BitrotWriter\")]"), - "BitrotWriter::write must retain its stable label and CPU impl_type", + BITROT.contains("#[hotpath::measure(impl_type = \"BitrotWriter\", future = true)]\n pub async fn write"), + "BitrotWriter::write must retain async lifecycle and CPU attribution", ); for function in [ "read_version_optimized", diff --git a/crates/rio/src/hash_reader.rs b/crates/rio/src/hash_reader.rs index 36ef1a7e6..e8a93e28b 100644 --- a/crates/rio/src/hash_reader.rs +++ b/crates/rio/src/hash_reader.rs @@ -534,6 +534,8 @@ impl AsyncRead for HashReader { let before = buf.filled().len(); match this.inner.poll_read(cx, buf) { Poll::Pending => Poll::Pending, + // SAFETY: This fixed label is unique within rustfs-rio, satisfying hotpath's export_name symbol contract. + #[allow(unsafe_code)] Poll::Ready(Ok(())) => crate::hp_measure_block!("HashReader::on_chunk", { let data = &buf.filled()[before..]; let filled = data.len(); diff --git a/rustfs/src/app/object/get.rs b/rustfs/src/app/object/get.rs index aff55e805..b4ab95a06 100644 --- a/rustfs/src/app/object/get.rs +++ b/rustfs/src/app/object/get.rs @@ -3943,6 +3943,7 @@ impl DefaultObjectUsecase { } #[instrument(name = "execute_get_object", level = "trace", skip(self, req))] + #[hotpath::measure(impl_type = "DefaultObjectUsecase", future = true)] pub async fn execute_get_object(&self, req: S3Request) -> S3Result> { self.execute_get_object_boxed(req).await } diff --git a/rustfs/src/app/object/mod.rs b/rustfs/src/app/object/mod.rs index 27d02fd2d..c182225bc 100644 --- a/rustfs/src/app/object/mod.rs +++ b/rustfs/src/app/object/mod.rs @@ -364,14 +364,7 @@ impl DefaultObjectUsecase { map_quota_check_outcome(bucket, quota_checker.check_quota(bucket, op, size).await).map(Some) } - #[hotpath::measure( - label = "rustfs::app::object_usecase::DefaultObjectUsecase::execute_put_object", - impl_type = "DefaultObjectUsecase" - )] - #[hotpath::measure( - label = "rustfs::app::object_usecase::DefaultObjectUsecase::execute_get_object", - impl_type = "DefaultObjectUsecase" - )] + #[hotpath::measure(impl_type = "DefaultObjectUsecase", future = true)] #[instrument(level = "debug", skip(self, req))] pub async fn execute_select_object_content( &self, diff --git a/rustfs/src/app/object/put.rs b/rustfs/src/app/object/put.rs index 0bfe61edd..d9a1c3477 100644 --- a/rustfs/src/app/object/put.rs +++ b/rustfs/src/app/object/put.rs @@ -1183,6 +1183,7 @@ impl DefaultObjectUsecase { } #[instrument(name = "execute_put_object", level = "info", skip(self, _fs, req))] + #[hotpath::measure(impl_type = "DefaultObjectUsecase", future = true)] pub async fn execute_put_object(&self, _fs: &FS, req: S3Request) -> S3Result> { self.execute_put_object_boxed(_fs, req).await } diff --git a/rustfs/tests/connect_profile_cpu.rs b/rustfs/tests/connect_profile_cpu.rs index 214bab923..534356fdd 100644 --- a/rustfs/tests/connect_profile_cpu.rs +++ b/rustfs/tests/connect_profile_cpu.rs @@ -22,9 +22,11 @@ mod profile_cpu; use std::time::{Duration, SystemTime, UNIX_EPOCH}; +#[cfg(not(feature = "pyroscope"))] +use profile_cpu::ProfileReasonCode; use profile_cpu::{ CPU_PROFILE_CAPABILITY, LocalProfileConsent, MAX_PROFILE_DURATION, ProfileCaptureRequest, ProfileError, ProfileOutcome, - ProfileProvenance, ProfileReasonCode, capture_cpu_profile, + ProfileProvenance, capture_cpu_profile, }; use tokio_util::sync::CancellationToken; diff --git a/rustfs/tests/hotpath_object_attribution_contract_test.rs b/rustfs/tests/hotpath_object_attribution_contract_test.rs new file mode 100644 index 000000000..11f1dd6ab --- /dev/null +++ b/rustfs/tests/hotpath_object_attribution_contract_test.rs @@ -0,0 +1,47 @@ +// Copyright 2024 RustFS Team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const GET_OBJECT: &str = include_str!("../src/app/object/get.rs"); +const PUT_OBJECT: &str = include_str!("../src/app/object/put.rs"); +const SELECT_OBJECT: &str = include_str!("../src/app/object/mod.rs"); + +fn assert_async_method_is_measured(source: &str, method: &str) { + let method_marker = format!("pub async fn {method}"); + let method_start = source + .find(&method_marker) + .unwrap_or_else(|| panic!("missing method {method}")); + let prefix = &source[..method_start]; + let attribute_start = prefix + .rfind("#[hotpath::measure(") + .unwrap_or_else(|| panic!("missing hotpath measurement for {method}")); + let attribute = &prefix[attribute_start..]; + let attribute = attribute + .split_once(")]") + .map(|(attribute, _)| attribute) + .unwrap_or_else(|| panic!("malformed hotpath measurement for {method}")); + + assert!(method_start - attribute_start < 256, "hotpath measurement is not attached to {method}",); + assert!( + attribute.contains("impl_type = \"DefaultObjectUsecase\""), + "{method} must retain CPU symbol attribution", + ); + assert!(attribute.contains("future = true"), "{method} must expose async future lifecycle metrics",); +} + +#[test] +fn object_request_profiling_is_attached_to_the_matching_operation() { + assert_async_method_is_measured(GET_OBJECT, "execute_get_object"); + assert_async_method_is_measured(PUT_OBJECT, "execute_put_object"); + assert_async_method_is_measured(SELECT_OBJECT, "execute_select_object_content"); +}