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

validating configuration values

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.5.3
    • Labels:

      Description

      @agorrod, Sue Loverso @michaelcahill: I was thinking a bit more about WT-1536 and WT-1739 today, and thought something like this change might improve things.

      In short, you can specify a function in dist/api_dist.py that is subsequently called to validate configuration values. The only values I implemented were huffman_key and huffman_value, as a proof-of-concept, but it could certainly apply to other configuration values like block_compressor, or collator.

      As I said, I think this makes things better, but it doesn't solve all of the hard cases. For example, I can't think of any reasonable way to catch:

      self.session.create('table:xxx', 'type=lsm,lsm=(bloom_config=(columns=(FOO,BAR)))')
      

      without actually creating the underlying files when the LSM tree is created.

      If session.create is the real problem here: we could probably figure out a way to execute the full session.create path without actually creating the file. It wouldn't be pretty, but as I said, if session.create is the real problem, that might be another way to attack it.

      In WT-1536, agorrod commented:
      > Could we consider splitting out configuration validation from the various open methods?

      and after poking around this morning, I'm much less optimistic that would be possible – catching the above error without actually creating the file (or at least, pretending to create the file), seems almost impossible to me.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                keith.bostic Keith Bostic
                Reporter:
                keith.bostic Keith Bostic
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: