Skip to content

Commit 5ee59f2

Browse files
andinuxclaude
andcommitted
refactor(payload): remove the cloudsync_payload_spool table and functions
The /check job now pages the tenant via the positional cursor on cloudsync_payload_chunks, so the server-side download spool is dead. Remove the cloudsync_payload_spool table and the cloudsync_payload_spool_fill / _drop / _drop_chunk functions on both engines (SQLite: sql_sqlite.c constants, sql.h decls, cloudsync_sqlite.c functions + registration; PostgreSQL: cloudsync.sql.in and the 1.0->1.1 migration), plus the SQLite "Payload Download Spool" unit test and the spool sections of the PostgreSQL chunk test. The client-side cursor paging (network.c) is unchanged: the wire protocol still pages chunks by an integer cursor; only the server's node-side staging mechanism changed. All remaining chunk/fragment/positional tests pass on both engines. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ecadfae commit 5ee59f2

7 files changed

Lines changed: 0 additions & 698 deletions

File tree

src/postgresql/cloudsync.sql.in

Lines changed: 0 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -198,119 +198,6 @@ RETURNS bytea
198198
AS 'MODULE_PATHNAME', 'cloudsync_uuid_blob'
199199
LANGUAGE C IMMUTABLE;
200200

201-
-- Download spool (server-side /check chunk staging)
202-
--
203-
-- The /check endpoint runs on a separate host and reaches the tenant DB over a
204-
-- network driver, which materializes the whole result set. Streaming chunks
205-
-- directly with SELECT * FROM cloudsync_payload_chunks(...) would therefore pull
206-
-- every chunk into the server's memory at once. Instead the server fills a
207-
-- window's chunk stream once into this table and pages it out one chunk per call.
208-
--
209-
-- UNLOGGED: this is regenerable scratch state, so skip WAL. Created at install
210-
-- time (not lazily inside the function) to avoid the plpgsql create-then-use
211-
-- cached-plan pitfall.
212-
CREATE TABLE IF NOT EXISTS cloudsync_payload_spool (
213-
stream_id text NOT NULL,
214-
chunk_index bigint NOT NULL,
215-
payload bytea NOT NULL,
216-
payload_size bigint NOT NULL,
217-
db_version_min bigint NOT NULL,
218-
db_version_max bigint NOT NULL,
219-
watermark bigint NOT NULL,
220-
is_final boolean NOT NULL DEFAULT false,
221-
created_at bigint NOT NULL DEFAULT extract(epoch FROM now())::bigint,
222-
PRIMARY KEY (stream_id, chunk_index)
223-
);
224-
225-
-- cloudsync_payload_spool_fill(stream_id, since, filter_site_id, exclude)
226-
-- Generate the whole chunk stream for a window once into cloudsync_payload_spool.
227-
-- Returns the number of chunks spooled. Idempotent: a prior complete fill is kept.
228-
-- Parameters are p_-prefixed so they never collide with the table's columns
229-
-- (an unqualified `stream_id` would otherwise be ambiguous with the parameter).
230-
CREATE OR REPLACE FUNCTION cloudsync_payload_spool_fill(
231-
p_stream_id text,
232-
p_since_db_version bigint,
233-
p_filter_site_id bytea DEFAULT NULL,
234-
p_exclude_filter_site_id boolean DEFAULT false
235-
) RETURNS bigint AS $$
236-
DECLARE
237-
existing bigint;
238-
cnt bigint := 0;
239-
rec record;
240-
BEGIN
241-
-- Stale-GC of abandoned streams. fill runs once per stream (coarse-grained),
242-
-- so unlike per-fragment cleanup there is no O(n^2) risk and no throttle.
243-
DELETE FROM cloudsync_payload_spool
244-
WHERE stream_id IN (
245-
SELECT s.stream_id FROM cloudsync_payload_spool s
246-
GROUP BY s.stream_id
247-
HAVING max(s.created_at) < extract(epoch FROM now())::bigint - 86400);
248-
249-
-- Idempotent: a prior complete fill stays as-is (fill is atomic, so rows
250-
-- present == complete stream).
251-
SELECT count(*) INTO existing FROM cloudsync_payload_spool WHERE stream_id = p_stream_id;
252-
IF existing > 0 THEN
253-
RETURN existing;
254-
END IF;
255-
256-
-- Generate the stream one chunk at a time. A cursor FOR loop fetches in
257-
-- batches rather than materializing the whole SRF into a tuplestore.
258-
FOR rec IN
259-
SELECT c.payload, c.chunk_index, c.payload_size, c.db_version_min, c.db_version_max, c.watermark_db_version
260-
FROM cloudsync_payload_chunks(p_since_db_version, p_filter_site_id, NULL, p_exclude_filter_site_id) c
261-
LOOP
262-
INSERT INTO cloudsync_payload_spool
263-
(stream_id, chunk_index, payload, payload_size, db_version_min, db_version_max, watermark, is_final)
264-
VALUES (p_stream_id, rec.chunk_index, rec.payload, rec.payload_size,
265-
rec.db_version_min, rec.db_version_max, rec.watermark_db_version, false);
266-
cnt := cnt + 1;
267-
END LOOP;
268-
269-
IF cnt > 0 THEN
270-
UPDATE cloudsync_payload_spool SET is_final = true
271-
WHERE stream_id = p_stream_id
272-
AND chunk_index = (SELECT max(x.chunk_index) FROM cloudsync_payload_spool x
273-
WHERE x.stream_id = p_stream_id);
274-
END IF;
275-
276-
RETURN cnt;
277-
END;
278-
$$ LANGUAGE plpgsql VOLATILE;
279-
280-
-- cloudsync_payload_spool_drop(stream_id) -> number of chunks removed.
281-
CREATE OR REPLACE FUNCTION cloudsync_payload_spool_drop(p_stream_id text)
282-
RETURNS bigint AS $$
283-
DECLARE
284-
deleted bigint := 0;
285-
BEGIN
286-
DELETE FROM cloudsync_payload_spool WHERE stream_id = p_stream_id;
287-
GET DIAGNOSTICS deleted = ROW_COUNT;
288-
RETURN deleted;
289-
END;
290-
$$ LANGUAGE plpgsql VOLATILE;
291-
292-
-- cloudsync_payload_spool_drop_chunk(stream_id, chunk_index) -> number of chunks removed.
293-
-- Explicit early cleanup for one S3-backed chunk; stream-level TTL/GC remains unchanged.
294-
CREATE OR REPLACE FUNCTION cloudsync_payload_spool_drop_chunk(p_stream_id text, p_chunk_index bigint)
295-
RETURNS bigint AS $$
296-
DECLARE
297-
deleted bigint := 0;
298-
BEGIN
299-
IF p_stream_id IS NULL THEN
300-
RAISE EXCEPTION 'cloudsync_payload_spool_drop_chunk: stream_id is required.';
301-
END IF;
302-
IF p_chunk_index IS NULL THEN
303-
RAISE EXCEPTION 'cloudsync_payload_spool_drop_chunk: chunk_index is required.';
304-
END IF;
305-
306-
DELETE FROM cloudsync_payload_spool
307-
WHERE stream_id = p_stream_id
308-
AND chunk_index = p_chunk_index;
309-
GET DIAGNOSTICS deleted = ROW_COUNT;
310-
RETURN deleted;
311-
END;
312-
$$ LANGUAGE plpgsql VOLATILE;
313-
314201
-- Payload decoding and application
315202
CREATE OR REPLACE FUNCTION cloudsync_payload_decode(payload bytea)
316203
RETURNS integer

