Skip to content

Commit 8461d86

Browse files
committed
release 3.0.4.2
1 parent 0ce0e3e commit 8461d86

26 files changed

Lines changed: 963 additions & 518 deletions

CMakeLists.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
66
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
77
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
88

9+
option(ENABLE_COVERAGE "Enable coverage reporting" OFF)
10+
if(DEFINED ENV{ENABLE_COVERAGE})
11+
set(ENABLE_COVERAGE $ENV{ENABLE_COVERAGE})
12+
endif()
913

14+
option(ENABLE_ASAN "Enable ASAN" OFF)
15+
if(DEFINED ENV{ENABLE_ASAN})
16+
set(ENABLE_ASAN $ENV{ENABLE_ASAN})
17+
endif()
1018

1119
# ============================================================================
1220
# Compiler Flags
@@ -19,6 +27,28 @@ else()
1927
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0")
2028
endif()
2129

30+
if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND ENABLE_COVERAGE)
31+
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
32+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-instr-generate -fcoverage-mapping -g")
33+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-instr-generate -fcoverage-mapping -g")
34+
message(STATUS "Enabling coverage flags for Debug build [Clang]")
35+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
36+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage -g")
37+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage -g")
38+
set(CMAKE_LINK_FLAGS "${CMAKE_LINK_FLAGS} --coverage")
39+
message(STATUS "Enabling coverage flags for Debug build [GNU]")
40+
else()
41+
message(STATUS "Using other compiler: ${CMAKE_CXX_COMPILER_ID}")
42+
endif()
43+
endif()
44+
45+
if(ENABLE_ASAN)
46+
message(STATUS "Enabling AddressSanitizer")
47+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
48+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
49+
set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -fsanitize=address")
50+
endif()
51+
2252

2353
# ============================================================================
2454
# Dependencies: OpenSSL

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ To use DolphinDB Python SDK, you'll need:
1111
- DolphinDB Server
1212
- Packages:
1313
- NumPy: version 1.18 and newer
14-
- pandas: version 1.0.0 and newer, but not version 1.3.0
14+
- pandas: version 1.0 and newer, but earlier than 3.0, and not version 1.3.0
1515
- future
1616
- packaging
1717
- pydantic: version 2.0 and newer

core/include/DolphinDB.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class EXPORT_DECL DBConnection {
158158
bool isClosed() const;
159159
void setProtocol(PROTOCOL protocol);
160160
void setShowOutput(bool flag);
161-
std::shared_ptr<Logger> getMsgLogger();
161+
std::shared_ptr<Logger> getMsgLogger();
162162

163163
private:
164164
DBConnection(DBConnection& oth); // = delete
@@ -178,7 +178,7 @@ class EXPORT_DECL DBConnection {
178178
//1 - throw exception;
179179
//2 - new leader, host&port is valid
180180
//3 - this data node not avail
181-
ExceptionType parseException(const string &msg, string &host, int &port);
181+
ExceptionType parseException(const TagResponse &e, std::string &host, int &port);
182182

183183
private:
184184
struct Node{
@@ -192,8 +192,10 @@ class EXPORT_DECL DBConnection {
192192
Node(){}
193193
Node(const string &hostName, int port, double load = DBL_MAX): hostName(hostName), port(port), load(load){}
194194
Node(const string &ipport, double loadValue = DBL_MAX);
195-
};
196-
static void parseIpPort(const string &ipport, string &ip, int &port);
195+
};
196+
static void parseIpPort(const string &ipport, string &ip, int &port);
197+
bool parseAsNotLeaderException(const string &msg, string &host, int &port, ExceptionType &type);
198+
bool parseAsOtherException(const string &msg, string &host, int &port, ExceptionType &type);
197199

198200
std::unique_ptr<DBConnectionImpl> conn_;
199201
string uid_;

0 commit comments

Comments
 (0)