Skip to content

Commit

Permalink
version downgrade
Browse files Browse the repository at this point in the history
coding style fix
README.md fix
  • Loading branch information
lumber1000 committed Sep 27, 2024
1 parent 5dd3b43 commit e9f9710
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Overview (5.5.0)
# Overview (5.4.3)

Cradle API is used to work with Cradle - the datalake where th2 stores its data.

Expand Down Expand Up @@ -209,8 +209,8 @@ Test events have mandatory parameters that are verified when storing an event. T

## Release notes

### 5.5.0
* Atomicity when adding new pages (`doAddPages` method in CassandraCradleStorage).
### 5.4.3
* Refactored the CassandraCradleStorage::doAddPages method to execute insert and update operations atomically.
* Updated th2 gradle plugin: `0.1.3` (bom: `4.8.0`)

### 5.4.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,19 @@ private BoundStatement buildPageNameStatement(PreparedStatement statement, PageE
public ResultSet addPages(Collection<PageEntity> pages, PageEntity lastPage, Function<BatchStatementBuilder, BatchStatementBuilder> attributes) {
BatchStatementBuilder batchBuilder = BatchStatement.builder(DefaultBatchType.LOGGED);

for (PageEntity page: pages) batchBuilder.addStatements(
buildPageStatement(pageInsertStatement, page),
buildPageNameStatement(pageNameInsertStatement, page)
);

if (lastPage != null) batchBuilder.addStatements(
buildPageStatement(pageUpdateStatement, lastPage),
buildPageNameStatement(pageNameUpdateStatement, lastPage)
);
for (PageEntity page: pages) {
batchBuilder.addStatements(
buildPageStatement(pageInsertStatement, page),
buildPageNameStatement(pageNameInsertStatement, page)
);
}

if (lastPage != null) {
batchBuilder.addStatements(
buildPageStatement(pageUpdateStatement, lastPage),
buildPageNameStatement(pageNameUpdateStatement, lastPage)
);
}

return session.execute(attributes.apply(batchBuilder).build());
}
Expand Down

0 comments on commit e9f9710

Please sign in to comment.