Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: logical lock for the seedlot #1455

Merged
merged 11 commits into from
Aug 2, 2024

Conversation

RMCampos
Copy link
Contributor

@RMCampos RMCampos commented Jul 30, 2024

Description

Closes #1308

Changelog

Changed

  • Seedlot service adding checks to avoid uneeded IO operations on the database; This is required to avoid "dirty checking" of Hibernate, making a managed entity be saved more than once (yes, even without calling the repository.save method)
  • Seedlot endpoint adding logs with timestamps to keep track of the seedlot saving operation timing;
  • All entities fetch type to LAZY (avoiding extra queries on the database)
  • All LocalDateTime to LocalDate where the table works with DATE type, keeping LocalDateTime only for timestamps;
  • Improved a bit some logs messages;
  • Circular dependency (E.g.: Seedlot service has OwnerService and OwerRepository injected as dependencies, and inside OwnerService, there's also OwnerRepository injected as dependency);
  • Some single queries being called multiple times, changed to be called only once with WHERE id IN (...)

How was this tested?

  • 🧠 Not needed
  • 👀 Eyeball
  • 🤖 Added tests

What gif/image best describes this PR or how it makes you feel?


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

@RMCampos RMCampos self-assigned this Jul 30, 2024
@RMCampos RMCampos linked an issue Jul 30, 2024 that may be closed by this pull request
2 tasks
Copy link
Collaborator

@mgaseta mgaseta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@craigyu craigyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above and beyond work!

@RMCampos RMCampos enabled auto-merge (squash) August 2, 2024 19:23
@RMCampos RMCampos merged commit f5ac5f8 into main Aug 2, 2024
28 checks passed
@RMCampos RMCampos deleted the feat/1308-logical-lock-for-the-seedlot branch August 2, 2024 19:29
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.

logical lock for the_SEEDLOT
3 participants