Packing and Unpacking Data

38 views
Skip to first unread message

Praneeth

unread,
Nov 25, 2022, 5:42:09 PM11/25/22
to wiredtiger-users
Hi,

I am trying to experiment  with packing and unpacking data, in particular the behaviour detailed here: WiredTiger: Packing and Unpacking Data

I want to store the keys in a big-endian, standard representation, but when I add '>' at the beginning of my key_format string (in the ex_pack.c example):
         error_check(wiredtiger_struct_size(session, &size, ">iii", 42, 1000, -9));
         if (size > sizeof(buf)) {
             /* Allocate a bigger buffer. */
         }

I get the following error: 
ex_pack: FAILED: main/55: wiredtiger_struct_size(session, &size, ">iii", 42, 1000, -9): Invalid argument
ex_pack: process aborting
WiredTiger Error: __wt_abort, 28: aborting WiredTiger library
Aborted (core dumped)

What am I doing wrong here? I'd really appreciate some help. 

Thanks
Praneeth



Etienne Petrel

unread,
Nov 28, 2022, 12:00:49 AM11/28/22
to wiredtiger-users
Hi Praneeth,

Thank you for your interest in WiredTiger and how packing and unpacking work. I could reproduce the error and I have filed WT-10235 (I will add details to the ticket soon), feel free to subscribe to it to get updates. The team will work on it as soon as possible. Sorry for the inconvenience.

Regards

Etienne

Reply all
Reply to author
Forward
0 new messages