Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-1527

Mongoreplay creating empty playback file on OS X

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 3.4.0-rc2
    • Fix Version/s: None
    • Component/s: mongoreplay
    • Labels:
      None
    • Environment:
      OS X El Capitan

      Description

      Hi,

      I've ran mongoreplay with the following flags:

      mongoreplay record -i lo0 -e "port 40000" -p ./playback.bson -vvvvv -ddd
      

      In another thread, I've inserted 100K objects via the shell.

      Then, I've used CTRL+C to terminate the mongoreplay process, and the playback file was emptied.

      The following debug lines were output:

      2016/11/06 12:27:53 Assembling TCP layer
      2016/11/06 12:27:53 Assembling TCP layer
      2016/11/06 12:27:53 Assembling TCP layer
      2016/11/06 12:27:53 Assembling TCP layer
      2016/11/06 12:27:53 stream 2 Connection 2: finishing
      2016/11/06 12:27:53 stream 3 Connection 3: finishing
      2016/11/06 12:27:54 processed packet   22695 with timestamp 2016-11-06T12:27:53+02:00
      2016/11/06 12:27:55 processed packet   22695 with timestamp 2016-11-06T12:27:53+02:00
      2016/11/06 12:27:56 processed packet   22695 with timestamp 2016-11-06T12:27:53+02:00
      ^C2016/11/06 12:27:56 Got signal interrupt, closing PCAP handle
      2016/11/06 12:27:56 Dropped 0 packets out of 22695
      2016/11/06 12:27:56 Processed 466.2253553329299 packets per second
      2016/11/06 12:27:56 flushing assembler.
      2016/11/06 12:27:56 num flushed/closed: 0
      2016/11/06 12:27:56 closing stream handler.
      2016/11/06 12:27:56 PCAP stats: &pcap.Stats{PacketsReceived:38667, PacketsDropped:0, PacketsIfDropped:0}
      2016/11/06 12:27:56 Created packet buffer size 1000
      2016/11/06 12:27:56 Opening playback file ./playback.bson
      ^C2016/11/06 12:27:59 Got signal interrupt, closing PCAP handle
      2016/11/06 12:27:59 Dropped 0 packets out of 0
      2016/11/06 12:27:59 Processed 0 packets per second
      2016/11/06 12:27:59 flushing assembler.
      2016/11/06 12:27:59 num flushed/closed: 0
      2016/11/06 12:27:59 closing stream handler.
      2016/11/06 12:27:59 PCAP stats: &pcap.Stats{PacketsReceived:1656, PacketsDropped:0, PacketsIfDropped:0}
      

      It seems that the tool flushes it's buffer after reaching to a certain size.
      When I've violently killed mongoreplay using kill -9, the file wasn't emptied.

      Regards,
      Tomer

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gabriel.russell Gabriel Russell (Inactive)
              Reporter:
              tomer.yakir Tomer Yakir
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: