Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Hawk » Multiple synchroniseEnd events while indexing git repository
Multiple synchroniseEnd events while indexing git repository [message #1815106] Wed, 25 September 2019 13:35 Go to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 240
Registered: October 2009
Location: Mexico
Senior Member

Expected behaviour:
Have a git respository. HEAD-1 has one file. Add a new file to the repository, commit.

After indexing a git repository via:
final Git gitVcs = new Git();
gitVcs.init(gitPath.toString(), indexer);
gitVcs.run();
indexer.addVCSManager(gitVcs, persist);

and registering for a GraphChangeListener, the synchroniseEnd event is fired once.

Observed behavior:
The new file is indexed multiple times, and thus multiple synchroniseEnd events are received. The following is printed multiple times in the console
updating indexer: 
Loading: file:/C:/git/secondFile
different revisions, resetting check timer and propagating changes!


Comments
From this it would seem that the initial indexing did not actually propagate and that the file is no registered as indexed and that is why it is indexed multiple times? Is there some additional operation on the indexer that must be called to persist the changes in the DB?
The DB files look as to be modified the same day as the code is run, so it would seem the DB is being modified.

I would like to know when the indexing finished (asynchronously) and receiving multiple events for the same call is not ideal.


Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Re: Multiple synchroniseEnd events while indexing git repository [message #1815177 is a reply to message #1815106] Thu, 26 September 2019 19:25 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Did you disable periodic checks? By default, Hawk will re-check and re-synchronise itself periodically with the monitored location. "synchroniseEnd" simply means that the synchronisation process ended, which may as well have not found any changes.

That message ("different revisions, resetting check timer and propagating changes!") is normal: Hawk is simply saying that it found changes, so it will reset its re-synchronisation timer to the minimum value. Hawk uses an exponential backoff policy: first it will check for changes after X seconds, then if no changes are found it will wait X*2 seconds, and it will keep doubling that up to a maximum value whenever no changes are found. If a change is found, it will reset the timer back to X seconds.

Have you tried running the query "return Model.allInstances.size;" and checking that it returns a non-zero value? If that is the case, then it is indexing the model. As mentioned above, Hawk is simply notifying you that the synchronisation process completed, not that there were any changes.

At the moment, the Git component pretty much works as the LocalFolder component, by looking at the files in the folder: it does not really use the actual Git history. It simply ignores the contents of any .git folder. We have an issue pending on switching it to JGit to really access past history:

https://github.com/mondo-project/mondo-hawk/issues/79

[Updated on: Thu, 26 September 2019 19:29]

Report message to a moderator

Re: Multiple synchroniseEnd events while indexing git repository [message #1815620 is a reply to message #1815177] Mon, 07 October 2019 10:45 Go to previous messageGo to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 240
Registered: October 2009
Location: Mexico
Senior Member

In the end I had to be a bit smarter with the callables I use to track initialization :)

Bug 79 worries me... We expected to have Hawk indexing provide some sort of caching, but if all the files are always being indexed upon change then this can be a bottle neck for folders with many files...


Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Re: Multiple synchroniseEnd events while indexing git repository [message #1815675 is a reply to message #1815620] Tue, 08 October 2019 09:31 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

It's in the pipeline - just need to get there :-D. I'm working right now on moving all source code to Eclipse, in addition to the website.
Previous Topic:Making queries programatically
Next Topic:Behavoir in CRUD operations
Goto Forum:
  


Current Time: Fri Mar 29 01:26:10 GMT 2024

Powered by FUDForum. Page generated in 0.01719 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top