[ 
https://issues.apache.org/jira/browse/AVRO-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiruvalluvan M. G. updated AVRO-1742:
--------------------------------------
    Component/s: csharp

> Avro C# DataFileWriter Flush() does not flush the buffer to disk
> ----------------------------------------------------------------
>
>                 Key: AVRO-1742
>                 URL: https://issues.apache.org/jira/browse/AVRO-1742
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: csharp
>            Reporter: Mika Ristimaki
>            Priority: Minor
>
> In C# DataFileWriter.Flush() is implemented as 
> {code}
> public void Flush()
>         {
>             EnsureHeader();
>             Sync();
>         }
> {code}
> Is this by Avro spec or is this a bug. So should calling 
> DataFileWriter.Flush() just start a new Sync block  and not flush the file to 
> disc?
> In Java the implementation is
> {code}
>  @Override
>   public void flush() throws IOException {
>     sync();
>     vout.flush();
>   }
> {code}
> where vout is a BinaryEncoder. So I think the correct implementation in C# is
> {code}
> public void Flush()
>         {
>             EnsureHeader();
>             Sync();
>            _encoder.Flush()
>         }
> {code}
> If someone can confirm my suspicion I'll try to contribute a fix in the near 
> future.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to