This is an automated email from the ASF dual-hosted git repository. mhubail pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 4fa8dc5937649e29909b532644c297a501dc2063 Author: Hussain Towaileb <[email protected]> AuthorDate: Wed Jul 24 13:21:03 2024 +0300 [NO ISSUE]: Fail multipart complete attempt on abort As part of calling close(), we attempt to complete the multipart upload, however, close() is also called at the end in case we aborted, we should ignore such attempt as during aborting, we deleted the multipart upload. Ext-ref: MB-62859 Change-Id: I4677672ae2c25de889d4a83ae585a6fa54219509 Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18518 Integration-Tests: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Reviewed-by: Hussain Towaileb <[email protected]> Reviewed-by: Michael Blow <[email protected]> --- .../apache/asterix/cloud/CloudOutputStream.java | 14 ++++++++++++ asterixdb/asterix-server/pom.xml | 11 ++++++--- .../appended-resources/supplemental-models.xml | 16 ++++++------- ...content.com_luben_zstd-jni_v1.5.6-2_LICENSE.txt | 26 ++++++++++++++++++++++ 4 files changed, 56 insertions(+), 11 deletions(-) diff --git a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/CloudOutputStream.java b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/CloudOutputStream.java index bea91fb60e..1da3e4c3e1 100644 --- a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/CloudOutputStream.java +++ b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/CloudOutputStream.java @@ -22,9 +22,14 @@ import java.io.IOException; import java.io.OutputStream; import org.apache.asterix.cloud.clients.ICloudWriter; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public final class CloudOutputStream extends OutputStream { + private static final Logger LOGGER = LogManager.getLogger(); + private final ICloudWriter cloudWriter; + private boolean aborted = false; public CloudOutputStream(ICloudWriter cloudWriter) { this.cloudWriter = cloudWriter; @@ -42,10 +47,19 @@ public final class CloudOutputStream extends OutputStream { @Override public void close() throws IOException { + if (aborted) { + LOGGER.debug("Skipping call to finish() as operation was aborted"); + return; + } cloudWriter.finish(); } public void abort() throws IOException { + if (aborted) { + LOGGER.debug("Skipping call to abort() as we have aborted already"); + return; + } + aborted = true; cloudWriter.abort(); } } diff --git a/asterixdb/asterix-server/pom.xml b/asterixdb/asterix-server/pom.xml index cc755149ca..e65c742ed6 100644 --- a/asterixdb/asterix-server/pom.xml +++ b/asterixdb/asterix-server/pom.xml @@ -268,11 +268,11 @@ <url>https://raw.githubusercontent.com/reactor/reactor-netty/v1.0.28/LICENSE</url> </override> <override> - <gav>com.microsoft.azure:msal4j:1.13.8</gav> - <url>https://raw.githubusercontent.com/AzureAD/microsoft-authentication-library-for-java/v1.13.8/LICENSE</url> + <gav>com.microsoft.azure:msal4j:1.16.1</gav> + <url>https://raw.githubusercontent.com/AzureAD/microsoft-authentication-library-for-java/v1.16.1/LICENSE</url> </override> <override> - <gav>com.microsoft.azure:msal4j-persistence-extension:1.2.0</gav> + <gav>com.microsoft.azure:msal4j-persistence-extension:1.3.0</gav> <url>https://raw.githubusercontent.com/AzureAD/microsoft-authentication-extensions-for-java/master/LICENSE</url> </override> <override> @@ -483,6 +483,10 @@ <gav>com.github.luben:zstd-jni:1.5.0-1</gav> <url>https://raw.githubusercontent.com/luben/zstd-jni/v1.5.0-1/LICENSE</url> </override> + <override> + <gav>com.github.luben:zstd-jni:1.5.6-2</gav> + <url>https://raw.githubusercontent.com/luben/zstd-jni/v1.5.6-2/LICENSE</url> + </override> <override> <gav>org.slf4j:slf4j-reload4j:1.7.36</gav> <url>https://raw.githubusercontent.com/qos-ch/slf4j/v_1.7.36/LICENSE.txt</url> @@ -718,6 +722,7 @@ <aliasUrl>http://www.opensource.org/licenses/mit-license.php</aliasUrl> <aliasUrl>http://opensource.org/licenses/MIT</aliasUrl> <aliasUrl>https://raw.githubusercontent.com/AzureAD/microsoft-authentication-library-for-java/v1.13.8/LICENSE</aliasUrl> + <aliasUrl>https://raw.githubusercontent.com/AzureAD/microsoft-authentication-library-for-java/v1.16.1/LICENSE</aliasUrl> <aliasUrl>https://raw.githubusercontent.com/AzureAD/microsoft-authentication-extensions-for-java/master/LICENSE</aliasUrl> </aliasUrls> </license> diff --git a/asterixdb/src/main/appended-resources/supplemental-models.xml b/asterixdb/src/main/appended-resources/supplemental-models.xml index 1717ba630a..cd80e3f3cb 100644 --- a/asterixdb/src/main/appended-resources/supplemental-models.xml +++ b/asterixdb/src/main/appended-resources/supplemental-models.xml @@ -775,8 +775,8 @@ <groupId>com.microsoft.azure</groupId> <artifactId>msal4j</artifactId> <properties> - <license.ignoreMissingEmbeddedLicense>1.14.0</license.ignoreMissingEmbeddedLicense> - <license.ignoreMissingEmbeddedNotice>1.14.0</license.ignoreMissingEmbeddedNotice> + <license.ignoreMissingEmbeddedLicense>1.16.1</license.ignoreMissingEmbeddedLicense> + <license.ignoreMissingEmbeddedNotice>1.16.1</license.ignoreMissingEmbeddedNotice> </properties> </project> </supplement> @@ -787,9 +787,9 @@ <groupId>com.microsoft.azure</groupId> <artifactId>msal4j-persistence-extension</artifactId> <properties> - <license.ignoreMissingEmbeddedLicense>1.2.0</license.ignoreMissingEmbeddedLicense> - <license.ignoreMissingEmbeddedNotice>1.2.0</license.ignoreMissingEmbeddedNotice> - <license.ignoreLicenseOverride>1.2.0</license.ignoreLicenseOverride> + <license.ignoreMissingEmbeddedLicense>1.3.0</license.ignoreMissingEmbeddedLicense> + <license.ignoreMissingEmbeddedNotice>1.3.0</license.ignoreMissingEmbeddedNotice> + <license.ignoreLicenseOverride>1.3.0</license.ignoreLicenseOverride> </properties> </project> </supplement> @@ -2217,9 +2217,9 @@ <groupId>com.github.luben</groupId> <artifactId>zstd-jni</artifactId> <properties> - <license.ignoreMissingEmbeddedLicense>1.5.0-1,1.5.5-1</license.ignoreMissingEmbeddedLicense> - <license.ignoreMissingEmbeddedNotice>1.5.0-1,1.5.5-1</license.ignoreMissingEmbeddedNotice> - <license.ignoreLicenseOverride>1.5.0-1,1.5.5-1</license.ignoreLicenseOverride> + <license.ignoreMissingEmbeddedLicense>1.5.0-1,1.5.5-1,1.5.6-2</license.ignoreMissingEmbeddedLicense> + <license.ignoreMissingEmbeddedNotice>1.5.0-1,1.5.5-1,1.5.6-2</license.ignoreMissingEmbeddedNotice> + <license.ignoreLicenseOverride>1.5.0-1,1.5.5-1,1.5.6-2</license.ignoreLicenseOverride> </properties> </project> </supplement> diff --git a/asterixdb/src/main/licenses/content/raw.githubusercontent.com_luben_zstd-jni_v1.5.6-2_LICENSE.txt b/asterixdb/src/main/licenses/content/raw.githubusercontent.com_luben_zstd-jni_v1.5.6-2_LICENSE.txt new file mode 100644 index 0000000000..7bdccb6a9c --- /dev/null +++ b/asterixdb/src/main/licenses/content/raw.githubusercontent.com_luben_zstd-jni_v1.5.6-2_LICENSE.txt @@ -0,0 +1,26 @@ +Zstd-jni: JNI bindings to Zstd Library + +Copyright (c) 2015-present, Luben Karavelov/ All rights reserved. + +BSD License + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file
