diff options
author | Bernard Gorman <bernard.gorman@gmail.com> | 2018-03-21 21:08:20 +0000 |
---|---|---|
committer | Bernard Gorman <bernard.gorman@gmail.com> | 2018-03-22 03:36:43 +0000 |
commit | 40d59f4bc8eec0fc585edec0f2c8833f09a4a853 (patch) | |
tree | f5654a7274c4925ad3be8d46e305f8478894c445 /buildscripts | |
parent | b7178eca18c1a56b05eb206fa9d202345c128df5 (diff) | |
download | mongo-40d59f4bc8eec0fc585edec0f2c8833f09a4a853.tar.gz |
SERVER-14900 Log operations that exceed slowMs on mongoS
Diffstat (limited to 'buildscripts')
-rw-r--r-- | buildscripts/idl/idl/generator.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/buildscripts/idl/idl/generator.py b/buildscripts/idl/idl/generator.py index c76cae52e15..3433ecde702 100644 --- a/buildscripts/idl/idl/generator.py +++ b/buildscripts/idl/idl/generator.py @@ -1098,7 +1098,16 @@ class _CppSourceFileWriter(_CppFileWriterBase): ast.Command) and struct.namespace != common.COMMAND_NAMESPACE_IGNORED: if struct.namespace == common.COMMAND_NAMESPACE_TYPE: cpp_type_info = cpp_types.get_cpp_type(struct.command_field) - self._writer.write_line('%s localCmdType;' % (cpp_type_info.get_storage_type())) + + if struct.command_field.cpp_type and cpp_types.is_primitive_scalar_type( + struct.command_field.cpp_type): + self._writer.write_line('%s localCmdType(%s);' % + (cpp_type_info.get_storage_type(), + cpp_types.get_primitive_scalar_type_default_value( + struct.command_field.cpp_type))) + else: + self._writer.write_line('%s localCmdType;' % + (cpp_type_info.get_storage_type())) self._writer.write_line('%s object(localCmdType);' % (common.title_case(struct.cpp_name))) elif struct.namespace == common.COMMAND_NAMESPACE_CONCATENATE_WITH_DB: |