PRODUCTS

KEYWORDS

DumboDB Log Filters: A New Way to Query Your Data's History

DumboDB Logo

DumboDB is one of four version-controlled databases developed by DoltHub. It is a document database that allows users to branch and merge their data just as they would with their source code.

Today, I’m excited to announce a new feature for DumboDB: Log Filters! The 0.2.2 release allows you to query your data’s history in a very expressive way. Let’s dig in!

Setup#

To follow along with the examples in this post, you are going to need some “data”. I simulated a small database consisting of three collections: products, customers, and orders. The idea is that you have a small e-commerce shop, and you want to be able to see the history of changes to your data.

The schema should be somewhat self-explanatory:

  1. Products Collection
  {
    _id:         ObjectId,
    description: string,      // e.g. "Standard Widget", "Deluxe Gizmo", "Mini Doodad"
    price:       double,      // e.g. 19.99
    promotions:  [ string ]   // e.g. ["CLEARANCE"] — typically empty.
  }
  1. Customers Collection
  {
    _id:   ObjectId,
    name:  string,   // Fullname, e.g. "Maria Gomez"
    phone: string    // e.g. "555-0102" - who needs areacodes anyway?
  }
  1. Orders Collection
  {
    _id:        ObjectId,
    orderNo:    int,       // human-facing order number, 1001..1050
    customerId: ObjectId,  // -> customers._id
    productId:  ObjectId,  // -> products._id
    status:     string     // lifecycle state
  }

The test data was generated using a simple script found here. This script is not necessary for you to follow along with the examples, but if you want to generate your own data, feel free to use it. What it does is create a new DumboDB database, add the three collections, and then populate them with some initial data. After that, it makes a series of commits to the database, each of which modifies one or more documents in one or more collections.

The history in the resulting database is linear - one change on top of another. The 150 commits do things like alter product prices, add promotions, change customer phone numbers, and update order statuses. The intention of this sample data is to demonstrate how you can use log filters to query the history of your data. The data in this case is somewhat arbitrary, but I think you’ll get the idea.

For the examples below, we will be connected to the database using the mongosh shell. All examples use the shop@main branch, like this:

$ mongosh 'mongodb://localhost:27017/'
[...snip...]
------
   The server generated these startup warnings when booting
   2026-06-22T18:42:46.467Z: Powered by DumboDB v0.2.2.
   2026-06-22T18:42:46.467Z: Star Us! https://github.com/dolthub/dumbodb
------
test> db = db.getSiblingDB("shop@main")
shop@main
shop@main>

Introducing the filters Argument#

The dumboLog command has a new optional argument called filters. This argument takes an array of filter objects, each of which is treated as an OR condition. Each filter object’s type influences how it is used:

  • String — a collection name; matches any commit that touched that collection.
  • Object ({ collectionFoo: [someId, ...] }) — the key is the collection name, and the value is an _id (or an array of _ids). This form matches commits that touched the specified document(s).
  • Object with $match ({ collectionFoo: { $match: { someField: "someValue" } } }) — a richer query; matches commits by applying the $match query to the diff of the commit to its parent. This form can be used to express complex AND and OR conditions on the fields of a document, including regular expressions, date/value ranges, and more.

For the complete documentation on log filters, see the DumboDB docs.

Collection Filtering#

The most basic use of log filters is to filter by collection. Collection filtering is analogous to filtering changes to a given file in Git. Dolt supports this as well, using the dolt_history_${table} system table to see the history of changes to a given table.

For example, if we want to see all the commits that touched the customers collection, we can do that like this:

db.runCommand({ dumboLog: 1, filters: ["customers"], patch: true})

The patch: true argument is optional, but it is useful to see the actual changes made in each commit. The output of the command is fairly verbose because it’s intended to be machine-readable, but here is a snippet of the output:

