Skip to content

Fix running fulltext and rag in parallel from async#3

Open
asig2016 wants to merge 1 commit into
EGroupware:masterfrom
asig2016:fix_parallel_ft
Open

Fix running fulltext and rag in parallel from async#3
asig2016 wants to merge 1 commit into
EGroupware:masterfrom
asig2016:fix_parallel_ft

Conversation

@asig2016

Copy link
Copy Markdown
Contributor

No description provided.

@ralfbecker

Copy link
Copy Markdown
Member

Hi Alexandros,

as far as I understand your change, you run the embedding of an entry right after adding it to the fulltext index (by commenting out the continue and using a different variable $ft_extra instead of $extra).

This should not change anything, but the order things are run.

What it does change is the condition if an index is outdated is now checked just for fulltext and then both index are updated. So the embeddings are potentially updated more then needed, while outdated or not existing embeddings are still checked in the 2nd iteration of the outer foreach(... as $fulltext => $apps) loop.
The change also ignores that different apps might be choosen for the different index types.

I think we need to go back to the problem you wanted to fix: I understood embeddings were not calculated for your, just the fulltext index (or synchronious changes). Do I remember that correct?

Given what you observe is correct, it could be caused by a couple of things:
a) the cron-job is removed before both indexes are fully updated (it gets removed once we reach the end of the method and have not timed out).
b) some fatal error stops the outmost foreach to reach the embedding iteration, e.g. a PHP Fatal Error in one of the apps run in the first iteration for the fulltext index
c) some kind of race condition ...

So I think you need to dig e.g. with the debugger into the above and find the real cause:

  • remove some embeddings and fulltext entries
  • setting the debugger on the Ebeddings::embed() method
  • check why it would not run the 2nd iteration for embeddings

Ralf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants