Note that this found 2 bugs where errors were being silently ignored.
These are really simple fixes that didn't require much thought.
There are still more staticcheck warnings that should be fixed.
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
1. Set the default txn size limit to 1G
2. Reduce memory footprint during insert for the large txn
3. Recycle the session buffer memory to avoid leak
4. Set rate limit to avoid 2PC prewrite overloads the TiKV
5. Start ttlManager for the large txn
* consecutive id
* add AllocN interface func for util/kvencoder/allocator.go
* fix allocN test
* fix allocN tests
* fix allocN test 1
* fix allocN test 2
* fix allocN test 3
* fix allocN test 4
* fix cache
* add auto consecutive increment id in insert executor
* add auto consecutive increment id comment in insert executor
* try fix test case
* fix session_test.TestAutoIncrementID autoid overflow
* fix session_test.TestAutoIncrementID unsighed autoid overflow
* fix autoid usigned computing overflow
* fix conflict with suli's PR
* fix index out of range
* merge similar function
* delete fillRowLazy
* fix commment
* fix bug of rebase
* fix auto.go maxUint64 will be allocated
* fix maxInt64 autoid allocated
* fix batch rowIdx update
* add maxUint64 and maxInt64 limit in allocN
* reconstruct the autoid lazy alloc
* fix format
* remove commnet
* use new kind of logutil.logger(ctx) instead of logutil.BgLogger()
* combine alloc() and allocN together
* remove cache of hasValue
* remove cache of hasValue
* remove cache of hasValue
* remove cache of hasValue
* add test : autoID can find in retryInfo
* add test : autoID can find in retryInfo
* extract retry logic
* extract retry logic
* Update executor/insert_common.go
Co-Authored-By: bb7133 <bb7133@gmail.com>
* Update executor/insert_common.go
Co-Authored-By: bb7133 <bb7133@gmail.com>
* fix comment
* fix comment
* fix comment
* fix comment
* fix comment
* return min and max instead of slice in alloc autoid
* return min and max instead of slice in alloc autoid
* return min and max instead of slice in alloc autoid
* add comment for alloc N