Skip to content

Commit

Permalink
Merge pull request #203 from bersler/new_fixes
Browse files Browse the repository at this point in the history
fix: IOT tables not properly skipped
  • Loading branch information
bersler authored Dec 27, 2024
2 parents 35b30a7 + de9aac5 commit e45f9dc
Show file tree
Hide file tree
Showing 89 changed files with 4,257 additions and 4,943 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.8.2
- fix: IOT tables not properly skipped

1.8.1
- fix: archived redo logs are not fully processed

Expand Down
16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

cmake_minimum_required(VERSION 3.16)
project(OpenLogReplicator
VERSION 1.8.1
VERSION 1.8.2
DESCRIPTION "OpenLogReplicator, Open Source Oracle database CDC"
HOMEPAGE_URL "https://github.com/bersler/OpenLogReplicator"
)

set(SCHEMA_VERSION "1.8.1")
set(SCHEMA_VERSION "1.8.2")
string(TIMESTAMP CMAKE_BUILD_TIMESTAMP "%Y-%m-%d %H:%M" UTC)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_STANDARD 17)
Expand Down Expand Up @@ -55,14 +55,14 @@ find_package(Threads REQUIRED)

# RapidJSON
if (WITH_RAPIDJSON)
include_directories(${WITH_RAPIDJSON}/include)
include_directories(SYSTEM ${WITH_RAPIDJSON}/include)
else ()
message(FATAL_ERROR "plase provide WITH_RAPIDJSON parameter with path to rapidjson library")
endif ()

# Oracle, only dynamic
if (WITH_OCI)
include_directories(${WITH_OCI}/sdk/include)
include_directories(SYSTEM ${WITH_OCI}/sdk/include)
link_directories(${WITH_OCI})
add_compile_definitions(LINK_LIBRARY_OCI)
endif ()
Expand All @@ -73,7 +73,7 @@ endif ()

# Protobuf, dynamic or static
if (WITH_PROTOBUF)
include_directories(${WITH_PROTOBUF}/include)
include_directories(SYSTEM ${WITH_PROTOBUF}/include)
add_compile_definitions(LINK_LIBRARY_PROTOBUF)

if (WITH_STATIC)
Expand All @@ -85,7 +85,7 @@ if (WITH_PROTOBUF)

# ZeroMQ, just dynamic
if (WITH_ZEROMQ)
include_directories(${WITH_ZEROMQ}/include)
include_directories(SYSTEM ${WITH_ZEROMQ}/include)
add_compile_definitions(LINK_LIBRARY_ZEROMQ)
if (MACOSX)
link_directories(${WITH_ZEROMQ}/lib)
Expand All @@ -97,7 +97,7 @@ endif ()

# Kafka, dynamic or static
if (WITH_RDKAFKA)
include_directories(${WITH_RDKAFKA}/include)
include_directories(SYSTEM ${WITH_RDKAFKA}/include)
add_compile_definitions(LINK_LIBRARY_RDKAFKA)

if (WITH_STATIC)
Expand All @@ -115,7 +115,7 @@ endif ()

# Prometheus, only dynamic
if (WITH_PROMETHEUS)
include_directories(${WITH_PROMETHEUS}/include)
include_directories(SYSTEM ${WITH_PROMETHEUS}/include)
link_directories(${WITH_PROMETHEUS}/lib)
add_compile_definitions(LINK_LIBRARY_PROMETHEUS)
endif ()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Experimental Features
:author: Adam Leszczyński <[email protected]>
:revnumber: 1.8.1
:revdate: 2024-12-25
:revnumber: 1.8.2
:revdate: 2024-12-27
:imagesdir: ./images
:url-github: https://github.com/bersler/OpenLogReplicator
:toc: preamble
Expand Down
4 changes: 2 additions & 2 deletions documentation/installation/installation.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Installation Guide
:author: Adam Leszczyński <[email protected]>
:revnumber: 1.8.1
:revdate: 2024-12-25
:revnumber: 1.8.2
:revdate: 2024-12-27
:imagesdir: ./images
:toc: preamble

Expand Down
4 changes: 2 additions & 2 deletions documentation/introduction/introduction.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Introduction to OpenLogReplicator
:author: Adam Leszczyński <[email protected]>
:revnumber: 1.8.1
:revdate: 2024-12-25
:revnumber: 1.8.2
:revdate: 2024-12-27
:imagesdir: ./images
:url-github: https://github.com/bersler/OpenLogReplicator
:url-db-engines: https://db-engines.com/en/ranking_trend
Expand Down
4 changes: 2 additions & 2 deletions documentation/log-messages/log-messages.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Log Messages Guide
:author: Adam Leszczyński <[email protected]>
:revnumber: 1.8.1
:revdate: 2024-12-25
:revnumber: 1.8.2
:revdate: 2024-12-27
:imagesdir: ./images
:toc: preamble

