Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-813

Enormous bloom filters create fails

    • Type: Icon: Task Task
    • Resolution: Done
    • WT2.1
    • Affects Version/s: None
    • Component/s: None
    • None

      If you insert more than 4 billion records into a bloom filter, it is possible to get an error:

      [1387236931:360057][5093:00f77f1ee07f0000], file:dbbench_wt-001492.bf, cursor.insert: Bulk bitmap load not aligned on a byte boundary: Invalid argument
      

      The code that is broken is in src/bloom/bloom.c:

      		/*
      		 * Shave off some bytes for pure paranoia, in case WiredTiger
      		 * reserves some special sizes. Choose a value so that if
      		 * we do multiple inserts, it will be on an byte boundary.
      		 */
      		values.size = (uint32_t)WT_MIN(bloom->m - i, UINT32_MAX - 128);
      		c->set_value(c, &values);
      		WT_ERR(c->insert(c));
      

      The UINT32_MAX - 128 value isn't a multiple of 8.

            Assignee:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Reporter:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: