question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing shadows after upgrading from 3.7.0 to 3.7.5 (and 3.8.5)

See original GitHub issue

We are using Javers to historize our domain objects and it is doing a great job! However, after upgrading from 3.7.0 to 3.7.5 and above the following junit tests in our spring boot project fail (the branch is configured to use javers 3.8.5 at the moment): Missing Study Shadows Missing Survey Shadows

Both tests use the following piece of code to load the shadows with limit=5 and skip=0 (from GenericDomainObjectVersionsService.java)

public List<T> findPreviousVersions(String id, int limit, int skip) {
    T domainObject = repository.findOne(id);

    if (domainObject == null) {
      return null;
    }

    QueryBuilder jqlQuery = QueryBuilder.byInstance(domainObject)
        .withScopeDeepPlus(Integer.MAX_VALUE).limit(limit).skip(skip);

    List<Shadow<T>> previousVersions = javers.findShadows(jqlQuery.build());

    return previousVersions.stream().map(shadow -> {
      T domainObjectVersion = shadow.get();
      if (domainObjectVersion.getId() == null) {
        // deleted shadow
        domainObjectVersion.setLastModifiedBy(shadow.getCommitMetadata().getAuthor());
        domainObjectVersion.setLastModifiedDate(shadow.getCommitMetadata().getCommitDate());
      }
      return domainObjectVersion;
    }).collect(Collectors.toList());
  }

Both tests expect to get 3 shadows (1 initial commit + 2 updates) but do get only 2 shadows.

Please let me know if this is an intended change introduced with 3.7.5 or if this is an unintended side effect from the performance improvements introduced with 3.7.5

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
bartoszwalacikcommented, Apr 13, 2018

@rreitmann seems correct but could be slow. I would be better to have correct & fast paging for Shadows in JaVers itself. Let me check it. I’ll be back to you.

0reactions
rreitmanncommented, Jul 9, 2018

Ok, I did not know that. Thx, for letting me know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

All modules aren't available after upgrading to Python 3.8.5
I just upgraded the Python version from 3.8.4 to 3.8.5 And I ... ModuleNotFoundError: No module named 'module name' ... And when I...
Read more >
When should you upgrade to Python 3.11?
1. Missing binary packages. To begin with, not all packages can be installed on 3.11 yet. · 2. Incompatible packages. Sometimes supporting a...
Read more >
Release History Of SQLite
Release History. This page provides a high-level summary of changes to SQLite. For more detail, see the Fossil checkin logs at ...
Read more >
What's New In Python 3.7 — Python 3.11.1 documentation
When filesystem timestamps are too coarse, Python can miss source updates, leading to ... The new loop.start_tls() method can be used to upgrade...
Read more >
Python support policy updates for AWS SDKs and Tools
After this point, you can expect the oldest supported Python version ... No actions are required until you decide to upgrade to Python...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found