src/postgresql/migrations/cloudsync--1.0--1.1.sql

Lines changed: 0 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -55,93 +55,3 @@ RETURNS bytea
5555
AS 'MODULE_PATHNAME', 'cloudsync_uuid_blob'
5656
LANGUAGE C IMMUTABLE;
5757

58-
-- Download spool: the /check path fills a window's chunk stream once and pages it
59-
-- out one chunk per call so the network driver never re-materializes the whole
60-
-- stream. See cloudsync.sql.in for the rationale.
61-
CREATE TABLE IF NOT EXISTS cloudsync_payload_spool (
62-
stream_id text NOT NULL,
63-
chunk_index bigint NOT NULL,
64-
payload bytea NOT NULL,
65-
payload_size bigint NOT NULL,
66-
db_version_min bigint NOT NULL,
67-
db_version_max bigint NOT NULL,
68-
watermark bigint NOT NULL,
69-
is_final boolean NOT NULL DEFAULT false,
70-
created_at bigint NOT NULL DEFAULT extract(epoch FROM now())::bigint,
71-
PRIMARY KEY (stream_id, chunk_index)
72-
);
73-
74-
CREATE OR REPLACE FUNCTION cloudsync_payload_spool_fill(
75-
p_stream_id text,
76-
p_since_db_version bigint,
77-
p_filter_site_id bytea DEFAULT NULL,
78-
p_exclude_filter_site_id boolean DEFAULT false
79-
) RETURNS bigint AS $$
80-
DECLARE
81-
existing bigint;
82-
cnt bigint := 0;
83-
rec record;
84-
BEGIN
85-
DELETE FROM cloudsync_payload_spool
86-
WHERE stream_id IN (
87-
SELECT s.stream_id FROM cloudsync_payload_spool s
88-
GROUP BY s.stream_id
89-
HAVING max(s.created_at) < extract(epoch FROM now())::bigint - 86400);
90-
91-
SELECT count(*) INTO existing FROM cloudsync_payload_spool WHERE stream_id = p_stream_id;
92-
IF existing > 0 THEN
93-
RETURN existing;
94-
END IF;
95-
96-
FOR rec IN
97-
SELECT c.payload, c.chunk_index, c.payload_size, c.db_version_min, c.db_version_max, c.watermark_db_version
98-
FROM cloudsync_payload_chunks(p_since_db_version, p_filter_site_id, NULL, p_exclude_filter_site_id) c
99-
LOOP
100-
INSERT INTO cloudsync_payload_spool
101-
(stream_id, chunk_index, payload, payload_size, db_version_min, db_version_max, watermark, is_final)
102-
VALUES (p_stream_id, rec.chunk_index, rec.payload, rec.payload_size,
103-
rec.db_version_min, rec.db_version_max, rec.watermark_db_version, false);
104-
cnt := cnt + 1;
105-
END LOOP;
106-
107-
IF cnt > 0 THEN
108-
UPDATE cloudsync_payload_spool SET is_final = true
109-
WHERE stream_id = p_stream_id
110-
AND chunk_index = (SELECT max(x.chunk_index) FROM cloudsync_payload_spool x
111-
WHERE x.stream_id = p_stream_id);
112-
END IF;
113-
114-
RETURN cnt;
115-
END;
116-
$$ LANGUAGE plpgsql VOLATILE;
117-
118-
CREATE OR REPLACE FUNCTION cloudsync_payload_spool_drop(p_stream_id text)
119-
RETURNS bigint AS $$
120-
DECLARE
121-
deleted bigint := 0;
122-
BEGIN
123-
DELETE FROM cloudsync_payload_spool WHERE stream_id = p_stream_id;
124-
GET DIAGNOSTICS deleted = ROW_COUNT;
125-
RETURN deleted;
126-
END;
127-
$$ LANGUAGE plpgsql VOLATILE;
128-
129-
CREATE OR REPLACE FUNCTION cloudsync_payload_spool_drop_chunk(p_stream_id text, p_chunk_index bigint)
130-
RETURNS bigint AS $$
131-
DECLARE
132-
deleted bigint := 0;
133-
BEGIN
134-
IF p_stream_id IS NULL THEN
135-
RAISE EXCEPTION 'cloudsync_payload_spool_drop_chunk: stream_id is required.';
136-
END IF;
137-
IF p_chunk_index IS NULL THEN
138-
RAISE EXCEPTION 'cloudsync_payload_spool_drop_chunk: chunk_index is required.';
139-
END IF;
140-
141-
DELETE FROM cloudsync_payload_spool
142-
WHERE stream_id = p_stream_id
143-
AND chunk_index = p_chunk_index;
144-
GET DIAGNOSTICS deleted = ROW_COUNT;
145-
RETURN deleted;
146-
END;
147-
$$ LANGUAGE plpgsql VOLATILE;

