Skip to content

Commit

Permalink
Fix restore preload guard (#95)
Browse files Browse the repository at this point in the history
* chore: restore preload guard

* chore: restore preload guard
  • Loading branch information
QizhengMo authored Oct 24, 2023
1 parent 2a1e48d commit aa216cd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arex-storage-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.arextest</groupId>
<artifactId>arex-storage-service</artifactId>
<version>1.0.29</version>
<version>1.0.30</version>
</parent>

<artifactId>arex-storage-config</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion arex-storage-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>arex-storage-service</artifactId>
<groupId>com.arextest</groupId>
<version>1.0.29</version>
<version>1.0.30</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>arex-model</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion arex-storage-web-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>arex-storage-service</artifactId>
<groupId>com.arextest</groupId>
<version>1.0.29</version>
<version>1.0.30</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>arex-storage-web-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ private boolean preload(RepositoryProvider<? extends Mocker> repositoryReader, M
if (repositoryReader == null) {
return false;
}
if (mockResultProvider.recordResultCount(categoryType, recordId) > 0) {
LOGGER.warn("skip preload cache for category:{},record id:{}", categoryType, recordId);
return true;
}
Iterable<? extends Mocker> iterable;
iterable = repositoryReader.queryRecordList(categoryType, recordId);
if (iterable == null) {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>com.arextest</groupId>
<artifactId>arex-storage-service</artifactId>
<packaging>pom</packaging>
<version>1.0.29</version>
<version>1.0.30</version>

<name>${project.groupId}:${project.artifactId}</name>
<description>Arex-storage is used for data storage.</description>
Expand Down

0 comments on commit aa216cd

Please sign in to comment.