Skip to content

Commit

Permalink
Update to version v3.27.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MadSchemas committed Jul 9, 2024
1 parent 043c701 commit 07a1dff
Show file tree
Hide file tree
Showing 127 changed files with 2,652 additions and 1,709 deletions.
188 changes: 168 additions & 20 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,96 +3,244 @@ Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveBitFields:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveMacros:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveShortCaseStatements:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCaseColons: false
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowBreakBeforeNoexceptSpecifier: Never
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortCompoundRequirementOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterControlStatement: Never
AfterEnum: false
AfterExternBlock: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakAdjacentStringLiterals: true
BreakAfterAttributes: Leave
BreakAfterJavaFieldAnnotations: false
BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Attach
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakAfterJavaFieldAnnotations: false
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
ColumnLimit: 140
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: true
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
FixNamespaceComments: true
IncludeCategories:
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 1
SortPriority: 0
CaseSensitive: false
- Regex: '^<.*'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 3
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertBraces: false
InsertNewlineAtEOF: false
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
BinaryMinDigits: 0
Decimal: 0
DecimalMinDigits: 0
Hex: 0
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
KeepEmptyLinesAtEOF: false
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PackConstructorInitializers: NextLine
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakScopeResolution: 500
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
PPIndentWidth: -1
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: true
SortIncludes: true
RemoveBracesLLVM: false
RemoveParentheses: Leave
RemoveSemicolon: false
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SkipMacroDefinitionBody: false
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: Never
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeJsonColon: false
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterPlacementOperator: true
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInAngles: Never
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParens: Never
SpacesInParensOptions:
InCStyleCasts: false
InConditionalStatements: false
InEmptyParentheses: false
Other: false
SpacesInSquareBrackets: false
SortUsingDeclarations: false
Standard: Auto
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
UseTab: Always
VerilogBreakBetweenInstancePorts: true
WhitespaceSensitiveMacros:
- BOOST_PP_STRINGIZE
- CF_SWIFT_NAME
- NS_SWIFT_NAME
- PP_STRINGIZE
- STRINGIZE
...

2 changes: 1 addition & 1 deletion bindings/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package bindings

const CInt32Max = int(^uint32(0) >> 1)

const ReindexerVersion = "v3.26.0"
const ReindexerVersion = "v3.27.0"