Expand Down
4 changes: 2 additions & 2 deletions documentation/metrics/metrics.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Metrics
:author: Adam Leszczyński <[email protected]>
:revnumber: 1.8.1
:revdate: 2024-12-25
:revnumber: 1.8.2
:revdate: 2024-12-27
:imagesdir: ./images
:toc: preamble

Expand Down
4 changes: 2 additions & 2 deletions documentation/reference-manual/reference-manual.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Reference Manual
:author: Adam Leszczyński <[email protected]>
:revnumber: 1.8.1
:revdate: 2024-12-25
:revnumber: 1.8.2
:revdate: 2024-12-27
:imagesdir: ./images
:icons: font
:toc: preamble
Expand Down
7 changes: 5 additions & 2 deletions documentation/release-notes/release-notes.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Release Notes
:author: Adam Leszczyński <[email protected]>
:revnumber: 1.8.1
:revdate: 2024-12-25
:revnumber: 1.8.2
:revdate: 2024-12-27
:imagesdir: ./images
:url-github: https://github.com/bersler/OpenLogReplicator
:url-db-engines: https://db-engines.com/en/ranking_trend
Expand All @@ -16,6 +16,9 @@ This document describes the release notes of OpenLogReplicator.

== Major Release 1.x

=== Version 1.8.2
- fix: IOT tables not properly skipped

=== Version 1.8.1
- fix: archived redo logs are not fully processed

Expand Down
4 changes: 2 additions & 2 deletions documentation/troubleshooting/troubleshooting.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Troubleshooting Guide
:author: Adam Leszczyński <[email protected]>
:revnumber: 1.8.1
:revdate: 2024-12-25
:revnumber: 1.8.2
:revdate: 2024-12-27
:imagesdir: ./images
:toc: preamble

