You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following this code ( https://gist.github.com/952781 ) you will see I open a database, connect a key map, and ensure two indexes. Then I loop for five times creating an object then attempting to find it. This functions the first time - on a fresh database, but not on subsequent runs when the database contains data in it from a previous time. The records are not found via index, although they are there.
When I remove the reference to the second index (which is not being referred to in the code), all is well. Presumably because the index operations are done in a shorter time.
From this I concluded intially that although the object is added, the process of adding indicies was not complete by the time the function returns.
But now, I like an alternative hypothesis which is that the indicies are not completely loaded after the intial ensureIndex() call. Added a delay there fixes all subsequent loads and saves.
The text was updated successfully, but these errors were encountered:
In the following this code ( https://gist.github.com/952781 ) you will see I open a database, connect a key map, and ensure two indexes. Then I loop for five times creating an object then attempting to find it. This functions the first time - on a fresh database, but not on subsequent runs when the database contains data in it from a previous time. The records are not found via index, although they are there.
When I remove the reference to the second index (which is not being referred to in the code), all is well. Presumably because the index operations are done in a shorter time.
From this I concluded intially that although the object is added, the process of adding indicies was not complete by the time the function returns.
But now, I like an alternative hypothesis which is that the indicies are not completely loaded after the intial ensureIndex() call. Added a delay there fixes all subsequent loads and saves.
The text was updated successfully, but these errors were encountered: