ClickHouse/src/IO
Salvatore Mesoraca 6b49968bc4
Generate safe IVs
IVs should never be re-used when using CTR.
The previous implementation had a 50% probability to generate
an IV that was already used after 65536 generations.
This happens because std::mt19937 is seeded using a 32bit integer
and returns a 32 bits integer.
Because of the birthday problem, collisions have a 50% chance after
only 2^16 IV's generations.
CH uses one IV per file and, for most use cases, 65k files are
not as many as they seem.
Also, the initial entropy is gathered using std::random_device
which is "best-effort" and it's allowed by the standard to
return a fixed sequence of numbers.
2023-06-16 17:09:08 +02:00
..
Archives remove reminder comments 2023-05-30 12:26:20 +02:00
examples Merge pull request #48628 from ClickHouse/rs/var_uint_max 2023-04-13 10:17:55 +02:00
Resource Unify priorities: rework IO scheduling subsystem 2023-05-25 13:25:41 +00:00
S3 Unify priorities: lower value means higher priority (#50205) 2023-05-26 15:55:30 +02:00
tests fix hung in unit tests (#50391) 2023-05-31 19:20:58 +03:00
AIO.cpp Fix -Wshorten-64-to-32 on FreeBSD 2022-12-12 08:05:28 +01:00
AIO.h
AsynchronousReadBufferFromFile.cpp Unify priorities: lower value means higher priority (#50205) 2023-05-26 15:55:30 +02:00
AsynchronousReadBufferFromFile.h Unify priorities: lower value means higher priority (#50205) 2023-05-26 15:55:30 +02:00
AsynchronousReadBufferFromFileDescriptor.cpp Unify priorities: lower value means higher priority (#50205) 2023-05-26 15:55:30 +02:00
AsynchronousReadBufferFromFileDescriptor.h Unify priorities: lower value means higher priority (#50205) 2023-05-26 15:55:30 +02:00
AsynchronousReader.h Unify priorities: lower value means higher priority (#50205) 2023-05-26 15:55:30 +02:00
AsyncReadCounters.cpp Resubmit prefetches 2023-02-08 21:26:24 +01:00
AsyncReadCounters.h Make async reader work with any impl 2023-05-22 19:54:04 +02:00
BitHelpers.h Minor changes 2023-04-23 05:49:39 +02:00
BoundedReadBuffer.cpp Something 2023-04-17 04:58:32 +00:00
BoundedReadBuffer.h Something 2023-04-17 04:58:32 +00:00
BrotliReadBuffer.cpp Add file name to exception raised during decompression 2023-04-27 02:52:23 +00:00
BrotliReadBuffer.h
BrotliWriteBuffer.cpp remove reminder comments 2023-05-30 12:26:20 +02:00
BrotliWriteBuffer.h
BufferBase.h
BufferWithOwnMemory.h Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
Bzip2ReadBuffer.cpp Add file name to exception raised during decompression 2023-04-27 02:52:23 +00:00
Bzip2ReadBuffer.h
Bzip2WriteBuffer.cpp remove reminder comments 2023-05-30 12:26:20 +02:00
Bzip2WriteBuffer.h
CascadeWriteBuffer.cpp Don't use CURRENT_WRITE_BUFFER_IS_EXHAUSTED for expected behaviour 2023-03-31 14:09:21 +02:00
CascadeWriteBuffer.h Don't use CURRENT_WRITE_BUFFER_IS_EXHAUSTED for expected behaviour 2023-03-31 14:09:21 +02:00
CMakeLists.txt
CompressedReadBufferWrapper.h Unify priorities: lower value means higher priority (#50205) 2023-05-26 15:55:30 +02:00
CompressionMethod.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
CompressionMethod.h Add methods to the tests 2022-10-04 19:04:03 +00:00
ConcatReadBuffer.h
ConcatSeekableReadBuffer.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
ConcatSeekableReadBuffer.h
ConnectionTimeouts.cpp Add separate handshake_timeout for receiving Hello packet from replica 2023-05-17 11:39:04 +00:00
ConnectionTimeouts.h Add separate handshake_timeout for receiving Hello packet from replica 2023-05-17 11:39:04 +00:00
copyData.cpp use http request body in predefined http handlers 2023-03-02 12:51:48 +01:00
copyData.h use http request body in predefined http handlers 2023-03-02 12:51:48 +01:00
DoubleConverter.cpp
DoubleConverter.h abort instead of __builtin_unreachable in debug builds 2022-10-07 21:49:08 +02:00
EmptyReadBuffer.h
FileEncryptionCommon.cpp Generate safe IVs 2023-06-16 17:09:08 +02:00
FileEncryptionCommon.h Use fingerprints instead of key IDs in encrypted disks (#49882) 2023-05-31 13:11:10 +02:00
ForkWriteBuffer.cpp remove reminder comments 2023-05-30 12:26:20 +02:00
ForkWriteBuffer.h
HadoopSnappyReadBuffer.cpp Better 2023-05-01 13:01:23 +00:00
HadoopSnappyReadBuffer.h Better 2023-05-01 13:01:23 +00:00
HashingReadBuffer.h
HashingWriteBuffer.cpp
HashingWriteBuffer.h Allow LowCardinality in GenerateRandom 2023-01-26 15:35:20 +01:00
HTTPChunkedReadBuffer.cpp fix some bad error messages, suppress others 2023-05-02 17:55:42 +02:00
HTTPChunkedReadBuffer.h
HTTPCommon.cpp Fix changed IP for https session 2023-05-26 09:08:34 +03:00
HTTPCommon.h Remove duplicate code 2023-04-15 02:40:21 +08:00
HTTPHeaderEntries.h Replace old named collections code for url 2022-12-17 00:24:05 +01:00
IReadableWriteBuffer.h
IResourceManager.h integrate IO scheduler with buffers 2023-01-27 18:47:22 +00:00
ISchedulerConstraint.h fix typos 2022-09-27 15:20:43 +00:00
ISchedulerNode.h Unify priorities: rework IO scheduling subsystem 2023-05-25 13:25:41 +00:00
ISchedulerQueue.h fix typos 2023-01-27 22:48:02 +00:00
LimitReadBuffer.cpp fix multipart requests 2023-02-22 17:54:35 +01:00
LimitReadBuffer.h fix multipart requests 2023-02-22 17:54:35 +01:00
LimitSeekableReadBuffer.cpp Fix LimitSeekableReadBuffer. 2023-05-11 22:58:05 +02:00
LimitSeekableReadBuffer.h Copy files to S3 during backup directly without using WriteBufferFromS3 to decrease memory consumption. 2023-01-17 09:35:41 +01:00
Lz4DeflatingWriteBuffer.cpp remove reminder comments 2023-05-30 12:26:20 +02:00
Lz4DeflatingWriteBuffer.h
Lz4InflatingReadBuffer.cpp Add file name to exception raised during decompression 2023-04-27 02:52:23 +00:00
Lz4InflatingReadBuffer.h
LZMADeflatingWriteBuffer.cpp remove reminder comments 2023-05-30 12:26:20 +02:00
LZMADeflatingWriteBuffer.h
LZMAInflatingReadBuffer.cpp Add file name to exception raised during decompression 2023-04-27 02:52:23 +00:00
LZMAInflatingReadBuffer.h
MemoryReadWriteBuffer.cpp Don't use CURRENT_WRITE_BUFFER_IS_EXHAUSTED for expected behaviour 2023-03-31 14:09:21 +02:00
MemoryReadWriteBuffer.h Don't use CURRENT_WRITE_BUFFER_IS_EXHAUSTED for expected behaviour 2023-03-31 14:09:21 +02:00
MMappedFile.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
MMappedFile.h Rename as suggested by Kita 2021-03-28 22:24:28 +03:00
MMappedFileCache.h
MMappedFileDescriptor.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
MMappedFileDescriptor.h
MMapReadBufferFromFile.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
MMapReadBufferFromFile.h
MMapReadBufferFromFileDescriptor.cpp Get rid of SeekableReadBufferFactory, add SeekableReadBuffer::readBigAt() instead 2023-06-01 18:48:30 -07:00
MMapReadBufferFromFileDescriptor.h Get rid of SeekableReadBufferFactory, add SeekableReadBuffer::readBigAt() instead 2023-06-01 18:48:30 -07:00
MMapReadBufferFromFileWithCache.cpp Rewrite StorageFile buffer creation with createReadBufferFromFileBase. 2022-12-07 22:31:32 -05:00
MMapReadBufferFromFileWithCache.h
MySQLBinlogEventReadBuffer.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
MySQLBinlogEventReadBuffer.h
MySQLPacketPayloadReadBuffer.cpp Enforce checking read output 2022-11-11 10:56:18 +01:00
MySQLPacketPayloadReadBuffer.h
MySQLPacketPayloadWriteBuffer.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
MySQLPacketPayloadWriteBuffer.h
NullWriteBuffer.cpp
NullWriteBuffer.h
OpenedFile.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
OpenedFile.h
OpenedFileCache.h
Operators.h Use string concatenation for XML serialization (#47251) 2023-03-05 18:19:33 +01:00
ParallelReadBuffer.cpp Get rid of SeekableReadBufferFactory, add SeekableReadBuffer::readBigAt() instead 2023-06-01 18:48:30 -07:00
ParallelReadBuffer.h Get rid of SeekableReadBufferFactory, add SeekableReadBuffer::readBigAt() instead 2023-06-01 18:48:30 -07:00
parseDateTimeBestEffort.cpp Fix runtime bug 2023-06-06 11:42:45 +03:00
parseDateTimeBestEffort.h
PeekableReadBuffer.cpp fix 2023-01-24 17:10:54 +01:00
PeekableReadBuffer.h Unify priorities: lower value means higher priority (#50205) 2023-05-26 15:55:30 +02:00
Progress.cpp Better handling of values too large for VarInt encoding 2023-04-11 07:47:33 +00:00
Progress.h
ReadBuffer.cpp Copy files to S3 during backup directly without using WriteBufferFromS3 to decrease memory consumption. 2023-01-17 09:35:41 +01:00
ReadBuffer.h Unify priorities: lower value means higher priority (#50205) 2023-05-26 15:55:30 +02:00
ReadBufferFromEmptyFile.h
ReadBufferFromEncryptedFile.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
ReadBufferFromEncryptedFile.h Generate config.h into ${CONFIG_INCLUDE_PATH} 2022-09-28 12:48:26 +00:00
ReadBufferFromFile.cpp Add ability to throttle local IO on per-query/server basis 2023-04-05 09:39:15 +02:00
ReadBufferFromFile.h Add ability to throttle local IO on per-query/server basis 2023-04-05 09:39:15 +02:00
ReadBufferFromFileBase.cpp Use forward declaration of ThreadPool 2023-04-07 11:25:35 +02:00
ReadBufferFromFileBase.h Fix builds 2023-01-10 19:22:18 +00:00
ReadBufferFromFileDecorator.cpp
ReadBufferFromFileDecorator.h Make async reader work with any impl 2023-05-22 19:54:04 +02:00
ReadBufferFromFileDescriptor.cpp Get rid of SeekableReadBufferFactory, add SeekableReadBuffer::readBigAt() instead 2023-06-01 18:48:30 -07:00
ReadBufferFromFileDescriptor.h Get rid of SeekableReadBufferFactory, add SeekableReadBuffer::readBigAt() instead 2023-06-01 18:48:30 -07:00
ReadBufferFromIStream.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
ReadBufferFromIStream.h
ReadBufferFromMemory.cpp Fix checksum calculation for backup entries (#50264) 2023-05-27 14:35:37 +02:00
ReadBufferFromMemory.h Add convenience ctor to ReadBufferFromMemory 2022-10-27 10:26:55 +02:00
ReadBufferFromPocoSocket.cpp Fix bugs in Poco, use true non-blocking IO 2023-05-26 23:11:57 +00:00
ReadBufferFromPocoSocket.h Fix bugs in Poco, use true non-blocking IO 2023-05-26 23:11:57 +00:00
ReadBufferFromS3.cpp Get rid of SeekableReadBufferFactory, add SeekableReadBuffer::readBigAt() instead 2023-06-01 18:48:30 -07:00
ReadBufferFromS3.h Get rid of SeekableReadBufferFactory, add SeekableReadBuffer::readBigAt() instead 2023-06-01 18:48:30 -07:00
ReadBufferFromString.h
readDecimalText.h reformat ParsingException 2023-01-24 23:21:29 +01:00
readFloatText.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
readFloatText.h Remove PVS-Studio 2023-02-19 23:30:05 +01:00
ReadHelpers.cpp Merge pull request #50519 from ClibMouse/feature/uuid-serialization 2023-06-06 09:18:19 +02:00
ReadHelpers.h Merge pull request #50405 from ClibMouse/feature/reservoir-sampler-big-endian-support 2023-06-13 09:55:23 +02:00
ReadHelpersArena.h Style 2023-04-14 10:35:33 +02:00
ReadSettings.h Changes related to an internal feature 2023-06-05 18:20:38 -07:00
ReadWriteBufferFromHTTP.cpp Get rid of SeekableReadBufferFactory, add SeekableReadBuffer::readBigAt() instead 2023-06-01 18:48:30 -07:00
ReadWriteBufferFromHTTP.h Get rid of SeekableReadBufferFactory, add SeekableReadBuffer::readBigAt() instead 2023-06-01 18:48:30 -07:00
ResourceBudget.h fix typos 2023-01-27 22:48:02 +00:00
ResourceGuard.h fix typos 2023-01-27 22:48:02 +00:00
ResourceLink.h integrate IO scheduler with buffers 2023-01-27 18:47:22 +00:00
ResourceManagerFactory.h IO scheduling subsystem 2022-09-27 13:26:41 +00:00
ResourceRequest.h integrate IO scheduler with buffers 2023-01-27 18:47:22 +00:00
S3Common.cpp Add support for SSE-KMS configuration with S3 2023-05-03 21:35:38 -05:00
S3Common.h fix special build 2023-05-10 18:45:59 +00:00
SchedulerNodeFactory.h IO scheduling subsystem 2022-09-27 13:26:41 +00:00
SchedulerRoot.h more fixes 2022-12-16 13:25:26 +00:00
SeekableReadBuffer.cpp Get rid of SeekableReadBufferFactory, add SeekableReadBuffer::readBigAt() instead 2023-06-01 18:48:30 -07:00
SeekableReadBuffer.h impl 2023-06-13 20:02:50 +02:00
SharedThreadPools.cpp Rework loading and removing of data parts for MergeTree tables. (#49474) 2023-06-06 14:42:56 +02:00
SharedThreadPools.h Rework loading and removing of data parts for MergeTree tables. (#49474) 2023-06-06 14:42:56 +02:00
SnappyReadBuffer.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
SnappyReadBuffer.h Generate config.h into ${CONFIG_INCLUDE_PATH} 2022-09-28 12:48:26 +00:00
SnappyWriteBuffer.cpp remove reminder comments 2023-05-30 12:26:20 +02:00
SnappyWriteBuffer.h Generate config.h into ${CONFIG_INCLUDE_PATH} 2022-09-28 12:48:26 +00:00
StdIStreamFromMemory.cpp work with comments on PR 2023-05-15 14:41:51 +02:00
StdIStreamFromMemory.h work with comments on PR 2023-05-15 14:41:51 +02:00
StdStreamBufFromReadBuffer.cpp Fix using std::ios_base::end in StdStreamFromReadBuffer::seekg(). 2023-01-17 17:56:14 +01:00
StdStreamBufFromReadBuffer.h Split upload into parts of the same size for smooth uploading. 2023-01-17 09:35:43 +01:00
StdStreamFromReadBuffer.h Split upload into parts of the same size for smooth uploading. 2023-01-17 09:35:43 +01:00
SwapHelper.cpp rework WriteBufferFromS3, squashed 2023-05-10 18:31:47 +00:00
SwapHelper.h rework WriteBufferFromS3, squashed 2023-05-10 18:31:47 +00:00
SynchronousReader.cpp
SynchronousReader.h Get rid of static threadpools 2022-09-07 17:48:11 +02:00
TimeoutSetter.cpp Change default value of handshake_timeout to 10 sec, fix possible use-after-free 2023-05-23 11:39:40 +00:00
TimeoutSetter.h Change default value of handshake_timeout to 10 sec, fix possible use-after-free 2023-05-23 11:39:40 +00:00
UncompressedCache.h Cleanup: Untangle CacheBase's constructors 2023-03-13 15:11:12 +00:00
UseSSL.cpp Generate config.h into ${CONFIG_INCLUDE_PATH} 2022-09-28 12:48:26 +00:00
UseSSL.h
VarInt.cpp VarInt coding: Always perform sanity check 2023-04-13 09:44:35 +00:00
VarInt.h VarInt coding: Always perform sanity check 2023-04-13 09:44:35 +00:00
WithFileName.cpp Get rid of SeekableReadBufferFactory, add SeekableReadBuffer::readBigAt() instead 2023-06-01 18:48:30 -07:00
WithFileName.h Add file name to exception raised during decompression 2023-04-27 02:52:23 +00:00
WithFileSize.cpp Get rid of SeekableReadBufferFactory, add SeekableReadBuffer::readBigAt() instead 2023-06-01 18:48:30 -07:00
WithFileSize.h
WriteBuffer.h rework WriteBufferFromS3, squashed 2023-05-10 18:31:47 +00:00
WriteBufferDecorator.h
WriteBufferFromArena.h
WriteBufferFromEncryptedFile.cpp remove reminder comments 2023-05-30 12:26:20 +02:00
WriteBufferFromEncryptedFile.h Generate config.h into ${CONFIG_INCLUDE_PATH} 2022-09-28 12:48:26 +00:00
WriteBufferFromFile.cpp Add ability to throttle local IO on per-query/server basis 2023-04-05 09:39:15 +02:00
WriteBufferFromFile.h Add ability to throttle local IO on per-query/server basis 2023-04-05 09:39:15 +02:00
WriteBufferFromFileBase.cpp
WriteBufferFromFileBase.h
WriteBufferFromFileDecorator.cpp remove reminder comments 2023-05-30 12:26:20 +02:00
WriteBufferFromFileDecorator.h rework WriteBufferFromS3, squashed 2023-05-10 18:31:47 +00:00
WriteBufferFromFileDescriptor.cpp remove reminder comments 2023-05-30 12:26:20 +02:00
WriteBufferFromFileDescriptor.h Add ability to throttle local IO on per-query/server basis 2023-04-05 09:39:15 +02:00
WriteBufferFromFileDescriptorDiscardOnFailure.cpp fix tracing of profile events 2022-12-08 15:13:53 +00:00
WriteBufferFromFileDescriptorDiscardOnFailure.h
WriteBufferFromHTTP.cpp Pass headers from StorageURL to WriteBufferFromHTTP (#46996) 2023-03-03 13:55:52 +01:00
WriteBufferFromHTTP.h Pass headers from StorageURL to WriteBufferFromHTTP (#46996) 2023-03-03 13:55:52 +01:00
WriteBufferFromOStream.cpp remove reminder comments 2023-05-30 12:26:20 +02:00
WriteBufferFromOStream.h
WriteBufferFromPocoSocket.cpp Merge branch 'master' into fix-secure-async-read-write 2023-06-01 16:24:54 +02:00
WriteBufferFromPocoSocket.h Fix bugs in Poco, use true non-blocking IO 2023-05-26 23:11:57 +00:00
WriteBufferFromS3.cpp Merge pull request #50518 from CheSema/lesser-traces 2023-06-03 10:57:45 +02:00
WriteBufferFromS3.h Get rid of finalize callback in object storages 2023-05-19 17:29:37 +02:00
WriteBufferFromS3BufferAllocationPolicy.cpp work with comments on PR 2023-05-15 14:41:51 +02:00
WriteBufferFromS3TaskTracker.cpp Merge pull request #50444 from CheSema/less-logs-second-try 2023-06-02 18:43:44 +02:00
WriteBufferFromS3TaskTracker.h cope with finalize in d-tors 2023-05-30 12:26:20 +02:00
WriteBufferFromString.h
WriteBufferFromVector.h use old_size 2023-06-05 08:43:55 +08:00
WriteBufferValidUTF8.cpp Remove cruft from build 2023-03-17 13:44:04 +00:00
WriteBufferValidUTF8.h
WriteHelpers.cpp Implement review comments 2023-06-05 08:18:03 -07:00
WriteHelpers.h Merge pull request #50405 from ClibMouse/feature/reservoir-sampler-big-endian-support 2023-06-13 09:55:23 +02:00
WriteIntText.h
WriteSettings.h Add ability to throttle local IO on per-query/server basis 2023-04-05 09:39:15 +02:00
ZlibDeflatingWriteBuffer.cpp Clean up GCC warning pragmas 2023-04-11 18:21:08 +00:00
ZlibDeflatingWriteBuffer.h
ZlibInflatingReadBuffer.cpp Add file name to exception raised during decompression 2023-04-27 02:52:23 +00:00
ZlibInflatingReadBuffer.h fix reading from storage File compressed files with zlib and gzip compression 2023-03-20 20:56:43 +00:00
ZstdDeflatingAppendableWriteBuffer.cpp remove reminder comments 2023-05-30 12:26:20 +02:00
ZstdDeflatingAppendableWriteBuffer.h Preallocate more space 2023-01-25 16:26:14 +00:00
ZstdDeflatingWriteBuffer.cpp remove reminder comments 2023-05-30 12:26:20 +02:00
ZstdDeflatingWriteBuffer.h
ZstdInflatingReadBuffer.cpp Add file name to exception raised during decompression 2023-04-27 02:52:23 +00:00
ZstdInflatingReadBuffer.h