Skip to content

FINERACT-1724-COB-hardlocked-loans-and-inline-cob-issue#3255

Merged
adamsaghy merged 1 commit intoapache:developfrom
ruchiD:FINERACT-1724-COB-hardlocked-loans-and-inline-cob-issue
Jun 22, 2023
Merged

FINERACT-1724-COB-hardlocked-loans-and-inline-cob-issue#3255
adamsaghy merged 1 commit intoapache:developfrom
ruchiD:FINERACT-1724-COB-hardlocked-loans-and-inline-cob-issue

Conversation

@ruchiD
Copy link
Copy Markdown
Contributor

@ruchiD ruchiD commented Jun 14, 2023

Description

Changes to prevent race condition for applying lock and executing cob between regular loan cob and Inline COB.
loan cob retry apply loan lock implementation.
tests.

Describe the changes made and why they were made.

Ignore if these details are present on the associated Apache Fineract JIRA ticket.

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per https://github.com/apache/fineract/#pull-requests

  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.

  • Create/update unit or integration tests for verifying the changes made.

  • Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.

  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes

  • Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)

FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.

Copy link
Copy Markdown
Contributor

@adamsaghy adamsaghy Jun 14, 2023

Choose a reason for hiding this comment

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

Should be rethrown the error here...and logging an error should be used the ERROR level, but at least the WARNING (but usually rather ERROR level)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This can be removed. Every entry in the accountLocks means its locked and we dont need any filtering...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I was wondering on this and i think we can try the following:

  • start a new transaction for the loanLockingService.applyLock() method
  • when there is an error set repeatStatus.CONTINUABLE
  • for counter we might wanna use stepExecution commit count (with every run it got increased)

What do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You might wanna do the filtering at database side

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This does not mean automatically this... i would rather go with a more generic error message...

Copy link
Copy Markdown
Contributor

@adamsaghy adamsaghy left a comment

Choose a reason for hiding this comment

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

Please kindly check my comments!

@ruchiD ruchiD force-pushed the FINERACT-1724-COB-hardlocked-loans-and-inline-cob-issue branch from 9cb64d9 to c6f757d Compare June 19, 2023 13:14
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we dont need this. The commit count got increased with each execution.

Copy link
Copy Markdown
Contributor

@adamsaghy adamsaghy left a comment

Choose a reason for hiding this comment

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

Please kindly see my comment!

@ruchiD ruchiD force-pushed the FINERACT-1724-COB-hardlocked-loans-and-inline-cob-issue branch from c6f757d to e530fd1 Compare June 21, 2023 12:28
Copy link
Copy Markdown
Contributor

@adamsaghy adamsaghy left a comment

Choose a reason for hiding this comment

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

LGTM

@adamsaghy adamsaghy merged commit d704d3d into apache:develop Jun 22, 2023
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