Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-228

when saving file with gridfs, if the size is aligned with 256KB, then driver saves an extra chunk at the end with empty array

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4
    • Affects Version/s: None
    • Component/s: None
    • None

      in GridFSInputFile.java, the loop creating chunks only ends when:
      ...
      if ( start < b.length )
      break;
      ...

      But it should also check if total == file length.
      Right now it does an extra loop.

            Assignee:
            antoine Antoine Girbal
            Reporter:
            antoine Antoine Girbal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: