Commit Graph

10447 Commits

Author SHA1 Message Date
slguan 29eb60aa11 fix bug in resetlog statements 2019-08-22 18:23:42 +08:00
huili 28758fabbb [del one space] 2019-08-22 17:50:17 +08:00
slguan b99bb7aa3b version.c 2019-08-22 17:13:01 +08:00
slguan e94fa74388 fix issue #235 2019-08-22 16:14:53 +08:00
slguan 556ca28bee fix issue #156 2019-08-22 16:11:53 +08:00
slguan 93f3d4462d taosd should not start while other process is running 2019-08-21 23:57:43 +08:00
slguan 60edeb4398 fix the issue #376 2019-08-21 11:33:27 +08:00
slguan 8e11a6b8ec offset calculation error while write to disk 2019-08-19 09:26:22 +08:00
localvar 641ee3059d fix issue #367
the basic idea is to change clean up procedure to 2 steps,
the 1st step only marks the time controller as to be cleaned up,
the 2nd step executes in the timer thread and does the
actual job to avoid race.

I also change `pCtrl->ticks = rand() / pCtrl->maxTicks` to
`pCtrl->ticks = rand() % pCtrl->maxTicks`, because I think
this is a typo but not sure about this.
2019-08-18 14:45:16 +08:00
localvar 2e86495458 #368: fix 2 issues in tmrMemPool 2019-08-18 14:40:47 +08:00
localvar a97aac4ee5 improve memory pool
1. fix memory leak:
`memset(&pool_p, 0, sizeof(pool_p))` sets the pointer to NULL,
so `free(pool_p)` does nothing.
2. improve performance by move some code to the outside of the lock.
2019-08-18 14:24:40 +08:00
localvar 01bb110b45 fix & enhancement for udp connection handling
1. potential data race in `taosProcessMonitorTimer`:
the issue does not exist at present because there's only one scheduler
thread, which means there's no cocurrent calls to this function for a
same `pMonitor`. but if more scheduler threads are created later,
there's a data race issue in rare case. as threads number can be
easily increased by increase the value of `taosTmrThreads`, it is very
unlikely that the developer could realize this function need to be
revised together. that's why i say it is a 'potential' issue.

this issue happens in below scenario:
a. scheduler thread1: `if (pSet)` is true and new timer is installed by
`taosTmrReset`;
b. scheduler thread1: `if (pMonitor->pSet == NULL)` is true but
`taosTmrStopA` is blocked, either by the mutex of the timer or os thread
scheduler.
c. timer thread: 200ms elapse, new call to `taosProcessMonitorTimer` is
initialized in scheduler thread2;
d. scheduler thread2: `if (pMonitor->pTimer != tmrId)` is false;
e. scheduler thread1: unblocked, stops timer and frees `pMonitor`;
f. scheduler thread2: unexpected behavior because `pMonitor` is not
valid any more.

because the result of this issue is crash or worse, i suggest to fix it
though the possibility of all the conditions are met is very very low.

2. `pthread_attr_t` related issues: per manual, an initialized
`pthread_attr_t` can be reused, should be destroyed, and the behavior of
re-init it is undefined. this issue exist in other modules also.

3. memory leaks;

4. improve failure case handling of `taosInitUdpConnection`;

5. typo
2019-08-18 11:28:38 +08:00
Hongze Cheng 22aa8b08a7 add init dnode status 2019-08-17 15:46:51 +08:00
slguan e472edf6af
Merge pull request #378 from fangpanpan/master
[taosdemo] repeat insertation if failed, report failure when inserting 5 times
2019-08-17 15:04:36 +08:00
slguan 392bbb82f2
Merge pull request #350 from localvar/issue-349
Issue 349
2019-08-17 15:03:19 +08:00
fang 2aa6c66612 repeat insertation if failed, report failure when inserting 5 times 2019-08-16 17:59:41 +08:00
plum-lihui 4a644da7b1
Merge pull request #373 from satng/patch-1
Update taosSqlCgo.go
2019-08-16 14:40:00 +08:00
liuliang 0129a04aec
Update taosSqlCgo.go
这个dbname都没有传进行,在连接池的情况下,每个连接都在选 use db.

