Skip to content

Commit

Permalink
#672 ensure idb process is reloaded after wdb savedown completed (#676)
Browse files Browse the repository at this point in the history
* #672 ensure idb process is reloaded after wdb savedown compelte. Also allow for no idb present

* #672  use inter rather than where in
  • Loading branch information
JosefBaines authored Oct 31, 2024
1 parent 6b23a69 commit 4a26653
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions code/processes/idb.q
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,11 @@ init:{[]

\d .

// Get the relevant IDB attributes
.proc.getattributes:{`partition`tables!(.idb.currentpartition;tables[])}
/- set the reload the function
reload:.idb.intradayreload;

/-Get the relevant IDB attributes
.proc.getattributes:{`partition`tables!(.idb.currentpartition;tables[])};

.idb.init[];

Expand Down
6 changes: 3 additions & 3 deletions code/processes/wdb.q
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ replay:@[value;`replay;1b]; /-rep
schema:@[value;`schema;1b]; /-retrieve schema from tickerplant
settimer:@[value;`settimer;0D00:00:10]; /-set timer interval for row check

reloadorder:@[value;`reloadorder;`hdb`rdb]; /-order to reload hdbs, rdbs
reloadorder:@[value;`reloadorder;`hdb`rdb`idb]; /-order to reload hdbs, rdbs, idbs
sortcsv:@[value;`sortcsv;`:config/sort.csv]; /-location of csv file
permitreload:@[value;`permitreload;1b]; /-enable reload of hdbs/rdbs

Expand Down Expand Up @@ -256,7 +256,7 @@ doreload:{[pt]
reloadcomplete::0b;
/-inform gateway of reload start
informgateway(`reloadstart;`);
getprocs[;pt] each reloadorder;
getprocs[;pt] each reloadorder inter .servers.SERVERS[`proctype];
$[eodwaittime>0;
.timer.one[timeouttime::.proc.cp[]+eodwaittime;(value;".wdb.flushend[]");"release all hdbs and rdbs as timer has expired";0b];
.wdb.flushend[]
Expand Down Expand Up @@ -427,7 +427,7 @@ endofdaysort:{[dir;pt;tablist;writedownmode;mergelimits;hdbsettings;mergemethod]
resetcompression[16 0 0]
};

/-function to send reload message to rdbs/hdbs
/-function to send reload message to rdbs/hdbs/idbs
reloadproc:{[h;d;ptype]
/-count of processes to be reloaded
countreload::count[raze .servers.getservers[`proctype;;()!();1b;0b]each reloadorder];
Expand Down

0 comments on commit 4a26653

Please sign in to comment.