Skip to content

Commit

Permalink
Merge pull request #1154 from chu11/rfc11-final
Browse files Browse the repository at this point in the history
kvs: rework internal metadata format to conform to RFC 11 design
  • Loading branch information
grondo authored Aug 25, 2017
2 parents 53e3f12 + de398d8 commit 1c99b02
Show file tree
Hide file tree
Showing 25 changed files with 3,129 additions and 1,320 deletions.
2 changes: 1 addition & 1 deletion src/bindings/lua/flux-lua.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ static int l_flux_kvs_type (lua_State *L)
return lua_pusherror (L, "key expected in arg #2");

if ((future = flux_kvs_lookup (f, FLUX_KVS_READLINK, key))
&& flux_kvs_lookup_get_unpack (future, "s", &target) == 0) {
&& flux_kvs_lookup_get (future, &target) == 0) {
lua_pushstring (L, "symlink");
lua_pushstring (L, target);
flux_future_destroy (future);
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/flux-kvs.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ int cmd_readlink (optparse_t *p, int argc, char **argv)

for (i = optindex; i < argc; i++) {
if (!(f = flux_kvs_lookup (h, FLUX_KVS_READLINK, argv[i]))
|| flux_kvs_lookup_get_unpack (f, "s", &target) < 0)
|| flux_kvs_lookup_get (f, &target) < 0)
log_err_exit ("%s", argv[i]);
else
printf ("%s\n", target);
Expand Down Expand Up @@ -755,7 +755,7 @@ static void dump_kvs_dir (kvsdir_t *dir, bool Ropt, bool dopt)
if (kvsdir_issymlink (dir, name)) {
const char *link;
if (!(f = flux_kvs_lookupat (h, FLUX_KVS_READLINK, key, rootref))
|| flux_kvs_lookup_get_unpack (f, "s", &link) < 0)
|| flux_kvs_lookup_get (f, &link) < 0)
log_err_exit ("%s", key);
printf ("%s -> %s\n", key, link);
flux_future_destroy (f);
Expand Down
18 changes: 9 additions & 9 deletions src/common/libkvs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ libkvs_la_SOURCES = \
kvs_dir.c \
kvs_classic.c \
kvs_watch.c \
jansson_dirent.c \
jansson_dirent.h \
kvs_commit.c \
kvs_txn.c \
kvs_txn_private.h
kvs_txn_private.h \
treeobj.h \
treeobj.c

fluxcoreinclude_HEADERS = \
kvs.h \
Expand All @@ -33,10 +33,10 @@ fluxcoreinclude_HEADERS = \
kvs_commit.h

TESTS = \
test_jansson_dirent.t \
test_kvs_txn.t \
test_kvs_lookup.t \
test_kvs_dir.t
test_kvs_dir.t \
test_treeobj.t

check_PROGRAMS = \
$(TESTS)
Expand All @@ -56,10 +56,6 @@ test_cppflags = \
$(AM_CPPFLAGS) \
-I$(top_srcdir)/src/common/libtap

test_jansson_dirent_t_SOURCES = test/jansson_dirent.c
test_jansson_dirent_t_CPPFLAGS = $(test_cppflags)
test_jansson_dirent_t_LDADD = $(test_ldadd)

test_kvs_txn_t_SOURCES = test/kvs_txn.c
test_kvs_txn_t_CPPFLAGS = $(test_cppflags)
test_kvs_txn_t_LDADD = $(test_ldadd) $(LIBDL)
Expand All @@ -71,3 +67,7 @@ test_kvs_lookup_t_LDADD = $(test_ldadd) $(LIBDL)
test_kvs_dir_t_SOURCES = test/kvs_dir.c
test_kvs_dir_t_CPPFLAGS = $(test_cppflags)
test_kvs_dir_t_LDADD = $(test_ldadd) $(LIBDL)

test_treeobj_t_SOURCES = test/treeobj.c
test_treeobj_t_CPPFLAGS = $(test_cppflags)
test_treeobj_t_LDADD = $(test_ldadd) $(LIBDL)
131 changes: 0 additions & 131 deletions src/common/libkvs/jansson_dirent.c

This file was deleted.

48 changes: 0 additions & 48 deletions src/common/libkvs/jansson_dirent.h

This file was deleted.

2 changes: 0 additions & 2 deletions src/common/libkvs/kvs_commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#include <czmq.h>
#include <flux/core.h>

#include "jansson_dirent.h"

#include "kvs_txn_private.h"
#include "src/common/libutil/blobref.h"

Expand Down
Loading

0 comments on commit 1c99b02

Please sign in to comment.