Problem with WiredTiger and Snappy

250 views
Skip to first unread message

Christopher Baines

unread,
Dec 22, 2017, 7:03:02 AM12/22/17
to mongodb-user
Hey,

I'm having some problems getting MongoDB to work with WiredTiger (from
my system, not the included copy).

MongoDB builds successfully, but this appears in the logs when
attempting to start MongoDB.

2017-12-22T12:01:20.801+0100 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=256M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2017-12-22T12:01:20.810+0100 E STORAGE [initandlisten] WiredTiger error (22) [1513940480:810293][330:0x7f4fb4e3ed40], connection: unknown compressor 'snappy': Invalid argument

I know very little about the internals of MongoDB, but looking at the
WiredTiger docs [1], it looks like you need to specify the extensions,
e.g. extensions=[/usr/local/lib/libwiredtiger_snappy.so] when opening
the database, which looking at the logged wiredtiger_open call above
isn't happening. Does this make sense to anyone?

I also found a place in the MongoDB source code where it looks like the
extensions would be specified [2], but I can't seem to find how this
list of extensions is populated (addExtension doesn't seem to be called
anywhere).

Does anyone know what can be done to get this working, or know any
potential differences between the wiredtiger code included in MongoDB,
and the upstream source?

Thanks,

Chris

1: http://source.wiredtiger.com/2.6.1/compression.html
2: https://github.com/mongodb/mongo/tree/master/src/mongo/db/storage/wiredtiger#L72-L82
signature.asc

Christopher Baines

unread,
Dec 26, 2017, 12:02:01 PM12/26/17
to mongodb-user
I've found a solution. MongoDB seems to require wiredtiger to be built
with --with-builtins=snappy.

Thanks,

Chris
signature.asc
Reply all
Reply to author
Forward
0 new messages