Skip to content

Commit 5b99f1c

Browse files
authored
Merge pull request #6839 from chu11/deprecate_version_0_checkpoint
content-sqlite: deprecate version 0 checkpoint
2 parents 3427479 + 0ce7081 commit 5b99f1c

File tree

4 files changed

+4
-54
lines changed

4 files changed

+4
-54
lines changed

src/modules/content-sqlite/content-sqlite.c

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -393,22 +393,10 @@ void checkpoint_get_cb (flux_t *h,
393393
}
394394
s = (char *)sqlite3_column_text (ctx->checkpt_get_stmt, 0);
395395
if (!(o = json_loads (s, 0, &error))) {
396-
if (blobref_validate (s) < 0) {
397-
errstr = error.text;
398-
errno = EINVAL;
399-
goto error;
400-
}
401-
/* assume "version 0" if value is a bare blobref and return it
402-
* in a json envelope */
403-
if (!(o = json_pack ("{s:i s:s s:i s:f}",
404-
"version", 0,
405-
"rootref", s,
406-
"sequence", 0,
407-
"timestamp", 0.))) {
408-
errstr = "failed to encode blobref in json envelope";
409-
errno = EINVAL;
410-
goto error;
411-
}
396+
/* recovery from version 0 checkpoint blobref not supported */
397+
errstr = error.text;
398+
errno = EINVAL;
399+
goto error;
412400
}
413401
if (flux_respond_pack (h,
414402
msg,

t/Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@ dist_check_SCRIPTS = \
410410
valgrind/workload.d/resource \
411411
content/content-helper.sh \
412412
kvs/kvs-helper.sh \
413-
kvs/change-checkpoint.py \
414413
job-manager/exec-service.lua \
415414
job-manager/drain-cancel.py \
416415
job-manager/bulk-state.py \

t/kvs/change-checkpoint.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

t/t2010-kvs-snapshot-restore.t

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ test -n "$FLUX_TESTS_LOGFILE" && set -- "$@" --logfile
99

1010
test_under_flux 1
1111

12-
CHANGECHECKPOINT=${FLUX_SOURCE_DIR}/t/kvs/change-checkpoint.py
13-
1412
#
1513
# test content-sqlite backing
1614
#
@@ -78,20 +76,6 @@ test_expect_success 're-run instance, get rootref (sqlite)' '
7876
flux kvs getroot -b > getrootsqlite.out
7977
'
8078

81-
test_expect_success 'write rootref to checkpoint path, emulating checkpoint version=0 (sqlite)' '
82-
rootref=$(cat getrootsqlite.out) &&
83-
${CHANGECHECKPOINT} $(pwd)/content.sqlite "kvs-primary" ${rootref}
84-
'
85-
86-
test_expect_success 're-run instance, verify checkpoint correctly loaded (sqlite)' '
87-
flux start --setattr=statedir=$(pwd) \
88-
flux dmesg >dmesgsqlite2.out
89-
'
90-
91-
test_expect_success 'verify checkpoint loaded with no date (sqlite)' '
92-
grep checkpoint dmesgsqlite2.out | grep "N\/A"
93-
'
94-
9579
#
9680
# test content-files backing
9781
#

0 commit comments

Comments
 (0)