shop@main> db.runCommand({ dumboLog: 1, filters: ["customers"], patch: true})
{
  commits: [
    {
      commitId: '6bohbonb80vg7sf8coupdm5trej12ec3',
      parent1: '3q029cqpeuf9cjpsuptbj8dq09aan4h9',
      message: 'Maria Gomez updates phone number',
      timestamp: ISODate('2026-06-23T17:21:20.254Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.254Z'),
      diff: [
        {
          name: 'customers',   // `customers` ONLY because of the filter
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3aa'),
              diff: [
                { type: 'modified',
                  path: '$.phone',   // The `phone` field was changed
                  from: '555-0203',
                  to: '555-0205' }
              ]
[...snip...]
Click to see the full result
{
commits: [
  {
    commitId: '6bohbonb80vg7sf8coupdm5trej12ec3',
    parent1: '3q029cqpeuf9cjpsuptbj8dq09aan4h9',
    message: 'Maria Gomez updates phone number',
    timestamp: ISODate('2026-06-23T17:21:20.254Z'),
    author: 'Dana <dana@shop.example>',
    committer: 'Dana <dana@shop.example>',
    committerTimestamp: ISODate('2026-06-23T17:21:20.254Z'),
    diff: [
      {
        name: 'customers',
        status: 'modified',
        added: [],
        removed: [],
        modified: [
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3aa'),
            diff: [
              { type: 'modified', path: '$.phone', from: '555-0203', to: '555-0205' }
            ]
          }
        ],
        addedIndexes: [],
        modifiedIndexes: [],
        removedIndexes: []
      }
    ]
  },
  {
    commitId: '2pk4f3ig89ci8e2pjli4du6nef736ago',
    parent1: '3u1d603fal9gcaogkmstrnb4lta8quv3',
    message: 'Maria Gomez updates phone number',
    timestamp: ISODate('2026-06-23T17:21:20.212Z'),
    author: 'Dana <dana@shop.example>',
    committer: 'Dana <dana@shop.example>',
    committerTimestamp: ISODate('2026-06-23T17:21:20.212Z'),
    diff: [
      {
        name: 'customers',
        status: 'modified',
        added: [],
        removed: [],
        modified: [
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3aa'),
            diff: [
              { type: 'modified', path: '$.phone', from: '555-0201', to: '555-0203' }
            ]
          }
        ],
        addedIndexes: [],
        modifiedIndexes: [],
        removedIndexes: []
      }
    ]
  },
  {
    commitId: 'vskqqjdbku8l91u1ctcvup05883h48kq',
    parent1: '0ip2fi4vlrgeh1kpquvvak8k343mtg2q',
    message: 'Maria Gomez updates phone number',
    timestamp: ISODate('2026-06-23T17:21:20.170Z'),
    author: 'Dana <dana@shop.example>',
    committer: 'Dana <dana@shop.example>',
    committerTimestamp: ISODate('2026-06-23T17:21:20.170Z'),
    diff: [
      {
        name: 'customers',
        status: 'modified',
        added: [],
        removed: [],
        modified: [
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3aa'),
            diff: [
              { type: 'modified', path: '$.phone', from: '555-0102', to: '555-0201' }
            ]
          }
        ],
        addedIndexes: [],
        modifiedIndexes: [],
        removedIndexes: []
      }
    ]
  },
  {
    commitId: 'fre23ok3eiobap4up412abvtb2rbmfnt',
    parent1: '42cqg3g72onkdp3tcis0p8odlugrf0nk',
    message: 'Register customers (batch 2/2)',
    timestamp: ISODate('2026-06-23T17:21:18.137Z'),
    author: 'Dana <dana@shop.example>',
    committer: 'Dana <dana@shop.example>',
    committerTimestamp: ISODate('2026-06-23T17:21:18.137Z'),
    diff: [
      {
        name: 'customers',
        status: 'modified',
        added: [
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3b7'),
            name: 'Ian Clark',
            phone: '555-0115'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3b5'),
            name: 'Diego Garcia',
            phone: '555-0113'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3b4'),
            name: 'Mei Lin',
            phone: '555-0112'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3b6'),
            name: 'Fatima Ali',
            phone: '555-0114'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3b3'),
            name: 'Ravi Kumar',
            phone: '555-0111'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3b2'),
            name: 'Ava Johnson',
            phone: '555-0110'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3b8'),
            name: 'Lena Novak',
            phone: '555-0116'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3b9'),
            name: 'Pavel Petrov',
            phone: '555-0117'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3ba'),
            name: 'Zara Khan',
            phone: '555-0118'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3bb'),
            name: 'Ken Sato',
            phone: '555-0119'
          }
        ],
        removed: [],
        modified: [],
        addedIndexes: [],
        modifiedIndexes: [],
        removedIndexes: []
      }
    ]
  },
  {
    commitId: '42cqg3g72onkdp3tcis0p8odlugrf0nk',
    parent1: 'ifkda1ik88o9ctls78v584pvku5pnmn4',
    message: 'Register customers (batch 1/2)',
    timestamp: ISODate('2026-06-23T17:21:18.076Z'),
    author: 'Dana <dana@shop.example>',
    committer: 'Dana <dana@shop.example>',
    committerTimestamp: ISODate('2026-06-23T17:21:18.076Z'),
    diff: [
      {
        name: 'customers',
        status: 'added',
        added: [
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3b0'),
            name: 'Yuki Tanaka',
            phone: '555-0108'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3af'),
            name: 'Tom Nguyen',
            phone: '555-0107'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3a9'),
            name: 'Bob Ramirez',
            phone: '555-0101'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3aa'),
            name: 'Maria Gomez',
            phone: '555-0102'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3ae'),
            name: 'Sara Lopez',
            phone: '555-0106'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3ac'),
            name: 'Priya Patel',
            phone: '555-0104'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3a8'),
            name: 'Alice Chen',
            phone: '555-0100'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3b1'),
            name: 'Noah Smith',
            phone: '555-0109'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3ab'),
            name: 'Liang Wei',
            phone: '555-0103'
          },
          {
            _id: ObjectId('6a3ac08ee009f42b3e47e3ad'),
            name: 'Omar Hassan',
            phone: '555-0105'
          }
        ],
        removed: [],
        modified: [],
        addedIndexes: [],
        modifiedIndexes: [],
        removedIndexes: []
      }
    ]
  }
],
ok: 1
}

