diff --git a/.cargo/cargo-lock b/.cargo/cargo-lock index 04fd58d..1e81a90 100644 --- a/.cargo/cargo-lock +++ b/.cargo/cargo-lock @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.4" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] @@ -54,24 +54,23 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" +checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" [[package]] name = "anstyle-parse" @@ -93,9 +92,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -155,7 +154,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -166,7 +165,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -252,9 +251,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "bigdecimal" @@ -319,9 +318,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytecheck" @@ -353,9 +352,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cc" @@ -374,61 +373,58 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets", ] [[package]] name = "clap" -version = "4.3.24" +version = "4.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb690e81c7840c0d7aade59f242ea3b41b9bc27bcd5997890e7702ae4b32e487" +checksum = "824956d0dca8334758a5b7f7e50518d66ea319330cbceedcf76905c2f6ab30e3" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.24" +version = "4.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ed2e96bc16d8d740f6f48d663eddf4b8a0983e79210fd55479b7bcd0a69860e" +checksum = "122ec64120a49b4563ccaedcbea7818d069ed8e9aa6d829b82d8a4128936b2ab" dependencies = [ "anstream", "anstyle", "clap_lex", - "once_cell", "strsim", ] [[package]] name = "clap_derive" -version = "4.3.12" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "cobs" @@ -464,9 +460,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" dependencies = [ "crossbeam-utils", ] @@ -728,7 +724,7 @@ dependencies = [ [[package]] name = "daqbuffer" -version = "0.4.4" +version = "0.4.5-alpha.0" dependencies = [ "bytes", "chrono", @@ -798,7 +794,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -809,14 +805,14 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] name = "dashmap" -version = "5.5.1" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edd72493923899c6f10c641bdbdeddc7183d6396641d99c1a0d1597f37f92e28" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", "hashbrown 0.14.0", @@ -976,7 +972,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -987,16 +983,16 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "837c0466252947ada828b975e12daf82e18bb5444e4df87be6038d4469e2a3d2" +checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" dependencies = [ "serde", ] [[package]] name = "err" -version = "0.0.4" +version = "0.0.5" dependencies = [ "anyhow", "async-channel", @@ -1008,15 +1004,16 @@ dependencies = [ "serde", "serde_cbor", "serde_json", - "thiserror 1.0.41", + "thiserror 0.0.1", + "tokio", "url", ] [[package]] name = "errno" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -1047,9 +1044,15 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "finl_unicode" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" [[package]] name = "flate2" @@ -1163,7 +1166,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -1223,7 +1226,7 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -1340,9 +1343,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -1577,17 +1580,6 @@ dependencies = [ "hashbrown 0.14.0", ] -[[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi", - "rustix", - "windows-sys 0.48.0", -] - [[package]] name = "items_0" version = "0.0.2" @@ -1633,7 +1625,7 @@ dependencies = [ name = "items_proc" version = "0.0.2" dependencies = [ - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -1683,15 +1675,15 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" [[package]] name = "lock_api" @@ -1738,24 +1730,25 @@ dependencies = [ [[package]] name = "matchit" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed1202b2a6f884ae56f04cff409ab315c5ce26b5e58d7412e484f01fd52f52ef" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "md-5" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ + "cfg-if", "digest", ] [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memmap2" @@ -1766,6 +1759,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d28bba84adfe6646737845bc5ebbfa2c08424eb1c37e94a1fd2a82adb56a872" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.8.0" @@ -1812,7 +1814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] @@ -1926,7 +1928,7 @@ checksum = "9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -1976,14 +1978,14 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] name = "object" -version = "0.32.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -1996,11 +1998,11 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl" -version = "0.10.56" +version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" +checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if", "foreign-types", "libc", @@ -2017,7 +2019,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -2028,9 +2030,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.91" +version = "0.9.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" +checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" dependencies = [ "cc", "libc", @@ -2131,14 +2133,14 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] name = "pin-project-lite" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2154,9 +2156,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "postcard" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9ee729232311d3cd113749948b689627618133b1c5012b77342c1950b25eaeb" +checksum = "d534c6e61df1c7166e636ca612d9820d486fe96ddad37f7abc671517b297488e" dependencies = [ "cobs", "heapless", @@ -2169,7 +2171,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", "byteorder", "bytes", "fallible-iterator", @@ -2237,9 +2239,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] @@ -2368,9 +2370,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -2378,14 +2380,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -2411,14 +2411,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.3" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.6", - "regex-syntax 0.7.4", + "regex-automata 0.3.8", + "regex-syntax 0.7.5", ] [[package]] @@ -2432,13 +2432,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.4", + "regex-syntax 0.7.5", ] [[package]] @@ -2449,9 +2449,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "region" @@ -2467,9 +2467,9 @@ dependencies = [ [[package]] name = "rend" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581008d2099240d37fb08d77ad713bcaec2c4d89d50b5b21a8bb1996bbab68ab" +checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" dependencies = [ "bytecheck", ] @@ -2542,9 +2542,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.8" +version = "0.38.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" dependencies = [ "bitflags 2.4.0", "errno", @@ -2605,10 +2605,10 @@ dependencies = [ "scylla-macros", "smallvec", "snap", - "socket2 0.5.3", + "socket2 0.5.4", "strum", "strum_macros", - "thiserror 1.0.47", + "thiserror 1.0.49", "tokio", "tracing", "uuid", @@ -2630,7 +2630,7 @@ dependencies = [ "num_enum", "scylla-macros", "snap", - "thiserror 1.0.47", + "thiserror 1.0.49", "tokio", "uuid", ] @@ -2690,16 +2690,22 @@ dependencies = [ ] [[package]] -name = "semver" -version = "1.0.18" +name = "self_cell" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "4c309e515543e67811222dbc9e3dd7e1056279b782e1dacffe4242b718734fb6" + +[[package]] +name = "semver" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" [[package]] name = "serde" -version = "1.0.186" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] @@ -2727,20 +2733,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.186" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -2762,9 +2768,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -2780,6 +2786,16 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shared-buffer" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cf61602ee61e2f83dd016b3e6387245291cf728ea071c378b35088125b4d995" +dependencies = [ + "bytes", + "memmap2 0.6.2", +] + [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -2818,9 +2834,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "snap" @@ -2840,9 +2856,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" dependencies = [ "libc", "windows-sys 0.48.0", @@ -2875,7 +2891,6 @@ version = "0.0.2" dependencies = [ "arrayref", "async-channel", - "bitshuffle", "byteorder", "bytes", "chrono", @@ -2900,10 +2915,11 @@ dependencies = [ [[package]] name = "stringprep" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3737bde7edce97102e0e2b15365bf7a20bfdb5f60f4f9e8d7004258a51a8da" +checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" dependencies = [ + "finl_unicode", "unicode-bidi", "unicode-normalization", ] @@ -2952,9 +2968,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.29" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -2989,7 +3005,7 @@ dependencies = [ "err", "futures-util", "lazy_static", - "time 0.3.27", + "time", "tokio", "tracing", "tracing-subscriber", @@ -3010,38 +3026,40 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.41" +version = "0.0.1" +source = "git+https://github.com/dominikwerder/thiserror.git#052df05c18b5f26b462b0b8a148ac0c8cb170f1a" dependencies = [ "thiserror-impl 1.0.41", ] [[package]] name = "thiserror" -version = "1.0.47" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" dependencies = [ - "thiserror-impl 1.0.47", + "thiserror-impl 1.0.49", ] [[package]] name = "thiserror-impl" version = "1.0.41" +source = "git+https://github.com/dominikwerder/thiserror.git#052df05c18b5f26b462b0b8a148ac0c8cb170f1a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] name = "thiserror-impl" -version = "1.0.47" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -3056,20 +3074,9 @@ dependencies = [ [[package]] name = "time" -version = "0.1.45" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "time" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb39ee79a6d8de55f48f2293a830e040392f1c5f16e336bdd1788cd0aadce07" +checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ "deranged", "itoa", @@ -3080,15 +3087,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.13" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733d258752e9303d392b94b75230d07b0b9c489350c69b851fc6c065fde3e8f9" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -3131,7 +3138,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.3", + "socket2 0.5.4", "tokio-macros", "tracing", "windows-sys 0.48.0", @@ -3155,7 +3162,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -3170,9 +3177,9 @@ dependencies = [ [[package]] name = "tokio-postgres" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000387915083ea6406ee44b50ca74813aba799fe682a7689e382bf9e13b74ce9" +checksum = "d340244b32d920260ae7448cb72b6e238bddc3d4f7603394e7dd46ed8e48f5b8" dependencies = [ "async-trait", "byteorder", @@ -3188,7 +3195,7 @@ dependencies = [ "postgres-protocol", "postgres-types", "rand", - "socket2 0.5.3", + "socket2 0.5.4", "tokio", "tokio-util", "whoami", @@ -3207,9 +3214,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -3227,9 +3234,9 @@ checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.0.0", "toml_datetime", @@ -3244,7 +3251,7 @@ checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" dependencies = [ "async-trait", "axum", - "base64 0.21.2", + "base64 0.21.4", "bytes", "futures-core", "futures-util", @@ -3316,7 +3323,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -3365,7 +3372,7 @@ dependencies = [ "sharded-slab", "smallvec", "thread_local", - "time 0.3.27", + "time", "tracing", "tracing-core", "tracing-log", @@ -3389,9 +3396,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" @@ -3401,9 +3408,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -3428,9 +3435,9 @@ checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -3479,12 +3486,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -3512,7 +3513,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", "wasm-bindgen-shared", ] @@ -3557,7 +3558,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3570,9 +3571,9 @@ checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasmer" -version = "4.1.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7142dbb91ede83cc0aef2301fa75fcc7e0c9e5a7d5358e3c4f3a7249fe9ce8" +checksum = "b7954f3bdeb6cc9b46ddfbab7d795fc6a249a79f51c102d95679390526cf43d8" dependencies = [ "bytes", "cfg-if", @@ -3583,8 +3584,9 @@ dependencies = [ "rustc-demangle", "serde", "serde-wasm-bindgen", + "shared-buffer", "target-lexicon", - "thiserror 1.0.47", + "thiserror 1.0.49", "wasm-bindgen", "wasm-bindgen-downcast", "wasmer-compiler", @@ -3597,21 +3599,25 @@ dependencies = [ [[package]] name = "wasmer-compiler" -version = "4.1.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5b99c70711ec7631b602a9fc95577c40df21e8f3916159c9d80c3fb4f77abdc" +checksum = "7c72380ddff4d9710366527100183df6f943caab5b63adc7cac6d90bacdf4628" dependencies = [ "backtrace", + "bytes", "cfg-if", "enum-iterator", "enumset", "lazy_static", "leb128", - "memmap2", + "memmap2 0.5.10", "more-asserts", "region", + "rkyv", + "self_cell", + "shared-buffer", "smallvec", - "thiserror 1.0.47", + "thiserror 1.0.49", "wasmer-types", "wasmer-vm", "wasmparser", @@ -3620,9 +3626,9 @@ dependencies = [ [[package]] name = "wasmer-compiler-cranelift" -version = "4.1.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52aef2ef35513a04fed54de9a7dc9c469d4742a5c2e378a5f7e2a79b1327e3bd" +checksum = "957adcc170f007bf26293c7cd95352c1e471d7bf4295a1dfda796702a79d9648" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -3639,9 +3645,9 @@ dependencies = [ [[package]] name = "wasmer-derive" -version = "4.1.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bb1425c9e4dc3e2d3aacd6e82e22e27a3127379e0d09bcbdf25ff376229162" +checksum = "6cd92754ce26eec6136ae6282d96ca59632bd47237ecba82824de16e34b3ce6b" dependencies = [ "proc-macro-error", "proc-macro2", @@ -3651,9 +3657,9 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "4.1.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7e32ed799fa8c0d96ca9615d9ea8006857a0f0c18e7c2ed8082bd5c63a9ea70" +checksum = "d93ca35c9a184e7d561f496c5d6da835c8309a8f76fcca1384f5800127395735" dependencies = [ "bytecheck", "enum-iterator", @@ -3662,19 +3668,20 @@ dependencies = [ "more-asserts", "rkyv", "target-lexicon", - "thiserror 1.0.47", + "thiserror 1.0.49", ] [[package]] name = "wasmer-vm" -version = "4.1.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0847513cb176b5d62a6f65d6ae474594935e726a10e9e3387177d9cbf8b8cda0" +checksum = "200ff711048c0a2cb045d4984a673a1edea18f1e14f024694a43f4951922998b" dependencies = [ "backtrace", "cc", "cfg-if", "corosensei", + "crossbeam-queue", "dashmap", "derivative", "enum-iterator", @@ -3687,7 +3694,7 @@ dependencies = [ "more-asserts", "region", "scopeguard", - "thiserror 1.0.47", + "thiserror 1.0.49", "wasmer-types", "winapi", ] @@ -3864,9 +3871,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.14" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index f88a491..8b97223 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,6 @@ [workspace] members = ["crates/*"] +resolver = "2" [profile.release] opt-level = 2 @@ -22,3 +23,4 @@ incremental = true [patch.crates-io] #tokio = { git = "https://github.com/dominikwerder/tokio", rev = "995221d8" } +thiserror = { git = "https://github.com/dominikwerder/thiserror.git" } diff --git a/crates/dbconn/src/channelconfig.rs b/crates/dbconn/src/channelconfig.rs index a25f7d2..b8ce9d9 100644 --- a/crates/dbconn/src/channelconfig.rs +++ b/crates/dbconn/src/channelconfig.rs @@ -16,6 +16,7 @@ use netpod::Shape; /// In the future, we can even try to involve time range information for that, but backends like /// old archivers and sf databuffer do not support such lookup. pub async fn chconf_from_scylla_type_backend(channel: &SfDbChannel, ncc: &NodeConfigCached) -> Result { + debug!("chconf_from_scylla_type_backend {channel:?}"); if channel.backend() != ncc.node_config.cluster.backend { warn!( "mismatched backend {} vs {}", diff --git a/crates/dbconn/src/search.rs b/crates/dbconn/src/search.rs index b8c9ea2..fc6009e 100644 --- a/crates/dbconn/src/search.rs +++ b/crates/dbconn/src/search.rs @@ -8,7 +8,6 @@ use netpod::ChannelSearchSingleResult; use netpod::Database; use netpod::NodeConfigCached; use netpod::ScalarType; -use netpod::ScyllaConfig; use netpod::Shape; use serde_json::Value as JsVal; @@ -85,24 +84,28 @@ pub async fn search_channel_databuffer( Ok(ret) } -pub async fn search_channel_scylla( - query: ChannelSearchQuery, - _scyconf: &ScyllaConfig, - pgconf: &Database, -) -> Result { +pub async fn search_channel_scylla(query: ChannelSearchQuery, pgconf: &Database) -> Result { let empty = if !query.name_regex.is_empty() { false } else { true }; if empty { let ret = ChannelSearchResult { channels: Vec::new() }; return Ok(ret); } - let sql = format!(concat!( - "select", - " series, facility, channel, scalar_type, shape_dims", - " from series_by_channel", - " where channel ~* $1", - " and scalar_type != -2147483647", - " limit 400000", - )); + let cond_status = if query.channel_status { + "scalar_type = 14" + } else { + "scalar_type != 14" + }; + let sql = format!( + concat!( + "select", + " series, facility, channel, scalar_type, shape_dims", + " from series_by_channel", + " where channel ~* $1", + " and {}", + " limit 400000", + ), + cond_status + ); let pgclient = crate::create_connection(pgconf).await?; let rows = pgclient.query(sql.as_str(), &[&query.name_regex]).await.err_conv()?; let mut res = Vec::new(); @@ -112,21 +115,28 @@ pub async fn search_channel_scylla( let backend: String = row.get(1); let channel: String = row.get(2); let a: i32 = row.get(3); - let scalar_type = ScalarType::from_scylla_i32(a)?; - let a: Vec = row.get(4); - let shape = Shape::from_scylla_shape_dims(&a)?; - let k = ChannelSearchSingleResult { - backend, - name: channel, - series, - source: "".into(), - ty: scalar_type.to_variant_str().into(), - shape: shape.to_scylla_vec().into_iter().map(|x| x as u32).collect(), - unit: "".into(), - description: "".into(), - is_api_0: None, - }; - res.push(k); + // TODO count the failure cases + if let Ok(scalar_type) = ScalarType::from_scylla_i32(a) { + let a: Vec = row.get(4); + if let Ok(shape) = Shape::from_scylla_shape_dims(&a) { + let k = ChannelSearchSingleResult { + backend, + name: channel, + series, + source: "".into(), + ty: scalar_type.to_variant_str().into(), + shape: shape.to_scylla_vec().into_iter().map(|x| x as u32).collect(), + unit: "".into(), + description: "".into(), + is_api_0: None, + }; + res.push(k); + } else { + netpod::log::warn!("unknown shape {a:?}"); + } + } else { + netpod::log::warn!("unknown scalar_type {a:?}"); + } } let ret = ChannelSearchResult { channels: res }; Ok(ret) @@ -249,8 +259,8 @@ pub async fn search_channel( node_config: &NodeConfigCached, ) -> Result { let pgconf = &node_config.node_config.cluster.database; - if let Some(scyconf) = node_config.node_config.cluster.scylla.as_ref() { - search_channel_scylla(query, scyconf, pgconf).await + if let Some(_scyconf) = node_config.node_config.cluster.scylla.as_ref() { + search_channel_scylla(query, pgconf).await } else if let Some(conf) = node_config.node.channel_archiver.as_ref() { search_channel_archeng(query, node_config.node_config.cluster.backend.clone(), conf, pgconf).await } else if let Some(_conf) = node_config.node.archiver_appliance.as_ref() { diff --git a/crates/disk/src/decode.rs b/crates/disk/src/decode.rs index 3d1c116..76f76cb 100644 --- a/crates/disk/src/decode.rs +++ b/crates/disk/src/decode.rs @@ -269,6 +269,7 @@ fn make_scalar_conv( ScalarType::F64 => ValueDim0FromBytesImpl::::boxed(), ScalarType::BOOL => ValueDim0FromBytesImpl::::boxed(), ScalarType::STRING => ValueDim0FromBytesImpl::::boxed(), + ScalarType::ChannelStatus => ValueDim0FromBytesImpl::::boxed(), }, Shape::Wave(_) => { let shape = shape.clone(); @@ -285,6 +286,7 @@ fn make_scalar_conv( ScalarType::F64 => ValueDim1FromBytesImpl::::boxed(shape), ScalarType::BOOL => ValueDim1FromBytesImpl::::boxed(shape), ScalarType::STRING => ValueDim1FromBytesImpl::::boxed(shape), + ScalarType::ChannelStatus => ValueDim1FromBytesImpl::::boxed(shape), } } Shape::Image(_, _) => { diff --git a/crates/err/Cargo.toml b/crates/err/Cargo.toml index 2a1e99e..eb6b83c 100644 --- a/crates/err/Cargo.toml +++ b/crates/err/Cargo.toml @@ -20,6 +20,7 @@ regex = "1.9.1" http = "0.2.9" thiserror = "=0.0.1" anyhow = "1.0" +tokio = "1" [patch.crates-io] thiserror = { git = "https://github.com/dominikwerder/thiserror.git" } diff --git a/crates/err/src/lib.rs b/crates/err/src/lib.rs index 8e7f810..4afdc5c 100644 --- a/crates/err/src/lib.rs +++ b/crates/err/src/lib.rs @@ -115,7 +115,7 @@ impl Error { where E: ToString, { - Self::with_msg(e.to_string()) + Self::with_msg_no_trace(e.to_string()) } pub fn add_backtrace(self) -> Self { @@ -425,6 +425,12 @@ impl From for Error { } } +impl From for Error { + fn from(k: tokio::task::JoinError) -> Self { + Self::with_msg(format!("{k}")) + } +} + #[derive(Debug, Serialize, Deserialize)] pub struct PublicError { reason: Option, diff --git a/crates/httpret/src/api1.rs b/crates/httpret/src/api1.rs index 122432b..940ac22 100644 --- a/crates/httpret/src/api1.rs +++ b/crates/httpret/src/api1.rs @@ -144,6 +144,7 @@ pub async fn channel_search_list_v1(req: Request, proxy_config: &ProxyConf name_regex: query.regex.map_or(String::new(), |k| k), source_regex: query.source_regex.map_or(String::new(), |k| k), description_regex: query.description_regex.map_or(String::new(), |k| k), + channel_status: false, }; let urls = proxy_config .backends @@ -250,6 +251,7 @@ pub async fn channel_search_configs_v1( name_regex: query.regex.map_or(String::new(), |k| k), source_regex: query.source_regex.map_or(String::new(), |k| k), description_regex: query.description_regex.map_or(String::new(), |k| k), + channel_status: false, }; let urls = proxy_config .backends diff --git a/crates/httpret/src/channel_status.rs b/crates/httpret/src/channel_status.rs index 0da4caf..20879c2 100644 --- a/crates/httpret/src/channel_status.rs +++ b/crates/httpret/src/channel_status.rs @@ -7,11 +7,12 @@ use http::Request; use http::Response; use http::StatusCode; use hyper::Body; -use items_2::channelevents::ChannelStatusEvent; +use items_0::Empty; +use items_0::Extendable; +use items_2::channelevents::ChannelStatusEvents; use items_2::channelevents::ConnStatusEvent; use netpod::log::*; use netpod::query::ChannelStateEventsQuery; -use netpod::ChannelTypeConfigGen; use netpod::FromUrl; use netpod::NodeConfigCached; use netpod::ACCEPT_ALL; @@ -75,26 +76,26 @@ impl ConnectionStatusEvents { .as_ref() .ok_or_else(|| Error::with_public_msg_no_trace(format!("no scylla configured")))?; let _scy = scyllaconn::create_scy_session(scyco).await?; - let chconf = + let _chconf = nodenet::channelconfig::channel_config(q.range().clone(), q.channel().clone(), node_config).await?; let _do_one_before_range = true; let ret = Vec::new(); if true { return Err(Error::with_msg_no_trace("TODO channel_status fetch_data")); } - /*let mut stream = - scyllaconn::status::StatusStreamScylla::new(series, q.range().clone(), do_one_before_range, scy); - while let Some(item) = stream.next().await { - let item = item?; - ret.push(item); - }*/ + // let mut stream = + // scyllaconn::status::StatusStreamScylla::new(series, q.range().clone(), do_one_before_range, scy); + // while let Some(item) = stream.next().await { + // let item = item?; + // ret.push(item); + // } Ok(ret) } } -pub struct ChannelStatusEvents {} +pub struct ChannelStatusEventsHandler {} -impl ChannelStatusEvents { +impl ChannelStatusEventsHandler { pub fn handler(req: &Request) -> Option { if req.uri().path() == "/api/4/status/channel/events" { Some(Self {}) @@ -141,7 +142,7 @@ impl ChannelStatusEvents { &self, q: &ChannelStateEventsQuery, node_config: &NodeConfigCached, - ) -> Result, Error> { + ) -> Result { let scyco = node_config .node_config .cluster @@ -149,26 +150,28 @@ impl ChannelStatusEvents { .as_ref() .ok_or_else(|| Error::with_public_msg_no_trace(format!("no scylla configured")))?; let scy = scyllaconn::create_scy_session(scyco).await?; - let chconf = nodenet::channelconfig::channel_config(q.range().clone(), q.channel().clone(), node_config) - .await? - .ok_or_else(|| Error::with_msg_no_trace("channel config not found"))?; let do_one_before_range = true; - match chconf { - ChannelTypeConfigGen::Scylla(ch_conf) => { - let mut stream = scyllaconn::status::StatusStreamScylla::new( - ch_conf.series(), - q.range().clone(), - do_one_before_range, - scy, - ); - let mut ret = Vec::new(); - while let Some(item) = stream.next().await { - let item = item?; - ret.push(item); - } - Ok(ret) + if false { + let chconf = nodenet::channelconfig::channel_config(q.range().clone(), q.channel().clone(), node_config) + .await? + .ok_or_else(|| Error::with_msg_no_trace("channel config not found"))?; + use netpod::ChannelTypeConfigGen; + match chconf { + ChannelTypeConfigGen::Scylla(_x) => todo!(), + ChannelTypeConfigGen::SfDatabuffer(_x) => todo!(), } - ChannelTypeConfigGen::SfDatabuffer(k) => todo!(), } + let mut stream = scyllaconn::status::StatusStreamScylla::new( + q.channel().series().unwrap(), + q.range().clone(), + do_one_before_range, + scy, + ); + let mut ret = ChannelStatusEvents::empty(); + while let Some(item) = stream.next().await { + let mut item = item?; + ret.extend_from(&mut item); + } + Ok(ret) } } diff --git a/crates/httpret/src/httpret.rs b/crates/httpret/src/httpret.rs index dd729b6..79fdf6f 100644 --- a/crates/httpret/src/httpret.rs +++ b/crates/httpret/src/httpret.rs @@ -407,7 +407,7 @@ async fn http_service_inner( Ok(h.handle(req, &node_config).await?) } else if let Some(h) = channel_status::ConnectionStatusEvents::handler(&req) { Ok(h.handle(req, ctx, &node_config).await?) - } else if let Some(h) = channel_status::ChannelStatusEvents::handler(&req) { + } else if let Some(h) = channel_status::ChannelStatusEventsHandler::handler(&req) { Ok(h.handle(req, ctx, &node_config).await?) } else if path == "/api/4/prebinned" { if req.method() == Method::GET { diff --git a/crates/httpret/src/proxy.rs b/crates/httpret/src/proxy.rs index 2d54f7d..98d7fd1 100644 --- a/crates/httpret/src/proxy.rs +++ b/crates/httpret/src/proxy.rs @@ -290,8 +290,8 @@ pub async fn channel_search(req: Request, proxy_config: &ProxyConfig) -> R if v == APP_JSON { let url = Url::parse(&format!("dummy:{}", head.uri))?; let query = ChannelSearchQuery::from_url(&url)?; - let mut methods = vec![]; - let mut bodies = vec![]; + let mut methods = Vec::new(); + let mut bodies = Vec::new(); let mut urls = proxy_config .backends .iter() diff --git a/crates/items_0/src/isodate.rs b/crates/items_0/src/isodate.rs index 6f98c5c..38fea90 100644 --- a/crates/items_0/src/isodate.rs +++ b/crates/items_0/src/isodate.rs @@ -6,9 +6,18 @@ use serde::Deserialize; use serde::Serialize; use serde::Serializer; -#[derive(Clone, Debug, Deserialize)] +#[derive(Debug, Clone, PartialEq, Deserialize)] pub struct IsoDateTime(DateTime); +impl IsoDateTime { + pub fn from_unix_millis(ms: u64) -> Self { + let datetime = chrono::NaiveDateTime::from_timestamp_millis(ms as i64) + .unwrap() + .and_utc(); + Self(datetime) + } +} + impl Serialize for IsoDateTime { fn serialize(&self, serializer: S) -> Result where diff --git a/crates/items_0/src/items_0.rs b/crates/items_0/src/items_0.rs index 8706361..a17598a 100644 --- a/crates/items_0/src/items_0.rs +++ b/crates/items_0/src/items_0.rs @@ -39,6 +39,10 @@ pub trait Appendable: Empty + WithLen { fn push(&mut self, ts: u64, pulse: u64, value: STY); } +pub trait Extendable: Empty + WithLen { + fn extend_from(&mut self, src: &mut Self); +} + pub trait TypeName { fn type_name(&self) -> String; } diff --git a/crates/items_2/src/channelevents.rs b/crates/items_2/src/channelevents.rs index 6ea81ac..c2850ac 100644 --- a/crates/items_2/src/channelevents.rs +++ b/crates/items_2/src/channelevents.rs @@ -6,6 +6,7 @@ use items_0::collect_s::Collected; use items_0::collect_s::Collector; use items_0::container::ByteEstimate; use items_0::framable::FrameTypeInnerStatic; +use items_0::isodate::IsoDateTime; use items_0::overlap::RangeOverlapInfo; use items_0::streamitem::ITEMS_2_CHANNEL_EVENTS_FRAME_TYPE_ID; use items_0::timebin::TimeBinnable; @@ -15,7 +16,9 @@ use items_0::timebin::TimeBinner; use items_0::timebin::TimeBinnerTy; use items_0::AsAnyMut; use items_0::AsAnyRef; +use items_0::Empty; use items_0::EventsNonObj; +use items_0::Extendable; use items_0::MergeError; use items_0::TypeName; use items_0::WithLen; @@ -85,6 +88,41 @@ impl ChannelStatus { } } +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +pub struct ChannelStatusEvents { + pub tss: VecDeque, + pub datetimes: VecDeque, + pub statuses: VecDeque, +} + +impl Empty for ChannelStatusEvents { + fn empty() -> Self { + Self { + tss: VecDeque::new(), + datetimes: VecDeque::new(), + statuses: VecDeque::new(), + } + } +} + +impl WithLen for ChannelStatusEvents { + fn len(&self) -> usize { + self.tss.len() + } +} + +impl Extendable for ChannelStatusEvents { + fn extend_from(&mut self, src: &mut Self) { + use core::mem::replace; + let v = replace(&mut src.tss, VecDeque::new()); + self.tss.extend(v.into_iter()); + let v = replace(&mut src.datetimes, VecDeque::new()); + self.datetimes.extend(v.into_iter()); + let v = replace(&mut src.statuses, VecDeque::new()); + self.statuses.extend(v.into_iter()); + } +} + #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ChannelStatusEvent { pub ts: u64, @@ -269,6 +307,11 @@ mod serde_channel_events { seq.next_element()?.ok_or_else(|| de::Error::missing_field("[2] obj"))?; Ok(EvBox(Box::new(obj))) } + String::SUB => { + let obj: EventsDim0 = + seq.next_element()?.ok_or_else(|| de::Error::missing_field("[2] obj"))?; + Ok(EvBox(Box::new(obj))) + } _ => { error!("TODO serde cty {cty} nty {nty}"); Err(de::Error::custom(&format!("unknown nty {nty}"))) @@ -296,6 +339,11 @@ mod serde_channel_events { seq.next_element()?.ok_or_else(|| de::Error::missing_field("[2] obj"))?; Ok(EvBox(Box::new(obj))) } + String::SUB => { + let obj: EventsDim1 = + seq.next_element()?.ok_or_else(|| de::Error::missing_field("[2] obj"))?; + Ok(EvBox(Box::new(obj))) + } _ => { error!("TODO serde cty {cty} nty {nty}"); Err(de::Error::custom(&format!("unknown nty {nty}"))) diff --git a/crates/items_2/src/empty.rs b/crates/items_2/src/empty.rs index ae7b2e0..a583336 100644 --- a/crates/items_2/src/empty.rs +++ b/crates/items_2/src/empty.rs @@ -25,6 +25,7 @@ pub fn empty_events_dyn_ev(scalar_type: &ScalarType, shape: &Shape) -> Result Box::new(K::::empty()), BOOL => Box::new(K::::empty()), STRING => Box::new(K::::empty()), + ChannelStatus => Box::new(K::::empty()), } } Shape::Wave(..) => { @@ -43,6 +44,7 @@ pub fn empty_events_dyn_ev(scalar_type: &ScalarType, shape: &Shape) -> Result Box::new(K::::empty()), BOOL => Box::new(K::::empty()), STRING => Box::new(K::::empty()), + ChannelStatus => Box::new(K::::empty()), } } Shape::Image(..) => { diff --git a/crates/netpod/src/netpod.rs b/crates/netpod/src/netpod.rs index 7041a40..6f69e13 100644 --- a/crates/netpod/src/netpod.rs +++ b/crates/netpod/src/netpod.rs @@ -95,6 +95,7 @@ pub enum ScalarType { F64, BOOL, STRING, + ChannelStatus, } impl fmt::Debug for ScalarType { @@ -128,6 +129,7 @@ impl Serialize for ScalarType { F64 => ser.serialize_str("f64"), BOOL => ser.serialize_str("bool"), STRING => ser.serialize_str("string"), + ChannelStatus => ser.serialize_str("ChannelStatus"), } } } @@ -156,6 +158,7 @@ impl<'de> serde::de::Visitor<'de> for ScalarTypeVis { "f64" => ScalarType::F64, "bool" => ScalarType::BOOL, "string" => ScalarType::STRING, + "channelstatus" => ScalarType::ChannelStatus, k => return Err(E::custom(format!("can not understand variant {k:?}"))), }; Ok(ret) @@ -192,6 +195,7 @@ impl ScalarType { 11 => F32, 12 => F64, 13 => STRING, + 14 => ChannelStatus, //13 => return Err(Error::with_msg(format!("STRING not supported"))), 6 => return Err(Error::with_msg(format!("CHARACTER not supported"))), _ => return Err(Error::with_msg(format!("unknown dtype code: {:?}", ix))), @@ -214,6 +218,7 @@ impl ScalarType { F64 => "f64", BOOL => "bool", STRING => "string", + ChannelStatus => "ChannelStatus", } } @@ -232,6 +237,7 @@ impl ScalarType { F64 => "float64", BOOL => "bool", STRING => "string", + ChannelStatus => "ChannelStatus", } } @@ -252,6 +258,7 @@ impl ScalarType { "float64" => F64, "string" => STRING, "bool" => BOOL, + "ChannelStatus" => ChannelStatus, _ => { return Err(Error::with_msg_no_trace(format!( "from_bsread_str can not understand bsread {:?}", @@ -323,6 +330,7 @@ impl ScalarType { F64 => 8, BOOL => 1, STRING => 1, + ChannelStatus => 4, } } @@ -341,6 +349,7 @@ impl ScalarType { F64 => 12, BOOL => 0, STRING => 13, + ChannelStatus => 14, } } @@ -2469,6 +2478,8 @@ pub struct ChannelSearchQuery { pub name_regex: String, pub source_regex: String, pub description_regex: String, + #[serde(default)] + pub channel_status: bool, } impl ChannelSearchQuery { @@ -2479,6 +2490,11 @@ impl ChannelSearchQuery { name_regex: pairs.get("nameRegex").map_or(String::new(), |k| k.clone()), source_regex: pairs.get("sourceRegex").map_or(String::new(), |k| k.clone()), description_regex: pairs.get("descriptionRegex").map_or(String::new(), |k| k.clone()), + channel_status: pairs + .get("channelStatus") + .map(|k| k.parse().ok()) + .unwrap_or(None) + .unwrap_or(false), }; Ok(ret) } @@ -2491,6 +2507,8 @@ impl ChannelSearchQuery { qp.append_pair("nameRegex", &self.name_regex); qp.append_pair("sourceRegex", &self.source_regex); qp.append_pair("descriptionRegex", &self.description_regex); + let v = &self.channel_status; + qp.append_pair("channelStatus", &v.to_string()); } } diff --git a/crates/nodenet/src/conn.rs b/crates/nodenet/src/conn.rs index 7b2af94..1bd46ea 100644 --- a/crates/nodenet/src/conn.rs +++ b/crates/nodenet/src/conn.rs @@ -317,8 +317,9 @@ pub fn events_parse_input_query(frames: Vec) -> Result<(EventsSub Err(e) => return Err(e), }; let frame1: Frame1Parts = serde_json::from_str(&qitem.str()).map_err(|e| { - let e = Error::with_msg_no_trace(format!("json parse error: {} inp {:?}", e, qitem.str())); + let e = Error::with_msg_no_trace(format!("json parse error: {} inp {}", e, qitem.str())); error!("{e}"); + error!("input was {}", qitem.str()); e })?; Ok(frame1.parts()) diff --git a/crates/parse/src/api1_parse.rs b/crates/parse/src/api1_parse.rs index 64f3160..fa09d81 100644 --- a/crates/parse/src/api1_parse.rs +++ b/crates/parse/src/api1_parse.rs @@ -110,6 +110,7 @@ impl From<&ScalarType> for Api1ScalarType { A::F64 => B::F64, A::BOOL => B::BOOL, A::STRING => B::STRING, + A::ChannelStatus => todo!("ChannelStatus not in Api1ScalarType"), } } } diff --git a/crates/query/src/api4/events.rs b/crates/query/src/api4/events.rs index c996005..697e8f5 100644 --- a/crates/query/src/api4/events.rs +++ b/crates/query/src/api4/events.rs @@ -503,3 +503,9 @@ impl Frame1Parts { (self.query,) } } + +#[test] +fn parse_frame1() { + let inp = r##"{"query":{"select":{"ch_conf":{"Scylla":{"backend":"swissfel-daqbuf-ca","series":2367705320261409690,"scalar_type":"ChannelStatus","shape":[],"name":"SLGRE-LI2C03_CH6:TEMP"}},"range":{"TimeRange":{"beg":1695736001000000000,"end":1695736301000000000}},"transform":{"event":"ValueFull","time_binning":"None"},"wasm1":null},"settings":{"timeout":null,"events_max":200000,"event_delay":null,"stream_batch_len":null,"buf_len_disk_io":null,"queue_len_disk_io":null,"create_errors":[]},"ty":"EventsSubQuery","reqid":"3ea23209"}}"##; + let v: Frame1Parts = serde_json::from_str(inp).unwrap(); +} diff --git a/crates/scyllaconn/src/events.rs b/crates/scyllaconn/src/events.rs index 805916b..fd17482 100644 --- a/crates/scyllaconn/src/events.rs +++ b/crates/scyllaconn/src/events.rs @@ -115,6 +115,7 @@ impl_scaty_scalar!(i64, i64, "events_scalar_i64"); impl_scaty_scalar!(f32, f32, "events_scalar_f32"); impl_scaty_scalar!(f64, f64, "events_scalar_f64"); impl_scaty_scalar!(bool, bool, "events_scalar_bool"); +impl_scaty_scalar!(String, String, "events_scalar_string"); impl_scaty_array!(Vec, u8, Vec, "events_array_u8"); impl_scaty_array!(Vec, u16, Vec, "events_array_u16"); @@ -127,6 +128,7 @@ impl_scaty_array!(Vec, i64, Vec, "events_array_i64"); impl_scaty_array!(Vec, f32, Vec, "events_array_f32"); impl_scaty_array!(Vec, f64, Vec, "events_array_f64"); impl_scaty_array!(Vec, bool, Vec, "events_array_bool"); +impl_scaty_array!(Vec, String, Vec, "events_array_string"); struct ReadNextValuesOpts { series: u64, @@ -350,6 +352,7 @@ impl ReadValues { ScalarType::F32 => read_next_values::(opts).await, ScalarType::F64 => read_next_values::(opts).await, ScalarType::BOOL => read_next_values::(opts).await, + ScalarType::STRING => read_next_values::(opts).await, _ => { error!("TODO ReadValues add more types"); err::todoval() diff --git a/crates/scyllaconn/src/status.rs b/crates/scyllaconn/src/status.rs index a184a57..03362d6 100644 --- a/crates/scyllaconn/src/status.rs +++ b/crates/scyllaconn/src/status.rs @@ -3,11 +3,15 @@ use err::Error; use futures_util::Future; use futures_util::FutureExt; use futures_util::Stream; +use items_0::isodate::IsoDateTime; +use items_0::Empty; +use items_0::Extendable; +use items_0::WithLen; use items_2::channelevents::ChannelStatus; -use items_2::channelevents::ChannelStatusEvent; +use items_2::channelevents::ChannelStatusEvents; use netpod::log::*; use netpod::range::evrange::NanoRange; -use netpod::range::evrange::SeriesRange; +use netpod::timeunits::MS; use netpod::CONNECTION_STATUS_DIV; use scylla::Session as ScySession; use std::collections::VecDeque; @@ -15,8 +19,6 @@ use std::pin::Pin; use std::sync::Arc; use std::task::Context; use std::task::Poll; -use std::time::Duration; -use std::time::SystemTime; async fn read_next_status_events( series: u64, @@ -25,7 +27,7 @@ async fn read_next_status_events( fwd: bool, do_one_before: bool, scy: Arc, -) -> Result, Error> { +) -> Result { if ts_msp >= range.end { warn!( "given ts_msp {} >= range.end {} not necessary to read this", @@ -75,27 +77,27 @@ async fn read_next_status_events( .err_conv()? }; let mut last_before = None; - let mut ret = VecDeque::new(); + let mut ret = ChannelStatusEvents::empty(); for row in res.rows_typed_or_empty::<(i64, i32)>() { let row = row.err_conv()?; let ts = ts_msp + row.0 as u64; let kind = row.1 as u32; - let ev = ChannelStatusEvent { - ts, - datetime: SystemTime::UNIX_EPOCH + Duration::from_millis(ts / 1000000), - status: ChannelStatus::from_ca_ingest_status_kind(kind), - }; + let datetime = IsoDateTime::from_unix_millis(ts / MS); + let status = ChannelStatus::from_ca_ingest_status_kind(kind); if ts >= range.end { } else if ts >= range.beg { - ret.push_back(ev); + ret.tss.push_back(ts); + ret.datetimes.push_back(datetime); + ret.statuses.push_back(status); } else { - last_before = Some(ev); + last_before = Some((ts, datetime, status)); } } if do_one_before { - if let Some(ev) = last_before { - debug!("PREPENDING THE LAST BEFORE {ev:?}"); - ret.push_front(ev); + if let Some((ts, datetime, status)) = last_before { + ret.tss.push_front(ts); + ret.datetimes.push_front(datetime); + ret.statuses.push_front(status); } } trace!("found in total {} events ts_msp {}", ret.len(), ts_msp); @@ -108,7 +110,7 @@ struct ReadValues { ts_msps: VecDeque, fwd: bool, do_one_before_range: bool, - fut: Pin, Error>> + Send>>, + fut: Pin> + Send>>, scy: Arc, } @@ -146,10 +148,7 @@ impl ReadValues { } } - fn make_fut( - &mut self, - ts_msp: u64, - ) -> Pin, Error>> + Send>> { + fn make_fut(&mut self, ts_msp: u64) -> Pin> + Send>> { info!("make fut for {ts_msp}"); let fut = read_next_status_events( self.series, @@ -175,7 +174,7 @@ pub struct StatusStreamScylla { range: NanoRange, do_one_before_range: bool, scy: Arc, - outbuf: VecDeque, + outbuf: ChannelStatusEvents, } impl StatusStreamScylla { @@ -186,28 +185,29 @@ impl StatusStreamScylla { range, do_one_before_range, scy, - outbuf: VecDeque::new(), + outbuf: ChannelStatusEvents::empty(), } } } impl Stream for StatusStreamScylla { - type Item = Result; + type Item = Result; fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { use Poll::*; let span = tracing::span!(tracing::Level::TRACE, "poll_next"); let _spg = span.enter(); loop { - if let Some(x) = self.outbuf.pop_front() { - break Ready(Some(Ok(x))); + if self.outbuf.len() > 0 { + let item = std::mem::replace(&mut self.outbuf, ChannelStatusEvents::empty()); + break Ready(Some(Ok(item))); } break match self.state { FrState::New => { let mut ts_msps = VecDeque::new(); let mut ts = self.range.beg / CONNECTION_STATUS_DIV * CONNECTION_STATUS_DIV; while ts < self.range.end { - info!("Use ts {ts}"); + debug!("Use ts {ts}"); ts_msps.push_back(ts); ts += CONNECTION_STATUS_DIV; } @@ -223,14 +223,12 @@ impl Stream for StatusStreamScylla { continue; } FrState::ReadValues(ref mut st) => match st.fut.poll_unpin(cx) { - Ready(Ok(item)) => { + Ready(Ok(mut item)) => { if !st.next() { debug!("ReadValues exhausted"); self.state = FrState::Done; } - for x in item { - self.outbuf.push_back(x); - } + self.outbuf.extend_from(&mut item); continue; } Ready(Err(e)) => { diff --git a/crates/taskrun/src/taskrun.rs b/crates/taskrun/src/taskrun.rs index 36bdca9..c18b29d 100644 --- a/crates/taskrun/src/taskrun.rs +++ b/crates/taskrun/src/taskrun.rs @@ -23,7 +23,7 @@ pub fn get_runtime() -> Arc { get_runtime_opts(24, 128) } -#[allow(unused)] +// #[allow(unused)] fn on_thread_start() { let old = panic::take_hook(); panic::set_hook(Box::new(move |info| { @@ -58,7 +58,7 @@ pub fn get_runtime_opts(nworkers: usize, nblocking: usize) -> Arc { .worker_threads(nworkers) .max_blocking_threads(nblocking) .enable_all() - .on_thread_start(on_thread_start) + // .on_thread_start(on_thread_start) .build(); let res = match res { Ok(x) => x,