src/sql.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,6 @@ extern const char * const SQL_PAYLOAD_FRAGMENTS_SELECT;
7474
extern const char * const SQL_PAYLOAD_FRAGMENTS_DELETE;
7575
extern const char * const SQL_PAYLOAD_FRAGMENTS_CLEANUP_STALE;
7676

77-
extern const char * const SQL_PAYLOAD_SPOOL_CREATE_TABLE;
78-
extern const char * const SQL_PAYLOAD_SPOOL_COUNT;
79-
extern const char * const SQL_PAYLOAD_SPOOL_FILL_INSERT;
80-
extern const char * const SQL_PAYLOAD_SPOOL_MARK_FINAL;
81-
extern const char * const SQL_PAYLOAD_SPOOL_DELETE;
82-
extern const char * const SQL_PAYLOAD_SPOOL_DELETE_CHUNK;
83-
extern const char * const SQL_PAYLOAD_SPOOL_CLEANUP_STALE;
84-
8577
// BLOCKS (block-level LWW)
8678
extern const char * const SQL_BLOCKS_CREATE_TABLE;
8779
extern const char * const SQL_BLOCKS_UPSERT;

src/sqlite/cloudsync_sqlite.c

Lines changed: 0 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,152 +1852,6 @@ void dbsync_payload_load (sqlite3_context *context, int argc, sqlite3_value **ar
18521852
}
18531853
#endif
18541854

