Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mv bucket expiry #228

Merged
merged 5 commits into from
Nov 21, 2016
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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=""
LEVELDB_VSN="mv-bucket-expiry"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The standard comment here: be sure to remove this before merging to develop


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