{{tag>category:"OpenInsight 32-Bit" author:"Matthew Crozier" author:"Bob Carten"}} [[https://www.revelation.com/the-works|Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community]] ==== Update_Index() contention (OpenInsight 32-Bit) ==== === At 15 OCT 2008 11:41:14PM Matthew Crozier wrote: === Say I call update_index( file, index, 0) while that index is being updated on another workstation: - Will update_index() [i]wait[/i] until that workstation has done the update before returning, or will it just return immediately because someone else is doing the job? - How can I tell if an index is being updated elsewhere (ie, what lock is in place - 'index', 'index*', 'index*ROOT')? I've tried locking all three but update_index() just seems to come straight back with no indication whether the index update was [i]completed[/i]. Cheers, M@ [url=http://www.vernonsystems.com][img]http://www.vernonsystems.com/images/logo_main_ani.gif[/img][/url] ---- === At 16 OCT 2008 06:20PM Bob Carten wrote: === Update_index calls index.flush calls F.distributor. for each indexed table F.distributor tries to lock the '*INDEXING' record If it cannot get the lock it skips to the next file There is no record of skipped files. By coincidence I was working on a post about an indexing service. see [url=http://www.revelation.com/o4wtrs/oecgi3.exe/O4W_DOMINO_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&KEY=D3C0027E40003EB0852574E4007A2489&KEY1=D3C0027E40003EB0852574E4007A2489]this post[/url] You could modify the program I posted to walk through the indexes one at a time, perhaps record the length of the 0 record before and after each update. - Bob ---- === At 17 OCT 2008 01:09AM Matthew Crozier wrote: === Thanks Bob, [i]F.distributor tries to lock the '*INDEXING' record[/i] Gosh, that sounds like old code ;). Does that mean there is only a generic lock when any index on a file is updated - no specific lock for a given index? So if one machine tries to update a specific index while another machine is updating a different index in the same file, it will fail because it will just drop out?! If so, is there any way to check or ensure that an index gets updated when update_index() is called? Thanks for the Indexing Service code - very useful :). Cheers, M@ [url=http://www.vernonsystems.com][img]http://www.vernonsystems.com/images/logo_main_ani.gif[/img][/url] [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&SUMMARY=1&KEY=4349A86F3BEAD2AA852574E400144141|View this thread on the Works forum...]]