Skip to content

Commit

Permalink
use new expiry module factory call and update to leveldb 2.0.33
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew V committed Nov 21, 2016
1 parent db2f7ec commit d7f51bd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 6 additions & 1 deletion BASHO_RELEASES
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
github.com tag 2.0.33 - November 21, 2016
-----------------------------------------
mv-bucket-expiry: - partial branch to enable X-Riak-Meta-Expiry-Base-Seconds
property within enterprise edition

github.com tag 2.0.32 - November 8, 2016
----------------------------------------
- version shipped with Riak 2.2
** additional race condition hardening when faced with two threads on same iterator
** (one iterating async_iterator_move() and one closing async_iterator_close())
- wrap async_iterator_move operations with locked CloseMutex
Expand All @@ -8,7 +14,6 @@ github.com tag 2.0.32 - November 8, 2016

github.com tag 2.0.31 - November 1, 2016
----------------------------------------
- version shipped with Riak 2.2
- includes leveldb 2.0.31 (mv-no-md-expiry & mv-tuning8)
mv-ref-hardening: - series of thread hardening changes
related to AAE use of iterators. Biggest
Expand Down
2 changes: 1 addition & 1 deletion c_src/build_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ `uname -s` = 'SunOS' -a "${POSIX_SHELL}" != "true" ]; then
fi
unset POSIX_SHELL # clear it so if we invoke other scripts, they run as ksh as well

LEVELDB_VSN="2.0.31"
LEVELDB_VSN="2.0.33"

SNAPPY_VSN="1.0.4"

Expand Down
8 changes: 4 additions & 4 deletions c_src/eleveldb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "leveldb/perf_count.h"
#define LEVELDB_PLATFORM_POSIX
#include "util/hot_threads.h"
#include "leveldb_os/expiry_os.h"
#include "util/expiry_os.h"

#ifndef INCL_WORKITEMS_H
#include "workitems.h"
Expand Down Expand Up @@ -488,7 +488,7 @@ ERL_NIF_TERM parse_open_option(ErlNifEnv* env, ERL_NIF_TERM item, leveldb::Optio
if (option[1] == eleveldb::ATOM_TRUE)
{
if (NULL==opts.expiry_module.get())
opts.expiry_module.assign(new leveldb::ExpiryModuleOS);
opts.expiry_module.assign(leveldb::ExpiryModule::CreateExpiryModule());
((leveldb::ExpiryModuleOS *)opts.expiry_module.get())->expiry_enabled = true;
} // if
else
Expand All @@ -503,7 +503,7 @@ ERL_NIF_TERM parse_open_option(ErlNifEnv* env, ERL_NIF_TERM item, leveldb::Optio
if (enif_get_ulong(env, option[1], &minutes))
{
if (NULL==opts.expiry_module.get())
opts.expiry_module.assign(new leveldb::ExpiryModuleOS);
opts.expiry_module.assign(leveldb::ExpiryModule::CreateExpiryModule());
((leveldb::ExpiryModuleOS *)opts.expiry_module.get())->expiry_minutes = minutes;
} // if
} // else if
Expand All @@ -512,7 +512,7 @@ ERL_NIF_TERM parse_open_option(ErlNifEnv* env, ERL_NIF_TERM item, leveldb::Optio
if (option[1] == eleveldb::ATOM_TRUE)
{
if (NULL==opts.expiry_module.get())
opts.expiry_module.assign(new leveldb::ExpiryModuleOS);
opts.expiry_module.assign(leveldb::ExpiryModule::CreateExpiryModule());
((leveldb::ExpiryModuleOS *)opts.expiry_module.get())->whole_file_expiry = true;
} // if
else
Expand Down

0 comments on commit d7f51bd

Please sign in to comment.