1855-
// MARK: - Download spool -
1856-
1857-
// Abandoned download streams (a client that started a chunked /check drain and
1858-
// never finished) are reaped after this many seconds. Matches the v3 fragment
1859-
// stale window.
1860-
#define CLOUDSYNC_PAYLOAD_SPOOL_STALE_SECONDS (24*60*60)
1861-
1862-
// cloudsync_payload_spool_fill(stream_id, since_db_version, filter_site_id, exclude)
1863-
// Generate the whole chunk stream for a window once into cloudsync_payload_spool
1864-
// so the /check path can page it out one chunk per call. Returns the number of
1865-
// chunks spooled for stream_id. Idempotent: a prior complete fill is kept as-is.
1866-
static void dbsync_payload_spool_fill (sqlite3_context *context, int argc, sqlite3_value **argv) {
1867-
DEBUG_FUNCTION("cloudsync_payload_spool_fill");
1868-
UNUSED_PARAMETER(argc);
1869-
1870-
sqlite3 *db = sqlite3_context_db_handle(context);
1871-
if (sqlite3_value_type(argv[0]) == SQLITE_NULL) {
1872-
sqlite3_result_error(context, "cloudsync_payload_spool_fill: stream_id is required.", -1);
1873-
return;
1874-
}
1875-
const char *stream_id = (const char *)sqlite3_value_text(argv[0]);
1876-
int stream_id_len = sqlite3_value_bytes(argv[0]);
1877-
int64_t since = sqlite3_value_int64(argv[1]);
1878-
bool site_given = (sqlite3_value_type(argv[2]) != SQLITE_NULL);
1879-
int exclude = (sqlite3_value_int(argv[3]) != 0);
1880-
1881-
sqlite3_stmt *stmt = NULL;
1882-
int rc = sqlite3_exec(db, SQL_PAYLOAD_SPOOL_CREATE_TABLE, NULL, NULL, NULL);
1883-
if (rc != SQLITE_OK) goto error;
1884-
1885-
// Stale-GC of abandoned streams (coarse-grained, no throttle needed).
1886-
if (sqlite3_prepare_v2(db, SQL_PAYLOAD_SPOOL_CLEANUP_STALE, -1, &stmt, NULL) == SQLITE_OK) {
1887-
sqlite3_bind_int64(stmt, 1, (int64_t)time(NULL) - CLOUDSYNC_PAYLOAD_SPOOL_STALE_SECONDS);
1888-
sqlite3_step(stmt);
1889-
}
1890-
sqlite3_finalize(stmt); stmt = NULL;
1891-
1892-
// Atomic fill: a partial/failed generation must never persist, so that the
1893-
// idempotency check below ("rows present == complete stream") holds.
1894-
rc = sqlite3_exec(db, "SAVEPOINT cloudsync_spool_fill;", NULL, NULL, NULL);
1895-
if (rc != SQLITE_OK) goto error;
1896-
1897-
int64_t count = 0;
1898-
rc = sqlite3_prepare_v2(db, SQL_PAYLOAD_SPOOL_COUNT, -1, &stmt, NULL);
1899-
if (rc != SQLITE_OK) goto rollback;
1900-
sqlite3_bind_text(stmt, 1, stream_id, stream_id_len, SQLITE_TRANSIENT);
1901-
if (sqlite3_step(stmt) == SQLITE_ROW) count = sqlite3_column_int64(stmt, 0);
1902-
sqlite3_finalize(stmt); stmt = NULL;
1903-
1904-
if (count == 0) {
1905-
rc = sqlite3_prepare_v2(db, SQL_PAYLOAD_SPOOL_FILL_INSERT, -1, &stmt, NULL);
1906-
if (rc != SQLITE_OK) goto rollback;
1907-
sqlite3_bind_text(stmt, 1, stream_id, stream_id_len, SQLITE_TRANSIENT);
1908-
sqlite3_bind_int64(stmt, 2, since);
1909-
if (site_given) sqlite3_bind_blob(stmt, 3, sqlite3_value_blob(argv[2]), sqlite3_value_bytes(argv[2]), SQLITE_TRANSIENT);
1910-
else sqlite3_bind_null(stmt, 3);
1911-
sqlite3_bind_int(stmt, 4, exclude);
1912-
rc = sqlite3_step(stmt);
1913-
sqlite3_finalize(stmt); stmt = NULL;
1914-
if (rc != SQLITE_DONE) goto rollback;
1915-
1916-
rc = sqlite3_prepare_v2(db, SQL_PAYLOAD_SPOOL_MARK_FINAL, -1, &stmt, NULL);
1917-
if (rc != SQLITE_OK) goto rollback;
1918-
sqlite3_bind_text(stmt, 1, stream_id, stream_id_len, SQLITE_TRANSIENT);
1919-
rc = sqlite3_step(stmt);
1920-
sqlite3_finalize(stmt); stmt = NULL;
1921-
if (rc != SQLITE_DONE) goto rollback;
1922-
1923-
rc = sqlite3_prepare_v2(db, SQL_PAYLOAD_SPOOL_COUNT, -1, &stmt, NULL);
1924-
if (rc != SQLITE_OK) goto rollback;
1925-
sqlite3_bind_text(stmt, 1, stream_id, stream_id_len, SQLITE_TRANSIENT);
1926-
if (sqlite3_step(stmt) == SQLITE_ROW) count = sqlite3_column_int64(stmt, 0);
1927-
sqlite3_finalize(stmt); stmt = NULL;
1928-
}
1929-
1930-
sqlite3_exec(db, "RELEASE cloudsync_spool_fill;", NULL, NULL, NULL);
1931-
sqlite3_result_int64(context, count);
1932-
return;
1933-
1934-
rollback:
1935-
sqlite3_finalize(stmt);
1936-
sqlite3_result_error(context, sqlite3_errmsg(db), -1);
1937-
sqlite3_result_error_code(context, rc);
1938-
sqlite3_exec(db, "ROLLBACK TO cloudsync_spool_fill; RELEASE cloudsync_spool_fill;", NULL, NULL, NULL);
1939-
return;
1940-
1941-
error:
1942-
sqlite3_result_error(context, sqlite3_errmsg(db), -1);
1943-
sqlite3_result_error_code(context, rc);
1944-
}
1945-
1946-
// cloudsync_payload_spool_drop(stream_id) -> number of chunks removed.
1947-
// Called once a stream has been fully delivered/acked (or to force-evict).
1948-
static void dbsync_payload_spool_drop (sqlite3_context *context, int argc, sqlite3_value **argv) {
1949-
DEBUG_FUNCTION("cloudsync_payload_spool_drop");
1950-
UNUSED_PARAMETER(argc);
1951-
1952-
sqlite3 *db = sqlite3_context_db_handle(context);
1953-
if (sqlite3_value_type(argv[0]) == SQLITE_NULL) {
1954-
sqlite3_result_error(context, "cloudsync_payload_spool_drop: stream_id is required.", -1);
1955-
return;
1956-
}
1957-
1958-
int rc = sqlite3_exec(db, SQL_PAYLOAD_SPOOL_CREATE_TABLE, NULL, NULL, NULL);
1959-
if (rc != SQLITE_OK) { sqlite3_result_error(context, sqlite3_errmsg(db), -1); return; }
1960-
1961-
sqlite3_stmt *stmt = NULL;
1962-
rc = sqlite3_prepare_v2(db, SQL_PAYLOAD_SPOOL_DELETE, -1, &stmt, NULL);
1963-
if (rc != SQLITE_OK) { sqlite3_result_error(context, sqlite3_errmsg(db), -1); return; }
1964-
sqlite3_bind_text(stmt, 1, (const char *)sqlite3_value_text(argv[0]), sqlite3_value_bytes(argv[0]), SQLITE_TRANSIENT);
1965-
rc = sqlite3_step(stmt);
1966-
sqlite3_finalize(stmt);
1967-
if (rc != SQLITE_DONE) { sqlite3_result_error(context, sqlite3_errmsg(db), -1); return; }
1968-
sqlite3_result_int64(context, sqlite3_changes(db));
1969-
}
1970-
1971-
// cloudsync_payload_spool_drop_chunk(stream_id, chunk_index) -> number of chunks removed.
1972-
// Called after one S3-backed chunk has been safely persisted outside the spool.
1973-
static void dbsync_payload_spool_drop_chunk (sqlite3_context *context, int argc, sqlite3_value **argv) {
1974-
DEBUG_FUNCTION("cloudsync_payload_spool_drop_chunk");
1975-
UNUSED_PARAMETER(argc);
1976-
1977-
sqlite3 *db = sqlite3_context_db_handle(context);
1978-
if (sqlite3_value_type(argv[0]) == SQLITE_NULL) {
1979-
sqlite3_result_error(context, "cloudsync_payload_spool_drop_chunk: stream_id is required.", -1);
1980-
return;
1981-
}
1982-
if (sqlite3_value_type(argv[1]) == SQLITE_NULL) {
1983-
sqlite3_result_error(context, "cloudsync_payload_spool_drop_chunk: chunk_index is required.", -1);
1984-
return;
1985-
}
1986-
1987-
int rc = sqlite3_exec(db, SQL_PAYLOAD_SPOOL_CREATE_TABLE, NULL, NULL, NULL);
1988-
if (rc != SQLITE_OK) { sqlite3_result_error(context, sqlite3_errmsg(db), -1); return; }
1989-
1990-
sqlite3_stmt *stmt = NULL;
1991-
rc = sqlite3_prepare_v2(db, SQL_PAYLOAD_SPOOL_DELETE_CHUNK, -1, &stmt, NULL);
1992-
if (rc != SQLITE_OK) { sqlite3_result_error(context, sqlite3_errmsg(db), -1); return; }
1993-
sqlite3_bind_text(stmt, 1, (const char *)sqlite3_value_text(argv[0]), sqlite3_value_bytes(argv[0]), SQLITE_TRANSIENT);
1994-
sqlite3_bind_int64(stmt, 2, sqlite3_value_int64(argv[1]));
1995-
rc = sqlite3_step(stmt);
1996-
sqlite3_finalize(stmt);
1997-
if (rc != SQLITE_DONE) { sqlite3_result_error(context, sqlite3_errmsg(db), -1); return; }
1998-
sqlite3_result_int64(context, sqlite3_changes(db));
1999-
}
2000-
20011855
// MARK: - Register -
20021856

