Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Пронин Валентин / ИТМО DWS / Stage 6 #206

Merged
merged 54 commits into from
May 25, 2024

Conversation

GonarchX
Copy link
Contributor

No description provided.

Valentin Pronin and others added 30 commits February 18, 2024 01:35
# Conflicts:
#	src/main/java/ru/vk/itmo/test/proninvalentin/MemorySegmentFactory.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/Server.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/ServiceImpl.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/StartServer.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/lua_scripts/get.lua
#	src/main/java/ru/vk/itmo/test/proninvalentin/lua_scripts/put.lua
# Conflicts:
#	src/main/java/ru/vk/itmo/test/proninvalentin/MemorySegmentFactory.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/Server.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/ServiceImpl.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/StartServer.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/lua_scripts/put.lua
#	src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage2/report.md
Valentin Pronin added 9 commits April 12, 2024 22:19
# Conflicts:
#	src/main/java/ru/vk/itmo/test/proninvalentin/Server.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/ServerConfig.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/ServiceImpl.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/StartServer.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/Utils.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/sharding/ConsistentHashing.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/sharding/ShardingAlgorithm.java
#	src/main/java/ru/vk/itmo/test/proninvalentin/workers/WorkerPool.java
# Conflicts:
#	src/main/java/ru/vk/itmo/test/reference/ReferenceServer.java
Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 17435 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 17434 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 17434 lines exceeds the maximum allowed for the inline comments feature.

@incubos incubos requested review from urbanchef and removed request for vladimir-bf April 29, 2024 16:03
@incubos incubos assigned urbanchef and unassigned vladimir-bf Apr 29, 2024
Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 20365 lines exceeds the maximum allowed for the inline comments feature.


private static final byte[] START_STREAM_HEADERS_BYTES =
"""
HTTP/1.1 200 OK\r
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

По спеке HTTP 1.1 не \r, а \r\n.

public void writePart(Socket socket) throws IOException {
byte[] part = getNextPart();
String dataSize = Integer.toHexString(part.length);
byte[] data = new ByteArrayBuilder(dataSize.length() + part.length + 2 * CRLF.length())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем билдер? Можем же посчитать заранее сколько нужно байт

.append(part).append(CRLF)
.toBytes();

socket.write(data, 0, data.length);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь можем не все записать в сокет

"Returns:
The number of bytes written, possibly zero"

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 20365 lines exceeds the maximum allowed for the inline comments feature.

@incubos incubos merged commit 0b04920 into polis-vk:main May 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants