summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-04-15 14:30:25 -0400
committerKeith Bostic <keith@wiredtiger.com>2015-04-15 14:30:25 -0400
commitf75adfa400cfe49abbb8d7d066986fae71b99dbd (patch)
treea1b99e11db02d5e4847db94c5b8464e68ae5daf1 /dist
parentc4fd5d8eb50897e10116a77a10a0ed180202c94e (diff)
parentf971484571335942e28e73e32b9dbc8ddf341470 (diff)
downloadmongo-f75adfa400cfe49abbb8d7d066986fae71b99dbd.tar.gz
Merge branch 'develop' into validate-configuration-string
Diffstat (limited to 'dist')
-rw-r--r--dist/api_config.py35
-rw-r--r--dist/api_data.py10
-rw-r--r--dist/dist.py4
-rw-r--r--dist/filelist1
-rw-r--r--dist/s_define.list1
-rw-r--r--dist/s_string.ok4
6 files changed, 37 insertions, 18 deletions
diff --git a/dist/api_config.py b/dist/api_config.py
index 47148650940..aacf5d1f7a0 100644
--- a/dist/api_config.py
+++ b/dist/api_config.py
@@ -54,7 +54,8 @@ def typedesc(c):
desc += ' of strings'
return desc
-def parseconfig(c, name_indent=''):
+def parseconfig(c, method_name, name_indent=''):
+ c.method_name = method_name
ctype = gettype(c)
desc = whitespace_re.sub(' ', c.desc.strip())
desc = desc.strip('.') + '.'
@@ -73,7 +74,8 @@ def parseconfig(c, name_indent=''):
output = '@config{' + ', '.join((name, desc, tdesc)) + '}\n'
if ctype == 'category':
for subc in sorted(c.subconfig):
- output += parseconfig(subc, name_indent + ('&nbsp;' * 4))
+ output += parseconfig(subc, method_name, \
+ name_indent + ('&nbsp;' * 4))
output += '@config{ ),,}\n'
return output
@@ -140,7 +142,7 @@ for line in open(f, 'r'):
lastname = name
if 'undoc' in c.flags:
continue
- output = parseconfig(c)
+ output = parseconfig(c, config_name)
for l in w.wrap(output):
tfile.write(prefix + l.replace('\n', '\n' + prefix) + '\n')
@@ -160,10 +162,13 @@ tfile.write('''/* DO NOT EDIT: automatically built by dist/api_config.py. */
#include "wt_internal.h"
''')
-# Make a TextWrapper that can wrap at commas.
+# Make a TextWrapper that wraps at commas.
w = textwrap.TextWrapper(width=64, break_on_hyphens=False)
w.wordsep_re = w.wordsep_simple_re = re.compile(r'(,)')
+# TextWrapper that wraps at whitespace.
+ws = textwrap.TextWrapper(width=64, break_on_hyphens=False)
+
def checkstr(c):
'''Generate the function reference and JSON string used by __wt_config_check
to validate the config string'''
@@ -202,26 +207,34 @@ def get_default(c):
return ''
created_subconfigs=set()
-def add_subconfig(c):
- if c.name in created_subconfigs:
+def add_subconfig(c, cname):
+ if cname in created_subconfigs:
return
- created_subconfigs.add(c.name)
+ created_subconfigs.add(cname)
tfile.write('''
-static const WT_CONFIG_CHECK confchk_%(name)s_subconfigs[] = {
+%(name)s[] = {
\t%(check)s
\t{ NULL, NULL, NULL, NULL, NULL, 0 }
};
''' % {
- 'name' : c.name,
+ 'name' : '\n '.join(ws.wrap(\
+ 'static const WT_CONFIG_CHECK confchk_' + cname + '_subconfigs')),
'check' : '\n\t'.join(getconfcheck(subc) for subc in sorted(c.subconfig)),
})
+def getcname(c):
+ '''Return the C name of a sub configuration'''
+ prefix = c.method_name.replace('.', '_') + '_' \
+ if hasattr(c, 'method_name') else ''
+ return prefix + c.name
+
def getsubconfigstr(c):
'''Return a string indicating if an item has sub configuration'''
ctype = gettype(c)
if ctype == 'category':
- add_subconfig(c)
- return 'confchk_' + c.name + '_subconfigs, ' + str(len(c.subconfig))
+ cname = getcname(c)
+ add_subconfig(c, cname)
+ return 'confchk_' + cname + '_subconfigs, ' + str(len(c.subconfig))
else:
return 'NULL, 0'
diff --git a/dist/api_data.py b/dist/api_data.py
index a31e5e5ed10..792411241f0 100644
--- a/dist/api_data.py
+++ b/dist/api_data.py
@@ -1,9 +1,8 @@
# This file is a python script that describes the WiredTiger API.
class Method:
- def __init__(self, config, **flags):
+ def __init__(self, config):
self.config = config
- self.flags = flags
class Config:
def __init__(self, name, default, desc, subconfig=None, **flags):
@@ -372,12 +371,15 @@ connection_runtime_config = [
Config('file_manager', '', r'''
control how file handles are managed''',
type='category', subconfig=[
+ Config('close_handle_minimum', '250', r'''
+ number of handles open before the file manager will look for handles
+ to close''', min=0),
Config('close_idle_time', '30', r'''
amount of time in seconds a file handle needs to be idle
- before attempting to close it''', min=1, max=1000),
+ before attempting to close it''', min=1, max=100000),
Config('close_scan_interval', '10', r'''
interval in seconds at which to check for files that are
- inactive and close them''', min=1, max=1000)
+ inactive and close them''', min=1, max=100000),
]),
Config('lsm_manager', '', r'''
configure database wide options for LSM tree management''',
diff --git a/dist/dist.py b/dist/dist.py
index 2ea088ba3f1..1b3ad828dfb 100644
--- a/dist/dist.py
+++ b/dist/dist.py
@@ -10,6 +10,10 @@ def source_files(skip_includes=False):
for line in open('filelist', 'r'):
if file_re.match(line):
yield os.path.join('..', line.rstrip())
+ # Return only the Windows-specific files in the Windows filelist
+ for line in open('../build_win/filelist.win', 'r'):
+ if 'os_win' in line and file_re.match(line):
+ yield os.path.join('..', line.rstrip())
for line in open('extlist', 'r'):
if file_re.match(line):
yield os.path.join('..', line.rstrip())
diff --git a/dist/filelist b/dist/filelist
index ee70ccf765e..ac3f29ad7ab 100644
--- a/dist/filelist
+++ b/dist/filelist
@@ -157,7 +157,6 @@ src/support/hash_fnv.c
src/support/hazard.c
src/support/hex.c
src/support/huffman.c
-src/support/mutex.c
src/support/pow.c
src/support/rand.c
src/support/scratch.c
diff --git a/dist/s_define.list b/dist/s_define.list
index 4924a1935ae..2a6581cf880 100644
--- a/dist/s_define.list
+++ b/dist/s_define.list
@@ -44,7 +44,6 @@ WT_PACKED_STRUCT_BEGIN
WT_PACKED_STRUCT_END
WT_READ_BARRIER
WT_REF_SIZE
-WT_SPINLOCK_MAX
WT_STAT_ATOMIC_DECR
WT_STAT_ATOMIC_DECRV
WT_STAT_ATOMIC_INCR
diff --git a/dist/s_string.ok b/dist/s_string.ok
index 5543fe0470d..9d50c1b5dab 100644
--- a/dist/s_string.ok
+++ b/dist/s_string.ok
@@ -89,7 +89,7 @@ Eron
FALLTHROUGH
FH
FLD
-FLS
+FLSv
FNV
FORALL
FOREACH
@@ -289,6 +289,7 @@ WiredTigerTmplog
WiredTigerTxn
WithSeeds
Wuninitialized
+Wunused
XP
abcdef
abcdefghijklmnopqrstuvwxyz
@@ -874,6 +875,7 @@ usr
utf
util
uu
+vW
va
valuep
valuev