Expand Down
4 changes: 2 additions & 2 deletions documentation/user-manual/user-manual.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= User Manual
:author: Adam Leszczyński <[email protected]>
:revnumber: 1.8.1
:revdate: 2024-12-25
:revnumber: 1.8.2
:revdate: 2024-12-27
:imagesdir: ./images
:url-github-docker: https://github.com/bersler/OpenLogReplicator-Docker
:url-github-tutorials: https://github.com/bersler/OpenLogReplicator-tutorials
Expand Down
2 changes: 1 addition & 1 deletion scripts/OpenLogReplicator-example-batch.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.8.1",
"version": "1.8.2",
"source": [
{
"alias": "S1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/OpenLogReplicator-example-discard.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.8.1",
"version": "1.8.2",
"source": [
{
"alias": "S1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/OpenLogReplicator-example-file.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.8.1",
"version": "1.8.2",
"source": [
{
"alias": "S1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/OpenLogReplicator-example-full.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.8.1",
"version": "1.8.2",
"dump-redo-log": 0,
"dump-raw-data": 0,
"dump-path": "/opt/dump",
Expand Down
2 changes: 1 addition & 1 deletion scripts/OpenLogReplicator-example-network.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.8.1",
"version": "1.8.2",
"source": [
{
"alias": "S1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/OpenLogReplicator-example-offline.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.8.1",
"version": "1.8.2",
"source": [
{
"alias": "S1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/OpenLogReplicator-example-zeromq.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.8.1",
"version": "1.8.2",
"source": [
{
"alias": "S1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/OpenLogReplicator-example.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.8.1",
"version": "1.8.2",
"source": [
{
"alias": "S1",
Expand Down
25 changes: 0 additions & 25 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,31 +71,6 @@ list(APPEND ListBuilder
builder/SystemTransaction.cpp)

list(APPEND ListParser
parser/OpCode.cpp
parser/OpCode0501.cpp
parser/OpCode0502.cpp
parser/OpCode0504.cpp
parser/OpCode0506.cpp
parser/OpCode050B.cpp
parser/OpCode0513.cpp
parser/OpCode0514.cpp
parser/OpCode0A02.cpp
parser/OpCode0A08.cpp
parser/OpCode0A12.cpp
parser/OpCode0B02.cpp
parser/OpCode0B03.cpp
parser/OpCode0B04.cpp
parser/OpCode0B05.cpp
parser/OpCode0B06.cpp
parser/OpCode0B08.cpp
parser/OpCode0B0B.cpp
parser/OpCode0B0C.cpp
parser/OpCode0B10.cpp
parser/OpCode0B16.cpp
parser/OpCode1301.cpp
parser/OpCode1801.cpp
parser/OpCode1A02.cpp
parser/OpCode1A06.cpp
parser/Parser.cpp
parser/Transaction.cpp
parser/TransactionBuffer.cpp)
Expand Down
2 changes: 1 addition & 1 deletion src/OpenLogReplicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ namespace OpenLogReplicator {
ctx->logTrace(Ctx::TRACE::THREADS, "main (" + ss.str() + ") start");
}

struct stat configFileStat;
struct stat configFileStat{};
fid = open(configFileName.c_str(), O_RDONLY);
if (fid == -1)
throw RuntimeException(10001, "file: " + configFileName + " - open for read returned: " + strerror(errno));
Expand Down
2 changes: 1 addition & 1 deletion src/StreamClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ along with OpenLogReplicator; see the file LICENSE; If not see
#endif /* LINK_LIBRARY_ZEROMQ */

enum {
MAX_CLIENT_MESSAGE_SIZE = (2*1024*1024*1024UL - 1)
MAX_CLIENT_MESSAGE_SIZE = ((2*1024*1024*1024UL) - 1)
};

static void send(OpenLogReplicator::pb::RedoRequest& request, OpenLogReplicator::Stream* stream, OpenLogReplicator::Ctx* ctx __attribute__((unused))) {
Expand Down
4 changes: 2 additions & 2 deletions src/builder/Builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2356,7 +2356,7 @@ namespace OpenLogReplicator {
BuilderQueue* builderQueue;
{
t->contextSet(Thread::CONTEXT::MUTEX, Thread::REASON::BUILDER_RELEASE);
std::unique_lock<std::mutex> lck(mtx);
std::unique_lock<std::mutex> const lck(mtx);
builderQueue = firstBuilderQueue;
while (firstBuilderQueue->id < maxId) {
firstBuilderQueue = firstBuilderQueue->next;
Expand Down Expand Up @@ -2440,7 +2440,7 @@ namespace OpenLogReplicator {
}

void Builder::wakeUp() {
std::unique_lock<std::mutex> lck(mtx);
std::unique_lock<std::mutex> const lck(mtx);
condNoWriterWork.notify_all();
}
}
8 changes: 4 additions & 4 deletions src/builder/Builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ namespace OpenLogReplicator {
}

void setFlag(OUTPUT_BUFFER flag) {
flags = static_cast<OUTPUT_BUFFER>(static_cast<OUTPUT_BUFFER>(static_cast<uint>(flags) | static_cast<uint>(flag)));
flags = static_cast<OUTPUT_BUFFER>(static_cast<uint>(flags) | static_cast<uint>(flag));
}

void unsetFlag(OUTPUT_BUFFER flag) {
flags = static_cast<OUTPUT_BUFFER>(static_cast<OUTPUT_BUFFER>(static_cast<uint>(flags) & ~static_cast<uint>(flag)));
flags = static_cast<OUTPUT_BUFFER>(static_cast<uint>(flags) & ~static_cast<uint>(flag));
}
};

Expand Down Expand Up @@ -196,7 +196,7 @@ namespace OpenLogReplicator {

{
ctx->parserThread->contextSet(Thread::CONTEXT::MUTEX, Thread::REASON::BUILDER_ROTATE);
std::unique_lock<std::mutex> lck(mtx);
std::unique_lock<std::mutex> const lck(mtx);
lastBuilderQueue->next = nextBuffer;
++buffersAllocated;
lastBuilderQueue = nextBuffer;
Expand Down Expand Up @@ -1255,7 +1255,7 @@ namespace OpenLogReplicator {
void flush() {
{
ctx->parserThread->contextSet(Thread::CONTEXT::MUTEX, Thread::REASON::BUILDER_COMMIT);
std::unique_lock<std::mutex> lck(mtx);
std::unique_lock<std::mutex> const lck(mtx);
condNoWriterWork.notify_all();
}
ctx->parserThread->contextSet(Thread::CONTEXT::TRAN, Thread::REASON::TRAN);
Expand Down
Loading

0 comments on commit e45f9dc

Please sign in to comment.