Skip to content

The Size() method of the GCS writer object returns inconsistent values

While working on Azure driver retries code, I noticed that the Writer interface behaviour is inconsistent for GCE. The Size() method of the Writer objects for all drivers except GCS returns the number of bytes written to it/size of the underlying blob. For GCS the size becomes consistent only after a call to Commit.

I went superficially through the code and I haven't seen a place where this could be a problem, but I think this is a foot-gun just waiting to happen.

Edited by Pawel Rozlach