今天测试反馈了一个测试环境的错误,错误信息如下:
###Errorupdatingdatabase.Cause:org.postgresql.util.PSQLException:ERROR:nopartitionofrelation"swap_data_info"foundforrow详细:Partitionkeyofthefailingrowcontains(create_time)=(-11-1514:44:38.531).###Theerrormayexistinfile[/home/waiqin365_swapsvr/waiqin365-swapsvr-1.3.1/web/WEB-INF/classes/com/zk/api/swap/config/sqlmap/swapMapper.xml]###Theerrormayinvolvecom.zk.api.swap.vo.SwapVO.insert-Inline###Theerroroccurredwhilesettingparameters###SQL:INSERTINTOswap_data_info(id,tenant_id,app_id,data_id,data_type,data_version,data_format,data_source,data,status,status_time,create_time)VALUES(?,?,?,?,?,?,?,?,?,?,?,?)###Cause:org.postgresql.util.PSQLException:ERROR:nopartitionofrelation"swap_data_info"foundforrow详细:Partitionkeyofthefailingrowcontains(create_time)=(-11-1514:44:38.531).;SQL[];ERROR:nopartitionofrelation"swap_data_info"foundforrow
看了下这个错误的详情,得出大致原因:
1.新增数据的时候,分区字段是够传值了
2.分区表是否存在
我的是第二个原因,希望能帮助大家!