Skip to content

Fix broken shared database#11901

Merged
calixtus merged 1 commit into
JabRef:mainfrom
InAnYan:fix-shared-broke
Oct 9, 2024
Merged

Fix broken shared database#11901
calixtus merged 1 commit into
JabRef:mainfrom
InAnYan:fix-shared-broke

Conversation

@InAnYan

@InAnYan InAnYan commented Oct 9, 2024

Copy link
Copy Markdown
Member

That was because of one of my AI PRs

@Siedlerchr

Copy link
Copy Markdown
Member

can you explain it a bit more?

@calixtus calixtus added this pull request to the merge queue Oct 9, 2024
Merged via the queue into JabRef:main with commit 16512ed Oct 9, 2024
@Siedlerchr Siedlerchr deleted the fix-shared-broke branch October 9, 2024 12:34
@InAnYan

InAnYan commented Oct 10, 2024

Copy link
Copy Markdown
Member Author

Ah, sorry, I will write more description in the future. It's just a very small and urgent fix, that's why I didn't wrote much

alexandre-cremieux added a commit to alexandre-cremieux/jabref that referenced this pull request Nov 6, 2024
github-merge-queue Bot pushed a commit that referenced this pull request Jun 7, 2025
…r citation relations (#11845)

* Refactor Citations Relations Tab (#11189)

* Move repository, cache, and fetcher to logic package
* Move citations model to model/citations/semanticscholar package

* Refactor Citations Relations Tab (#11189)

* Introduce service layer
* Rename LRU cache implementation
* Add tests helpers for repository

* Refactor Citations Relations Service Layer (#11189)

* Move logic from repository to service
* Refactor repositories
* Update tab configuration

* Address PR comments (#11901)

* MVStore implementation for citations: first approach (wip for open discussion)

* Introduce the DAO layer for relations (#11189):

* Implement MVStore for relations as DAO
* Implement LRUCache for relations as DAO

* MVStoreDAO implementation for citations relations (#11189):

* Solve task 1
* Implementation of a DAO chain: memory cache and MVStore
* Persist citations as relations to disk after a fetch
* Avoid fetching data if relations are available from MVStore
* Avoid reading data from MVStore if available in memory
* Consume less from network, minimize disk usage

* Implement a search lock mechanism for citations relations (#11189):

* Solve part of task 2: make impossible to force a search on a BibEntry over a week since last insertion
* The MVStoreDAO search lock is based on a timestamp map (doi -> lastInsertionDate)
* All time computation are based on UTC
* The LRU cache will always return true -> the computer could stay up during a week, leaving cache in memory

* Avoid user to force update citation relations even the fetcher returned an empty list

* Solve completely Task 2: make impossible to force a search on a BibEntry over a week since last insertion

* Make the citation relations update automatic after the guard delay is exhausted

* Remove the isForceUpdate boolean
* User is still able to trigger the fetch if an error occurs

* SearchCitationsRelationsService as singleton

* Instantiate service in JabRefGui
* Inject service in EntryEditor

* Update failing tests after merge

* Clean code style according to checkstyle

* Clean code style according to checkstyle

* Fix pending PR comments

* Fix null pointer exception in CitationsRelationsTab

* Add settings for Citations relations store TTL

* Update MVStoreBibEntryRelationDAO serializer/deserializer

* Update CHANGELOG-MD for Citations relations tab caching logic (#11189)

* Return an empty BibEntry from MVStoreBibEntryRelationDAO in case of parsing error (#11189)

* Add a test to ensure that an empty list is returned from in case of serialization error (#11189)

* fix typo (#11189)

* Address CHANGE_LOG follwing review (#11189)

* Add comments for tests helpers (#11189)

* Improve BibEntries for test (more confirming to BibTeX)

* Fix variable name

* Streamline code

* Fix class names: "Repository" instead of DAO

* Make test BibTeX more consistent to "normal" BibTeX

* Add comment on test constructor

* Fix class name (not being imperative any more)

* Fix method name

* Use annotations instead of JavaDoc comments

* Add FIXME

* Add JavaDoc comment

* Update CHANGE_LOG

* Remove the LRU cache layer

* Simplify repositories naming

* Open the MVStore once and close it only at application shutdown

* Checkstyle corrections

* Fix MD checks

* Fix serialization and lifecycle

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

* Fix handling of null response from server

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

* Fix imports

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

* Fix injection

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

* Fix tests

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

* Adapt heap space for test on ci

* Refactor

* Fix one parameter

* One line for two parameters

* Fixes module exports

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

* Unnecessary `this`

* Try hacky solution for MVStore usage

* Try 6GB

* Add System.gc() call

* Add plus one second in the test

* Disable on CI

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

* Revert quickhack

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

---------

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
Co-authored-by: Alexandre CREMIEUX <sacha@Leviathan.local>
Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>
Co-authored-by: Subhramit Basu <subhramit.bb@live.in>
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.

4 participants