// public go consts from type_consts.h and reindexer_ctypes.h
const (
Expand Down
28 changes: 28 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# Version 3.27.0 (09.07.2024)
## Core
- [fea] Decreased heap allocations count in general selection pipeline
- [fea] Optimized allocations in fulltext query preparation phase
- [fea] Added heuristic for [copying transactions](readme.md#transactions-commit-strategies), which allows to avoid extra namespace copying if there are no select queries expected. May be disabled via `REINDEXER_NOTXHEURISTIC` env variable
- [fea] Added automatic default values setting on new index creation (except UUID and rtree indexes)
- [fea] Improved comparators performance for `IN()`-conditions
- [fix] Fixed potential deadlock on data reading at server startup
- [fix] Fixed double fulltext index building after copying transactions
- [fix] Fixed incorrect composite indexes detection in some of `UPDATE`-queries (it could lead to random crashes during updates)
- [ref] Deprecated fulltext index option `warmup_on_ns_copy`. In current implementation reindexer will always build fulltext index after copying transaction
- [ref] Removed some of the [default RU stop-words](https://github.com/Restream/reindexer/blob/v3.27.0/cpp_src/core/ft/stopwords/stop_ru.cc)

## Replication
- [fix] Fixed `updated_unix_nano` in `#memstats` table
- [fix] Disabled `statement-based update replication` - in some cases it could lead to crashes and data loss due to logic conflicts in WAL

## Reindexer server
- [fea] Added `SO_LINGER`-option in cases when client drops connection first. This allows to prevent `TIME_WAIT` socket state on the client's side

## Deploy
- [fea] Added build for Ubuntu 24.04
- [ref] CentOS 7 reindexer repo is no longer supported due to CentOS 7 EOL

## Face
- [fea] Added RU language in UI
- [fix] Fixed input width in settings section

# Version 3.26.0 (21.06.2024)

## Core
Expand Down
4 changes: 2 additions & 2 deletions cpp_src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ else()
option(LINK_RESOURCES "Link web resources as binary data" ON)
endif()

set(REINDEXER_VERSION_DEFAULT "3.26.0")
set(REINDEXER_VERSION_DEFAULT "3.27.0")

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
Expand Down Expand Up @@ -464,7 +464,7 @@ if(WITH_CPPTRACE)
GIT_TAG "v0.3.1"
CMAKE_ARGS -DCMAKE_INSTALL_LIBDIR=${CMAKE_CURRENT_BINARY_DIR}
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}
-DCPPTRACE_STATIC=On
-DCPPTRACE_BUILD_SHARED=Off
-DCPPTRACE_GET_SYMBOLS_WITH_DBGHELP=On
-DCPPTRACE_UNWIND_WITH_DBGHELP=On
-DCPPTRACE_DEMANGLE_WITH_WINAPI=On
Expand Down
2 changes: 1 addition & 1 deletion cpp_src/cmd/reindexer_tool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ endif()
file(GLOB_RECURSE SRCS *.h *.cc)
add_executable(${TARGET} ${SRCS})

# Enable export to provide readble stacktraces
# Enable export to provide readable stacktraces
set_property(TARGET ${TARGET} PROPERTY ENABLE_EXPORTS 1)

if (NOT MSVC AND NOT WITH_STDLIB_DEBUG)
Expand Down
2 changes: 1 addition & 1 deletion cpp_src/core/cjson/cjsonbuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CJsonBuilder CJsonBuilder::Array(int tagName, ObjType type) {
return CJsonBuilder(*ser_, type, tm_, tagName);
}

void CJsonBuilder::Array(int tagName, span<Uuid> data, int /*offset*/) {
void CJsonBuilder::Array(int tagName, span<const Uuid> data, int /*offset*/) {
ser_->PutCTag(ctag{TAG_ARRAY, tagName});
ser_->PutCArrayTag(carraytag(data.size(), TAG_UUID));
for (auto d : data) {
Expand Down
12 changes: 6 additions & 6 deletions cpp_src/core/cjson/cjsonbuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,28 @@ class CJsonBuilder {
}
CJsonBuilder Object(std::nullptr_t) { return Object(0); }

void Array(int tagName, span<p_string> data, int /*offset*/ = 0) {
void Array(int tagName, span<const p_string> data, int /*offset*/ = 0) {
ser_->PutCTag(ctag{TAG_ARRAY, tagName});
ser_->PutCArrayTag(carraytag(data.size(), TAG_STRING));
for (auto d : data) ser_->PutVString(d);
}
void Array(int tagName, span<Uuid> data, int offset = 0);
void Array(int tagName, span<int> data, int /*offset*/ = 0) {
void Array(int tagName, span<const Uuid> data, int offset = 0);
void Array(int tagName, span<const int> data, int /*offset*/ = 0) {
ser_->PutCTag(ctag{TAG_ARRAY, tagName});
ser_->PutCArrayTag(carraytag(data.size(), TAG_VARINT));
for (auto d : data) ser_->PutVarint(d);
}
void Array(int tagName, span<int64_t> data, int /*offset*/ = 0) {
void Array(int tagName, span<const int64_t> data, int /*offset*/ = 0) {
ser_->PutCTag(ctag{TAG_ARRAY, tagName});
ser_->PutCArrayTag(carraytag(data.size(), TAG_VARINT));
for (auto d : data) ser_->PutVarint(d);
}
void Array(int tagName, span<bool> data, int /*offset*/ = 0) {
void Array(int tagName, span<const bool> data, int /*offset*/ = 0) {
ser_->PutCTag(ctag{TAG_ARRAY, tagName});
ser_->PutCArrayTag(carraytag(data.size(), TAG_BOOL));
for (auto d : data) ser_->PutBool(d);
}
void Array(int tagName, span<double> data, int /*offset*/ = 0) {
void Array(int tagName, span<const double> data, int /*offset*/ = 0) {
ser_->PutCTag(ctag{TAG_ARRAY, tagName});
ser_->PutCArrayTag(carraytag(data.size(), TAG_DOUBLE));
for (auto d : data) ser_->PutDouble(d);
Expand Down
3 changes: 2 additions & 1 deletion cpp_src/core/cjson/cjsondecoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ bool CJsonDecoder::decodeCJson(Payload &pl, Serializer &rdser, WrSerializer &wrs
const ctag tag = rdser.GetCTag();
TagType tagType = tag.Type();
if (tagType == TAG_END) {
recoder.Serialize(wrser);
wrser.PutCTag(kCTagEnd);
return false;
}
Expand Down Expand Up @@ -70,7 +71,7 @@ bool CJsonDecoder::decodeCJson(Payload &pl, Serializer &rdser, WrSerializer &wrs
[&](OneOf<KeyValueType::Double, KeyValueType::String, KeyValueType::Bool, KeyValueType::Null, KeyValueType::Uuid>) {
wrser.PutCTag(ctag{fieldType.ToTagType(), tagName, field});
},
[&](OneOf<KeyValueType::Undefined, KeyValueType::Tuple, KeyValueType::Composite>) { assertrx(0); });
[&](OneOf<KeyValueType::Undefined, KeyValueType::Tuple, KeyValueType::Composite>) { assertrx(false); });
}
}
} else {
Expand Down
Loading

0 comments on commit 07a1dff

Please sign in to comment.