当连接池切换连接时,就会出现 invalid DB。
```
8/16 12:44:46 dsn.go:59: input dsn: root:taosdata@/tcp(127.0.0.1)/sensors_test
TAOS DRIVER 2019/08/16 12:44:46 dsn.go:130: cfg info: &{user:root passwd:taosdata net:/tcp addr:127.0.0.1 port:0 dbName:sensors_test params:map[] loc:0xed6be0 columnsWithAlias:false interpolateParams:true parseTime:true}
TAOS DRIVER 2019/08/16 12:44:46 taosSqlCgo.go:52: taosQuery() input sql:INSERT INTO d_BDCF682B78F44364AA551B0F5E6BD1F6_acc USING acc_data TAGS ('BDCF682B78F44364AA551B0F5E6BD1F6','20190816-
TAOS DRIVER 2019/08/16 12:44:46 taosSqlCgo.go:61: taos_query() failed: invalid DB
```
2019-08-16 13:09:46 +08:00
hzcheng 542da25452
Merge pull request #344 from localvar/enhance-scheduler
enhance robustness of scheduler
2019-08-15 14:51:57 +08:00
hzcheng b3f41997ee
Merge pull request #343 from localvar/fix-dead-code
fix dead code
2019-08-15 14:25:13 +08:00
slguan 1481c8d7ea fix issue #359 2019-08-15 13:17:52 +08:00
slguan 7026a5b3a4 compile errors in windows client 2019-08-14 19:51:42 +08:00
slguan 16902faad4 the version number is increased to 1.6.1.6 2019-08-14 19:41:05 +08:00
slguan 059b66d6b5 memory leak in windows 2019-08-14 19:40:33 +08:00
slguan 5374d82421 fix issue #201 #319 2019-08-14 19:40:09 +08:00
slguan 4bcb26a752 fix the problem that affectRows in python is incorrect 2019-08-14 19:37:33 +08:00
localvar e814ec4ca3 fix #349 2019-08-14 19:33:06 +08:00
localvar 09e6094643 fix bug in hex integer parse 2019-08-14 19:11:51 +08:00
hzcheng 62f9a90f9c
Merge pull request #346 from fangpanpan/master
upload code for cassandra/tdengine test
2019-08-14 14:13:10 +08:00
fang c9ebc4e33e upload code for cassandra/tdengine test 2019-08-14 11:21:44 +08:00
fang 01062e6691 upload code for cassandra/tdengine test 2019-08-14 11:16:22 +08:00
localvar 83eb20d3b3 enhance robustness of scheduler
1. check all memory allocation failure in `taosInitScheduler`;
2. make `pSched->numOfThreads` the actual number of created threads
to avoid crash in `taosCleanUpScheduler` when `pSched->qthread` is NULL
and other issues;
3. check interruption of `sem_wait` in `taosScheduleTask`,
and use `pTrace` instead of `pError` when `sem_wait` was interrupted;
4. cancel all threads before join them to enable cocurrent cancellation;
5. remove unused global variable.
2019-08-14 08:41:23 +08:00
localvar 44922907fd fix dead code 2019-08-14 08:35:30 +08:00
Zimeng Pan 6c316d204f temporary fix for WSLv1 2019-08-12 23:40:12 -07:00
huili 747e93260c [no master key column use timestamp in where] 2019-08-13 10:22:39 +08:00
slguan 0ee234ada4
Merge pull request #329 from fangpanpan/master
alter displaying information for default value of some options in taosdemo
2019-08-12 17:12:49 +08:00
fang 7506b1b7fa Merge branch 'master' of https://github.com/fangpanpan/TDengine 2019-08-12 16:10:44 +08:00
fang d8bc1cea0d alter displaying information for default value of some options 2019-08-12 16:10:26 +08:00
slguan 68373bbf5d
Merge pull request #326 from fangpanpan/master
change direcotry from taosbenchmark to taosdemo in CMakeList.txt
2019-08-12 09:09:07 +08:00
fangpanpan 37628b6f9f change direcotry from taosbenchmark to taosdemo in CMakeList.txt 2019-08-11 04:44:46 +08:00
slguan 13fc950bfd
Merge pull request #324 from robotspace/master
Return records with seperated fields in Lua connector.
2019-08-10 23:55:00 +08:00
slguan cfa7527c80
Merge pull request #305 from H-ZeX/fix-mem-leak
fix memory leak in os/linux/src/os.c::taosInitTimer #304
2019-08-10 23:52:37 +08:00
slguan c571c38bd6 revise issue #124 2019-08-10 23:51:19 +08:00
slguan 0da8e9ad2b revise issue #124 2019-08-10 23:21:49 +08:00
slguan 0e57b621b5
Merge pull request #124 from maikebing/master
Modify  json's date to Json standard time format ISO-8601
2019-08-10 23:09:31 +08:00
robot 026293617a Return records with seperated fields in lua connector.
Field names and values are both returned. Client application gets value by field name. It runs as convention except that bool type is returned as one byte,tiny integer. Bool type will be returned in future if tiny integer causes confusion.
2019-08-10 22:30:23 +08:00
slguan 50f0d969d0 fix issue #313 2019-08-09 16:59:57 +08:00
slguan eb82d86903 fix issue #313 2019-08-09 15:25:12 +08:00
slguan bcc1b40619 fix issue #313 2019-08-09 14:55:49 +08:00
hzcheng 744d31cbb6
Merge pull request #310 from fangpanpan/master
change the range of int data to 0-49
2019-08-09 13:26:02 +08:00