update snapshot_version and mult_version_start when ddl major generates.
This commit is contained in:
		| @ -745,15 +745,21 @@ int ObTabletDDLUtil::update_ddl_table_store(const ObTabletDDLParam &ddl_param, | ||||
|                                                  ObTabletCommon::NO_CHECK_GET_TABLET_TIMEOUT_US))) { | ||||
|       LOG_WARN("get tablet failed", K(ret), K(ddl_param)); | ||||
|     } else { | ||||
|       const bool is_major_sstable = ddl_param.table_key_.is_major_sstable(); | ||||
|       const int64_t rebuild_seq = ls_handle.get_ls()->get_rebuild_seq(); | ||||
|       const int64_t snapshot_version = is_major_sstable ? max(ddl_param.snapshot_version_, tablet_handle.get_obj()->get_snapshot_version()) | ||||
|                                                        : tablet_handle.get_obj()->get_snapshot_version(); | ||||
|       const int64_t multi_version_start = is_major_sstable ? max(ddl_param.snapshot_version_, tablet_handle.get_obj()->get_multi_version_start()) | ||||
|                                               : 0; | ||||
|       ObTabletHandle new_tablet_handle; | ||||
|       ObUpdateTableStoreParam table_store_param(table_handle, | ||||
|                                                 tablet_handle.get_obj()->get_snapshot_version(), | ||||
|                                                 &tablet_handle.get_obj()->get_storage_schema(), | ||||
|                                                 snapshot_version, | ||||
|                                                 multi_version_start, | ||||
|                                                 rebuild_seq, | ||||
|                                                 ddl_param.table_key_.is_major_sstable(), // update_with_major_flag | ||||
|                                                 ddl_param.table_key_.is_major_sstable()); // need report checksum | ||||
|       table_store_param.ddl_info_.keep_old_ddl_sstable_ = !ddl_param.table_key_.is_major_sstable(); | ||||
|                                                 &tablet_handle.get_obj()->get_storage_schema(), | ||||
|                                                 is_major_sstable, // update_with_major_flag | ||||
|                                                 is_major_sstable); // need report checksum | ||||
|       table_store_param.ddl_info_.keep_old_ddl_sstable_ = !is_major_sstable; | ||||
|       table_store_param.ddl_info_.data_format_version_ = ddl_param.data_format_version_; | ||||
|       table_store_param.ddl_info_.ddl_commit_scn_ = ddl_param.commit_scn_; | ||||
|       if (OB_FAIL(ls_handle.get_ls()->update_tablet_table_store(ddl_param.table_key_.get_tablet_id(), table_store_param, new_tablet_handle))) { | ||||
|  | ||||
| @ -290,14 +290,15 @@ ObUpdateTableStoreParam::ObUpdateTableStoreParam( | ||||
| ObUpdateTableStoreParam::ObUpdateTableStoreParam( | ||||
|     const ObTableHandleV2 &table_handle, | ||||
|     const int64_t snapshot_version, | ||||
|     const ObStorageSchema *storage_schema, | ||||
|     const int64_t multi_version_start, | ||||
|     const int64_t rebuild_seq, | ||||
|     const ObStorageSchema *storage_schema, | ||||
|     const bool update_with_major_flag, | ||||
|     const bool need_report) | ||||
|   : table_handle_(table_handle), | ||||
|     snapshot_version_(snapshot_version), | ||||
|     clog_checkpoint_scn_(), | ||||
|     multi_version_start_(0), | ||||
|     multi_version_start_(multi_version_start), | ||||
|     need_report_(need_report), | ||||
|     storage_schema_(storage_schema), | ||||
|     rebuild_seq_(rebuild_seq), | ||||
|  | ||||
| @ -335,8 +335,9 @@ struct ObUpdateTableStoreParam | ||||
|   ObUpdateTableStoreParam( // for ddl merge task only | ||||
|     const ObTableHandleV2 &table_handle, | ||||
|     const int64_t snapshot_version, | ||||
|     const ObStorageSchema *storage_schema, | ||||
|     const int64_t multi_version_start, | ||||
|     const int64_t rebuild_seq, | ||||
|     const ObStorageSchema *storage_schema, | ||||
|     const bool update_with_major_flag, | ||||
|     const bool need_report = false); | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 obdev
					obdev