Mika Ristimaki created AVRO-1742:
------------------------------------

             Summary: Avro C# DataFileWriter Flush() does not flush the buffer 
to disk
                 Key: AVRO-1742
                 URL: https://issues.apache.org/jira/browse/AVRO-1742
             Project: Avro
          Issue Type: Bug
            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
(v6.3.4#6332)

Reply via email to