eBay / HomeObject

Replicated BLOB Store built upon HomeStore
Apache License 2.0
5 stars 12 forks source link

Fix issues in URI parser from folly #156

Open raakella1 opened 6 months ago

raakella1 commented 6 months ago

We use folly::Uri to parse the string we get from lookup call in repl service. There are several issues here

xiaoxichen commented 6 months ago

I get the first one (exception handling) however do not understand second one.... how can a port greater than uint16 which is defined in TCP/UDP protocol??

raakella1 commented 6 months ago

I get the first one (exception handling) however do not understand second one.... how can a port greater than uint16 which is defined in TCP/UDP protocol??

In my SM testing scripts, I am randomizing ports so that developers using the same build machine can parallelly use my scripts. Initially I used a random number between 5000, 99999 as a port. When ever the port value for home repl is greated than uint16::max, uri parser throws. All the other services (grpc, http etc) did not complain. Even in the SM config, we define hr_port as a uint32 variable which does not aligh with uri parser limits

xiaoxichen commented 6 months ago

that is something we need to handle in the command line check right? there is no possibility for you to open a port larger than 65535.

All the other services (grpc, http etc) did not complain.

As the max port number in TCP is 65535. I believe the listen call should error out if 99999 specified, is that indicating we have a bug in error handling there?