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

Fix poor performance of listunrunchangesets #4798

Merged
merged 2 commits into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,15 @@ public ChangeSet getChangeSet(String path, String author, String id) {

public List<ChangeSet> getChangeSets(String path, String author, String id) {
final ArrayList<ChangeSet> changeSetsToReturn = new ArrayList<>();
for (ChangeSet changeSet : this.changeSets) {
final String normalizedPath = normalizePath(changeSet.getFilePath());
if (normalizedPath != null &&
normalizedPath.equalsIgnoreCase(normalizePath(path)) &&
changeSet.getAuthor().equalsIgnoreCase(author) &&
changeSet.getId().equalsIgnoreCase(id) &&
isDbmsMatch(changeSet.getDbmsSet())) {
changeSetsToReturn.add(changeSet);
final String normalizedPath = normalizePath(path);
if (normalizedPath != null) {
for (ChangeSet changeSet : this.changeSets) {
if (changeSet.getAuthor().equalsIgnoreCase(author) && changeSet.getId().equalsIgnoreCase(id) && isDbmsMatch(changeSet.getDbmsSet())) {
final String changesetNormalizedPath = normalizePath(changeSet.getFilePath());
if (changesetNormalizedPath != null && changesetNormalizedPath.equalsIgnoreCase(normalizedPath)) {
changeSetsToReturn.add(changeSet);
}
}
}
}
return changeSetsToReturn;
Expand Down Expand Up @@ -353,7 +354,7 @@ public void validate(Database database, Contexts contexts, LabelExpression label
}
}

public ChangeSet getChangeSet(RanChangeSet ranChangeSet) {
public ChangeSet getChangeSet(RanChangeSet ranChangeSet) {
final ChangeSet changeSet = getChangeSet(ranChangeSet.getChangeLog(), ranChangeSet.getAuthor(), ranChangeSet.getId());
if (changeSet != null) {
changeSet.setStoredFilePath(ranChangeSet.getStoredChangeLog());
Expand Down