Background Image

FORUM

조회 수 244 추천 수 0 댓글 8
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

* 질문 등록 시 다음의 내용을 꼭 기입하여 주세요.
OS
Linux 64bit
CUBRID Ver.
CUBRID 9.3 (9.3.9.0002) (64bit release build for linux_gnu)
CUBRID TOOL Ver.

응용 환경(API)
java

* CUBRID 응용 오류, SQL 오류 또는 SQL 튜닝 관련된 문의는 반드시 다음의 내용을 추가해 주세요. 비밀글이나 비밀 댓글도 가능합니다.
* 저희가 상황을 이해하고, 재현이 가능해야 알 수 있는 문제들이 많습니다. 가능한 정보/정황들을 부탁합니다.
에러 내용 및 재현 방법 재현 가능한 Source와 SQL
관련 테이블(인덱스, 키정보 포함) 정보 CUBRID 홈 디렉토리 아래 log 디렉토리 압축


-------------- 아래에 질문 사항을 기입해 주세요. ------------------------------------------------------------------------

안녕하세요.

3가지 문의사항이 있어서 질문드립니다.



cubrid shard 구성시

cubrid broker start 명령어로 서비스는 잘 올라왔습니다.



1. proxy_log에 아래와 같은 error가 지속적으로 발생하는데 이유를 알수 있을까요?

20-07-23 06:33:02.258 [ERR] ../../src/broker/shard_proxy_io.c(2291): Unexpected CAS transaction status. (expected tran status:1). CAS(cas_id:6, shard_id:1, is_in_tran:N, status:1, ctx_cid:-1, ctx_uid:0, fd:25). event(type:0, from_cas:Y, cid:-1, uid:0, shard_id:-1, cas_id:-1).

20-07-23 06:33:02.268 [ERR] ../../src/broker/shard_proxy_io.c(2291): Unexpected CAS transaction status. (expected tran status:1). CAS(cas_id:7, shard_id:1, is_in_tran:N, status:1, ctx_cid:-1, ctx_uid:0, fd:26). event(type:0, from_cas:Y, cid:-1, uid:0, shard_id:-1, cas_id:-1).

20-07-23 06:33:02.280 [ERR] ../../src/broker/shard_proxy_io.c(2291): Unexpected CAS transaction status. (expected tran status:1). CAS(cas_id:6, shard_id:2, is_in_tran:N, status:1, ctx_cid:-1, ctx_uid:0, fd:27). event(type:0, from_cas:Y, cid:-1, uid:0, shard_id:-1, cas_id:-1).




2. cubrid shard를 통하여 mysql에 insert 할시 해당 sql문이 mysql의 performance_schema에서 logging을 하지 못하는데 이유를 알수 있을까요?
    ex.) events_statements_history 등...


3. SQL수행시 error가 발생할시 error code를 참조할 수 있는 문서가 있을까요?
    ex.) exception occurs : -10003



