From 8c60ae9cf175673ae91e4a46b8531cc7397f01e8 Mon Sep 17 00:00:00 2001
From: Hiren Patel <80465571+hirenkp2000@users.noreply.github.com>
Date: Tue, 10 Sep 2024 22:58:44 +0530
Subject: [PATCH] 1.1.2 fixing SNS publish batch-size issue (#339)
* Updated deployment group for E2E env
* V1 branch rules updated (#308)
* Updated deployment group for E2E env (#305)
* updated rules as per v1_* branches
* Fixed SNS publish batch-size issue
* debug pipeline failure
* include hidden file in artifact
---
.github/workflows/reusable-build-and-publish.yml | 3 ++-
.../workflows/reusable-s3-codedeploy-release.yml | 2 +-
CHANGELOG.md | 4 ++++
pom.xml | 2 +-
xyz-connectors/pom.xml | 2 +-
xyz-hub-service/pom.xml | 2 +-
xyz-hub-test/pom.xml | 2 +-
xyz-models/pom.xml | 2 +-
xyz-psql-connector/pom.xml | 2 +-
xyz-txn-handler/pom.xml | 2 +-
.../here/xyz/pub/handlers/PubTxnListHandler.java | 13 +++++++++----
11 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/reusable-build-and-publish.yml b/.github/workflows/reusable-build-and-publish.yml
index dc9734254..1e40af698 100644
--- a/.github/workflows/reusable-build-and-publish.yml
+++ b/.github/workflows/reusable-build-and-publish.yml
@@ -48,7 +48,7 @@ jobs:
cp -p $SERVICE_JAR_DIR/xyz-hub-service.jar $CODEDEPLOY_DIR/contents/xyz-hub/
- name: List CodeDeploy artifact content
run: |
- ls -lR $CODEDEPLOY_DIR
+ ls -lRa $CODEDEPLOY_DIR
- name: Save pipeline artifact name
id: save-artifact-name
run: echo "name=${{ env.GITHUB_CODEDEPLOY_ARTIFACT_NAME }}" >> "$GITHUB_OUTPUT"
@@ -58,6 +58,7 @@ jobs:
name: ${{ env.GITHUB_CODEDEPLOY_ARTIFACT_NAME }}
path: ${{ env.CODEDEPLOY_DIR }}
if-no-files-found: error
+ include-hidden-files: true
- name: Identify and save Application version
id: save-app-version
run: |
diff --git a/.github/workflows/reusable-s3-codedeploy-release.yml b/.github/workflows/reusable-s3-codedeploy-release.yml
index eb6bde68e..5fd599c55 100644
--- a/.github/workflows/reusable-s3-codedeploy-release.yml
+++ b/.github/workflows/reusable-s3-codedeploy-release.yml
@@ -49,7 +49,7 @@ jobs:
path: download
- name: List CodeDeploy artifacts
run: |
- ls -lR download/
+ ls -lRa download/
- name: Preparing S3 artifact name
id: s3-artifact-name
run: |
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 118051e00..59828484f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## Naksha_1.1.2
+
+- Fixed batch-size failure issue for SNS publishing where one of the message fails during publish, then we optimize by continuing from that failure instead of re-processing entire batch
+
## Naksha_1.1.1
- Introduced new query parameter `rlock` to indicate whether API transaction should `WAIT` or `ABORT` when there is DB row-level lock found during Updates.
diff --git a/pom.xml b/pom.xml
index 8e5c0a550..d67bdbe58 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,7 +41,7 @@
com.here.xyz
xyz-hub
- 1.1.2-SNAPSHOT
+ 1.1.2
pom
diff --git a/xyz-connectors/pom.xml b/xyz-connectors/pom.xml
index 6b9c344e4..425ea029e 100644
--- a/xyz-connectors/pom.xml
+++ b/xyz-connectors/pom.xml
@@ -25,7 +25,7 @@
com.here.xyz
xyz-hub
../
- 1.1.2-SNAPSHOT
+ 1.1.2
diff --git a/xyz-hub-service/pom.xml b/xyz-hub-service/pom.xml
index ed84822c7..6941e01b0 100644
--- a/xyz-hub-service/pom.xml
+++ b/xyz-hub-service/pom.xml
@@ -25,7 +25,7 @@
com.here.xyz
xyz-hub
../pom.xml
- 1.1.2-SNAPSHOT
+ 1.1.2
diff --git a/xyz-hub-test/pom.xml b/xyz-hub-test/pom.xml
index 3f5658fe2..058cec650 100644
--- a/xyz-hub-test/pom.xml
+++ b/xyz-hub-test/pom.xml
@@ -25,7 +25,7 @@
com.here.xyz
xyz-hub
../
- 1.1.2-SNAPSHOT
+ 1.1.2
diff --git a/xyz-models/pom.xml b/xyz-models/pom.xml
index 81df2187f..f3006fad9 100644
--- a/xyz-models/pom.xml
+++ b/xyz-models/pom.xml
@@ -25,7 +25,7 @@
com.here.xyz
xyz-hub
../
- 1.1.2-SNAPSHOT
+ 1.1.2
diff --git a/xyz-psql-connector/pom.xml b/xyz-psql-connector/pom.xml
index 84f9e4216..5b2243ec5 100644
--- a/xyz-psql-connector/pom.xml
+++ b/xyz-psql-connector/pom.xml
@@ -25,7 +25,7 @@
com.here.xyz
xyz-hub
../
- 1.1.2-SNAPSHOT
+ 1.1.2
diff --git a/xyz-txn-handler/pom.xml b/xyz-txn-handler/pom.xml
index 93a73454d..9b7eb8b60 100644
--- a/xyz-txn-handler/pom.xml
+++ b/xyz-txn-handler/pom.xml
@@ -25,7 +25,7 @@
com.here.xyz
xyz-hub
../
- 1.1.2-SNAPSHOT
+ 1.1.2
diff --git a/xyz-txn-handler/src/main/java/com/here/xyz/pub/handlers/PubTxnListHandler.java b/xyz-txn-handler/src/main/java/com/here/xyz/pub/handlers/PubTxnListHandler.java
index 599ddb9d1..fd8155aea 100644
--- a/xyz-txn-handler/src/main/java/com/here/xyz/pub/handlers/PubTxnListHandler.java
+++ b/xyz-txn-handler/src/main/java/com/here/xyz/pub/handlers/PubTxnListHandler.java
@@ -46,10 +46,15 @@ public void run() {
return;
}
// Handover transactions to appropriate Publisher (e.g. DefaultSNSPublisher)
- final PublishEntryDTO lastTxn = PubUtil.getPubInstance(sub).publishTransactions(pubCfg, sub, txnList, lastTxnId, lastTxnRecId);
-
- // Update last txn_id in AdminDB::xyz_config::xyz_txn_pub table
- PubDatabaseHandler.saveLastTxnId(adminDBConnParams, subId, lastTxn);
+ PublishEntryDTO lastTxn = null;
+ try {
+ lastTxn = PubUtil.getPubInstance(sub).publishTransactions(pubCfg, sub, txnList, lastTxnId, lastTxnRecId);
+ } finally {
+ if (lastTxn != null) {
+ // Update last txn_id in AdminDB::xyz_config::xyz_txn_pub table
+ PubDatabaseHandler.saveLastTxnId(adminDBConnParams, subId, lastTxn);
+ }
+ }
} catch (Exception ex) {
logger.error("{} - Exception in publisher job for subId={}, spaceId={}. ",
PubLogConstants.LOG_CODE_PUBLISH_ERROR, subId, spaceId, ex);