labring / sealfs

The storage system of sealos, aims to be a high-performance, high-reliability, and auto-scaling distributed file system
Apache License 2.0
141 stars 20 forks source link

CircularQueue should not exceed its capacity. #75

Closed mond77 closed 1 year ago

luanshaotong commented 1 year ago

My original design was to have a fixed-length queue that handles most occasions. If there are too many requests, they will be blocked instead of being sent to the remote end. Furthermore, implementing variable-length queues increases the complexity of the implementation. Is there a better design? 我原本的设计是有一个固定长度的队列,用于处理大多数场合。如果请求过多,会被阻塞,而不是向远端发送。此外,实现变长队列会增加实现的复杂的。有更好的设计吗?