Tcp Bulk Insert Repo Insertion Protocol

Tcp Bulk Insert Repo Insertion Protocol is a special part of the repo insertion protocol.

When repo and producer run on the same host, we can use TCP bulk to directly insert data in to repo storage.

Basic operations


Listen is a initial repo operation. Repo first listens on a TCP socket by invoking listen(). The information of host and port number are passed as parameters. The whole insertion is an async process, and main thread will keep listening and assigning tasks to different child thread.


Handle includes 2 operations.: handleAccept, handleReceive. HandleAccept() is a callback function of listen(). It will accept the connection from socket, and prepare accepting the next connection after this process. After finishing the connection, HandleReceive will be called to analyze data package.


Initiate the handleReceive function and prepare async receive.

ProcessId is a random number generated by client to indicate the deletion process. Repo will match this ProcessId with this deletion process.

Updated by weijia yuan about 3 years ago · 2 revisions