Skip to content

Commit 37dbae8

Browse files
committed
GH-1321 - Fix identifier handling when marking publications as failed.
We now pipe the identifier through the database-specific identifier transformation. Original report: #796 (comment)
1 parent 8c8edc3 commit 37dbae8

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

spring-modulith-events/spring-modulith-events-jdbc/src/main/java/org/springframework/modulith/events/jdbc/JdbcEventPublicationRepositoryV2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ public TargetEventPublication create(TargetEventPublication publication) {
294294
*/
295295
@Override
296296
public void markProcessing(UUID identifier) {
297-
operations.update(sqlStatementMarkProcessing, identifier);
297+
operations.update(sqlStatementMarkProcessing, uuidToDatabase(identifier));
298298
}
299299

300300
/*

spring-modulith-events/spring-modulith-events-jdbc/src/test/java/org/springframework/modulith/events/jdbc/JdbcEventPublicationRepositoryV2IntegrationTests.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,15 @@ void countsByStatus() {
430430
assertOneByStatus(Status.RESUBMITTED);
431431
}
432432

433+
@Test // GH-1321
434+
void marksPublicationAsProcessing() {
435+
436+
var event = new TestEvent("first");
437+
var publication = createPublication(event);
438+
439+
repository.markProcessing(publication.getIdentifier());
440+
}
441+
433442
private void assertOneByStatus(Status reference) {
434443

435444
for (var status : Status.values()) {

0 commit comments

Comments
 (0)