From 7bbd1250e0d604741f5e5a01caf1703f266f307c Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 18 Mar 2017 16:46:30 +1100 Subject: [PATCH] Set workinfoid to mapped id for ckdb. --- src/stratifier.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 467e03c7..3f7ccb5d 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1804,11 +1804,19 @@ static void add_remote_base(ckpool_t *ckp, sdata_t *sdata, workbase_t *wb) ck_wunlock(&sdata->workbase_lock); val = generate_workinfo(ckp, wb, __func__); - /* Replace jobid with mapped id */ - json_set_int64(val, "jobid", wb->mapped_id); + + /* Delete existing workinfoid value which is wrong for other remotes, + * nodes, and ckdb */ + json_object_del(val, "workinfoid"); wb_val = json_deep_copy(val); + /* Set jobid with mapped id for other nodes and remotes */ + json_set_int64(wb_val, "jobid", wb->mapped_id); + + /* Replace workinfoid to mapped id for ckdb */ + json_set_int64(val, "workinfoid", wb->mapped_id); + /* Strip unnecessary fields and add extra fields needed */ strip_fields(ckp, wb_val); json_set_int(wb_val, "txns", wb->txns);