Rename MAX_BUFFER_SIZE
MAX_BUFFER_SIZE, which is used for limiting the amount of the data read from a socket renamed to MXS_MAX_NW_READ_BUFFER_SIZE and moved from gw.h to limits.h. Consider removing altogether. Difficult to justify since non-blocking reads are used and the amount of available data is known.
This commit is contained in:
@ -1069,7 +1069,7 @@ dcb_basic_read(DCB *dcb, int bytesavailable, int maxbytes, int nreadtotal, int *
|
||||
{
|
||||
GWBUF *buffer;
|
||||
|
||||
int bufsize = MXS_MIN(bytesavailable, MAX_BUFFER_SIZE);
|
||||
int bufsize = MXS_MIN(bytesavailable, MXS_MAX_NW_READ_BUFFER_SIZE);
|
||||
if (maxbytes)
|
||||
{
|
||||
bufsize = MXS_MIN(bufsize, maxbytes - nreadtotal);
|
||||
@ -1187,10 +1187,10 @@ dcb_read_SSL(DCB *dcb, GWBUF **head)
|
||||
static GWBUF *
|
||||
dcb_basic_read_SSL(DCB *dcb, int *nsingleread)
|
||||
{
|
||||
unsigned char temp_buffer[MAX_BUFFER_SIZE];
|
||||
unsigned char temp_buffer[MXS_MAX_NW_READ_BUFFER_SIZE];
|
||||
GWBUF *buffer = NULL;
|
||||
|
||||
*nsingleread = SSL_read(dcb->ssl, (void *)temp_buffer, MAX_BUFFER_SIZE);
|
||||
*nsingleread = SSL_read(dcb->ssl, (void *)temp_buffer, MXS_MAX_NW_READ_BUFFER_SIZE);
|
||||
dcb->stats.n_reads++;
|
||||
|
||||
switch (SSL_get_error(dcb->ssl, *nsingleread))
|
||||
|
||||
@ -108,7 +108,7 @@ typedef enum avro_binlog_end
|
||||
#define TABLE_MAP_MAX_NAME_LEN 64
|
||||
|
||||
/** How many bytes each thread tries to send */
|
||||
#define AVRO_DATA_BURST_SIZE MAX_BUFFER_SIZE
|
||||
#define AVRO_DATA_BURST_SIZE (32 * 1024)
|
||||
|
||||
/** A CREATE TABLE abstraction */
|
||||
typedef struct table_create
|
||||
|
||||
Reference in New Issue
Block a user