From a7a6df3d6f73f915d48e8a9b3ce3ac6743e44661 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 23 Jul 2025 01:44:45 +0300 Subject: [PATCH] fix datatype used in test mock function --- pgxn/neon/communicator/src/worker_process/callbacks.rs | 4 ++-- pgxn/neon/communicator_process.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pgxn/neon/communicator/src/worker_process/callbacks.rs b/pgxn/neon/communicator/src/worker_process/callbacks.rs index d10605ce4e..ca33abf70a 100644 --- a/pgxn/neon/communicator/src/worker_process/callbacks.rs +++ b/pgxn/neon/communicator/src/worker_process/callbacks.rs @@ -10,7 +10,7 @@ use utils::lsn::Lsn; unsafe extern "C" { pub fn notify_proc_unsafe(procno: std::ffi::c_int); pub fn callback_set_my_latch_unsafe(); - pub fn callback_get_request_lsn_unsafe() -> u64; + pub fn callback_get_request_lsn_unsafe() -> crate::neon_request::CLsn; pub fn callback_get_lfc_metrics_unsafe() -> LfcMetrics; } @@ -27,7 +27,7 @@ unsafe fn callback_set_my_latch_unsafe() { panic!("not usable in unit tests"); } #[cfg(test)] -unsafe fn callback_get_request_lsn_unsafe() { +unsafe fn callback_get_request_lsn_unsafe() -> Lsn { panic!("not usable in unit tests"); } #[cfg(test)] diff --git a/pgxn/neon/communicator_process.c b/pgxn/neon/communicator_process.c index 0d3342cd7c..36bd548f42 100644 --- a/pgxn/neon/communicator_process.c +++ b/pgxn/neon/communicator_process.c @@ -329,7 +329,7 @@ callback_set_my_latch_unsafe(void) * FIXME: The logic from neon_get_request_lsns() needs to go here, except for * the last-written LSN cache stuff, which is managed by the rust code now. */ -uint64_t +XLogRecPtr callback_get_request_lsn_unsafe(void) { /*