Skip to content

Commit 1019c2a

Browse files
committed
release 3.0.1.1
1 parent 7d4d883 commit 1019c2a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2415
-3067
lines changed

core/include/DBConnectionPoolImpl.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ namespace dolphindb {
88
class DBConnectionPoolImpl{
99
public:
1010
struct Task{
11-
Task(const string& sc = "", int id = 0, int pr = 4, int pa = 2, bool clearM = false,
11+
Task(const string& sc = "", int id = 0, int pr = 4, int pa = 64, bool clearM = false,
1212
bool isPy = false, bool pickleTableToL = false, bool disableDec = false)
1313
: script(sc), identity(id), priority(pr), parallelism(pa), clearMemory(clearM)
1414
, isPyTask(isPy), pickleTableToList(pickleTableToL), disableDecimal(disableDec){}
15-
Task(const string& function, const std::vector<ConstantSP>& args, int id = 0, int pr = 4, int pa = 2, bool clearM = false,
15+
Task(const string& function, const std::vector<ConstantSP>& args, int id = 0, int pr = 4, int pa = 64, bool clearM = false,
1616
bool isPy = false, bool pickleTableToL = false, bool disableDec = false)
1717
: script(function), arguments(args), identity(id), priority(pr), parallelism(pa), clearMemory(clearM)
1818
, isPyTask(isPy), pickleTableToList(pickleTableToL), disableDecimal(disableDec){ isFunc = true; }
@@ -41,12 +41,12 @@ class DBConnectionPoolImpl{
4141
work->join();
4242
}
4343
}
44-
void run(const string& script, int identity, int priority=4, int parallelism=2, int fetchSize=0, bool clearMemory = false){
44+
void run(const string& script, int identity, int priority=4, int parallelism=64, int fetchSize=0, bool clearMemory = false){
4545
queue_->push(Task(script, identity, priority, parallelism, clearMemory));
4646
taskStatus_.setResult(identity, TaskStatusMgmt::Result());
4747
}
4848

49-
void run(const string& functionName, const std::vector<ConstantSP>& args, int identity, int priority=4, int parallelism=2, int fetchSize=0, bool clearMemory = false){
49+
void run(const string& functionName, const std::vector<ConstantSP>& args, int identity, int priority=4, int parallelism=64, int fetchSize=0, bool clearMemory = false){
5050
queue_->push(Task(functionName, args, identity, priority, parallelism, clearMemory));
5151
taskStatus_.setResult(identity, TaskStatusMgmt::Result());
5252
}
@@ -75,7 +75,7 @@ class DBConnectionPoolImpl{
7575

7676
void runPy(
7777
const string& script, int identity,
78-
int priority = 4, int parallelism = 2,
78+
int priority = 4, int parallelism = 64,
7979
int fetchSize = 0, bool clearMemory = false,
8080
bool pickleTableToList = false, bool disableDecimal = false
8181
){
@@ -88,7 +88,7 @@ class DBConnectionPoolImpl{
8888

8989
void runPy(
9090
const string& functionName, const vector<ConstantSP>& args, int identity,
91-
int priority = 4, int parallelism = 2,
91+
int priority = 4, int parallelism = 64,
9292
int fetchSize = 0, bool clearMemory = false,
9393
bool pickleTableToList = false, bool disableDecimal = false
9494
){

core/include/DolphinDB.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ class EXPORT_DECL DBConnection {
110110
* the function returns a void object. If error is raised on the server, the function throws an
111111
* exception.
112112
*/
113-
ConstantSP run(const string& script, int priority=4, int parallelism=2, int fetchSize=0, bool clearMemory = false);
113+
ConstantSP run(const string& script, int priority=4, int parallelism=64, int fetchSize=0, bool clearMemory = false);
114114

115115
/**
116116
* Run the given function on the DolphinDB server using the local objects as the arguments
117117
* for the function and return the result to the client. If nothing returns, the function
118118
* returns a void object. If error is raised on the server, the function throws an exception.
119119
*/
120-
ConstantSP run(const string& funcName, vector<ConstantSP>& args, int priority=4, int parallelism=2, int fetchSize=0, bool clearMemory = false);
120+
ConstantSP run(const string& funcName, vector<ConstantSP>& args, int priority=4, int parallelism=64, int fetchSize=0, bool clearMemory = false);
121121

122122
/**
123123
* upload a local object to the DolphinDB server and assign the given name in the session.
@@ -147,11 +147,11 @@ class EXPORT_DECL DBConnection {
147147
DataInputStreamSP getDataInputStream();
148148

149149
py::object runPy(
150-
const string& script, int priority=4, int parallelism=2,
150+
const string& script, int priority=4, int parallelism=64,
151151
int fetchSize=0, bool clearMemory=false,
152152
bool pickleTableToList=false, bool disableDecimal=false);
153153
py::object runPy(
154-
const string& funcName, vector<ConstantSP>& args, int priority=4, int parallelism=2,
154+
const string& funcName, vector<ConstantSP>& args, int priority=4, int parallelism=64,
155155
int fetchSize=0, bool clearMemory=false,
156156
bool pickleTableToList=false, bool disableDecimal=false);
157157
void setKeepAliveTime(int keepAliveTime);
@@ -237,9 +237,9 @@ class EXPORT_DECL DBConnectionPool{
237237
PROTOCOL protocol = PROTOCOL_DDB, bool showOutput = true);
238238
virtual ~DBConnectionPool();
239239

240-
void run(const string& script, int identity, int priority=4, int parallelism=2, int fetchSize=0, bool clearMemory = false);
240+
void run(const string& script, int identity, int priority=4, int parallelism=64, int fetchSize=0, bool clearMemory = false);
241241

242-
void run(const string& functionName, const vector<ConstantSP>& args, int identity, int priority=4, int parallelism=2, int fetchSize=0, bool clearMemory = false);
242+
void run(const string& functionName, const vector<ConstantSP>& args, int identity, int priority=4, int parallelism=64, int fetchSize=0, bool clearMemory = false);
243243

244244
bool isFinished(int identity);
245245

@@ -253,12 +253,12 @@ class EXPORT_DECL DBConnectionPool{
253253

254254
void runPy(
255255
const string& script, int identity,
256-
int priority=4, int parallelism=2,
256+
int priority=4, int parallelism=64,
257257
int fetchSize=0, bool clearMemory = false,
258258
bool pickleTableToList=false, bool disableDecimal=false);
259259
void runPy(
260260
const string& functionName, const vector<ConstantSP>& args,
261-
int identity, int priority=4, int parallelism=2,
261+
int identity, int priority=4, int parallelism=64,
262262
int fetchSize=0, bool clearMemory = false,
263263
bool pickleTableToList=false, bool disableDecimal=false);
264264
py::object getPyData(int identity);

core/include/DolphinDBImp.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class DBConnectionImpl {
2828
~DBConnectionImpl();
2929
bool connect(const string& hostName, int port, const string& userId = "", const string& password = "",bool sslEnable = false, bool asynTask = false, int keepAliveTime = -1, bool compress= false, bool python = false);
3030
void login(const string& userId, const string& password, bool enableEncryption);
31-
ConstantSP run(const string& script, int priority = 4, int parallelism = 2, int fetchSize = 0, bool clearMemory = false);
32-
ConstantSP run(const string& funcName, vector<ConstantSP>& args, int priority = 4, int parallelism = 2, int fetchSize = 0, bool clearMemory = false);
31+
ConstantSP run(const string& script, int priority = 4, int parallelism = 64, int fetchSize = 0, bool clearMemory = false);
32+
ConstantSP run(const string& funcName, vector<ConstantSP>& args, int priority = 4, int parallelism = 64, int fetchSize = 0, bool clearMemory = false);
3333
ConstantSP upload(const string& name, const ConstantSP& obj);
3434
ConstantSP upload(vector<string>& names, vector<ConstantSP>& objs);
3535
void close();
@@ -48,11 +48,11 @@ class DBConnectionImpl {
4848
msg_ = flag;
4949
}
5050
py::object runPy(
51-
const string& script, int priority = 4, int parallelism = 2,
51+
const string& script, int priority = 4, int parallelism = 64,
5252
int fetchSize = 0, bool clearMemory = false,
5353
bool pickleTableToList = false, bool disableDecimal = false);
5454
py::object runPy(
55-
const string& funcName, vector<ConstantSP>& args, int priority = 4, int parallelism = 2,
55+
const string& funcName, vector<ConstantSP>& args, int priority = 4, int parallelism = 64,
5656
int fetchSize = 0, bool clearMemory = false,
5757
bool pickleTableToList = false, bool disableDecimal = false);
5858
void setkeepAliveTime(int keepAliveTime){
@@ -64,10 +64,10 @@ class DBConnectionImpl {
6464
DataInputStreamSP getDataInputStream(){return inputStream_;}
6565
private:
6666
long generateRequestFlag(bool clearSessionMemory = false, bool disableprotocol = false, bool pickleTableToList = false, bool disableDecimal = false);
67-
ConstantSP run(const string& script, const string& scriptType, vector<ConstantSP>& args, int priority = 4, int parallelism = 2,int fetchSize = 0, bool clearMemory = false);
67+
ConstantSP run(const string& script, const string& scriptType, vector<ConstantSP>& args, int priority = 4, int parallelism = 64,int fetchSize = 0, bool clearMemory = false);
6868
py::object runPy(
6969
const string& script, const string& scriptType, vector<ConstantSP>& args,
70-
int priority = 4, int parallelism = 2, int fetchSize = 0, bool clearMemory = false,
70+
int priority = 4, int parallelism = 64, int fetchSize = 0, bool clearMemory = false,
7171
bool pickleTableToList = false, bool disableDecimal = false);
7272
bool connect();
7373
void login();

core/src/binding.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class DBConnectionPoolImpl {
9696
~DBConnectionPoolImpl() {}
9797
py::object run(const string &script, int taskId) {
9898
TRY
99-
dbConnectionPool_.runPy(script, taskId, 4, 2);
99+
dbConnectionPool_.runPy(script, taskId);
100100
CATCH_EXCEPTION("<Exception> in run: ")
101101
return py::none();
102102
}
@@ -127,7 +127,7 @@ class DBConnectionPoolImpl {
127127
if (kwargs.contains("priority")) {
128128
priority = kwargs["priority"].cast<int>();
129129
}
130-
int parallelism = 2;
130+
int parallelism = 64;
131131
if (kwargs.contains("parallelism")) {
132132
parallelism = kwargs["parallelism"].cast<int>();
133133
}
@@ -155,7 +155,7 @@ class DBConnectionPoolImpl {
155155
if (kwargs.contains("priority")) {
156156
priority = kwargs["priority"].cast<int>();
157157
}
158-
int parallelism = 2;
158+
int parallelism = 64;
159159
if (kwargs.contains("parallelism")) {
160160
parallelism = kwargs["parallelism"].cast<int>();
161161
}
@@ -393,7 +393,7 @@ class SessionImpl {
393393
ddb::ConstantSP runcpp(const string &script) {
394394
ddb::ConstantSP result;
395395
TRY
396-
result = dbConnection_.run(script, 4, 2);
396+
result = dbConnection_.run(script);
397397

398398
CATCH_EXCEPTION("<Exception> in runcpp: ")
399399
return result;
@@ -458,7 +458,7 @@ class SessionImpl {
458458
py::object result;
459459
TRY
460460
//ddb::RecordTime::printAllTime();
461-
result = dbConnection_.runPy(script, 4, 2);
461+
result = dbConnection_.runPy(script);
462462
DLOG(ddb::RecordTime::printAllTime());
463463
CATCH_EXCEPTION("<Exception> in run: ")
464464
return result;
@@ -587,7 +587,7 @@ class SessionImpl {
587587
if (kwargs.contains("priority")) {
588588
priority = kwargs["priority"].cast<int>();
589589
}
590-
int parallelism = 2;
590+
int parallelism = 64;
591591
if (kwargs.contains("parallelism")) {
592592
parallelism = kwargs["parallelism"].cast<int>();
593593
}
@@ -663,7 +663,7 @@ class SessionImpl {
663663
if (kwargs.contains("priority")) {
664664
priority = kwargs["priority"].cast<int>();
665665
}
666-
int parallelism = 2;
666+
int parallelism = 64;
667667
if (kwargs.contains("parallelism")) {
668668
parallelism = kwargs["parallelism"].cast<int>();
669669
}
@@ -696,7 +696,7 @@ class SessionImpl {
696696
}
697697
ddb::ConstantSP result;
698698
TRY
699-
result = dbConnection_.run(script, 4, 2, fetchSize, clearMemory);
699+
result = dbConnection_.run(script, 4, 64, fetchSize, clearMemory);
700700
CATCH_EXCEPTION("<Exception> in runBlock: ")
701701
BlockReader blockReader(result);
702702
return blockReader;

dolphindb/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from .database import Database
2020
from .utils import month
2121

22-
__version__ = "3.0.1.0"
22+
__version__ = "3.0.1.1"
2323

2424
name = "dolphindb"
2525

dolphindb/session.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ async def run(self, script: str, *args, **kwargs):
114114
If the length of each row is different, the execution fails.
115115
"""
116116
priority = kwargs.get('priority', 4)
117-
parallelism = kwargs.get('parallelism', 2)
117+
parallelism = kwargs.get('parallelism', 64)
118118
if type(priority) is not int or priority > 9 or priority < 0:
119119
raise RuntimeError("priority must be an integer from 0 to 9")
120120
if type(parallelism) is not int or parallelism <= 0:
@@ -489,7 +489,7 @@ def run(self, script: str, *args, **kwargs):
489489
When setting pickleTableToList=True and enablePickle=True, if the table contains array vectors, it will be converted to a NumPy 2d array. If the length of each row is different, the execution fails.
490490
"""
491491
priority = kwargs.get('priority', 4)
492-
parallelism = kwargs.get('parallelism', 2)
492+
parallelism = kwargs.get('parallelism', 64)
493493
if type(priority) is not int or priority > 9 or priority < 0:
494494
raise RuntimeError("priority must be an integer from 0 to 9")
495495
if type(parallelism) is not int or parallelism <= 0:

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,15 @@ before-build = [
4848

4949
[tool.cibuildwheel.macos]
5050
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
51-
archs = ["universal2", "x86_64", "arm64"]
51+
archs = ["x86_64", "arm64"]
5252
before-all = "rm -rf build"
53+
before-build = [
54+
"python --version",
55+
"python -m pip config set global.trusted-host --site pypi.python.org",
56+
"python -m pip config set global.trusted-host --site pypi.org",
57+
"python -m pip install --upgrade pip",
58+
"python -m pip install --upgrade certifi"
59+
]
5360

5461
[tool.cibuildwheel.windows]
5562
before-all = [

0 commit comments

Comments
 (0)