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

Reduce the number of requests to the storage to retrieve the total number of users #1957

Merged
merged 5 commits into from
Mar 22, 2017

Conversation

tolusha
Copy link
Contributor

@tolusha tolusha commented Mar 20, 2017

What does this PR do?

Caches the total number number of user.
Refreshes cache if the number has been changed based on fired events.

What issues does this PR fix or reference?

#1923

Changelog

Reduce the number of requests to the storage to retrieve the total number of users

Release Notes

not required

Docs PR

not required

@tolusha tolusha self-assigned this Mar 20, 2017
@tolusha tolusha changed the title Codenvy 1923 Reduce the number of requests to the storage to retrieve the total number of users Mar 20, 2017
@dmytro-ndp
Copy link
Contributor

@tolusha: does it depend on eclipse-che/che#4478 ?

@tolusha
Copy link
Contributor Author

tolusha commented Mar 20, 2017

Yes, they both have the same reference issue.

Copy link
Contributor

@dmytro-ndp dmytro-ndp left a comment

Choose a reason for hiding this comment

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

Do you have results of CodenvyLicenseSuite.xml selenium tests executing?

return currentUsersNumber;
}
} catch (ServerException e) {
LOG.error("Can't get total users number. License checking might be inconsistent.", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, license checking is impossible in this case.

@@ -383,7 +388,7 @@ public void shouldRollbackTransactionWhenFailedToRemoveAnyOfEntries(

// Remove the user, all entries must be rolled back after fail
try {
userDao.remove(user2.getId());
userManager.remove(user2.getId());
fail("UserDao#remove had to throw exception");
Copy link
Contributor

Choose a reason for hiding this comment

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

There is UserManager#remove method is called.

Copy link
Contributor

@voievodin voievodin left a comment

Choose a reason for hiding this comment

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

gj

@tolusha tolusha merged commit 6f8cc2b into master Mar 22, 2017
@tolusha tolusha deleted the CODENVY-1923 branch March 22, 2017 12:31
@JamesDrummond JamesDrummond added this to the 5.6.0 milestone Mar 30, 2017
@JamesDrummond JamesDrummond mentioned this pull request Apr 2, 2017
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants