From 884e3aa07b70e54758ed84f32f91f4e307231f2b Mon Sep 17 00:00:00 2001 From: michaelturkington Date: Wed, 4 Dec 2024 16:37:57 +0000 Subject: [PATCH 1/2] fix idbreload issues --- code/processes/idb.q | 2 +- code/processes/wdb.q | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/processes/idb.q b/code/processes/idb.q index 9bbf99109..c18a40e76 100644 --- a/code/processes/idb.q +++ b/code/processes/idb.q @@ -56,7 +56,7 @@ symfilehaschanged:{[] /- checks if count of partitions has changed since last reload of the IDB. Records new partition count if changed. /- the default writedown method doesn't need db reloading as no new directory is being created there. partitioncounthaschanged:{[] - if[writedownmode~`default;:0b]; + if[(1j~partitionsize)&writedownmode~`default;:0b]; $[partitionsize<>c:count key idbdir;[partitionsize::c; 1b];0b] }; diff --git a/code/processes/wdb.q b/code/processes/wdb.q index 5cfb69c3c..fde7119bf 100644 --- a/code/processes/wdb.q +++ b/code/processes/wdb.q @@ -421,7 +421,7 @@ endofdaysort:{[dir;pt;tablist;writedownmode;mergelimits;hdbsettings;mergemethod] endofdaysortdate[dir;pt;key tablist;hdbsettings] ]; /- run steps to rollover idb - idbreload[currentpartition+1]; + idbreload[pt+1]; /- reset compression level (.z.zd) resetcompression[16 0 0] }; From dff9be138ef1ffc3f6d1f714220b487c2a75278f Mon Sep 17 00:00:00 2001 From: michaelturkington Date: Tue, 17 Dec 2024 10:11:36 +0000 Subject: [PATCH 2/2] issue 683 - add comment to function change --- code/processes/idb.q | 1 + 1 file changed, 1 insertion(+) diff --git a/code/processes/idb.q b/code/processes/idb.q index c18a40e76..fd67ccc8d 100644 --- a/code/processes/idb.q +++ b/code/processes/idb.q @@ -55,6 +55,7 @@ symfilehaschanged:{[] /- checks if count of partitions has changed since last reload of the IDB. Records new partition count if changed. /- the default writedown method doesn't need db reloading as no new directory is being created there. +/- First check is to ensure that a single intraday partition exists (so loadidb doesn't fail) partitioncounthaschanged:{[] if[(1j~partitionsize)&writedownmode~`default;:0b]; $[partitionsize<>c:count key idbdir;[partitionsize::c; 1b];0b]