Skip to content

Changing table partition time

Bikram Chatterjee edited this page Oct 23, 2017 · 1 revision

Changing the partition time of rolling tables

  1. partition time in the dderl tables are saved in seconds.So 86400 corresponds to a day
  2. on line 14 in imem_proll.erl change the value of GET_PROLL_CYCLE_WAIT to 1 sec (replace 100000 to 1000)
  3. on line 7 in imem_dal_skvh.erl change the vlaue of AUDIT_SUFFIX to the partion time that you want to set. For example setting the partition time from day to a minute you have replace -define(AUDIT_SUFFIX,"Audit_86400@_"). with -define(AUDIT_SUFFIX,"Audit_60@_").
  4. Compile this and you can hot load this file on the running node.
  5. Similar to step 3 make changes on line 12 and 13 in imem_meta.hrl.
  6. Restart of the node is rquired after the changes to the hrl files and compiling the code.
  7. In dderl on table ddAlias change the row with qname as {sbsgui,ddLog_86400@} to {sbsgui,ddLog_60@} for partitioning the table every minute.
  8. In the same row also change the purge time in the opts column to 5 minutes by replacing [{record_name,ddLog},{type,ordered_set},{purge_delay,430000}] with [{record_name,ddLog},{type,ordered_set},{purge_delay,300}]
  9. Do the same steps as 7 and 8 for rows with qname {sbsgui,ddMonitor_60@}