-
Notifications
You must be signed in to change notification settings - Fork 301
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
[JDBC 라이브러리 구현하기 - 2단계] 에버(손채영) 미션 제출합니다. #743
Conversation
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.
안녕하세요 에버~!
요구사항이 만족되었고 학습테스트도 열심히 작성해주셨네요!
이번 단계는 크게 리뷰할 사항이 없을 것 같아요. 빠르게 다음 단계 진행하시죠 ㅎㅎ
질문 하나 남겼으니 코멘트나 다음 단계 때 답변 주시면 좋을 것 같습니다.
@FunctionalInterface | ||
public interface ConsumerWrapper<T> { | ||
void accept(T t) throws SQLException; | ||
} |
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.
👍
Read Uncommitted : [발생] 커밋되지 않은 데이터도 접근 가능하므로 | ||
Read Committed : [발생] 커밋된 데이터 접근 가능하므로 | ||
Repeatable Read : [미발생] 동일한 행을 여러번 읽어도 같은 결과를 보장하므로 | ||
Serializable : [미발생] 모든 읽기/쓰기 동작을 잠그므로 |
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.
👍
@@ -70,7 +68,7 @@ void noPoling() throws SQLException { | |||
|
|||
// 테스트 결과를 확인한다. | |||
log.info("Elapsed runtime: {}", ClockSource.elapsedDisplayString(start, end)); | |||
} | |||
} // 11s 963ms |
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개이지만, 두번째 트랜잭션은 사용 X | ||
// 주석 없는 경우: 물리적 트랜잭션 1개이지만 사용 X (saveSecondTransactionWithNotSupported) |
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.
다음 단계에서 관련하여 답변 드리겠습니다!
private static void executeSql(String sql, Statement statement) throws SQLException { | ||
String[] queries = sql.split(DELIMITER_OF_QUERY); | ||
for (String query : queries) { | ||
statement.addBatch(query); | ||
} | ||
statement.executeBatch(); |
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.
순차 실행으로 변경하셨군요!
allowMultiQueries=true
옵션을 줘서 동시 실행이 가능하도록 변경할 수도 있습니다.
알아만 두시죠 ㅎㅎ
private static DataSource createMySQLDataSource(final JdbcDatabaseContainer<?> container) {
final var config = new HikariConfig();
config.setJdbcUrl(container.getJdbcUrl() + "?allowMultiQueries=true");
config.setUsername(container.getUsername());
config.setPassword(container.getPassword());
config.setDriverClassName(container.getDriverClassName());
return new HikariDataSource(config);
}
몰리 안녕하세요 ~
2단계 리팩터링 진행 후 리뷰 요청 드립니다 :)
LMS에서 제시하는 리팩터링 요소들을 1단계에서 많이 충족시켜서,
이번 단계에서는 중복 로직을 최대한 추출하려고 노력했어요.
추가로 리팩터링 요소 보이시면 마구 말씀해주세요!
이번 단계도 잘 부탁드립니다. 감사해요 😊