Skip to content

Commit 34d9c4f

Browse files
authored
Merge pull request #6172 from chu11/kvs_cleanup
kvs: minor cleanups
2 parents 3d8207b + 52a460c commit 34d9c4f

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

src/bindings/python/flux/kvs.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,6 @@ def namespace_create(flux_handle, namespace, owner=os.getuid(), flags: int = 0):
321321
322322
Args:
323323
flux_handle: A Flux handle obtained from flux.Flux()
324-
flags: defaults to 0, possible flag options:
325-
flux.constants.FLUX_KVS_NO_MERGE - disallow merging of different commits
326-
flux.constants.FLUX_KVS_TXN_COMPACT - if possible compact changes
327-
flux.constants.FLUX_KVS_SYNC - flush & checkpoint commit (only against primary KVS)
328324
namespace: namespace to create
329325
owner: uid of namespace owner, defaults to caller uid
330326
flags: currently unused, defaults to 0

src/modules/kvs/kvs.c

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,25 +1317,17 @@ static lookup_t *lookup_common (flux_t *h, flux_msg_handler_t *mh,
13171317
struct flux_msg_cred cred;
13181318
int root_seq = -1;
13191319

1320-
if (flux_request_unpack (msg, NULL, "{ s:s s:i }",
1320+
/* namespace, rootdir, and rootseq optional */
1321+
if (flux_request_unpack (msg, NULL, "{ s:s s:i s?s s?o s?i}",
13211322
"key", &key,
1322-
"flags", &flags) < 0) {
1323+
"flags", &flags,
1324+
"namespace", &ns,
1325+
"rootdir", &root_dirent,
1326+
"rootseq", &root_seq) < 0) {
13231327
flux_log_error (h, "%s: flux_request_unpack", __FUNCTION__);
13241328
goto done;
13251329
}
13261330

1327-
/* namespace is optional */
1328-
(void)flux_request_unpack (msg, NULL, "{ s:s }",
1329-
"namespace", &ns);
1330-
1331-
/* rootdir is optional */
1332-
(void)flux_request_unpack (msg, NULL, "{ s:o }",
1333-
"rootdir", &root_dirent);
1334-
1335-
/* rootseq is optional */
1336-
(void)flux_request_unpack (msg, NULL, "{ s:i }",
1337-
"rootseq", &root_seq);
1338-
13391331
/* either namespace or rootdir must be specified */
13401332
if (!ns && !root_dirent) {
13411333
errno = EPROTO;

0 commit comments

Comments
 (0)