Skip to content

Commit b3a76c0

Browse files
fix idbreload issues (#686)
* fix idbreload issues * issue 683 - add comment to function change
1 parent 2dd94a5 commit b3a76c0

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

code/processes/idb.q

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ symfilehaschanged:{[]
5555

5656
/- checks if count of partitions has changed since last reload of the IDB. Records new partition count if changed.
5757
/- the default writedown method doesn't need db reloading as no new directory is being created there.
58+
/- First check is to ensure that a single intraday partition exists (so loadidb doesn't fail)
5859
partitioncounthaschanged:{[]
59-
if[writedownmode~`default;:0b];
60+
if[(1j~partitionsize)&writedownmode~`default;:0b];
6061
$[partitionsize<>c:count key idbdir;[partitionsize::c; 1b];0b]
6162
};
6263

code/processes/wdb.q

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ endofdaysort:{[dir;pt;tablist;writedownmode;mergelimits;hdbsettings;mergemethod]
421421
endofdaysortdate[dir;pt;key tablist;hdbsettings]
422422
];
423423
/- run steps to rollover idb
424-
idbreload[currentpartition+1];
424+
idbreload[pt+1];
425425
/- reset compression level (.z.zd)
426426
resetcompression[16 0 0]
427427
};

0 commit comments

Comments
 (0)