There are four additional commits in the output, which you can see if you expand the results. The important thing to note is that all of the commits in the output touched the customers collection. You can use the stat and patch arguments to control the amount of information returned for each commit.

This log will include every commit which altered the customers collection. Other collections may be altered in the same commit, but stat and patch will only show the changes related to the customers collection.

_id Filtering#

While collection filtering is analogous to filtering changes to a given file in Git, _id filtering is analogous to filtering changes to a specific line in a file. Documents in DumboDB are analogous to rows in a Dolt SQL table, and the _id field is analogous to the primary key. To see the history of changes to a specific document, you can use log filters to do that.

Document IDs, or _id fields, are the immutable key for each document. In our case we’re using generated ObjectIDs. Given a particular orderNo, for example from a customer support ticket, first find the corresponding _id:

shop@main> db.orders.findOne({ orderNo: 1001 })
{
  _id: ObjectId('6a3970321ba8adaa27985ca0'),          // This is the _id we want to filter on.
  customerId: ObjectId('6a3970321ba8adaa27985c8e'),
  orderNo: 1001,
  productId: ObjectId('6a3970311ba8adaa27985c6f'),
  status: 'complete'
}

One option would be to capture that _id in a variable, then use that variable in the log filter. Alternatively you can embed the findOne query directly in the log filter, like this:

shop@main> db.runCommand({ 
  dumboLog: 1, 
  patch: true,
  filters:
  [ 
    { orders: db.orders.findOne({ orderNo: 1001 })._id } // Every document has an '_id' field, no risk of nil reference here.
  ] 
})

The first commit shows the last operation on this particular order, which was to change the status from shipped to complete. Here’s a snippet of the output:

    modified: [ {
      _id: ObjectId('6a3ac08ee009f42b3e47e3bc'),
      diff: [
        { type: 'modified',
          path: '$.status',
          from: 'shipped',
          to: 'complete'
        } ]
    } ],

