Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.36k stars 2k forks source link

[BUG] StorageInputStream::reset function throw Stream mark expired. when invoking reset method #43180

Open ihudedi opened 1 day ago

ihudedi commented 1 day ago

Hi I am using azure storage version 12.28.1 (azure storage common version 12.27.1) When try to use inputstream used by blobClient.openInputStream we got inputstream from type StorageInputStream Calling to reset of this stream throw "Stream mark expired" Attached content of the reset method. public synchronized void reset() { if (this.markedPosition + this.markExpiry < this.currentAbsoluteReadPosition) { throw LOGGER.logExceptionAsError(new RuntimeException(MARK_EXPIRED)); } this.reposition(this.markedPosition); }

Could you please let me know what needs to be done that reset should be work. I am using another code that invoke the reset method Thanks, Itay

joshfree commented 22 hours ago

Hi @ihudedi could you please include the full call stack (similar to https://github.com/Azure/azure-sdk-for-java/issues/31924) so that the storage team may better assist you?

/cc @ibrahimrabab