Opened 17 years ago
Closed 17 years ago
#296 closed defect (fixed)
Search engine real time updates choke during mass loads
| Reported by: | bweaver | Owned by: | bweaver |
|---|---|---|---|
| Priority: | critical | Milestone: | Beta 3 |
| Component: | Search Engine | Version: | 1.5.915 |
| Severity: | Keywords: | ||
| Cc: | Database Engine: | N/A | |
| Operating System: | N/A |
Description
Updating / adding a few rows at a time to GG successfully updates the search engine, but mass loads (1,000+ rows) causes file pointer issues. Was introduced with multithreading code in last release.
Need to change so search engine will process properly regardless of # of rows being loaded (i.e. make realtime updates threadsafe).
Change History (8)
comment:1 by , 17 years ago
| Status: | new → addressed |
|---|
comment:2 by , 17 years ago
| Resolution: | → invalid |
|---|---|
| Status: | addressed → closed |
comment:3 by , 17 years ago
| Resolution: | invalid |
|---|---|
| Status: | closed → reopened |
Real time updates now work for the first few thousand, but after that the B+ tree gets corrupted. This can be recreated with only a single thread so it is not a threading problem.
Error occurs during a SplitChild() call and the current MedianKeyword is not found in the child's list of keywords. (i.e. Insert is trying to append to the end of the list of ChildLocations).
This is a hard one to debug sanely as it doesn't surface until after a few thousand realtime updates have been applied -- but there is definitely a bug somewhere in the B+ tree implementation, probably in the SplitChild() or Relocate() methods, as those are the only ones which change a node's Location property.
comment:4 by , 17 years ago
| Status: | reopened → addressed |
|---|
(In [966]) Fixes #296 - NodeCache was not being cleared properly during a realtime update, causing it to return outdated node objects when a parent node would relocate on a write after a child split occurred. (i.e. a very specific case that was not hit until after several thousand writes, depending on the data).
This problem does not surface during BulkInsert because node cache is disabled during that process. I was unable to recreate this problem after the code change (ran 5,400 items through realtime updates with no issues) -- but I can't guarantee the problem is completely resolved.
comment:5 by , 17 years ago
| Status: | addressed → released |
|---|
comment:6 by , 17 years ago
Appears that the real time updates on v1.5.1028 does not crash the search engine on over 14,000 accession additions. However, the administrator still shows 12,400+ items to index on a Windows 7 64-bit Ultimate box after 2 hours. What are the ramifications of this?
comment:7 by , 17 years ago
A huge amount of I/O takes place to support real time updates. I don't think there's any way to increase its performance by an order of magnitude or more, which is what it would take to make huge data dumps like this work smoothly.
I think what should probably happen is the search engine allows a certain threshold of pending realtime updates -- maybe based on the number of pending updates, maybe how long they've been executing, etc. Once it gets over some limit, it auto-rebuilds the index from scratch and rotates it in when completed. This is a little tricker to implement than it sounds (what if you get 1,000 new records every 60 seconds or so?)
But I definitely agree -- it shouldn't take 2 hours to finish when you load a fair amount of data, considering recreating it from scratch doesn't even take two hours. That behavior is unacceptable.
This should get fairly high priority to be resolved soon, but the implementation is definitely not trivial. i.e. we need to make it so there is a certain amount of heuristics in it so it detects when new data has 'finished' being added, then rebuild the index(es) as needed. This means cutting off pending realtime updates, determining when to start a new index creation, queueing up realtime updates that happen while the index is being created, etc. Essentially, making the indexes somewhat self-healing and self-regulating.
In the meantime, simply restarting the search engine then manually kicking off the appropriate index(es) to be rebuilt is a valid workaround. That is definitely not a long-term solution, though.
comment:8 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | released → closed |
Real time update issue resolved. Ongoing speed issue is being addressed in ticket #364

(In [933]) Fixes #292 - db installer now successfully drops databases even if users are connected (tested in sql server only). When the database drop failed, several other problems were occurring as well (table 'accession' already exists, could not locate gringlobal database in system schema, etc). Hopefully this fixes the root cause of all these problems.
Fixes #293 - added code to Updater to inspect IIS installed component list and prompt user to install missing components if needed. Also, after IIS / IIS Component installs occur, added code to verify they installed successfully so if user canceled out of those installs, Updater does not continue with GG installations
Refs #289 - added new forms to admin tool for search engine info. Read only at this point, and only work on a local connection.
Fixes #296 - search engine realtime updates are now queued for background processing by the search engine itself, instead of relying on asynchronous calls from the search filter from the middle tier. This makes the search engine both more reliable and more deterministic in its behavior as the caller does not dictate how the search engine actually performs updates.
Search engine now uses multiple config files -- one for most configuration (gringlobal.search.config, just like before) and a separate file for each database engine we will support. This allows the db-engine specific sql to all be stored in one place separate from db-engine agnostic settings, as well as making it easier to fix problems specific to a db engine.
Fixed some problems with the new yet-unreleased table mappings forms in the admin tool. Field mappings weren't saving foreign key id properly and made navigation between fields a little easier. Also added base methods to frmBase form for MarkClean(), IsDirty(), and MarkDirty() to make it very easy to handle prompting user to save if changes have been made on the form. Can be used by anything deriving from frmBase.
Updater now allows the user to click on the cached file themselves to view them in Windows Explorer. This will make it considerably easier to get to install_log files for troubleshooting installs.