aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-11-20 23:37:34 +0100
committerAlex Auvolat <alex@adnab.me>2020-11-20 23:53:54 +0100
commita8b3c8fd5898400d64310f61bb1a41dd5fefe5ea (patch)
treef37a1ce39bfae7c3f706162e186df4064635bd74
parentf9be964c3f3efd10f1bd9cf752d839f8133edcc1 (diff)
downloadgarage-feature/better-crdt.tar.gz
garage-feature/better-crdt.zip
data hexdump in warningfeature/better-crdt
-rw-r--r--Cargo.lock39
-rw-r--r--src/table/Cargo.toml1
-rw-r--r--src/table/table.rs3
3 files changed, 43 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 6382d035..330b50fc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -16,6 +16,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034"
[[package]]
+name = "arrayvec"
+version = "0.3.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06f59fe10306bb78facd90d28c2038ad23ffaaefa85bac43c8a434cde383334f"
+dependencies = [
+ "nodrop",
+ "odds",
+]
+
+[[package]]
name = "async-trait"
version = "0.1.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -588,6 +598,7 @@ dependencies = [
"garage_rpc 0.1.0",
"garage_util 0.1.0",
"hex",
+ "hexdump",
"log",
"rand",
"rmp-serde",
@@ -744,6 +755,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77"
[[package]]
+name = "hexdump"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "850f3f2c33d20c0f96c4485e087dd580ff041d720988ebf4c84a42acf739262b"
+dependencies = [
+ "arrayvec",
+ "itertools",
+]
+
+[[package]]
name = "hmac"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -871,6 +892,12 @@ dependencies = [
]
[[package]]
+name = "itertools"
+version = "0.4.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4a9b56eb56058f43dc66e58f40a214b2ccbc9f3df51861b63d51dec7b65bc3f"
+
+[[package]]
name = "itoa"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1028,6 +1055,12 @@ dependencies = [
]
[[package]]
+name = "nodrop"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
+
+[[package]]
name = "num-integer"
version = "0.1.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1057,6 +1090,12 @@ dependencies = [
]
[[package]]
+name = "odds"
+version = "0.2.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4eae0151b9dacf24fcc170d9995e511669a082856a91f958a2fe380bfab3fb22"
+
+[[package]]
name = "once_cell"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/src/table/Cargo.toml b/src/table/Cargo.toml
index 1963f3da..945763fa 100644
--- a/src/table/Cargo.toml
+++ b/src/table/Cargo.toml
@@ -21,6 +21,7 @@ rand = "0.7"
hex = "0.3"
arc-swap = "0.4"
log = "0.4"
+hexdump = "0.1"
sled = "0.31"
diff --git a/src/table/table.rs b/src/table/table.rs
index 54a42d34..5dfee3c8 100644
--- a/src/table/table.rs
+++ b/src/table/table.rs
@@ -464,6 +464,9 @@ where
Some(x) => Ok(x),
None => {
warn!("Unable to decode entry of {}: {}", self.name, e);
+ for line in hexdump::hexdump_iter(bytes) {
+ debug!("{}", line);
+ }
Err(e.into())
}
},