감사합니다.
  • ?
    권호일 2020.07.29 10:13
    질문주신 내용만으로는 원인파악이 어렵습니다. 답변 내용에 해당하는 정보를 올려주시면 파악해 보도록 하겠습니다.


    1. 해당 오류가 발생하는 SQL문과 해당 테이블의 스키마를 올려주세요.

    2. cubrid shard를 통하지 않고 insert문을 실행하면 performance_schema의 logging을 정상적으로 하나요?
    cubrid shard를 통해서 MySQL에 insert는 정상적으로 실행되나요?

    3. 해당 오류가 발생하는 SQL문과 해당 테이블의 스키마를 올려주세요.

    4. 추가로 cubrid 설정파일도 함께 올려주세요.
    cubrid_broker.conf
    shard_connection.txt
    cubrid.conf
    shard_key.txt ( 없으면 생략 )
  • ?
    DBMASTER 2020.07.29 13:47
    안녕하세요~.
    우선 답변 감사드립니다.
    Test한 예제는 cubrid doc에 나와있는 것을 대부분 인용하여 test하였습니다.
    https://www.cubrid.org/manual/ko/9.3.0/shard.html#id5


    1. 해당 오류가 발생하는 SQL문과 해당 테이블의 스키마를 올려주세요.
    ->
    테이블 info :
    CREATE TABLE `student` (
      `s_no` int NOT NULL,
      `s_name` varchar(20) DEFAULT NULL,
      `s_age` int DEFAULT NULL,
      PRIMARY KEY (`s_no`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci

    SQL info:
    INSERT INTO student VALUES (/*+ shard_key */ ?, ?, ?)


    2. cubrid shard를 통하지 않고 insert문을 실행하면 performance_schema의 logging을 정상적으로 하나요?
    cubrid shard를 통해서 MySQL에 insert는 정상적으로 실행되나요?
    ->
    네 그렇습니다. 
    shard를 통하지 않으면 정상적으로 performance_schema에 logging이 됩니다. 
    네 insert는 정상적으로 되고 general log를 키면 general log에도 기록이 남습니다.


    3. 해당 오류가 발생하는 SQL문과 해당 테이블의 스키마를 올려주세요.
    ->
    test는 1번에 적어놓은 것 하나로만 하였습니다. 계속발생하는 것은 아니고 어쩌다 한번씩 발생하는 것 같습니다.
    추가적으로 말씀드리면 cubrid shard에서 mysql로 바로 가는것은 아니고 중간에 mysql router를 거쳐서 가도록 구성되어 있습니다. [이부분은 크게 상관 없는것 같긴합니다...]


    4. 추가로 cubrid 설정파일도 함께 올려주세요.
    ->
    cubrid_broker.conf :
    [broker]
    MASTER_SHM_ID           =30001
    ADMIN_LOG_FILE          =log/broker/cubrid_broker.log

    [%shard1]
    SERVICE                 =ON
    BROKER_PORT             =36000
    MIN_NUM_APPL_SERVER     =3
    MAX_NUM_APPL_SERVER     =40
    APPL_SERVER_SHM_ID      =36000
    LOG_DIR                 =log/broker/sql_log
    ERROR_LOG_DIR           =log/broker/error_log
    SQL_LOG                 =ON
    TIME_TO_KILL            =120
    SESSION_TIMEOUT         =300
    KEEP_CONNECTION         =ON
    MAX_PREPARED_STMT_COUNT =1024
    SHARD                   =ON
    SHARD_DB_NAME           =sharddb
    SHARD_DB_USER           =shard
    SHARD_DB_PASSWORD       =shard123
    SHARD_NUM_PROXY         =1
    SHARD_PROXY_LOG_DIR     =log/broker/proxy_log
    SHARD_PROXY_LOG         =ERROR
    SHARD_MAX_CLIENTS       =256
    SHARD_PROXY_SHM_ID      =36090
    SHARD_CONNECTION_FILE   =shard_connection.txt
    SHARD_KEY_FILE          =shard_key.txt
    APPL_SERVER             =CAS_MYSQL


    shard_connection.txt :
    # mysql
    0               sharddb         mysql-router1:6446
    1               sharddb         mysql-router2:6446
    2               sharddb         mysql-router3:6446


    cubrid.conf :
    # Service section - a section for 'cubrid service' command
    [service]

    # The list of processes to be started automatically by 'cubrid service start' command
    # Any combinations are available with server, broker, manager and heartbeat.
    service=server,broker,manager

    # The list of database servers in all by 'cubrid service start' command.
    # This property is effective only when the above 'service' property contains 'server' keyword.
    #server=foo,bar

    # Common section - properties for all databases
    # This section will be applied before other database specific sections.
    [common]

    # Read the manual for detailed description of system parameters
    # Manual > Performance Tuning > Database Server Configuration > Default Parameters

    # Size of data buffer are using K, M, G, T unit
    data_buffer_size=512M

    # Size of log buffer are using K, M, G, T unit
    log_buffer_size=4M

    # Size of sort buffer are using K, M, G, T unit
    # The sort buffer should be allocated per thread.
    # So, the max size of the sort buffer is sort_buffer_size * max_clients.
    sort_buffer_size=2M

    # The maximum number of concurrent client connections the server will accept.
    # This value also means the total # of concurrent transactions.
    max_clients=100

    # TCP port id for the CUBRID programs (used by all clients).
    cubrid_port_id=1523

    # The createdb and addvoldb create a volume file of 'db_volume_size' size
    # if don't have any options about size.
    db_volume_size=512M

    # The createdb creates a log volume file of 'log_volume_size' size
    # if don't have any options about size.
    log_volume_size=512M

    # The log_max_archives parameter configures the maximum number of archive log files kept.
    # To completely recover the database from the media failures with a backup,
    # the archive log volumes that was archived from the backup must be kept.
    # Tune this parameter with the enough number of archive logs to cope with a media failure.
    #
    # log_max_archives=2147483647
    log_max_archives=0

    ##isolation level (이부분만따로추가 proxy error의 내용이 transaction status 라고 logging이 되길래 바꿔보면서 test하였지만 효과를 보지 못하였습니다)
    isolation_level=5



    shard_key.txt :
    [%shard_key_column]
    #min    max     shard_id
    0       41      0
    42      83      1
    84      125     2
    126     167     0
    168     209     1
    210     251     2
    252     255     0




    감사합니다.
  • ?
    권호일 2020.07.29 17:22
    INSERT INTO student VALUES (/*+ shard_key */ ?, ?, ?)

    위 SQL문을 실행하면서 간할적으로 오류가 발생한다는 거죠?

    해당 SQL문에서 오류가 발생했을 때의 ? 값(바인딩값)도 함께 올려주세요.
  • ?
    DBMASTER 2020.07.30 09:02
    안녕하세요.

    1. proxy error는 sql문의 수행과 상관없이 지속적으로 발생하고 있습니다.

    2. doc에 나와있는 logic을 이용하여 for문 수치값만 바꾸면서 test해보았습니다. [int i=0; i < 1024] -> 이부분만 계속 증가시키면서 수행
    exception occurs는 10번중 2번정도 발생한것 같았습니다.
    connection = DriverManager.getConnection("jdbc:cubrid:localhost:36000:shard1:::?charSet=utf8", "shard", "shard123");
    connection.setAutoCommit(false);

    for (int i=0; i < 1024; i++) {
    String query = "INSERT INTO student VALUES (/*+ shard_key */ ?, ?, ?)";
    PreparedStatement query_stmt = connection.prepareStatement(query);

    String name="name_" + i;
    query_stmt.setInt(1, i);
    query_stmt.setString(2, name);
    query_stmt.setInt(3, (i%64)+10);

    query_stmt.executeUpdate();
    System.out.print(".");

    query_stmt.close();
    connection.commit();
    }
  • ?
    권호일 2020.08.05 08:29
    MySQL 버젼은 어떻게 되나요?
  • ?
    DBMASTER 2020.08.05 14:05
    안녕하세요.

    8.0.20 기반의 inndb cluster로 구성하였습니다.


    감사합니다.
  • ?
    DBMASTER 2020.08.05 14:05
    안녕하세요.

    8.0.20 기반의 inndb cluster로 구성하였습니다.


    감사합니다.
  • ?
    권호일 2020.08.13 11:06
    CUBRID를 사용해 주셔서 감사합니다.

    CUBRID SHARD + MySQL을 지원하는 버젼은 아래와 같습니다.
    CUBRID : 9.x
    MySQL : 5.x


    현재, CUBRID SHARD는 MySQL 8을 지원하지 않습니다.

    감사합니다.

  1. SQLGate for CUBRID 영구 무료 라이선스 제공

  2. 데이터베이스 내보내기 할때, 컬럼설명 누락 관련 질문

  3. Cubrid Shard 문의사항이 있어서 질문드립니다.

  4. 8.4.4ver 큐브리드 JDBC Driver Connection 인터페이스 미구현 문제2

  5. 큐브리드 HA Replica 사용시 JDBC 접속 URL

  6. 질문이요!!!!!! Request timed out

  7. 큐브리드 엔진 업데이트 패치 문의드립니다.

  8. paramdump 결과 없음 문의

  9. Locale 확인방법 문의

  10. Erd문의드립니다

  11. 안녕하세요 백업 복구 문의드립니다.

  12. cubrid manager 접속 질문이요!!!!!!!!

  13. GROUP_CONCAT_MAX_LEN 을 32M로 변경하고 싶습니다.

  14. 서버접속 url권한설정

  15. Attempt to access a closed Statement

  16. erwin reverse engineering

  17. varchar와 char 데이터타입의 디스크에서의 크기 문의

  18. 각 컬럼의 실제 사이즈 확인 방법 문의

  19. union 을 하게 되면 GROUP BY가 풀려서 나옵니다.

  20. 일반사용자 시스템 테이블 접근 권한 제어관련 질문드립니다.

  21. with 절 기능 생겼나요??

Board Pagination Prev 1 ... 34 35 36 37 38 39 40 41 42 43 ... 199 Next
/ 199

Contact Cubrid

대표전화 070-4077-2110 / 기술문의 070-4077-2113 / 영업문의 070-4077-2112 / Email. contact_at_cubrid.com
Contact Sales