There are many more details, including the commit ID, timestamp, author, and so forth. It’s a little hard to show all of the output here, but you can see the full result by expanding the snippet below.

Click to see the full result
{
  commits: [
    {
      commitId: 'bmmpdv3iq1q0rvc7kohc6143pb9kaun5',
      parent1: 'dkd8esuef6aq2k55r2enknjfr4nhek03',
      message: 'Order #1001 -> complete',
      timestamp: ISODate('2026-06-23T17:21:19.625Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:19.625Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3bc'),
              diff: [
                { type: 'modified', path: '$.status', from: 'shipped', to: 'complete' }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: '3emvqiuj49khmd1bsu4tfrhjof8kfj6r',
      parent1: 'qi7hrjbse716qr2l9su11ggj8586l0qb',
      message: 'Order #1001 -> shipped',
      timestamp: ISODate('2026-06-23T17:21:19.537Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:19.537Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3bc'),
              diff: [
                { type: 'modified', path: '$.status', from: 'packed', to: 'shipped' }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'u0t1lp16n8op52oqqklmau9s3ovmpdgm',
      parent1: 'f7h4faj50030uc9j6dlp4cnihfvj3s2m',
      message: 'Order #1001 -> packed',
      timestamp: ISODate('2026-06-23T17:21:19.453Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:19.453Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3bc'),
              diff: [
                { type: 'modified', path: '$.status', from: 'confirmed', to: 'packed' }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'e3u57g5eri39csl4l9hllktd1quoufda',
      parent1: 'fk5erun3q67rci7lvfq0c1rg199kpm90',
      message: 'Order #1001 -> confirmed',
      timestamp: ISODate('2026-06-23T17:21:19.370Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:19.370Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3bc'),
              diff: [
                {
                  type: 'modified',
                  path: '$.status',
                  from: 'pending',
                  to: 'confirmed'
                }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'gltljstbop79bfmb9em62bt00r81bms9',
      parent1: 'fre23ok3eiobap4up412abvtb2rbmfnt',
      message: 'Place order #1001 (Maria Gomez / Standard Gadget)',
      timestamp: ISODate('2026-06-23T17:21:18.390Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:18.390Z'),
      diff: [
        {
          name: 'orders',
          status: 'added',
          added: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3bc'),
              customerId: ObjectId('6a3ac08ee009f42b3e47e3aa'),
              orderNo: 1001,
              productId: ObjectId('6a3ac08de009f42b3e47e38b'),
              status: 'pending'
            }
          ],
          removed: [],
          modified: [],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    }
  ],
  ok: 1
}

It’s possible to capture the commit logs for multiple _ids in a single query and from multiple collections as well. The filters argument takes an array of filter objects, and each filter object can specify a different collection and _id. For example, if you wanted to see the history of changes to multiple different orders, including changes to the customers collection, you could do that with array inputs:

shop@main> db.runCommand({ 
  dumboLog: 1, 
  filters:
  [ 
    { orders: [id1, id2, id3...] }
    { customers: [id4, id5, id6...] } 
  ] 
})

Passing in an array of _ids for a given collection will return all commits that touched any of those documents.

$match Filtering and the $changed Operator#

The examples shown so far are pretty straightforward - if a commit touches the entity in question, a collection or a document, it will be returned in the results. But what if you want to see only commits that changed a specific field or changed a field to a specific value? That’s where $match filtering comes in.

The $match operator is Mongo’s query language for more complex find() operations, and you can read about it in the MongoDB documentation. When used as a dumboLog filter, $match is applied to the diff of a commit to its parent. This is an important distinction, because $match is a powerful query operator that has been battle-tested in MongoDB for years. It allows you to express complex conditions on the fields of a document, including regular expressions, date/value ranges, and more. In the context of dumboLog, $match is applied to the diff of a commit to its parent, so if you need to query your history, having $match executed against the diff is a very powerful tool.

Here is an example where we want to see every commit that transitioned an order’s status field to cancelled. We can do that like this:

shop@main> db.runCommand({
  dumboLog: 1, 
  patch: true, 
  filters: [ 
    { orders: { $match: { status: "cancelled" } } } 
  ] 
})

I’ll spare you the output from here on out, since I think you get it. Expand the full results if you are curious.

Click to see the full result
{
  commits: [
    {
      commitId: 'mmirfd9vlbrdm0aug6jrkcopa29h0t6o',
      parent1: '4ui0b58iehn6sh79g6ftil4302dv310b',
      message: 'Cancel order #1035',
      timestamp: ISODate('2026-06-23T17:21:21.205Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:21.205Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3de'),
              diff: [
                {
                  type: 'modified',
                  path: '$.status',
                  from: 'confirmed',
                  to: 'cancelled'
                }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'dlib4alp3f2the87tgko8l7sv6qt5aen',
      parent1: 'adoqnvm1n13rn6s9ui1vj8p6sc47i0dm',
      message: 'Cancel order #1027',
      timestamp: ISODate('2026-06-23T17:21:21.082Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:21.082Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3d6'),
              diff: [
                {
                  type: 'modified',
                  path: '$.status',
                  from: 'confirmed',
                  to: 'cancelled'
                }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'nkrunrvt8jrdmj5qiau9ioetbjvnjedk',
      parent1: 'r0v8r74k6eu74fv5058fecshogbp2dc0',
      message: 'Cancel order #1019',
      timestamp: ISODate('2026-06-23T17:21:20.956Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.956Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3ce'),
              diff: [
                {
                  type: 'modified',
                  path: '$.status',
                  from: 'confirmed',
                  to: 'cancelled'
                }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'eq5g8fee1jj6bcap29uofb7gq0bm92hc',
      parent1: 'e0pc558bo2ugqvd2dmt1r376dlgdmqqs',
      message: 'Cancel order #1011',
      timestamp: ISODate('2026-06-23T17:21:20.844Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.844Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3c6'),
              diff: [
                {
                  type: 'modified',
                  path: '$.status',
                  from: 'confirmed',
                  to: 'cancelled'
                }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'ci3j8cgt5gao463057om7cl734enl90a',
      parent1: 'le04o1p5bcidba97jv5gijnq4us3kc59',
      message: 'Cancel order #1003',
      timestamp: ISODate('2026-06-23T17:21:20.744Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.744Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3be'),
              diff: [
                {
                  type: 'modified',
                  path: '$.status',
                  from: 'confirmed',
                  to: 'cancelled'
                }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'm4jh51sam39sedn21scpql2odkphgj39',
      parent1: '7379n78q6126qqfq6najge05ikc3tc85',
      message: 'Cancel order #1044',
      timestamp: ISODate('2026-06-23T17:21:20.645Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.645Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08fe009f42b3e47e3e7'),
              diff: [
                {
                  type: 'modified',
                  path: '$.status',
                  from: 'pending',
                  to: 'cancelled'
                }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 't9p124hni2n6ak7vg1jcfgjmsdqtp959',
      parent1: '117oevgpkc18bmtev6aqgbvil4jgmgh4',
      message: 'Cancel order #1037',
      timestamp: ISODate('2026-06-23T17:21:20.024Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.024Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3e0'),
              diff: [
                {
                  type: 'modified',
                  path: '$.status',
                  from: 'pending',
                  to: 'cancelled'
                }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'hvt732hr7ru3qfhg7hjf48j0mk46qfpg',
      parent1: 'n4pjqork9v23bo2k9srdnl8nrem0fkn5',
      message: 'Cancel order #1002',
      timestamp: ISODate('2026-06-23T17:21:19.948Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:19.948Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3bd'),
              diff: [
                { type: 'modified', path: '$.status', from: 'packed', to: 'cancelled' }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: '8mv9cp3l2pam0qq5cv8qal85m8v3l8jm',
      parent1: 'ds0v2rnlv57g7vq74sq8t74r13hu07vq',
      message: 'Cancel order #1030',
      timestamp: ISODate('2026-06-23T17:21:19.897Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:19.897Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3d9'),
              diff: [
                {
                  type: 'modified',
                  path: '$.status',
                  from: 'pending',
                  to: 'cancelled'
                }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'vdq1pe0dfrvv472osct0j6ljhuelefvi',
      parent1: '7tegbcjhohevgrs1dkv7df9qlp9d9tlo',
      message: 'Cancel order #1023',
      timestamp: ISODate('2026-06-23T17:21:19.777Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:19.777Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3d2'),
              diff: [
                {
                  type: 'modified',
                  path: '$.status',
                  from: 'pending',
                  to: 'cancelled'
                }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'd7knsldvokd14spoaamj3vicbkllb5o7',
      parent1: 'mloa4t5vgpi5ujn3cub44mj9jaa3e4mq',
      message: 'Cancel order #1016',
      timestamp: ISODate('2026-06-23T17:21:19.593Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:19.593Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3cb'),
              diff: [
                {
                  type: 'modified',
                  path: '$.status',
                  from: 'pending',
                  to: 'cancelled'
                }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'h4ttqgtj9gn9qnhs59tkvjt7omqs9rth',
      parent1: 't0dr8p51ci8fo7k6s3h0v6golt3rtors',
      message: 'Cancel order #1009',
      timestamp: ISODate('2026-06-23T17:21:19.482Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:19.482Z'),
      diff: [
        {
          name: 'orders',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08ee009f42b3e47e3c4'),
              diff: [
                {
                  type: 'modified',
                  path: '$.status',
                  from: 'pending',
                  to: 'cancelled'
                }
              ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    }
  ],
  ok: 1
}

This query will return all commits that changed the status field of any document in the orders collection involving the value cancelled. Specifically, if the value changed to or from cancelled, the commit will be returned in the results.

The $match operator can be used with any field, and you can use other operators like $eq (equal), $gt (greater than), $lt (less than), and many more to express complex conditions. For example, if you wanted to see all commits that changed the price field of any document in the products collection to or from a value greater than 50 and less than 100, you could do that like this:

shop@main> db.runCommand({ 
  dumboLog: 1,
  patch: true,
  filters: [ 
    { products: 
      { $match:
        { 
          $and: [ { price: { $gt: 50 } }, { price: { $lt: 100 } } ] 
        } 
      } 
    } 
  ]
})
Click to see the full result
{
  commits: [
    {
      commitId: 'psatprbk6n42n05bn8v2eqs163a7l4rh',
      parent1: 'e4nasbdld67av8j9m8tv27r0td13vge1',
      message: 'Reprice Standard Bracket to $150.00',
      timestamp: ISODate('2026-06-23T17:21:20.507Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.507Z'),
      diff: [
        {
          name: 'products',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e390'),
              diff: [ { type: 'modified', path: '$.price', from: 51.99, to: 150 } ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'e4nasbdld67av8j9m8tv27r0td13vge1',
      parent1: 'gumqhq8399mgp01ctu44f3j1o5mdcr5s',
      message: 'Reprice Mini Module to $64.00',
      timestamp: ISODate('2026-06-23T17:21:20.493Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.493Z'),
      diff: [
        {
          name: 'products',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e3a6'),
              diff: [ { type: 'modified', path: '$.price', from: 25.99, to: 64 } ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'gumqhq8399mgp01ctu44f3j1o5mdcr5s',
      parent1: 'qjje1mmedsc6o8oou2lepuc37tboun1t',
      message: 'Reprice Deluxe Gadget to $99.99',
      timestamp: ISODate('2026-06-23T17:21:20.479Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.479Z'),
      diff: [
        {
          name: 'products',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e395'),
              diff: [ { type: 'modified', path: '$.price', from: 86.99, to: 99.99 } ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'roql1gv5p50g2ttign22qiea617l6b6f',
      parent1: '87ekc5drbd1q9635ha6lehvijc9av5a0',
      message: 'Reprice Deluxe Valve to $88.88',
      timestamp: ISODate('2026-06-23T17:21:20.450Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.450Z'),
      diff: [
        {
          name: 'products',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e39b'),
              diff: [ { type: 'modified', path: '$.price', from: 128.99, to: 88.88 } ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: '87ekc5drbd1q9635ha6lehvijc9av5a0',
      parent1: 'o4u0nbapums1qu2bi7915egf8390pin4',
      message: 'Reprice Standard Module to $120.00',
      timestamp: ISODate('2026-06-23T17:21:20.436Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.436Z'),
      diff: [
        {
          name: 'products',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e392'),
              diff: [ { type: 'modified', path: '$.price', from: 65.99, to: 120 } ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'o4u0nbapums1qu2bi7915egf8390pin4',
      parent1: 'm1h1pjd20242fhkgjidtc0mfm8qf3imt',
      message: 'Reprice Mini Gizmo to $74.50',
      timestamp: ISODate('2026-06-23T17:21:20.423Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.423Z'),
      diff: [
        {
          name: 'products',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e3a0'),
              diff: [ { type: 'modified', path: '$.price', from: 163.99, to: 74.5 } ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'm8i4c715miv9ebtgkogv4l411noqkk5h',
      parent1: '6bohbonb80vg7sf8coupdm5trej12ec3',
      message: 'Reprice Deluxe Gasket to $59.99',
      timestamp: ISODate('2026-06-23T17:21:20.380Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.380Z'),
      diff: [
        {
          name: 'products',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e399'),
              diff: [ { type: 'modified', path: '$.price', from: 114.99, to: 59.99 } ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'a6kui87judhul4cdvgaj82nu3sc1qs7q',
      parent1: 'l998nhnbspiuntqq9sc50tuk23rmbre5',
      message: 'Seed product catalog (batch 2/3)',
      timestamp: ISODate('2026-06-23T17:21:17.805Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:17.805Z'),
      diff: [
        {
          name: 'products',
          status: 'modified',
          added: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e394'),
              description: 'Deluxe Widget',
              price: 79.99
            },
            {
              _id: ObjectId('6a3ac08de009f42b3e47e395'),
              description: 'Deluxe Gadget',
              price: 86.99
            },
            {
              _id: ObjectId('6a3ac08de009f42b3e47e396'),
              description: 'Deluxe Gizmo',
              price: 93.99
            }
          ],
          removed: [],
          modified: [],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'l998nhnbspiuntqq9sc50tuk23rmbre5',
      parent1: '9kqlm5dkanlniiivhamleh0raqlt73u4',
      message: 'Seed product catalog (batch 1/3)',
      timestamp: ISODate('2026-06-23T17:21:17.744Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:17.744Z'),
      diff: [
        {
          name: 'products',
          status: 'added',
          added: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e393'),
              description: 'Standard Sensor',
              price: 72.99
            },
            {
              _id: ObjectId('6a3ac08de009f42b3e47e392'),
              description: 'Standard Module',
              price: 65.99
            },
            {
              _id: ObjectId('6a3ac08de009f42b3e47e390'),
              description: 'Standard Bracket',
              price: 51.99
            },
            {
              _id: ObjectId('6a3ac08de009f42b3e47e391'),
              description: 'Standard Valve',
              price: 58.99
            }
          ],
          removed: [],
          modified: [],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    }
  ],
  ok: 1
}

This will return all commits that changed the price field of any document in the products collection to or from a value greater than 50 and less than 100. Remember that the $match operator is applied to the diff of a commit to its parent, so if a commit changed the price field from 49.99 to 50 or from 50 to 49.99, it would be returned in the results, since it changed the price field to or from a value greater than 50.

The final example leverages a new DumboDB-specific operator: $changed. This operator can be used in conjunction with $match to filter commits that changed a specific field, regardless of the value. For example, if you want to see all commits that changed the promotions field of any document in the products collection, you can do that like this:

shop@main> db.runCommand({ 
  dumboLog: 1,
  patch: true,
  filters: [ 
    { products: 
      { $match: 
        { promotions: 
          { $changed: true } 
        }
      }   
    }
  ] 
})
Click to see the full result
{
  commits: [
    {
      commitId: '3q029cqpeuf9cjpsuptbj8dq09aan4h9',
      parent1: '42l1rqlo2a22qq95g410hm2iqcg309kr',
      message: 'Promote Standard Gasket (FLASH25)',
      timestamp: ISODate('2026-06-23T17:21:20.240Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.240Z'),
      diff: [
        {
          name: 'products',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e38f'),
              diff: [ { type: 'added', path: '$.promotions', to: [ 'FLASH25' ] } ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: '42l1rqlo2a22qq95g410hm2iqcg309kr',
      parent1: '2pk4f3ig89ci8e2pjli4du6nef736ago',
      message: 'Promote Standard Cog (VIP20)',
      timestamp: ISODate('2026-06-23T17:21:20.226Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.226Z'),
      diff: [
        {
          name: 'products',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e38e'),
              diff: [ { type: 'added', path: '$.promotions', to: [ 'VIP20' ] } ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: '3u1d603fal9gcaogkmstrnb4lta8quv3',
      parent1: 'ronmp6i1sle0jojt2u92r5h775t3qk6s',
      message: 'Promote Standard Sprocket (BUNDLE5)',
      timestamp: ISODate('2026-06-23T17:21:20.198Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.198Z'),
      diff: [
        {
          name: 'products',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e38d'),
              diff: [ { type: 'added', path: '$.promotions', to: [ 'BUNDLE5' ] } ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: 'ronmp6i1sle0jojt2u92r5h775t3qk6s',
      parent1: 'vskqqjdbku8l91u1ctcvup05883h48kq',
      message: 'Promote Standard Gizmo (CLEARANCE)',
      timestamp: ISODate('2026-06-23T17:21:20.184Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.184Z'),
      diff: [
        {
          name: 'products',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e38c'),
              diff: [ { type: 'added', path: '$.promotions', to: [ 'CLEARANCE' ] } ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: '0ip2fi4vlrgeh1kpquvvak8k343mtg2q',
      parent1: '38qnh7fdjgbvmp09gf5ki5n52g6mlj8n',
      message: 'Promote Standard Gadget (BTS15)',
      timestamp: ISODate('2026-06-23T17:21:20.156Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.156Z'),
      diff: [
        {
          name: 'products',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e38b'),
              diff: [ { type: 'added', path: '$.promotions', to: [ 'BTS15' ] } ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    },
    {
      commitId: '38qnh7fdjgbvmp09gf5ki5n52g6mlj8n',
      parent1: 't9p124hni2n6ak7vg1jcfgjmsdqtp959',
      message: 'Promote Standard Widget (SUMMER10)',
      timestamp: ISODate('2026-06-23T17:21:20.141Z'),
      author: 'Dana <dana@shop.example>',
      committer: 'Dana <dana@shop.example>',
      committerTimestamp: ISODate('2026-06-23T17:21:20.141Z'),
      diff: [
        {
          name: 'products',
          status: 'modified',
          added: [],
          removed: [],
          modified: [
            {
              _id: ObjectId('6a3ac08de009f42b3e47e38a'),
              diff: [ { type: 'added', path: '$.promotions', to: [ 'SUMMER10' ] } ]
            }
          ],
          addedIndexes: [],
          modifiedIndexes: [],
          removedIndexes: []
        }
      ]
    }
  ],
  ok: 1
}

This will return all commits that changed the promotions field of any document in the products collection, regardless of the value.

More Goodies and Gaps#

There were a couple of other things added in this release that are worth mentioning. First, the dumboLog command now supports the all argument, which will start the walk of the commit DAG using all branch HEADs. This is useful when you want to see the history of a document across all branches, not just the current branch. Second, the dumboLog command now supports pagination. The command will return a next field in the output, which can be passed into a subsequent dumboLog command using the from argument. The default limit of commits is 20, so it’s very likely that you will get a pagination token. I’ll do a blog post on that in the future, I promise.

One gap in the current version is that there is no way to filter commits by the author, commit date, or any other commit metadata. This feature will come eventually, but it will come much faster if YOU ask for it! So try out DumboDB, and let us know how you would like to see it improved.

Want to learn more about Dolt and Dumbo? Hop on our Discord to ask questions and nerd out about version-controlled databases!