Commit Graph

27626 Commits

Author SHA1 Message Date
localvar 2e0dc43636 fix memory leak when request body is gziped 2019-08-24 19:01:34 +08:00
Jeff Tao 3e5ba2a7d0
Merge pull request #383 from localvar/udp-fix
fix & enhancement for udp connection handling
2019-08-24 18:42:49 +08:00
Jeff Tao a9ad56780f fix issue #418 2019-08-24 18:02:11 +08:00
johnnyhou327 36d85a600f Update issue templates 2019-08-24 17:45:21 +08:00
slguan 9465d94c74 fix the issue #404 2019-08-24 17:29:47 +08:00
slguan 263bab87d2 fix the issue #404 2019-08-24 16:31:06 +08:00
slguan a83cdd80d9 fix the issue $404 2019-08-24 16:25:45 +08:00
slguan 89b7228378 fix the issue #404 2019-08-24 16:07:16 +08:00
johnnyhou327 20c9577e66 Update issue templates 2019-08-24 15:13:20 +08:00
johnnyhou327 973df2bd82 Update issue templates 2019-08-24 15:12:20 +08:00
haojun Liao 7644749053
Merge pull request #410 from bluesky4485/master
标点符号错误修正
2019-08-24 15:06:04 +08:00
johnnyhou327 07fe35c34b Update issue templates 2019-08-24 15:05:18 +08:00
johnnyhou327 8426e15d21 Update issue templates 2019-08-24 15:01:50 +08:00
johnnyhou327 3210f7f4ca Update issue templates 2019-08-24 15:01:11 +08:00
johnnyhou327 a8b2ea63da Update issue templates 2019-08-24 15:00:59 +08:00
johnnyhou327 dbd0a0f474 Update issue templates 2019-08-24 15:00:49 +08:00
haojun Liao 8eff6c4da9
Merge pull request #413 from localvar/mem-leak-in-taos_query_a
fix memory leak in taos_query_a
2019-08-24 14:52:48 +08:00
johnnyhou327 3d24d6e378 Update issue templates 2019-08-24 14:28:01 +08:00
johnnyhou327 6be94bdb05 Update issue templates 2019-08-24 14:16:32 +08:00
localvar 693ee662af fix several issues in string token parsing
1. the shell should not remove escape sequence \' and \" in a string.
2. `tsParseTime` should not unescape the next string token (this issue
appears after the first issue was fixed).
3. `value[4] != '-'` in `tsParseTime` crashes in rare case if `value[4]`
is in unallocated virtual memory.
4. `operator[x]` and `delimiter[x]` may result in unexcepted behavior
as string is utf-8 encoded and `x < 0` could be true.
5. changes the behavior of `tscGetToken` a little: now, unescaped single
quotation is allowed in double quoted strings and unescaped double quotation
is allowed in single quoted strings.
6. minor performance improvements and other improvements.
2019-08-24 14:04:56 +08:00
localvar a10c0e97ef fix strtolower 2019-08-24 08:14:41 +08:00
localvar b567548b25 fix memory leak in taos_query_a
restful commands with length between 65380 and 65536 can trigger
this issue.
2019-08-23 20:50:36 +08:00
黄科 3880a322b0 标点符号错误修正 2019-08-23 14:07:01 +08:00
slguan 90e5690df5 fix the issue #405 2019-08-23 10:00:48 +08:00
slguan 06b7af06a2 fix the issue #404 2019-08-23 09:58:08 +08:00
fang d1f337c9bc add opentsdb test code 2019-08-22 18:34:01 +08:00
slguan 35aa9a95e4 fix the issue #370, support for compilation of vs2019 2019-08-22 18:26:57 +08:00
slguan e21091a6cd Merge branch 'master' of https://github.com/taosdata/TDengine 2019-08-22 18:24:44 +08:00
slguan 4693495a3d remove extra blanks while tag values is null 2019-08-22 18:24:39 +08:00
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