20031857
int dbsync_register_with_flags (sqlite3 *db, const char *name, void (*xfunc)(sqlite3_context*,int,sqlite3_value**), void (*xstep)(sqlite3_context*,int,sqlite3_value**), void (*xfinal)(sqlite3_context*), int nargs, int flags, char **pzErrMsg, void *ctx, void (*ctx_free)(void *)) {
@@ -2319,14 +2173,6 @@ int dbsync_register_functions (sqlite3 *db, char **pzErrMsg) {
23192173
rc = dbsync_register_function(db, "cloudsync_payload_blob_checked", dbsync_payload_blob_checked, 5, pzErrMsg, ctx, NULL);
23202174
if (rc != SQLITE_OK) return rc;
23212175

2322-
// Download spool (server-side /check chunk staging)
2323-
rc = dbsync_register_function(db, "cloudsync_payload_spool_fill", dbsync_payload_spool_fill, 4, pzErrMsg, ctx, NULL);
2324-
if (rc != SQLITE_OK) return rc;
2325-
rc = dbsync_register_function(db, "cloudsync_payload_spool_drop", dbsync_payload_spool_drop, 1, pzErrMsg, ctx, NULL);
2326-
if (rc != SQLITE_OK) return rc;
2327-
rc = dbsync_register_function(db, "cloudsync_payload_spool_drop_chunk", dbsync_payload_spool_drop_chunk, 2, pzErrMsg, ctx, NULL);
2328-
if (rc != SQLITE_OK) return rc;
2329-
23302176
#ifdef CLOUDSYNC_DESKTOP_OS
23312177
rc = dbsync_register_function(db, "cloudsync_payload_save", dbsync_payload_save, 1, pzErrMsg, ctx, NULL);
23322178
if (rc != SQLITE_OK) return rc;

0 commit comments

Comments
 (0)