-
Notifications
You must be signed in to change notification settings - Fork 47
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
INTERNAL: read while PIPE_ERROR received in the pipe operation #839
Conversation
@uhm0311 λ¨Όμ 리뷰νλ©΄ λ©λλ€. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1μ°¨ μ§λ¬Έμ λλ€.
src/main/java/net/spy/memcached/protocol/ascii/CollectionPipedInsertOperationImpl.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2μ°¨, 리뷰 μ견과 μ§λ¬Έμ λλ€.
src/main/java/net/spy/memcached/internal/CompositeException.java
Outdated
Show resolved
Hide resolved
src/main/java/net/spy/memcached/protocol/ascii/CollectionBulkInsertOperationImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/spy/memcached/protocol/ascii/CollectionPipedInsertOperationImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/spy/memcached/protocol/ascii/OperationImpl.java
Outdated
Show resolved
Hide resolved
faec8fa
to
20cf3d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3μ°¨ 리뷰 μ견μ λλ€.
src/main/java/net/spy/memcached/protocol/ascii/OperationImpl.java
Outdated
Show resolved
Hide resolved
@oliviarla @uhm0311 |
5493230
to
466ff60
Compare
@uhm0311 @jhpark816
|
00d28cd
to
63fac49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4μ°¨ 리뷰 μ견μ λλ€.
src/main/java/net/spy/memcached/protocol/ascii/OperationImpl.java
Outdated
Show resolved
Hide resolved
a752f86
to
7bf52e7
Compare
@jhpark816 리뷰 λΆνλ립λλ€. |
@oliviarla 리뷰 μ§ν μ€μ λλ€. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μΌλΆ 리뷰
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 μλ£,
볡μ‘ν μ΄μλ€μ.
src/main/java/net/spy/memcached/protocol/ascii/CollectionPipedUpdateOperationImpl.java
Outdated
Show resolved
Hide resolved
@jhpark816 @uhm0311
|
리λ€μ΄λ νΈνλ€λ κ²μ΄ μ΄λ€ μλ―ΈμΈκ°μ?
resultκ° μλ μ§μ λ°λΌ νλ¨ν΄μΌ ν μ§ ? μ λμ λλμ΄ λλλ€. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
λ³κ²½ λ΄μμ λ€ λ°λΌκ°μ§ λͺ»ν΄μ μ§λ¬Έ λ¨κΉλλ€.
src/main/java/net/spy/memcached/protocol/ascii/CollectionPipedInsertOperationImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/spy/memcached/protocol/ascii/CollectionPipedInsertOperationImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/spy/memcached/protocol/BaseOperationImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/spy/memcached/protocol/ascii/CollectionPipedInsertOperationImpl.java
Outdated
Show resolved
Hide resolved
@uhm0311 리뷰 μλ£λμ ¨μκΉμ? |
μ§ν μ€μ λλ€. |
src/main/java/net/spy/memcached/protocol/ascii/CollectionPipedInsertOperationImpl.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 μλ£
src/main/java/net/spy/memcached/protocol/ascii/CollectionPipedInsertOperationImpl.java
Show resolved
Hide resolved
src/main/java/net/spy/memcached/protocol/ascii/CollectionPipedInsertOperationImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/spy/memcached/protocol/ascii/CollectionPipedInsertOperationImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/spy/memcached/protocol/ascii/CollectionPipedInsertOperationImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/spy/memcached/protocol/ascii/CollectionPipedInsertOperationImpl.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 μλ£
src/main/java/net/spy/memcached/protocol/BaseOperationImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/spy/memcached/protocol/ascii/CollectionPipedInsertOperationImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/spy/memcached/protocol/ascii/OperationImpl.java
Outdated
Show resolved
Hide resolved
protected void handleError(OperationErrorType eType, String line) throws IOException { | ||
getLogger().error("Error: %s by %s", line, this); | ||
exception = createException(eType, line); | ||
if (count == 0 && index == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CollectionPipedInsertOperationImpl ν΄λμ€μμ
λͺ
μμ μΌλ‘ indexλ₯Ό 0μΌλ‘ μ΄κΈ°νν΄ λλ κ²μ²λΌ
λͺ
μμ μΌλ‘ countλ 0μΌλ‘ μ΄κΈ°νν΄ λλ©΄ μ’κ² μ΅λλ€.
κ·Έλ¦¬κ³ , count == 0
μ‘°κ±΄λ§ μμ΄μΌ νκ³ , index == 0
쑰건μ λΉ μ ΈμΌ ν©λλ€.
μλ κ²½μ°μ index == 0
μ΄κΈ° λλ¬Έμ
λλ€.
RESPONSE 1
CLIENT_ERROR ...
PIPE_ERROR
κ·Έλ¦¬κ³ , switchoverμ redirectνλ κ²½μ°λ₯Ό κ³ λ €νλ€λ©΄,
count == 0
μ‘°κ±΄λ§ μμΌλ©΄ μΆ©λΆν μ§ κ°λ¨ν μ€λͺ
ν΄ μ£ΌμΈμ.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switchover / redirectνλ κ²½μ° count κ°μ΄ μ΄κΈ°νλλλ‘ μμ νμ΅λλ€. (count κ°μ νμ¬ μ¬μ©νκ³ μμ§ μκΈ° λλ¬Έμ μ΅μ RESPONSE <count>
μ 보λ₯Ό μ μ₯ν΄λλ μ©λλ‘λ§ μ¬μ©ν΄λ λ©λλ€.)
μ΄λ₯Ό ν΅ν΄ 첫 λ²μ§Έ μλ΅μΌλ‘ ERROR
κ° μ¬ κ²½μ° λ°λ‘ μμΈλ₯Ό λμ§κ³ , RESPONSE
μ΄νμ ERROR
κ° μ¬ κ²½μ° PIPE_ERRORλ₯Ό μ½λλ‘ ν©λλ€.
리뷰 λͺ¨λ λ°μνμ΅λλ€. |
src/main/java/net/spy/memcached/protocol/ascii/CollectionPipedInsertOperationImpl.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 μλ£
@@ -36,6 +36,8 @@ | |||
import net.spy.memcached.ops.OperationType; | |||
import net.spy.memcached.ops.StatusCode; | |||
|
|||
import static net.spy.memcached.ops.OperationErrorType.CLIENT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ§λ¬Έμ λλ€.
import static
μμ staticμ μ΄λ€ μλ―Έκ° λλμ?- κΈ°μ‘΄ μ½λμμλ CLIENTκ° μ¬μ©λκ³ μμ΅λλ€. μ΄λ―Έ κ΄λ ¨λ importκ° μ‘΄μ¬νμ§ μλ μ§ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static importλ₯Ό νκ² λλ©΄ ν΄λΉ λ³μλ μμλ₯Ό μ¬μ©ν λ μ μλ ν΄λμ€ μ΄λ¦μ λͺ
μνμ§ μκ³ μ¬μ©ν μ μμ΅λλ€.
μλ₯Ό λ€μ΄ μΌλ° import μμλ OperationErrorType.CLIENT
λ‘ μ¬μ©ν΄μΌ νμ§λ§, static import μμλ CLIENT
λ‘ μ¬μ©ν μ μλλ°, κΈ°μ‘΄μλ switchλ¬Έμ μ¬μ©ν΄μ static importν νμκ° μμμ΅λλ€.
λ€λ§ CLIENT
λ§ μ¬μ©νλ κ²λ³΄λ¨ OperationErrorType.CLIENT
μ¬μ©νλ κ²μ΄ λ μ΄ν΄κ° μ¬μΈ κ² κ°μ static importλ₯Ό μ κ±°νμ΅λλ€.
@@ -99,9 +102,11 @@ assert getState() == OperationState.READING | |||
if (hasSwitchedOver(line)) { | |||
this.insert.setNextOpIndex(index); | |||
prepareSwitchover(line); | |||
count = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switchover κ²½μ°λ₯Ό μλ‘ λ€λ©΄,
μ΄λ―Έ μΌλΆκ° μνλ μνμμ λλ¨Έμ§λ₯Ό switchoverν νμ μννλ©΄,
κ·Έ μ΄νμ κ²°κ³Όλ μμ
κ²°κ³Όλ‘ μ²λ¦¬ν΄μΌ ν κ² κ°μ΅λλ€.
NOT_MY_KEY κ²½μ°λ ν¨κ» κ²ν λ°λλλ€.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switchover, redirect λ‘ μΈν΄ μλ‘μ΄ λ³λ μμ²μ λ³΄λΈ ν μλ΅μ λ°μμ λ, RESPONSE
κ° μ¬ μλ μκ³ νλμ ERROR
λΌμΈμ΄ μ¬ μλ μμ΅λλ€.
μ΄ λ RESPONSE
κ° μμ λμλ§ μμΈλ₯Ό λμ§μ§ μλλ‘ νμ¬ PIPE_ERROR
κΉμ§ μ½λλ‘ ν©λλ€.
@jhpark816 |
π Related Issue
β¨οΈ What I did
PIPE_ERROR
λ₯Ό λκΉμ§ μ½λλ‘ λ³κ²½νλ€.PIPE_ERROR
λ₯Ό μ½μ§ μμλ€.PIPE_ERROR
λ₯Ό μ½λλ‘ λ³κ²½λ§ ν΄λκ³ , μνλμ§ μμ μ°μ°μ λν gotStatus() νΈμΆμ INTERNAL: make lop piped operations process synchronouslyΒ #795 μ μΆκ°νλλ‘ νλ€.