File tree Expand file tree Collapse file tree
engine/packages/depot/src/conveyer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -430,8 +430,19 @@ impl Db {
430430 . with_context ( || format ! ( "missing source blob for page {pgno}" ) ) ?;
431431
432432 if !decoded_blobs. contains_key ( source_key) {
433- let decoded = decode_ltx_v3 ( blob)
434- . with_context ( || format ! ( "decode source blob for page {pgno}" ) ) ?;
433+ let decoded = decode_ltx_v3 ( blob) . with_context ( || {
434+ let len = blob. len ( ) ;
435+ let head_n = len. min ( 64 ) ;
436+ let tail_start = len. saturating_sub ( 64 ) ;
437+ format ! (
438+ "decode source blob for page {pgno}; \
439+ source_key={}; len={}; head={}; tail={}",
440+ crate :: compaction:: shared:: hex_lower( source_key) ,
441+ len,
442+ crate :: compaction:: shared:: hex_lower( & blob[ ..head_n] ) ,
443+ crate :: compaction:: shared:: hex_lower( & blob[ tail_start..] ) ,
444+ )
445+ } ) ?;
435446 decoded_blobs. insert ( source_key. clone ( ) , decoded) ;
436447 }
437448
Original file line number Diff line number Diff line change @@ -219,8 +219,18 @@ impl Db {
219219 let bytes = loaded_objects
220220 . get ( object_key)
221221 . expect ( "cold object should be loaded before decode" ) ;
222- let decoded = decode_ltx_v3 ( bytes)
223- . with_context ( || format ! ( "decode sqlite cold layer {object_key}" ) ) ?;
222+ let decoded = decode_ltx_v3 ( bytes) . with_context ( || {
223+ let len = bytes. len ( ) ;
224+ let head_n = len. min ( 64 ) ;
225+ let tail_start = len. saturating_sub ( 64 ) ;
226+ format ! (
227+ "decode sqlite cold layer {object_key}; \
228+ len={}; head={}; tail={}",
229+ len,
230+ crate :: compaction:: shared:: hex_lower( & bytes[ ..head_n] ) ,
231+ crate :: compaction:: shared:: hex_lower( & bytes[ tail_start..] ) ,
232+ )
233+ } ) ?;
224234 decoded_objects. insert ( object_key. to_string ( ) , decoded) ;
225235 }
226236
You can’t perform that action at this time.
0 commit comments