-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(reindex): Extend range tables with the status column (#717)
* feat(reindex): Extend range tables with the status column - add status, failCause columns to merge/upload range tables - implement status population logic Closes: MSEARCH-870
- Loading branch information
1 parent
4982d9f
commit a60ac4c
Showing
20 changed files
with
222 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/org/folio/search/model/types/ReindexRangeStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.folio.search.model.types; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum ReindexRangeStatus { | ||
SUCCESS("Success"), | ||
FAIL("Fail"); | ||
|
||
private final String value; | ||
|
||
ReindexRangeStatus(String value) { | ||
this.value = value; | ||
} | ||
|
||
public static ReindexRangeStatus valueOfNullable(String value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
|
||
for (ReindexRangeStatus b : ReindexRangeStatus.values()) { | ||
if (b.name().equalsIgnoreCase(value)) { | ||
return b; | ||
} | ||
} | ||
throw new IllegalArgumentException("Unexpected value '" + value + "'"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/main/resources/changelog/changes/v4.0/add-reindex-range-statuses.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | ||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.27.xsd"> | ||
|
||
<changeSet id="MSEARCH-870@@add-merge_range-status" author="viacheslav_kolesnyk"> | ||
<preConditions onFail="MARK_RAN"> | ||
<and> | ||
<tableExists tableName="merge_range"/> | ||
<not> | ||
<columnExists tableName="merge_range" columnName="status" /> | ||
</not> | ||
</and> | ||
</preConditions> | ||
|
||
<addColumn tableName="merge_range"> | ||
<column name="status" type="VARCHAR(20)"/> | ||
<column name="fail_cause" type="TEXT"/> | ||
</addColumn> | ||
</changeSet> | ||
|
||
<changeSet id="MSEARCH-870@@add-upload_range-status" author="viacheslav_kolesnyk"> | ||
<preConditions onFail="MARK_RAN"> | ||
<and> | ||
<tableExists tableName="upload_range"/> | ||
<not> | ||
<columnExists tableName="upload_range" columnName="status" /> | ||
</not> | ||
</and> | ||
</preConditions> | ||
|
||
<addColumn tableName="upload_range"> | ||
<column name="status" type="VARCHAR(20)"/> | ||
<column name="fail_cause" type="TEXT"/> | ||
</addColumn> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.