Repository: alibaba/proximabilin Branch: master Commit: 42a1afe8b35d Files: 682 Total size: 29.6 MB Directory structure: gitextract_m01w5_is/ ├── .clang-format ├── .git/ │ ├── HEAD │ ├── config │ ├── description │ ├── hooks/ │ │ ├── applypatch-msg.sample │ │ ├── commit-msg.sample │ │ ├── fsmonitor-watchman.sample │ │ ├── post-update.sample │ │ ├── pre-applypatch.sample │ │ ├── pre-commit.sample │ │ ├── pre-merge-commit.sample │ │ ├── pre-push.sample │ │ ├── pre-rebase.sample │ │ ├── pre-receive.sample │ │ ├── prepare-commit-msg.sample │ │ ├── push-to-checkout.sample │ │ ├── sendemail-validate.sample │ │ └── update.sample │ ├── index │ ├── info/ │ │ └── exclude │ ├── logs/ │ │ ├── HEAD │ │ └── refs/ │ │ ├── heads/ │ │ │ └── master │ │ └── remotes/ │ │ └── origin/ │ │ └── HEAD │ ├── objects/ │ │ └── pack/ │ │ ├── pack-50d7469b15937123b6a9d2f6b0fef35befd95527.idx │ │ ├── pack-50d7469b15937123b6a9d2f6b0fef35befd95527.pack │ │ ├── pack-50d7469b15937123b6a9d2f6b0fef35befd95527.promisor │ │ ├── pack-50d7469b15937123b6a9d2f6b0fef35befd95527.rev │ │ ├── pack-9d01884951ce3c844b4ee264b844b04baca4920c.idx │ │ ├── pack-9d01884951ce3c844b4ee264b844b04baca4920c.pack │ │ ├── pack-9d01884951ce3c844b4ee264b844b04baca4920c.promisor │ │ └── pack-9d01884951ce3c844b4ee264b844b04baca4920c.rev │ ├── packed-refs │ ├── refs/ │ │ ├── heads/ │ │ │ └── master │ │ └── remotes/ │ │ └── origin/ │ │ └── HEAD │ └── shallow ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── Dockerfile ├── LICENSE ├── README.md ├── benchmark/ │ ├── README.md │ ├── __init__.py │ ├── common/ │ │ ├── __init__.py │ │ ├── exceptions.py │ │ ├── mysql_utils.py │ │ ├── proxima2_dataset.py │ │ ├── proxima_be_query.py │ │ ├── proxima_be_repo.py │ │ ├── proxima_be_service.py │ │ └── runner.py │ ├── requirements.txt │ ├── scripts/ │ │ ├── build_bench.py │ │ ├── query_bench.py │ │ ├── recall.py │ │ └── vec2txt.py │ ├── sql/ │ │ └── create_table.sql │ └── tests/ │ └── service_test.py ├── cmake/ │ ├── README.md │ ├── bazel.cmake │ └── option.cmake ├── deps/ │ ├── proxima/ │ │ ├── CMakeLists.txt │ │ ├── include/ │ │ │ ├── ailego/ │ │ │ │ ├── algorithm/ │ │ │ │ │ └── rate_limiter.h │ │ │ │ ├── container/ │ │ │ │ │ ├── bitmap.h │ │ │ │ │ ├── cube.h │ │ │ │ │ ├── heap.h │ │ │ │ │ ├── hypercube.h │ │ │ │ │ ├── vector.h │ │ │ │ │ └── vector_array.h │ │ │ │ ├── debug/ │ │ │ │ │ ├── bug_report.h │ │ │ │ │ ├── symbol_table.h │ │ │ │ │ ├── user_context.h │ │ │ │ │ ├── user_context_darwin.h │ │ │ │ │ └── user_context_linux.h │ │ │ │ ├── encoding/ │ │ │ │ │ ├── base64.h │ │ │ │ │ ├── json/ │ │ │ │ │ │ ├── mod_json.h │ │ │ │ │ │ └── mod_json_plus.h │ │ │ │ │ ├── json.h │ │ │ │ │ └── uri.h │ │ │ │ ├── hash/ │ │ │ │ │ ├── crc32c.h │ │ │ │ │ ├── fnv1.h │ │ │ │ │ └── jump_hash.h │ │ │ │ ├── internal/ │ │ │ │ │ └── platform.h │ │ │ │ ├── io/ │ │ │ │ │ ├── file.h │ │ │ │ │ ├── file_lock.h │ │ │ │ │ ├── file_writer.h │ │ │ │ │ ├── mmap_file.h │ │ │ │ │ └── pid_file.h │ │ │ │ ├── parallel/ │ │ │ │ │ ├── lock.h │ │ │ │ │ ├── semaphore.h │ │ │ │ │ ├── thread_pool.h │ │ │ │ │ └── thread_queue.h │ │ │ │ ├── pattern/ │ │ │ │ │ ├── closure.h │ │ │ │ │ ├── defer.h │ │ │ │ │ ├── factory.h │ │ │ │ │ ├── scope_guard.h │ │ │ │ │ └── singleton.h │ │ │ │ ├── string/ │ │ │ │ │ ├── string_concat_helper.h │ │ │ │ │ └── string_view.h │ │ │ │ ├── utility/ │ │ │ │ │ ├── bitset_helper.h │ │ │ │ │ ├── dl_helper.h │ │ │ │ │ ├── file_helper.h │ │ │ │ │ ├── float_helper.h │ │ │ │ │ ├── process_helper.h │ │ │ │ │ ├── string_helper.h │ │ │ │ │ ├── string_helper_impl.h │ │ │ │ │ ├── time_helper.h │ │ │ │ │ └── type_helper.h │ │ │ │ ├── version.h │ │ │ │ └── version.i │ │ │ └── aitheta2/ │ │ │ ├── index_closet.h │ │ │ ├── index_container.h │ │ │ ├── index_context.h │ │ │ ├── index_converter.h │ │ │ ├── index_document.h │ │ │ ├── index_dumper.h │ │ │ ├── index_error.h │ │ │ ├── index_factory.h │ │ │ ├── index_filter.h │ │ │ ├── index_format.h │ │ │ ├── index_framework.h │ │ │ ├── index_helper.h │ │ │ ├── index_holder.h │ │ │ ├── index_logger.h │ │ │ ├── index_measure.h │ │ │ ├── index_meta.h │ │ │ ├── index_module.h │ │ │ ├── index_packer.h │ │ │ ├── index_params.h │ │ │ ├── index_plugin.h │ │ │ ├── index_provider.h │ │ │ ├── index_reformer.h │ │ │ ├── index_searcher.h │ │ │ ├── index_stats.h │ │ │ ├── index_storage.h │ │ │ ├── index_streamer.h │ │ │ ├── index_threads.h │ │ │ ├── index_unpacker.h │ │ │ └── index_version.h │ │ └── lib/ │ │ ├── Linux.x86_64.broadwell/ │ │ │ └── libproxima.so.2.5.0 │ │ ├── Linux.x86_64.haswell/ │ │ │ └── libproxima.so.2.5.0 │ │ ├── Linux.x86_64.nehalem/ │ │ │ └── libproxima.so.2.5.0 │ │ ├── Linux.x86_64.sandybridge/ │ │ │ └── libproxima.so.2.5.0 │ │ ├── Linux.x86_64.skylake/ │ │ │ └── libproxima.so.2.5.0 │ │ ├── Linux.x86_64.skylake_avx512/ │ │ │ └── libproxima.so.2.5.0 │ │ ├── Linux.x86_64.znver1/ │ │ │ └── libproxima.so.2.5.0 │ │ └── Linux.x86_64.znver2/ │ │ └── libproxima.so.2.5.0 │ └── thirdparty/ │ ├── .gitignore │ ├── CMakeLists.txt │ ├── brpc/ │ │ └── CMakeLists.txt │ ├── gflags/ │ │ └── CMakeLists.txt │ ├── glog/ │ │ └── CMakeLists.txt │ ├── googletest/ │ │ └── CMakeLists.txt │ ├── leveldb/ │ │ └── CMakeLists.txt │ ├── mysql/ │ │ └── CMakeLists.txt │ ├── ncurses/ │ │ └── CMakeLists.txt │ ├── openssl/ │ │ └── CMakeLists.txt │ ├── patches/ │ │ └── brpc.patch │ ├── protobuf/ │ │ └── CMakeLists.txt │ ├── snappy/ │ │ └── CMakeLists.txt │ ├── sparsehash/ │ │ └── CMakeLists.txt │ └── sqlite/ │ └── CMakeLists.txt ├── scripts/ │ ├── README.md │ ├── conf/ │ │ ├── proxima_be.conf │ │ └── proxima_se.conf │ ├── gcc4.9-build.sh │ ├── gcc4.9-unittest.sh │ ├── gcc8.3-build.sh │ ├── gcc8.3-integration.sh │ ├── gcc8.3-unittest.sh │ ├── gcov.sh │ ├── hooks/ │ │ ├── clang-format.sh │ │ ├── common.sh │ │ ├── post-commit │ │ └── pre-commit │ └── install-git-hooks.sh ├── sdk/ │ ├── CMakeLists.txt │ ├── cpp/ │ │ ├── CMakeLists.txt │ │ ├── README.txt │ │ ├── examples/ │ │ │ └── client_example.cc │ │ ├── include/ │ │ │ └── proxima_search_client.h │ │ └── src/ │ │ ├── grpc_client.cc │ │ ├── grpc_client.h │ │ ├── http_client.cc │ │ ├── http_client.h │ │ ├── proxima_search_client.cc │ │ └── version.h │ ├── go/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── client_proxy.go │ │ ├── clients.go │ │ ├── const.go │ │ ├── doc.go │ │ ├── examples/ │ │ │ └── demo/ │ │ │ ├── README.md │ │ │ ├── example.go │ │ │ ├── go.mod │ │ │ └── go.sum │ │ ├── go.mod │ │ ├── go.sum │ │ ├── interfaces.go │ │ ├── options.go │ │ ├── proto/ │ │ │ ├── common.pb.go │ │ │ ├── config.pb.go │ │ │ └── proxima_be.pb.go │ │ ├── status.go │ │ ├── types.go │ │ ├── utils.go │ │ ├── utils_test.go │ │ └── version.go │ ├── java/ │ │ ├── README.txt │ │ ├── example/ │ │ │ ├── pom.xml │ │ │ └── src/ │ │ │ └── main/ │ │ │ ├── java/ │ │ │ │ └── com/ │ │ │ │ └── alibaba/ │ │ │ │ └── example/ │ │ │ │ ├── BenchClient.java │ │ │ │ └── TestExample.java │ │ │ └── resources/ │ │ │ └── log4j2.xml │ │ ├── pom.xml │ │ └── src/ │ │ └── main/ │ │ ├── java/ │ │ │ └── com/ │ │ │ └── alibaba/ │ │ │ └── proxima/ │ │ │ └── be/ │ │ │ └── client/ │ │ │ ├── CollectionConfig.java │ │ │ ├── CollectionInfo.java │ │ │ ├── CollectionStats.java │ │ │ ├── ConnectParam.java │ │ │ ├── DataType.java │ │ │ ├── DatabaseRepository.java │ │ │ ├── DescribeCollectionResponse.java │ │ │ ├── Document.java │ │ │ ├── GetDocumentRequest.java │ │ │ ├── GetDocumentResponse.java │ │ │ ├── GetVersionResponse.java │ │ │ ├── IndexColumnParam.java │ │ │ ├── IndexType.java │ │ │ ├── ListCollectionsResponse.java │ │ │ ├── ListCondition.java │ │ │ ├── LsnContext.java │ │ │ ├── ProtoConverter.java │ │ │ ├── ProximaGrpcSearchClient.java │ │ │ ├── ProximaSEException.java │ │ │ ├── ProximaSearchClient.java │ │ │ ├── QueryRequest.java │ │ │ ├── QueryResponse.java │ │ │ ├── QueryResult.java │ │ │ ├── StatsCollectionResponse.java │ │ │ ├── Status.java │ │ │ └── WriteRequest.java │ │ ├── proto/ │ │ │ ├── common.proto │ │ │ └── proxima_be.proto │ │ └── resources/ │ │ └── proxima-be.properties │ └── python/ │ ├── docs/ │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README.md │ │ ├── conf.py │ │ └── index.rst │ ├── example/ │ │ ├── example.py │ │ ├── example_async.py │ │ └── mysql_example.py │ ├── pyproximabe/ │ │ ├── __init__.py │ │ ├── core/ │ │ │ ├── __init__.py │ │ │ ├── client.py │ │ │ ├── handlers.py │ │ │ └── types.py │ │ └── proto/ │ │ └── __init__.py │ ├── requirements-dev.txt │ └── requirements.txt ├── src/ │ ├── CMakeLists.txt │ ├── admin/ │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── admin_agent.cc │ │ ├── admin_agent.h │ │ ├── admin_proto_converter.cc │ │ └── admin_proto_converter.h │ ├── agent/ │ │ ├── CMakeLists.txt │ │ ├── collection_counter.h │ │ ├── column_order.cc │ │ ├── column_order.h │ │ ├── index_agent.cc │ │ ├── index_agent.h │ │ └── write_request.h │ ├── common/ │ │ ├── CMakeLists.txt │ │ ├── auto_counter.h │ │ ├── config.cc │ │ ├── config.h │ │ ├── defer.h │ │ ├── error_code.cc │ │ ├── error_code.h │ │ ├── glogger.cc │ │ ├── interface/ │ │ │ └── service.h │ │ ├── logger.h │ │ ├── macro_define.h │ │ ├── profiler.h │ │ ├── protobuf_helper.cc │ │ ├── protobuf_helper.h │ │ ├── sys_logger.cc │ │ ├── transformer.cc │ │ ├── transformer.h │ │ ├── types.h │ │ ├── types_helper.h │ │ ├── uuid_helper.cc │ │ ├── uuid_helper.h │ │ ├── version.cc │ │ ├── version.h │ │ ├── wait_notifier.cc │ │ └── wait_notifier.h │ ├── index/ │ │ ├── CMakeLists.txt │ │ ├── collection.cc │ │ ├── collection.h │ │ ├── collection_dataset.cc │ │ ├── collection_dataset.h │ │ ├── collection_query.h │ │ ├── collection_stats.h │ │ ├── column/ │ │ │ ├── column_indexer.cc │ │ │ ├── column_indexer.h │ │ │ ├── column_reader.cc │ │ │ ├── column_reader.h │ │ │ ├── context_pool.cc │ │ │ ├── context_pool.h │ │ │ ├── forward_data.h │ │ │ ├── forward_indexer.cc │ │ │ ├── forward_indexer.h │ │ │ ├── forward_reader.cc │ │ │ ├── forward_reader.h │ │ │ ├── index_helper.cc │ │ │ ├── index_helper.h │ │ │ ├── index_provider.h │ │ │ ├── simple_forward_indexer.cc │ │ │ ├── simple_forward_indexer.h │ │ │ ├── simple_forward_reader.cc │ │ │ ├── simple_forward_reader.h │ │ │ ├── vector_column_indexer.cc │ │ │ ├── vector_column_indexer.h │ │ │ ├── vector_column_reader.cc │ │ │ └── vector_column_reader.h │ │ ├── concurrent_bitmap.h │ │ ├── concurrent_hash_map.h │ │ ├── constants.h │ │ ├── delete_store.cc │ │ ├── delete_store.h │ │ ├── delta_store.h │ │ ├── file_helper.h │ │ ├── id_map.cc │ │ ├── id_map.h │ │ ├── index_service.cc │ │ ├── index_service.h │ │ ├── lsn_store.cc │ │ ├── lsn_store.h │ │ ├── persist_hash_map.h │ │ ├── segment/ │ │ │ ├── memory_segment.cc │ │ │ ├── memory_segment.h │ │ │ ├── persist_segment.cc │ │ │ ├── persist_segment.h │ │ │ ├── persist_segment_manager.cc │ │ │ ├── persist_segment_manager.h │ │ │ └── segment.h │ │ ├── snapshot.cc │ │ ├── snapshot.h │ │ ├── typedef.h │ │ ├── version_manager.cc │ │ ├── version_manager.h │ │ ├── version_store.cc │ │ └── version_store.h │ ├── meta/ │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── meta.h │ │ ├── meta_agent.cc │ │ ├── meta_agent.h │ │ ├── meta_cache.cc │ │ ├── meta_cache.h │ │ ├── meta_impl.cc │ │ ├── meta_impl.h │ │ ├── meta_service.cc │ │ ├── meta_service.h │ │ ├── meta_service_builder.h │ │ ├── meta_store.h │ │ ├── meta_store_factory.cc │ │ ├── meta_store_factory.h │ │ ├── meta_types.h │ │ └── sqlite/ │ │ ├── sqlite_meta_store.cc │ │ ├── sqlite_meta_store.h │ │ ├── sqlite_statement.cc │ │ └── sqlite_statement.h │ ├── metrics/ │ │ ├── CMakeLists.txt │ │ ├── bvar_metrics_collector.cc │ │ ├── bvar_metrics_collector.h │ │ ├── metrics.h │ │ ├── metrics_collector.cc │ │ └── metrics_collector.h │ ├── proto/ │ │ ├── common.proto │ │ ├── config.proto │ │ └── proxima_be.proto │ ├── query/ │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── collection_query.cc │ │ ├── collection_query.h │ │ ├── context.h │ │ ├── equal_query.cc │ │ ├── equal_query.h │ │ ├── equal_task.cc │ │ ├── equal_task.h │ │ ├── executor/ │ │ │ ├── bthread_queue.cc │ │ │ ├── bthread_queue.h │ │ │ ├── bthread_task.cc │ │ │ ├── bthread_task.h │ │ │ ├── executor.h │ │ │ ├── parallel_executor.cc │ │ │ ├── parallel_executor.h │ │ │ ├── scheduler.cc │ │ │ ├── scheduler.h │ │ │ ├── task.h │ │ │ └── task_queue.h │ │ ├── forward_serializer.cc │ │ ├── forward_serializer.h │ │ ├── knn_query.cc │ │ ├── knn_query.h │ │ ├── knn_task.cc │ │ ├── knn_task.h │ │ ├── meta_wrapper.cc │ │ ├── meta_wrapper.h │ │ ├── query.h │ │ ├── query_agent.cc │ │ ├── query_agent.h │ │ ├── query_factory.cc │ │ ├── query_factory.h │ │ ├── query_service.cc │ │ ├── query_service.h │ │ ├── query_service_builder.h │ │ └── query_types.h │ ├── repository/ │ │ ├── CMakeLists.txt │ │ ├── binlog/ │ │ │ ├── CMakeLists.txt │ │ │ ├── binlog_common.h │ │ │ ├── binlog_event.cc │ │ │ ├── binlog_event.h │ │ │ ├── binlog_reader.cc │ │ │ ├── binlog_reader.h │ │ │ ├── event_fetcher.cc │ │ │ ├── event_fetcher.h │ │ │ ├── field.cc │ │ │ ├── field.h │ │ │ ├── info_fetcher.cc │ │ │ ├── info_fetcher.h │ │ │ ├── log_context.h │ │ │ ├── mysql_connector.cc │ │ │ ├── mysql_connector.h │ │ │ ├── mysql_handler.cc │ │ │ ├── mysql_handler.h │ │ │ ├── mysql_reader.h │ │ │ ├── mysql_validator.cc │ │ │ ├── mysql_validator.h │ │ │ ├── rows_event_parser.cc │ │ │ ├── rows_event_parser.h │ │ │ ├── sql_builder.cc │ │ │ ├── sql_builder.h │ │ │ ├── table_reader.cc │ │ │ ├── table_reader.h │ │ │ ├── table_schema.cc │ │ │ └── table_schema.h │ │ ├── collection.h │ │ ├── collection_creator.cc │ │ ├── collection_creator.h │ │ ├── collection_manager.cc │ │ ├── collection_manager.h │ │ ├── common_types.h │ │ ├── lsn_context_format.cc │ │ ├── lsn_context_format.h │ │ ├── main.cc │ │ ├── mysql_collection.cc │ │ ├── mysql_collection.h │ │ ├── mysql_repository.cc │ │ ├── mysql_repository.h │ │ ├── proto/ │ │ │ └── repository_config.proto │ │ └── repository_common/ │ │ ├── CMakeLists.txt │ │ ├── config.cc │ │ ├── config.h │ │ ├── error_code.cc │ │ ├── error_code.h │ │ ├── glogger.cc │ │ ├── logger.h │ │ ├── version.cc │ │ └── version.h │ └── server/ │ ├── CMakeLists.txt │ ├── grpc_server.cc │ ├── grpc_server.h │ ├── http_server.cc │ ├── http_server.h │ ├── main.cc │ ├── proto_converter.cc │ ├── proto_converter.h │ ├── proxima_request_handler.cc │ ├── proxima_request_handler.h │ ├── proxima_search_engine.cc │ ├── proxima_search_engine.h │ ├── write_request_builder.cc │ └── write_request_builder.h ├── tests/ │ ├── CMakeLists.txt │ ├── README.md │ ├── admin/ │ │ ├── CMakeLists.txt │ │ └── admin_proto_converter_test.cc │ ├── agent/ │ │ ├── CMakeLists.txt │ │ ├── collection_counter_test.cc │ │ └── index_agent_test.cc │ ├── common/ │ │ ├── CMakeLists.txt │ │ ├── config_test.cc │ │ ├── profiler_test.cc │ │ ├── protobuf_helper_test.cc │ │ ├── test.proto │ │ ├── transformer_test.cc │ │ └── types_helper_test.cc │ ├── index/ │ │ ├── CMakeLists.txt │ │ ├── collection_test.cc │ │ ├── column_indexer_test.cc │ │ ├── column_reader_test.cc │ │ ├── delete_store_test.cc │ │ ├── forward_indexer_test.cc │ │ ├── forward_reader_test.cc │ │ ├── id_map_test.cc │ │ ├── index_service_test.cc │ │ ├── lsn_store_test.cc │ │ ├── memory_segment_test.cc │ │ ├── mock_index_service.h │ │ ├── mock_segment.h │ │ ├── persist_hash_map_test.cc │ │ ├── persist_segment_test.cc │ │ └── version_manager_test.cc │ ├── integration/ │ │ ├── README.md │ │ ├── data/ │ │ │ ├── test_clean_db.sql │ │ │ ├── test_collection_create_and_remove_full.sql │ │ │ ├── test_forward_date_and_time_frac_full.sql │ │ │ ├── test_forward_date_and_time_frac_inc.sql │ │ │ ├── test_forward_date_and_time_full.sql │ │ │ ├── test_forward_date_and_time_inc.sql │ │ │ ├── test_forward_numeric_full.sql │ │ │ ├── test_forward_numeric_inc.sql │ │ │ ├── test_forward_with_binary_and_varbinary_full.sql │ │ │ ├── test_forward_with_binary_and_varbinary_inc.sql │ │ │ ├── test_forward_with_bit_full.sql │ │ │ ├── test_forward_with_bit_inc.sql │ │ │ ├── test_forward_with_blob_full.sql │ │ │ ├── test_forward_with_blob_gbk_full.sql │ │ │ ├── test_forward_with_blob_gbk_inc.sql │ │ │ ├── test_forward_with_blob_inc.sql │ │ │ ├── test_forward_with_char_and_varchar_full.sql │ │ │ ├── test_forward_with_char_and_varchar_inc.sql │ │ │ ├── test_forward_with_charset_gbk_full.sql │ │ │ ├── test_forward_with_charset_gbk_inc.sql │ │ │ ├── test_forward_with_charset_utf8_full.sql │ │ │ ├── test_forward_with_charset_utf8_inc.sql │ │ │ ├── test_forward_with_decimal_full.sql │ │ │ ├── test_forward_with_decimal_inc.sql │ │ │ ├── test_forward_with_empty_value_full.sql │ │ │ ├── test_forward_with_empty_value_inc.sql │ │ │ ├── test_forward_with_geometry_full.sql │ │ │ ├── test_forward_with_geometry_inc.sql │ │ │ ├── test_forward_with_json_full.sql │ │ │ ├── test_forward_with_json_inc.sql │ │ │ ├── test_forward_with_set_and_enum_full.sql │ │ │ ├── test_forward_with_set_and_enum_inc.sql │ │ │ ├── test_forward_with_text_full.sql │ │ │ ├── test_forward_with_text_gbk_full.sql │ │ │ ├── test_forward_with_text_gbk_inc.sql │ │ │ ├── test_forward_with_text_inc.sql │ │ │ ├── test_forward_with_types_null_full.sql │ │ │ ├── test_forward_with_types_null_inc.sql │ │ │ ├── test_increment_mode_full.sql │ │ │ ├── test_increment_mode_inc.sql │ │ │ ├── test_invalid_lsn_info_full.sql │ │ │ ├── test_invalid_lsn_info_inc.sql │ │ │ ├── test_multi_collections_full.sql │ │ │ ├── test_multi_collections_inc.sql │ │ │ ├── test_mysql_restart_with_create_collection_full.sql │ │ │ ├── test_mysql_restart_with_full_mode_full.sql │ │ │ ├── test_mysql_restart_with_inc_mode_full.sql │ │ │ ├── test_mysql_restart_with_inc_mode_inc_1.sql │ │ │ ├── test_mysql_restart_with_inc_mode_inc_2.sql │ │ │ ├── test_one_field_both_index_and_forward_full.sql │ │ │ ├── test_one_field_both_index_and_forward_inc.sql │ │ │ ├── test_one_field_both_index_fields_full.sql │ │ │ ├── test_one_field_both_index_fields_inc.sql │ │ │ ├── test_proxima_be_restart_full.sql │ │ │ ├── test_proxima_be_restart_full_1.sql │ │ │ ├── test_proxima_be_restart_inc.sql │ │ │ ├── test_proxima_be_restart_inc_1.sql │ │ │ ├── test_proxima_be_restart_with_collection_empty_full.sql │ │ │ ├── test_proxima_be_restart_with_collection_empty_inc.sql │ │ │ ├── test_proxima_be_restart_with_collection_empty_meta.sql │ │ │ ├── test_proxima_be_restart_with_full_stage_full.sql │ │ │ ├── test_proxima_be_restart_with_inc_stage_full.sql │ │ │ ├── test_proxima_be_restart_with_inc_stage_inc_1.sql │ │ │ ├── test_proxima_be_restart_with_inc_stage_inc_2.sql │ │ │ ├── test_repository_restart_full.sql │ │ │ ├── test_repository_restart_full_1.sql │ │ │ ├── test_repository_restart_inc.sql │ │ │ ├── test_repository_restart_inc_1.sql │ │ │ ├── test_scan_full_table_with_empty_table.sql │ │ │ ├── test_scan_table.sql │ │ │ ├── test_suspend_and_resume_collection_full.sql │ │ │ ├── test_update_collection_full.sql │ │ │ └── test_update_collection_inc.sql │ │ ├── run.sh │ │ ├── script/ │ │ │ ├── restart_proxima_be.sh │ │ │ ├── restart_repo.sh │ │ │ ├── run_test.sh │ │ │ ├── setup_ci.sh │ │ │ ├── start_mysql.sh │ │ │ ├── start_proxima_be.sh │ │ │ └── start_repo.sh │ │ └── src/ │ │ ├── case/ │ │ │ ├── __init__.py │ │ │ ├── client_helper.py │ │ │ ├── collection_creator.py │ │ │ ├── conf_replacer.py │ │ │ ├── generate_data.py │ │ │ ├── global_conf.py │ │ │ ├── log.py │ │ │ ├── mysql_client.py │ │ │ ├── server_utils.py │ │ │ ├── test_admin_agent.py │ │ │ ├── test_admin_agent_exception.py │ │ │ ├── test_index_agent.py │ │ │ ├── test_index_agent_exception.py │ │ │ ├── test_mysql_repository.py │ │ │ ├── test_query_agent.py │ │ │ └── test_query_agent_exception.py │ │ ├── requirements.txt │ │ └── run.py │ ├── meta/ │ │ ├── CMakeLists.txt │ │ ├── collection_impl_test.cc │ │ ├── meta_agent_test.cc │ │ ├── meta_cache_test.cc │ │ ├── meta_service_test.cc │ │ ├── meta_store_factory_test.cc │ │ ├── mock_meta_service.h │ │ ├── sqlite_meta_store_test.cc │ │ ├── statement_test.cc │ │ └── temp_file_inl.h │ ├── query/ │ │ ├── CMakeLists.txt │ │ ├── bthread_queue_test.cc │ │ ├── equal_query_test.cc │ │ ├── equal_task_test.cc │ │ ├── knn_query_test.cc │ │ ├── knn_task_test.cc │ │ ├── meta_wrapper_test.cc │ │ ├── mock_executor.h │ │ ├── mock_query_context.h │ │ ├── parallel_executor_test.cc │ │ ├── query_factory_test.cc │ │ ├── query_service_test.cc │ │ ├── scheduler_test.cc │ │ ├── task-inl.h │ │ └── task_test.cc │ ├── repository/ │ │ ├── CMakeLists.txt │ │ ├── binlog_event_test.cc │ │ ├── binlog_reader_test.cc │ │ ├── collection_manager_create_test.cc │ │ ├── collection_manager_drop_test.cc │ │ ├── collection_manager_filter_test.cc │ │ ├── collection_manager_test.cc │ │ ├── event_builder.h │ │ ├── event_fetcher_test.cc │ │ ├── fake_collection.h │ │ ├── field_test.cc │ │ ├── info_fetcher_test.cc │ │ ├── lsn_context_format_test.cc │ │ ├── mock_collection_creator.h │ │ ├── mock_index_agent_server.h │ │ ├── mock_mysql_connector.h │ │ ├── mock_mysql_handler.h │ │ ├── mysql_collection_random_test.cc │ │ ├── mysql_collection_scan_mode_test.cc │ │ ├── mysql_collection_schema_change_test.cc │ │ ├── mysql_collection_test.cc │ │ ├── mysql_handler_test.cc │ │ ├── mysql_result_builder.h │ │ ├── mysql_validator_test.cc │ │ ├── port_helper.h │ │ ├── repository_test.conf │ │ ├── rows_event_parser_test.cc │ │ └── table_reader_test.cc │ └── server/ │ ├── CMakeLists.txt │ ├── http_client_test.cc │ ├── port_helper.h │ ├── proto_converter_test.cc │ ├── proxima_search_engine_test.cc │ └── write_request_builder_test.cc └── tools/ ├── CMakeLists.txt ├── admin_client.cc ├── bench_client.cc ├── index_builder.cc └── vecs_reader.h ================================================ FILE CONTENTS ================================================ ================================================ FILE: .clang-format ================================================ # http://clang.llvm.org/docs/ClangFormatStyleOptions.html # Defines the Google C++ style for automatic reformatting. BasedOnStyle: Google MaxEmptyLinesToKeep: 2 DerivePointerAlignment: false PointerAlignment: Right AllowShortFunctionsOnASingleLine: Empty IncludeBlocks: Merge IncludeCategories: - Regex: '^$' Priority: 200 - Regex: '^<[0-9A-Za-z_]+>$' Priority: 201 - Regex: '^<[0-9A-Za-z_]+\.[0-9A-Za-z]+>$' Priority: 202 - Regex: '^<[0-9A-Za-z_]+/[0-9A-Za-z]+' Priority: 203 - Regex: '^\"[0-9A-Za-z_]+/[0-9A-Za-z]+' Priority: 300 - Regex: '^\"[0-9A-Za-z_]+\.[0-9A-Za-z]+\"$' Priority: 301 - Regex: '.*' Priority: 1000 ================================================ FILE: .git/HEAD ================================================ ref: refs/heads/master ================================================ FILE: .git/config ================================================ [core] repositoryformatversion = 1 filemode = true bare = false logallrefupdates = true [remote "origin"] url = https://github.com/alibaba/proximabilin tagOpt = --no-tags fetch = +refs/heads/master:refs/remotes/origin/master promisor = true partialclonefilter = blob:limit=1048576 [branch "master"] remote = origin merge = refs/heads/master ================================================ FILE: .git/description ================================================ Unnamed repository; edit this file 'description' to name the repository. ================================================ FILE: .git/hooks/applypatch-msg.sample ================================================ #!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : ================================================ FILE: .git/hooks/commit-msg.sample ================================================ #!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } ================================================ FILE: .git/hooks/fsmonitor-watchman.sample ================================================ #!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } ================================================ FILE: .git/hooks/post-update.sample ================================================ #!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info ================================================ FILE: .git/hooks/pre-applypatch.sample ================================================ #!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : ================================================ FILE: .git/hooks/pre-commit.sample ================================================ #!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff-index --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- ================================================ FILE: .git/hooks/pre-merge-commit.sample ================================================ #!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : ================================================ FILE: .git/hooks/pre-push.sample ================================================ #!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 ================================================ FILE: .git/hooks/pre-rebase.sample ================================================ #!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END ================================================ FILE: .git/hooks/pre-receive.sample ================================================ #!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi ================================================ FILE: .git/hooks/prepare-commit-msg.sample ================================================ #!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi ================================================ FILE: .git/hooks/push-to-checkout.sample ================================================ #!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 exit 1 } unset GIT_DIR GIT_WORK_TREE cd "$worktree" && if grep -q "^diff --git " "$1" then validate_patch "$1" else validate_cover_letter "$1" fi && if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL" then git config --unset-all sendemail.validateWorktree && trap 'git worktree remove -ff "$worktree"' EXIT && validate_series fi ================================================ FILE: .git/hooks/update.sample ================================================ #!/bin/sh # # An example hook script to block unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". # # Config # ------ # hooks.allowunannotated # This boolean sets whether unannotated tags will be allowed into the # repository. By default they won't be. # hooks.allowdeletetag # This boolean sets whether deleting tags will be allowed in the # repository. By default they won't be. # hooks.allowmodifytag # This boolean sets whether a tag may be modified after creation. By default # it won't be. # hooks.allowdeletebranch # This boolean sets whether deleting branches will be allowed in the # repository. By default they won't be. # hooks.denycreatebranch # This boolean sets whether remotely creating branches will be denied # in the repository. By default this is allowed. # # --- Command line refname="$1" oldrev="$2" newrev="$3" # --- Safety check if [ -z "$GIT_DIR" ]; then echo "Don't run this script from the command line." >&2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 ================================================ FILE: .git/info/exclude ================================================ # git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ ================================================ FILE: .git/logs/HEAD ================================================ 0000000000000000000000000000000000000000 42a1afe8b35dd3f7c66a06d6194a277c8ba13300 appuser 1779057964 +0000 clone: from https://github.com/alibaba/proximabilin ================================================ FILE: .git/logs/refs/heads/master ================================================ 0000000000000000000000000000000000000000 42a1afe8b35dd3f7c66a06d6194a277c8ba13300 appuser 1779057964 +0000 clone: from https://github.com/alibaba/proximabilin ================================================ FILE: .git/logs/refs/remotes/origin/HEAD ================================================ 0000000000000000000000000000000000000000 42a1afe8b35dd3f7c66a06d6194a277c8ba13300 appuser 1779057964 +0000 clone: from https://github.com/alibaba/proximabilin ================================================ FILE: .git/objects/pack/pack-50d7469b15937123b6a9d2f6b0fef35befd95527.pack ================================================ [File too large to display: 24.3 MB] ================================================ FILE: .git/objects/pack/pack-50d7469b15937123b6a9d2f6b0fef35befd95527.promisor ================================================ ================================================ FILE: .git/objects/pack/pack-9d01884951ce3c844b4ee264b844b04baca4920c.promisor ================================================ 42a1afe8b35dd3f7c66a06d6194a277c8ba13300 refs/heads/master ================================================ FILE: .git/packed-refs ================================================ # pack-refs with: peeled fully-peeled sorted 42a1afe8b35dd3f7c66a06d6194a277c8ba13300 refs/remotes/origin/master ================================================ FILE: .git/refs/heads/master ================================================ 42a1afe8b35dd3f7c66a06d6194a277c8ba13300 ================================================ FILE: .git/refs/remotes/origin/HEAD ================================================ ref: refs/remotes/origin/master ================================================ FILE: .git/shallow ================================================ 42a1afe8b35dd3f7c66a06d6194a277c8ba13300 ================================================ FILE: .gitignore ================================================ .* *~ bazel-* build/* build build.debug build.release bin/* lib/* var/* venv* cmake-build-debug/* tests/integration/conf/* **/__pycache__/* tests/bench/log/* tests/integration/integration tests/integration/log !.git* !.clang-format !.circleci !.drone.yml sdk/python/pyproximabe/proto/* !sdk/python/pyproximabe/proto/__init__.py sdk/python/dist/ sdk/python/pyproximase.egg-info/ GPATH GRTAGS GTAGS sdk/python/pyproximabe/version.py deps/thirdparty/sqlite/sqlite-* docs/public/ docs/resources/ docs/node_modules/ docs/package-lock.json ================================================ FILE: .gitmodules ================================================ [submodule "deps/thirdparty/brpc/brpc"] path = deps/thirdparty/brpc/brpc url = https://github.com/apache/incubator-brpc.git [submodule "deps/thirdparty/gflags/gflags"] path = deps/thirdparty/gflags/gflags url = https://github.com/gflags/gflags.git [submodule "deps/thirdparty/glog/glog"] path = deps/thirdparty/glog/glog url = https://github.com/google/glog.git [submodule "deps/thirdparty/googletest/googletest"] path = deps/thirdparty/googletest/googletest url = https://github.com/google/googletest.git [submodule "deps/thirdparty/protobuf/protobuf"] path = deps/thirdparty/protobuf/protobuf url = https://github.com/protocolbuffers/protobuf.git [submodule "deps/thirdparty/snappy/snappy"] path = deps/thirdparty/snappy/snappy url = https://github.com/google/snappy.git [submodule "deps/thirdparty/sparsehash/sparsehash"] path = deps/thirdparty/sparsehash/sparsehash url = https://github.com/sparsehash/sparsehash.git [submodule "deps/thirdparty/leveldb/leveldb"] path = deps/thirdparty/leveldb/leveldb url = https://github.com/google/leveldb.git ================================================ FILE: CMakeLists.txt ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## ## \file CMakeLists.txt ## \author xiaoxin.gxx ## \date Nov 2020 ## \version 1.0 ## \brief Detail cmake build script ## cmake_minimum_required(VERSION 3.1) cmake_policy(SET CMP0048 NEW) project(proxima-be-project) include(cmake/bazel.cmake) add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) # Install benchmark tools execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/benchmark ${CMAKE_CURRENT_BINARY_DIR}/benchmark ) # Install git hooks execute_process( COMMAND sh scripts/install-git-hooks.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) cc_directory(deps/thirdparty) cc_directory(deps/proxima/) get_property(PROXIMA_LIB GLOBAL PROPERTY proxima_lib_property) set(LIB_PATH "${PROXIMA_LIB}:$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN") cc_directories(src tests sdk tools) if (ENABLE_LOCAL_INTEGRATION) add_custom_command(OUTPUT integration_test COMMAND bash tests/integration/run.sh local WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMENT "Running integration tests" VERBATIM ) else() add_custom_command(OUTPUT integration_test COMMAND bash tests/integration/run.sh docker WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMENT "Running integration tests" VERBATIM ) endif() add_custom_target(integration DEPENDS integration_test) # install conf files install(FILES scripts/conf/proxima_be.conf DESTINATION ${CMAKE_INSTALL_BINDIR}/../conf) git_version(GIT_SRCS_VER ${CMAKE_CURRENT_SOURCE_DIR}) set(CPACK_PACKAGE_VERSION ${GIT_SRCS_VER}) set(CPACK_PACKAGE_NAME proxima-be) include(CPack) ================================================ FILE: Dockerfile ================================================ ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. FROM debian:buster-20210721 AS builder ARG BUILD_DIR=/src/build.docker ARG SRC_DIR=/src ARG BE_DIR=/var/lib/proxima-be ARG CMAKE_ARG="-DCMAKE_BUILD_TYPE=Release -DENABLE_HASWELL=ON" WORKDIR $SRC_DIR RUN apt update && \ apt install -y --no-install-recommends \ git \ ca-certificates \ cmake \ build-essential \ zlib1g-dev \ pkg-config COPY . $SRC_DIR RUN cd $SRC_DIR && git submodule update --init RUN mkdir -p $BUILD_DIR && cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX:PATH=${BE_DIR} $CMAKE_ARG $SRC_DIR && cmake --build $BUILD_DIR --target install/strip -- -j FROM debian:buster-20210721 WORKDIR /var/lib/proxima-be COPY --from=builder /var/lib/proxima-be /var/lib/proxima-be CMD [ "/var/lib/proxima-be/bin/proxima_be", "--config", "/var/lib/proxima-be/conf/proxima_be.conf" ] ================================================ FILE: LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: README.md ================================================ # Proxima Bilin Engine ## 背景介绍 随着 AI 技术的广泛应用,以及数据规模的不断增长,对非结构化数据处理的需求也日益增多。向量检索也逐渐成了 AI 技术链路中不可或缺的一环,同时也是对传统搜索技术的补充。 Proxima 是阿里巴巴达摩院系统 AI 实验室自研的向量检索内核。目前,其核心能力广泛应用于阿里巴巴和蚂蚁集团内众多业务,如淘宝搜索和推荐、蚂蚁人脸支付、优酷视频搜索、阿里妈妈广告检索等。同时,Proxima 还深度集成在各式各类的大数据和数据库产品中,如阿里云 Hologres、搜索引擎 Elastic Search 和 ZSearch、离线引擎 MaxCompute (ODPS) 等,为其提供向量检索的能力。 Proxima BE,全称 Proxima Bilin Engine,是 Proxima 团队开发的服务化引擎,实现了对大数据的高性能相似性搜索。支持 RESTful HTTP 接口访问,同时也支持多种语言的 SDK 以 GRPC 协议访问。 ## 核心能力


Proxima BE 的主要核心能力有以下几点: * **支持单机超大规模索引**:基于底层向量索引的工程和检索算法优化,使得有限成本下,实现了高效率的检索方法,并支持磁盘索引,单片索引可达几十亿的规模。 * **支持多数据源全量和增量同步**:通过 Mysql Repository 等组件,可将 mysql 等数据源中的数据,实时同步至索引服务,提供查询能力,简化数据处理流程。 * **支持向量索引实时增删改查**:基于全新 CRUD 图索引,支持在线大规模向量索引的从 0 到 1 的流式写入,并实现了索引即时增删改查,避免索引需定期重建。 * **支持正排数据查询**:支持在查询时,可展示文档的所有结构化字段。同时后期将基于此功能,进一步扩展出与文本与向量联合检索等功能。 ## 如何构建 环境要求: * Linux or MacOS * gcc >= 4.9 * cmake >= 3.14 ```shell git clone https://github.com/alibaba/proximabilin.git cd proximabilin && git submodule update --init mkdir build && cd build # Build with Debug (Intel Haswell Microarchitecture) #cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_HASWELL=ON .. # Build with Release (Intel Haswell Microarchitecture) cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_HASWELL=ON .. make -j all ``` ## 获取 Docker 镜像 | 平台 | 仓库 | 版本 | | -------- | ------ | ------ | | Linux X86_64 | ghcr.io/proximabilin/proxima-be | 0.2.0 | ## 快速开始 * [安装指南](https://proximabilin.github.io/docs/gettingstarted/installation/) * [使用示例](https://proximabilin.github.io/docs/gettingstarted/example_usage/) ## 使用手册 * [进阶指南](https://proximabilin.github.io/docs/advancedguides/) * [API 手册](https://proximabilin.github.io/docs/apireference/http/) * [SDK 手册](https://proximabilin.github.io/docs/sdkreference/) * [常见问题](https://proximabilin.github.io/docs/faq/) ## 案列展示 ## License [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0) ## 声明 Proxima BE 依赖了如下项目: * [brpc](https://github.com/apache/incubator-brpc) * [protobuf](https://github.com/protocolbuffers/protobuf.git) * [sqlite](https://github.com/sqlite/sqlite) * [sparsehash](https://github.com/sparsehash/sparsehash) * [mysql](https://github.com/mysql) ================================================ FILE: benchmark/README.md ================================================ # Proxima SE Benchmark Toolkits Stand along toolkits for Benchmark test of ProximaSE ## 1. Requirements * Python3 (Above 3.6 with setuptools and pip installed) * [VirtualEnv](https://virtualenv.pypa.io/en/latest/) Optional, recommend using virtualenv to isolate python environment of ProximaSE ## 2. Environments * Machine and OS refers to ProximaSE * MYSQL, The payload of benchmark tests ## 3. Install Do not need to install, just run it under the directory where toolkits located ## 4. Run ### 4.1 ProximaSE Build Benchmark Tools #### 4.1.1 Procedure ```text Step 1: Prepared Repository for ProximaSE Requirements: i: table should have first column named by id with property auto_increment ii: vector column should be prefixed by vector iii: all columns treated as forward attributes except vector and id Step 2: Clone source code of ProximaSE cd (source of ProximaSE) Step 3: Build ProximaSE mkdir build; cd build; cmake ../; make -j Step 4: Run Bench tools cd benchmark; pip install -i https://pypi.antfin-inc.com/simple/ -r requirements.txt; pip install PyMySQL PYTHONPATH=$(pwd) python scripts/build_bench.py ``` #### 4.1.2 Help ```shell $python scripts/build_bench.py Usage: build_bench.py [options] Options: -h, --help show this help message and exit --build_root=BUILD_ROOT The build directory of ProximaSE, default value: [ENV variable PROXIMA_SE_BUILD_ROOT or '$(pwd)/../build'] --repo=JDBC The source of repository, represented by jdbc string -t TABLE, --table=TABLE Target table sync to ProximaSE --counts=COUNTS The number of records will be sync to ProximaSE --log_dir=LOG_DIR Log directory, default is logs --grpc_port=GRPC_PORT Proxima SE GRPC service port, default 16000 --http_port=HTTP_PORT Proxima SE GRPC service port, default 16100 --index_build_threads=INDEX_BUILD_THREADS Index Agent build threads count, default is 10 --index_build_qps=INDEX_BUILD_QPS Threshold QPS of incremental records, default 1000000 --index_directory=INDEX_DIRECTORY Index directory, where indices located, default is 'indices' --max_docs_per_segment=MAX_DOCS_PER_SEGMENT Max records per segment, default 1000000 --meta_uri=META_URI URI of meta store, meta/meta.sqlite -o OUTPUT, --output_dir=OUTPUT Output directory, default random directory --cleanup Cleanup all the outputs after finished --timeout=TIMEOUT Timeout in seconds, default is 86400 --interval=INTERVAL Progress flush interval, default is 5 seconds --report=REPORT Report file, default write to [output]/report.json --summary_progress=SUMMARY Extract interested (approximate Progress, separated by ',') progress records from reports --summary_interval=SUMMARY_INTERVAL Extract interested progress records from reports ``` ### 4.1.3 Example Test benchmark with the dataset of face512d ```shell python scripts/build_bench.py --repo=mysql://root:123456@127.0.0.1:3306/vts_face_fp32_512d \ -t vts_face_fp32_512d_2w \ --output vts_face_fp32_512d_2w ``` The report was located in the current directory named by vts_face_fp32_512d_2w, layout as following: ```text $tree vts_face_fp32_512d_2w/ vts_face_fp32_512d_2w/ ├── conf │   ├── mysql_repo.conf │   └── proxima_se.conf ├── indices │   └── vts_face_fp32_512d_2w │   ├── data.del │   ├── data.fwd.0 │   ├── data.id │   ├── data.manifest │   └── data.pxa.vector.0 ├── logs │   ├── mysql.repo.log │   ├── proxima_se_stderr.log │   ├── proxima_se_stdout.log │   ├── repo │   │   ├── proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.ERROR.20210113-135327.106363 │   │   ├── proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.INFO.20210113-135311.106363 │   │   ├── proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.WARNING.20210113-135327.106363 │   │   ├── proxima_se.log.ERROR -> proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.ERROR.20210113-135327.106363 │   │   ├── proxima_se.log.INFO -> proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.INFO.20210113-135311.106363 │   │   └── proxima_se.log.WARNING -> proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.WARNING.20210113-135327.106363 │   └── be │   ├── proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.ERROR.20210113-135304.106289 │   ├── proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.INFO.20210113-135300.106289 │   ├── proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.WARNING.20210113-135304.106289 │   ├── proxima_se.log.ERROR -> proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.ERROR.20210113-135304.106289 │   ├── proxima_se.log.INFO -> proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.INFO.20210113-135300.106289 │   └── proxima_se.log.WARNING -> proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.WARNING.20210113-135304.106289 ├── meta │   └── meta.sqlite └── report.json 7 directories, 24 files ``` ### 4.2 ProximaSE Query Benchmark Tools #### 4.2.1 Procedure ```text Step 1: Prepared Repository for ProximaSE Requirements: i: ProximaSE should run outside of tools ii: Queries which should stored in mysql, with two columns named by id and vector, vector is string format, separated by "," Step 2: Clone source code of ProximaSE cd (source of ProximaSE) Step 3: Build ProximaSE mkdir build; cd build; cmake ../; make -j Step 4: Run Bench tools cd benchmark; pip install -i https://pypi.antfin-inc.com/simple/ -r requirements.txt; pip install PyMySQL PYTHONPATH=$(pwd) python scripts/query_bench.py -h ``` #### 4.2.2 Help ```shell python scripts/query_bench.py -h Usage: query_bench.py [options] Options: -h, --help show this help message and exit --query=QUERY The source of query, which should be DB connection --table=TABLE Table name --collection=COLLECTION Proxima SE collection --host=HOST Proxima SE grpc service --topk=TOPK Proxima SE topk, separated by ',' --threads=THREADS Number of threads to run test --http Using http proto to test, default is grpc --timeout=TIMEOUT Total seconds for test --interval=INTERVAL Seconds for summary duration ``` ### 4.2.3 Example Test benchmark with the dataset of address512d ```shell # Test Http protocol python scripts/query_bench.py \ --query=mysql://root:123456@11.139.184.242:3306/vts_face_fp32_512d \ --table=vts_face_fp32_512d_q --collection=vts_face_fp32_512d \ --host 33.11.240.73:16000 --topk=100 --threads=50 --http # Test GRPC protocol python scripts/query_bench.py \ --query=mysql://root:123456@11.139.184.242:3306/vts_face_fp32_512d \ --table=vts_face_fp32_512d_q --collection=vts_face_fp32_512d \ --host 33.11.240.73:16000 --topk=100 --threads=50 ``` The report was output on terminal, after finished test, output as following: ```text .... python scripts/query_bench.py --query=mysql://root:123456@11.139.184.242:3306/vts_face_fp32_512d --table=vts_face_fp32_512d_q --collection=vts_face_fp32_512d --host 33.11.240.73:16000 --topk=100 --threads=50 INFO 2021-03-08 17:44:38,747 query_bench.py:225: Arguments: {'query': 'mysql://root:123456@11.139.184.242:3306/vts_face_fp32_512d', 'table': 'vts_face_fp32_512d_q', 'collection': 'vts_face_fp32_512d', 'host': '33.11.240.73:16000', 'topk': '100', 'threads': '50', 'http': False, 'timeout': 60, 'interval': 2} INFO 2021-03-08 17:44:38,747 query_bench.py:78:init Init BenchContext. Total Succeed Failed QPS Latency(AVG) Latency(Min) Latency(Max) 87 87 0 71 87 13 164 908 908 0 453 109 12 251 963 963 0 479 103 13 212 979 979 0 488 101 15 248 971 971 0 460 108 13 427 948 948 0 467 106 13 254 913 913 0 455 109 14 242 883 883 0 437 114 12 267 933 933 0 460 108 14 249 946 946 0 470 105 16 234 940 940 0 468 106 12 236 947 947 0 470 105 18 254 965 965 0 480 103 15 233 933 933 0 464 106 11 244 992 992 0 481 103 12 254 968 968 0 480 103 16 259 942 942 0 467 106 16 249 ``` ### 4.2.4 Cluster mode of bench test If you’re planning to run large-scale load tests you need run query_bench distributed mode. #### 4.2.4.1 Example: ```Shell for i in $(seq 5); do python scripts/query_bench.py \ --query=mysql://root:123456@11.139.184.242:3306/vts_face_fp32_512d \ --table=vts_face_fp32_512d_q --collection=vts_face_fp32_512d \ --host 33.11.240.73:16000 --topk=100 --threads=50 & done ``` ### 4.3 ProximaSE Recall Tools #### 4.3.1 Procedure ```text Step 1: Start ProximaSE outside Step 2: Prepare Queries of Recall test Step 3: Clone source code of ProximaSE cd (source of ProximaSE) Step 4: Build ProximaSE mkdir build; cd build; cmake ../; make -j Step 5: Run Bench tools cd benchmark; pip install -i https://pypi.antfin-inc.com/simple/ -r requirements.txt; pip install PyMySQL PYTHONPATH=$(pwd) python scripts/recall.py ``` #### 4.3.2 Help ```shell $python scripts/recall.py -h Usage: recall.py [options] Options: -h, --help show this help message and exit --query=QUERY The source of query, which should be DB connection --table=TABLE Table name --collection=COLLECTION Proxima SE collection --host=HOST Proxima SE grpc service --gt=GT Proxima SE GT file --topk=TOPK Proxima SE topk, separated by ',' --counts=COUNTS Proxima SE query counts --dump_mismatch Dump mismatched result ``` ### 4.3.3 Example Test benchmark with the dataset of face512d ```shell python scripts/recall.py --query=mysql://root:123456@11.139.184.242:3306/vts_face_fp32_512d \ --table=vts_face_fp32_512d_q \ --collection=vts_face_fp32_512d --topk=1,50,100,200 \ --host 11.139.203.151:18000 --dump_mismatch \ --counts=5 INFO 2021-01-28 09:33:59,276 recall.py:37:init Init BenchContext. Processed @1(%) @50(%) @100(%) @200(%) 1 100.0 98.0 98.0 98.0 25 100.0 99.92 99.84 99.72 50 100.0 99.92 99.86 99.76 75 100.0 99.92 99.88 99.71 100 99.0 99.94 99.89 99.66 125 99.2 99.79 99.78 99.55 150 99.33 99.79 99.77 99.55 175 99.43 99.78 99.77 99.55 200 99.5 99.8 99.76 99.56 225 99.56 99.81 99.78 99.58 250 99.6 99.81 99.78 99.58 275 99.64 99.81 99.76 99.57 300 99.67 99.8 99.75 99.57 325 99.69 99.8 99.75 99.57 350 99.71 99.81 99.74 99.57 375 99.73 99.81 99.74 99.58 400 99.75 99.81 99.74 99.57 425 99.76 99.81 99.74 99.56 450 99.78 99.82 99.74 99.56 475 99.79 99.81 99.75 99.57 500 99.8 99.82 99.76 99.58 --------------------Recall Tests------------------ Processed @1(%) @50(%) @100(%) @200(%) 500 99.8 99.82 99.76 99.58 ``` ================================================ FILE: benchmark/__init__.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. __all__ = ['common'] ================================================ FILE: benchmark/common/__init__.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. __all__ = ['exceptions', 'runner', 'proxima_se_service'] ================================================ FILE: benchmark/common/exceptions.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # base library for proxima se bench toolkits # __all__ = ['ProximaSEException', 'FileNotExits'] class ProximaSEException(Exception): """Base Error Unknown type.""" def __init__(self, message, response_header, response_data): ProximaSEException.__init__( message, response_header, response_data) class FileNotExits(ProximaSEException): def __init__(self, file): ProximaSEException.__init__("%s does not exists" % file, None, None) class PropKeyExceptions(ProximaSEException): def __init__(self, key): ProximaSEException.__init__("%s does not exists" % key, None, None) ================================================ FILE: benchmark/common/mysql_utils.py ================================================ #! /usr/bin/env python # -*- coding: utf8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Proxima SE query # import logging from urllib.parse import urlparse import pymysql class MySQL(object): @staticmethod def connect_db(uri): if not uri or not uri.scheme or uri.scheme.lower() != 'mysql': return None database = uri.path.strip('/').rstrip('/') if uri.path else None if not database or database.find('/') != -1: return None connection = None try: connection = pymysql.connect( host=uri.hostname, user=uri.username, passwd=uri.password, db=uri.path.strip('/').rstrip('/'), # charset='utf8mb4', port=uri.port ) except Exception as e: logging.error(f'Can not connect to mysql {uri.netloc}') return connection @staticmethod def connect(jdbc_str): uri = urlparse(jdbc_str) return MySQL.connect_db(uri) @staticmethod def close(connection): connection.close() @staticmethod def execute(cursor, sql): cursor.execute(sql) return cursor.fetchall() @staticmethod def counts(conn, table): with conn.cursor() as cursor: result = MySQL.execute(cursor, f'select count(*) from {table}') return result[0][0] if result else 0 @staticmethod def schema(conn, table): with conn.cursor() as cursor: result = MySQL.execute(cursor, f'show full columns from {table}') return [c[:1] for c in result] @staticmethod def tables(conn): with conn.cursor() as cursor: result = MySQL.execute(cursor, "show tables") data = [c for i in result for c in i] return data ================================================ FILE: benchmark/common/proxima2_dataset.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Proxima2 Vectors reader # import logging import math import os import json import struct import sys from enum import IntEnum from mmap import mmap from typing import Optional, Any, Tuple class StorageObject(object): def __init__(self, fmt: str = ''): self._fmt = fmt def calcsize(self): """The size of storage, counted by bytes, override if size of derived class is inconstant""" return struct.calcsize(self._fmt) def fmt(self): return self._fmt def pack(self): pass def unpack(self, buffer, offset=0): pass def json(self): return json.dumps(self, indent=4, default=lambda o: o.__dict__) class DatasetHeader(StorageObject): def __init__(self): StorageObject.__init__(self, 'QI') self._num_vectors = 0 self._meta_size = 0 def __del__(self): pass def pack(self): return struct.pack(self.fmt(), self._num_vectors, self._meta_size) def unpack(self, buffer, offset=0): self._num_vectors, self._meta_size = struct.unpack_from(self.fmt(), buffer, offset) def num_vectors(self): return self._num_vectors def meta_size(self): return self._meta_size def meta_base(self): return self.calcsize() def vectors_base(self): return self.calcsize() + self._meta_size class MetaHeader(StorageObject): def __init__(self): StorageObject.__init__(self, 'IHHIIQIIIIIIIIII') self._fmts = ['IHHIIQII', 'IIIIIIII'] self._header_size = 0 # 4 bytes self._major_order = 0 # 2 bytes self._type = 0 # 2 bytes self._dimension = 0 # 4 bytes self._unit_size = 0 # 4 bytes self._space_id = 0 # 8 bytes self._attachment_offset = 0 # 4 bytes self._attachment_size = 0 # 4 bytes self._reserve = (0, 0, 0, 0, 0, 0, 0, 0) # 32 bytes self._attachment = {} def __del__(self): pass def pack(self): return b''.join([struct.pack(self._fmts[0], self._header_size, self._major_order, self._type, self._dimension, self._unit_size, self._space_id, self._space_id, self._attachment_offset, self._attachment_size), struct.pack(self._fmts[1], self._reserve[0], self._reserve[1], self._reserve[2], self._reserve[3], self._reserve[4], self._reserve[5], self._reserve[6], self._reserve[7]), struct.pack("s", json.dumps(self._attachment))]) def unpack(self, buffer, offset=0): (self._header_size, self._major_order, self._type, self._dimension, self._unit_size, self._space_id, self._attachment_offset, self._attachment_size) = struct.unpack_from(self._fmts[0], buffer, offset) self._reserve = struct.unpack_from(self._fmts[1], buffer, offset + struct.calcsize(self._fmts[0])) if self._attachment_size: attachment = struct.unpack_from("%ds" % self._attachment_size, buffer, offset + self._attachment_offset) self._attachment = json.loads(attachment[0]) def header_size(self): return self._header_size def major_order(self): return self._major_order def type(self): return self._type def dimension(self): return self._dimension def unit_size(self): return self._unit_size def space_id(self): return self._space_id def attachment_offset(self): return self._attachment_offset def attachment_size(self): return self._attachment_size def reserve(self): return self._reserve def vector_size(self): return self._unit_size * self._dimension class FeatureTypes(IntEnum): # FT_UNDEFINED = 0 # FT_INT64 = 0 # hack types, which used to load unsigned long long # FT_BINARY32 = 1 # FT_BINARY64 = 2 FT_FP16 = 3 FT_FP32 = 4 FT_FP64 = 5 FT_INT8 = 6 FT_INT16 = 7 # FT_INT4 = 8 class ValueTypeHelper(object): """ Reference to deps/proxima/include/aitheta2/index_meta.h enum FeatureTypes { FT_UNDEFINED = 0, FT_BINARY32 = 1, FT_BINARY64 = 2, FT_FP16 = 3, FT_FP32 = 4, FT_FP64 = 5, FT_INT8 = 6, FT_INT16 = 7, FT_INT4 = 8, }; """ fmt_table = '***efdbh*' default_value_table = [0, 0, 0, 0.0, 0.0, 0.0, 0, 0, 0] precision_table = [0, 0, 0, 3, 6, 10, 0, 0, 0] @classmethod def fmt(cls, value_type: FeatureTypes, counts: int = 1): return counts * cls.fmt_table[value_type] @classmethod def pack(cls, value_type: FeatureTypes, value) -> bytes: return struct.pack(cls.fmt(value_type), value) @classmethod def pack_values(cls, value_type: FeatureTypes, values): for value in values: yield cls.pack(value_type, value) @classmethod def pack_array(cls, value_type: FeatureTypes, array) -> bytes: return b''.join(cls.pack_values(value_type, array)) @classmethod def default(cls, value_type): return cls.default_value_table[value_type] @classmethod def default_values(cls, value_type, counts): for i in range(counts): yield cls.default(value_type) @classmethod def default_array(cls, value_type, counts): return list(cls.default_values(value_type, counts)) @classmethod def precision(cls, value_type): return cls.precision_table[value_type] class VectorObject(StorageObject): def __init__(self, value_type: FeatureTypes, counts): StorageObject.__init__(self, ValueTypeHelper.fmt(value_type, counts)) self._value_type = value_type self._counts = counts self._vector = ValueTypeHelper.default_array(value_type, counts) def pack(self): return ValueTypeHelper.pack_array(self._value_type, self._vector) def unpack(self, buffer, offset=0): self._vector = struct.unpack_from(self.fmt(), buffer, offset) precision = ValueTypeHelper.precision(self._value_type) if precision != 0: self._vector = [round(v, precision) for v in self._vector] def vector(self): return self._vector class KeyObject(StorageObject): def __init__(self): StorageObject.__init__(self, 'Q') self._key = 0 def pack(self): return struct.pack(self.fmt(), self._key) def unpack(self, buffer, offset=0): self._key = struct.unpack_from(self.fmt(), buffer, offset) def key(self): return self._key class RandomBufferReader(object): def __init__(self): pass def size(self): return 0 def read(self, offset, size): pass class RandomMMapReader(RandomBufferReader): def __init__(self, vector_file): RandomBufferReader.__init__(self) self._fp = open(vector_file, 'r+b') self._mm = mmap(self._fp.fileno(), 0) def __del__(self): self._mm.close() self._fp.close() def size(self): return self._mm.size() def read(self, offset, size): if offset < 0 or size < 0 or offset + size > self._mm.size(): raise IOError return self._mm[offset:offset + size] class RandomFileReader(RandomBufferReader): def __init__(self, vector_file): RandomBufferReader.__init__(self) self._file = open(vector_file, 'rb') self._size = self.size() def __del__(self): self._file.close() def size(self): current = self._file.tell() self._file.seek(0, os.SEEK_END) count = self._file.tell() self._file.seek(current, os.SEEK_SET) return count def read(self, offset, size): if offset < 0 or size < 0 or offset + size > self._size: raise IOError self._file.seek(offset) return self._file.read(size) class Proxima2VectorsReader(object): def __init__(self, buffer: RandomBufferReader): self._buffer = buffer self._header = None self._meta = None self._vectors_base = 0 self._keys_base = 0 self._keys_cache = () self._cached_begin = 0 def __del__(self): pass def header(self): return self._header def meta(self): return self._meta def num_vectors(self): return self._header.num_vectors() def _load_header(self) -> Optional[DatasetHeader]: header = DatasetHeader() if self._buffer.size() < header.calcsize(): return None buf = self._buffer.read(0, header.calcsize()) header.unpack(buf) return header def _load_meta(self) -> Optional[MetaHeader]: meta = MetaHeader() if self._header is None or self._buffer.size() < self._header.vectors_base(): return None buf = self._buffer.read(self._header.calcsize(), self._header.meta_size()) meta.unpack(buf) return meta def _vector_base(self, index): return self._vectors_base + index * self._meta.vector_size() def _key_base(self, index): return self._keys_base + index * 8 def load(self): if not self._buffer: return False self._header = self._load_header() self._meta = self._load_meta() self._vectors_base = self._header.vectors_base() self._keys_base = self._vector_base(self._header.num_vectors()) def unload(self): return True def is_valid(self): return self._header and self._meta and \ self._buffer.size() == self._key_base(self._header.num_vectors()) def vector(self, index): if index >= self._header.num_vectors(): return None vec = VectorObject(self._meta.type(), self._meta.dimension()) buf = self._buffer.read(self._vector_base(index), vec.calcsize()) vec.unpack(buf) return vec.vector() def _load_keys(self, begin, counts): if begin + counts > self._header.num_vectors(): return [] key = KeyObject() buf = self._buffer.read(self._key_base(begin), counts * key.calcsize()) return struct.unpack(counts * key.fmt(), buf) def _cache_range(self): return [self._cached_begin, self._cached_begin + len(self._keys_cache) - 1] def _in_cache(self, index): cached = self._cache_range() return cached[0] <= index <= cached[1] def _load_batch_keys(self, index): begin = int((index / 1024) * 1024) counts = 1024 if (begin + 1024) < self._header.num_vectors() else self._header.num_vectors() - begin self._keys_cache = self._load_keys(begin, counts) self._cached_begin = begin def key(self, index): if index >= self._header.num_vectors(): return None if not self._in_cache(index): self._load_batch_keys(index) return self._keys_cache[index - self._cached_begin] class Proxima2GTRecall(object): """ Format: pk, score """ pack_fmt = 'Lf' def __init__(self, pk=0, score=0.0): self.pk = pk self.score = score def __eq__(self, other): return self.equals(other) @classmethod def calcsize(cls): return struct.calcsize(Proxima2GTRecall.pack_fmt) def pack(self): return struct.pack(Proxima2GTRecall.pack_fmt, self.pk, self.score) def unpack(self, buf, offset=0): self.pk, self.score = struct.unpack_from(Proxima2GTRecall.pack_fmt, buf, offset) # self.score = round(self.score, 6) def is_same_pk(self, pk): return self.pk == pk def is_same_score(self, score): return math.isclose(self.score, score, 1e-06) def equals(self, recall): return self.is_same_score(recall.pk) and self.is_same_score(recall.score) class CustomEncoder(json.JSONEncoder): def default(self, x): if isinstance(x, Proxima2GTRecall): return {'pk': x.pk, 'score': x.score} return super().default(self, x) def _default_receiver(_): pass class Proxima2GTRecord(object): """ GTRecord: gt_count, [Proxima2GTRecall, ...] """ pack_fmt = 'i' def __init__(self, count=0): self._count = count self._recalls = [] def dumps(self): return {"count": self._count, "recalls": self._recalls} def calcsize(self): return struct.calcsize(Proxima2GTRecord.pack_fmt) + self._count * Proxima2GTRecall.calcsize() def pack(self): return struct.pack(Proxima2GTRecord.pack_fmt, self._count) + \ b''.join([recall.pack() for recall in self.recalls]) def unpack(self, buf, offset=0): self._count, = struct.unpack_from(Proxima2GTRecord.pack_fmt, buf, offset) offset += struct.calcsize(Proxima2GTRecord.pack_fmt) self._recalls = [] for i in range(self._count): recall = Proxima2GTRecall() recall.unpack(buf, offset) offset += recall.calcsize() self._recalls.append(recall) def count(self): return self._count def record(self, pk): return self.find(pk) def recalls(self, end=sys.maxsize): end = min(end, self._count) for r in self._recalls[:end]: yield r def find(self, pk): try: f = filter(lambda record: record.pk == pk, self._recalls) return next(f) except StopIteration as e: return None def exists(self, pk): return self.find(pk) is not None def pk_set(self, end=sys.maxsize): end = min(end, len(self._recalls)) return set([r.pk for r in self._recalls[:end]]) def score_set(self, end=sys.maxsize): return set(self.score_list(end)) def score_list(self, end=sys.maxsize): end = min(end, len(self._recalls)) return [r.score for r in self._recalls[:end]] def append(self, record): self._recalls.append(record) self._count = len(self._recalls) def filter_pk(self, record, nums, receiver=_default_receiver): pks = record.pk_set(nums) & self.pk_set(nums) results = [] for r in self.recalls(nums): if r.pk in pks: results.append(r) else: receiver(r) return results def filter_pk_not_in(self, record, nums, receiver=_default_receiver): pks = record.pk_set(nums) & self.pk_set(nums) results = [] for r in self.recalls(nums): if r.pk not in pks: results.append(r) else: receiver(r) return results def _score_in_list(self, score, array): try: f = filter(lambda s: math.isclose(s, score, rel_tol=1e-05), array) next(f) return True except StopIteration as _: return False def _score_list_and(self, left, right): results = [] for s in left: if self._score_in_list(s, right): results.append(s) return results def filter_score(self, record, nums, receiver=_default_receiver): score_set = record.score_set(nums) & self.score_set(nums) # score_set = set(self._score_list_and(self.score_list(), record.score_list())) results = [] for r in self.recalls(nums): if r.score in score_set: results.append(r) else: receiver(r) return results def filter_score_not_in(self, record, nums, receiver=_default_receiver): score_set = record.score_set(nums) & self.score_set(nums) # score_set = set(self._score_list_and(self.score_list(), record.score_list())) results = [] for r in self.recalls(nums): if r.score not in score_set: results.append(r) else: receiver(r) return results def __and__(self, other): return other.pk_set() and self.pk_set() def __or__(self, other): return other.pk_set() or self.pk_set() class Proxima2GT(object): """ Ground Truth file reader Format: [Proxima2GTRecord, ....] """ def __init__(self, gt_counts, gt_file, skip_magic=True): self._skip_magic = skip_magic self._counts = gt_counts self._gt_file = gt_file self._records = [] def __del__(self): self._records = [] def load(self): record = Proxima2GTRecord(self._counts) stat = os.stat(self._gt_file) if stat.st_size == 0 or stat.st_size % record.calcsize() != 0: logging.error(f'Failed to check size of gt file, which should be multiple times of {record.calcsize()}') return False with open(self._gt_file, 'rb') as fin: while True: record = Proxima2GTRecord(self._counts) buf = fin.read(record.calcsize()) if not buf: break record.unpack(buf) self._records.append(record) return True def unload(self): self._records = [] def records(self): for r in self._records: yield r def record(self, idx): if abs(idx) < len(self._records): return self._records[idx] return None def counts(self): return len(self._records) def append(self, record): self._records.append(record) def serialize(self): with open(self._gt_file, 'w+b') as out: for r in self.records(): out.write(r.pack()) ================================================ FILE: benchmark/common/proxima_be_query.py ================================================ #! /usr/bin/env python # -*- coding: utf8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Proxima SE query # import sys import struct from common.mysql_utils import MySQL def _parse_int(string): return int(string) def _parse_float(string): return float(string) def _parse_none(_): return None class QuerySet(object): def __init__(self): pass def init(self) -> bool: pass def cleanup(self) -> bool: pass def counts(self) -> int: pass def queries(self, start=0, end=sys.maxsize): pass def query(self, start=0, counts=1): pass class MysqlRawQuerySet(QuerySet): def __init__(self, uri, table, collection): super().__init__() self._uri = uri self._conn = MySQL.connect(uri) self._table = table self._collection = collection def __del__(self): MySQL.close(self._conn) def _columns(self): return [c.name for c in self._collection.collection_config.index_column_params] def counts(self) -> int: return MySQL.counts(self._conn, self._table) def queries(self, start=0, end=sys.maxsize): end = min(end, self.counts()) columns = self._columns() if len(columns) != 1 or end <= 0: return [] with self._conn.cursor() as cursor: result = MySQL.execute( cursor, f'select {",".join(columns)} from {self._table} where id >= {start} and id < {end + 1}') for query in result: yield query def query(self, start=0, counts=1): columns = self._columns() with self._conn.cursor() as cursor: return MySQL.execute(cursor, f'select {",".join(columns)} from {self._table} where id >= {start} limit {counts}') class MysqlRawQuerySetCache(MysqlRawQuerySet): def __init__(self, uri, table, collection): super().__init__(uri, table, collection) self._queries = [] self._use_binary = True self._dimension = None def __len__(self): return len(self._queries) def __getitem__(self, item): assert isinstance(item, int) and item < len(self._queries) return self._queries[item] def counts(self) -> int: if len(self._queries) == 0: return super().counts() return len(self._queries) def init(self) -> bool: for query in super().queries(): query = list(map(float, query[0].split(","))) self._dimension = len(query) if self._use_binary: qlen = len(query) query = struct.pack(f'<{qlen}f', *query) self._queries.append(query) return True def cleanup(self) -> bool: self._queries = [] def queries(self, start=0, end=sys.maxsize): for idx in range(start, end): yield self._queries[idx] def query(self, start=0, counts=1): if counts == 1 and start < len(self._queries): return self._queries[start] return self._queries[start: start+counts] def dimension(self): return self._dimension ================================================ FILE: benchmark/common/proxima_be_repo.py ================================================ #! /usr/bin/env python # -*- coding: utf8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Proxima SE Repository source # from common.mysql_utils import MySQL class ProximaSERepoSource(object): def __init__(self, jdbc): self._jdbc = jdbc def __del__(self): pass def jdbc_str(self): return self._jdbc def is_valid(self) -> bool: pass def tables(self): pass def schema(self, table): pass def counts(self, table): pass class MysqlRepoSource(ProximaSERepoSource): def __init__(self, jdbc, table): ProximaSERepoSource.__init__(self, jdbc) self._table = table self._with_conn = None self._conn = MySQL.connect(self._jdbc) def __del__(self): pass def __enter__(self): if self._with_conn: self._with_conn = MySQL.connect(self._jdbc) return self._with_conn def __exit__(self, exc_type, exc_val, exc_tb): if self._with_conn: self._with_conn.close() self._with_conn = None def is_valid(self) -> bool: return True if self._conn and len(self.schema(self._table)) != 0 else False def tables(self): return MySQL.tables(self._conn) def schema(self, table=None): table = self._table if not table else table return MySQL.schema(self._conn, table) def counts(self, table=None): table = self._table if not table else table return MySQL.counts(self._conn, table) ================================================ FILE: benchmark/common/proxima_be_service.py ================================================ #! /usr/bin/env python # -*- coding: utf8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Proxima Service management module # import http import os import re import logging import signal import tempfile import threading import time from enum import IntEnum from google.protobuf.text_format import MessageToString, PrintMessage, Parse from .runner import ShellRunner from pyproximase.proto import config_pb2 GRPC_PORT = 16000 HTTP_PORT = 16100 class ServiceListener(object): def on_failed(self, name) -> bool: logging.info(f'Service({name}) failed!!') return True def on_finished(self, name) -> bool: logging.info(f'Service({name}) finished!!') return True class ServiceStatus(IntEnum): INITIALIZED = 0 RUNNING = 1 FAILED = 2 FINISHED = 3 UNINITIALIZED = 4 class ProximaSEService(object): def __init__(self, service_name, working_dir, listener): self._service_name = service_name self._working_dir = working_dir self._listener = listener def __del__(self): pass @staticmethod def write_config_file(config_file, config): with open(config_file, 'w+') as out: PrintMessage(config, out) logging.info("Write config(%s): \n%s" % (config_file, MessageToString(config))) @staticmethod def write_file(config_file, config): with open(config_file, 'w+') as out: out.write(config) class Stats(object): def __init__(self, cpu=0, memory=0): self._cpu = cpu self._memory = memory def cpu(self): return round(self._cpu, 2) def memory_in_bytes(self): return self._memory def memory_in_kb(self): return round(float(self._memory) / 1024, 2) def memory_in_mb(self): return round(self.memory_in_kb() / 1024, 2) def memory_in_gb(self): return round(self.memory_in_mb() / 1024, 2) def service_name(self): return self._service_name def working_dir(self): return self._working_dir def listener(self): return self._listener def init(self) -> bool: pass def cleanup(self) -> bool: pass def start(self) -> bool: pass def stop(self) -> bool: pass def stdout_log(self) -> str: pass def stderr_log(self) -> str: pass def status(self) -> ServiceStatus: pass def service_addr(self) -> str: pass def stats(self) -> Stats: pass class LogHandler(object): def on_stdin(self, msg): pass def on_stderr(self, msg): pass class LoggingMonitor(threading.Thread): def __init__(self, process, handler, interval=0.01): """ @param interval: sleep seconds between dump log """ threading.Thread.__init__(self) self._process = process self._handler = handler self._interval = interval self._stopped = True def run(self): self._stopped = False while not self._stopped: if self._process.poll(): # sub process finished break if ShellRunner.readable(self._process.stdout): self._handler.on_stdin(self._process.stdout.read()) elif ShellRunner.readable(self._process.stderr): self._handler.on_stderr(self._process.stderr.read()) else: time.sleep(self._interval) def stop(self): self._stopped = True class ProximaSEBaseService(ProximaSEService, LogHandler): def __init__(self, service_name, binary, config, working_dir, listener, cleanup_logs): ProximaSEService.__init__(self, service_name, working_dir, listener) self._binary = binary self._config = config self._log = self.stdout_log() self._stdout_fd = None self._process = None self._log_monitor = None self._cleanup_logs = cleanup_logs def __del__(self): self.cleanup() self._process = None def init(self) -> bool: if self._process: logging.info(f'Service({self.service_name()}) have been initialized') return True if not os.path.isdir(self.working_dir()) or os.path.isfile(self._log): logging.error(f'Working directory({self.working_dir()}) does not exist or log file({self._log}) exists') return False if not os.path.isfile(self._binary) or not os.path.isfile(self._config): logging.error( f'Service({self.service_name()}) binary({self._binary}) or config({self._config}) do not exist') return False return True @staticmethod def _remove_log(log): if log and os.path.isfile(log): os.remove(log) def cleanup(self) -> bool: if self._process: self.stop() if self._cleanup_logs: self._remove_log(self.stdout_log()) self._remove_log(self.stderr_log()) return True def start(self) -> bool: return False def stop(self) -> bool: logging.info(f'Stop {self.service_name()} process') # Stop sub process if self._process and not self._process.poll(): self._process.terminate() self._process.wait() # Replaced by signal user2 # self._process.send_signal(signal.SIGUSR2) # code = self._process.poll() # if not code: # self._process.terminate() # self._process.wait() # Stop logging thread if self._log_monitor: self._log_monitor.stop() self._log_monitor.join() self._log_monitor = None # CLose log file if self._stdout_fd: self._stdout_fd.close() self._stdout_fd = None return True def running(self): return self.status() == ServiceStatus.RUNNING def status(self) -> ServiceStatus: if self._process: code = self._process.poll() if not code: return ServiceStatus.RUNNING elif code in [0, 1, signal.SIGTERM, signal.SIGUSR2]: return ServiceStatus.FINISHED logging.info(f'{self.service_name()} returned with code: {code}') return ServiceStatus.FAILED return ServiceStatus.UNINITIALIZED def service_addr(self) -> str: return '' def _write_log(self, msg): if self._stdout_fd and msg: self._stdout_fd.write(msg) def on_stdin(self, msg): self._write_log(msg) def on_stderr(self, msg): self._write_log(msg) def stats(self) -> ProximaSEService.Stats: return ProximaSEService.Stats() def _read_int_value(key, default, **kwargs): return int(kwargs[key]) if key in kwargs else default def _read_str_value(key, default, **kwargs): return kwargs[key] if key in kwargs else default class ProximaSEMysqlRepo(ProximaSEBaseService): def __init__(self, binary, config, working_dir, listener=ServiceListener(), cleanup_logs=False): ProximaSEBaseService.__init__(self, "ProximaSE MYSQL Repository", binary, config, working_dir, listener, cleanup_logs) @staticmethod def build_config(**kwargs): log_directory = _read_str_value("log_directory", "log", **kwargs) index_agent_addr = _read_str_value("index_agent_addr", None, **kwargs) if not index_agent_addr: listen_port = _read_int_value("index_port", GRPC_PORT, **kwargs) index_agent_addr = f'127.0.0.1:{listen_port}' repository_name = _read_str_value("repository_name", None, **kwargs) return """common_config { log_directory: "%s" log_file: "mysql_repo.log" } repository_config { index_agent_addr: "%s" repository_name: "%s" }""" % (log_directory, index_agent_addr, repository_name) @staticmethod def build_config_file(config_file, **kwargs): config = ProximaSEMysqlRepo.build_config(**kwargs) ProximaSEService.write_file(config_file, config) def start(self) -> bool: if self.running(): logging.warning(f'{self.service_name()} have been started, please call stop first') return False logging.info(f'Start {self.service_name()} process') # Start Service as sub process self._process = ShellRunner.aync_execute([self._binary, '--config', self._config]) self._stdout_fd = open(self._log, 'w+b') # Redirect log of Service self._log_monitor = LoggingMonitor(self._process, self) self._log_monitor.start() return True def stdout_log(self) -> str: return os.path.join(self.working_dir(), "mysql.repo.log") if self.working_dir() else None def stderr_log(self) -> str: return '' def on_stdin(self, msg): ProximaSEBaseService.on_stdin(self, msg) def on_stderr(self, msg): ProximaSEBaseService.on_stderr(self, msg) class ProximaSEBVarService(object): @staticmethod def process_stat(address) -> ProximaSEService.Stats: try: conn = http.client.HTTPConnection(address) conn.request("GET", "/vars/process_cpu_usage,system_core_count,process_memory_resident") resp = conn.getresponse().read().decode('UTF-8') conn.close() match = re.match( r"process_cpu_usage : (.*)\r\nprocess_memory_resident : (.*)\r\nsystem_core_count : (.*)\r\n", resp, re.M | re.I) return ProximaSEService.Stats(float(match.group(1)) * int(match.group(3)), int(match.group(2))) except Exception as e: logging.error(e) return ProximaSEService.Stats() @staticmethod def api_status(address): try: conn = http.client.HTTPConnection(address) conn.request("GET", "/status") resp = conn.getresponse().read().decode('UTF-8') conn.close() return resp except Exception as e: logging.error(e) return "" class ProximaSE(ProximaSEBaseService): def __init__(self, binary, config, working_dir, listener=ServiceListener(), cleanup_logs=False): ProximaSEBaseService.__init__(self, "ProximaSE", binary, config, working_dir, listener, cleanup_logs) self._stderr_fd = None pass @staticmethod def build_meta_file(meta_file=None): temp_file = tempfile.mktemp(suffix=".sqlite") if not meta_file else meta_file return f'sqlite://{temp_file}' @staticmethod def build_config(**kwargs): config = config_pb2.ProximaSEConfig() # Common Config config.common_config.log_directory = _read_str_value("log_directory", "log", **kwargs) config.common_config.grpc_listen_port = _read_int_value("grpc_port", GRPC_PORT, **kwargs) config.common_config.http_listen_port = _read_int_value("http_port", HTTP_PORT, **kwargs) # Index Config config.index_config.build_thread_count = _read_int_value("index_build_threads", 10, **kwargs) config.index_config.dump_thread_count = _read_int_value("index_dump_threads", 5, **kwargs) config.index_config.max_build_qps = _read_int_value("index_build_qps", 1000000, **kwargs) config.index_config.index_directory = _read_str_value("index_directory", "indices", **kwargs) # Meta Config config.meta_config.meta_uri = _read_str_value("meta_uri", ProximaSE.build_meta_file(), **kwargs) return config @staticmethod def build_config_file(config_file, **kwargs): config = ProximaSE.build_config(**kwargs) ProximaSEService.write_config_file(config_file, config) def stdout_log(self) -> str: return os.path.join(self.working_dir(), "proxima_se_stdout.log") if self.working_dir() else None def stderr_log(self) -> str: return os.path.join(self.working_dir(), "proxima_se_stderr.log") if self.working_dir() else None def start(self) -> bool: if self.running(): logging.warning(f'{self.service_name()} have been started, please call stop first') return False logging.info(f'Start {self.service_name()} process') # Start ProximaSE as sub process self._process = ShellRunner.aync_execute([self._binary, '--config', self._config]) self._stdout_fd = open(self.stdout_log(), 'w+b') self._stderr_fd = open(self.stderr_log(), 'w+b') # Redirect log of Mysql Repo self._log_monitor = LoggingMonitor(self._process, self) self._log_monitor.start() return True def stop(self) -> bool: code = ProximaSEBaseService.stop(self) if code and self._stderr_fd: self._stderr_fd.close() self._stderr_fd = None return code def on_stderr(self, msg): if self._stderr_fd and msg: self._stderr_fd.write(msg) def service_addr(self) -> str: config = config_pb2.ProximaSEConfig() with open(self._config, 'r') as config_fd: text = config_fd.read() Parse(text, config, allow_unknown_field=True) return f'127.0.0.1:{config.common_config.grpc_listen_port}' def stats(self) -> ProximaSEService.Stats: return ProximaSEBVarService.process_stat(self.service_addr()) ================================================ FILE: benchmark/common/runner.py ================================================ #! /usr/bin/env python # -*- coding: utf8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Shell command runner # import os import subprocess import time import select from .exceptions import FileNotExits class ShellRunner(object): @staticmethod def read_output(fd): out = fd.read() if len(out) == 0: out = None return out @staticmethod def readable(fd): res = select.select([fd], [], [], 1) if res == ([fd], [], []): return True return False @staticmethod def aync_execute(args): return subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False) @staticmethod def execute2(args): p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False) str = "" for line in p.stdout: str += line.decode("utf-8") p.wait() return p.returncode, str @staticmethod def execute(args, timeout=10): st = int(time.time()) out = '' err = '' p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False) code = 0 ct = int(time.time()) while ct - st < timeout: p.poll() if p.returncode: code = p.returncode break if ShellRunner.readable(p.stdout): out += p.stdout.read() if ShellRunner.readable(p.stderr): err += p.stderr.read() time.sleep(0.2) ct = int(time.time()) if ct - st >= timeout and not p.returncode: code = 0 p.terminate() if ShellRunner.readable(p.stdout): out += p.stdout.read() if ShellRunner.readable(p.stderr): err += p.stderr.read() return code, out, err class ShellCommand(object): def __init__(self, cmd): if not os.path.isfile(cmd): raise FileNotExits(cmd) self.cmd = cmd def execute(self, *args): return ShellRunner.execute([self.cmd] + args) def execute2(self, *args): return ShellRunner.execute2([self.cmd] + args) ================================================ FILE: benchmark/requirements.txt ================================================ grpcio==1.34.0 grpcio-tools==1.34.0 protobuf==3.14.0 # PyMySQL~=1.0.2 # pyproximabe~=0.1 ================================================ FILE: benchmark/scripts/build_bench.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Proxima SE benchmark toolkits # from datetime import datetime import json import shutil import sys import logging from concurrent.futures import as_completed from concurrent.futures.thread import ThreadPoolExecutor from optparse import OptionParser from urllib.parse import urlparse from google.protobuf.json_format import MessageToDict from pyproximase import Client as SEClient from pyproximase import * from common.proxima_se_repo import MysqlRepoSource from common.proxima_se_service import * from urllib import parse """ Requirements: 1. Above Python3.6 Test Scenario: ------ Step 1: Prepared Repository for ProximaSE Requirements: i: table should have first column named by id with property auto_increment ii: vector column should be prefixed by vector iii: all columns treated as forward attributes except vector and id Step 2: Clone source code of ProximaSE cd (source of ProximaSE) Step 3: Build ProximaSE mkdir build; cd build; cmake ../; make -j Step 4: Run Bench tools cd benchmark; pip install -r requirements.txt; PYTHONPATH=$(pwd) python scripts/build_bench.py ------ """ class BenchContext(object): def __init__(self, output_dir, kwargs): self._output = os.path.realpath(output_dir) self._kwargs = kwargs self._log_dir = kwargs.log_dir if kwargs.log_dir else os.path.join(self._output, 'logs') self._indices_dir = kwargs.index_directory if kwargs.index_directory else os.path.join( self._output, 'indices') self._meta_uri = kwargs.meta_uri self._meta_dir = None if self._meta_uri: uri = urlparse(self._meta_uri) if uri and uri.scheme.lower() == 'sqlite' and uri.path: self._meta_dir = os.path.dirname(uri.path) if self._meta_dir == "/": logging.error("Can't create meta to root directory '/'") self._meta_dir = None else: self._meta_dir = os.path.join(self._output, 'meta') self._meta_uri = f'sqlite://{self._meta_dir}/meta.sqlite' self._repository = None self._table = kwargs.table self._dimension = int(kwargs.dimension) if kwargs.jdbc: path = urlparse(kwargs.jdbc).path if path and len(path) != 0: self._repository = path.strip("/").rstrip("/") self._proxima_se_conf = None self._repository_conf = None self._report = None def output(self): return self._output def options(self): return self._kwargs def repository(self): return self._repository def table(self): return self._table def counts(self): return int(self._kwargs.counts) if self._kwargs.counts else sys.maxsize def meta_dir(self): return self._meta_dir def indices_dir(self): return self._indices_dir def log_dir(self): return self._log_dir def proxima_se_log_dir(self): return os.path.join(self.log_dir(), "be") def repository_log_dir(self): return os.path.join(self.log_dir(), "repo") def timeout_in_seconds(self): return int(self._kwargs.timeout) def output_flush_interval(self): return float(self._kwargs.interval) def config_dir(self): return os.path.join(self._output, "conf") def proxima_se_config(self): if self._proxima_se_conf: return MessageToDict(self._proxima_se_conf) return {} def repository_config(self): return self._repository def proxima_se_config_file(self): return os.path.join(self.config_dir(), 'proxima_se.conf') def proxima_se_repo_config_file(self): return os.path.join(self.config_dir(), 'mysql_repo.conf') def proxima_se_admin_address(self): return ['127.0.0.1', self._proxima_se_conf.common_config.grpc_listen_port] def max_docs_per_segment(self): return int(self._kwargs.max_docs_per_segment) def dimension(self): return self._dimension def report_file(self): return self._report def _init_bench_config(self): self._proxima_se_conf = ProximaSE.build_config(log_directory=self.proxima_se_log_dir(), grpc_port=int(self._kwargs.grpc_port), http_port=int(self._kwargs.http_port), index_build_threads=int(self._kwargs.index_build_threads), index_build_qps=int(self._kwargs.index_build_qps), index_directory=self.indices_dir(), meta_uri=self._meta_uri) self._repository_conf = ProximaSEMysqlRepo.build_config(log_directory=self.repository_log_dir(), index_port=int(self._kwargs.grpc_port), repository_name=self._repository) if self._proxima_se_conf and self._repository_conf: ProximaSEService.write_config_file(self.proxima_se_config_file(), self._proxima_se_conf) ProximaSEService.write_file(self.proxima_se_repo_config_file(), self._repository_conf) return True return False @staticmethod def _create_directory(directory): if not os.path.exists(directory): os.makedirs(directory) def _init_output_dir(self): self._create_directory(self.output()) if not self.meta_dir(): return False logging.info(f'Create meta directory {self.meta_dir()}') self._create_directory(self.meta_dir()) logging.info(f'Create indices directory {self.indices_dir()}') self._create_directory(self.indices_dir()) logging.info(f'Create log directory {self.log_dir()}') self._create_directory(self.log_dir()) self._create_directory(self.proxima_se_log_dir()) self._create_directory(self.repository_log_dir()) logging.info(f'Create config directory {self.config_dir()}') self._create_directory(self.config_dir()) return True def _init_report(self): if self._kwargs.report: if os.path.exists(os.path.dirname(os.path.realpath(self._kwargs.report))): self._report = self._kwargs.report else: logging.error(f'Can not write report file: {self._kwargs.report}') return False else: self._report = os.path.join(self.output(), 'report.json') return True def init(self): if not self._init_report(): return False if not self._init_output_dir(): logging.error(f'Initialize output directory({self.output()}) failed') return False if not self._init_bench_config(): logging.error(f'Can not create bench configs') return False return True @staticmethod def _cleanup_dir(directory): if os.path.isdir(directory): shutil.rmtree(directory) def cleanup(self): if self._kwargs.cleanup: self._cleanup_dir(self.output()) self._cleanup_dir(self.meta_dir()) self._cleanup_dir(self.indices_dir()) self._cleanup_dir(self.log_dir()) self._cleanup_dir(self.config_dir()) return True class ProximaSEBuilds(object): def __init__(self, roots): if not roots: roots = os.getenv("PROXIMA_SE_BUILD_ROOT") if not roots: roots = os.path.realpath(os.path.join(os.getcwd(), "..", "build")) if not os.path.isdir(roots): roots = os.path.realpath(os.path.join(os.getcwd(), "..", "cmake-build-debug")) self._build_roots = roots logging.info(f'Locate Build Root of ProximaSE: {roots}') def proxima_se_binary(self): return os.path.join(self._build_roots, 'bin', 'proxima_se') def proxima_repo_binary(self): return os.path.join(self._build_roots, 'bin', 'mysql_repository') def is_valid(self): return os.path.isdir(self._build_roots) and os.path.isfile(self.proxima_se_binary()) and \ os.path.isfile(self.proxima_repo_binary()) def _timeout_monitor(stopped, timeout, interval): logging.info(f'Timeout monitor started, sleep for {timeout} seconds') slept = 0 while not stopped() and slept < timeout: time.sleep(interval) slept += interval logging.info(f'Timeout monitor stopped') if slept < timeout: return {} else: return {"timeout": True} def _service_stopped_monitor(stopped, interval, *args): logging.info(f'Service monitor started, interval({interval})') while not stopped(): services = map(lambda svc: svc.service_name(), filter(lambda svc: not svc.running(), args)) for service in services: logging.info(f'{service} is not running') return {"stopped": service} time.sleep(interval) logging.info(f'Service monitor stopped') return {} def _progress_monitor(stopped, callback, total, interval, notifier): logging.info(f'Start progress monitor, total({total})') start = time.monotonic() progress = 0.0 last = [0, 0.0] processed = 0 while not stopped(): processed = callback() if processed < 0: processed = 0 logging.info("Can't get processed from callback") break progress = round(float(processed) / total * 100, 4) seconds = time.monotonic() - start incremental = [processed - last[0], seconds - last[1]] last = [processed, seconds] if progress > 100.00: progress = 100.00 print("Processed: %02.2f%%, QPS %d/S, RTQPS %d/S" % ( progress, int(processed / seconds), int(incremental[0] / incremental[1]))) notifier(progress, int(processed / seconds), round(seconds, 2), int(incremental[0] / incremental[1])) if processed >= total: print("Processed: 100%%, QPS %d/S, RTQPS %d/S" % ( int(processed / seconds), int(incremental[0] / incremental[1]))) notifier(100.00, int(processed / seconds), round(seconds, 2), int(incremental[0] / incremental[1])) progress = 100.00 break else: time.sleep(interval) seconds = time.monotonic() - start logging.info("Progress monitor finished") return {"total": processed, "progress": progress, "seconds": int(seconds), 'qps': int(processed / seconds)} class ProximaSEBuildBench(object): _filter_columns = ('id', 'vector') def __init__(self, output_dir, arg_options): self._builds = ProximaSEBuilds(arg_options.build_root) self._context = BenchContext(output_dir, arg_options) self._source = None self._repository = None self._proxima_se = None self._client = None self._last_progress = -1.0 self._summary = {"report": self._context.output(), "progress_header": ['Progress', 'QPS(AVG)', 'Seconds', 'QPS(RT)', 'IndexSize', 'CPU', 'MEM(GB)', 'Time'], "progress_table": []} self._pool = ThreadPoolExecutor(max_workers=5, thread_name_prefix='BenchMonitors') self._futures = [] @staticmethod def human_number(num): if num > 1000000000: return f'{round(float(num) / 1000000000, 2)}B' elif num > 1000000: return f'{round(float(num) / 1000000, 2)}M' elif num > 1000: return f'{round(float(num) / 1000, 2)}T' return str(num) @staticmethod def summary_report(progress, report_file): try: with open(report_file, 'r') as report_fd: report = json.load(report_fd) threads = report['config']['proxima_se']['indexConfig']['buildThreadCount'] print("Threads", "Total", *report['progress_header']) for idx in progress: if 0 <= idx < len(report['progress_table']): print(threads, ProximaSEBuildBench.human_number( int(report['total'] / 100 * report['progress_table'][idx][0])), *report['progress_table'][idx]) else: break except Exception as e: logging.error(e) @staticmethod def summary_reports(progress, interval, *reports): if interval != 0: items = [int(i) for i in range(0, 10000, interval)] elif progress: items = [int(p) for p in progress.split(',')] else: logging.error("Failed to get interested progress") return for report in reports: ProximaSEBuildBench.summary_report(items, report) def init(self): if not self._builds.is_valid(): logging.error("Proxima SE build is invalid, lost binary of proxima_se or mysql_repository") return False if not self._context.init(): logging.error("Init bench context failed") return False self._source = MysqlRepoSource(self._context.options().jdbc, self._context.options().table) if not self._source.is_valid(): logging.error( f'Can not init repository with jdbc: {self._context.options().jdbc}, ' f'table: {self._context.options().table}') return False self._repository = ProximaSEMysqlRepo(self._builds.proxima_repo_binary(), self._context.proxima_se_repo_config_file(), self._context.log_dir()) self._proxima_se = ProximaSE(self._builds.proxima_se_binary(), self._context.proxima_se_config_file(), self._context.log_dir()) self._host, self._port = self._context.proxima_se_admin_address() return self._repository.init() and self._proxima_se.init() def cleanup(self): if self._proxima_se: self._proxima_se.cleanup() if self._repository: self._repository.cleanup() if self._context: self._context.cleanup() return True def _max_lsn(self): try: status, collection = self._client.describe_collection(self._context.table()) if not status.ok(): print(status) return -1 logging.debug(collection) return collection.latest_lsn_context.lsn except Exception as e: logging.error("BRPC Exception") logging.error(e) return -1 def _collection_docs(self): status, stats = self._client.stats_collection(self._context.table()) if status.ok(): return stats.total_doc_count else: logging.debug(status) return -1 def _collection_index_size(self): status, stats = self._client.stats_collection(self._context.table()) if status.ok(): return stats.total_index_file_size else: logging.debug(status) return -1 def _report_progress(self, progress, qps, seconds, rtqps): if progress >= 100 or progress - self._last_progress > 0.1: stats = self._proxima_se.stats() # noinspection PyTypeChecker self._summary['progress_table'].append( [progress, qps, seconds, rtqps, self._collection_index_size(), stats.cpu(), stats.memory_in_gb(), datetime.now().strftime("%Y%m%d_%H:%M:%S")]) self._last_progress = progress def _start_monitors(self): total = min(self._source.counts(), self._context.counts()) return [self._pool.submit(_timeout_monitor, lambda: self.has_monitor_finished(), self._context.timeout_in_seconds(), 5), self._pool.submit(_service_stopped_monitor, lambda: self.has_monitor_finished(), 1, self._repository, self._proxima_se), self._pool.submit(_progress_monitor, lambda: self.has_monitor_finished(), lambda: self._collection_docs(), total, self._context.output_flush_interval(), lambda progress, qps, seconds, rtqps: self._report_progress(progress, qps, seconds, rtqps))] def start(self): if self._proxima_se.start(): time.sleep(10) self._client = SEClient(host=self._host, port=self._port) self.sync_schema() time.sleep(1) if self._repository.start(): self._futures = self._start_monitors() return True return False def stop(self): for done in as_completed(self._futures): self._summary.update(done.result()) self._pool.shutdown() return self._proxima_se.stop() and self._repository.stop() def _valid_schema(self): schema = self._source.schema() columns = [field[0] for field in schema] try: columns.index("id") columns.index("vector") except ValueError: return False return True def _build_repository_config(self): o = parse.urlparse(self._source.jdbc_str()) return DatabaseRepository(self._context.repository(), self._source.jdbc_str(), self._context.table(), o.username, o.password) def _build_forward_metas(self, schema): forwards = filter(lambda field: not field[0] in self._filter_columns, schema) return [field[0] for field in forwards] def _build_column_metas(self): # Init column meta return [IndexColumnParam(self._filter_columns[1], self._context.dimension())] def _build_collection_meta(self, schema): # Init collection meta return CollectionConfig(self._context.table(), self._build_column_metas(), self._build_forward_metas(schema), self._build_repository_config(), self._context.max_docs_per_segment()) def sync_schema(self): if self._proxima_se.running() and self._valid_schema(): meta = self._build_collection_meta(self._source.schema()) status = self._client.create_collection(meta) assert status.ok() _, collection = self._client.describe_collection(meta.collection_name) self._summary['collection'] = str(collection) return True else: logging.error("Can't sync table to ProximaSE") return False def has_monitor_finished(self): logging.debug("Enter") for _ in filter(lambda future: future.done() or future.cancelled(), self._futures): return True logging.debug("Exist") return False def wait_finish(self): logging.debug("Enter") for _ in as_completed(self._futures): # self._summary.update(done.result()) break logging.debug("Exist") return True def summary(self): temp = self._summary temp['config'] = {'proxima_se': self._context.proxima_se_config(), 'repository': self._context.repository_config()} return temp def output_report(self): with open(self._context.report_file(), 'w+') as out: json.dump(self.summary(), out, indent=4) def opt_parser(): arg_parser = OptionParser() arg_parser.add_option('--build_root', dest='build_root', default=None, help="The build directory of ProximaSE, default value: [ENV variable PROXIMA_SE_BUILD_ROOT " "or '$(pwd)/../build']") arg_parser.add_option('--repo', dest='jdbc', default=None, help='The source of repository, represented by jdbc string') arg_parser.add_option('-t', '--table', dest='table', default=None, help='Target table sync to ProximaSE') arg_parser.add_option('--counts', dest='counts', default=None, help='The number of records will be sync to ProximaSE') arg_parser.add_option('--log_dir', dest='log_dir', default=None, help='Log directory, default is logs') arg_parser.add_option('--grpc_port', dest='grpc_port', default=GRPC_PORT, help=f'Proxima SE GRPC service port, default {GRPC_PORT}') arg_parser.add_option('--http_port', dest='http_port', default=HTTP_PORT, help=f'Proxima SE GRPC service port, default {HTTP_PORT}') arg_parser.add_option('--index_build_threads', dest='index_build_threads', default=10, help='Index Agent build threads count, default is 10') arg_parser.add_option('--index_build_qps', dest='index_build_qps', default=1000000, help='Threshold QPS of incremental records, default 1000000') arg_parser.add_option('--index_directory', dest='index_directory', default=None, help="Index directory, where indices located, default is 'indices'") arg_parser.add_option('--max_docs_per_segment', dest='max_docs_per_segment', default=1000000, help='Max records per segment, default 1000000') arg_parser.add_option('--dimension', dest='dimension', default=512, help='Dimension of vector') arg_parser.add_option('--meta_uri', dest='meta_uri', default=None, help='URI of meta store, meta/meta.sqlite') arg_parser.add_option('-o', '--output_dir', dest='output', default=None, help='Output directory, default random directory') arg_parser.add_option('--cleanup', dest='cleanup', action='store_true', default=False, help='Cleanup all the outputs after finished') arg_parser.add_option('--timeout', dest='timeout', default=86400, help='Timeout in seconds, default is 86400') arg_parser.add_option('--interval', dest='interval', default=5.0, help='Progress flush interval, default is 5 seconds') arg_parser.add_option('--report', dest='report', default=None, help='Report file, default write to [output]/report.json') arg_parser.add_option('--summary_progress', dest='summary', default=None, help="Extract interested (approximate Progress, separated by ',') progress records from " "reports") arg_parser.add_option('--summary_interval', dest='summary_interval', default=0, help="Extract interested progress records from reports") return arg_parser def handle_help_and_exit(arg_options, arg_parser, nargs): try: arg_parser.print_help() if nargs == 1 or arg_options.help else None quit() except AttributeError: pass if __name__ == '__main__': logging.basicConfig(level=logging.INFO, format="%(levelname)s %(asctime)s %(filename)s:%(lineno)d:%(funcName)s \t%(message)s") parser = opt_parser() (options, args) = parser.parse_args() handle_help_and_exit(options, parser, len(sys.argv)) if options.summary or int(options.summary_interval) != 0: ProximaSEBuildBench.summary_reports(options.summary, int(options.summary_interval), *args) exit(0) logging.info(f'Arguments: {options}') output = options.output if options.output else tempfile.mktemp() logging.info(f'Run tools with output directory: {output}') code = 0 task = ProximaSEBuildBench(output, options) if task.init(): logging.info("Init bench tools succeed") task.start() task.wait_finish() task.stop() task.output_report() else: logging.error("Failed to init bench tools") code = 1 summary = task.summary() del summary['progress_header'] del summary['progress_table'] logging.info(task.summary()) task.cleanup() exit(code) ================================================ FILE: benchmark/scripts/query_bench.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Proxima SE benchmark toolkits # import logging import random import threading import time import logging from concurrent.futures import as_completed from concurrent.futures.thread import ThreadPoolExecutor from optparse import OptionParser import asyncio from pyproximase import * from common.proxima_se_query import * class Counter(object): def __init__(self): self._counts = [] def counts(self): return len(self._counts) def _sum(self): return sum(self._counts) def avg(self): c = self.counts() return int(self._sum() / c) if c != 0 else 0 def min(self): return min(self._counts) if self.counts() != 0 else 0 def max(self): return max(self._counts) if self.counts() != 0 else 0 def clear(self): self._counts = [] def append(self, c): self._counts.append(c) class PerfRecord(object): def __init__(self): self.succeed = 0 self.failed = 0 self.qps = 0 self.latency_avg = 0 self.latency_min = 0 self.latency_max = 0 class BenchContext(object): def __init__(self, opts): self._options = opts self._collection = None self._queries = None self._lock = threading.Lock() self._counter = Counter() self._failed = 0 self._start = time.monotonic() self.stopped = False def _proto(self): return 'http' if self._options.http else 'grpc' def init(self): logging.info("Init BenchContext.") if self.is_valid(): logging.info("BenchContext have been initialized.") return True client = self.create_client() # Init collection status, self._collection = client.describe_collection(self._options.collection) if not status.ok(): return False # Init query set self._queries = MysqlRawQuerySetCache(self._options.query, self._options.table, self._collection) self._queries.init() return self._queries.counts() != 0 def cleanup(self): self._options = None self._collection = None self._queries = None logging.info("Cleanup BenchContext.") pass def is_valid(self): return self._options and self._collection and self._queries def query(self): return random.choice(self._queries) def create_client(self): return Client(*self._options.host.split(":"), self._proto()) def create_async_client(self): if self._options.http: logging.warning('Asyncclient only support grpc') return AsyncClient(*self._options.host.split(":")) def collection(self): return self._collection.collection_config.collection_name def column(self, idx=0): return self._collection.collection_config.index_column_params[idx].name def topk(self): return int(self._options.topk) def success(self, latency): with self._lock: self._counter.append(latency) def failure(self, _): with self._lock: self._failed += 1 def get_report_and_cleanup(self): record = PerfRecord() with self._lock: seconds = time.monotonic() - self._start record.succeed = self._counter.counts() record.failed = self._failed record.latency_avg = self._counter.avg() record.latency_min = self._counter.min() record.latency_max = self._counter.max() record.qps = int(record.succeed / seconds) self._counter.clear() self._failed = 0 self._start = time.monotonic() return record def opt_parser(): arg_parser = OptionParser() arg_parser.add_option("--query", type=str, dest='query', default="", help="The source of query, which should be DB connection") arg_parser.add_option("--table", type=str, dest="table", default="", help="Table name") arg_parser.add_option("--collection", type=str, dest="collection", default="", help="Proxima SE collection") arg_parser.add_option("--host", type=str, dest="host", default="", help="Proxima SE grpc service") arg_parser.add_option("--topk", type=str, dest="topk", default='200', help="Proxima SE topk, separated by ','") arg_parser.add_option("--threads", type=str, dest="threads", default='1', help="Number of threads to run test") arg_parser.add_option('--http', dest='http', action='store_true', default=False, help='Using http proto to test, default is grpc') arg_parser.add_option('--timeout', type=int, dest='timeout', default=60, help='Total seconds for test') arg_parser.add_option('--interval', type=int, dest='interval', default=2, help='Seconds for summary duration') arg_parser.add_option('--async_batch', type=int, dest='async_batch', default=0, help='If greater than 0, AsyncClient will be used. ' 'It should not be set too big(e.g. > 20), ' 'as python sdk is dominated by protobuf (de)serializing.') return arg_parser class BenchWorker(object): def __init__(self, bench_context): self.context = bench_context self.async_batch = self.context._options.async_batch if self.async_batch: self.client = context.create_async_client() self.loop = asyncio.get_event_loop() else: self.client = context.create_client() self.collection = context.collection() self.column = context.column() self.topk = context.topk() def __call__(self, *_, **__): def sync_query(): while not self.context.stopped: start = time.time() status, resp = self.client.query(self.collection, self.column, self.context.query(), topk=self.topk, data_type=DataType.VECTOR_FP32, batch_count=1, dimension=self.context._queries.dimension()) elapse = int((time.time() - start) * 1000) if status.ok(): self.context.success(elapse) else: print(status, resp) self.context.failure(elapse) async def async_query(): while not self.context.stopped: start = time.time() count = self.async_batch queries = [] for i in range(count): queries.append(self.client.query(self.collection, self.column, self.context.query(), topk=self.topk, data_type=DataType.VECTOR_FP32, batch_count=1, dimension=self.context._queries.dimension())) responses = await asyncio.gather(*queries) elapse = int((time.time() - start) * 1000/count) for status, resp in responses: if status.ok(): self.context.success(elapse) else: print(status, resp) self.context.failure(elapse) if self.async_batch: self.loop.run_until_complete(async_query()) else: sync_query() return True class ProgressMonitor(object): def __init__(self, bench_context, interval): self.context = bench_context self.interval = interval print(" Total Succeed Failed QPS Latency(AVG) Latency(Min) Latency(Max)") def __call__(self, *_, **__): while not self.context.stopped: r = self.context.get_report_and_cleanup() print("%8d %7d %7d %6d %12d %12d %12d" %(r.succeed + r.failed, r.succeed, r.failed, r.qps, r.latency_avg, r.latency_min, r.latency_max)) time.sleep(self.interval) return True def handle_help_and_exit(arg_options, arg_parser, nargs): try: arg_parser.print_help() if nargs == 1 or arg_options.help else None quit() except AttributeError: pass if __name__ == '__main__': logging.basicConfig(level=logging.INFO, format="%(levelname)s %(asctime)s %(filename)s:%(lineno)d:%(funcName)s \t%(message)s") parser = opt_parser() (options, args) = parser.parse_args() handle_help_and_exit(options, parser, len(sys.argv)) logging.info(f'Arguments: {options}') context = BenchContext(options) if not context.init(): logging.error("Failed to init bench context") exit(1) threads = int(options.threads) pool = ThreadPoolExecutor(max_workers=threads+1, thread_name_prefix='BenchWorker') futures = list(map(lambda _: pool.submit(BenchWorker(context)), range(threads))) futures.append(pool.submit(ProgressMonitor(context, options.interval))) time.sleep(options.timeout) context.stopped = True for _ in as_completed(futures): pass pool.shutdown() exit(0) ================================================ FILE: benchmark/scripts/recall.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Proxima SE benchmark toolkits # import concurrent from concurrent.futures.thread import ThreadPoolExecutor from optparse import OptionParser from pyproximase import * from common.proxima_se_query import * from common.proxima2_dataset import * class RecallContext(object): def __init__(self, recall_options): self._options = recall_options self._queries = None self._client = None self._collection = None self._collection_stat = None self._topk = [] def init(self): logging.info("Init BenchContext.") if self.is_valid(): logging.info("BenchContext have been initialized.") return True # Init admin self._client = Client(*self._options.host.split(":")) # Init collection code, self._collection = self._client.describe_collection(self._options.collection) assert code.ok() # Init collection stat code, self._collection_stat = self._client.stats_collection(self._options.collection) assert code.ok() # Init query producer self._queries = MysqlRawQuerySetCache(self._options.query, self._options.table, self._collection) self._queries.init() # Init Topk self._topk = [int(k) for k in self._options.topk.split(",")] self._topk.sort() logging.info(f'Parsing topk {self._topk}') if len(self._topk) == 0: logging.error("Parsing topk failed") return False def is_valid(self): return self._options and self._queries and \ self._client and self._collection and \ self._collection_stat and len(self._topk) != 0 def client(self): return self._client def topk(self): return self._topk def max_topk(self): return self._topk[-1] def gt_count(self): return self.max_topk() def host(self): return self._options.host def sample_counts(self): return int(self._options.counts) def load_gt(self): gt = Proxima2GT(self.gt_count(), self._options.gt) gt.load() return gt def query(self, idx): features = self._queries.query(idx) return list(map(float, features[0].split(","))) def collection(self): return self._collection.collection_config.collection_name def column(self): return self._collection.collection_config.index_column_params[0].name def ef(self): if 'ef_search' in self._collection.collection_config.index_column_params[0].extra_params: return int(self._collection.collection_config.index_column_params[0].extra_params['ef_search']) return 500 def opt_parser(): arg_parser = OptionParser() arg_parser.add_option("--query", type=str, dest='query', default="", help="The source of query, which should be DB connection") arg_parser.add_option("--table", type=str, dest="table", default="", help="Table name") arg_parser.add_option("--collection", type=str, dest="collection", default="", help="Proxima SE collection") arg_parser.add_option("--host", type=str, dest="host", default="", help="Proxima SE grpc service") arg_parser.add_option("--gt", type=str, dest="gt", default=None, help="Proxima SE GT file") arg_parser.add_option("--topk", type=str, dest="topk", default='200', help="Proxima SE topk, separated by ','") arg_parser.add_option("--counts", type=str, dest="counts", default=1, help="Proxima SE query counts") arg_parser.add_option("--dump_mismatch", dest='dump_mismatch', action="store_true", default=False, help='Dump mismatched result') return arg_parser def handle_help_and_exit(arg_options, arg_parser, nargs): try: arg_parser.print_help() if nargs == 1 or arg_options.help else None quit() except AttributeError: pass class ProximaSERecall(Proxima2GTRecall): def __init__(self, doc): super().__init__(doc.forward_column_values['p_key'], doc.score) self.doc_id = doc.primary_key class ProximaSERecallEncoder(json.JSONEncoder): def default(self, x): if isinstance(x, ProximaSERecall): return {'doc_id': x.doc_id, 'pk': x.pk, 'score': x.score} elif isinstance(x, Proxima2GTRecord): return x.dumps() return super().default(self, x) def _se_recall_record(r_context, feature, linear=False): status, response = r_context.client().query(r_context.collection(), r_context.column(), feature, topk=r_context.max_topk(), is_linear=linear, data_type=DataType.VECTOR_FP32, batch_count=1) if status.ok(): record = Proxima2GTRecord() for doc in response.results[0]: record.append(ProximaSERecall(doc)) return True, record return False, None def _diff_ground_truth(gt_context, mismatch_handler): gt = gt_context.load_gt() consist_count = 0 for idx in range(gt_context.sample_counts()): code, recall = _se_recall_record(gt_context, gt_context.query(idx), True) if code: mismatched = recall.filter_score_not_in(gt.record(idx), gt_context.gt_count()) if len(mismatched) != 0: mismatch_handler(idx, gt_context.gt_count(), mismatched) else: consist_count += 1 print(f'{idx}, {round(float(gt_context.gt_count() - len(mismatched)) / gt_context.gt_count() * 100, 4)}') print("consist percentage: %.2f" % round(float(consist_count) / gt_context.sample_counts() * 100, 4)) def _print_header(topk): print("Processed", " ef", " ".join(["%5s(%%)" % f'@{k}' for k in topk])) def _print_summary(topk, ef, summary): samples = "%9d" % len(summary) stats = [samples, "%4d" % ef] for i in range(len(topk)): total = sum([metrics[i] for metrics in summary.values()]) percent = round(total / len(summary) * 100, 4) stats.append("%8s" % str(percent)) print(" ".join(stats)) class BatchRecall(object): def __init__(self, recall_context, start, end, mismatch_handler, reporter): self._context = recall_context self._start = start self._end = end self._mismatch_handler = mismatch_handler self._reporter = reporter self._pool = ThreadPoolExecutor(max_workers=(end - start), thread_name_prefix='BenchRecall') def __del__(self): self._pool.shutdown() @staticmethod def run_one(rc_context, idx, mismatch_handler): metrics = [] feature = rc_context.query(idx) _, gt = _se_recall_record(rc_context, feature, True) code, knn = _se_recall_record(rc_context, feature) if code and knn.count() == rc_context.max_topk(): for topk in rc_context.topk(): mismatched = knn.filter_score_not_in(gt, topk) if len(mismatched) != 0: mismatch_handler(idx, topk, mismatched) metrics.append(round(float(topk - len(mismatched)) / topk, 4)) else: logging.error(f'Failed to get result of query: {idx}, topk {rc_context.max_topk()}') code = False if code: return idx, metrics return None, None def run(self): futures = [self._pool.submit(BatchRecall.run_one, self._context, i, self._mismatch_handler) for i in range(self._start, self._end)] failed = False for future in concurrent.futures.as_completed(futures): idx, metrics = future.result() if not failed and idx is None: failed = True else: self._reporter(idx, metrics) return not failed def _recall(recall_context, mismatch_handler): summary = {} def collector(index, stats): summary[index] = stats total = recall_context.sample_counts() interval = int(total / 20) if total > 50 else 1 start = 0 while start < total: if start == 0: _print_header(recall_context.topk()) end = min(start + interval, total) bench = BatchRecall(recall_context, start, end, mismatch_handler, collector) if bench.run(): _print_summary(recall_context.topk(), recall_context.ef(), summary) else: logging.error(f'Failed to run bench recall test from {start} to {end}') break start = end if len(summary) == recall_context.sample_counts(): print("--------------------Recall Tests------------------") _print_header(recall_context.topk()) _print_summary(recall_context.topk(), recall_context.ef(), summary) def _skipped_handler(*_): pass def _dump_mismatch(idx, topk, records): print('-----Mismatched Result-----') print(json.dumps({'query_id': idx, 'topk': topk, 'mismatched': records}, cls=ProximaSERecallEncoder, indent=2)) if __name__ == '__main__': parser = opt_parser() (options, args) = parser.parse_args() handle_help_and_exit(options, parser, len(sys.argv)) context = RecallContext(options) context.init() handler = _dump_mismatch if options.dump_mismatch else _skipped_handler if options.gt: _diff_ground_truth(context, handler) else: _recall(context, handler) ================================================ FILE: benchmark/scripts/vec2txt.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Proxima SE bench toolkits # import sys from optparse import OptionParser from common.proxima2_dataset import * def opt_parser(): arg_parser = OptionParser() arg_parser.add_option('--vec', dest='vec', default=None, help="Proxima2 vectors file") arg_parser.add_option('--header', dest='header', action="store_true", default=False, help='Dump header') arg_parser.add_option('-o', '--output', dest='output', default='data', help='output directory') arg_parser.add_option('-s', '--segment_size', dest='segment', default=1000000, help='segment size') arg_parser.add_option('--begin', dest='begin', default=0, help='The beginner of vector') arg_parser.add_option('--end', dest='end', default=-1, help='The end of vector') return arg_parser def handle_help_and_exit(arg_options, arg_parser, nargs): try: arg_parser.print_help() if nargs == 1 or arg_options.help else None quit() except Exception as e: # ignore help exception pass class VectorWriter(object): def __init__(self): pass def write(self, key, vector): pass class SQLWriter(VectorWriter): def __init__(self): VectorWriter.__init__(self) def write(self, key, vector): pass class RawWriter(VectorWriter): def __init__(self, output, segment): VectorWriter.__init__(self) self._output = output self._segment_size = segment self._count = 0 self._segment_id = 0 self._segment = None def __del__(self): self._close_segment() def _close_segment(self): if self._segment: self._segment.close() self._segment = None def _segment_name(self): return os.path.join(self._output, "segment.%03d" % self._segment_id) def _open_segment(self): self._close_segment() self._segment = open(self._segment_name(), 'w+') self._segment_id += 1 def write(self, key, vector): if self._count % self._segment_size == 0: self._open_segment() fields = [','.join([str(v) for v in vector]), str(key), "%f" % vector[0], str(vector[0])] self._segment.write("%s\n" % "|".join(fields)) self._count += 1 if __name__ == '__main__': parser = opt_parser() (options, args) = parser.parse_args() handle_help_and_exit(options, parser, len(sys.argv)) if options.vec and os.path.isfile(options.vec) and options.vec.endswith(".vecs2"): output = RawWriter(options.output, int(options.segment)) vectors = Proxima2VectorsReader(RandomMMapReader(options.vec)) vectors.load() if vectors.is_valid(): if options.header: print(vectors.header().json()) print(vectors.meta().json()) begin = int(options.begin) if int(options.begin) >= 0 else 0 end = int(options.end) if int(options.end) >= 0 else vectors.num_vectors() while begin < end: output.write(vectors.key(begin), vectors.vector(begin)) begin += 1 if begin % 100000 == 0: print(begin) else: print("Failed to open vectors") exit(1) vectors.unload() else: print("Lost argument vec, which should be Dataset of Proxima2") parser.print_help() exit(0) ================================================ FILE: benchmark/sql/create_table.sql ================================================ ######################################################################## # face 512 database create database vts_face_fp32_512d; use vts_face_fp32_512d; DROP TABLE IF EXISTS vts_face_fp32_512d; create table vts_face_fp32_512d ( id int(11) primary key not null unique auto_increment, vector varchar(10240) not null, p_key bigint not null, text_field varchar(20), float_field float not null ) CHARSET=utf8 AUTO_INCREMENT=1; load data infile '/var/lib/mysql-files/segment.000' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.001' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.002' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.003' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.004' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.005' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.006' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.007' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.008' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.009' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.010' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.011' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.012' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.013' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.014' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.015' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.016' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.017' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/segment.018' ignore into table vts_face_fp32_512d character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); DROP TABLE IF EXISTS vts_face_fp32_512d_2w; create table vts_face_fp32_512d_2w ( id int(11) primary key not null unique auto_increment, vector varchar(10240) not null, p_key bigint not null, text_field varchar(20), float_field float not null ) CHARSET=utf8 AUTO_INCREMENT=1; load data infile '/var/lib/mysql-files/segment.2w.000' ignore into table vts_face_fp32_512d_2w character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); DROP TABLE IF EXISTS vts_face_fp32_512d_1m; create table vts_face_fp32_512d_1m ( id int(11) primary key not null unique auto_increment, vector varchar(10240) not null, p_key bigint not null, text_field varchar(20), float_field float not null ) CHARSET=utf8 AUTO_INCREMENT=1; load data infile '/var/lib/mysql-files/segment.000' ignore into table vts_face_fp32_512d_1m character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); DROP TABLE IF EXISTS vts_face_fp32_512d_q; create table vts_face_fp32_512d_q ( id int(11) primary key not null unique auto_increment, vector varchar(10240) not null, p_key bigint not null ) CHARSET=utf8 AUTO_INCREMENT=1; load data infile '/var/lib/mysql-files/query.000' ignore into table vts_face_fp32_512d_q character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`); ######################################################################## # 50M 512D database create database chinese_address_512d_l2_norm; use chinese_address_512d_l2_norm; DROP TABLE IF EXISTS chinese_address_512d_l2_norm; create table chinese_address_512d_l2_norm ( id int(11) primary key not null unique auto_increment, vector varchar(10240) not null, p_key bigint not null, text_field varchar(20), float_field float not null ) CHARSET=utf8 AUTO_INCREMENT=1; load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.000' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.001' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.002' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.003' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.004' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.005' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.006' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.007' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.008' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.009' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.010' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.011' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.012' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.013' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.014' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.015' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.016' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.017' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.018' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.019' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.020' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.021' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.022' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.023' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.024' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.025' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.026' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.027' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.028' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.029' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.030' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.031' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.032' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.033' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.034' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.035' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.036' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.037' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.038' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.039' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.040' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.041' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.042' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.043' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.044' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.045' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.046' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.047' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.048' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.049' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.050' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.051' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.052' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.053' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.054' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.055' ignore into table chinese_address_512d_l2_norm character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`); DROP TABLE IF EXISTS chinese_address_512d_l2_norm_q; create table chinese_address_512d_l2_norm_q ( id int(11) primary key not null unique auto_increment, vector varchar(10240) not null, p_key bigint not null ) CHARSET=utf8 AUTO_INCREMENT=1; load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/query.000' ignore into table chinese_address_512d_l2_norm_q character set utf8 fields terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`); ######################################################################## INSERT INTO vts_face_fp32_512d_q(vector, p_key) VALUES ('-0.018950,-0.027601,0.029433,-0.049073,-0.022660,-0.005965,0.056194,0.005138,0.055736,-0.017441,-0.015001,-0.036576,0.004568,-0.058825,-0.071009,0.006936,0.041904,0.020544,0.029058,0.016218,-0.037882,0.008780,-0.010335,-0.003099,0.079163,0.064205,-0.003475,0.001644,0.015865,-0.005466,-0.027281,0.008134,-0.071116,-0.021186,0.025063,-0.072102,-0.058192,-0.053226,0.058055,-0.043831,0.019077,-0.044566,-0.008920,0.067477,0.005366,0.053768,0.064434,0.006666,0.002357,0.021475,-0.002751,-0.012222,-0.051546,0.013340,-0.019127,0.023062,-0.015804,-0.070216,0.016976,-0.056982,-0.010817,-0.056350,0.014693,-0.017572,0.100992,-0.001988,0.026432,-0.081943,0.018010,0.000795,-0.023242,0.020200,-0.040964,-0.035147,-0.008796,-0.011831,-0.051079,0.031011,-0.057911,0.039357,0.045563,-0.020473,-0.014889,0.021077,-0.087319,-0.050683,-0.000506,-0.015053,0.063425,0.023479,0.013168,-0.049454,-0.023739,-0.039333,0.035981,-0.039312,-0.039243,0.001949,0.016238,-0.133142,-0.039268,0.066276,0.018204,-0.033430,-0.047440,0.022615,0.000749,0.083299,-0.047930,0.008380,-0.082127,0.014617,0.001402,0.082150,-0.001830,0.018488,0.000286,0.053385,-0.089946,0.021997,0.021003,0.027360,0.036879,-0.059475,-0.018871,0.092225,0.029489,-0.026508,-0.015768,-0.012865,0.088295,0.016123,-0.029778,-0.102396,0.005653,0.033438,0.076318,0.047537,-0.019370,0.003880,-0.038357,-0.069244,0.013206,0.052731,-0.044422,-0.045984,0.064287,0.063458,0.012366,0.046554,-0.014541,-0.046981,0.040710,0.007809,0.019138,-0.031280,0.005744,-0.032424,0.013631,0.032215,-0.045975,0.002801,0.115970,-0.013436,-0.035482,-0.006199,0.078901,-0.064859,0.005653,-0.051042,0.008569,0.044996,0.010914,0.070450,-0.046443,0.003210,-0.026466,0.028877,-0.051071,-0.020633,0.051578,-0.120661,-0.010065,-0.023436,0.001714,-0.032687,-0.016210,0.005997,-0.082633,0.097420,-0.031321,0.029058,0.060846,0.062699,-0.024812,0.038409,-0.007182,0.021995,0.030892,-0.007325,-0.077771,-0.006569,-0.070532,-0.021422,0.049408,-0.109623,0.005212,-0.004861,0.012130,0.043313,0.009163,0.050616,-0.040313,-0.002631,-0.001109,0.001306,-0.022754,-0.021270,-0.056147,0.051881,0.031744,-0.020617,0.016948,0.025522,0.016708,-0.035161,0.053157,-0.002037,-0.003167,0.111554,-0.002936,-0.028547,-0.095569,0.004574,0.050479,-0.032712,-0.010738,0.060238,-0.038399,0.042237,0.021586,-0.083791,-0.020363,-0.017915,-0.001482,-0.038230,0.015712,-0.006684,0.031344,-0.068242,0.020323,0.002729,0.025776,-0.061503,0.010611,0.017804,0.041669,0.012392,-0.060341,-0.024900,-0.063002,-0.001920,-0.032915,-0.000960,-0.021514,-0.014564,0.061115,-0.076246,-0.062856,-0.071194,-0.021202,-0.016131,-0.059900,-0.034610,-0.040206,-0.042895,-0.002483,0.044605,0.001372,-0.101529,-0.001828,-0.103048,-0.031297,-0.016878,-0.023834,0.050420,0.024020,-0.011137,-0.140238,-0.051979,0.085020,0.038933,0.127042,0.041524,-0.030117,0.056891,-0.053334,-0.030602,0.011756,0.007324,-0.030329,-0.062977,-0.042806,-0.007362,0.021153,-0.025529,-0.021425,0.036511,0.010076,-0.065501,0.007580,0.092202,-0.019660,-0.006779,-0.014505,-0.011312,-0.048175,0.008486,0.047491,0.037514,-0.027510,-0.039198,-0.100382,-0.045332,0.016991,-0.006936,-0.017366,-0.007444,0.014395,-0.003089,-0.020629,0.027420,0.024758,0.070364,-0.011739,-0.032171,-0.019401,0.007725,-0.013883,-0.045235,0.054859,0.061361,-0.064525,0.064236,0.056047,-0.064166,-0.031746,-0.001632,-0.031432,-0.063762,-0.031150,-0.018962,-0.014152,0.030340,0.027059,0.049580,-0.025282,-0.031288,0.013674,0.060906,0.045000,0.019587,-0.023220,-0.081773,-0.027007,0.018261,-0.000590,-0.040861,-0.105557,0.015284,0.028116,-0.032138,-0.002735,0.066251,0.046955,0.054924,0.023915,0.109000,-0.056548,0.015768,-0.075634,-0.020457,-0.028878,-0.046798,-0.057080,0.057820,0.037019,0.038066,-0.009608,-0.039675,0.005541,0.028341,-0.005972,0.053169,0.018158,0.067248,0.012660,0.055927,0.031064,0.021389,-0.080137,-0.026971,-0.028203,-0.037743,-0.015084,0.049724,-0.077273,0.035753,-0.000662,0.001476,-0.046561,-0.060630,0.031582,0.057681,0.037149,0.012713,-0.017181,-0.043256,0.003465,0.022548,0.052186,-0.040553,0.064455,0.021539,0.018883,-0.069429,-0.049200,0.070659,0.077909,-0.020314,0.082661,-0.024631,0.018384,0.056514,-0.051840,0.033918,-0.048232,-0.007297,-0.031624,-0.117258,-0.053612,-0.009953,-0.031192,0.043974,-0.008840,-0.015087,0.042430,-0.065707,0.056052,-0.028191,0.049596,-0.002935,-0.000412,0.019444,0.055688,0.109548,0.038258,0.014887,-0.033741,0.042629,-0.022666,-0.032125,-0.009331,0.059250,0.009829,-0.028745,-0.025815,-0.010050,0.011845,0.103870,0.020677,0.052920,-0.001595,-0.023385,-0.020915,-0.023902,0.039025,-0.056825,-0.063770,-0.001545,-0.023381,-0.013910,0.016631,0.021308,0.067967,-0.011235,0.056421,-0.001273,-0.027336,0.009527,0.042496,0.022707,0.083721,-0.012626,-0.085037,-0.001673,-0.028829,-0.013406,0.024951,0.048866,-0.011498,-0.059011,-0.011989,-0.016756,0.029857,0.103094,0.007111,-0.041760,0.002769,0.029121,-0.013594,0.004342', 4); INSERT INTO vts_face_fp32_512d_q(vector, p_key) VALUES ('0.018990,-0.026564,-0.074380,-0.080027,-0.003530,0.020116,-0.026819,-0.055056,-0.050954,-0.016818,-0.055611,-0.018200,-0.050677,-0.049803,-0.047470,0.088019,-0.090301,0.005176,0.089186,0.005646,-0.033093,-0.019510,-0.000758,-0.022662,-0.072344,-0.022143,-0.065633,0.007557,-0.051194,0.081988,0.003223,-0.025066,0.042486,-0.040949,0.018456,0.074975,-0.039089,-0.055742,-0.001078,0.054048,0.039184,0.046202,-0.071246,-0.037686,0.010271,-0.114977,-0.009068,0.002448,-0.053331,-0.012330,-0.015430,-0.014888,0.041111,-0.013474,0.034354,0.003789,0.083562,0.041563,0.008410,0.037660,0.028192,-0.005239,0.051109,-0.000177,0.052671,0.017819,-0.036006,0.034817,-0.022381,0.031019,0.061063,-0.018029,0.031324,0.060098,0.126787,0.023183,-0.016489,-0.007297,0.070049,0.025467,0.029072,0.001847,0.001005,0.117192,-0.035301,-0.037476,0.038708,-0.007165,0.016045,0.017104,0.079098,0.023868,0.001864,0.009841,-0.019286,-0.030859,-0.003673,0.029864,-0.002053,0.086085,0.019369,-0.011575,-0.043770,0.058725,0.073420,0.081043,0.028588,0.010871,-0.035738,-0.039326,0.037432,-0.037647,0.001318,0.043523,-0.018898,-0.042326,0.010487,-0.047589,-0.056921,-0.011206,-0.018926,0.027976,-0.040548,0.031734,0.012047,-0.011499,-0.021265,-0.030023,0.039084,0.000235,0.002119,-0.035474,-0.059109,-0.001139,0.000803,-0.026916,-0.007739,-0.063737,-0.052308,-0.074166,0.013420,0.004411,-0.017026,-0.084907,-0.000459,0.018069,0.015364,-0.046284,-0.051097,-0.065892,-0.016638,-0.035136,0.021947,-0.089489,0.033304,0.026275,0.072900,0.086350,-0.094363,0.022757,-0.000078,0.014630,-0.015252,0.048451,-0.022585,-0.057376,0.032287,-0.044275,-0.012600,-0.003670,-0.011928,-0.094233,-0.057325,0.015122,0.066657,0.081942,0.036027,0.090712,0.076276,-0.017960,-0.010482,0.087801,0.136267,-0.074674,0.029554,0.003440,-0.043471,-0.006148,-0.038998,0.028725,0.066128,-0.029892,-0.005003,-0.063408,-0.006527,-0.067585,-0.012122,-0.023724,0.007523,0.028675,-0.010489,0.019769,0.024188,-0.086028,-0.009872,0.006107,0.025676,0.044236,-0.038995,-0.009083,0.003050,-0.079702,-0.015497,0.006418,-0.051633,0.015834,0.065541,0.006776,0.053002,0.014452,-0.004406,0.006974,0.014991,-0.005093,0.037989,-0.083318,-0.099467,0.019911,-0.001837,-0.078542,0.013706,0.077943,0.077858,-0.037037,0.000138,-0.010079,-0.128671,0.002789,0.035846,-0.002067,-0.082037,0.002213,-0.011649,-0.026202,0.081602,-0.030421,-0.021853,-0.014350,-0.030303,-0.003272,-0.026875,0.005095,-0.021909,0.029722,-0.021974,0.028804,-0.032812,0.047766,0.009548,0.055889,0.020871,0.013290,0.009591,-0.056730,0.107562,0.004044,-0.046458,0.019570,-0.005909,0.036564,-0.079987,-0.004859,-0.006975,0.050858,0.002987,0.004677,-0.046685,-0.044758,-0.024142,-0.020945,0.007080,-0.015139,0.005727,-0.040768,0.132578,0.000116,-0.014818,-0.054616,-0.036315,0.061882,-0.037466,-0.024772,0.010992,-0.033946,0.068233,0.033256,0.001423,-0.017947,-0.074121,0.038813,0.017305,0.013695,-0.024176,-0.039063,0.030579,-0.066201,0.058209,0.022739,0.074405,0.044019,-0.038122,-0.106768,0.010272,0.014302,-0.021927,0.025372,0.002067,-0.064063,-0.061733,0.036851,0.065449,-0.007891,0.013536,-0.013212,0.026221,0.049972,-0.009896,-0.024969,0.003525,0.002189,-0.039483,0.041425,0.074186,-0.010678,-0.051394,-0.006110,0.001774,-0.042279,0.037422,0.088283,0.034655,-0.001786,0.059899,0.000806,0.009341,0.068523,0.034918,0.058531,0.000901,0.003348,0.026887,-0.055659,0.040627,-0.112764,0.010084,0.080034,0.015784,-0.003562,0.009442,0.009441,0.041112,-0.014453,-0.039941,0.079657,-0.055720,-0.018789,0.077986,-0.022412,-0.018566,0.002274,0.034367,0.000179,0.024719,-0.008818,0.001224,-0.027264,0.031056,-0.007380,0.001956,-0.061412,0.071740,0.039339,0.004653,-0.034407,0.056294,0.022648,-0.032928,-0.086359,0.014597,0.075572,-0.031202,-0.053848,-0.009450,-0.047667,-0.043598,-0.025867,-0.088403,-0.011794,0.063497,-0.009792,0.032514,-0.000666,0.019377,-0.040243,0.010717,-0.060903,-0.025458,-0.032373,-0.008307,0.041381,-0.013571,0.011215,0.076445,-0.020289,-0.060025,-0.037909,0.062530,-0.095224,0.017458,0.072853,-0.061164,-0.035332,0.012541,-0.021209,0.011143,-0.025961,0.029610,0.043860,0.013443,-0.040672,-0.025607,-0.004672,-0.030812,0.011047,0.016260,0.048821,-0.033020,-0.003214,0.013867,0.075351,-0.060843,-0.005076,0.002915,0.003891,0.065470,-0.006947,0.007156,-0.035394,0.032894,-0.056455,-0.009901,0.028474,0.034317,-0.047070,-0.004093,-0.011997,0.086919,0.044756,0.031250,0.050920,0.016834,0.062481,0.009912,-0.086627,-0.010909,0.043168,-0.003410,0.033574,0.020280,-0.033200,-0.070535,0.002198,0.006363,-0.038977,0.019581,0.049575,0.004098,-0.029766,-0.003892,-0.023865,0.034137,-0.018515,-0.119172,-0.050676,0.031222,0.085486,-0.042790,0.013223,-0.013531,-0.068723,0.022705,0.088682,-0.043891,-0.011074,0.025330,0.064888,-0.058756,0.024609,-0.023462,0.044005,-0.043933,0.033105,-0.019530,0.047792,0.037710,-0.082358,-0.027842,0.049849,0.002086,0.034141,0.025395,0.035188', 2); ================================================ FILE: benchmark/tests/service_test.py ================================================ #! /usr/bin/env python # -*- coding: utf8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Service test script # from common.proxima_se_service import * def test_proxima_se_service(service: ProximaSEService): if service.init(): logging.info(f'Initialize {service.service_name()} succeed') else: logging.error(f'Failed initialize {service.service_name()}') return if service.start(): logging.info(f'Start {service.service_name()} success') else: service.cleanup() logging.error(f'Start {service.service_name()} failed') return logging.info(f'Status: {service.status().name}') time.sleep(10) if service.stop(): logging.info(f'Stop {service.service_name()} success') else: logging.error(f'Stop {service.service_name()} failed') logging.info(f'Status: {service.status().name}') if service.cleanup(): logging.info(f'Cleanup {service.service_name()} succeed') def test_mysql_repo(): test_proxima_se_service( ProximaSEMysqlRepo("../../cmake-build-debug/bin/mysql_repository", "conf/mysql_repo.conf", "bench")) def test_proxima_se(): test_proxima_se_service( ProximaSE("../../cmake-build-debug/bin/proxima_se", "conf/proxima_se.conf", "bench")) if __name__ == '__main__': logging.basicConfig(level=logging.INFO) test_mysql_repo() test_proxima_se() exit(0) ================================================ FILE: cmake/README.md ================================================ **bazel.cmake** 是一个 bazel 风格的 CMake 模块框架,用于 C/C++/CUDA 等代码的编译和构建,支持 Ninja, GNU Make, Unix Make, Visual Studio 等构建平台。 ## 如何使用 #### 1. 脚本引入 bazel.cmake ```cmake # CMakeLists.txt include() ``` #### 2. 编写构建代码 ```cmake # CMakeLists.txt find_package(Threads REQUIRED) cc_library( NAME hello STATIC SHARED STRICT SRCS *.cc LIBS ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} INCS . ) ``` #### 3. 生成平台构建脚本 ```bash $ cmake -G Ninja .. $ ninja all ``` ## 相关接口 ### 1. C/C++ 构建接口 #### 1.1. 新增 C/C++ 构建子目录 ```cmake cc_directory( [binary_dir]) ``` #### 1.2. 新增多个 C/C++ 构建子目录 ```cmake cc_directories( [source_dir2 ...]) ``` #### 1.3. 构建 C/C++ 静态或动态库(支持同时生成静态和动态库) ```cmake cc_library( NAME [STATIC] [SHARED] [STRICT] [ALWAYS_LINK] [EXCLUDE] [PACKED] SRCS [file2 ...] [INCS dir1 ...] [PUBINCS public_dir1 ...] [DEFS DEF1=1 ...] [LIBS lib1 ...] [CFLAGS flag1 ...] [CXXFLAGS flag1 ...] [LDFLAGS flag1 ...] [DEPS target1 ...] [PACKED_EXCLUDES pattern1 ...] [VERSION ] ) ``` #### 1.4. 构建 C/C++ 可执行程序 ```cmake cc_binary( NAME [STRICT] [PACKED] SRCS [file2 ...] [INCS dir1 ...] [DEFS DEF1=1 ...] [LIBS lib1 ...] [CFLAGS flag1 ...] [CXXFLAGS flag1 ...] [LDFLAGS flag1 ...] [DEPS target1 ...] [VERSION ] ) ``` #### 1.5. 构建 C/C++ 可执行测试程序 ```cmake cc_test( NAME [STRICT] SRCS [file2 ...] [INCS dir1 ...] [DEFS DEF1=1 ...] [LIBS lib1 ...] [CFLAGS flag1 ...] [CXXFLAGS flag1 ...] [LDFLAGS flag1 ...] [DEPS target1 ...] [ARGS args1 ...] ) ``` #### 1.6. 添加测试用例到测试集合,通过目标 unittest. 可运行 ```cmake cc_test_suite( [test_name ...]) ``` #### 1.7. 导入外部已构建的 C/C++ 静态或动态库 ```cmake cc_import( NAME [STATIC | SHARED] [PACKED] PATH [INCS dir1 ...] [PUBINCS public_dir1 ...] [DEPS target1 ...] [IMPLIB ] [PACKED_EXCLUDES pattern1 ...] ) ``` #### 1.8. 导入外部 C/C++ 接口库(仅依赖头文件,不链接) ```cmake cc_interface( NAME [PACKED] [INCS dir1 ...] [PUBINCS public_dir1 ...] [DEPS target1 ...] [PACKED_EXCLUDES pattern1 ...] ) ``` #### 1.9. 构建 C/C++ GoogleTest 单元测试程序 ```cmake cc_gtest( NAME [STRICT] SRCS [file2 ...] [INCS dir1 ...] [DEFS DEF1=1 ...] [LIBS lib1 ...] [CFLAGS flag1 ...] [CXXFLAGS flag1 ...] [LDFLAGS flag1 ...] [DEPS target1 ...] [ARGS args1 ...] [VERSION ] ) ``` #### 1.10. 构建 C/C++ GoogleMock 单元测试程序 ```cmake cc_gmock( NAME [STRICT] SRCS [file2 ...] [INCS dir1 ...] [DEFS DEF1=1 ...] [LIBS lib1 ...] [CFLAGS flag1 ...] [CXXFLAGS flag1 ...] [LDFLAGS flag1 ...] [DEPS target1 ...] [ARGS args1 ...] [VERSION ] ) ``` #### 1.11. 构建 C++ protobuf 静态或动态库(支持同时生成静态和动态库) ```cmake cc_proto_library( NAME [STATIC] [SHARED] [STRICT] [EXCLUDE] [PACKED] SRCS [file2.proto ...] [PROTOROOT path] [CXXFLAGS flag1 ...] [LDFLAGS flag1 ...] [DEPS target1 ...] [VERSION ] [PROTOBUF_VERSION ] ) ``` ### 2. CUDA 构建接口 #### 2.1. 新增 CUDA 构建子目录 ```cmake cuda_directory( [binary_dir]) ``` #### 2.2. 新增多个 CUDA 构建子目录 ```cmake cuda_directories( [source_dir2 ...]) ``` #### 2.3. 构建 CUDA 静态或动态库(支持同时生成静态和动态库) ```cmake cuda_library( NAME [STATIC] [SHARED] [STRICT] [ALWAYS_LINK] [EXCLUDE] [PACKED] SRCS [file2 ...] [INCS dir1 ...] [PUBINCS public_dir1 ...] [DEFS DEF1=1 ...] [LIBS lib1 ...] [CFLAGS flag1 ...] [CXXFLAGS flag1 ...] [CUDAFLAGS flag1 ...] [LDFLAGS flag1 ...] [DEPS target1 ...] [PACKED_EXCLUDES pattern1 ...] [VERSION ] ) ``` #### 2.4. 构建 CUDA 可执行程序 ```cmake cuda_binary( NAME [STRICT] [PACKED] SRCS [file2 ...] [INCS dir1 ...] [DEFS DEF1=1 ...] [LIBS lib1 ...] [CFLAGS flag1 ...] [CXXFLAGS flag1 ...] [CUDAFLAGS flag1 ...] [LDFLAGS flag1 ...] [DEPS target1 ...] [VERSION ] ) ``` #### 2.5. 构建 CUDA 可执行测试程序 ```cmake cuda_test( NAME [STRICT] SRCS [file2 ...] [INCS dir1 ...] [DEFS DEF1=1 ...] [LIBS lib1 ...] [CFLAGS flag1 ...] [CXXFLAGS flag1 ...] [CUDAFLAGS flag1 ...] [LDFLAGS flag1 ...] [DEPS target1 ...] [ARGS args1 ...] ) ``` #### 2.6. 添加测试用例到测试集合,通过目标 unittest. 可运行 ```cmake cuda_test_suite( [test_name ...]) ``` #### 2.7. 导入外部已构建的 C/C++/CUDA 静态或动态库 ```cmake cuda_import( NAME [STATIC | SHARED] [PACKED] PATH [INCS dir1 ...] [PUBINCS public_dir1 ...] [DEPS target1 ...] [IMPLIB ] [PACKED_EXCLUDES pattern1 ...] ) ``` #### 2.8. 导入外部 C/C++/CUDA 接口库(仅依赖头文件,不链接) ```cmake cuda_interface( NAME [PACKED] [INCS dir1 ...] [PUBINCS public_dir1 ...] [DEPS target1 ...] [PACKED_EXCLUDES pattern1 ...] ) ``` #### 2.9. 构建 C/C++/CUDA GoogleTest 单元测试程序 ```cmake cuda_gtest( NAME [STRICT] SRCS [file2 ...] [INCS dir1 ...] [DEFS DEF1=1 ...] [LIBS lib1 ...] [CFLAGS flag1 ...] [CXXFLAGS flag1 ...] [CUDAFLAGS flag1 ...] [LDFLAGS flag1 ...] [DEPS target1 ...] [ARGS args1 ...] ) ``` #### 2.10. 构建 C/C++/CUDA GoogleMock 单元测试程序 ```cmake cuda_gmock( NAME [STRICT] SRCS [file2 ...] [INCS dir1 ...] [DEFS DEF1=1 ...] [LIBS lib1 ...] [CFLAGS flag1 ...] [CXXFLAGS flag1 ...] [CUDAFLAGS flag1 ...] [LDFLAGS flag1 ...] [DEPS target1 ...] [ARGS args1 ...] ) ``` ### 3. 工具接口 #### 3.1. 下载 GIT 库,并添加到项目 ```cmake git_repository( NAME URL [TAG ] [PATH ] ) ``` #### 3.2. 下载 HG 库,并添加到项目 ```cmake hg_repository( NAME URL [TAG ] [PATH ] ) ``` #### 3.3. 下载 SVN 库,并添加到项目 ```cmake svn_repository( NAME URL [REV ] [PATH ] ) ``` #### 3.4. 下载压缩包,并添加到项目 ```cmake http_archive( NAME URL [SHA256 | SHA1 | MD5 ] [PATH ] ) ``` #### 3.5. 获取库的 GIT 版本信息 ```cmake git_version( ) ``` #### 3.6. 获取库的 HG 版本信息 ```cmake hg_version( ) ``` #### 3.7. 获取库的 SVN 版本信息 ```cmake svn_version( ) ``` ================================================ FILE: cmake/bazel.cmake ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## Use of this source code is governed by a BSD-style ## license that can be found in the LICENSE file. ## ## \file bazel.cmake ## \author Yunfeng.Xiao ## \date Apr 7, 2021 ## \version 1.2.13 ## \brief Detail cmake bazel framework build script ## ## ## The following functions used by user's CMakeLists.txt: ## ## 1. Functions for C/C++ ## ## 1.1. Add a subdirectory to the build ## cc_directory( [binary_dir]) ## ## 1.2. Add subdirectories to the build ## cc_directories( [source_dir2 ...]) ## ## 1.3. Build a C/C++ static or shared library ## cc_library( ## NAME ## [STATIC] [SHARED] [STRICT] [ALWAYS_LINK] [EXCLUDE] [PACKED] ## SRCS [file2 ...] ## [INCS dir1 ...] ## [PUBINCS public_dir1 ...] ## [DEFS DEF1=1 ...] ## [LIBS lib1 ...] ## [CFLAGS flag1 ...] ## [CXXFLAGS flag1 ...] ## [LDFLAGS flag1 ...] ## [DEPS target1 ...] ## [PACKED_EXCLUDES pattern1 ...] ## [VERSION ] ## ) ## ## 1.4. Build a C/C++ executable program ## cc_binary( ## NAME ## [STRICT] [PACKED] ## SRCS [file2 ...] ## [INCS dir1 ...] ## [DEFS DEF1=1 ...] ## [LIBS lib1 ...] ## [CFLAGS flag1 ...] ## [CXXFLAGS flag1 ...] ## [LDFLAGS flag1 ...] ## [DEPS target1 ...] ## [VERSION ] ## ) ## ## 1.5. Build a C/C++ executable test program ## cc_test( ## NAME ## [STRICT] ## SRCS [file2 ...] ## [INCS dir1 ...] ## [DEFS DEF1=1 ...] ## [LIBS lib1 ...] ## [CFLAGS flag1 ...] ## [CXXFLAGS flag1 ...] ## [LDFLAGS flag1 ...] ## [DEPS target1 ...] ## [ARGS args1 ...] ## [VERSION ] ## ) ## ## 1.6. Add existing test cases to a test suite ## cc_test_suite( [test_name ...]) ## ## 1.7. Import a C/C++ static or shared library ## cc_import( ## NAME ## [STATIC | SHARED] [PACKED] ## PATH ## [INCS dir1 ...] ## [PUBINCS public_dir1 ...] ## [DEPS target1 ...] ## [IMPLIB ] ## [PACKED_EXCLUDES pattern1 ...] ## ) ## ## 1.8. Import a C/C++ interface library ## cc_interface( ## NAME ## [PACKED] ## [INCS dir1 ...] ## [PUBINCS public_dir1 ...] ## [DEPS target1 ...] ## [PACKED_EXCLUDES pattern1 ...] ## ) ## ## 1.9. Build a C/C++ executable google test program ## cc_gtest( ## NAME ## [STRICT] ## SRCS [file2 ...] ## [INCS dir1 ...] ## [DEFS DEF1=1 ...] ## [LIBS lib1 ...] ## [CFLAGS flag1 ...] ## [CXXFLAGS flag1 ...] ## [LDFLAGS flag1 ...] ## [DEPS target1 ...] ## [ARGS args1 ...] ## [VERSION ] ## ) ## ## 1.10. Build a C/C++ executable google mock program ## cc_gmock( ## NAME ## [STRICT] ## SRCS [file2 ...] ## [INCS dir1 ...] ## [DEFS DEF1=1 ...] ## [LIBS lib1 ...] ## [CFLAGS flag1 ...] ## [CXXFLAGS flag1 ...] ## [LDFLAGS flag1 ...] ## [DEPS target1 ...] ## [ARGS args1 ...] ## [VERSION ] ## ) ## ## 1.11. Build a C++ protobuf static or shared library ## cc_proto_library( ## NAME ## [STATIC] [SHARED] [STRICT] [EXCLUDE] [PACKED] ## SRCS [file2.proto ...] ## [PROTOROOT path] ## [CXXFLAGS flag1 ...] ## [LDFLAGS flag1 ...] ## [DEPS target1 ...] ## [VERSION ] ## [PROTOBUF_VERSION ] ## ) ## ## 2. Functions for CUDA ## ## 2.1. Add a subdirectory to the build ## cuda_directory( [binary_dir]) ## ## 2.2. Add subdirectories to the build ## cuda_directories( [source_dir2 ...]) ## ## 2.3. Build a CUDA static or shared library ## cuda_library( ## NAME ## [STATIC] [SHARED] [STRICT] [ALWAYS_LINK] [EXCLUDE] [PACKED] ## SRCS [file2 ...] ## [INCS dir1 ...] ## [PUBINCS public_dir1 ...] ## [DEFS DEF1=1 ...] ## [LIBS lib1 ...] ## [CFLAGS flag1 ...] ## [CXXFLAGS flag1 ...] ## [CUDAFLAGS flag1 ...] ## [LDFLAGS flag1 ...] ## [DEPS target1 ...] ## [PACKED_EXCLUDES pattern1 ...] ## [VERSION ] ## ) ## ## 2.4. Build a CUDA executable program ## cuda_binary( ## NAME ## [STRICT] [PACKED] ## SRCS [file2 ...] ## [INCS dir1 ...] ## [DEFS DEF1=1 ...] ## [LIBS lib1 ...] ## [CFLAGS flag1 ...] ## [CXXFLAGS flag1 ...] ## [CUDAFLAGS flag1 ...] ## [LDFLAGS flag1 ...] ## [DEPS target1 ...] ## [VERSION ] ## ) ## ## 2.5. Build a CUDA executable test program ## cuda_test( ## NAME ## [STRICT] ## SRCS [file2 ...] ## [INCS dir1 ...] ## [DEFS DEF1=1 ...] ## [LIBS lib1 ...] ## [CFLAGS flag1 ...] ## [CXXFLAGS flag1 ...] ## [CUDAFLAGS flag1 ...] ## [LDFLAGS flag1 ...] ## [DEPS target1 ...] ## [ARGS args1 ...] ## [VERSION ] ## ) ## ## 2.6. Add existing test cases to a test suite ## cuda_test_suite( [test_name ...]) ## ## 2.7. Import a C/C++/CUDA static or shared library ## cuda_import( ## NAME ## [STATIC | SHARED] [PACKED] ## PATH ## [INCS dir1 ...] ## [PUBINCS public_dir1 ...] ## [DEPS target1 ...] ## [IMPLIB ] ## [PACKED_EXCLUDES pattern1 ...] ## ) ## ## 2.8. Import a C/C++/CUDA interface library ## cuda_interface( ## NAME ## [PACKED] ## [INCS dir1 ...] ## [PUBINCS public_dir1 ...] ## [DEPS target1 ...] ## [PACKED_EXCLUDES pattern1 ...] ## ) ## ## 2.9. Build a CUDA executable google test program ## cuda_gtest( ## NAME ## [STRICT] ## SRCS [file2 ...] ## [INCS dir1 ...] ## [DEFS DEF1=1 ...] ## [LIBS lib1 ...] ## [CFLAGS flag1 ...] ## [CXXFLAGS flag1 ...] ## [CUDAFLAGS flag1 ...] ## [LDFLAGS flag1 ...] ## [DEPS target1 ...] ## [ARGS args1 ...] ## [VERSION ] ## ) ## ## 2.10. Build a CUDA executable google mock program ## cuda_gmock( ## NAME ## [STRICT] ## SRCS [file2 ...] ## [INCS dir1 ...] ## [DEFS DEF1=1 ...] ## [LIBS lib1 ...] ## [CFLAGS flag1 ...] ## [CXXFLAGS flag1 ...] ## [CUDAFLAGS flag1 ...] ## [LDFLAGS flag1 ...] ## [DEPS target1 ...] ## [ARGS args1 ...] ## [VERSION ] ## ) ## ## 3. Utility functions ## ## 3.1. Download a git repository ## git_repository( ## NAME ## URL ## [TAG ] ## [PATH ] ## ) ## ## 3.2. Download a hg repository ## hg_repository( ## NAME ## URL ## [TAG ] ## [PATH ] ## ) ## ## 3.3. Download a svn repository ## svn_repository( ## NAME ## URL ## [REV ] ## [PATH ] ## ) ## ## 3.4. Download a http archive ## http_archive( ## NAME ## URL ## [SHA256 | SHA1 | MD5 ] ## [PATH ] ## ) ## ## 3.5. Retrieve a version string from GIT ## git_version( ## ## ## ) ## ## 3.6. Retrieve a version string from HG ## hg_version( ## ## ## ) ## ## 3.7. Retrieve a version string from SVN ## svn_version( ## ## ## ) ## cmake_minimum_required(VERSION 3.1 FATAL_ERROR) include(CMakeParseArguments) # Using AppleClang instead of Clang (Compiler id) if(POLICY CMP0025) cmake_policy(SET CMP0025 NEW) endif() # Enable unit testing enable_testing() # Add unittest target if(NOT TARGET unittest) add_custom_target( unittest COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure --build-config $ ) endif() # Directories of target output if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) endif() if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) endif() if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) endif() # RPATH settings set(CMAKE_MACOSX_RPATH ON) if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_SKIP_BUILD_RPATH ON) set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) if(${CMAKE_SIZEOF_VOID_P} EQUAL "8") set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN") else() set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN") endif() else() set(CMAKE_INSTALL_RPATH "@loader_path/../lib:@loader_path") endif() # Define standard installation directories if(NOT CMAKE_INSTALL_LIBDIR) set(CMAKE_INSTALL_LIBDIR lib) endif() if(NOT CMAKE_INSTALL_BINDIR) set(CMAKE_INSTALL_BINDIR bin) endif() if(NOT CMAKE_INSTALL_INCDIR) set(CMAKE_INSTALL_INCDIR include) endif() if(NOT CMAKE_INSTALL_ETCDIR) set(CMAKE_INSTALL_ETCDIR etc) endif() # Generates a compile_commands.json set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) if(NOT MSVC) # Use color in diagnostics set( _COMPILER_FLAGS "$<$:-fcolor-diagnostics>" "$<$:-fcolor-diagnostics>" "$<$:-fdiagnostics-color=always>" ) add_compile_options( "$<$:${_COMPILER_FLAGS}>" "$<$:${_COMPILER_FLAGS}>" ) unset(_COMPILER_FLAGS) else() # Replace the default compiling flags set( _COMPILER_FLAGS CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_MINSIZEREL ) foreach(COMPILER_FLAG ${_COMPILER_FLAGS}) string(REPLACE "/MT" "/MD" ${COMPILER_FLAG} "${${COMPILER_FLAG}}") string(REGEX REPLACE "/W[0-9]" "" ${COMPILER_FLAG} "${${COMPILER_FLAG}}") endforeach() unset(_COMPILER_FLAGS) add_definitions(-D_CRT_SECURE_NO_WARNINGS) # Build shared library as default set(BUILD_SHARED_LIBS ON) endif() set(CMAKE_C_FLAGS_ASAN ${CMAKE_C_FLAGS_DEBUG}) set(CMAKE_CXX_FLAGS_ASAN ${CMAKE_CXX_FLAGS_DEBUG}) set(CMAKE_EXE_LINKER_FLAGS_ASAN ${CMAKE_EXE_LINKER_FLAGS_DEBUG}) set(CMAKE_SHARED_LINKER_FLAGS_ASAN ${CMAKE_SHARED_LINKER_FLAGS_DEBUG}) set(CMAKE_STATIC_LINKER_FLAGS_ASAN ${CMAKE_STATIC_LINKER_FLAGS_DEBUG}) set(CMAKE_MODULE_LINKER_FLAGS_ASAN ${CMAKE_MODULE_LINKER_FLAGS_DEBUG}) set(CMAKE_C_FLAGS_COVERAGE ${CMAKE_C_FLAGS_DEBUG}) set(CMAKE_CXX_FLAGS_COVERAGE ${CMAKE_CXX_FLAGS_DEBUG}) set(CMAKE_EXE_LINKER_FLAGS_COVERAGE ${CMAKE_EXE_LINKER_FLAGS_DEBUG}) set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE ${CMAKE_SHARED_LINKER_FLAGS_DEBUG}) set(CMAKE_STATIC_LINKER_FLAGS_COVERAGE ${CMAKE_STATIC_LINKER_FLAGS_DEBUG}) set(CMAKE_MODULE_LINKER_FLAGS_COVERAGE ${CMAKE_MODULE_LINKER_FLAGS_DEBUG}) # C/C++ ASAN compile flags set( BAZEL_CC_ASAN_COMPILE_FLAGS "$<$:$<$:-fsanitize=address>>" "$<$:$<$:-fsanitize=address>>" "$<$:$<$:-fsanitize=address>>" "$<$:$<$:/fsanitize=address>>" ) # C/C++ COVERAGE compile flags set( BAZEL_CC_COVERAGE_COMPILE_FLAGS "$<$:$<$:--coverage>>" "$<$:$<$:--coverage>>" "$<$:$<$:--coverage>>" ) # C/C++ strict compile flags set( BAZEL_CC_STRICT_COMPILE_FLAGS "$<$:-Wall;-Wextra;-Wshadow>" "$<$:-Wall;-Wextra;-Wshadow>" "$<$:-Wall;-Wextra;-Wshadow>" "$<$:/W4>" ${BAZEL_CC_ASAN_COMPILE_FLAGS} ${BAZEL_CC_COVERAGE_COMPILE_FLAGS} ) # C/C++ strict link flags set( BAZEL_CC_STRICT_LINK_FLAGS ${BAZEL_CC_ASAN_COMPILE_FLAGS} ${BAZEL_CC_COVERAGE_COMPILE_FLAGS} ) # C/C++ unstrict compile flags set( BAZEL_CC_UNSTRICT_COMPILE_FLAGS "$<$:-Wall>" "$<$:-Wall>" "$<$:-Wall>" "$<$:/W3>" ${BAZEL_CC_ASAN_COMPILE_FLAGS} ${BAZEL_CC_COVERAGE_COMPILE_FLAGS} ) # C/C++ unstrict link flags set( BAZEL_CC_UNSTRICT_LINK_FLAGS ${BAZEL_CC_ASAN_COMPILE_FLAGS} ${BAZEL_CC_COVERAGE_COMPILE_FLAGS} ) # CUDA strict compile flags set( BAZEL_CUDA_STRICT_COMPILE_FLAGS "$<$:$<$:-Wall;-Wextra;-Wshadow>>" "$<$:$<$:-Wall;-Wextra;-Wshadow>>" "$<$:$<$:-Wall;-Wextra;-Wshadow>>" "$<$:$<$:/W4>>" "$<$:$<$:-Wall;-Wextra;-Wshadow>>" "$<$:$<$:-Wall;-Wextra;-Wshadow>>" "$<$:$<$:-Wall;-Wextra;-Wshadow>>" "$<$:$<$:/W4>>" "$<$:$<$:-G>>" ) # CUDA strict link flags set(BAZEL_CUDA_STRICT_LINK_FLAGS "") # CUDA unstrict compile flags set( BAZEL_CUDA_UNSTRICT_COMPILE_FLAGS "$<$:$<$:-Wall>>" "$<$:$<$:-Wall>>" "$<$:$<$:-Wall>>" "$<$:$<$:/W3>>" "$<$:$<$:-Wall>>" "$<$:$<$:-Wall>>" "$<$:$<$:-Wall>>" "$<$:$<$:/W3>>" "$<$:$<$:-G>>" ) # CUDA unstrict link flags set(BAZEL_CUDA_UNSTRICT_LINK_FLAGS "") ## Find workspace directory function(_find_workspace_directory _RESULT) # Find Workspace.cmake folder set(_CURRENT_WORKSPACE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) get_filename_component( _PARENT_WORKSPACE_DIR ${_CURRENT_WORKSPACE_DIR} DIRECTORY ) while(NOT ("${_CURRENT_WORKSPACE_DIR}" STREQUAL "${_PARENT_WORKSPACE_DIR}")) if(EXISTS "${_CURRENT_WORKSPACE_DIR}/Workspace.cmake") set(${_RESULT} ${_CURRENT_WORKSPACE_DIR} PARENT_SCOPE) message(STATUS "Found workspace at ${${_RESULT}}") break() endif() # Find next parent folder set(_CURRENT_WORKSPACE_DIR ${_PARENT_WORKSPACE_DIR}) get_filename_component( _PARENT_WORKSPACE_DIR ${_CURRENT_WORKSPACE_DIR} DIRECTORY ) endwhile() endfunction() ## Retrieve absolute paths function(_absolute_paths _RESULT) foreach(FILEPATH ${ARGN}) if(NOT IS_ABSOLUTE ${FILEPATH}) get_filename_component(FILEPATH ${FILEPATH} ABSOLUTE) endif() list(APPEND FILEPATHS ${FILEPATH}) endforeach() set(${_RESULT} "${FILEPATHS}" PARENT_SCOPE) endfunction() ## Add both shared and static library macro(_add_library _NAME _OPTION) add_library(${_NAME}_objects OBJECT ${_OPTION} ${ARGN}) add_library( ${_NAME}_static STATIC ${_OPTION} $ ) add_library( ${_NAME} SHARED ${_OPTION} $ ) add_dependencies(${_NAME} ${_NAME}_static) if(NOT MSVC) set_property(TARGET ${_NAME}_static PROPERTY OUTPUT_NAME ${_NAME}) endif() endmacro() ## Link dependencies function(_targets_link_dependencies _NAME) foreach(LIB ${ARGN}) if(TARGET ${LIB}) list(APPEND LIBS_DEPS ${LIB}) list( APPEND LIBS_INCS "$" ) endif() endforeach() if(LIBS_DEPS) add_dependencies(${_NAME} ${LIBS_DEPS}) target_include_directories(${_NAME} PRIVATE "${LIBS_INCS}") endif() endfunction() ## Link libraries function(_target_link_libraries _NAME) foreach(LIB ${ARGN}) if(NOT TARGET ${LIB}) list(APPEND LINK_LIBS ${LIB}) continue() endif() get_target_property(ALWAYS_LINK ${LIB} ALWAYS_LINK) if(NOT ALWAYS_LINK) list(APPEND LINK_LIBS ${LIB}) continue() endif() if(NOT MSVC) if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") list(APPEND LINK_LIBS -Wl,--whole-archive ${LIB} -Wl,--no-whole-archive) else() list(APPEND LINK_LIBS -Wl,-force_load ${LIB}) endif() else() # Microsoft Visual C++ list(APPEND LINK_LIBS /WHOLEARCHIVE:$) get_target_property(OTHER_LINK_LIBS ${LIB} INTERFACE_LINK_LIBRARIES) if(OTHER_LINK_LIBS) list(APPEND LINK_LIBS ${OTHER_LINK_LIBS}) endif() list(APPEND LIBS_DEPS ${LIB}) list( APPEND LIBS_INCS "$" ) endif() endforeach() target_link_libraries(${_NAME} ${LINK_LIBS}) if(LIBS_DEPS) add_dependencies(${_NAME} ${LIBS_DEPS}) target_include_directories(${_NAME} PRIVATE "${LIBS_INCS}") endif() endfunction() ## Add a subdirectory to the build function(cc_directory) add_subdirectory(${ARGN}) endfunction() ## Add subdirectories to the build function(cc_directories) foreach(SRC_DIR ${ARGN}) add_subdirectory(${SRC_DIR}) endforeach() endfunction() ## Set the properties of target function(_cc_target_properties) cmake_parse_arguments( CC_ARGS "STRICT;ALWAYS_LINK" "NAME;VERSION;C_STANDARD;CXX_STANDARD" "INCS;PUBINCS;DEFS;LIBS;CFLAGS;CXXFLAGS;LDFLAGS;DEPS" ${ARGN} ) if(NOT CC_ARGS_NAME) message(FATAL_ERROR "No target name privated.") endif() get_target_property(TARGET_TYPE ${CC_ARGS_NAME} TYPE) if(("${TARGET_TYPE}" STREQUAL "SHARED_LIBRARY") OR ("${TARGET_TYPE}" STREQUAL "STATIC_LIBRARY") OR ("${TARGET_TYPE}" STREQUAL "EXECUTABLE")) set(TARGET_LINKABLE TRUE) endif() if(CC_ARGS_ALWAYS_LINK) if(("${TARGET_TYPE}" STREQUAL "STATIC_LIBRARY") OR ("${TARGET_TYPE}" STREQUAL "OBJECT_LIBRARY")) set_property(TARGET ${CC_ARGS_NAME} PROPERTY ALWAYS_LINK TRUE) endif() endif() # Set the warning level of compiling if(CC_ARGS_STRICT) target_compile_options( ${CC_ARGS_NAME} PRIVATE "${BAZEL_CC_STRICT_COMPILE_FLAGS}" ) if(TARGET_LINKABLE) target_link_libraries(${CC_ARGS_NAME} "${BAZEL_CC_STRICT_LINK_FLAGS}") endif() else() target_compile_options( ${CC_ARGS_NAME} PRIVATE "${BAZEL_CC_UNSTRICT_COMPILE_FLAGS}" ) if(TARGET_LINKABLE) target_link_libraries(${CC_ARGS_NAME} "${BAZEL_CC_UNSTRICT_LINK_FLAGS}") endif() endif() if(CC_ARGS_DEFS) target_compile_definitions(${CC_ARGS_NAME} PRIVATE "${CC_ARGS_DEFS}") endif() if(CC_ARGS_CFLAGS OR CC_ARGS_CXXFLAGS) target_compile_options( ${CC_ARGS_NAME} PRIVATE "$<$:${CC_ARGS_CFLAGS}>" "$<$:${CC_ARGS_CXXFLAGS}>" ) endif() if(CC_ARGS_LDFLAGS) string(REPLACE ";" " " CC_ARGS_LDFLAGS "${CC_ARGS_LDFLAGS}") set_property( TARGET ${CC_ARGS_NAME} PROPERTY LINK_FLAGS "${CC_ARGS_LDFLAGS}" ) endif() if(CC_ARGS_INCS) _absolute_paths(INC_DIRS ${CC_ARGS_INCS}) target_include_directories(${CC_ARGS_NAME} PRIVATE "${INC_DIRS}") endif() if(BAZEL_WORKSPACE_DIR) target_include_directories(${CC_ARGS_NAME} PRIVATE "${BAZEL_WORKSPACE_DIR}") endif() if(CC_ARGS_PUBINCS) _absolute_paths(INC_DIRS ${CC_ARGS_PUBINCS}) target_include_directories(${CC_ARGS_NAME} PUBLIC "${INC_DIRS}") endif() if(CC_ARGS_LIBS) if(NOT TARGET_LINKABLE) _targets_link_dependencies(${CC_ARGS_NAME} ${CC_ARGS_LIBS}) else() if ("${TARGET_TYPE}" STREQUAL "EXECUTABLE") _target_link_libraries(${CC_ARGS_NAME} "${CC_ARGS_LIBS}") else() target_link_libraries(${CC_ARGS_NAME} "${CC_ARGS_LIBS}") endif() endif() endif() if(CC_ARGS_DEPS) add_dependencies(${CC_ARGS_NAME} "${CC_ARGS_DEPS}") endif() if(CC_ARGS_VERSION) set_property( TARGET ${CC_ARGS_NAME} PROPERTY VERSION "${CC_ARGS_VERSION}" ) endif() if(NOT CC_C_STANDARD) set(CC_C_STANDARD 99) endif() if(NOT CC_CXX_STANDARD) set(CC_CXX_STANDARD 11) endif() set_target_properties( ${CC_ARGS_NAME} PROPERTIES DEFINE_SYMBOL "" C_STANDARD ${CC_C_STANDARD} CXX_STANDARD ${CC_CXX_STANDARD} C_STANDARD_REQUIRED ON C_EXTENSIONS ON CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS OFF WINDOWS_EXPORT_ALL_SYMBOLS ON ) endfunction() ## Build a C/C++ static or shared library function(cc_library) cmake_parse_arguments( CC_ARGS "STATIC;SHARED;EXCLUDE;PACKED" "NAME;VERSION" "SRCS;INCS;PUBINCS;DEFS;LIBS;CFLAGS;CXXFLAGS;LDFLAGS;DEPS;PACKED_EXCLUDES" ${ARGN} ) if(NOT CC_ARGS_NAME) message(FATAL_ERROR "No target name privated.") endif() file(GLOB CC_ARGS_SRCS ${CC_ARGS_SRCS}) if(NOT CC_ARGS_SRCS) message(FATAL_ERROR "No source files found of ${CC_ARGS_NAME}.") endif() if(CC_ARGS_VERSION) string(REPLACE "-" "_" MACRO_PREFIX "${CC_ARGS_NAME}") list(APPEND CC_ARGS_DEFS ${MACRO_PREFIX}_VERSION="${CC_ARGS_VERSION}") endif() if(CC_ARGS_EXCLUDE) set(EXCLUDE_OPTION EXCLUDE_FROM_ALL) endif() if(CC_ARGS_SHARED AND CC_ARGS_STATIC) _add_library(${CC_ARGS_NAME} "${EXCLUDE_OPTION}" "${CC_ARGS_SRCS}") elseif(CC_ARGS_SHARED) add_library(${CC_ARGS_NAME} SHARED ${EXCLUDE_OPTION} ${CC_ARGS_SRCS}) elseif(CC_ARGS_STATIC) add_library(${CC_ARGS_NAME} STATIC ${EXCLUDE_OPTION} ${CC_ARGS_SRCS}) else() add_library(${CC_ARGS_NAME} ${EXCLUDE_OPTION} ${CC_ARGS_SRCS}) endif() if(TARGET ${CC_ARGS_NAME}_objects) _cc_target_properties( NAME "${CC_ARGS_NAME}_objects" INCS "${CC_ARGS_INCS};${CC_ARGS_PUBINCS}" DEFS "${CC_ARGS_DEFS}" LIBS "${CC_ARGS_LIBS}" CFLAGS "${CC_ARGS_CFLAGS}" CXXFLAGS "${CC_ARGS_CXXFLAGS}" LDFLAGS "${CC_ARGS_LDFLAGS}" DEPS "${CC_ARGS_DEPS}" "${CC_ARGS_UNPARSED_ARGUMENTS}" ) endif() if(TARGET ${CC_ARGS_NAME}_static) _cc_target_properties( NAME "${CC_ARGS_NAME}_static" INCS "${CC_ARGS_INCS}" PUBINCS "${CC_ARGS_PUBINCS}" DEFS "${CC_ARGS_DEFS}" LIBS "${CC_ARGS_LIBS}" CFLAGS "${CC_ARGS_CFLAGS}" CXXFLAGS "${CC_ARGS_CXXFLAGS}" LDFLAGS "${CC_ARGS_LDFLAGS}" DEPS "${CC_ARGS_DEPS}" "${CC_ARGS_UNPARSED_ARGUMENTS}" ) if(CC_ARGS_PACKED) install( TARGETS ${CC_ARGS_NAME}_static ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) endif() endif() _cc_target_properties( NAME "${CC_ARGS_NAME}" INCS "${CC_ARGS_INCS}" PUBINCS "${CC_ARGS_PUBINCS}" DEFS "${CC_ARGS_DEFS}" LIBS "${CC_ARGS_LIBS}" CFLAGS "${CC_ARGS_CFLAGS}" CXXFLAGS "${CC_ARGS_CXXFLAGS}" LDFLAGS "${CC_ARGS_LDFLAGS}" DEPS "${CC_ARGS_DEPS}" VERSION "${CC_ARGS_VERSION}" "${CC_ARGS_UNPARSED_ARGUMENTS}" ) if(CC_ARGS_PACKED) install( TARGETS ${CC_ARGS_NAME} ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) if(CC_ARGS_PUBINCS) foreach(PACKED_EXCLUDE ${CC_ARGS_PACKED_EXCLUDES}) list(APPEND PATTERN_EXCLUDES "PATTERN;${PACKED_EXCLUDE};EXCLUDE") endforeach() install( DIRECTORY ${CC_ARGS_PUBINCS} DESTINATION ${CMAKE_INSTALL_INCDIR} FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp" PATTERN "*.hxx" ${PATTERN_EXCLUDES} ) endif() endif() endfunction() ## Build a C/C++ executable program function(cc_binary) cmake_parse_arguments( CC_ARGS "PACKED" "NAME;VERSION" "SRCS;INCS;DEFS;LIBS;CFLAGS;CXXFLAGS;LDFLAGS;DEPS" ${ARGN} ) if(NOT CC_ARGS_NAME) message(FATAL_ERROR "No target name privated.") endif() file(GLOB CC_ARGS_SRCS ${CC_ARGS_SRCS}) if(NOT CC_ARGS_SRCS) message(FATAL_ERROR "No source files found of ${CC_ARGS_NAME}.") endif() if(CC_ARGS_VERSION) string(REPLACE "-" "_" MACRO_PREFIX "${CC_ARGS_NAME}") list(APPEND CC_ARGS_DEFS ${MACRO_PREFIX}_VERSION="${CC_ARGS_VERSION}") endif() add_executable(${CC_ARGS_NAME} ${CC_ARGS_SRCS}) if(CC_ARGS_PACKED) install( TARGETS ${CC_ARGS_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ) endif() _cc_target_properties( NAME "${CC_ARGS_NAME}" INCS "${CC_ARGS_INCS}" DEFS "${CC_ARGS_DEFS}" LIBS "${CC_ARGS_LIBS}" CFLAGS "${CC_ARGS_CFLAGS}" CXXFLAGS "${CC_ARGS_CXXFLAGS}" LDFLAGS "${CC_ARGS_LDFLAGS}" DEPS "${CC_ARGS_DEPS}" VERSION "${CC_ARGS_VERSION}" "${CC_ARGS_UNPARSED_ARGUMENTS}" ) endfunction() ## Build a C/C++ executable test program function(cc_test) cmake_parse_arguments( CC_ARGS "" "NAME;VERSION" "SRCS;INCS;DEFS;LIBS;CFLAGS;CXXFLAGS;LDFLAGS;DEPS;ARGS" ${ARGN} ) if(NOT CC_ARGS_NAME) message(FATAL_ERROR "No target name privated.") endif() file(GLOB CC_ARGS_SRCS ${CC_ARGS_SRCS}) if(NOT CC_ARGS_SRCS) message(FATAL_ERROR "No source files found of ${CC_ARGS_NAME}.") endif() if(CC_ARGS_VERSION) string(REPLACE "-" "_" MACRO_PREFIX "${CC_ARGS_NAME}") list(APPEND CC_ARGS_DEFS ${MACRO_PREFIX}_VERSION="${CC_ARGS_VERSION}") endif() add_executable(${CC_ARGS_NAME} EXCLUDE_FROM_ALL ${CC_ARGS_SRCS}) _cc_target_properties( NAME "${CC_ARGS_NAME}" INCS "${CC_ARGS_INCS}" DEFS "${CC_ARGS_DEFS}" LIBS "${CC_ARGS_LIBS}" CFLAGS "${CC_ARGS_CFLAGS}" CXXFLAGS "${CC_ARGS_CXXFLAGS}" LDFLAGS "${CC_ARGS_LDFLAGS}" DEPS "${CC_ARGS_DEPS}" "${CC_ARGS_UNPARSED_ARGUMENTS}" ) add_dependencies(unittest ${CC_ARGS_NAME}) add_custom_target( unittest.${CC_ARGS_NAME} COMMAND $ "${CC_ARGS_ARGS}" WORKING_DIRECTORY ${PROJECT_BINARY_DIR} DEPENDS ${CC_ARGS_NAME} ) add_test( NAME ${CC_ARGS_NAME} COMMAND $ "${CC_ARGS_ARGS}" WORKING_DIRECTORY ${PROJECT_BINARY_DIR} ) endfunction() ## Add existing test cases to a test suite function(cc_test_suite _NAME) if(NOT TARGET unittest.${_NAME}) add_custom_target(unittest.${_NAME} COMMAND "") endif() foreach(TEST_TARGET ${ARGN}) list(APPEND TEST_TARGETS unittest.${TEST_TARGET}) endforeach() if(TEST_TARGETS) add_dependencies(unittest.${_NAME} ${TEST_TARGETS}) endif() endfunction() ## Import a C/C++ static or shared library function(cc_import) cmake_parse_arguments( CC_ARGS "STATIC;SHARED;PACKED" "NAME;PATH;IMPLIB" "INCS;PUBINCS;DEPS;PACKED_EXCLUDES" ${ARGN} ) if(NOT CC_ARGS_NAME) message(FATAL_ERROR "No target name privated.") endif() file(GLOB CC_ARGS_PATH ${CC_ARGS_PATH}) if(NOT CC_ARGS_PATH) message(FATAL_ERROR "No imported target file found of ${CC_ARGS_NAME}.") endif() if(MSVC AND CC_ARGS_SHARED AND NOT CC_ARGS_IMPLIB) string(REGEX REPLACE ".[Dd][Ll][Ll]$" ".lib" CC_ARGS_IMPLIB ${CC_ARGS_PATH} ) endif() if(CC_ARGS_SHARED) add_library(${CC_ARGS_NAME} SHARED IMPORTED GLOBAL) elseif(CC_ARGS_STATIC) add_library(${CC_ARGS_NAME} STATIC IMPORTED GLOBAL) else() add_library(${CC_ARGS_NAME} UNKNOWN IMPORTED GLOBAL) endif() set_property( TARGET ${CC_ARGS_NAME} PROPERTY IMPORTED_LOCATION ${CC_ARGS_PATH} ) if(MSVC AND CC_ARGS_SHARED) set_property( TARGET ${CC_ARGS_NAME} PROPERTY IMPORTED_IMPLIB ${CC_ARGS_IMPLIB} ) endif() if(CC_ARGS_INCS) _absolute_paths(INC_DIRS ${CC_ARGS_INCS}) foreach(INC_DIR ${INC_DIRS}) set_property( TARGET ${CC_ARGS_NAME} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${INC_DIR}" ) endforeach() endif() if(CC_ARGS_PUBINCS) _absolute_paths(INC_DIRS ${CC_ARGS_PUBINCS}) foreach(INC_DIR ${INC_DIRS}) set_property( TARGET ${CC_ARGS_NAME} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${INC_DIR}" ) endforeach() endif() if(CC_ARGS_DEPS) add_dependencies(${CC_ARGS_NAME} "${CC_ARGS_DEPS}") endif() if(CC_ARGS_PACKED) install( TARGETS ${CC_ARGS_NAME} ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) if(CC_ARGS_PUBINCS) foreach(PACKED_EXCLUDE ${CC_ARGS_PACKED_EXCLUDES}) list(APPEND PATTERN_EXCLUDES "PATTERN;${PACKED_EXCLUDE};EXCLUDE") endforeach() install( DIRECTORY ${CC_ARGS_PUBINCS} DESTINATION ${CMAKE_INSTALL_INCDIR} FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp" PATTERN "*.hxx" ${PATTERN_EXCLUDES} ) endif() endif() endfunction() ## Import a C/C++ interface library function(cc_interface) cmake_parse_arguments( CC_ARGS "PACKED" "NAME" "INCS;PUBINCS;DEPS;PACKED_EXCLUDES" ${ARGN} ) if(NOT CC_ARGS_NAME) message(FATAL_ERROR "No target name privated.") endif() add_library(${CC_ARGS_NAME} INTERFACE GLOBAL) if(CC_ARGS_INCS) _absolute_paths(INC_DIRS ${CC_ARGS_INCS}) target_include_directories(${CC_ARGS_NAME} INTERFACE "${INC_DIRS}") endif() if(CC_ARGS_PUBINCS) _absolute_paths(INC_DIRS ${CC_ARGS_PUBINCS}) target_include_directories(${CC_ARGS_NAME} INTERFACE "${INC_DIRS}") endif() if(CC_ARGS_DEPS) add_dependencies(${CC_ARGS_NAME} "${CC_ARGS_DEPS}") endif() if(CC_ARGS_PACKED AND CC_ARGS_PUBINCS) foreach(PACKED_EXCLUDE ${CC_ARGS_PACKED_EXCLUDES}) list(APPEND PATTERN_EXCLUDES "PATTERN;${PACKED_EXCLUDE};EXCLUDE") endforeach() install( DIRECTORY ${CC_ARGS_PUBINCS} DESTINATION ${CMAKE_INSTALL_INCDIR} FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp" PATTERN "*.hxx" ${PATTERN_EXCLUDES} ) endif() endfunction() ## Find gtest library function(_find_gtest) if(DEFINED FIND_GTEST_LIBS AND DEFINED FIND_GTEST_INCS) return() endif() if(NOT TARGET gtest OR NOT TARGET gtest_main) # Find gtest using 'find_package' find_package(GTest REQUIRED) set( FIND_GTEST_INCS "${GTEST_INCLUDE_DIRS}" CACHE STRING "GTest includes" ) set( FIND_GTEST_LIBS "${GTEST_BOTH_LIBRARIES}" CACHE STRING "GTest libraries" ) else() # Find gtest using target names set(FIND_GTEST_INCS "" CACHE STRING "GTest includes") set(FIND_GTEST_LIBS "gtest;gtest_main" CACHE STRING "GTest libraries") endif() endfunction() ## Build a C/C++ executable google test program function(cc_gtest) cmake_parse_arguments( CC_ARGS "" "NAME;VERSION" "SRCS;INCS;DEFS;LIBS;CFLAGS;CXXFLAGS;LDFLAGS;DEPS;ARGS" ${ARGN} ) _find_gtest() cc_test( NAME "${CC_ARGS_NAME}" VERSION "${CC_ARGS_VERSION}" SRCS "${CC_ARGS_SRCS}" INCS "${CC_ARGS_INCS};${FIND_GTEST_INCS}" DEFS "${CC_ARGS_DEFS}" LIBS "${CC_ARGS_LIBS};${FIND_GTEST_LIBS}" CFLAGS "${CC_ARGS_CFLAGS}" CXXFLAGS "${CC_ARGS_CXXFLAGS}" LDFLAGS "${CC_ARGS_LDFLAGS}" DEPS "${CC_ARGS_DEPS}" ARGS "${CC_ARGS_ARGS}" ) endfunction() ## Find gmock library function(_find_gmock) if(DEFINED FIND_GMOCK_LIBS AND DEFINED FIND_GMOCK_INCS) return() endif() if(NOT TARGET gmock OR NOT TARGET gmock_main) # Find gmock/gtest using 'find_package' find_package(GMock REQUIRED) find_package(GTest REQUIRED) set( FIND_GMOCK_INCS "${GMOCK_INCLUDE_DIRS};${GTEST_INCLUDE_DIRS}" CACHE STRING "GMock includes" ) set( FIND_GMOCK_LIBS "${GMOCK_BOTH_LIBRARIES};${GTEST_LIBRARIES}" CACHE STRING "GMock libraries" ) else() # Find gmock using target names set(FIND_GMOCK_INCS "" CACHE STRING "GMock includes") set(FIND_GMOCK_LIBS "gmock;gmock_main" CACHE STRING "GMock libraries") endif() endfunction() ## Build a C/C++ executable google mock program function(cc_gmock) cmake_parse_arguments( CC_ARGS "" "NAME;VERSION" "SRCS;INCS;DEFS;LIBS;CFLAGS;CXXFLAGS;LDFLAGS;DEPS;ARGS" ${ARGN} ) _find_gmock() cc_test( NAME "${CC_ARGS_NAME}" VERSION "${CC_ARGS_VERSION}" SRCS "${CC_ARGS_SRCS}" INCS "${CC_ARGS_INCS};${FIND_GMOCK_INCS}" DEFS "${CC_ARGS_DEFS}" LIBS "${CC_ARGS_LIBS};${FIND_GMOCK_LIBS}" CFLAGS "${CC_ARGS_CFLAGS}" CXXFLAGS "${CC_ARGS_CXXFLAGS}" LDFLAGS "${CC_ARGS_LDFLAGS}" DEPS "${CC_ARGS_DEPS}" ARGS "${CC_ARGS_ARGS}" ) endfunction() ## Find protobuf library function(_find_protobuf _VERSION) if(DEFINED CC_PROTOBUF_PROTOC_${_VERSION}) return() endif() # Find protobuf using 'find_package' if(NOT TARGET protoc OR NOT TARGET libprotobuf) find_package(Protobuf ${_VERSION} REQUIRED) set( CC_PROTOBUF_PROTOC_${_VERSION} "${PROTOBUF_PROTOC_EXECUTABLE}" CACHE PATH "Protobuf compiler" ) set( CC_PROTOBUF_INCS_${_VERSION} "${PROTOBUF_INCLUDE_DIRS}" CACHE STRING "Protobuf includes" ) set( CC_PROTOBUF_LIBS_${_VERSION} "${PROTOBUF_LIBRARIES}" CACHE STRING "Protobuf libraries" ) return() endif() # Find protobuf using target names get_target_property(protoc_VERSION protoc VERSION) get_target_property(libprotobuf_VERSION libprotobuf VERSION) if(_VERSION) if(${protoc_VERSION} VERSION_LESS ${_VERSION}) message( FATAL_ERROR "The 'protoc' version is ${protoc_VERSION}, less than ${_VERSION}." ) endif() if(${libprotobuf_VERSION} VERSION_LESS ${_VERSION}) message( FATAL_ERROR "The 'libprotobuf' version is ${libprotobuf_VERSION}, " "less than ${_VERSION}." ) endif() endif() message(STATUS "Found binary 'protoc ${protoc_VERSION}'") message(STATUS "Found library 'libprotobuf ${libprotobuf_VERSION}'") set( CC_PROTOBUF_PROTOC_${_VERSION} "$" CACHE PATH "Protobuf compiler" ) set( CC_PROTOBUF_INCS_${_VERSION} "" CACHE STRING "Protobuf includes" ) set( CC_PROTOBUF_LIBS_${_VERSION} libprotobuf CACHE STRING "Protobuf libraries" ) endfunction() ## Build a C++ protobuf static or shared library function(cc_proto_library) cmake_parse_arguments( CC_ARGS "STATIC;SHARED;EXCLUDE;PACKED" "NAME;VERSION;PROTOROOT;PROTOBUF_VERSION" "SRCS;CXXFLAGS;LDFLAGS;DEPS" ${ARGN} ) _find_protobuf("${CC_ARGS_PROTOBUF_VERSION}") set(CC_PROTOBUF_PROTOC ${CC_PROTOBUF_PROTOC_${CC_ARGS_PROTOBUF_VERSION}}) set(CC_PROTOBUF_INCS ${CC_PROTOBUF_INCS_${CC_ARGS_PROTOBUF_VERSION}}) set(CC_PROTOBUF_LIBS ${CC_PROTOBUF_LIBS_${CC_ARGS_PROTOBUF_VERSION}}) if(NOT CC_ARGS_NAME) message(FATAL_ERROR "No target name privated.") endif() file(GLOB CC_ARGS_SRCS ${CC_ARGS_SRCS}) if(NOT CC_ARGS_SRCS) message(FATAL_ERROR "No source files found of ${CC_ARGS_NAME}.") endif() if(CC_ARGS_VERSION) string(REPLACE "-" "_" MACRO_PREFIX "${CC_ARGS_NAME}") list(APPEND CC_ARGS_DEFS ${MACRO_PREFIX}_VERSION="${CC_ARGS_VERSION}") endif() if(CC_ARGS_EXCLUDE) set(EXCLUDE_OPTION EXCLUDE_FROM_ALL) endif() set(PROTO_ROOT ${CMAKE_CURRENT_SOURCE_DIR}) if(CC_ARGS_PROTOROOT) get_filename_component(PROTO_ROOT ${CC_ARGS_PROTOROOT} ABSOLUTE) endif() # Compile proto files to C++ sources set(CPP_OUTPATH "${CMAKE_CURRENT_BINARY_DIR}") foreach(PROTO_FILE ${CC_ARGS_SRCS}) get_filename_component(PROTO_FILE ${PROTO_FILE} ABSOLUTE) if(NOT ${PROTO_FILE} MATCHES "\\.proto$$") message(FATAL_ERROR "Unrecognized proto file ${PROTOFILE}") endif() if(NOT ${PROTO_FILE} MATCHES "^${PROTO_ROOT}") message(FATAL_ERROR "'${PROTO_FILE}' NOT IN '${PROTO_ROOT}'") endif() string( REGEX REPLACE "^${PROTO_ROOT}(/?)" "" ROOT_CLEANED_FILE ${PROTO_FILE} ) string(REGEX REPLACE "\\.proto$$" "" EXT_CLEANED_FILE ${ROOT_CLEANED_FILE}) set(CPP_FILE "${CPP_OUTPATH}/${EXT_CLEANED_FILE}.pb.cc") set(HDR_FILE "${CPP_OUTPATH}/${EXT_CLEANED_FILE}.pb.h") set(INJ_FILE "${CPP_OUTPATH}/${EXT_CLEANED_FILE}.pb.cmake") file(RELATIVE_PATH REL_CPP_FILE ${CMAKE_BINARY_DIR} ${CPP_FILE}) set(INJECTED_SCRIPT "foreach(SRC ${EXT_CLEANED_FILE}.pb.cc ${EXT_CLEANED_FILE}.pb.h)\n" " file(READ \$\{SRC\} SRC_CODE)\n" " file(REMOVE \$\{SRC\})\n" " file(APPEND \$\{SRC\} \"#ifdef __GNUC__\\n\")\n" " file(APPEND \$\{SRC\} \"#pragma GCC diagnostic push\\n\")\n" " file(APPEND \$\{SRC\} \"#pragma GCC diagnostic ignored \\\"-Wshadow\\\"\\n\")\n" " file(APPEND \$\{SRC\} \"#pragma GCC diagnostic ignored \\\"-Wunused-parameter\\\"\\n\")\n" " file(APPEND \$\{SRC\} \"#endif\\n\\n\")\n" " file(APPEND \$\{SRC\} \"\$\{SRC_CODE\}\")\n" " file(APPEND \$\{SRC\} \"\\n#ifdef __GNUC__\\n\")\n" " file(APPEND \$\{SRC\} \"#pragma GCC diagnostic pop\\n\")\n" " file(APPEND \$\{SRC\} \"#endif\\n\")\n" "endforeach()\n" ) file(WRITE "${INJ_FILE}" ${INJECTED_SCRIPT}) add_custom_command( OUTPUT "${CPP_FILE}" "${HDR_FILE}" # COMMAND ${CMAKE_COMMAND} -E make_directory ${CPP_OUTPATH} COMMAND ${CC_PROTOBUF_PROTOC} --cpp_out "${CPP_OUTPATH}" --python_out "${CPP_OUTPATH}" --proto_path "${PROTO_ROOT}" "${PROTO_FILE}" COMMAND ${CMAKE_COMMAND} -P "${INJ_FILE}" DEPENDS "${PROTO_FILE}" COMMENT "Generating CXX source ${REL_CPP_FILE}" VERBATIM ) list(APPEND CC_SRCS "${CPP_FILE}" "${HDR_FILE}") endforeach() # Compile C++ sources if(CC_ARGS_SHARED AND CC_ARGS_STATIC) _add_library(${CC_ARGS_NAME} "${EXCLUDE_OPTION}" "${CC_SRCS}") elseif(CC_ARGS_SHARED) add_library(${CC_ARGS_NAME} SHARED ${EXCLUDE_OPTION} ${CC_SRCS}) elseif(CC_ARGS_STATIC) add_library(${CC_ARGS_NAME} STATIC ${EXCLUDE_OPTION} ${CC_SRCS}) else() add_library(${CC_ARGS_NAME} ${EXCLUDE_OPTION} ${CC_SRCS}) endif() if(TARGET ${CC_ARGS_NAME}_objects) _cc_target_properties( NAME "${CC_ARGS_NAME}_objects" INCS "${CPP_OUTPATH};${CC_PROTOBUF_INCS}" LIBS "${CC_PROTOBUF_LIBS}" CXXFLAGS "${CC_ARGS_CXXFLAGS}" LDFLAGS "${CC_ARGS_LDFLAGS}" DEPS "${CC_ARGS_DEPS}" "${CC_ARGS_UNPARSED_ARGUMENTS}" ) endif() if(TARGET ${CC_ARGS_NAME}_static) _cc_target_properties( NAME "${CC_ARGS_NAME}_static" PUBINCS "${CPP_OUTPATH};${CC_PROTOBUF_INCS}" LIBS "${CC_PROTOBUF_LIBS}" CXXFLAGS "${CC_ARGS_CXXFLAGS}" LDFLAGS "${CC_ARGS_LDFLAGS}" DEPS "${CC_ARGS_DEPS}" "${CC_ARGS_UNPARSED_ARGUMENTS}" ) if(CC_ARGS_PACKED) install( TARGETS ${CC_ARGS_NAME}_static ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) endif() endif() _cc_target_properties( NAME "${CC_ARGS_NAME}" PUBINCS "${CPP_OUTPATH};${CC_PROTOBUF_INCS}" LIBS "${CC_PROTOBUF_LIBS}" CXXFLAGS "${CC_ARGS_CXXFLAGS}" LDFLAGS "${CC_ARGS_LDFLAGS}" DEPS "${CC_ARGS_DEPS}" VERSION "${CC_ARGS_VERSION}" "${CC_ARGS_UNPARSED_ARGUMENTS}" ) if(CC_ARGS_PACKED) install( TARGETS ${CC_ARGS_NAME} ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) endif() endfunction() ## Add a subdirectory to the build function(cuda_directory) if(NOT CMAKE_CUDA_COMPILER) message(FATAL_ERROR "No CUDA language supported.") endif() cc_directory(${ARGN}) endfunction() ## Add subdirectories to the build function(cuda_directories) if(NOT CMAKE_CUDA_COMPILER) message(FATAL_ERROR "No CUDA language supported.") endif() cc_directories(${ARGN}) endfunction() ## Set the properties of cuda target function(_cuda_target_properties) cmake_parse_arguments( CUDA_ARGS "STRICT;ALWAYS_LINK" "NAME;VERSION;C_STANDARD;CXX_STANDARD" "INCS;PUBINCS;DEFS;LIBS;CFLAGS;CXXFLAGS;CUDAFLAGS;LDFLAGS;DEPS" ${ARGN} ) if(NOT CUDA_ARGS_NAME) message(FATAL_ERROR "No target name privated.") endif() get_target_property(TARGET_TYPE ${CUDA_ARGS_NAME} TYPE) if(("${TARGET_TYPE}" STREQUAL "SHARED_LIBRARY") OR ("${TARGET_TYPE}" STREQUAL "STATIC_LIBRARY") OR ("${TARGET_TYPE}" STREQUAL "EXECUTABLE")) set(TARGET_LINKABLE TRUE) endif() if(CUDA_ARGS_ALWAYS_LINK) if(("${TARGET_TYPE}" STREQUAL "STATIC_LIBRARY") OR ("${TARGET_TYPE}" STREQUAL "OBJECT_LIBRARY")) set_property(TARGET ${CUDA_ARGS_NAME} PROPERTY ALWAYS_LINK TRUE) endif() endif() # Set the warning level of compiling if(CUDA_ARGS_STRICT) target_compile_options( ${CUDA_ARGS_NAME} PRIVATE "${BAZEL_CUDA_STRICT_COMPILE_FLAGS}" ) if(TARGET_LINKABLE) target_link_libraries( ${CUDA_ARGS_NAME} "${BAZEL_CUDA_STRICT_LINK_FLAGS}" ) endif() else() target_compile_options( ${CUDA_ARGS_NAME} PRIVATE "${BAZEL_CUDA_UNSTRICT_COMPILE_FLAGS}" ) if(TARGET_LINKABLE) target_link_libraries( ${CUDA_ARGS_NAME} "${BAZEL_CUDA_UNSTRICT_LINK_FLAGS}" ) endif() endif() target_compile_options( ${CUDA_ARGS_NAME} PRIVATE "$<$:-ccbin=${CMAKE_CXX_COMPILER}>" ) if(CUDA_ARGS_DEFS) target_compile_definitions(${CUDA_ARGS_NAME} PRIVATE "${CUDA_ARGS_DEFS}") endif() if(CUDA_ARGS_CFLAGS OR CUDA_ARGS_CXXFLAGS OR CUDA_ARGS_CUDAFLAGS) target_compile_options( ${CUDA_ARGS_NAME} PRIVATE "$<$:${CUDA_ARGS_CFLAGS}>" "$<$:${CUDA_ARGS_CXXFLAGS}>" "$<$:${CUDA_ARGS_CUDAFLAGS}>" ) endif() if(CUDA_ARGS_LDFLAGS) string(REPLACE ";" " " CUDA_ARGS_LDFLAGS "${CUDA_ARGS_LDFLAGS}") set_property( TARGET ${CUDA_ARGS_NAME} PROPERTY LINK_FLAGS "${CUDA_ARGS_LDFLAGS}" ) endif() if(CUDA_ARGS_INCS) _absolute_paths(INC_DIRS ${CUDA_ARGS_INCS}) target_include_directories(${CUDA_ARGS_NAME} PRIVATE "${INC_DIRS}") endif() target_include_directories( ${CUDA_ARGS_NAME} PRIVATE "${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}" ) if(BAZEL_WORKSPACE_DIR) target_include_directories( ${CUDA_ARGS_NAME} PRIVATE "${BAZEL_WORKSPACE_DIR}" ) endif() if(CUDA_ARGS_PUBINCS) _absolute_paths(INC_DIRS ${CUDA_ARGS_PUBINCS}) target_include_directories(${CUDA_ARGS_NAME} PUBLIC "${INC_DIRS}") endif() if(CUDA_ARGS_LIBS) if(NOT TARGET_LINKABLE) _targets_link_dependencies(${CUDA_ARGS_NAME} ${CUDA_ARGS_LIBS}) else() if ("${TARGET_TYPE}" STREQUAL "EXECUTABLE") _target_link_libraries(${CUDA_ARGS_NAME} "${CUDA_ARGS_LIBS}") else() target_link_libraries(${CUDA_ARGS_NAME} "${CUDA_ARGS_LIBS}") endif() endif() endif() if(CUDA_ARGS_DEPS) add_dependencies(${CUDA_ARGS_NAME} "${CUDA_ARGS_DEPS}") endif() if(CUDA_ARGS_VERSION) set_property( TARGET ${CUDA_ARGS_NAME} PROPERTY VERSION "${CUDA_ARGS_VERSION}" ) endif() if(NOT CUDA_C_STANDARD) set(CUDA_C_STANDARD 99) endif() if(NOT CUDA_CXX_STANDARD) set(CUDA_CXX_STANDARD 11) endif() set_target_properties( ${CUDA_ARGS_NAME} PROPERTIES DEFINE_SYMBOL "" C_STANDARD ${CUDA_C_STANDARD} CXX_STANDARD ${CUDA_CXX_STANDARD} C_STANDARD_REQUIRED ON C_EXTENSIONS ON CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS OFF CUDA_STANDARD 11 CUDA_STANDARD_REQUIRED ON CUDA_EXTENSIONS OFF WINDOWS_EXPORT_ALL_SYMBOLS ON ) endfunction() ## Build a CUDA static or shared library function(cuda_library) if(NOT CMAKE_CUDA_COMPILER) message(FATAL_ERROR "No CUDA language supported.") endif() cmake_parse_arguments( CUDA_ARGS "STATIC;SHARED;EXCLUDE;PACKED" "NAME;VERSION" "SRCS;INCS;PUBINCS;DEFS;LIBS;CFLAGS;CXXFLAGS;CUDAFLAGS;LDFLAGS;DEPS;PACKED_EXCS" ${ARGN} ) if(NOT CUDA_ARGS_NAME) message(FATAL_ERROR "No target name privated.") endif() file(GLOB CUDA_ARGS_SRCS ${CUDA_ARGS_SRCS}) if(NOT CUDA_ARGS_SRCS) message(FATAL_ERROR "No source files found of ${CUDA_ARGS_NAME}.") endif() if(CUDA_ARGS_VERSION) string(REPLACE "-" "_" MACRO_PREFIX "${CUDA_ARGS_NAME}") list(APPEND CUDA_ARGS_DEFS ${MACRO_PREFIX}_VERSION="${CUDA_ARGS_VERSION}") endif() if(CUDA_ARGS_EXCLUDE) set(EXCLUDE_OPTION EXCLUDE_FROM_ALL) endif() if(CUDA_ARGS_SHARED AND CUDA_ARGS_STATIC) _add_library(${CUDA_ARGS_NAME} "${EXCLUDE_OPTION}" "${CUDA_ARGS_SRCS}") elseif(CUDA_ARGS_SHARED) add_library(${CUDA_ARGS_NAME} SHARED ${EXCLUDE_OPTION} ${CUDA_ARGS_SRCS}) elseif(CUDA_ARGS_STATIC) add_library(${CUDA_ARGS_NAME} STATIC ${EXCLUDE_OPTION} ${CUDA_ARGS_SRCS}) else() add_library(${CUDA_ARGS_NAME} ${EXCLUDE_OPTION} ${CUDA_ARGS_SRCS}) endif() if(TARGET ${CUDA_ARGS_NAME}_objects) _cuda_target_properties( NAME "${CUDA_ARGS_NAME}_objects" INCS "${CUDA_ARGS_INCS};${CUDA_ARGS_PUBINCS}" DEFS "${CUDA_ARGS_DEFS}" LIBS "${CUDA_ARGS_LIBS}" CFLAGS "${CUDA_ARGS_CFLAGS}" CXXFLAGS "${CUDA_ARGS_CXXFLAGS}" CUDAFLAGS "${CUDA_ARGS_CUDAFLAGS}" LDFLAGS "${CUDA_ARGS_LDFLAGS}" DEPS "${CUDA_ARGS_DEPS}" "${CUDA_ARGS_UNPARSED_ARGUMENTS}" ) endif() if(TARGET ${CUDA_ARGS_NAME}_static) _cuda_target_properties( NAME "${CUDA_ARGS_NAME}_static" INCS "${CUDA_ARGS_INCS}" PUBINCS "${CUDA_ARGS_PUBINCS}" DEFS "${CUDA_ARGS_DEFS}" LIBS "${CUDA_ARGS_LIBS}" CFLAGS "${CUDA_ARGS_CFLAGS}" CXXFLAGS "${CUDA_ARGS_CXXFLAGS}" CUDAFLAGS "${CUDA_ARGS_CUDAFLAGS}" LDFLAGS "${CUDA_ARGS_LDFLAGS}" DEPS "${CUDA_ARGS_DEPS}" "${CUDA_ARGS_UNPARSED_ARGUMENTS}" ) if(CUDA_ARGS_PACKED) install( TARGETS ${CUDA_ARGS_NAME}_static ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) endif() endif() _cuda_target_properties( NAME "${CUDA_ARGS_NAME}" INCS "${CUDA_ARGS_INCS}" PUBINCS "${CUDA_ARGS_PUBINCS}" DEFS "${CUDA_ARGS_DEFS}" LIBS "${CUDA_ARGS_LIBS}" CFLAGS "${CUDA_ARGS_CFLAGS}" CXXFLAGS "${CUDA_ARGS_CXXFLAGS}" CUDAFLAGS "${CUDA_ARGS_CUDAFLAGS}" LDFLAGS "${CUDA_ARGS_LDFLAGS}" DEPS "${CUDA_ARGS_DEPS}" VERSION "${CUDA_ARGS_VERSION}" "${CUDA_ARGS_UNPARSED_ARGUMENTS}" ) if(CUDA_ARGS_PACKED) install( TARGETS ${CUDA_ARGS_NAME} ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) if(CUDA_ARGS_PUBINCS) foreach(PACKED_EXCLUDE ${CUDA_ARGS_PACKED_IGORNES}) list(APPEND PATTERN_EXCLUDES "PATTERN;${PACKED_EXCLUDE};EXCLUDE") endforeach() install( DIRECTORY ${CUDA_ARGS_PUBINCS} DESTINATION ${CMAKE_INSTALL_INCDIR} FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp" PATTERN "*.hxx" PATTERN "*.cuh" ${PATTERN_EXCLUDES} ) endif() endif() endfunction() ## Build a CUDA executable program function(cuda_binary) if(NOT CMAKE_CUDA_COMPILER) message(FATAL_ERROR "No CUDA language supported.") endif() cmake_parse_arguments( CUDA_ARGS "PACKED" "NAME;VERSION" "SRCS;INCS;DEFS;LIBS;CFLAGS;CXXFLAGS;CUDAFLAGS;LDFLAGS;DEPS" ${ARGN} ) if(NOT CUDA_ARGS_NAME) message(FATAL_ERROR "No target name privated.") endif() file(GLOB CUDA_ARGS_SRCS ${CUDA_ARGS_SRCS}) if(NOT CUDA_ARGS_SRCS) message(FATAL_ERROR "No source files found of ${CUDA_ARGS_NAME}.") endif() if(CUDA_ARGS_VERSION) string(REPLACE "-" "_" MACRO_PREFIX "${CUDA_ARGS_NAME}") list(APPEND CUDA_ARGS_DEFS ${MACRO_PREFIX}_VERSION="${CUDA_ARGS_VERSION}") endif() add_executable(${CUDA_ARGS_NAME} ${CUDA_ARGS_SRCS}) if(CUDA_ARGS_PACKED) install( TARGETS ${CUDA_ARGS_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ) endif() _cuda_target_properties( NAME "${CUDA_ARGS_NAME}" INCS "${CUDA_ARGS_INCS}" DEFS "${CUDA_ARGS_DEFS}" LIBS "${CUDA_ARGS_LIBS}" CFLAGS "${CUDA_ARGS_CFLAGS}" CXXFLAGS "${CUDA_ARGS_CXXFLAGS}" CUDAFLAGS "${CUDA_ARGS_CUDAFLAGS}" LDFLAGS "${CUDA_ARGS_LDFLAGS}" DEPS "${CUDA_ARGS_DEPS}" VERSION "${CUDA_ARGS_VERSION}" "${CUDA_ARGS_UNPARSED_ARGUMENTS}" ) endfunction() ## Build a CUDA executable test program function(cuda_test) if(NOT CMAKE_CUDA_COMPILER) message(FATAL_ERROR "No CUDA language supported.") endif() cmake_parse_arguments( CUDA_ARGS "" "NAME;VERSION" "SRCS;INCS;DEFS;LIBS;CFLAGS;CXXFLAGS;CUDAFLAGS;LDFLAGS;DEPS;ARGS" ${ARGN} ) if(NOT CUDA_ARGS_NAME) message(FATAL_ERROR "No target name privated.") endif() file(GLOB CUDA_ARGS_SRCS ${CUDA_ARGS_SRCS}) if(NOT CUDA_ARGS_SRCS) message(FATAL_ERROR "No source files found of ${CUDA_ARGS_NAME}.") endif() if(CUDA_ARGS_VERSION) string(REPLACE "-" "_" MACRO_PREFIX "${CUDA_ARGS_NAME}") list(APPEND CUDA_ARGS_DEFS ${MACRO_PREFIX}_VERSION="${CUDA_ARGS_VERSION}") endif() add_executable(${CUDA_ARGS_NAME} EXCLUDE_FROM_ALL ${CUDA_ARGS_SRCS}) _cuda_target_properties( NAME "${CUDA_ARGS_NAME}" INCS "${CUDA_ARGS_INCS}" DEFS "${CUDA_ARGS_DEFS}" LIBS "${CUDA_ARGS_LIBS}" CFLAGS "${CUDA_ARGS_CFLAGS}" CXXFLAGS "${CUDA_ARGS_CXXFLAGS}" CUDAFLAGS "${CUDA_ARGS_CUDAFLAGS}" LDFLAGS "${CUDA_ARGS_LDFLAGS}" DEPS "${CUDA_ARGS_DEPS}" "${CUDA_ARGS_UNPARSED_ARGUMENTS}" ) add_dependencies(unittest ${CUDA_ARGS_NAME}) add_custom_target( unittest.${CUDA_ARGS_NAME} COMMAND $ "${CUDA_ARGS_ARGS}" WORKING_DIRECTORY ${PROJECT_BINARY_DIR} DEPENDS ${CUDA_ARGS_NAME} ) add_test( NAME ${CUDA_ARGS_NAME} COMMAND $ "${CUDA_ARGS_ARGS}" WORKING_DIRECTORY ${PROJECT_BINARY_DIR} ) endfunction() ## Add existing test cases to a test suite function(cuda_test_suite) if(NOT CMAKE_CUDA_COMPILER) message(FATAL_ERROR "No CUDA language supported.") endif() cc_test_suite(${ARGN}) endfunction() ## Import a C/C++/CUDA static or shared library function(cuda_import) if(NOT CMAKE_CUDA_COMPILER) message(FATAL_ERROR "No CUDA language supported.") endif() cmake_parse_arguments( CUDA_ARGS "STATIC;SHARED;PACKED" "NAME;PATH;IMPLIB" "INCS;PUBINCS;DEPS;PACKED_EXCLUDES" ${ARGN} ) if(NOT CUDA_ARGS_NAME) message(FATAL_ERROR "No target name privated.") endif() file(GLOB CUDA_ARGS_PATH ${CUDA_ARGS_PATH}) if(NOT CUDA_ARGS_PATH) message(FATAL_ERROR "No imported target file found of ${CUDA_ARGS_NAME}.") endif() if(MSVC AND CUDA_ARGS_SHARED AND NOT CUDA_ARGS_IMPLIB) string(REGEX REPLACE ".[Dd][Ll][Ll]$" ".lib" CUDA_ARGS_IMPLIB ${CUDA_ARGS_PATH} ) endif() if(CUDA_ARGS_SHARED) add_library(${CUDA_ARGS_NAME} SHARED IMPORTED GLOBAL) elseif(CUDA_ARGS_STATIC) add_library(${CUDA_ARGS_NAME} STATIC IMPORTED GLOBAL) else() add_library(${CUDA_ARGS_NAME} UNKNOWN IMPORTED GLOBAL) endif() set_property( TARGET ${CUDA_ARGS_NAME} PROPERTY IMPORTED_LOCATION ${CUDA_ARGS_PATH} ) if(MSVC AND CUDA_ARGS_SHARED) set_property( TARGET ${CUDA_ARGS_NAME} PROPERTY IMPORTED_IMPLIB ${CUDA_ARGS_IMPLIB} ) endif() if(CUDA_ARGS_INCS) _absolute_paths(INC_DIRS ${CUDA_ARGS_INCS}) foreach(INC_DIR ${INC_DIRS}) set_property( TARGET ${CUDA_ARGS_NAME} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${INC_DIR}" ) endforeach() endif() if(CUDA_ARGS_PUBINCS) _absolute_paths(INC_DIRS ${CUDA_ARGS_PUBINCS}) foreach(INC_DIR ${INC_DIRS}) set_property( TARGET ${CUDA_ARGS_NAME} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${INC_DIR}" ) endforeach() endif() if(CUDA_ARGS_DEPS) add_dependencies(${CUDA_ARGS_NAME} "${CUDA_ARGS_DEPS}") endif() if(CUDA_ARGS_PACKED) install( TARGETS ${CUDA_ARGS_NAME} ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) if(CUDA_ARGS_PUBINCS) foreach(PACKED_EXCLUDE ${CUDA_ARGS_PACKED_EXCLUDES}) list(APPEND PATTERN_EXCLUDES "PATTERN;${PACKED_EXCLUDE};EXCLUDE") endforeach() install( DIRECTORY ${CUDA_ARGS_PUBINCS} DESTINATION ${CMAKE_INSTALL_INCDIR} FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp" PATTERN "*.hxx" PATTERN "*.cuh" ${PATTERN_EXCLUDES} ) endif() endif() endfunction() ## Import a C/C++/CUDA interface library function(cuda_interface) if(NOT CMAKE_CUDA_COMPILER) message(FATAL_ERROR "No CUDA language supported.") endif() cmake_parse_arguments( CUDA_ARGS "PACKED" "NAME" "INCS;PUBINCS;DEPS;PACKED_EXCLUDES" ${ARGN} ) if(NOT CUDA_ARGS_NAME) message(FATAL_ERROR "No target name privated.") endif() add_library(${CUDA_ARGS_NAME} INTERFACE GLOBAL) if(CUDA_ARGS_INCS) _absolute_paths(INC_DIRS ${CUDA_ARGS_INCS}) target_include_directories(${CUDA_ARGS_NAME} INTERFACE "${INC_DIRS}") endif() if(CUDA_ARGS_PUBINCS) _absolute_paths(INC_DIRS ${CUDA_ARGS_PUBINCS}) target_include_directories(${CUDA_ARGS_NAME} INTERFACE "${INC_DIRS}") endif() if(CUDA_ARGS_DEPS) add_dependencies(${CUDA_ARGS_NAME} "${CUDA_ARGS_DEPS}") endif() if(CUDA_ARGS_PACKED AND CUDA_ARGS_PUBINCS) foreach(PACKED_EXCLUDE ${CUDA_ARGS_PACKED_EXCLUDES}) list(APPEND PATTERN_EXCLUDES "PATTERN;${PACKED_EXCLUDE};EXCLUDE") endforeach() install( DIRECTORY ${CUDA_ARGS_PUBINCS} DESTINATION ${CMAKE_INSTALL_INCDIR} FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp" PATTERN "*.hxx" PATTERN "*.cuh" ${PATTERN_EXCLUDES} ) endif() endfunction() ## Build a C/C++/CUDA executable google test program function(cuda_gtest) cmake_parse_arguments( CUDA_ARGS "" "NAME;VERSION" "SRCS;INCS;DEFS;LIBS;CFLAGS;CXXFLAGS;CUDAFLAGS;LDFLAGS;DEPS;ARGS" ${ARGN} ) _find_gtest() cuda_test( NAME "${CUDA_ARGS_NAME}" VERSION "${CUDA_ARGS_VERSION}" SRCS "${CUDA_ARGS_SRCS}" INCS "${CUDA_ARGS_INCS};${FIND_GTEST_INCS}" DEFS "${CUDA_ARGS_DEFS}" LIBS "${CUDA_ARGS_LIBS};${FIND_GTEST_LIBS}" CFLAGS "${CUDA_ARGS_CFLAGS}" CXXFLAGS "${CUDA_ARGS_CXXFLAGS}" CUDAFLAGS "${CUDA_ARGS_CUDAFLAGS}" LDFLAGS "${CUDA_ARGS_LDFLAGS}" DEPS "${CUDA_ARGS_DEPS}" ARGS "${CUDA_ARGS_ARGS}" ) endfunction() ## Build a C/C++/CUDA executable google mock program function(cuda_gmock) cmake_parse_arguments( CUDA_ARGS "" "NAME;VERSION" "SRCS;INCS;DEFS;LIBS;CFLAGS;CXXFLAGS;CUDAFLAGS;LDFLAGS;DEPS;ARGS" ${ARGN} ) _find_gmock() cuda_test( NAME "${CUDA_ARGS_NAME}" VERSION "${CUDA_ARGS_VERSION}" SRCS "${CUDA_ARGS_SRCS}" INCS "${CUDA_ARGS_INCS};${FIND_GMOCK_INCS}" DEFS "${CUDA_ARGS_DEFS}" LIBS "${CUDA_ARGS_LIBS};${FIND_GMOCK_LIBS}" CFLAGS "${CUDA_ARGS_CFLAGS}" CXXFLAGS "${CUDA_ARGS_CXXFLAGS}" CUDAFLAGS "${CUDA_ARGS_CUDAFLAGS}" LDFLAGS "${CUDA_ARGS_LDFLAGS}" DEPS "${CUDA_ARGS_DEPS}" ARGS "${CUDA_ARGS_ARGS}" ) endfunction() ## Add a subdirectory to the build function(go_directory) add_subdirectory(${ARGN}) endfunction() ## Add subdirectories to the build function(go_directories) foreach(SRC_DIR ${ARGN}) add_subdirectory(${SRC_DIR}) endforeach() endfunction() ## Build a go executable program function(go_binary) find_program( GO_EXECUTABLE go PATHS $ENV{HOME}/go ENV GOROOT GOPATH PATH_SUFFIXES bin ) if(NOT GO_EXECUTABLE) message(FATAL_ERROR "No go language compiler found.") endif() cmake_parse_arguments( GO_ARGS "PACKED" "NAME" "GOPATH;SRCS;ASMFLAGS;GCFLAGS;LDFLAGS;DEPS" ${ARGN} ) if(NOT GO_ARGS_NAME) message(FATAL_ERROR "No target name privated.") endif() file(GLOB GO_ARGS_SRCS ${GO_ARGS_SRCS}) if(NOT GO_ARGS_SRCS) message(FATAL_ERROR "No source files/directories found of ${GO_ARGS_NAME}.") endif() if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") string(REPLACE ";" "\;" GO_ARGS_GOPATH "${GO_ARGS_GOPATH}") else() string(REPLACE ";" ":" GO_ARGS_GOPATH "${GO_ARGS_GOPATH}") endif() set( GO_OUTPUT_FILE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${GO_ARGS_NAME}${CMAKE_EXECUTABLE_SUFFIX} ) file(RELATIVE_PATH GO_OUTPUT_REL_FILE ${CMAKE_BINARY_DIR} ${GO_OUTPUT_FILE}) add_custom_target( ${GO_ARGS_NAME} COMMAND ${CMAKE_COMMAND} -E env GOPATH="${GO_ARGS_GOPATH}" "${GO_EXECUTABLE}" build -v -buildmode=exe -compiler=gc -gcflags="${GO_ARGS_GCFLAGS}" -asmflags="${GO_ARGS_ASMFLAGS}" -ldflags="${GO_ARGS_LDFLAGS}" -o "${GO_OUTPUT_FILE}" "${GO_ARGS_SRCS}" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" DEPENDS "${GO_ARGS_DEPS}" COMMENT "Building GO executable ${GO_OUTPUT_REL_FILE}" ) if(GO_ARGS_PACKED) install(PROGRAMS ${GO_OUTPUT_FILE} DESTINATION "${CMAKE_INSTALL_BINDIR}") endif() endfunction() ## Fetch content function(_fetch_content) cmake_parse_arguments( DL_ARGS "" "NAME;PATH;GIT_URL;GIT_TAG;HG_URL;HG_TAG;SVN_URL;SVN_REV;URL;URL_HASH" "" ${ARGN} ) if(NOT DL_ARGS_NAME) message(FATAL_ERROR "No fetch name privated.") endif() if(NOT DL_ARGS_PATH) # Download to current source directory set(DL_ARGS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${DL_ARGS_NAME}") endif() set( CMAKELISTS_CONTENT "cmake_minimum_required(VERSION 3.1)\n" "project(${DL_ARGS_NAME})\n" "include(ExternalProject)\n" "ExternalProject_Add(\n" " ${DL_ARGS_NAME}\n" " PREFIX \"external\"\n" " GIT_REPOSITORY \"${DL_ARGS_GIT_URL}\"\n" " GIT_TAG \"${DL_ARGS_GIT_TAG}\"\n" " HG_REPOSITORY \"${DL_ARGS_HG_URL}\"\n" " HG_TAG \"${DL_ARGS_HG_TAG}\"\n" " SVN_REPOSITORY \"${DL_ARGS_SVN_URL}\"\n" " SVN_REVISION \"${DL_ARGS_SVN_REV}\"\n" " URL \"${DL_ARGS_URL}\"\n" " URL_HASH \"${DL_ARGS_URL_HASH}\"\n" " SOURCE_DIR \"${DL_ARGS_PATH}\"\n" " BINARY_DIR \"\"\n" " CONFIGURE_COMMAND \"\"\n" " BUILD_COMMAND \"\"\n" " INSTALL_COMMAND \"\"\n" " TEST_COMMAND \"\"\n" " LOG_DOWNLOAD ON\n" " )\n" ) set( CMAKELISTS_DIRECTORY "${PROJECT_BINARY_DIR}/downloads/${DL_ARGS_NAME}" ) add_custom_target( external.${DL_ARGS_NAME} COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . && "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${CMAKELISTS_DIRECTORY}" ) # Write a cmake script into folder file(WRITE "${CMAKELISTS_DIRECTORY}/CMakeLists.txt" ${CMAKELISTS_CONTENT}) execute_process( COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . WORKING_DIRECTORY "${CMAKELISTS_DIRECTORY}" ) execute_process( COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${CMAKELISTS_DIRECTORY}" ) endfunction() ## Download a git repository function(git_repository) cmake_parse_arguments(GIT_ARGS "" "NAME;PATH;URL;TAG" "" ${ARGN}) if(NOT GIT_ARGS_NAME) message(FATAL_ERROR "No repository name privated.") endif() if(NOT GIT_ARGS_URL) message(FATAL_ERROR "No repository URL privated.") endif() if(GIT_ARGS_PATH AND NOT IS_ABSOLUTE ${GIT_ARGS_PATH}) get_filename_component(GIT_ARGS_PATH ${GIT_ARGS_PATH} ABSOLUTE) endif() _fetch_content( NAME "${GIT_ARGS_NAME}" PATH "${GIT_ARGS_PATH}" GIT_URL "${GIT_ARGS_URL}" GIT_TAG "${GIT_ARGS_TAG}" ) endfunction() ## Download a hg repository function(hg_repository) cmake_parse_arguments(HG_ARGS "" "NAME;PATH;URL;TAG" "" ${ARGN}) if(NOT HG_ARGS_NAME) message(FATAL_ERROR "No repository name privated.") endif() if(NOT HG_ARGS_URL) message(FATAL_ERROR "No repository URL privated.") endif() if(HG_ARGS_PATH AND NOT IS_ABSOLUTE ${HG_ARGS_PATH}) get_filename_component(HG_ARGS_PATH ${HG_ARGS_PATH} ABSOLUTE) endif() _fetch_content( NAME "${HG_ARGS_NAME}" PATH "${HG_ARGS_PATH}" HG_URL "${HG_ARGS_URL}" HG_TAG "${HG_ARGS_TAG}" ) endfunction() ## Download a svn repository function(svn_repository) cmake_parse_arguments(SVN_ARGS "" "NAME;PATH;URL;REV" "" ${ARGN}) if(NOT SVN_ARGS_NAME) message(FATAL_ERROR "No repository name privated.") endif() if(NOT SVN_ARGS_URL) message(FATAL_ERROR "No repository URL privated.") endif() if(SVN_ARGS_PATH AND NOT IS_ABSOLUTE ${SVN_ARGS_PATH}) get_filename_component(SVN_ARGS_PATH ${SVN_ARGS_PATH} ABSOLUTE) endif() _fetch_content( NAME "${SVN_ARGS_NAME}" PATH "${SVN_ARGS_PATH}" SVN_URL "${SVN_ARGS_URL}" SVN_REV "${SVN_ARGS_REV}" ) endfunction() ## Download a http archive function(http_archive) cmake_parse_arguments(HTTP_ARGS "" "NAME;PATH;URL;SHA256;SHA1;MD5" "" ${ARGN}) if(NOT HTTP_ARGS_NAME) message(FATAL_ERROR "No archive name privated.") endif() if(NOT HTTP_ARGS_URL) message(FATAL_ERROR "No archive URL privated.") endif() if(HTTP_ARGS_PATH AND NOT IS_ABSOLUTE ${HTTP_ARGS_PATH}) get_filename_component(HTTP_ARGS_PATH ${HTTP_ARGS_PATH} ABSOLUTE) endif() if(HTTP_ARGS_SHA256) set(HTTP_URL_HASH "SHA256=${HTTP_ARGS_SHA256}") elseif(HTTP_ARGS_SHA1) set(HTTP_URL_HASH "SHA1=${HTTP_ARGS_SHA1}") elseif(HTTP_ARGS_MD5) set(HTTP_URL_HASH "MD5=${HTTP_ARGS_MD5}") else() set(HTTP_URL_HASH "") endif() _fetch_content( NAME "${HTTP_ARGS_NAME}" PATH "${HTTP_ARGS_PATH}" URL "${HTTP_ARGS_URL}" URL_HASH "${HTTP_URL_HASH}" ) endfunction() ## Retrieve a version string from GIT function(git_version _RESULT _SOURCES_DIR) find_package(Git REQUIRED) if(NOT IS_ABSOLUTE ${_SOURCES_DIR}) get_filename_component(_SOURCES_DIR ${_SOURCES_DIR} ABSOLUTE) endif() # git describe --tags execute_process( COMMAND "${GIT_EXECUTABLE}" describe --tags WORKING_DIRECTORY "${_SOURCES_DIR}" RESULT_VARIABLE GIT_VER_RESULT OUTPUT_VARIABLE GIT_VER_OUTPUT ERROR_VARIABLE GIT_VER_ERROR ) if(GIT_VER_RESULT EQUAL 0) string(STRIP ${GIT_VER_OUTPUT} GIT_VER_OUTPUT) set(${_RESULT} "${GIT_VER_OUTPUT}" PARENT_SCOPE) return() endif() # git rev-parse --short HEAD execute_process( COMMAND "${GIT_EXECUTABLE}" rev-parse --short HEAD WORKING_DIRECTORY "${_SOURCES_DIR}" RESULT_VARIABLE GIT_VER_RESULT OUTPUT_VARIABLE GIT_VER_OUTPUT ERROR_VARIABLE GIT_VER_ERROR ) if(GIT_VER_RESULT EQUAL 0) string(STRIP ${GIT_VER_OUTPUT} GIT_VER_OUTPUT) set(${_RESULT} "g${GIT_VER_OUTPUT}" PARENT_SCOPE) return() endif() set(${_RESULT} "" PARENT_SCOPE) endfunction() ## Retrieve a version string from HG function(hg_version _RESULT _SOURCES_DIR) find_package(Hg REQUIRED) if(NOT IS_ABSOLUTE ${_SOURCES_DIR}) get_filename_component(_SOURCES_DIR ${_SOURCES_DIR} ABSOLUTE) endif() # hg log -T "{latesttagdistance}" -r . execute_process( COMMAND "${HG_EXECUTABLE}" log -T "{latesttagdistance}" -r . WORKING_DIRECTORY "${_SOURCES_DIR}" RESULT_VARIABLE HG_VER_RESULT OUTPUT_VARIABLE HG_VER_OUTPUT ERROR_VARIABLE HG_VER_ERROR ) if(HG_VER_RESULT EQUAL 0) string(STRIP ${HG_VER_OUTPUT} HG_VER_OUTPUT) if(HG_VER_OUTPUT STREQUAL "0") # hg log -T "{latesttag}" -r . execute_process( COMMAND "${HG_EXECUTABLE}" log -T "{latesttag}" -r . WORKING_DIRECTORY "${_SOURCES_DIR}" RESULT_VARIABLE HG_VER_RESULT OUTPUT_VARIABLE HG_VER_OUTPUT ERROR_VARIABLE HG_VER_ERROR ) else() # hg log -T "{latesttag}-{latesttagdistance}-h{node|short}" -r . execute_process( COMMAND "${HG_EXECUTABLE}" log -T "{latesttag}-{latesttagdistance}-h{node|short}" -r . WORKING_DIRECTORY "${_SOURCES_DIR}" RESULT_VARIABLE HG_VER_RESULT OUTPUT_VARIABLE HG_VER_OUTPUT ERROR_VARIABLE HG_VER_ERROR ) endif() if(HG_VER_RESULT EQUAL 0) string(STRIP ${HG_VER_OUTPUT} HG_VER_OUTPUT) if(NOT HG_VER_OUTPUT MATCHES "^null.*") set(${_RESULT} "${HG_VER_OUTPUT}" PARENT_SCOPE) return() endif() endif() endif() # hg log -T "h{node|short}" -r . execute_process( COMMAND "${HG_EXECUTABLE}" log -T "h{node|short}" -r . WORKING_DIRECTORY "${_SOURCES_DIR}" RESULT_VARIABLE HG_VER_RESULT OUTPUT_VARIABLE HG_VER_OUTPUT ERROR_VARIABLE HG_VER_ERROR ) if(HG_VER_RESULT EQUAL 0) string(STRIP ${HG_VER_OUTPUT} HG_VER_OUTPUT) set(${_RESULT} "${HG_VER_OUTPUT}" PARENT_SCOPE) return() endif() set(${_RESULT} "" PARENT_SCOPE) endfunction() ## Retrieve a version string from SVN function(svn_version _RESULT _SOURCES_DIR) find_package(Subversion REQUIRED) if(NOT IS_ABSOLUTE ${_SOURCES_DIR}) get_filename_component(_SOURCES_DIR ${_SOURCES_DIR} ABSOLUTE) endif() # svn info --show-item revision execute_process( COMMAND "${Subversion_SVN_EXECUTABLE}" info --show-item revision WORKING_DIRECTORY "${_SOURCES_DIR}" RESULT_VARIABLE SVN_VER_RESULT OUTPUT_VARIABLE SVN_VER_OUTPUT ERROR_VARIABLE SVN_VER_ERROR ) if(SVN_VER_RESULT EQUAL 0) string(STRIP ${SVN_VER_OUTPUT} SVN_VER_OUTPUT) set(${_RESULT} "r${SVN_VER_OUTPUT}" PARENT_SCOPE) return() endif() set(${_RESULT} "" PARENT_SCOPE) endfunction() _find_workspace_directory(BAZEL_WORKSPACE_DIR) if(BAZEL_WORKSPACE_DIR) include("${BAZEL_WORKSPACE_DIR}/Workspace.cmake") endif() ================================================ FILE: cmake/option.cmake ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## Use of this source code is governed by a BSD-style ## license that can be found in the LICENSE file. ## ## \file option.cmake ## \author Rainvan (Yunfeng.Xiao) ## \date Jan 2017 ## \version 1.0 ## \brief Detail cmake build option script ## ## https://en.wikipedia.org/wiki/List_of_Intel_CPU_microarchitectures ## https://en.wikipedia.org/wiki/List_of_AMD_CPU_microarchitectures ## https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html ## Intel Microarchitectures option(ENABLE_NEHALEM "Enable Intel Nehalem CPU microarchitecture" OFF) option(ENABLE_SANDYBRIDGE "Enable Intel Sandy Bridge CPU microarchitecture" OFF) option(ENABLE_HASWELL "Enable Intel Haswell CPU microarchitecture" OFF) option(ENABLE_BROADWELL "Enable Intel Broadwell CPU microarchitecture" OFF) option(ENABLE_SKYLAKE "Enable Intel Skylake CPU microarchitecture" OFF) option(ENABLE_SKYLAKE_AVX512 "Enable Intel Skylake Server CPU microarchitecture" OFF) ## AMD Microarchitectures option(ENABLE_ZEN1 "Enable AMD Zen+ Family 17h CPU microarchitecture" OFF) option(ENABLE_ZEN2 "Enable AMD Zen 2 Family 17h CPU microarchitecture" OFF) option(ENABLE_ZEN3 "Enable AMD Zen 3 Family 19h CPU microarchitecture" OFF) ## Intel Instructions option(ENABLE_SSE "Enable Intel SSE instructions" OFF) option(ENABLE_SSE2 "Enable Intel SSE2 instructions" OFF) option(ENABLE_SSE3 "Enable Intel SSE3 instructions" OFF) option(ENABLE_SSSE3 "Enable Intel SSSE3 instructions" OFF) option(ENABLE_SSE4.1 "Enable Intel SSE4.1 instructions" OFF) option(ENABLE_SSE4.2 "Enable Intel SSE4.2 instructions" OFF) option(ENABLE_AVX "Enable Intel AVX instructions" OFF) option(ENABLE_AVX2 "Enable Intel AVX2 instructions" OFF) option(ENABLE_AVX512F "Enable Intel AVX512F instructions" OFF) option(ENABLE_AVX512BW "Enable Intel AVX512BW instructions" OFF) option(ENABLE_AVX512CD "Enable Intel AVX512CD instructions" OFF) option(ENABLE_AVX512DQ "Enable Intel AVX512DQ instructions" OFF) option(ENABLE_AVX512ER "Enable Intel AVX512ER instructions" OFF) option(ENABLE_AVX512IFMA52 "Enable Intel AVX512IFMA52 instructions" OFF) option(ENABLE_AVX512PF "Enable Intel AVX512PF instructions" OFF) option(ENABLE_AVX512VL "Enable Intel AVX512VL instructions" OFF) option(ENABLE_AVX512VPOPCNTDQ "Enable Intel AVX512VPOPCNTDQ instructions" OFF) option(ENABLE_AVX5124FMAPS "Enable Intel AVX5124FMAPS instructions" OFF) option(ENABLE_AVX5124VNNIW "Enable Intel AVX5124VNNIW instructions" OFF) option(ENABLE_AVX512BF16 "Enable Intel AVX512BF16 instructions" OFF) option(ENABLE_AVX512BITALG "Enable Intel AVX512BITALG instructions" OFF) option(ENABLE_AVX512VBMI "Enable Intel AVX512VBMI instructions" OFF) option(ENABLE_AVX512VBMI2 "Enable Intel AVX512VBMI2 instructions" OFF) option(ENABLE_AVX512VNNI "Enable Intel AVX512VNNI instructions" OFF) option(ENABLE_AVX512VP2INTERSECT "Enable Intel AVX512VP2INTERSECT instructions" OFF) option(ENABLE_AVX512FP16 "Enable Intel AVX512FP16 instructions" OFF) option(ENABLE_AVXVNNI "Enable Intel AVXVNNI instructions" OFF) option(ENABLE_FMA "Enable Intel FMA instructions" OFF) option(ENABLE_F16C "Enable Intel F16C instructions" OFF) ## ARM architectures option(ENABLE_ARMV8A "Enable ARMv8-a architecture" OFF) option(ENABLE_ARMV8.1A "Enable ARMv8.1-a architecture" OFF) option(ENABLE_ARMV8.2A "Enable ARMv8.2-a architecture" OFF) option(ENABLE_ARMV8.3A "Enable ARMv8.3-a architecture" OFF) option(ENABLE_ARMV8.4A "Enable ARMv8.4-a architecture" OFF) option(ENABLE_ARMV8.5A "Enable ARMv8.5-a architecture" OFF) option(ENABLE_ARMV8.6A "Enable ARMv8.6-a architecture" OFF) ## OpenMP option option(ENABLE_OPENMP "Enable OpenMP support" OFF) function(_AppendFlags _RESULT _FLAG) if(${_RESULT} AND NOT "${${_RESULT}}" MATCHES "${_FLAG}") set(${_RESULT} "${${_RESULT}} ${_FLAG}" PARENT_SCOPE) else() set(${_RESULT} "${_FLAG}" PARENT_SCOPE) endif() endfunction() include(CheckCCompilerFlag) if(NOT MSVC) if(ENABLE_ARMV8.6A) CHECK_C_COMPILER_FLAG("-march=armv8.6-a" COMPILER_SUPPORT_ARMV8.6A) if(COMPILER_SUPPORT_ARMV8.6A) _AppendFlags(CMAKE_C_FLAGS -march=armv8.6-a) _AppendFlags(CMAKE_CXX_FLAGS -march=armv8.6-a) else() message(SEND_ERROR "Compiler cannot support flag \'-march=armv8.6-a\'.") endif() endif() if(ENABLE_ARMV8.5A) CHECK_C_COMPILER_FLAG("-march=armv8.5-a" COMPILER_SUPPORT_ARMV8.5A) if(COMPILER_SUPPORT_ARMV8.5A) _AppendFlags(CMAKE_C_FLAGS -march=armv8.5-a) _AppendFlags(CMAKE_CXX_FLAGS -march=armv8.5-a) else() message(SEND_ERROR "Compiler cannot support flag \'-march=armv8.5-a\'.") endif() endif() if(ENABLE_ARMV8.4A) CHECK_C_COMPILER_FLAG("-march=armv8.4-a" COMPILER_SUPPORT_ARMV8.4A) if(COMPILER_SUPPORT_ARMV8.4A) _AppendFlags(CMAKE_C_FLAGS -march=armv8.4-a) _AppendFlags(CMAKE_CXX_FLAGS -march=armv8.4-a) else() message(SEND_ERROR "Compiler cannot support flag \'-march=armv8.4-a\'.") endif() endif() if(ENABLE_ARMV8.3A) CHECK_C_COMPILER_FLAG("-march=armv8.3-a" COMPILER_SUPPORT_ARMV8.3A) if(COMPILER_SUPPORT_ARMV8.3A) _AppendFlags(CMAKE_C_FLAGS -march=armv8.3-a) _AppendFlags(CMAKE_CXX_FLAGS -march=armv8.3-a) else() message(SEND_ERROR "Compiler cannot support flag \'-march=armv8.3-a\'.") endif() endif() if(ENABLE_ARMV8.2A) CHECK_C_COMPILER_FLAG("-march=armv8.2-a" COMPILER_SUPPORT_ARMV8.2A) if(COMPILER_SUPPORT_ARMV8.2A) _AppendFlags(CMAKE_C_FLAGS -march=armv8.2-a) _AppendFlags(CMAKE_CXX_FLAGS -march=armv8.2-a) else() message(SEND_ERROR "Compiler cannot support flag \'-march=armv8.2-a\'.") endif() endif() if(ENABLE_ARMV8.1A) CHECK_C_COMPILER_FLAG("-march=armv8.1-a" COMPILER_SUPPORT_ARMV8.1A) if(COMPILER_SUPPORT_ARMV8.1A) _AppendFlags(CMAKE_C_FLAGS -march=armv8.1-a) _AppendFlags(CMAKE_CXX_FLAGS -march=armv8.1-a) else() message(SEND_ERROR "Compiler cannot support flag \'-march=armv8.1-a\'.") endif() endif() if(ENABLE_ARMV8A) CHECK_C_COMPILER_FLAG("-march=armv8-a" COMPILER_SUPPORT_ARMV8A) if(COMPILER_SUPPORT_ARMV8A) _AppendFlags(CMAKE_C_FLAGS -march=armv8-a) _AppendFlags(CMAKE_CXX_FLAGS -march=armv8-a) else() message(SEND_ERROR "Compiler cannot support flag \'-march=armv8-a\'.") endif() endif() if(ENABLE_ZEN1) CHECK_C_COMPILER_FLAG("-march=znver1" COMPILER_SUPPORT_ZEN1) if(COMPILER_SUPPORT_ZEN1) _AppendFlags(CMAKE_C_FLAGS -march=znver1) _AppendFlags(CMAKE_CXX_FLAGS -march=znver1) else() message(SEND_ERROR "Compiler cannot support flag \'-march=znver1\'.") endif() endif() if(ENABLE_ZEN2) CHECK_C_COMPILER_FLAG("-march=znver2" COMPILER_SUPPORT_ZEN2) if(COMPILER_SUPPORT_ZEN2) _AppendFlags(CMAKE_C_FLAGS -march=znver2) _AppendFlags(CMAKE_CXX_FLAGS -march=znver2) else() message(SEND_ERROR "Compiler cannot support flag \'-march=znver2\'.") endif() endif() if(ENABLE_ZEN3) CHECK_C_COMPILER_FLAG("-march=znver3" COMPILER_SUPPORT_ZEN3) if(COMPILER_SUPPORT_ZEN3) _AppendFlags(CMAKE_C_FLAGS -march=znver3) _AppendFlags(CMAKE_CXX_FLAGS -march=znver3) else() message(SEND_ERROR "Compiler cannot support flag \'-march=znver3\'.") endif() endif() if(ENABLE_NEHALEM) CHECK_C_COMPILER_FLAG("-march=nehalem" COMPILER_SUPPORT_NEHALEM) if(COMPILER_SUPPORT_NEHALEM) _AppendFlags(CMAKE_C_FLAGS -march=nehalem) _AppendFlags(CMAKE_CXX_FLAGS -march=nehalem) else() message(SEND_ERROR "Compiler cannot support flag \'-march=nehalem\'.") endif() endif() if(ENABLE_SANDYBRIDGE) CHECK_C_COMPILER_FLAG("-march=sandybridge" COMPILER_SUPPORT_SANDYBRIDGE) if(COMPILER_SUPPORT_SANDYBRIDGE) _AppendFlags(CMAKE_C_FLAGS -march=sandybridge) _AppendFlags(CMAKE_CXX_FLAGS -march=sandybridge) else() message(SEND_ERROR "Compiler cannot support flag \'-march=sandybridge\'.") endif() endif() if(ENABLE_HASWELL) CHECK_C_COMPILER_FLAG("-march=haswell" COMPILER_SUPPORT_HASWELL) if(COMPILER_SUPPORT_HASWELL) _AppendFlags(CMAKE_C_FLAGS -march=haswell) _AppendFlags(CMAKE_CXX_FLAGS -march=haswell) else() message(SEND_ERROR "Compiler cannot support flag \'-march=haswell\'.") endif() endif() if(ENABLE_BROADWELL) CHECK_C_COMPILER_FLAG("-march=broadwell" COMPILER_SUPPORT_BROADWELL) if(COMPILER_SUPPORT_BROADWELL) _AppendFlags(CMAKE_C_FLAGS -march=broadwell) _AppendFlags(CMAKE_CXX_FLAGS -march=broadwell) else() message(SEND_ERROR "Compiler cannot support flag \'-march=broadwell\'.") endif() endif() if(ENABLE_SKYLAKE) CHECK_C_COMPILER_FLAG("-march=skylake" COMPILER_SUPPORT_SKYLAKE) if(COMPILER_SUPPORT_SKYLAKE) _AppendFlags(CMAKE_C_FLAGS -march=skylake) _AppendFlags(CMAKE_CXX_FLAGS -march=skylake) else() message(SEND_ERROR "Compiler cannot support flag \'-march=skylake\'.") endif() endif() if(ENABLE_SKYLAKE_AVX512) CHECK_C_COMPILER_FLAG("-march=skylake-avx512" COMPILER_SUPPORT_SKYLAKE_AVX512) if(COMPILER_SUPPORT_SKYLAKE_AVX512) _AppendFlags(CMAKE_C_FLAGS -march=skylake-avx512) _AppendFlags(CMAKE_CXX_FLAGS -march=skylake-avx512) else() message(SEND_ERROR "Compiler cannot support flag \'-march=skylake-avx512\'.") endif() endif() if(ENABLE_AVX512BW) CHECK_C_COMPILER_FLAG("-mavx512bw" COMPILER_SUPPORT_AVX512BW) if(COMPILER_SUPPORT_AVX512BW) _AppendFlags(CMAKE_C_FLAGS -mavx512bw) _AppendFlags(CMAKE_CXX_FLAGS -mavx512bw) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512bw\'.") endif() endif() if(ENABLE_AVX512CD) CHECK_C_COMPILER_FLAG("-mavx512cd" COMPILER_SUPPORT_AVX512CD) if(COMPILER_SUPPORT_AVX512CD) _AppendFlags(CMAKE_C_FLAGS -mavx512cd) _AppendFlags(CMAKE_CXX_FLAGS -mavx512cd) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512cd\'.") endif() endif() if(ENABLE_AVX512DQ) CHECK_C_COMPILER_FLAG("-mavx512dq" COMPILER_SUPPORT_AVX512DQ) if(COMPILER_SUPPORT_AVX512DQ) _AppendFlags(CMAKE_C_FLAGS -mavx512dq) _AppendFlags(CMAKE_CXX_FLAGS -mavx512dq) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512dq\'.") endif() endif() if(ENABLE_AVX512ER) CHECK_C_COMPILER_FLAG("-mavx512er" COMPILER_SUPPORT_AVX512ER) if(COMPILER_SUPPORT_AVX512ER) _AppendFlags(CMAKE_C_FLAGS -mavx512er) _AppendFlags(CMAKE_CXX_FLAGS -mavx512er) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512er\'.") endif() endif() if(ENABLE_AVX512IFMA52) CHECK_C_COMPILER_FLAG("-mavx512ifma52" COMPILER_SUPPORT_AVX512IFMA52) if(COMPILER_SUPPORT_AVX512IFMA52) _AppendFlags(CMAKE_C_FLAGS -mavx512ifma52) _AppendFlags(CMAKE_CXX_FLAGS -mavx512ifma52) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512ifma52\'.") endif() endif() if(ENABLE_AVX512PF) CHECK_C_COMPILER_FLAG("-mavx512pf" COMPILER_SUPPORT_AVX512PF) if(COMPILER_SUPPORT_AVX512PF) _AppendFlags(CMAKE_C_FLAGS -mavx512pf) _AppendFlags(CMAKE_CXX_FLAGS -mavx512pf) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512pf\'.") endif() endif() if(ENABLE_AVX512VL) CHECK_C_COMPILER_FLAG("-mavx512vl" COMPILER_SUPPORT_AVX512VL) if(COMPILER_SUPPORT_AVX512VL) _AppendFlags(CMAKE_C_FLAGS -mavx512vl) _AppendFlags(CMAKE_CXX_FLAGS -mavx512vl) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512vl\'.") endif() endif() if(ENABLE_AVX512VPOPCNTDQ) CHECK_C_COMPILER_FLAG("-mavx512vpopcntdq" COMPILER_SUPPORT_AVX512VPOPCNTDQ) if(COMPILER_SUPPORT_AVX512VPOPCNTDQ) _AppendFlags(CMAKE_C_FLAGS -mavx512vpopcntdq) _AppendFlags(CMAKE_CXX_FLAGS -mavx512vpopcntdq) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512vpopcntdq\'.") endif() endif() if(ENABLE_AVX5124FMAPS) CHECK_C_COMPILER_FLAG("-mavx5124fmaps" COMPILER_SUPPORT_AVX5124FMAPS) if(COMPILER_SUPPORT_AVX5124FMAPS) _AppendFlags(CMAKE_C_FLAGS -mavx5124fmaps) _AppendFlags(CMAKE_CXX_FLAGS -mavx5124fmaps) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx5124fmaps\'.") endif() endif() if(ENABLE_AVX5124VNNIW) CHECK_C_COMPILER_FLAG("-mavx5124vnniw" COMPILER_SUPPORT_AVX5124VNNIW) if(COMPILER_SUPPORT_AVX5124VNNIW) _AppendFlags(CMAKE_C_FLAGS -mavx5124vnniw) _AppendFlags(CMAKE_CXX_FLAGS -mavx5124vnniw) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx5124vnniw\'.") endif() endif() if(ENABLE_AVX512BF16) CHECK_C_COMPILER_FLAG("-mavx512bf16" COMPILER_SUPPORT_AVX512BF16) if(COMPILER_SUPPORT_AVX512BF16) _AppendFlags(CMAKE_C_FLAGS -mavx512bf16) _AppendFlags(CMAKE_CXX_FLAGS -mavx512bf16) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512bf16\'.") endif() endif() if(ENABLE_AVX512BITALG) CHECK_C_COMPILER_FLAG("-mavx512bitalg" COMPILER_SUPPORT_AVX512BITALG) if(COMPILER_SUPPORT_AVX512BITALG) _AppendFlags(CMAKE_C_FLAGS -mavx512bitalg) _AppendFlags(CMAKE_CXX_FLAGS -mavx512bitalg) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512bitalg\'.") endif() endif() if(ENABLE_AVX512VBMI) CHECK_C_COMPILER_FLAG("-mavx512vbmi" COMPILER_SUPPORT_AVX512VBMI) if(COMPILER_SUPPORT_AVX512VBMI) _AppendFlags(CMAKE_C_FLAGS -mavx512vbmi) _AppendFlags(CMAKE_CXX_FLAGS -mavx512vbmi) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512vbmi\'.") endif() endif() if(ENABLE_AVX512VBMI2) CHECK_C_COMPILER_FLAG("-mavx512vbmi2" COMPILER_SUPPORT_AVX512VBMI2) if(COMPILER_SUPPORT_AVX512VBMI2) _AppendFlags(CMAKE_C_FLAGS -mavx512vbmi2) _AppendFlags(CMAKE_CXX_FLAGS -mavx512vbmi2) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512vbmi2\'.") endif() endif() if(ENABLE_AVX512VNNI) CHECK_C_COMPILER_FLAG("-mavx512vnni" COMPILER_SUPPORT_AVX512VNNI) if(COMPILER_SUPPORT_AVX512VNNI) _AppendFlags(CMAKE_C_FLAGS -mavx512vnni) _AppendFlags(CMAKE_CXX_FLAGS -mavx512vnni) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512vnni\'.") endif() endif() if(ENABLE_AVX512VP2INTERSECT) CHECK_C_COMPILER_FLAG("-mavx512vp2intersect" COMPILER_SUPPORT_AVX512VP2INTERSECT) if(COMPILER_SUPPORT_AVX512VP2INTERSECT) _AppendFlags(CMAKE_C_FLAGS -mavx512vp2intersect) _AppendFlags(CMAKE_CXX_FLAGS -mavx512vp2intersect) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512vp2intersect\'.") endif() endif() if(ENABLE_AVX512FP16) CHECK_C_COMPILER_FLAG("-mavx512fp16" COMPILER_SUPPORT_AVX512FP16) if(COMPILER_SUPPORT_AVX512FP16) _AppendFlags(CMAKE_C_FLAGS -mavx512fp16) _AppendFlags(CMAKE_CXX_FLAGS -mavx512fp16) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512fp16\'.") endif() endif() if(ENABLE_AVXVNNI) CHECK_C_COMPILER_FLAG("-mavxvnni" COMPILER_SUPPORT_AVXVNNI) if(COMPILER_SUPPORT_AVXVNNI) _AppendFlags(CMAKE_C_FLAGS -mavxvnni) _AppendFlags(CMAKE_CXX_FLAGS -mavxvnni) else() message(SEND_ERROR "Compiler cannot support flag \'-mavxvnni\'.") endif() endif() if(ENABLE_AVX512F) CHECK_C_COMPILER_FLAG("-mavx512f" COMPILER_SUPPORT_AVX512F) if(COMPILER_SUPPORT_AVX512F) _AppendFlags(CMAKE_C_FLAGS -mavx512f) _AppendFlags(CMAKE_CXX_FLAGS -mavx512f) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx512f\'.") endif() elseif(ENABLE_AVX2) CHECK_C_COMPILER_FLAG("-mavx2" COMPILER_SUPPORT_AVX2) if(COMPILER_SUPPORT_AVX2) _AppendFlags(CMAKE_C_FLAGS -mavx2) _AppendFlags(CMAKE_CXX_FLAGS -mavx2) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx2\'.") endif() elseif(ENABLE_AVX) CHECK_C_COMPILER_FLAG("-mavx" COMPILER_SUPPORT_AVX) if(COMPILER_SUPPORT_AVX) _AppendFlags(CMAKE_C_FLAGS -mavx) _AppendFlags(CMAKE_CXX_FLAGS -mavx) else() message(SEND_ERROR "Compiler cannot support flag \'-mavx\'.") endif() elseif(ENABLE_SSE4.2) CHECK_C_COMPILER_FLAG("-msse4.2" COMPILER_SUPPORT_SSE4.2) if(COMPILER_SUPPORT_SSE4.2) _AppendFlags(CMAKE_C_FLAGS -msse4.2) _AppendFlags(CMAKE_CXX_FLAGS -msse4.2) else() message(SEND_ERROR "Compiler cannot support flag \'-msse4.2\'.") endif() elseif(ENABLE_SSE4.1) CHECK_C_COMPILER_FLAG("-msse4.1" COMPILER_SUPPORT_SSE4.1) if(COMPILER_SUPPORT_SSE4.1) _AppendFlags(CMAKE_C_FLAGS -msse4.1) _AppendFlags(CMAKE_CXX_FLAGS -msse4.1) else() message(SEND_ERROR "Compiler cannot support flag \'-msse4.1\'.") endif() elseif(ENABLE_SSSE3) CHECK_C_COMPILER_FLAG("-mssse3" COMPILER_SUPPORT_SSSE3) if(COMPILER_SUPPORT_SSSE3) _AppendFlags(CMAKE_C_FLAGS -mssse3) _AppendFlags(CMAKE_CXX_FLAGS -mssse3) else() message(SEND_ERROR "Compiler cannot support flag \'-mssse3\'.") endif() elseif(ENABLE_SSE3) CHECK_C_COMPILER_FLAG("-msse3" COMPILER_SUPPORT_SSE3) if(COMPILER_SUPPORT_SSE3) _AppendFlags(CMAKE_C_FLAGS -msse3) _AppendFlags(CMAKE_CXX_FLAGS -msse3) else() message(SEND_ERROR "Compiler cannot support flag \'-msse3\'.") endif() elseif(ENABLE_SSE2) CHECK_C_COMPILER_FLAG("-msse2" COMPILER_SUPPORT_SSE2) if(COMPILER_SUPPORT_SSE2) _AppendFlags(CMAKE_C_FLAGS -msse2) _AppendFlags(CMAKE_CXX_FLAGS -msse2) else() message(SEND_ERROR "Compiler cannot support flag \'-msse2\'.") endif() elseif(ENABLE_SSE) CHECK_C_COMPILER_FLAG("-msse" COMPILER_SUPPORT_SSE) if(COMPILER_SUPPORT_SSE) _AppendFlags(CMAKE_C_FLAGS -msse) _AppendFlags(CMAKE_CXX_FLAGS -msse) else() message(SEND_ERROR "Compiler cannot support flag \'-msse\'.") endif() endif() if(ENABLE_FMA) CHECK_C_COMPILER_FLAG("-mfma" COMPILER_SUPPORT_FMA) if(COMPILER_SUPPORT_FMA) _AppendFlags(CMAKE_C_FLAGS -mfma) _AppendFlags(CMAKE_CXX_FLAGS -mfma) else() message(SEND_ERROR "Compiler cannot support flag \'-mfma\'.") endif() endif() if(ENABLE_F16C) CHECK_C_COMPILER_FLAG("-mf16c" COMPILER_SUPPORT_F16C) if(COMPILER_SUPPORT_F16C) _AppendFlags(CMAKE_C_FLAGS -mf16c) _AppendFlags(CMAKE_CXX_FLAGS -mf16c) else() message(SEND_ERROR "Compiler cannot support flag \'-mf16c\'.") endif() endif() else() if(ENABLE_AVX512F OR ENABLE_AVX512CD OR ENABLE_AVX512BW OR ENABLE_AVX512DQ OR ENABLE_AVX512VL) CHECK_C_COMPILER_FLAG("/arch:AVX512" COMPILER_SUPPORT_AVX512F) if(COMPILER_SUPPORT_AVX512F) _AppendFlags(CMAKE_C_FLAGS /arch:AVX512) _AppendFlags(CMAKE_CXX_FLAGS /arch:AVX512) else() message(SEND_ERROR "Compiler cannot support flag \'/arch:AVX512\'.") endif() elseif(ENABLE_AVX2) CHECK_C_COMPILER_FLAG("/arch:AVX2" COMPILER_SUPPORT_AVX2) if(COMPILER_SUPPORT_AVX2) _AppendFlags(CMAKE_C_FLAGS /arch:AVX2) _AppendFlags(CMAKE_CXX_FLAGS /arch:AVX2) else() message(SEND_ERROR "Compiler cannot support flag \'/arch:AVX2\'.") endif() elseif(ENABLE_AVX) CHECK_C_COMPILER_FLAG("/arch:AVX" COMPILER_SUPPORT_AVX) if(COMPILER_SUPPORT_AVX) _AppendFlags(CMAKE_C_FLAGS /arch:AVX) _AppendFlags(CMAKE_CXX_FLAGS /arch:AVX) else() message(SEND_ERROR "Compiler cannot support flag \'/arch:AVX\'.") endif() elseif(ENABLE_SSE4.2 OR ENABLE_SSE4.1 OR ENABLE_SSE3 OR ENABLE_SSSE3 OR ENABLE_SSE2) CHECK_C_COMPILER_FLAG("/arch:SSE2" COMPILER_SUPPORT_SSE2) if(COMPILER_SUPPORT_SSE2) _AppendFlags(CMAKE_C_FLAGS /arch:SSE2) _AppendFlags(CMAKE_CXX_FLAGS /arch:SSE2) endif() elseif(ENABLE_SSE) CHECK_C_COMPILER_FLAG("/arch:SSE" COMPILER_SUPPORT_SSE) if(COMPILER_SUPPORT_SSE) _AppendFlags(CMAKE_C_FLAGS /arch:SSE) _AppendFlags(CMAKE_CXX_FLAGS /arch:SSE) endif() endif() endif() # OpenMP support if(ENABLE_OPENMP) find_package(OpenMP REQUIRED) if(OPENMP_FOUND) _AppendFlags(CMAKE_C_FLAGS ${OpenMP_C_FLAGS}) _AppendFlags(CMAKE_CXX_FLAGS ${OpenMP_CXX_FLAGS}) endif() endif() ================================================ FILE: deps/proxima/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author daibing.db ## \date Aug 2021 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) set(ARCH "nehalem") if(ENABLE_SKYLAKE_AVX512) set(ARCH "skylake_avx512") elseif(ENABLE_SKYLAKE) set(ARCH "skylake") elseif(ENABLE_BROADWELL) set(ARCH "broadwell") elseif(ENABLE_HASWELL) set(ARCH "haswell") elseif(ENABLE_SANDYBRIDGE) set(ARCH "sandybridge") elseif(ENABLE_ZEN2) set(ARCH "znver2") elseif(ENABLE_ZEN1) set(ARCH "znver1") endif() set(PROXIMA_LIB "${CMAKE_CURRENT_SOURCE_DIR}/lib/${CMAKE_SYSTEM_NAME}.${CMAKE_SYSTEM_PROCESSOR}.${ARCH}/") if(NOT EXISTS ${PROXIMA_LIB}) message(FATAL_ERROR "Not supported for ${CMAKE_SYSTEM_NAME}.${CMAKE_SYSTEM_PROCESSOR}.${ARCH}") endif() set_property(GLOBAL PROPERTY proxima_lib_property "${PROXIMA_LIB}") cc_import( NAME proxima SHARED PATH ${PROXIMA_LIB}/libproxima.so PUBINCS include/ ) install(DIRECTORY ${PROXIMA_LIB} DESTINATION ${CMAKE_INSTALL_LIBDIR}) ================================================ FILE: deps/proxima/include/ailego/algorithm/rate_limiter.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author hongqing.hu * \date Nov 2020 * \brief Interface of Rate Limiter algorithm */ #ifndef __AILEGO_ALGORITHM_RATE_LIMITER_H__ #define __AILEGO_ALGORITHM_RATE_LIMITER_H__ #include #include #include namespace ailego { /*! RateLimiter abstract class */ struct RateLimiter { //! Rate Limiter Shared Pointer using Pointer = std::shared_ptr; //! RateLimiter Types enum LimiterTypes { LIMITER_BURSTY = 0, }; //! Destructor virtual ~RateLimiter(void) {} //! Acquire batch permits virtual double acquire(int permits) = 0; //! Acquire one permit virtual double acquire(void) = 0; //! Try acquire some permits within timeout ms virtual bool try_acquire(int permits, int timeout_ms) = 0; //! Try acquire one permit, return at once virtual bool try_acquire(void) = 0; //! Set permits per second virtual void set_rate(double permits_per_second) = 0; //! Get permits per second virtual double get_rate(void) const = 0; //! Create a rate limiter with type static Pointer Create(double permits_per_second, LimiterTypes type); //! Create a default rate limiter static Pointer Create(double permits_per_second) { return RateLimiter::Create(permits_per_second, LIMITER_BURSTY); } }; /*! Bursty Rate Limiter */ class BurstyRateLimiter : public RateLimiter { public: //! Constructor explicit BurstyRateLimiter(double max_bursty_seconds) : max_bursty_seconds_(max_bursty_seconds) {} //! Destructor virtual ~BurstyRateLimiter(void) {} //! Acquire batch permits double acquire(int permits) override; //! Try acquire some permits with timeout bool try_acquire(int permits, int timeout_ms) override; //! Set permits per second void set_rate(double permits_per_second) override; //! Get permits per second double get_rate(void) const override { return MICROSECONDS_PER_SECOND / interval_; } //! Acquire one permit double acquire(void) override { return this->acquire(1); } //! Try acquire one permit, return at once bool try_acquire(void) override { return this->try_acquire(1, 0); } protected: //! Resync the information void update_stored_permits(int64_t now_usec); //! Compute the wait time int64_t compute_wait_usec(int required_permits, int64_t now_usec); private: //! Disable them BurstyRateLimiter(const BurstyRateLimiter &) = delete; BurstyRateLimiter(BurstyRateLimiter &&) = delete; BurstyRateLimiter &operator=(const BurstyRateLimiter &) = delete; //! Members double max_bursty_seconds_{0.0}; double max_permits_{0.0}; double stored_permits_{0.0}; double interval_{0.0}; double permits_per_usec_{0.0}; double next_free_time_{0.0}; std::mutex mutex_{}; constexpr static double MICROSECONDS_PER_SECOND = 1000000.0; }; } // namespace ailego #endif // __AILEGO_ALGORITHM_RATE_LIMITER_H__ ================================================ FILE: deps/proxima/include/ailego/container/bitmap.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2017 * \brief Interface of AiLego Utility Bitmap */ #ifndef __AILEGO_CONTAINER_BITMAP_H__ #define __AILEGO_CONTAINER_BITMAP_H__ #include #include #include namespace ailego { /*! Fixed Bitset */ template ::type> class FixedBitset { public: enum { MAX_SIZE = N }; //! Constructor FixedBitset(void) { memset(array_, 0, sizeof(array_)); } //! Constructor FixedBitset(const FixedBitset &rhs) { memcpy(array_, rhs.array_, sizeof(array_)); } //! Destructor ~FixedBitset(void) {} //! Assignment FixedBitset &operator=(const FixedBitset &rhs) { memcpy(array_, rhs.array_, sizeof(array_)); return *this; } //! Retrieve data pointer uint32_t *data(void) { return reinterpret_cast(array_); } //! Retrieve data pointer const uint32_t *data(void) const { return reinterpret_cast(array_); } //! Retrieve count of bits in set constexpr size_t size(void) const { return MAX_SIZE; } //!Clear the bitset void clear(void) { memset(array_, 0, sizeof(array_)); } //! Test a bit in bitset bool test(size_t num) const { ailego_assert_with(N > num, "overflow argument"); return ((array_[num >> 5] & (1u << (num & 0x1f))) != 0); } //! Set a bit in bitset void set(size_t num) { ailego_assert_with(N > num, "overflow argument"); uint32_t mask = (1u << (num & 0x1f)); array_[num >> 5] |= mask; } //! Clear a bit in bitset void reset(size_t num) { ailego_assert_with(N > num, "overflow argument"); uint32_t mask = (1u << (num & 0x1f)); array_[num >> 5] &= ~mask; } //! Toggle a bit in bitset void flip(size_t num) { ailego_assert_with(N > num, "overflow argument"); uint32_t mask = (1u << (num & 0x1f)); array_[num >> 5] ^= mask; } //! Perform binary AND void bitwise_and(const FixedBitset &rhs) { BitsetHelper::BitwiseAnd(array_, rhs.array_, ((N + 0x1f) >> 5)); } //! Perform binary AND NOT void bitwise_andnot(const FixedBitset &rhs) { BitsetHelper::BitwiseAndnot(array_, rhs.array_, ((N + 0x1f) >> 5)); } //! Perform binary OR void bitwise_or(const FixedBitset &rhs) { BitsetHelper::BitwiseOr(array_, rhs.array_, ((N + 0x1f) >> 5)); } //! Perform binary XOR void bitwise_xor(const FixedBitset &rhs) { BitsetHelper::BitwiseXor(array_, rhs.array_, ((N + 0x1f) >> 5)); } //! Perform binary NOT void bitwise_not(void) { BitsetHelper::BitwiseNot(array_, ((N + 0x1f) >> 5)); } //! Check if all bits are set to true bool test_all(void) const { return BitsetHelper::TestAll(array_, ((N + 0x1f) >> 5)); } //! Check if any bits are set to true bool test_any(void) const { return BitsetHelper::TestAny(array_, ((N + 0x1f) >> 5)); } //! Check if none of the bits are set to true bool test_none(void) const { return BitsetHelper::TestNone(array_, ((N + 0x1f) >> 5)); } //! Compute the cardinality of a bitset size_t cardinality(void) const { return BitsetHelper::Cardinality(array_, ((N + 0x1f) >> 5)); } //! Extract the bitset to an array void extract(size_t base, std::vector *out) const { const uint32_t *iter = array_; const uint32_t *last = array_ + ((N + 0x1f) >> 5); for (; iter != last; ++iter) { uint32_t w = *iter; while (w != 0) { uint32_t c = ailego_ctz32(w); w &= ~(1u << c); out->push_back(base + c); } base += 32u; } } //! Extract the bitset to an array void extract(std::vector *out) const { this->extract(0, out); } //! Compute the AND cardinality between two bitsets static size_t BitwiseAndCardinality(const FixedBitset &lhs, const FixedBitset &rhs) { return BitsetHelper::BitwiseAndCardinality(lhs.array_, rhs.array_, ((N + 0x1f) >> 5)); } //! Compute the ANDNOT cardinality between two bitsets static size_t BitwiseAndnotCardinality(const FixedBitset &lhs, const FixedBitset &rhs) { return BitsetHelper::BitwiseAndnotCardinality(lhs.array_, rhs.array_, ((N + 0x1f) >> 5)); } //! Compute the XOR cardinality between two bitsets static size_t BitwiseXorCardinality(const FixedBitset &lhs, const FixedBitset &rhs) { return BitsetHelper::BitwiseXorCardinality(lhs.array_, rhs.array_, ((N + 0x1f) >> 5)); } //! Compute the OR cardinality between two bitsets static size_t BitwiseOrCardinality(const FixedBitset &lhs, const FixedBitset &rhs) { return BitsetHelper::BitwiseOrCardinality(lhs.array_, rhs.array_, ((N + 0x1f) >> 5)); } //! Convert a array pointer to bitset pointer static FixedBitset *Cast(uint32_t *arr) { return reinterpret_cast *>(arr); } //! Convert a array pointer to bitset pointer static const FixedBitset *Cast(const uint32_t *arr) { return reinterpret_cast *>(arr); } //! Convert a array pointer to bitset pointer static FixedBitset *Cast(uint64_t *arr) { return reinterpret_cast *>(arr); } //! Convert a array pointer to bitset pointer static const FixedBitset *Cast(const uint64_t *arr) { return reinterpret_cast *>(arr); } private: uint32_t array_[(N + 0x1f) >> 5]; }; /*! Fixed Bitset (Special) */ template <> class FixedBitset<0> { public: enum { MAX_SIZE = 0 }; //! Retrieve max size of bitset constexpr size_t size(void) const { return MAX_SIZE; } }; /*! Bitset */ class Bitset { public: //! Constructor Bitset(void) : array_() {} //! Constructor Bitset(size_t bits) : array_((bits + 0x1f) >> 5) {} //! Constructor Bitset(const Bitset &rhs) : array_(rhs.array_) {} //! Constructor Bitset(Bitset &&rhs) : array_(std::move(rhs.array_)) {} //! Destructor ~Bitset(void) {} //! Assignment Bitset &operator=(const Bitset &rhs) { array_ = rhs.array_; return *this; } //! Assignment Bitset &operator=(Bitset &&rhs) { array_ = std::move(rhs.array_); return *this; } //! Retrieve data pointer uint32_t *data(void) { return array_.data(); } //! Retrieve data pointer const uint32_t *data(void) const { return array_.data(); } //! Retrieve count of bits in set size_t size(void) const { return (array_.size() << 5); } //! Resize the bitset void resize(size_t bits) { array_.resize((bits + 0x1f) >> 5); } //!Clear the bitset void clear(void) { array_.clear(); } //! Test a bit in bitset bool test(size_t num) const { ailego_assert_with(this->size() > num, "overflow argument"); return ((array_[num >> 5] & (1u << (num & 0x1f))) != 0); } //! Set a bit in bitset void set(size_t num) { ailego_assert_with(this->size() > num, "overflow argument"); uint32_t mask = (1u << (num & 0x1f)); array_[num >> 5] |= mask; } //! Clear a bit in bitset void reset(size_t num) { ailego_assert_with(this->size() > num, "overflow argument"); uint32_t mask = (1u << (num & 0x1f)); array_[num >> 5] &= ~mask; } //! Toggle a bit in bitset void flip(size_t num) { ailego_assert_with(this->size() > num, "overflow argument"); uint32_t mask = (1u << (num & 0x1f)); array_[num >> 5] ^= mask; } //! Perform binary AND void bitwise_and(const Bitset &rhs) { BitsetHelper::BitwiseAnd(array_.data(), rhs.array_.data(), std::min(array_.size(), rhs.array_.size())); } //! Perform binary AND NOT void bitwise_andnot(const Bitset &rhs) { BitsetHelper::BitwiseAndnot(array_.data(), rhs.array_.data(), std::min(array_.size(), rhs.array_.size())); } //! Perform binary OR void bitwise_or(const Bitset &rhs) { BitsetHelper::BitwiseOr(array_.data(), rhs.array_.data(), std::min(array_.size(), rhs.array_.size())); } //! Perform binary XOR void bitwise_xor(const Bitset &rhs) { BitsetHelper::BitwiseXor(array_.data(), rhs.array_.data(), std::min(array_.size(), rhs.array_.size())); } //! Perform binary NOT void bitwise_not(void) { BitsetHelper::BitwiseNot(array_.data(), array_.size()); } //! Check if all bits are set to true bool test_all(void) const { return BitsetHelper::TestAll(array_.data(), array_.size()); } //! Check if any bits are set to true bool test_any(void) const { return BitsetHelper::TestAny(array_.data(), array_.size()); } //! Check if none of the bits are set to true bool test_none(void) const { return BitsetHelper::TestNone(array_.data(), array_.size()); } //! Compute the cardinality of a bitset size_t cardinality(void) const { return BitsetHelper::Cardinality(array_.data(), array_.size()); } //! Extract the bitset to an array void extract(size_t base, std::vector *out) const { const uint32_t *iter = array_.data(); const uint32_t *last = array_.data() + array_.size(); for (; iter != last; ++iter) { uint32_t w = *iter; while (w != 0) { uint32_t c = ailego_ctz32(w); w &= ~(1u << c); out->push_back(base + c); } base += 32u; } } //! Extract the bitset to an array void extract(std::vector *out) const { this->extract(0, out); } //! Compute the AND cardinality between two bitsets static size_t BitwiseAndCardinality(const Bitset &lhs, const Bitset &rhs); //! Compute the ANDNOT cardinality between two bitsets static size_t BitwiseAndnotCardinality(const Bitset &lhs, const Bitset &rhs); //! Compute the XOR cardinality between two bitsets static size_t BitwiseXorCardinality(const Bitset &lhs, const Bitset &rhs); //! Compute the OR cardinality between two bitsets static size_t BitwiseOrCardinality(const Bitset &lhs, const Bitset &rhs); private: std::vector array_; }; /*! Bitmap */ class Bitmap { public: typedef FixedBitset<65536u> Bucket; //! Constructor Bitmap(void) : array_() {} //! Constructor Bitmap(const Bitmap &rhs) { this->copy(rhs); } //! Destructor ~Bitmap(void) { this->clear(); } //! Assignment Bitmap &operator=(const Bitmap &rhs) { this->copy(rhs); return *this; } //! Retrieve bucket size of bitmap size_t bucket_size(void) const { return array_.size(); } //!Clear the bitmap void clear(void); //! Remove the none buckets void shrink_to_fit(void); //! Test a bit in bitmap bool test(size_t num) const; //! Set a bit in bitmap void set(size_t num); //! Reset a bit in bitmap void reset(size_t num); //! Toggle a bit in bitmap void flip(size_t num); //! Perform binary AND void bitwise_and(const Bitmap &rhs); //! Perform binary AND NOT void bitwise_andnot(const Bitmap &rhs); //! Perform binary OR void bitwise_or(const Bitmap &rhs); //! Perform binary XOR void bitwise_xor(const Bitmap &rhs); //! Perform binary NOT (It will expand the whole map) void bitwise_not(void); //! Check if all bits are set to true bool test_all(void) const; //! Check if any bits are set to true bool test_any(void) const; //! Check if none of the bits are set to true bool test_none(void) const; //! Compute the cardinality of a bitmap size_t cardinality(void) const; //! Extract the bitmap to an array void extract(size_t base, std::vector *out) const; //! Extract the bitmap to an array void extract(std::vector *out) const { this->extract(0, out); } //! Compute the AND cardinality between two bitmaps static size_t BitwiseAndCardinality(const Bitmap &lhs, const Bitmap &rhs); //! Compute the ANDNOT cardinality between two bitmaps static size_t BitwiseAndnotCardinality(const Bitmap &lhs, const Bitmap &rhs); //! Compute the XOR cardinality between two bitmaps static size_t BitwiseXorCardinality(const Bitmap &lhs, const Bitmap &rhs); //! Compute the OR cardinality between two bitmaps static size_t BitwiseOrCardinality(const Bitmap &lhs, const Bitmap &rhs); protected: //! Copy the content from another bitmap void copy(const Bitmap &rhs); private: std::vector array_; }; } // namespace ailego #endif // __AILEGO_CONTAINER_BITMAP_H__ ================================================ FILE: deps/proxima/include/ailego/container/cube.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Mar 2018 * \brief Interface of AiLego Utility Cube */ #ifndef __AILEGO_CONTAINER_CUBE_H__ #define __AILEGO_CONTAINER_CUBE_H__ #include #include #include #include namespace ailego { namespace internal { /*! Cube Policy */ struct CubePolicy { //! Destructor virtual ~CubePolicy(void) {} //! Assign `src` to `dst` virtual void assign(const void *src, void **dst) = 0; //! Cleanup value virtual void cleanup(void **val) = 0; //! Clone value of `src` to `dst` virtual void clone(void *const *src, void **dst) = 0; //! Move `src` to `dst` virtual void move(void *src, void **dst) = 0; //! Retrieve size virtual size_t size(void) const = 0; //! Retrieve type information virtual const std::type_info &type(void) const = 0; //! Retrieve value virtual void *value(void **src) = 0; //! Retrieve value virtual const void *value(void *const *src) const = 0; }; /*! Small Cube Policy */ template struct SmallCubePolicy : public CubePolicy { //! Assign `src` to `dst` void assign(const void *src, void **dst) { new (dst) T(*reinterpret_cast(src)); } //! Cleanup value void cleanup(void **val) { reinterpret_cast(val)->~T(); } //! Clone value of `src` to `dst` void clone(void *const *src, void **dst) { new (dst) T(*reinterpret_cast(src)); } //! Move `src` to `dst` void move(void *src, void **dst) { new (dst) T(std::move(*reinterpret_cast(src))); } //! Retrieve size size_t size(void) const { return sizeof(T); } //! Retrieve type information const std::type_info &type(void) const { return typeid(T); } //! Retrieve value void *value(void **src) { return reinterpret_cast(src); } //! Retrieve value const void *value(void *const *src) const { return reinterpret_cast(src); } }; /*! Large Cube Policy */ template struct LargeCubePolicy : public CubePolicy { //! Assign `src` to `dst` void assign(const void *src, void **dst) { *dst = new T(*reinterpret_cast(src)); } //! Cleanup value void cleanup(void **val) { delete (reinterpret_cast(*val)); } //! Clone value of `src` to `dst` void clone(void *const *src, void **dst) { *dst = new T(**reinterpret_cast(src)); } //! Move `src` to `dst` void move(void *src, void **dst) { *dst = new T(std::move(*reinterpret_cast(src))); } //! Retrieve size size_t size(void) const { return sizeof(T); } //! Retrieve type information const std::type_info &type(void) const { return typeid(T); } //! Retrieve value void *value(void **src) { return *src; } //! Retrieve value const void *value(void *const *src) const { return *src; } }; /*! Policy Selector */ template struct PolicySelector { typedef LargeCubePolicy Type; }; /*! Policy Selector */ template struct PolicySelector< T, typename std::enable_if::type> { typedef SmallCubePolicy Type; }; } // namespace internal /*! Cube class */ class Cube { public: //! Constructor Cube(void) : policy_(Cube::Policy()), object_(nullptr) {} //! Constructor template Cube(const T &rhs) : policy_(Cube::Policy()), object_(nullptr) { policy_->assign(&rhs, &object_); } //! Constructor template ::value && !std::is_same::value>::type> Cube(T &&rhs) : policy_(Cube::Policy()), object_(nullptr) { policy_->move(&rhs, &object_); } //! Constructor Cube(const char *str) : policy_(Cube::Policy()), object_(nullptr) { std::string rhs(str); policy_->move(&rhs, &object_); } //! Constructor Cube(char str[]) : policy_(Cube::Policy()), object_(nullptr) { std::string rhs(str); policy_->move(&rhs, &object_); } //! Constructor Cube(const Cube &rhs) : policy_(rhs.policy_), object_(nullptr) { policy_->clone(&rhs.object_, &object_); } //! Constructor Cube(Cube &&rhs) : policy_(rhs.policy_), object_(rhs.object_) { rhs.policy_ = Cube::Policy(); rhs.object_ = nullptr; } //! Destructor ~Cube(void) { policy_->cleanup(&object_); } //! Assignment template Cube &operator=(const T &rhs) { this->assign(rhs); return *this; } //! Assignment template ::value && !std::is_same::value>::type> Cube &operator=(T &&rhs) { this->assign(std::forward(rhs)); return *this; } //! Assignment Cube &operator=(const Cube &rhs) { this->assign(rhs); return *this; } //! Assignment Cube &operator=(Cube &&rhs) { this->assign(std::forward(rhs)); return *this; } //! Assignment Cube &operator=(const char *str) { this->assign(str); return *this; } //! Assignment Cube &operator=(char str[]) { this->assign(str); return *this; } //! Retrieve object in original type template operator T &() { return this->cast(); } //! Retrieve object in original type template operator const T &() const { return this->cast(); } //! Assign content template void assign(const T &rhs) { policy_->cleanup(&object_); policy_ = Cube::Policy(); policy_->assign(&rhs, &object_); } //! Assign content template ::value && !std::is_same::value>::type> void assign(T &&rhs) { policy_->cleanup(&object_); policy_ = Cube::Policy(); policy_->move(&rhs, &object_); } //! Assign content from another Cube void assign(const Cube &rhs) { policy_->cleanup(&object_); policy_ = rhs.policy_; policy_->clone(&rhs.object_, &object_); } //! Assign content from another Cube void assign(Cube &&rhs) { if (this != &rhs) { policy_->cleanup(&object_); policy_ = rhs.policy_; object_ = rhs.object_; rhs.policy_ = Cube::Policy(); rhs.object_ = nullptr; } } //! Assign content void assign(const char *str) { policy_->cleanup(&object_); policy_ = Cube::Policy(); std::string rhs(str); policy_->move(&rhs, &object_); } //! Assign content void assign(char str[]) { policy_->cleanup(&object_); policy_ = Cube::Policy(); std::string rhs(str); policy_->move(&rhs, &object_); } //! Swap the content with another Cube Cube &swap(Cube &rhs) { std::swap(policy_, rhs.policy_); std::swap(object_, rhs.object_); return *this; } //! Cast to the original type template T &cast(void) { if (policy_ != Cube::Policy()) { throw std::bad_cast(); } return *reinterpret_cast(policy_->value(&object_)); } //! Cast to the original type template const T &cast(void) const { if (policy_ != Cube::Policy()) { throw std::bad_cast(); } return *reinterpret_cast(policy_->value(&object_)); } //! Cast to the original type (unsafe) template T &unsafe_cast(void) { return *reinterpret_cast(policy_->value(&object_)); } //! Cast to the original type (unsafe) template const T &unsafe_cast(void) const { return *reinterpret_cast(policy_->value(&object_)); } //! Test if the Cube is empty bool empty(void) const { return (policy_ == Cube::Policy()); } //! Reset Cube allocated memory void reset(void) { policy_->cleanup(&object_); policy_ = Cube::Policy(); object_ = nullptr; } //! Test if the Cube is compatible with another one bool compatible(const Cube &rhs) const { return (policy_ == rhs.policy_ || policy_->type() == rhs.policy_->type()); } //! Test if the Cube is compatible with another one template bool compatible(void) const { return (policy_ == Cube::Policy() || policy_->type() == Cube::Policy()->type()); } //! Retrieve size size_t size(void) const { return (!this->empty() ? policy_->size() : 0u); } //! Retrieve type information const std::type_info &type(void) const { return (!this->empty() ? policy_->type() : typeid(void)); } protected: /*! Empty Policy */ struct EmptyPolicy {}; //! Make a static policy object template static internal::CubePolicy *MakePolicy(void) { static typename internal::PolicySelector::Type policy; return (&policy); } //! Retrieve a static policy object template static internal::CubePolicy *Policy(void) { return MakePolicy::type>(); } private: //! Members internal::CubePolicy *policy_; void *object_; }; } // namespace ailego #endif // __AILEGO_CONTAINER_CUBE_H__ ================================================ FILE: deps/proxima/include/ailego/container/heap.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Jul 2018 * \brief Interface of Heap adapter */ #ifndef __AILEGO_CONTAINER_HEAP_H__ #define __AILEGO_CONTAINER_HEAP_H__ #include #include #include #include #include namespace ailego { /*! Heap Adapter */ template , typename TBase = std::vector> class Heap : public TBase { public: //! Constructor Heap(void) : TBase(), limit_(std::numeric_limits::max()), compare_() {} //! Constructor Heap(size_t max) : TBase(), limit_(std::max(max, 1u)), compare_() { TBase::reserve(limit_); } //! Constructor Heap(const Heap &rhs) : TBase(rhs), limit_(rhs.limit_), compare_() {} //! Constructor Heap(Heap &&rhs) : TBase(std::move(rhs)), limit_(rhs.limit_), compare_() {} //! Constructor Heap(const TBase &rhs) : TBase(rhs), limit_(std::numeric_limits::max()), compare_() { std::make_heap(TBase::begin(), TBase::end(), compare_); } //! Constructor Heap(TBase &&rhs) : TBase(std::move(rhs)), limit_(std::numeric_limits::max()), compare_() { std::make_heap(TBase::begin(), TBase::end(), compare_); } //! Assignment Heap &operator=(const Heap &rhs) { TBase::operator=(static_cast(rhs)); limit_ = rhs.limit_; return *this; } //! Assignment Heap &operator=(Heap &&rhs) { TBase::operator=(std::move(static_cast(rhs))); limit_ = rhs.limit_; return *this; } //! Exchange the content void swap(Heap &rhs) { TBase::swap(static_cast(rhs)); std::swap(limit_, rhs.limit_); } //! Pop the front element void pop(void) { if (TBase::size() > 1) { auto last = TBase::end() - 1; this->replace_heap(TBase::begin(), last, std::move(*last)); } TBase::pop_back(); } //! Insert a new element into the heap template void emplace(TArgs &&...args) { if (this->full()) { typename std::remove_reference::type val(std::forward(args)...); auto first = TBase::begin(); if (compare_(val, *first)) { this->replace_heap(first, TBase::end(), std::move(val)); } } else { TBase::emplace_back(std::forward(args)...); std::push_heap(TBase::begin(), TBase::end(), compare_); } } //! Insert a new element into the heap void push(const T &val) { if (this->full()) { auto first = TBase::begin(); if (compare_(val, *first)) { this->replace_heap(first, TBase::end(), val); } } else { TBase::push_back(val); std::push_heap(TBase::begin(), TBase::end(), compare_); } } //! Insert a new element into the heap void push(T &&val) { if (this->full()) { auto first = TBase::begin(); if (compare_(val, *first)) { this->replace_heap(first, TBase::end(), std::move(val)); } } else { TBase::push_back(std::move(val)); std::push_heap(TBase::begin(), TBase::end(), compare_); } } //! Retrieve the limit of heap size_t limit(void) const { return limit_; } //! Limit the heap with max size void limit(size_t max) { limit_ = std::max(max, 1u); TBase::reserve(limit_); } //! Unlimit the size of heap void unlimit(void) { limit_ = std::numeric_limits::max(); } //! Check whether the heap is full bool full(void) const { return (TBase::size() == limit_); } //! Update the heap void update(void) { std::make_heap(TBase::begin(), TBase::end(), compare_); while (limit_ < TBase::size()) { this->pop(); } } //! Sort the elements in the heap void sort(void) { std::sort(TBase::begin(), TBase::end(), compare_); } protected: //! Replace the top element of heap template void replace_heap(TRandomIterator first, TRandomIterator last, TValue &&val) { using _DistanceType = typename std::iterator_traits::difference_type; _DistanceType hole = 0; _DistanceType count = _DistanceType(last - first); if (count > 1) { _DistanceType child = (hole << 1) + 1; while (child < count) { _DistanceType right_child = child + 1; if (right_child < count && compare_(*(first + child), *(first + right_child))) { child = right_child; } if (!compare_(val, *(first + child))) { break; } *(first + hole) = std::move(*(first + child)); hole = child; child = (hole << 1) + 1; } } *(first + hole) = std::forward(val); } private: size_t limit_; TCompare compare_; }; /*! Key Value Heap Comparer */ template > struct KeyValueHeapComparer { //! Function call bool operator()(const std::pair &lhs, const std::pair &rhs) const { return compare_(lhs.second, rhs.second); } private: TCompare compare_; }; /*! Key Value Heap */ template > using KeyValueHeap = Heap, KeyValueHeapComparer>; } // namespace ailego #endif //__AILEGO_CONTAINER_HEAP_H__ ================================================ FILE: deps/proxima/include/ailego/container/hypercube.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Mar 2018 * \brief Interface of AiLego Utility Hyper Cube */ #ifndef __AILEGO_CONTAINER_HYPERCUBE_H__ #define __AILEGO_CONTAINER_HYPERCUBE_H__ #include #include #include "cube.h" namespace ailego { /*! Hypercube */ class Hypercube { public: //! Constructor Hypercube(void) : cubes_() {} //! Constructor Hypercube(const Hypercube &rhs) : cubes_(rhs.cubes_) {} //! Constructor Hypercube(Hypercube &&rhs) : cubes_() { cubes_.swap(rhs.cubes_); } //! Destructor ~Hypercube(void) {} //! Assignment Hypercube &operator=(const Hypercube &rhs) { cubes_ = rhs.cubes_; return *this; } //! Assignment Hypercube &operator=(Hypercube &&rhs) { cubes_ = std::move(rhs.cubes_); return *this; } //! Overloaded operator [] Cube &operator[](const std::string &key) { return cubes_[key]; } //! Overloaded operator [] Cube &operator[](std::string &&key) { return cubes_[std::forward(key)]; } //! Test if the element is exist bool has(const std::string &key) const { return (cubes_.find(key) != cubes_.end()); } //! Test if the hyper cube is empty bool empty(void) const { return cubes_.empty(); } //! Insert a key-value pair into map bool insert(const std::string &key, Cube &&val) { return cubes_.emplace(key, std::forward(val)).second; } //! Insert a key-value pair into map bool insert(std::string &&key, Cube &&val) { return cubes_ .emplace(std::forward(key), std::forward(val)) .second; } //! Insert a key-value pair into map template bool insert(const std::string &key, T &&val) { return cubes_.emplace(key, Cube(std::forward(val))).second; } //! Insert a key-value pair into map template bool insert(std::string &&key, T &&val) { return cubes_ .emplace(std::forward(key), Cube(std::forward(val))) .second; } //! Insert or assign a key-value pair to map void insert_or_assign(const std::string &key, Cube &&val) { auto it = cubes_.lower_bound(key); if (it != cubes_.end() && it->first == key) { it->second = std::forward(val); } else { cubes_.emplace_hint(it, key, std::forward(val)); } } //! Insert or assign a key-value pair to map void insert_or_assign(std::string &&key, Cube &&val) { auto it = cubes_.lower_bound(key); if (it != cubes_.end() && it->first == key) { it->second = std::forward(val); } else { cubes_.emplace_hint(it, std::forward(key), std::forward(val)); } } //! Insert or assign a key-value pair to map template void insert_or_assign(const std::string &key, T &&val) { auto it = cubes_.lower_bound(key); if (it != cubes_.end() && it->first == key) { it->second = Cube(std::forward(val)); } else { cubes_.emplace_hint(it, key, Cube(std::forward(val))); } } //! Insert or assign a key-value pair to map template void insert_or_assign(std::string &&key, T &&val) { auto it = cubes_.lower_bound(key); if (it != cubes_.end() && it->first == key) { it->second = Cube(std::forward(val)); } else { cubes_.emplace_hint(it, std::forward(key), Cube(std::forward(val))); } } //! Clear the map void clear(void) { cubes_.clear(); } //! Swap the map void swap(Hypercube &rhs) { cubes_.swap(rhs.cubes_); } //! Erase the pair via a key bool erase(const std::string &key) { auto iter = cubes_.find(key); if (iter != cubes_.end()) { cubes_.erase(iter); return true; } return false; } //! Retrieve the value via a key bool get(const std::string &key, Cube *out) const { auto iter = cubes_.find(key); if (iter != cubes_.end()) { *out = iter->second; return true; } return false; } //! Retrieve the value via a key Cube *get(const std::string &key) { auto iter = cubes_.find(key); if (iter != cubes_.end()) { return &iter->second; } return nullptr; } //! Retrieve the value via a key const Cube *get(const std::string &key) const { auto iter = cubes_.find(key); if (iter != cubes_.end()) { return &iter->second; } return nullptr; } //! Retrieve the value via a key template bool get(const std::string &key, T *out) const { auto iter = cubes_.find(key); if (iter != cubes_.end()) { if (iter->second.compatible()) { *out = iter->second.unsafe_cast(); return true; } } return false; } //! Retrieve the value via a key template T &get(const std::string &key, T &def) { auto iter = cubes_.find(key); if (iter != cubes_.end()) { if (iter->second.compatible()) { return iter->second.unsafe_cast(); } } return def; } //! Retrieve the value via a key template const T &get(const std::string &key, const T &def) const { auto iter = cubes_.find(key); if (iter != cubes_.end()) { if (iter->second.compatible()) { return iter->second.unsafe_cast(); } } return def; } //! Merge another hyper cube void merge(const Hypercube &rhs) { for (const auto &it : rhs.cubes_) { auto iter = cubes_.find(it.first); if (iter != cubes_.end()) { iter->second = it.second; } else { cubes_.emplace(it.first, it.second); } } } //! Merge another hyper cube void merge(Hypercube &&rhs) { for (auto &it : rhs.cubes_) { auto iter = cubes_.find(it.first); if (iter != cubes_.end()) { iter->second = std::move(it.second); } else { cubes_.emplace(std::move(it.first), std::move(it.second)); } } } //! Retrieve the cubes const std::map &cubes(void) const { return cubes_; } //! Retrieve the cubes std::map *mutable_cubes(void) { return &cubes_; } private: std::map cubes_; }; } // namespace ailego #endif // __AILEGO_CONTAINER_HYPERCUBE_H__ ================================================ FILE: deps/proxima/include/ailego/container/vector.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Jul 2018 * \brief Interface of Vector adapter */ #ifndef __AILEGO_CONTAINER_VECTOR_H__ #define __AILEGO_CONTAINER_VECTOR_H__ #include #include #include #include namespace ailego { /*! Fixed Vector */ template class FixedVector { public: enum { MAX_SIZE = N }; //! Constructor template FixedVector(U... vals) : data_{vals...} {} //! Overloaded operator [] T &operator[](size_t i) { return data_[i]; } //! Overloaded operator [] constexpr const T &operator[](size_t i) const { return data_[i]; } //! Retrieve data pointer T *data(void) { return data_; } //! Retrieve data pointer const T *data(void) const { return data_; } //! Retrieve count of elements in vector constexpr size_t size(void) const { return MAX_SIZE; } //! Convert a array pointer to vector pointer static FixedVector *Cast(T arr[N]) { return reinterpret_cast *>(arr); } //! Convert a array pointer to vector pointer static const FixedVector *Cast(const T arr[N]) { return reinterpret_cast *>(arr); } private: //! Data member T data_[N]; }; /*! Numerical Vector Adapter */ template ::value>::type> class NumericalVector : public TBase { public: typedef typename std::remove_cv::type ValueType; typedef ValueType *iterator; typedef const ValueType *const_iterator; //! Constructor NumericalVector(void) : TBase() {} //! Constructor explicit NumericalVector(size_t dim) : TBase() { this->resize(dim); } //! Constructor NumericalVector(size_t dim, const ValueType &val) : TBase() { this->resize(dim, val); } //! Constructor NumericalVector(const NumericalVector &rhs) : TBase(rhs) {} //! Constructor NumericalVector(NumericalVector &&rhs) : TBase(std::forward(rhs)) {} //! Constructor NumericalVector(const TBase &rhs) : TBase(rhs) { if (TBase::size() % sizeof(T) != 0) { throw std::length_error("Unmatched length"); } } //! Constructor NumericalVector(TBase &&rhs) : TBase(std::move(rhs)) { if (TBase::size() % sizeof(T) != 0) { throw std::length_error("Unmatched length"); } } //! Constructor NumericalVector(std::initializer_list il) : TBase() { for (const auto &it : il) { TBase::append(reinterpret_cast(&it), sizeof(ValueType)); } } //! Assignment NumericalVector &operator=(const NumericalVector &rhs) { TBase::operator=(static_cast(rhs)); return *this; } //! Assignment NumericalVector &operator=(NumericalVector &&rhs) { TBase::operator=(std::move(static_cast(rhs))); return *this; } //! Assignment NumericalVector &operator=(const TBase &rhs) { TBase::operator=(rhs); return *this; } //! Assignment NumericalVector &operator=(TBase &&rhs) { TBase::operator=(std::move(rhs)); return *this; } //! Overloaded operator [] ValueType &operator[](size_t i) { return *(this->data() + i); } //! Overloaded operator [] const ValueType &operator[](size_t i) const { return *(this->data() + i); } //! Appends a copy of value NumericalVector &append(const ValueType &val) { TBase::append(reinterpret_cast(&val), sizeof(ValueType)); return *this; } //! Append a copy of value void append(std::initializer_list il) { for (const auto &it : il) { TBase::append(reinterpret_cast(&it), sizeof(ValueType)); } } //! Assign content to vector void assign(const ValueType *vec, size_t len) { TBase::assign(reinterpret_cast(vec), len * sizeof(ValueType)); } //! Assign content to vector void assign(size_t n, const ValueType &val) { this->clear(); this->resize(n, val); } //! Assign content to vector void assign(std::initializer_list il) { this->clear(); for (const auto &it : il) { TBase::append(reinterpret_cast(&it), sizeof(ValueType)); } } //! Retrieve element ValueType &at(size_t i) { return *(this->data() + i); } //! Retrieve element const ValueType &at(size_t i) const { return *(this->data() + i); } //! Access last element ValueType &back(void) { return *(this->rbegin()); } //! Access last element const ValueType &back(void) const { return *(this->rbegin()); } //! Retrieve iterator to beginning iterator begin(void) { return this->data(); } //! Retrieve iterator to beginning const_iterator begin(void) const { return this->data(); } //! Retrieve size of allocated storage size_t capacity(void) const { return (TBase::capacity() / sizeof(ValueType)); } //! Clear the vector void clear(void) { TBase::clear(); } //! Retrieve pointer of data ValueType *data(void) { return reinterpret_cast(&(TBase::operator[](0))); } //! Retrieve pointer of data const ValueType *data(void) const { return reinterpret_cast(TBase::data()); } //! Test if vector is empty bool empty(void) const { return TBase::empty(); } //! An iterator to the past-the-end iterator end(void) { return (this->data() + this->size()); } //! An iterator to the past-the-end const_iterator end(void) const { return (this->data() + this->size()); } //! Access first element ValueType &front(void) { return *(this->begin()); } //! Access first element const ValueType &front(void) const { return *(this->begin()); } //! Request a change in capacity void reserve(size_t n) { TBase::reserve(n * sizeof(ValueType)); } //! Resize the vector to a length of n elements void resize(size_t n) { TBase::resize(n * sizeof(ValueType)); } //! Resize the vector to a length of n elements void resize(size_t n, const ValueType &val) { size_t count = this->size(); TBase::resize(n * sizeof(ValueType)); for (size_t i = count; i < n; ++i) { *(this->data() + i) = val; } } //! Retrieve dimension of vector size_t size(void) const { return (TBase::size() / sizeof(ValueType)); } //! Retrieve dimension of vector size_t dimension(void) const { return (TBase::size() / sizeof(ValueType)); } //! Retrieve size of vector in bytes size_t bytes(void) const { return TBase::size(); } //! Swap vector values void swap(NumericalVector &vec) { TBase::swap(static_cast(vec)); } }; /*! Nibble Vector Adapter */ template ::value>::type> class NibbleVector : public TBase { public: //! Type of value using ValueType = typename std::remove_cv::type; using StoreType = typename std::make_unsigned::type; //! const_iterator of Nibble Vector class const_iterator { public: //! Constructor const_iterator(void) : i_(0), owner_(nullptr) {} //! Constructor const_iterator(const NibbleVector *owner, size_t i) : i_(i), owner_(owner) {} //! Equality bool operator==(const const_iterator &rhs) const { return (i_ == rhs.i_); } //! No equality bool operator!=(const const_iterator &rhs) const { return (i_ != rhs.i_); } //! Increment (Prefix) const_iterator &operator++() { ++i_; return *this; } //! Increment (Suffix) const_iterator operator++(int) { const_iterator tmp = *this; ++i_; return tmp; } //! Decrement (Prefix) const_iterator &operator--() { --i_; return *this; } //! Decrement (Suffix) const_iterator operator--(int) { const_iterator tmp = *this; --i_; return tmp; } //! operator "+=" const_iterator &operator+=(size_t offset) { i_ += offset; return *this; } //! operator "-=" const_iterator &operator-=(size_t offset) { i_ -= offset; return *this; } //! Indirection (Signed integral) ValueType operator*() const { return owner_->element(i_); } private: size_t i_; const NibbleVector *owner_; }; //! Constructor NibbleVector(void) : TBase() {} //! Constructor explicit NibbleVector(size_t dim) : TBase() { this->resize(dim); } //! Constructor NibbleVector(size_t dim, ValueType val) : TBase() { this->resize(dim, val); } //! Constructor NibbleVector(const NibbleVector &rhs) : TBase(rhs) {} //! Constructor NibbleVector(NibbleVector &&rhs) : TBase(std::forward(rhs)) {} //! Constructor NibbleVector(const TBase &rhs) : TBase(rhs) {} //! Constructor NibbleVector(TBase &&rhs) : TBase(std::move(rhs)) {} //! Constructor NibbleVector(std::initializer_list il) : TBase() { this->resize(il.size()); size_t index = 0; uint8_t *arr = reinterpret_cast(&(TBase::operator[](0))); for (auto val : il) { arr[index >> 1] |= ((uint8_t)(val & 0xf) << ((index & 1) << 2)); ++index; } } //! Assignment NibbleVector &operator=(const NibbleVector &rhs) { TBase::operator=(static_cast(rhs)); return *this; } //! Assignment NibbleVector &operator=(NibbleVector &&rhs) { TBase::operator=(std::move(static_cast(rhs))); return *this; } //! Assignment NibbleVector &operator=(const TBase &rhs) { TBase::operator=(rhs); return *this; } //! Assignment NibbleVector &operator=(TBase &&rhs) { TBase::operator=(std::move(rhs)); return *this; } //! Overloaded operator [] (Signed integral) ValueType operator[](size_t i) const { return this->at(i); } //! Appends a copy of value NibbleVector &append(ValueType lo, ValueType hi) { TBase::push_back(((uint8_t)(hi & 0xf) << 4) | (uint8_t)(lo & 0xf)); return *this; } //! Append a copy of value void append(std::initializer_list il) { size_t index = this->size(); this->resize(index + il.size()); uint8_t *arr = reinterpret_cast(&(TBase::operator[](0))); for (auto val : il) { arr[index >> 1] |= ((uint8_t)(val & 0xf) << ((index & 1) << 2)); ++index; } } //! Assign content to vector void assign(const ValueType *vec, size_t len) { this->clear(); this->resize(len); uint8_t *arr = reinterpret_cast(&(TBase::operator[](0))); for (size_t i = 0; i != len; ++i) { arr[i >> 1] |= ((uint8_t)(vec[i] & 0xf) << ((i & 1) << 2)); } } //! Assign content to vector void assign(size_t n, ValueType val) { this->clear(); this->resize(n, val); } //! Assign content to vector void assign(std::initializer_list il) { this->clear(); this->resize(il.size()); uint8_t *arr = reinterpret_cast(&(TBase::operator[](0))); size_t index = 0; for (auto val : il) { arr[index >> 1] |= ((uint8_t)(val & 0xf) << ((index & 1) << 2)); ++index; } } //! Set a element void set(size_t i, ValueType val) { uint8_t *it = reinterpret_cast(&(TBase::operator[](i >> 1))); if (i & 1) { *it = (*it & 0x0f) | ((uint8_t)(val & 0xf) << 4); } else { *it = (*it & 0xf0) | (uint8_t)(val & 0xf); } } //! Retrieve element ValueType at(size_t i) const { return this->element(i); } //! Access last element ValueType back(void) const { return this->at(this->size() - 1); } //! Retrieve iterator to beginning const_iterator begin(void) const { return const_iterator(this, 0); } //! Retrieve size of allocated storage size_t capacity(void) const { return (TBase::capacity() << 1); } //! Clear the vector void clear(void) { TBase::clear(); } //! Retrieve pointer of data StoreType *data(void) { return reinterpret_cast(&(TBase::operator[](0))); } //! Retrieve pointer of data const StoreType *data(void) const { return reinterpret_cast(TBase::data()); } //! Test if vector is empty bool empty(void) const { return TBase::empty(); } //! An iterator to the past-the-end const_iterator end(void) const { return const_iterator(this, this->size()); } //! Access first element ValueType front(void) const { return this->at(0); } //! Request a change in capacity void reserve(size_t n) { TBase::reserve((n + (sizeof(ValueType) << 1) - 1) / (sizeof(ValueType) << 1) * sizeof(ValueType)); } //! Resize the vector to a length of n elements void resize(size_t n) { TBase::resize((n + (sizeof(ValueType) << 1) - 1) / (sizeof(ValueType) << 1) * sizeof(ValueType)); } //! Resize the vector to a length of n elements void resize(size_t n, ValueType val) { TBase::resize((n + (sizeof(ValueType) << 1) - 1) / (sizeof(ValueType) << 1) * sizeof(ValueType), ((uint8_t)(val & 0xf) << 4) | (uint8_t)(val & 0xf)); } //! Retrieve dimension of vector size_t size(void) const { return (TBase::size() << 1); } //! Retrieve dimension of vector size_t dimension(void) const { return (TBase::size() << 1); } //! Retrieve size of vector in bytes size_t bytes(void) const { return TBase::size(); } //! Swap vector values void swap(NibbleVector &vec) { TBase::swap(static_cast(vec)); } protected: //! Retrieve element (Signed integral) template auto element(size_t i) const -> typename std::enable_if::value, U>::type { const uint8_t *arr = reinterpret_cast(TBase::data()); return (static_cast(arr[i >> 1] << (~(i << 2) & 4)) >> 4); } //! Retrieve element (Unsigned integral) template auto element(size_t i) const -> typename std::enable_if::value, U>::type { const uint8_t *arr = reinterpret_cast(TBase::data()); return ((arr[i >> 1] >> ((i & 1) << 2)) & 0xf); } }; /*! Binary Vector Adapter */ template ::value>::type> class BinaryVector : public TBase { public: //! Type of value using ValueType = typename std::remove_cv::type; //! const_iterator of Binary Vector class const_iterator { public: //! Constructor const_iterator(void) : i_(0), arr_(nullptr) {} //! Constructor const_iterator(const void *buf, size_t i) : i_(i), arr_(reinterpret_cast(buf)) {} //! Equality bool operator==(const const_iterator &rhs) const { return (i_ == rhs.i_); } //! No equality bool operator!=(const const_iterator &rhs) const { return (i_ != rhs.i_); } //! Increment (Prefix) const_iterator &operator++() { ++i_; return *this; } //! Increment (Suffix) const_iterator operator++(int) { const_iterator tmp = *this; ++i_; return tmp; } //! Decrement (Prefix) const_iterator &operator--() { --i_; return *this; } //! Decrement (Suffix) const_iterator operator--(int) { const_iterator tmp = *this; --i_; return tmp; } //! operator "+=" const_iterator &operator+=(size_t offset) { i_ += offset; return *this; } //! operator "-=" const_iterator &operator-=(size_t offset) { i_ -= offset; return *this; } //! Indirection (eg. *iter) bool operator*() const { return ((arr_[i_ >> 3] & (1u << (i_ & 7))) != 0); } private: size_t i_; const uint8_t *arr_; }; //! Constructor BinaryVector(void) : TBase() {} //! Constructor explicit BinaryVector(size_t dim) : TBase() { this->resize(dim); } //! Constructor BinaryVector(size_t dim, bool val) : TBase() { this->resize(dim, val); } //! Constructor BinaryVector(const BinaryVector &rhs) : TBase(rhs) {} //! Constructor BinaryVector(BinaryVector &&rhs) : TBase(std::move(rhs)) {} //! Constructor BinaryVector(const TBase &rhs) : TBase(rhs) { if (TBase::size() % sizeof(T) != 0) { throw std::length_error("Unmatched length"); } } //! Constructor BinaryVector(TBase &&rhs) : TBase(std::move(rhs)) { if (TBase::size() % sizeof(T) != 0) { throw std::length_error("Unmatched length"); } } //! Constructor BinaryVector(std::initializer_list il) : TBase() { this->resize(il.size()); size_t index = 0; uint8_t *arr = reinterpret_cast(&(TBase::operator[](0))); for (auto val : il) { if (val) { arr[index >> 3] |= (uint8_t)(1u << (index & 7)); } ++index; } } //! Assignment BinaryVector &operator=(const BinaryVector &rhs) { TBase::operator=(static_cast(rhs)); return *this; } //! Assignment BinaryVector &operator=(BinaryVector &&rhs) { TBase::operator=(std::move(static_cast(rhs))); return *this; } //! Assignment BinaryVector &operator=(const TBase &rhs) { TBase::operator=(rhs); return *this; } //! Assignment BinaryVector &operator=(TBase &&rhs) { TBase::operator=(std::move(rhs)); return *this; } //! Overloaded operator [] bool operator[](size_t i) const { const uint8_t *arr = reinterpret_cast(TBase::data()); return ((arr[i >> 3] & (1u << (i & 7))) != 0); } //! Assign content to vector void assign(const bool *vec, size_t len) { this->clear(); this->resize(len); uint8_t *arr = reinterpret_cast(&(TBase::operator[](0))); for (size_t i = 0; i < len; ++i) { bool val = vec[i]; if (val) { arr[i >> 3] |= (1u << (i & 7)); } } } //! Assign content to vector void assign(size_t n, bool val) { this->clear(); this->resize(n, val); } //! Assign content to vector void assign(std::initializer_list il) { this->clear(); this->resize(il.size()); size_t index = 0; uint8_t *arr = reinterpret_cast(&(TBase::operator[](0))); for (auto val : il) { if (val) { arr[index >> 3] |= (uint8_t)(1u << (index & 7)); } ++index; } } //! Retrieve element bool at(size_t i) const { const uint8_t *arr = reinterpret_cast(TBase::data()); return ((arr[i >> 3] & (1u << (i & 7))) != 0); } //! Set a bit void set(size_t i) { uint8_t *arr = reinterpret_cast(&(TBase::operator[](0))); arr[i >> 3] |= (uint8_t)(1u << (i & 7)); } //! Reset a bit void reset(size_t i) { uint8_t *arr = reinterpret_cast(&(TBase::operator[](0))); arr[i >> 3] &= (uint8_t)(~(1u << (i & 7))); } //! Toggle a bit void flip(size_t i) { uint8_t *arr = reinterpret_cast(&(TBase::operator[](0))); arr[i >> 3] ^= (uint8_t)(1u << (i & 7)); } //! Access last element bool back(void) const { return this->at(this->size() - 1); } //! Retrieve const_iterator to beginning const_iterator begin(void) const { return const_iterator(this->data(), 0); } //! Retrieve size of allocated storage size_t capacity(void) const { return (TBase::capacity() << 3); } //! Clear the vector void clear(void) { TBase::clear(); } //! Retrieve pointer of data ValueType *data(void) { return reinterpret_cast(&(TBase::operator[](0))); } //! Retrieve pointer of data const ValueType *data(void) const { return reinterpret_cast(TBase::data()); } //! Test if vector is empty bool empty(void) const { return TBase::empty(); } //! An const_iterator to the past-the-end const_iterator end(void) const { return const_iterator(this->data(), this->size()); } //! Access first element bool front(void) const { return this->at(0); } //! Request a change in capacity void reserve(size_t n) { TBase::reserve((n + (sizeof(ValueType) << 3) - 1) / (sizeof(ValueType) << 3) * sizeof(ValueType)); } //! Resize the vector to a length of n elements void resize(size_t n) { TBase::resize((n + (sizeof(ValueType) << 3) - 1) / (sizeof(ValueType) << 3) * sizeof(ValueType)); } //! Resize the vector to a length of n elements void resize(size_t n, bool val) { TBase::resize((n + (sizeof(ValueType) << 3) - 1) / (sizeof(ValueType) << 3) * sizeof(ValueType), val ? 0xffu : 0u); } //! Retrieve dimension of vector size_t size(void) const { return (TBase::size() << 3); } //! Retrieve dimension of vector size_t dimension(void) const { return (TBase::size() << 3); } //! Retrieve size of vector in bytes size_t bytes(void) const { return TBase::size(); } //! Swap vector values void swap(BinaryVector &vec) { TBase::swap(static_cast(vec)); } }; } // namespace ailego #endif //__AILEGO_CONTAINER_VECTOR_H__ ================================================ FILE: deps/proxima/include/ailego/container/vector_array.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Mar 2020 * \brief Interface of Vector array */ #ifndef __AILEGO_CONTAINER_VECTOR_ARRAY_H__ #define __AILEGO_CONTAINER_VECTOR_ARRAY_H__ #include "vector.h" namespace ailego { /*! Numerical Vector Array */ template ::value>::type> class NumericalVectorArray { public: //! Type of value using ValueType = typename NumericalVector::ValueType; //! Constructor NumericalVectorArray(void) {} //! Constructor explicit NumericalVectorArray(size_t dim) : dimension_(dim) {} //! Constructor NumericalVectorArray(const NumericalVectorArray &rhs) : dimension_(rhs.dimension_), buffer_(rhs.buffer_) {} //! Constructor NumericalVectorArray(NumericalVectorArray &&rhs) : dimension_(rhs.dimension_), buffer_(std::move(rhs.buffer_)) {} //! Assignment NumericalVectorArray &operator=(const NumericalVectorArray &rhs) { dimension_ = rhs.dimension_; buffer_ = rhs.buffer_; return *this; } //! Assignment NumericalVectorArray &operator=(NumericalVectorArray &&rhs) { dimension_ = rhs.dimension_; buffer_ = std::move(rhs.buffer_); return *this; } //! Overloaded operator [] ValueType *operator[](size_t i) { return (reinterpret_cast(&buffer_[0]) + i * dimension_); } //! Overloaded operator [] const ValueType *operator[](size_t i) const { return (reinterpret_cast(buffer_.data()) + i * dimension_); } //! Append a vector void append(const ValueType *vec, size_t dim) { if (ailego_unlikely(dim != dimension_)) { throw std::length_error("Unmatched dimension"); } buffer_.append(reinterpret_cast(vec), dim * sizeof(ValueType)); } //! Append vectors void append(const ValueType *vec, size_t dim, size_t cnt) { if (ailego_unlikely(dim != dimension_)) { throw std::length_error("Unmatched dimension"); } buffer_.append(reinterpret_cast(vec), cnt * dim * sizeof(ValueType)); } //! Append a vector void append(const NumericalVector &vec) { this->append(vec.data(), vec.dimension()); } //! Replace a vector void replace(size_t index, const ValueType *vec, size_t dim) { if (ailego_unlikely(dim != dimension_)) { throw std::length_error("Unmatched dimension"); } size_t element_size = dim * sizeof(ValueType); buffer_.replace(index * element_size, element_size, reinterpret_cast(vec), element_size); } //! Replace a vector void replace(size_t index, const ValueType *vec, size_t dim, size_t cnt) { if (ailego_unlikely(dim != dimension_)) { throw std::length_error("Unmatched dimension"); } size_t element_size = dim * sizeof(ValueType); size_t total = element_size * cnt; buffer_.replace(index * element_size, total, reinterpret_cast(vec), total); } //! Replace a vector void replace(size_t index, const NumericalVector &vec) { this->replace(index, vec.data(), vec.dimension()); } //! Request a change in capacity void reserve(size_t n) { buffer_.reserve(n * dimension_ * sizeof(ValueType)); } //! Resize the array to a length of n elements void resize(size_t n) { buffer_.resize(n * dimension_ * sizeof(ValueType)); } //! Clear the vector array void clear(void) { buffer_.clear(); } //! Reset the vector array void reset(size_t dim) { dimension_ = dim; buffer_.clear(); } //! Requests the removal of unused capacity. void shrink_to_fit(void) { buffer_.shrink_to_fit(); } //! Retrieve pointer of data ValueType *data(void) { return reinterpret_cast(&buffer_[0]); } //! Retrieve pointer of data const ValueType *data(void) const { return reinterpret_cast(buffer_.data()); } //! Retrieve pointer of data ValueType *at(size_t i) { if (ailego_unlikely(i >= this->count())) { throw std::out_of_range("Index overflow"); } return (reinterpret_cast(&buffer_[0]) + i * dimension_); } //! Retrieve pointer of data const ValueType *at(size_t i) const { if (ailego_unlikely(i >= this->count())) { throw std::out_of_range("Index overflow"); } return (reinterpret_cast(buffer_.data()) + i * dimension_); } //! Test if the array is empty bool empty(void) const { return buffer_.empty(); } //! Retrieve count of vectors size_t count(void) const { return (dimension_ > 0 ? buffer_.size() / (dimension_ * sizeof(ValueType)) : 0u); } //! Retrieve dimension of vector size_t dimension(void) const { return dimension_; } //! Retrieve size of array in bytes size_t bytes(void) const { return buffer_.size(); } private: size_t dimension_{0u}; std::string buffer_{}; }; /*! Nibble Vector Array */ template ::value>::type> class NibbleVectorArray { public: //! Type of value using ValueType = typename NibbleVector::ValueType; using StoreType = typename NibbleVector::StoreType; //! Constructor NibbleVectorArray(void) {} //! Constructor explicit NibbleVectorArray(size_t dim) : dimension_((dim + (sizeof(ValueType) << 1) - 1) / (sizeof(ValueType) << 1) * sizeof(ValueType) << 1) {} //! Constructor NibbleVectorArray(const NibbleVectorArray &rhs) : dimension_(rhs.dimension_), buffer_(rhs.buffer_) {} //! Constructor NibbleVectorArray(NibbleVectorArray &&rhs) : dimension_(rhs.dimension_), buffer_(std::move(rhs.buffer_)) {} //! Assignment NibbleVectorArray &operator=(const NibbleVectorArray &rhs) { dimension_ = rhs.dimension_; buffer_ = rhs.buffer_; return *this; } //! Assignment NibbleVectorArray &operator=(NibbleVectorArray &&rhs) { dimension_ = rhs.dimension_; buffer_ = std::move(rhs.buffer_); return *this; } //! Overloaded operator [] StoreType *operator[](size_t i) { return reinterpret_cast(&buffer_[0] + i * (dimension_ >> 1)); } //! Overloaded operator [] const StoreType *operator[](size_t i) const { return reinterpret_cast(&buffer_[0] + i * (dimension_ >> 1)); } //! Append a vector void append(const StoreType *vec, size_t dim) { if (ailego_unlikely(dim != dimension_)) { throw std::length_error("Unmatched dimension"); } buffer_.append(reinterpret_cast(vec), dim >> 1); } //! Append vectors void append(const StoreType *vec, size_t dim, size_t cnt) { if (ailego_unlikely(dim != dimension_)) { throw std::length_error("Unmatched dimension"); } buffer_.append(reinterpret_cast(vec), cnt * (dim >> 1)); } //! Append a vector void append(const NibbleVector &vec) { this->append(vec.data(), vec.dimension()); } //! Replace a vector void replace(size_t index, const StoreType *vec, size_t dim) { if (ailego_unlikely(dim != dimension_)) { throw std::length_error("Unmatched dimension"); } size_t element_size = (dim >> 1); buffer_.replace(index * element_size, element_size, reinterpret_cast(vec), element_size); } //! Replace a vector void replace(size_t index, const StoreType *vec, size_t dim, size_t cnt) { if (ailego_unlikely(dim != dimension_)) { throw std::length_error("Unmatched dimension"); } size_t element_size = (dim >> 1); size_t total = element_size * cnt; buffer_.replace(index * element_size, total, reinterpret_cast(vec), total); } //! Replace a vector void replace(size_t index, const NibbleVector &vec) { this->replace(index, vec.data(), vec.dimension()); } //! Request a change in capacity void reserve(size_t n) { buffer_.reserve(n * (dimension_ >> 1)); } //! Resize the array to a length of n elements void resize(size_t n) { buffer_.resize(n * (dimension_ >> 1)); } //! Clear the vector array void clear(void) { buffer_.clear(); } //! Reset the vector array void reset(size_t dim) { dimension_ = (dim + (sizeof(ValueType) << 1) - 1) / (sizeof(ValueType) << 1) * sizeof(ValueType) << 1; buffer_.clear(); } //! Requests the removal of unused capacity. void shrink_to_fit(void) { buffer_.shrink_to_fit(); } //! Retrieve pointer of data StoreType *data(void) { return reinterpret_cast(&buffer_[0]); } //! Retrieve pointer of data const StoreType *data(void) const { return reinterpret_cast(buffer_.data()); } //! Retrieve pointer of data StoreType *at(size_t i) { if (ailego_unlikely(i >= this->count())) { throw std::out_of_range("Index overflow"); } return reinterpret_cast(&buffer_[0] + i * (dimension_ >> 1)); } //! Retrieve pointer of data const StoreType *at(size_t i) const { if (ailego_unlikely(i >= this->count())) { throw std::out_of_range("Index overflow"); } return reinterpret_cast(buffer_.data() + i * (dimension_ >> 1)); } //! Test if the array is empty bool empty(void) const { return buffer_.empty(); } //! Retrieve count of vectors size_t count(void) const { return (dimension_ > 1 ? buffer_.size() / (dimension_ >> 1) : 0u); } //! Retrieve dimension of vector size_t dimension(void) const { return dimension_; } //! Retrieve size of array in bytes size_t bytes(void) const { return buffer_.size(); } private: size_t dimension_{0u}; std::string buffer_{}; }; /*! Binary Vector Array */ template ::value>::type> class BinaryVectorArray { public: //! Type of value using ValueType = typename BinaryVector::ValueType; //! Constructor BinaryVectorArray(void) {} //! Constructor explicit BinaryVectorArray(size_t dim) : dimension_((dim + (sizeof(ValueType) << 3) - 1) / (sizeof(ValueType) << 3) * (sizeof(ValueType) << 3)) {} //! Constructor BinaryVectorArray(const BinaryVectorArray &rhs) : dimension_(rhs.dimension_), buffer_(rhs.buffer_) {} //! Constructor BinaryVectorArray(BinaryVectorArray &&rhs) : dimension_(rhs.dimension_), buffer_(std::move(rhs.buffer_)) {} //! Assignment BinaryVectorArray &operator=(const BinaryVectorArray &rhs) { dimension_ = rhs.dimension_; buffer_ = rhs.buffer_; return *this; } //! Assignment BinaryVectorArray &operator=(BinaryVectorArray &&rhs) { dimension_ = rhs.dimension_; buffer_ = std::move(rhs.buffer_); return *this; } //! Overloaded operator [] ValueType *operator[](size_t i) { return reinterpret_cast(&buffer_[0] + i * (dimension_ >> 3)); } //! Overloaded operator [] const ValueType *operator[](size_t i) const { return reinterpret_cast(buffer_.data() + i * (dimension_ >> 3)); } //! Append a vector void append(const ValueType *vec, size_t dim) { if (ailego_unlikely(dim != dimension_)) { throw std::length_error("Unmatched dimension"); } buffer_.append(reinterpret_cast(vec), (dim >> 3)); } //! Append vectors void append(const ValueType *vec, size_t dim, size_t cnt) { if (ailego_unlikely(dim != dimension_)) { throw std::length_error("Unmatched dimension"); } buffer_.append(reinterpret_cast(vec), cnt * (dim >> 3)); } //! Append a vector void append(const BinaryVector &vec) { this->append(vec.data(), vec.dimension()); } //! Replace a vector void replace(size_t index, const ValueType *vec, size_t dim) { if (ailego_unlikely(dim != dimension_)) { throw std::length_error("Unmatched dimension"); } size_t element_size = (dim >> 3); buffer_.replace(index * element_size, element_size, reinterpret_cast(vec), element_size); } //! Replace a vector void replace(size_t index, const ValueType *vec, size_t dim, size_t cnt) { if (ailego_unlikely(dim != dimension_)) { throw std::length_error("Unmatched dimension"); } size_t element_size = (dim >> 3); size_t total = element_size * cnt; buffer_.replace(index * element_size, total, reinterpret_cast(vec), total); } //! Replace a vector void replace(size_t index, const BinaryVector &vec) { this->replace(index, vec.data(), vec.dimension()); } //! Request a change in capacity void reserve(size_t n) { buffer_.reserve(n * (dimension_ >> 3)); } //! Resize the array to a length of n elements void resize(size_t n) { buffer_.resize(n * (dimension_ >> 3)); } //! Clear the vector array void clear(void) { buffer_.clear(); } //! Reset the vector array void reset(size_t dim) { dimension_ = (dim + (sizeof(ValueType) << 3) - 1) / (sizeof(ValueType) << 3) * (sizeof(ValueType) << 3); buffer_.clear(); } //! Requests the removal of unused capacity. void shrink_to_fit(void) { buffer_.shrink_to_fit(); } //! Retrieve pointer of data ValueType *data(void) { return reinterpret_cast(&buffer_[0]); } //! Retrieve pointer of data const ValueType *data(void) const { return reinterpret_cast(buffer_.data()); } //! Retrieve pointer of data ValueType *at(size_t i) { if (ailego_unlikely(i >= this->count())) { throw std::out_of_range("Index overflow"); } return reinterpret_cast(&buffer_[0] + i * (dimension_ >> 3)); } //! Retrieve pointer of data const ValueType *at(size_t i) const { if (ailego_unlikely(i >= this->count())) { throw std::out_of_range("Index overflow"); } return reinterpret_cast(buffer_.data() + i * (dimension_ >> 3)); } //! Test if the array is empty bool empty(void) const { return buffer_.empty(); } //! Retrieve count of vectors size_t count(void) const { return (dimension_ > 0 ? buffer_.size() / (dimension_ >> 3) : 0u); } //! Retrieve dimension of vector size_t dimension(void) const { return dimension_; } //! Retrieve size of array in bytes size_t bytes(void) const { return buffer_.size(); } private: size_t dimension_{0u}; std::string buffer_{}; }; } // namespace ailego #endif //__AILEGO_CONTAINER_VECTOR_ARRAY_H__ ================================================ FILE: deps/proxima/include/ailego/debug/bug_report.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2020 * \brief Interface of Bug Report */ #ifndef __AILEGO_DEBUG_BUG_REPORT_H__ #define __AILEGO_DEBUG_BUG_REPORT_H__ #include #include #include #include #include #include #include "symbol_table.h" namespace ailego { /*! Bug Report (Singleton) */ class BugReport : public Singleton { public: typedef std::map> CallStack; //! Constructor BugReport(void) {} //! Destructor ~BugReport(void) {} //! Bootstrap the bug report void bootstrap(int argc, char *argv[], const char *dir); //! Backtrace the current thread void backtrace(void); //! Retrieve timestamp uint64_t timestamp(void) const { return timestamp_; } //! Retrieve application command const std::string &command(void) const { return command_; } //! Retrieve application arguments const std::string &arguments(void) const { return arguments_; } //! Retrieve log directory const std::string &logdir(void) const { return logdir_; } //! Retrieve callstack CallStack callstack(void) const { ReadLock rdlock(callstack_mutex_); std::lock_guard latch(rdlock); return callstack_; } //! Retrieve symbol table SymbolTable *mutable_symbols(void) { return &symbols_; } //! Lock the bug report void lock(void) { mutex_.lock(); } //! Bootstrap the bug report static void Bootstrap(int argc, char *argv[], const char *dir) { Instance().bootstrap(argc, argv, dir); } private: uint64_t timestamp_{0}; std::string command_{}; std::string arguments_{}; std::string logdir_{}; SymbolTable symbols_{}; CallStack callstack_{}; mutable SharedMutex callstack_mutex_{}; mutable std::mutex mutex_{}; }; } // namespace ailego #endif // __AILEGO_DEBUG_BUG_REPORT_H__ ================================================ FILE: deps/proxima/include/ailego/debug/symbol_table.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2020 * \brief Interface of Bugreport Symbol Table */ #ifndef __AILEGO_DEBUG_SYMBOL_TABLE_H__ #define __AILEGO_DEBUG_SYMBOL_TABLE_H__ #include #include #include namespace ailego { /*! Symbol Information (same with Dl_info) */ struct SymbolInfo { const char *path; // Pathname of shared object that contains address void *base; // Base address at which shared object is loaded const char *name; // Name of symbol whose definition overlaps addr void *address; // Exact address of symbol }; /*! Symbol Meta */ struct SymbolMeta { void *address; // Exact address of symbol size_t size; // Size of symbol size_t position; // Position of symbol name //! Constructor SymbolMeta(void *addr, size_t len, size_t index) : address(addr), size(len), position(index) {} }; /*! Symbol Table */ class SymbolTable { public: //! Load symbols into a table from a binary file bool load(const std::string &path, void *base); //! Clear the symbol table void clear(void); //! Fetch symbol information via address bool fetch(const std::string &path, void *base, void *addr, SymbolInfo *out); //! Fetch symbol information via address bool fetch(void *addr, SymbolInfo *out); private: //! Members std::map, std::string>> map_{}; }; } // namespace ailego #endif // __AILEGO_DEBUG_SYMBOL_TABLE_H__ ================================================ FILE: deps/proxima/include/ailego/debug/user_context.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2020 * \brief Interface of AiLego User Thread Context */ #ifndef __AILEGO_DEBUG_USER_CONTEXT_H__ #define __AILEGO_DEBUG_USER_CONTEXT_H__ #if defined(__linux) || defined(__linux__) #include "user_context_linux.h" #elif defined(__APPLE__) || defined(__MACH__) #include "user_context_darwin.h" #endif #endif // __AILEGO_DEBUG_USER_CONTEXT_H__ ================================================ FILE: deps/proxima/include/ailego/debug/user_context_darwin.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2020 * \brief Interface of AiLego User Thread Context (Darwin) */ #ifndef __AILEGO_DEBUG_USER_CONTEXT_DARWIN_H__ #define __AILEGO_DEBUG_USER_CONTEXT_DARWIN_H__ #include #if defined(__x86_64__) #define USER_CONTEXT_RAX(uc) ((long)(uc)->uc_mcontext->__ss.__rax) #define USER_CONTEXT_RBX(uc) ((long)(uc)->uc_mcontext->__ss.__rbx) #define USER_CONTEXT_RCX(uc) ((long)(uc)->uc_mcontext->__ss.__rcx) #define USER_CONTEXT_RDX(uc) ((long)(uc)->uc_mcontext->__ss.__rdx) #define USER_CONTEXT_RDI(uc) ((long)(uc)->uc_mcontext->__ss.__rdi) #define USER_CONTEXT_RSI(uc) ((long)(uc)->uc_mcontext->__ss.__rsi) #define USER_CONTEXT_RBP(uc) ((long)(uc)->uc_mcontext->__ss.__rbp) #define USER_CONTEXT_RSP(uc) ((long)(uc)->uc_mcontext->__ss.__rsp) #define USER_CONTEXT_R8(uc) ((long)(uc)->uc_mcontext->__ss.__r8) #define USER_CONTEXT_R9(uc) ((long)(uc)->uc_mcontext->__ss.__r9) #define USER_CONTEXT_R10(uc) ((long)(uc)->uc_mcontext->__ss.__r10) #define USER_CONTEXT_R11(uc) ((long)(uc)->uc_mcontext->__ss.__r11) #define USER_CONTEXT_R12(uc) ((long)(uc)->uc_mcontext->__ss.__r12) #define USER_CONTEXT_R13(uc) ((long)(uc)->uc_mcontext->__ss.__r13) #define USER_CONTEXT_R14(uc) ((long)(uc)->uc_mcontext->__ss.__r14) #define USER_CONTEXT_R15(uc) ((long)(uc)->uc_mcontext->__ss.__r15) #define USER_CONTEXT_RIP(uc) ((long)(uc)->uc_mcontext->__ss.__rip) #define USER_CONTEXT_RFLAGS(uc) ((long)(uc)->uc_mcontext->__ss.__rflags) #define USER_CONTEXT_CS(uc) ((long)(uc)->uc_mcontext->__ss.__cs) #define USER_CONTEXT_FS(uc) ((long)(uc)->uc_mcontext->__ss.__fs) #define USER_CONTEXT_GS(uc) ((long)(uc)->uc_mcontext->__ss.__gs) #define USER_CONTEXT_ERR(uc) ((long)(uc)->uc_mcontext->__es.__err) #define USER_CONTEXT_TRAPNO(uc) ((long)(uc)->uc_mcontext->__es.__trapno) #elif defined(__i386__) #define USER_CONTEXT_GS(uc) ((long)(uc)->uc_mcontext->__ss.__gs) #define USER_CONTEXT_FS(uc) ((long)(uc)->uc_mcontext->__ss.__fs) #define USER_CONTEXT_ES(uc) ((long)(uc)->uc_mcontext->__ss.__es) #define USER_CONTEXT_DS(uc) ((long)(uc)->uc_mcontext->__ss.__ds) #define USER_CONTEXT_CS(uc) ((long)(uc)->uc_mcontext->__ss.__cs) #define USER_CONTEXT_SS(uc) ((long)(uc)->uc_mcontext->__ss.__ss) #define USER_CONTEXT_EDI(uc) ((long)(uc)->uc_mcontext->__ss.__edi) #define USER_CONTEXT_ESI(uc) ((long)(uc)->uc_mcontext->__ss.__esi) #define USER_CONTEXT_EBP(uc) ((long)(uc)->uc_mcontext->__ss.__ebp) #define USER_CONTEXT_ESP(uc) ((long)(uc)->uc_mcontext->__ss.__esp) #define USER_CONTEXT_EBX(uc) ((long)(uc)->uc_mcontext->__ss.__ebx) #define USER_CONTEXT_EDX(uc) ((long)(uc)->uc_mcontext->__ss.__edx) #define USER_CONTEXT_ECX(uc) ((long)(uc)->uc_mcontext->__ss.__ecx) #define USER_CONTEXT_EAX(uc) ((long)(uc)->uc_mcontext->__ss.__eax) #define USER_CONTEXT_EIP(uc) ((long)(uc)->uc_mcontext->__ss.__eip) #define USER_CONTEXT_ERR(uc) ((long)(uc)->uc_mcontext->__es.__err) #define USER_CONTEXT_TRAPNO(uc) ((long)(uc)->uc_mcontext->__es.__trapno) #define USER_CONTEXT_EFLAGS(uc) ((long)(uc)->uc_mcontext->__ss.__eflags) #elif defined(__aarch64__) #error "Unsupported platform !!!" #endif #endif // __AILEGO_DEBUG_USER_CONTEXT_DARWIN_H__ ================================================ FILE: deps/proxima/include/ailego/debug/user_context_linux.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2020 * \brief Interface of AiLego User Thread Context (Linux) */ #ifndef __AILEGO_DEBUG_USER_CONTEXT_LINUX_H__ #define __AILEGO_DEBUG_USER_CONTEXT_LINUX_H__ #include #if defined(__x86_64__) #define UCONTEXT_GREGS(ucp, x) ((long)((ucp)->uc_mcontext.gregs[(x)])) #define USER_CONTEXT_R8(ucp) UCONTEXT_GREGS(ucp, REG_R8) #define USER_CONTEXT_R9(ucp) UCONTEXT_GREGS(ucp, REG_R9) #define USER_CONTEXT_R10(ucp) UCONTEXT_GREGS(ucp, REG_R10) #define USER_CONTEXT_R11(ucp) UCONTEXT_GREGS(ucp, REG_R11) #define USER_CONTEXT_R12(ucp) UCONTEXT_GREGS(ucp, REG_R12) #define USER_CONTEXT_R13(ucp) UCONTEXT_GREGS(ucp, REG_R13) #define USER_CONTEXT_R14(ucp) UCONTEXT_GREGS(ucp, REG_R14) #define USER_CONTEXT_R15(ucp) UCONTEXT_GREGS(ucp, REG_R15) #define USER_CONTEXT_RDI(ucp) UCONTEXT_GREGS(ucp, REG_RDI) #define USER_CONTEXT_RSI(ucp) UCONTEXT_GREGS(ucp, REG_RSI) #define USER_CONTEXT_RBP(ucp) UCONTEXT_GREGS(ucp, REG_RBP) #define USER_CONTEXT_RBX(ucp) UCONTEXT_GREGS(ucp, REG_RBX) #define USER_CONTEXT_RDX(ucp) UCONTEXT_GREGS(ucp, REG_RDX) #define USER_CONTEXT_RAX(ucp) UCONTEXT_GREGS(ucp, REG_RAX) #define USER_CONTEXT_RCX(ucp) UCONTEXT_GREGS(ucp, REG_RCX) #define USER_CONTEXT_RSP(ucp) UCONTEXT_GREGS(ucp, REG_RSP) #define USER_CONTEXT_RIP(ucp) UCONTEXT_GREGS(ucp, REG_RIP) #define USER_CONTEXT_RFLAGS(ucp) UCONTEXT_GREGS(ucp, REG_EFL) #define USER_CONTEXT_CS(ucp) (UCONTEXT_GREGS(ucp, REG_CSGSFS) & 0xFFFF) #define USER_CONTEXT_FS(ucp) ((UCONTEXT_GREGS(ucp, REG_CSGSFS) >> 16) & 0xFFFF) #define USER_CONTEXT_GS(ucp) ((UCONTEXT_GREGS(ucp, REG_CSGSFS) >> 32) & 0xFFFF) #define USER_CONTEXT_ERR(ucp) UCONTEXT_GREGS(ucp, REG_ERR) #define USER_CONTEXT_TRAPNO(ucp) UCONTEXT_GREGS(ucp, REG_TRAPNO) #elif defined(__i386__) #define UCONTEXT_GREGS(ucp, x) ((long)((ucp)->uc_mcontext.gregs[x])) #define USER_CONTEXT_GS(ucp) UCONTEXT_GREGS(ucp, REG_GS) #define USER_CONTEXT_FS(ucp) UCONTEXT_GREGS(ucp, REG_FS) #define USER_CONTEXT_ES(ucp) UCONTEXT_GREGS(ucp, REG_ES) #define USER_CONTEXT_DS(ucp) UCONTEXT_GREGS(ucp, REG_DS) #define USER_CONTEXT_CS(ucp) UCONTEXT_GREGS(ucp, REG_CS) #define USER_CONTEXT_SS(ucp) UCONTEXT_GREGS(ucp, REG_SS) #define USER_CONTEXT_EDI(ucp) UCONTEXT_GREGS(ucp, REG_EDI) #define USER_CONTEXT_ESI(ucp) UCONTEXT_GREGS(ucp, REG_ESI) #define USER_CONTEXT_EBP(ucp) UCONTEXT_GREGS(ucp, REG_EBP) #define USER_CONTEXT_ESP(ucp) UCONTEXT_GREGS(ucp, REG_ESP) #define USER_CONTEXT_EBX(ucp) UCONTEXT_GREGS(ucp, REG_EBX) #define USER_CONTEXT_EDX(ucp) UCONTEXT_GREGS(ucp, REG_EDX) #define USER_CONTEXT_ECX(ucp) UCONTEXT_GREGS(ucp, REG_ECX) #define USER_CONTEXT_EAX(ucp) UCONTEXT_GREGS(ucp, REG_EAX) #define USER_CONTEXT_EIP(ucp) UCONTEXT_GREGS(ucp, REG_EIP) #define USER_CONTEXT_ERR(ucp) UCONTEXT_GREGS(ucp, REG_ERR) #define USER_CONTEXT_TRAPNO(ucp) UCONTEXT_GREGS(ucp, REG_TRAPNO) #define USER_CONTEXT_EFLAGS(ucp) UCONTEXT_GREGS(ucp, REG_EFL) #elif defined(__aarch64__) #define UCONTEXT_GREGS(ucp, x) ((long)((ucp)->uc_mcontext.regs[x])) #define USER_CONTEXT_R0(ucp) UCONTEXT_GREGS(ucp, 0) #define USER_CONTEXT_R1(ucp) UCONTEXT_GREGS(ucp, 1) #define USER_CONTEXT_R2(ucp) UCONTEXT_GREGS(ucp, 2) #define USER_CONTEXT_R3(ucp) UCONTEXT_GREGS(ucp, 3) #define USER_CONTEXT_R4(ucp) UCONTEXT_GREGS(ucp, 4) #define USER_CONTEXT_R5(ucp) UCONTEXT_GREGS(ucp, 5) #define USER_CONTEXT_R6(ucp) UCONTEXT_GREGS(ucp, 6) #define USER_CONTEXT_R7(ucp) UCONTEXT_GREGS(ucp, 7) #define USER_CONTEXT_R8(ucp) UCONTEXT_GREGS(ucp, 8) #define USER_CONTEXT_R9(ucp) UCONTEXT_GREGS(ucp, 9) #define USER_CONTEXT_R10(ucp) UCONTEXT_GREGS(ucp, 10) #define USER_CONTEXT_R11(ucp) UCONTEXT_GREGS(ucp, 11) #define USER_CONTEXT_R12(ucp) UCONTEXT_GREGS(ucp, 12) #define USER_CONTEXT_R13(ucp) UCONTEXT_GREGS(ucp, 13) #define USER_CONTEXT_R14(ucp) UCONTEXT_GREGS(ucp, 14) #define USER_CONTEXT_R15(ucp) UCONTEXT_GREGS(ucp, 15) #define USER_CONTEXT_R16(ucp) UCONTEXT_GREGS(ucp, 16) #define USER_CONTEXT_R17(ucp) UCONTEXT_GREGS(ucp, 17) #define USER_CONTEXT_R18(ucp) UCONTEXT_GREGS(ucp, 18) #define USER_CONTEXT_R19(ucp) UCONTEXT_GREGS(ucp, 19) #define USER_CONTEXT_R20(ucp) UCONTEXT_GREGS(ucp, 20) #define USER_CONTEXT_R21(ucp) UCONTEXT_GREGS(ucp, 21) #define USER_CONTEXT_R22(ucp) UCONTEXT_GREGS(ucp, 22) #define USER_CONTEXT_R23(ucp) UCONTEXT_GREGS(ucp, 23) #define USER_CONTEXT_R24(ucp) UCONTEXT_GREGS(ucp, 24) #define USER_CONTEXT_R25(ucp) UCONTEXT_GREGS(ucp, 25) #define USER_CONTEXT_R26(ucp) UCONTEXT_GREGS(ucp, 26) #define USER_CONTEXT_R27(ucp) UCONTEXT_GREGS(ucp, 27) #define USER_CONTEXT_R28(ucp) UCONTEXT_GREGS(ucp, 28) #define USER_CONTEXT_R29(ucp) UCONTEXT_GREGS(ucp, 29) #define USER_CONTEXT_R30(ucp) UCONTEXT_GREGS(ucp, 30) #define USER_CONTEXT_SP(ucp) ((long)((ucp)->uc_mcontext.sp)) #define USER_CONTEXT_PC(ucp) ((long)((ucp)->uc_mcontext.pc)) #define USER_CONTEXT_CPSR(ucp) ((long)((ucp)->uc_mcontext.pstate)) #define USER_CONTEXT_FAULTADDR(ucp) ((long)((ucp)->uc_mcontext.fault_address)) #elif defined(__arm__) #define USER_CONTEXT_R0(ucp) ((long)((ucp)->uc_mcontext.arm_r0)) #define USER_CONTEXT_R1(ucp) ((long)((ucp)->uc_mcontext.arm_r1)) #define USER_CONTEXT_R2(ucp) ((long)((ucp)->uc_mcontext.arm_r2)) #define USER_CONTEXT_R3(ucp) ((long)((ucp)->uc_mcontext.arm_r3)) #define USER_CONTEXT_R4(ucp) ((long)((ucp)->uc_mcontext.arm_r4)) #define USER_CONTEXT_R5(ucp) ((long)((ucp)->uc_mcontext.arm_r5)) #define USER_CONTEXT_R6(ucp) ((long)((ucp)->uc_mcontext.arm_r6)) #define USER_CONTEXT_R7(ucp) ((long)((ucp)->uc_mcontext.arm_r7)) #define USER_CONTEXT_R8(ucp) ((long)((ucp)->uc_mcontext.arm_r8)) #define USER_CONTEXT_R9(ucp) ((long)((ucp)->uc_mcontext.arm_r9)) #define USER_CONTEXT_R10(ucp) ((long)((ucp)->uc_mcontext.arm_r10)) #define USER_CONTEXT_SP(ucp) ((long)((ucp)->uc_mcontext.arm_sp)) #define USER_CONTEXT_LR(ucp) ((long)((ucp)->uc_mcontext.arm_lr)) #define USER_CONTEXT_PC(ucp) ((long)((ucp)->uc_mcontext.arm_pc)) #define USER_CONTEXT_CPSR(ucp) ((long)((ucp)->uc_mcontext.arm_cpsr)) #define USER_CONTEXT_IP(ucp) ((long)((ucp)->uc_mcontext.arm_ip)) #define USER_CONTEXT_FP(ucp) ((long)((ucp)->uc_mcontext.arm_fp)) #define USER_CONTEXT_TRAPNO(ucp) ((long)((ucp)->uc_mcontext.trap_no)) #define USER_CONTEXT_FAULTADDR(ucp) ((long)((ucp)->uc_mcontext.fault_address)) #endif #endif // __AILEGO_DEBUG_USER_CONTEXT_LINUX_H__ ================================================ FILE: deps/proxima/include/ailego/encoding/base64.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Jiliang.ljl * \date Mar 2021 * \brief Interface of Base64 encode & decode */ #ifndef __AILEGO_ENCODING_BASE64_H__ #define __AILEGO_ENCODING_BASE64_H__ #include #include namespace ailego { /*! Base64 encode & decode */ struct Base64 { //! Encode the bytes in base64 encoding static size_t Encode(const uint8_t *src, size_t len, uint8_t *dst); //! Decode the bytes with base64 encoding static size_t Decode(const uint8_t *src, size_t len, uint8_t *dst); //! Encode the bytes in base64 encoding static std::string Encode(const uint8_t *src, size_t len) { std::string out; out.resize((len + 2) / 3 * 4); Encode(src, len, (uint8_t *)out.data()); return out; } //! Encode a stl-string in base64 encoding static std::string Encode(const std::string &src) { return Encode(reinterpret_cast(src.c_str()), src.size()); } //! Encode a c-string in base64 encoding static std::string Encode(const char *src) { return Encode(reinterpret_cast(src), std::strlen(src)); } //! Decode the bytes with base64 encoding static std::string Decode(const uint8_t *src, size_t len) { std::string out; out.resize((len + 3) / 4 * 3); out.resize(Decode(src, len, (uint8_t *)out.data())); return out; } //! Decode a c-string with base64 encoding static std::string Decode(const char *src) { return Decode(reinterpret_cast(src), std::strlen(src)); } //! Decode a stl-string with base64 encoding static std::string Decode(const std::string &src) { return Decode(reinterpret_cast(src.c_str()), src.size()); } }; } // namespace ailego #endif // __AILEGO_ENCODING_BASE64_H__ ================================================ FILE: deps/proxima/include/ailego/encoding/json/mod_json.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Rainvan (Yunfeng.Xiao) * \date May 2012 * \brief Interface of JSON Parser/Generator */ #ifndef __AILEGO_ENCODING_JSON_MOD_JSON_H__ #define __AILEGO_ENCODING_JSON_MOD_JSON_H__ #include #include #if !defined(__cplusplus) && defined(_MSC_VER) #if !defined(inline) #define inline __inline #endif #endif #if defined(__cplusplus) extern "C" { #endif #define MOD_JSON_FALSE (false) #define MOD_JSON_TRUE (true) /*! JSON Type */ enum mod_json_type { mod_json_type_null = 0, mod_json_type_boolean = 1, mod_json_type_integer = 2, mod_json_type_float = 3, mod_json_type_string = 4, mod_json_type_array = 5, mod_json_type_object = 6 }; /*! JSON Token State */ enum mod_json_state { mod_json_state_null = 0, mod_json_state_start = 1, mod_json_state_finish = 2, mod_json_state_array_start = 3, mod_json_state_array_half = 4, mod_json_state_array_finish = 5, mod_json_state_object_start = 6, mod_json_state_object_half1 = 7, mod_json_state_object_half2 = 8, mod_json_state_object_finish = 9, mod_json_state_max = 10 }; /*! JSON Token Error Code */ enum mod_json_error { mod_json_error_null = 0, mod_json_error_invalid = 1, mod_json_error_state = 2, mod_json_error_empty = 3, mod_json_error_break = 4, mod_json_error_depth = 5, mod_json_error_trunc = 6, mod_json_error_start = 7, mod_json_error_array = 8, mod_json_error_object = 9, mod_json_error_key = 10, mod_json_error_value = 11, mod_json_error_quote = 12 }; /*! JSON Token Event */ enum mod_json_event { mod_json_event_null = 0, mod_json_event_field = 1, mod_json_event_object = 2, mod_json_event_array = 3, mod_json_event_boolean = 4, mod_json_event_integer = 5, mod_json_event_float = 6, mod_json_event_string = 7 }; typedef unsigned int mod_json_size_t; typedef int mod_json_ssize_t; typedef bool mod_json_boolean_t; typedef char mod_json_char_t; typedef const char mod_json_cchar_t; typedef unsigned char mod_json_uchar_t; typedef long long mod_json_integer_t; typedef double mod_json_float_t; typedef void mod_json_void_t; typedef enum mod_json_type mod_json_type_t; typedef union mod_json_any mod_json_any_t; typedef struct mod_json_value mod_json_value_t; typedef struct mod_json_string mod_json_string_t; typedef struct mod_json_array mod_json_array_t; typedef struct mod_json_object mod_json_object_t; typedef struct mod_json_pair mod_json_pair_t; typedef struct mod_json_option mod_json_option_t; typedef enum mod_json_state mod_json_state_t; typedef enum mod_json_error mod_json_error_t; typedef enum mod_json_event mod_json_event_t; typedef struct mod_json_token mod_json_token_t; /*! Callback function when parsing JSON */ typedef int (*mod_json_event_proc)(mod_json_token_t *tok, mod_json_void_t *val, mod_json_size_t len); /*! JSON Any */ union mod_json_any { mod_json_object_t *c_obj; mod_json_array_t *c_arr; mod_json_string_t *c_str; mod_json_float_t c_float; mod_json_boolean_t c_bool; mod_json_integer_t c_int; }; /*! JSON Value */ struct mod_json_value { mod_json_ssize_t refer; mod_json_type_t type; mod_json_any_t data; }; /*! JSON String */ struct mod_json_string { mod_json_ssize_t refer; mod_json_size_t size; mod_json_char_t *first; mod_json_char_t *last; }; /*! JSON Array */ struct mod_json_array { mod_json_ssize_t refer; mod_json_size_t size; mod_json_value_t **first; mod_json_value_t **last; }; /*! JSON Pair */ struct mod_json_pair { mod_json_string_t *key; mod_json_value_t *val; }; /*! JSON Object */ struct mod_json_object { mod_json_ssize_t refer; mod_json_size_t size; mod_json_pair_t *first; mod_json_pair_t *last; }; #define MOD_JSON_COMMENT 0x0001 /* Enable comments */ #define MOD_JSON_UNSTRICT 0x0002 /* Enable loose JSON string */ #define MOD_JSON_SIMPLE 0x0004 /* Enable simple format */ #define MOD_JSON_SQUOTE 0x0008 /* Enable single quotes support */ /*! JSON Option */ struct mod_json_option { mod_json_size_t options; mod_json_size_t object_depth; mod_json_size_t array_depth; }; /** * \brief Create and set a JSON null value * \return Null indicates failure. */ mod_json_value_t *mod_json_value_set_null(void); /** * \brief Create and set a JSON object value * \param obj The value to be assigned * \return Null indicates failure. */ mod_json_value_t *mod_json_value_set_object(mod_json_object_t *obj); /** * \brief Create and set a JSON array value * \param arr The value to be assigned * \return Null indicates failure. */ mod_json_value_t *mod_json_value_set_array(mod_json_array_t *arr); /** * \brief Create and set a JSON string value * \param str The value to be assigned * \return Null indicates failure. */ mod_json_value_t *mod_json_value_set_string(mod_json_string_t *str); /** * \brief Create and set a JSON string buffer * \param buf The pointer of string buffer * \param len The length of string buffer * \return Null indicates failure. */ mod_json_value_t *mod_json_value_set_buffer(mod_json_cchar_t *buf, mod_json_size_t len); /** * \brief Create and set a JSON integer value * \param num The value to be assigned * \return Null indicates failure. */ mod_json_value_t *mod_json_value_set_integer(mod_json_integer_t num); /** * \brief Create and set a JSON float value * \param dbl The value to be assigned * \return Null indicates failure. */ mod_json_value_t *mod_json_value_set_float(mod_json_float_t dbl); /** * \brief Create and set a JSON boolean value * \param bol The value to be assigned * \return Null indicates failure. */ mod_json_value_t *mod_json_value_set_boolean(mod_json_boolean_t bol); /** * \brief Assign a JSON value as null * \param val The pointer of value */ void mod_json_value_assign_null(mod_json_value_t *val); /** * \brief Assign a JSON value as a object * \param val The pointer of value * \param obj The value to be assigned */ void mod_json_value_assign_object(mod_json_value_t *val, mod_json_object_t *obj); /** * \brief Assign a JSON value as an array * \param val The pointer of value * \param arr The value to be assigned */ void mod_json_value_assign_array(mod_json_value_t *val, mod_json_array_t *arr); /** * \brief Assign a JSON value as a string * \param val The pointer of value * \param str The value to be assigned */ void mod_json_value_assign_string(mod_json_value_t *val, mod_json_string_t *str); /** * \brief Assign a JSON value as an integer * \param val The pointer of value * \param num The value to be assigned */ void mod_json_value_assign_integer(mod_json_value_t *val, mod_json_integer_t num); /** * \brief Assign a JSON value as a float * \param val The pointer of value * \param dbl The value to be assigned */ void mod_json_value_assign_float(mod_json_value_t *val, mod_json_float_t dbl); /** * \brief Assign a JSON value as a boolean * \param val The pointer of value * \param bol The value to be assigned */ void mod_json_value_assign_boolean(mod_json_value_t *val, mod_json_boolean_t bol); /** * \brief Assign a new JSON value * \param dst The pointer of destination value (can't be null) * \param src The pointer of source value (can be null) */ void mod_json_value_assign(mod_json_value_t *dst, mod_json_value_t *src); /** * \brief Merge a JSON value into another one * \param dst The pointer of destination value (can't be null) * \param src The pointer of source value (can be null) * \return 0 indicates success, -1 indicates failure. */ int mod_json_value_merge(mod_json_value_t *dst, mod_json_value_t *src); /** * \brief Retrieve object of a JSON value * \param val The pointer of value * \return Null indicates unmatched type or empty. */ mod_json_object_t *mod_json_value_object(mod_json_value_t *val); /** * \brief Retrieve array of a JSON value * \param val The pointer of value * \return Null indicates unmatched type or empty. */ mod_json_array_t *mod_json_value_array(mod_json_value_t *val); /** * \brief Retrieve string of a JSON value * \param val The pointer of value * \return Null indicates unmatched type or empty. */ mod_json_string_t *mod_json_value_string(mod_json_value_t *val); /** * \brief Retrieve c-string of a JSON value * \param val The pointer of value * \return Null indicates unmatched type or empty. */ mod_json_cchar_t *mod_json_value_cstring(mod_json_value_t *val); /** * \brief Retrieve float of a JSON value * \param val The pointer of value * \return It will try converting the unmatched value to float. If nothing be done, returns zero by default. */ mod_json_float_t mod_json_value_float(mod_json_value_t *val); /** * \brief Retrieve boolean of a JSON value * \param val The pointer of value * \return If string, object or array is not empty, number(integer or float) does not equal to zero, it returns true. */ mod_json_boolean_t mod_json_value_boolean(mod_json_value_t *val); /** * \brief Retrieve integer of a JSON value * \param val The pointer of value * \return It will try converting the unmatched value to integer. If nothing be done, returns zero by default. */ mod_json_integer_t mod_json_value_integer(mod_json_value_t *val); /** * \brief Clone a JSON value * \param val The pointer of value * \return Null indicates failure. */ mod_json_value_t *mod_json_value_clone(mod_json_value_t *val); /** * \brief Retrieve non-zero if they are equal * \param lhs The pointer of left value * \param rhs The pointer of right value * \return 1 indicates true, 0 indicates false. */ mod_json_boolean_t mod_json_value_is_equal(mod_json_value_t *lhs, mod_json_value_t *rhs); /** * \brief Unset or destroy a JSON value * \param val The pointer of value */ void mod_json_value_unset(mod_json_value_t *val); /** * \brief Increase reference count of a JSON value * \param val The pointer of value * \return The original pointer of value */ static inline mod_json_value_t *mod_json_value_get(mod_json_value_t *val) { ++val->refer; return val; } /** * \brief Decrease reference count of a JSON value * \param val The pointer of value * \return The new number of refer-counter */ static inline mod_json_ssize_t mod_json_value_put(mod_json_value_t *val) { return (--val->refer); } /** * \brief Retrieve refer-counter of a JSON value * \param val The pointer of value * \return The number of refer-counter */ static inline mod_json_ssize_t mod_json_value_refer(mod_json_value_t *val) { return (val ? val->refer : -1); } /** * \brief Set the refer-counter as leaked * \param val The pointer of value */ static inline void mod_json_value_set_leaked(mod_json_value_t *val) { val->refer = 0; } /** * \brief Retrieve non-zero if refer-counter is leaked * \param val The pointer of value * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_value_is_leaked( mod_json_value_t *val) { return (val->refer <= 0); } /** * \brief Retrieve non-zero if refer-counter is shared * \param val The pointer of value * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_value_is_shared( mod_json_value_t *val) { return (val->refer > 1); } /** * \brief Grab (get or clone) a JSON value * \param val The pointer of value * \return Null indicates failure */ static inline mod_json_value_t *mod_json_value_grab(mod_json_value_t *val) { /* Is it leaked? */ if (!mod_json_value_is_leaked(val)) { return mod_json_value_get(val); } return mod_json_value_clone(val); } /** * \brief Retrieve type of a JSON value * \param val The pointer of value * \return The code of type */ static inline mod_json_type_t mod_json_value_type(mod_json_value_t *val) { return (val->type); } /** * \brief Retrieve non-zero if a JSON value is null * \param val The pointer of value * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_value_is_null(mod_json_value_t *val) { return (val ? val->type == mod_json_type_null : MOD_JSON_TRUE); } /** * \brief Retrieve non-zero if it is a JSON array * \param val The pointer of value * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_value_is_array( mod_json_value_t *val) { return (val ? val->type == mod_json_type_array : MOD_JSON_FALSE); } /** * \brief Retrieve non-zero if it is a JSON object * \param val The pointer of value * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_value_is_object( mod_json_value_t *val) { return (val ? val->type == mod_json_type_object : MOD_JSON_FALSE); } /** * \brief Retrieve non-zero if it is a JSON string * \param val The pointer of value * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_value_is_string( mod_json_value_t *val) { return (val ? val->type == mod_json_type_string : MOD_JSON_FALSE); } /** * \brief Retrieve non-zero if it is a JSON float * \param val The pointer of value * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_value_is_float( mod_json_value_t *val) { return (val ? val->type == mod_json_type_float : MOD_JSON_FALSE); } /** * \brief Retrieve non-zero if it is a JSON boolean * \param val The pointer of value * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_value_is_boolean( mod_json_value_t *val) { return (val ? val->type == mod_json_type_boolean : MOD_JSON_FALSE); } /** * \brief Retrieve non-zero if it is a JSON integer * \param val The pointer of value * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_value_is_integer( mod_json_value_t *val) { return (val ? val->type == mod_json_type_integer : MOD_JSON_FALSE); } /** * \brief Request a change in capacity * \param str The pointer of string * \param n The requested size of capacity * \return 0 indicates success, -1 indicates failure. */ int mod_json_string_reserve(mod_json_string_t *str, mod_json_size_t n); /** * \brief Create and set a JSON string * \param cstr The pointer of c-string * \param len The length of c-string * \return Null indicates failure. */ mod_json_string_t *mod_json_string_set(mod_json_cchar_t *cstr, mod_json_size_t len); /** * \brief Assign new content to a JSON string * \param str The pointer of string * \param cstr The pointer of c-string * \param len The length of c-string * \return 0 indicates success, -1 indicates failure. */ int mod_json_string_assign(mod_json_string_t *str, mod_json_cchar_t *cstr, mod_json_size_t len); /** * \brief Clone a JSON string * \param str The pointer of string * \return Null indicates failure. */ static inline mod_json_string_t *mod_json_string_clone(mod_json_string_t *str) { return (str ? mod_json_string_set(str->first, (mod_json_size_t)(str->last - str->first)) : (mod_json_string_t *)0); } /** * \brief Unset or destroy a JSON string * \param str The pointer of string */ void mod_json_string_unset(mod_json_string_t *str); /** * \brief Reset a JSON string * \param str The pointer of string */ void mod_json_string_reset(mod_json_string_t *str); /** * \brief Append a c-string to a JSON string * \param str The pointer of string * \param cstr The pointer of c-string * \param len The length of c-string * \return 0 indicates success, -1 indicates failure. */ int mod_json_string_append(mod_json_string_t *str, mod_json_cchar_t *cstr, mod_json_size_t len); /** * \brief Add a copy of a JSON string * \param str The main string * \param val The appended string * \return 0 indicates success, -1 indicates failure. */ int mod_json_string_add(mod_json_string_t *str, mod_json_string_t *val); /** * \brief Retrieve HASH of a JSON string * \param str The pointer of string * \return The value of HASH */ mod_json_size_t mod_json_string_hash(mod_json_string_t *str); /** * \brief Compare two JSON strings (case sensitive) * \param str1 The first string * \param str2 The second string * \return 0 indicates equal. */ int mod_json_string_compare(mod_json_string_t *str1, mod_json_string_t *str2); /** * \brief Convert a JSON string to an integer * \param str The pointer of string * \return If nothing be done, returns zero by default. */ mod_json_integer_t mod_json_string_integer(mod_json_string_t *str); /** * \brief Convert a JSON string to a float * \param str The pointer of string * \return If nothing be done, returns zero by default. */ mod_json_float_t mod_json_string_float(mod_json_string_t *str); /** * \brief Encode a JSON string * \param src The pointer of source string * \return Null indicates failure. */ mod_json_string_t *mod_json_string_encode(mod_json_string_t *src); /** * \brief Decode a JSON string * \param src The pointer of source string * \return Null indicates failure. */ mod_json_string_t *mod_json_string_decode(mod_json_string_t *src); /** * \brief Increase reference count of a JSON string * \param str The pointer of string * \return The original pointer of string */ static inline mod_json_string_t *mod_json_string_get(mod_json_string_t *str) { ++str->refer; return str; } /** * \brief Decrease reference count of a JSON string * \param str The pointer of string * \return The new number of refer-counter */ static inline mod_json_ssize_t mod_json_string_put(mod_json_string_t *str) { return (--str->refer); } /** * \brief Retrieve refer-counter of a JSON string * \param str The pointer of string * \return The number of refer-counter */ static inline mod_json_ssize_t mod_json_string_refer(mod_json_string_t *str) { return (str ? str->refer : -1); } /** * \brief Set the refer-counter as leaked * \param str The pointer of string */ static inline void mod_json_string_set_leaked(mod_json_string_t *str) { str->refer = 0; } /** * \brief Retrieve non-zero if refer-counter is leaked * \param str The pointer of string * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_string_is_leaked( mod_json_string_t *str) { return (str->refer <= 0); } /** * \brief Retrieve non-zero if refer-counter is shared * \param str The pointer of string * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_string_is_shared( mod_json_string_t *str) { return (str->refer > 1); } /** * \brief Grab (get or clone) a JSON string * \param str The pointer of string * \return Null indicates failure */ static inline mod_json_string_t *mod_json_string_grab(mod_json_string_t *str) { /* Is it leaked? */ if (!mod_json_string_is_leaked(str)) { return mod_json_string_get(str); } return mod_json_string_clone(str); } /** * \brief Retrieve c-string of a JSON string * \param str The pointer of string * \return The pointer of c-string */ static inline mod_json_cchar_t *mod_json_string_cstr(mod_json_string_t *str) { return (str ? str->first : (mod_json_cchar_t *)0); } /** * \brief Retrieve data pointer of a JSON string * \param str The pointer of string * \return The pointer of data */ static inline mod_json_char_t *mod_json_string_data(mod_json_string_t *str) { return (str ? str->first : (mod_json_char_t *)0); } /** * \brief Retrieve capacity of a JSON string * \param str The pointer of string * \return The size of allocated storage */ static inline mod_json_size_t mod_json_string_capacity(mod_json_string_t *str) { return (str ? (str->size - 1) : 0); } /** * \brief Retrieve length of a JSON string * \param str The pointer of string * \return The length of string */ static inline mod_json_size_t mod_json_string_length(mod_json_string_t *str) { return (str ? (mod_json_size_t)(str->last - str->first) : 0); } /** * \brief Retrieve non-zero if a JSON string is empty * \param str The pointer of string * \return 0 indicates non-empty */ static inline mod_json_boolean_t mod_json_string_empty(mod_json_string_t *str) { return (mod_json_string_length(str) == 0); } /** * \brief Create and set a JSON array * \param size The initialized size of array * \return Null indicates failure. */ mod_json_array_t *mod_json_array_set(mod_json_size_t size); /** * \brief Clone a JSON array * \param arr The pointer of array * \return Null indicates failure. */ mod_json_array_t *mod_json_array_clone(mod_json_array_t *arr); /** * \brief Retrieve non-zero if they are equal * \param lhs The pointer of left array * \param rhs The pointer of right array * \return 1 indicates true, 0 indicates false. */ mod_json_boolean_t mod_json_array_is_equal(mod_json_array_t *lhs, mod_json_array_t *rhs); /** * \brief Unset or destroy a JSON array * \param arr The pointer of array */ void mod_json_array_unset(mod_json_array_t *arr); /** * \brief Reset a JSON array * \param arr The pointer of array */ void mod_json_array_reset(mod_json_array_t *arr); /** * \brief Create and set a JSON array (default parameters) * \param size The initialized size of array * \return Null indicates failure. */ static inline mod_json_array_t *mod_json_array_set_default(void) { return mod_json_array_set(0); } /** * \brief Increase reference count of a JSON array * \param arr The pointer of array * \return The original pointer of array */ static inline mod_json_array_t *mod_json_array_get(mod_json_array_t *arr) { ++arr->refer; return arr; } /** * \brief Decrease reference count of a JSON array * \param str The pointer of array * \return The new number of refer-counter */ static inline mod_json_ssize_t mod_json_array_put(mod_json_array_t *arr) { return (--arr->refer); } /** * \brief Retrieve refer-counter of a JSON array * \param arr The pointer of array * \return The number of refer-counter */ static inline mod_json_ssize_t mod_json_array_refer(mod_json_array_t *arr) { return (arr ? arr->refer : -1); } /** * \brief Set the refer-counter as leaked * \param arr The pointer of array */ static inline void mod_json_array_set_leaked(mod_json_array_t *arr) { arr->refer = 0; } /** * \brief Retrieve non-zero if refer-counter is leaked * \param arr The pointer of array * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_array_is_leaked( mod_json_array_t *arr) { return (arr->refer <= 0); } /** * \brief Retrieve non-zero if refer-counter is shared * \param arr The pointer of array * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_array_is_shared( mod_json_array_t *arr) { return (arr->refer > 1); } /** * \brief Grab (get or clone) a JSON array * \param arr The pointer of array * \return Null indicates failure */ static inline mod_json_array_t *mod_json_array_grab(mod_json_array_t *arr) { /* Is it leaked? */ if (!mod_json_array_is_leaked(arr)) { return mod_json_array_get(arr); } return mod_json_array_clone(arr); } /** * \brief Retrieve count of elements in a JSON array * \param arr The pointer of array * \return The count of elements */ static inline mod_json_size_t mod_json_array_count(mod_json_array_t *arr) { return (arr ? (mod_json_size_t)(arr->last - arr->first) : 0); } /** * \brief Retrieve capacity of a JSON array * \param arr The pointer of array * \return The size of allocated storage */ static inline mod_json_size_t mod_json_array_capacity(mod_json_array_t *arr) { return (arr ? arr->size : 0); } /** * \brief Retrieve non-zero if a JSON array is empty * \param arr The pointer of array * \return 0 indicates non-empty */ static inline mod_json_boolean_t mod_json_array_empty(mod_json_array_t *arr) { return (mod_json_array_count(arr) == 0); } /** * \brief Retrieve the begin of a JSON array * \param arr The pointer of array * \return The pointer of begin */ static inline mod_json_value_t **mod_json_array_begin(mod_json_array_t *arr) { return (arr->first); } /** * \brief Retrieve the reverse begin of a JSON array * \param arr The pointer of array * \return The pointer of reverse begin */ static inline mod_json_value_t **mod_json_array_rbegin(mod_json_array_t *arr) { return (arr->last - 1); } /** * \brief Retrieve the end of a JSON array * \param arr The pointer of array * \return The pointer of end */ static inline mod_json_value_t **mod_json_array_end(mod_json_array_t *arr) { return (arr->last); } /** * \brief Retrieve the reverse end of a JSON array * \param arr The pointer of array * \return The pointer of reverse end */ static inline mod_json_value_t **mod_json_array_rend(mod_json_array_t *arr) { return (arr->first - 1); } /** * \brief Request a change in capacity * \param arr The pointer of array * \param n The requested size of capacity * \return 0 indicates success, -1 indicates failure. */ int mod_json_array_reserve(mod_json_array_t *arr, mod_json_size_t n); /** * \brief Reverse the order of the elements in an array * \param arr The pointer of array * \return 0 indicates success, -1 indicates failure. */ void mod_json_array_reverse(mod_json_array_t *arr); /** * \brief Push a value into a JSON array * \param arr The pointer of array * \param val The pointer of value * \return 0 indicates success, -1 indicates failure. */ int mod_json_array_push(mod_json_array_t *arr, mod_json_value_t *val); /** * \brief Pop the last element from a JSON array * \param arr The pointer of array */ void mod_json_array_pop(mod_json_array_t *arr); /** * \brief Remove the first element of a JSON array * \param arr The pointer of array */ void mod_json_array_shift(mod_json_array_t *arr); /** * \brief Retrieve a value in JSON array * \param arr The pointer of array * \param id The index (start from zero) * \return Null indicates no one be found. */ mod_json_value_t *mod_json_array_at(mod_json_array_t *arr, mod_json_size_t id); /** * \brief Merge a JSON array into another one * \param dst The pointer of destination array (can't be null) * \param src The pointer of source array (can't be null) * \return 0 indicates success, -1 indicates failure. */ int mod_json_array_merge(mod_json_array_t *dst, mod_json_array_t *src); /** * \brief Resize a JSON array so that it contains n elements * \param arr The pointer of array * \param n The new size, expressed in number of elements * \param val The pointer of value assigned (can be null) * \return 0 indicates success, -1 indicates failure. */ int mod_json_array_resize(mod_json_array_t *arr, mod_json_size_t n, mod_json_value_t *val); /** * \brief Retrieve key of a JSON pair * \param pair The pointer of pair * \return The key of pair */ static inline mod_json_string_t *mod_json_pair_key(mod_json_pair_t *pair) { return (pair->key); } /** * \brief Retrieve value of a JSON pair * \param pair The pointer of pair * \return The value of pair */ static inline mod_json_value_t *mod_json_pair_value(mod_json_pair_t *pair) { return (pair->val); } /** * \brief Create and set a JSON object * \param size The initialized size of object * \return Null indicates failure. */ mod_json_object_t *mod_json_object_set(mod_json_size_t size); /** * \brief Clone a JSON object * \param obj The pointer of object * \return Null indicates failure. */ mod_json_object_t *mod_json_object_clone(mod_json_object_t *obj); /** * \brief Retrieve non-zero if they are equal * \param lhs The pointer of left object * \param rhs The pointer of right object * \return 1 indicates true, 0 indicates false. */ mod_json_boolean_t mod_json_object_is_equal(mod_json_object_t *lhs, mod_json_object_t *rhs); /** * \brief Unset or destroy a JSON object * \param obj The pointer of object */ void mod_json_object_unset(mod_json_object_t *obj); /** * \brief Reset a JSON object * \param obj The pointer of object */ void mod_json_object_reset(mod_json_object_t *obj); /** * \brief Create and set a JSON object (default parameters) * \return Null indicates failure. */ static inline mod_json_object_t *mod_json_object_set_default(void) { return mod_json_object_set(0); } /** * \brief Increase reference count of a JSON object * \param obj The pointer of object * \return The original pointer of object */ static inline mod_json_object_t *mod_json_object_get(mod_json_object_t *obj) { ++obj->refer; return obj; } /** * \brief Decrease reference count of a JSON object * \param str The pointer of object * \return The new number of refer-counter */ static inline mod_json_ssize_t mod_json_object_put(mod_json_object_t *obj) { return (--obj->refer); } /** * \brief Retrieve refer-counter of a JSON object * \param obj The pointer of object * \return The number of refer-counter */ static inline mod_json_ssize_t mod_json_object_refer(mod_json_object_t *obj) { return (obj ? obj->refer : -1); } /** * \brief Set the refer-counter as leaked * \param obj The pointer of object */ static inline void mod_json_object_set_leaked(mod_json_object_t *obj) { obj->refer = 0; } /** * \brief Retrieve non-zero if refer-counter is leaked * \param obj The pointer of object * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_object_is_leaked( mod_json_object_t *obj) { return (obj->refer <= 0); } /** * \brief Retrieve non-zero if refer-counter is shared * \param obj The pointer of object * \return 1 indicates TRUE, 0 indicates FALSE */ static inline mod_json_boolean_t mod_json_object_is_shared( mod_json_object_t *obj) { return (obj->refer > 1); } /** * \brief Grab (get or clone) a JSON object * \param obj The pointer of object * \return Null indicates failure */ static inline mod_json_object_t *mod_json_object_grab(mod_json_object_t *obj) { /* Is it leaked? */ if (!mod_json_object_is_leaked(obj)) { return mod_json_object_get(obj); } return mod_json_object_clone(obj); } /** * \brief Retrieve count of elements in a JSON object * \param obj The pointer of object * \return The count of elements */ static inline mod_json_size_t mod_json_object_count(mod_json_object_t *obj) { return (obj ? (mod_json_size_t)(obj->last - obj->first) : 0); } /** * \brief Retrieve non-zero if a JSON object is empty * \param obj The pointer of object * \return 0 indicates non-empty */ static inline mod_json_boolean_t mod_json_object_empty(mod_json_object_t *obj) { return (mod_json_object_count(obj) == 0); } /** * \brief Retrieve the begin of a JSON object * \param obj The pointer of object * \return The pointer of begin */ static inline mod_json_pair_t *mod_json_object_begin(mod_json_object_t *obj) { return (obj->first); } /** * \brief Retrieve the reverse begin of a JSON object * \param obj The pointer of object * \return The pointer of reverse begin */ static inline mod_json_pair_t *mod_json_object_rbegin(mod_json_object_t *obj) { return (obj->last - 1); } /** * \brief Retrieve the end of a JSON object * \param obj The pointer of object * \return The pointer of end */ static inline mod_json_pair_t *mod_json_object_end(mod_json_object_t *obj) { return (obj->last); } /** * \brief Retrieve the reverse end of a JSON object * \param obj The pointer of object * \return The pointer of reverse end */ static inline mod_json_pair_t *mod_json_object_rend(mod_json_object_t *obj) { return (obj->first - 1); } /** * \brief Insert a pair into a JSON object * \param obj The pointer of object * \param key The string of key * \param val The pointer of value * \return The pair inserted, Null indicates failure. */ mod_json_pair_t *mod_json_object_insert(mod_json_object_t *obj, mod_json_string_t *key, mod_json_value_t *val); /** * \brief Assign a pair into a JSON object * \param obj The pointer of object * \param key The string of key * \param val The pointer of value * \return The pair assigned, Null indicates failure. */ mod_json_pair_t *mod_json_object_assign(mod_json_object_t *obj, mod_json_string_t *key, mod_json_value_t *val); /** * \brief Touch a pair in a JSON object * \param obj The pointer of object * \param key The c-string of key */ mod_json_pair_t *mod_json_object_touch(mod_json_object_t *obj, mod_json_cchar_t *key); /** * \brief Erase a pair from a JSON object * \param obj The pointer of object * \param key The c-string of key */ void mod_json_object_erase(mod_json_object_t *obj, mod_json_cchar_t *key); /** * \brief Get a value in a JSON object * \param obj The pointer of object * \param key The c-string of key * \return Null indicates failure. */ mod_json_value_t *mod_json_object_at(mod_json_object_t *obj, mod_json_cchar_t *key); /** * \brief Find a pair in a JSON object * \param obj The pointer of object * \param key The c-string of key * \return Null indicates failure. */ mod_json_pair_t *mod_json_object_find(mod_json_object_t *obj, mod_json_cchar_t *key); /** * \brief Merge a JSON object into another one * \param dst The pointer of destination object (can't be null) * \param src The pointer of source object (can't be null) * \return 0 indicates success, -1 indicates failure. */ int mod_json_object_merge(mod_json_object_t *dst, mod_json_object_t *src); /** * \brief Create a JSON token * \param opt The options of parser * \return The pointer of token, Null indicates failure. */ mod_json_token_t *mod_json_token_create(mod_json_option_t *opt); /** * \brief Destroy a JSON token * \param tok The pointer of token */ void mod_json_token_destroy(mod_json_token_t *tok); /** * \brief Parse a c-string with a JSON token * \param tok The pointer of token * \param cstr The pointer of c-string * \return 0 indicates success, -1 indicates failure. */ int mod_json_token_parse(mod_json_token_t *tok, mod_json_cchar_t *cstr); /** * \brief Retrieve error of a JSON token * \param tok The pointer of token * \return The code of error */ mod_json_error_t mod_json_token_error(mod_json_token_t *tok); /** * \brief Retrieve error context of a JSON token * \param tok The pointer of token * \return The pointer of context, null indicates non-errors */ mod_json_cchar_t *mod_json_token_context(mod_json_token_t *tok); /** * \brief Retrieve state of a JSON token * \param tok The pointer of token * \return The value of state */ mod_json_state_t mod_json_token_state(mod_json_token_t *tok); /** * \brief Retrieve object depth of a JSON token * \param tok The pointer of token * \return The value of object depth */ mod_json_size_t mod_json_token_object_depth(mod_json_token_t *tok); /** * \brief Retrieve array depth of a JSON token * \param tok The pointer of token * \return The value of array depth */ mod_json_size_t mod_json_token_array_depth(mod_json_token_t *tok); /** * \brief Retrieve max object depth of a JSON token * \param tok The pointer of token * \return The value of max object depth */ mod_json_size_t mod_json_token_max_object_depth(mod_json_token_t *tok); /** * \brief Retrieve max array depth of a JSON token * \param tok The pointer of token * \return The value of max array depth */ mod_json_size_t mod_json_token_max_array_depth(mod_json_token_t *tok); /** * \brief Retrieve depth of a JSON token * \param tok The pointer of token * \return The value of depth */ mod_json_size_t mod_json_token_depth(mod_json_token_t *tok); /** * \brief Retrieve max depth of a JSON token * \param tok The pointer of token * \return The value of max depth */ mod_json_size_t mod_json_token_max_depth(mod_json_token_t *tok); /** * \brief Retrieve parameter of a JSON token * \param tok The pointer of token * \return The value of parameter */ mod_json_void_t *mod_json_token_param(mod_json_token_t *tok); /** * \brief Set parameter of a JSON token * \param tok The pointer of token * \param param The value of parameter */ void mod_json_token_set_param(mod_json_token_t *tok, mod_json_void_t *param); /** * \brief Register callback function of a JSON token * \param tok The pointer of token * \param proc The pointer of callback function */ void mod_json_token_set_event(mod_json_token_t *tok, mod_json_event_proc proc); /** * \brief Retrieve event code of a JSON token * \param tok The pointer of token * \return The code of event */ mod_json_event_t mod_json_token_event(mod_json_token_t *tok); /** * \brief Parse a c-string with a JSON token * \param tok The pointer of token * \param cstr The pointer of c-string * \return The pointer of value, Null indicates failure. */ mod_json_value_t *mod_json_parse(mod_json_token_t *tok, mod_json_cchar_t *cstr); /** * \brief Parse a c-string simply * \param cstr The pointer of c-string * \param opts The options of parser * \return The pointer of value, Null indicates failure. */ mod_json_value_t *mod_json_parse_simply(mod_json_cchar_t *cstr, mod_json_size_t opts); /** * \brief Dump a JSON value in string * \param val The pointer of value * \return Null indicates failure. */ mod_json_string_t *mod_json_dump(mod_json_value_t *val); #if defined(__cplusplus) } /* extern "C" */ #endif #endif /*__AILEGO_ENCODING_JSON_MOD_JSON_H__*/ ================================================ FILE: deps/proxima/include/ailego/encoding/json/mod_json_plus.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Rainvan (Yunfeng.Xiao) * \date Dev 2012 * \brief Interface of JSON Parser/Generator (C++) */ #ifndef __AILEGO_ENCODING_JSON_MOD_JSON_PLUS_H__ #define __AILEGO_ENCODING_JSON_MOD_JSON_PLUS_H__ #include #include #include #include #include "mod_json.h" namespace ailego { /*! JSON String */ class JsonString { public: typedef mod_json_size_t size_type; typedef mod_json_ssize_t ssize_type; typedef mod_json_float_t float_type; typedef mod_json_integer_t integer_type; //! Constructor JsonString(void) : str_(0) {} //! Constructor JsonString(const JsonString &rhs) : str_(0) { if (rhs.str_) { str_ = mod_json_string_grab(rhs.str_); } } #if __cplusplus >= 201103L //! Constructor JsonString(JsonString &&rhs) : str_(rhs.str_) { rhs.str_ = 0; } #endif //! Constructor JsonString(const char *cstr) { str_ = cstr ? mod_json_string_set(cstr, (mod_json_size_t)std::strlen(cstr)) : 0; } //! Constructor JsonString(const char *cstr, size_type len) { str_ = mod_json_string_set(cstr, len); } //! Constructor JsonString(const std::string &str) { str_ = mod_json_string_set(str.c_str(), (mod_json_size_t)str.size()); } //! Destructor ~JsonString(void) { mod_json_string_unset(str_); } //! Assign new contents to the string, replacing its current content JsonString &operator=(const JsonString &rhs) { this->assign(rhs); return *this; } #if __cplusplus >= 201103L //! Assign new contents to the string, replacing its current content JsonString &operator=(JsonString &&rhs) { this->assign(std::move(rhs)); return *this; } #endif //! Assign new contents to the string, replacing its current content JsonString &operator=(const char *cstr) { this->assign(cstr); return *this; } //! Assign new contents to the string, replacing its current content JsonString &operator=(const std::string &rhs) { this->assign(rhs); return *this; } //! Append a JSON string JsonString &operator+=(const JsonString &str) { this->append(str); return *this; } //! Append a c-style string JsonString &operator+=(const char *cstr) { this->append(cstr); return *this; } //! Append a character to string JsonString &operator+=(char c) { this->append(c); return *this; } //! Equality bool operator==(const JsonString &rhs) const { return (mod_json_string_compare(str_, rhs.str_) == 0); } //! No equality bool operator!=(const JsonString &rhs) const { return !(*this == rhs); } //! Retrieve the character at index n char &operator[](size_type n) { if (!copy_and_leak()) { throw std::runtime_error("JsonString::operator[]"); } return *(str_->first + n); } //! Retrieve the character at index n const char &operator[](size_type n) const { return *(str_->first + n); } //! Retrieve non-zero if the string is valid bool is_valid(void) const { return (str_ != (mod_json_string_t *)0); } //! Retrieve non-zero if the string is empty bool empty(void) const { return mod_json_string_empty(str_); } //! Assign a JSON string void assign(const JsonString &rhs) { mod_json_string_unset(str_); str_ = rhs.str_ ? mod_json_string_grab(rhs.str_) : 0; } #if __cplusplus >= 201103L //! Assign a JSON string void assign(JsonString &&rhs) { mod_json_string_unset(str_); str_ = rhs.str_; rhs.str_ = 0; } #endif //! Assign a c-style string void assign(const char *cstr) { if (cstr) { if (!copy_on_write() || mod_json_string_assign(str_, cstr, (mod_json_size_t)std::strlen(cstr)) != 0) { throw std::runtime_error("JsonString::assign"); } } } //! Assign a c-style string void assign(const char *cstr, size_type len) { if (!copy_on_write() || mod_json_string_assign(str_, cstr, len) != 0) { throw std::runtime_error("JsonString::assign"); } } //! Assign a STL-style string void assign(const std::string &str) { if (!copy_on_write() || mod_json_string_assign(str_, str.c_str(), (mod_json_size_t)str.size()) != 0) { throw std::runtime_error("JsonString::assign"); } } //! Append a JSON string void append(const JsonString &str) { if (str.str_) { if (!copy_on_write() || mod_json_string_add(str_, str.str_) != 0) { throw std::runtime_error("JsonString::append"); } } } //! Append a c-style string void append(const char *cstr) { if (cstr) { if (!copy_on_write() || mod_json_string_append(str_, cstr, (mod_json_size_t)std::strlen(cstr)) != 0) { throw std::runtime_error("JsonString::append"); } } } //! Append a c-style string void append(const char *cstr, size_type len) { if (!copy_on_write() || mod_json_string_append(str_, cstr, len) != 0) { throw std::runtime_error("JsonString::append"); } } //! Append a STL-style string void append(const std::string &str) { if (!copy_on_write() || mod_json_string_append(str_, str.c_str(), (mod_json_size_t)str.size()) != 0) { throw std::runtime_error("JsonString::append"); } } //! Append a character to string void append(char c) { if (!copy_on_write() || mod_json_string_append(str_, &c, 1) != 0) { throw std::runtime_error("JsonString::append"); } } //! Retrieve the character at index n char &at(size_type n) { if (this->size() <= n) { throw std::out_of_range("JsonString::at"); } if (!copy_and_leak()) { throw std::runtime_error("JsonString::at"); } return *(str_->first + n); } //! Retrieve the character at index n const char &at(size_type n) const { if (this->size() <= n) { throw std::out_of_range("JsonString::at"); } return *(str_->first + n); } //! Request a change in capacity void reserve(size_type n) { if (!copy_on_write() || mod_json_string_reserve(str_, n) != 0) { throw std::runtime_error("JsonString::reserve"); } } //! Clear the JSON string void clear(void) { mod_json_string_unset(str_); str_ = 0; } //! Exchange the content with another JSON string void swap(JsonString &rhs) { mod_json_string_t *str = str_; str_ = rhs.str_; rhs.str_ = str; } //! Retrieve the data pointer char *data(void) { return mod_json_string_data(str_); } //! Retrieve the data pointer const char *data(void) const { return mod_json_string_data(str_); } //! Retrieve HASH of a JSON string size_type hash(void) const { return mod_json_string_hash(str_); } //! Compare two JSON strings (case sensitive) int compare(const JsonString &rhs) const { return mod_json_string_compare(str_, rhs.str_); } //! Compare two strings (case sensitive) int compare(const char *cstr) const { const char *self = this->c_str(); if (self && cstr) { return std::strcmp(self, cstr); } // particular case if (!self && cstr) { return -1; } else if (self && !cstr) { return 1; } return 0; } // Encode a JSON string JsonString encode(void) const { JsonString ret; ret.str_ = mod_json_string_encode(str_); return ret; } // Decode a JSON string JsonString decode(void) const { JsonString ret; ret.str_ = mod_json_string_decode(str_); return ret; } //! Retrieve the capacity of string size_type capacity(void) const { return mod_json_string_capacity(str_); } //! Retrieve the length of string size_type size(void) const { return mod_json_string_length(str_); } //! Retrieve the length of string size_type length(void) const { return mod_json_string_length(str_); } //! Retrieve refer-counter of string ssize_type refer(void) const { return mod_json_string_refer(str_); } //! Retrieve the c-style string const char *c_str(void) const { return mod_json_string_cstr(str_); } //! Convert string to float float_type as_float(void) const { return mod_json_string_float(str_); } //! Convert string to integer integer_type as_integer(void) const { return mod_json_string_integer(str_); } //! Retrieve string as a STL string std::string as_stl_string(void) const { if (!this->empty()) { return std::string(this->data(), this->size()); } return std::string(); } protected: //! Clone the string for writing bool copy_on_write(void) { if (str_) { if (mod_json_string_is_shared(str_)) { mod_json_string_put(str_); str_ = mod_json_string_clone(str_); } } else { str_ = mod_json_string_set("", 0); } return (str_ != 0); } //! Clone the value and leak it bool copy_and_leak(void) { if (copy_on_write()) { mod_json_string_set_leaked(str_); return true; } return false; } private: mod_json_string_t *str_; }; class JsonArray; class JsonObject; /*! JSON Value */ class JsonValue { public: typedef mod_json_size_t size_type; typedef mod_json_ssize_t ssize_type; typedef mod_json_float_t float_type; typedef mod_json_integer_t integer_type; //! Constructor JsonValue(void) : val_(0) {} //! Constructor explicit JsonValue(const bool &val) { val_ = mod_json_value_set_boolean((mod_json_boolean_t)val); } //! Constructor explicit JsonValue(const signed char &val) { val_ = mod_json_value_set_integer((mod_json_integer_t)val); } //! Constructor explicit JsonValue(const char &val) { val_ = mod_json_value_set_integer((mod_json_integer_t)val); } //! Constructor explicit JsonValue(const short int &val) { val_ = mod_json_value_set_integer((mod_json_integer_t)val); } //! Constructor explicit JsonValue(const int &val) { val_ = mod_json_value_set_integer((mod_json_integer_t)val); } //! Constructor explicit JsonValue(const long int &val) { val_ = mod_json_value_set_integer((mod_json_integer_t)val); } //! Constructor explicit JsonValue(const long long int &val) { val_ = mod_json_value_set_integer((mod_json_integer_t)val); } //! Constructor explicit JsonValue(const float &val) { val_ = mod_json_value_set_float((mod_json_float_t)val); } //! Constructor explicit JsonValue(const double &val) { val_ = mod_json_value_set_float((mod_json_float_t)val); } //! Constructor explicit JsonValue(const long double &val) { val_ = mod_json_value_set_float((mod_json_float_t)val); } //! Constructor explicit JsonValue(const unsigned char &val) { val_ = mod_json_value_set_integer((mod_json_integer_t)val); } //! Constructor explicit JsonValue(const unsigned short int &val) { val_ = mod_json_value_set_integer((mod_json_integer_t)val); } //! Constructor explicit JsonValue(const unsigned int &val) { val_ = mod_json_value_set_integer((mod_json_integer_t)val); } //! Constructor explicit JsonValue(const unsigned long int &val) { val_ = mod_json_value_set_integer((mod_json_integer_t)val); } //! Constructor explicit JsonValue(const unsigned long long int &val) { val_ = mod_json_value_set_integer((mod_json_integer_t)val); } //! Constructor JsonValue(const JsonString &val) { val_ = mod_json_value_set_string(*(mod_json_string_t **)&val); } //! Constructor JsonValue(const char *val) { val_ = mod_json_value_set_buffer( val, val ? (mod_json_size_t)std::strlen(val) : 0); } //! Constructor JsonValue(const char *val, size_type len) { val_ = mod_json_value_set_buffer(val, len); } //! Constructor JsonValue(const std::string &val) { val_ = mod_json_value_set_buffer(val.data(), (mod_json_size_t)val.size()); } //! Constructor JsonValue(const JsonArray &val) { val_ = mod_json_value_set_array(*(mod_json_array_t **)&val); } //! Constructor JsonValue(const JsonObject &val) { val_ = mod_json_value_set_object(*(mod_json_object_t **)&val); } //! Constructor JsonValue(const JsonValue &rhs) : val_(0) { if (rhs.val_) { val_ = mod_json_value_grab(rhs.val_); } } #if __cplusplus >= 201103L //! Constructor JsonValue(JsonValue &&rhs) : val_(rhs.val_) { rhs.val_ = 0; } #endif //! Destructor ~JsonValue(void) { mod_json_value_unset(val_); } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const JsonValue &rhs) { this->assign(rhs); return *this; } #if __cplusplus >= 201103L //! Assign new contents to the value, replacing its current content JsonValue &operator=(JsonValue &&rhs) { this->assign(std::move(rhs)); return *this; } #endif //! Assign new contents to the value, replacing its current content JsonValue &operator=(const bool &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const signed char &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const char &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const short int &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const int &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const long int &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const long long int &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const float &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const double &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const long double &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const unsigned char &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const unsigned short int &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const unsigned int &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const unsigned long int &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const unsigned long long int &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const JsonString &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const char *val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const std::string &val) { this->assign(val); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const JsonArray &arr) { this->assign(arr); return *this; } //! Assign new contents to the value, replacing its current content JsonValue &operator=(const JsonObject &obj) { this->assign(obj); return *this; } //! Equality bool operator==(const JsonValue &rhs) const { return mod_json_value_is_equal(val_, rhs.val_); } //! No equality bool operator!=(const JsonValue &rhs) const { return !(*this == rhs); } //! Treat self value as object by force, retrieving value of a key JsonValue &operator[](const char *key) { return this->get_value(key); } //! Retrieve a reference of value by a key JsonValue operator[](const char *key) const { return this->get_value(key); } //! Treat self value as object by force, retrieving value of a key JsonValue &operator[](const JsonString &key) { return this->get_value(key.c_str()); } //! Retrieve a reference of value by a key JsonValue operator[](const JsonString &key) const { return this->get_value(key.c_str()); } //! Treat self value as object by force, retrieving value of a key JsonValue &operator[](const std::string &key) { return this->get_value(key.c_str()); } //! Retrieve a reference of value by a key JsonValue operator[](const std::string &key) const { return this->get_value(key.c_str()); } //! Treat self value as array by force, retrieving value at index n JsonValue &operator[](size_type n) { return this->get_value(n); } //! Retrieve a reference of value at index n JsonValue operator[](size_type n) const { return this->get_value(n); } //! Retrieve non-zero if the value is valid bool is_valid(void) const { return (val_ != (mod_json_value_t *)0); } //! Retrieve non-zero if the value is a object bool is_object(void) const { return mod_json_value_is_object(val_); } //! Retrieve non-zero if the value is an array bool is_array(void) const { return mod_json_value_is_array(val_); } //! Retrieve non-zero if the value is a string bool is_string(void) const { return mod_json_value_is_string(val_); } //! Retrieve non-zero if the value is null bool is_null(void) const { return mod_json_value_is_null(val_); } //! Retrieve non-zero if the value is a float bool is_float(void) const { return mod_json_value_is_float(val_); } //! Retrieve non-zero if the value is an integer bool is_integer(void) const { return mod_json_value_is_integer(val_); } //! Retrieve non-zero if the value is a boolean bool is_boolean(void) const { return mod_json_value_is_boolean(val_); } //! Assign new contents to the value, replacing its current content void assign(const JsonValue &rhs) { mod_json_value_unset(val_); val_ = rhs.val_ ? mod_json_value_grab(rhs.val_) : 0; } #if __cplusplus >= 201103L //! Assign new contents to the value, replacing its current content void assign(JsonValue &&rhs) { mod_json_value_unset(val_); val_ = rhs.val_; rhs.val_ = 0; } #endif //! Assign new contents to the value, replacing its current content void assign(const bool &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_boolean(val_, (mod_json_boolean_t)val); } //! Assign new contents to the value, replacing its current content void assign(const signed char &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_integer(val_, (mod_json_integer_t)val); } //! Assign new contents to the value, replacing its current content void assign(const char &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_integer(val_, (mod_json_integer_t)val); } //! Assign new contents to the value, replacing its current content void assign(const short int &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_integer(val_, (mod_json_integer_t)val); } //! Assign new contents to the value, replacing its current content void assign(const int &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_integer(val_, (mod_json_integer_t)val); } //! Assign new contents to the value, replacing its current content void assign(const long int &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_integer(val_, (mod_json_integer_t)val); } //! Assign new contents to the value, replacing its current content void assign(const long long int &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_integer(val_, (mod_json_integer_t)val); } //! Assign new contents to the value, replacing its current content void assign(const float &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_float(val_, (mod_json_float_t)val); } //! Assign new contents to the value, replacing its current content void assign(const double &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_float(val_, (mod_json_float_t)val); } //! Assign new contents to the value, replacing its current content void assign(const long double &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_float(val_, (mod_json_float_t)val); } //! Assign new contents to the value, replacing its current content void assign(const unsigned char &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_integer(val_, (mod_json_integer_t)val); } //! Assign new contents to the value, replacing its current content void assign(const unsigned short int &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_integer(val_, (mod_json_integer_t)val); } //! Assign new contents to the value, replacing its current content void assign(const unsigned int &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_integer(val_, (mod_json_integer_t)val); } //! Assign new contents to the value, replacing its current content void assign(const unsigned long int &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_integer(val_, (mod_json_integer_t)val); } //! Assign new contents to the value, replacing its current content void assign(const unsigned long long int &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_integer(val_, (mod_json_integer_t)val); } //! Assign new contents to the value, replacing its current content void assign(const JsonString &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_string(val_, *(mod_json_string_t **)&val); } //! Assign new contents to the value, replacing its current content void assign(const char *val) { JsonString str(val); if (!str.is_valid() || !copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_string(val_, *(mod_json_string_t **)&str); } //! Assign new contents to the value, replacing its current content void assign(const char *val, size_type len) { JsonString str(val, len); if (!str.is_valid() || !copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_string(val_, *(mod_json_string_t **)&str); } //! Assign new contents to the value, replacing its current content void assign(const std::string &val) { JsonString str(val); if (!str.is_valid() || !copy_on_write()) { throw std::runtime_error("JsonValue::assign"); } mod_json_value_assign_string(val_, *(mod_json_string_t **)&str); } //! Assign new contents to the value, replacing its current content void assign(const JsonArray &arr); //! Assign new contents to the value, replacing its current content void assign(const JsonObject &obj); //! Retrieve refer-counter of JSON value ssize_type refer(void) const { return mod_json_value_refer(val_); } //! Retrieve value as JSON format string JsonString as_json_string(void) const { mod_json_string_t *tmp = mod_json_dump(val_); JsonString ret = *reinterpret_cast(&tmp); if (tmp) { mod_json_string_unset(tmp); } return ret; } //! Retrieve value as a STL string std::string as_stl_string(void) const { if (is_string()) { return to_string().as_stl_string(); } return std::string(); } //! Retrieve value as JSON string const JsonString &as_string(void) const { if (!is_string()) { throw std::logic_error("JsonValue::as_string"); } return to_string(); } //! Retrieve value as c-style string const char *as_c_string(void) const { return mod_json_value_cstring(val_); } //! Retrieve value as JSON string JsonString &as_string(void) { if (!is_string()) { throw std::logic_error("JsonValue::as_string"); } if (!copy_and_leak()) { throw std::runtime_error("JsonValue::as_string"); } return to_string(); } //! Retrieve value as JSON array const JsonArray &as_array(void) const { if (!is_array()) { throw std::logic_error("JsonValue::as_array"); } return to_array(); } //! Retrieve value as JSON array JsonArray &as_array(void) { if (!is_array()) { throw std::logic_error("JsonValue::as_array"); } if (!copy_and_leak()) { throw std::runtime_error("JsonValue::as_array"); } return to_array(); } //! Retrieve value as JSON object const JsonObject &as_object(void) const { if (!is_object()) { throw std::logic_error("JsonValue::as_object"); } return to_object(); } //! Retrieve value as JSON object JsonObject &as_object(void) { if (!is_object()) { throw std::logic_error("JsonValue::as_object"); } if (!copy_and_leak()) { throw std::runtime_error("JsonValue::as_object"); } return to_object(); } //! Retrieve value as float float_type as_float(void) const { return mod_json_value_float(val_); } //! Retrieve value as integer integer_type as_integer(void) const { return mod_json_value_integer(val_); } //! Retrieve value as boolean bool as_bool(void) const { return mod_json_value_boolean(val_); } //! Exchange the content with another JSON value void swap(JsonValue &rhs) { mod_json_value_t *val = val_; val_ = rhs.val_; rhs.val_ = val; } //! Merge another JSON value void merge(const JsonValue &rhs) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::merge"); } mod_json_value_merge(val_, rhs.val_); } //! Parse a sting as a JSON value bool parse(const char *str) { mod_json_token_t *tok = mod_json_token_create(NULL); if (tok) { mod_json_value_t *jval = mod_json_parse(tok, str); mod_json_token_destroy(tok); if (jval) { *this = *reinterpret_cast(&jval); mod_json_value_unset(jval); return is_valid(); } } return false; } //! Parse a sting as a JSON value bool parse(const JsonString &str) { return this->parse(str.c_str()); } //! Parse a sting as a JSON value bool parse(const std::string &str) { return this->parse(str.c_str()); } protected: //! Clone the value for writing bool copy_on_write(void) { if (val_) { if (mod_json_value_is_shared(val_)) { mod_json_value_put(val_); val_ = mod_json_value_clone(val_); } } else { val_ = mod_json_value_set_null(); } return (val_ != 0); } //! Clone the value and leak it bool copy_and_leak(void) { if (copy_on_write()) { mod_json_value_set_leaked(val_); return true; } return false; } //! Convert value to JSON object JsonObject &to_object(void); //! Convert value to JSON object const JsonObject &to_object(void) const; //! Convert value to JSON array JsonArray &to_array(void); //! Convert value to JSON array const JsonArray &to_array(void) const; //! Convert value to JSON string JsonString &to_string(void); //! Convert value to JSON string const JsonString &to_string(void) const; //! Treat self value as object by force, retrieving value of a key JsonValue &get_value(const char *key); //! Retrieve a reference of value by a key JsonValue get_value(const char *key) const; //! Treat self value as array by force, retrieving value at index n JsonValue &get_value(size_type n); //! Retrieve a reference of value at index n JsonValue get_value(size_type n) const; //! Set the new array to the value, replacing its current content void set_value(const JsonArray &val); //! Set the new object to the value, replacing its current content void set_value(const JsonObject &val); private: mod_json_value_t *val_; }; /*! JSON Array */ class JsonArray { public: typedef mod_json_size_t size_type; typedef mod_json_ssize_t ssize_type; class iterator; class const_iterator; class reverse_iterator; class const_reverse_iterator; /*! Const iterator of JSON Array */ class const_iterator { public: //! Constructor const_iterator(void) : iter_(0) {} //! Equality bool operator==(const const_iterator &rhs) const { return (iter_ == rhs.iter_); } //! No equality bool operator!=(const const_iterator &rhs) const { return (iter_ != rhs.iter_); } //! Increment (Prefix) const_iterator &operator++() { ++iter_; return *this; } //! Increment (Suffix) const_iterator operator++(int) { const_iterator tmp = *this; ++iter_; return tmp; } //! Decrement (Prefix) const_iterator &operator--() { --iter_; return *this; } //! Decrement (Suffix) const_iterator operator--(int) { const_iterator tmp = *this; --iter_; return tmp; } //! Indirection (eg. *iter) const JsonValue &operator*() const { return *reinterpret_cast(iter_); } //! Structure dereference (eg. iter->) const JsonValue *operator->() const { return reinterpret_cast(iter_); } //! Retrieve as const reverse iterator operator const_reverse_iterator() const { return const_reverse_iterator(iter_); } protected: friend class JsonArray; friend class JsonArray::iterator; friend class JsonArray::reverse_iterator; friend class JsonArray::const_reverse_iterator; //! Constructor for friends const_iterator(mod_json_value_t *const *iter) : iter_(iter) {} private: mod_json_value_t *const *iter_; }; /*! iterator of JSON Array */ class iterator { public: //! Constructor iterator(void) : iter_(0) {} //! Equality bool operator==(const iterator &rhs) const { return (iter_ == rhs.iter_); } //! No equality bool operator!=(const iterator &rhs) const { return (iter_ != rhs.iter_); } //! Increment (Prefix) iterator &operator++() { ++iter_; return *this; } //! Increment (Suffix) iterator operator++(int) { iterator tmp = *this; ++iter_; return tmp; } //! Decrement (Prefix) iterator &operator--() { --iter_; return *this; } //! Decrement (Suffix) iterator operator--(int) { iterator tmp = *this; --iter_; return tmp; } //! Indirection (eg. *iter) JsonValue &operator*() const { return *reinterpret_cast(iter_); } //! Structure dereference (eg. iter->) JsonValue *operator->() const { return reinterpret_cast(iter_); } //! Retrieve as const iterator operator const_iterator() const { return const_iterator(iter_); } //! Retrieve as reverse iterator operator reverse_iterator() const { return reverse_iterator(iter_); } //! Retrieve as const reverse iterator operator const_reverse_iterator() const { return const_reverse_iterator(iter_); } protected: friend class JsonArray; friend class JsonArray::reverse_iterator; //! Constructor for friends iterator(mod_json_value_t **iter) : iter_(iter) {} private: mod_json_value_t **iter_; }; /*! Const Reverse iterator of JSON Array */ class const_reverse_iterator { public: //! Constructor const_reverse_iterator(void) : iter_(0) {} //! Equality bool operator==(const const_reverse_iterator &rhs) const { return (iter_ == rhs.iter_); } //! No equality bool operator!=(const const_reverse_iterator &rhs) const { return (iter_ != rhs.iter_); } //! Increment (Prefix) const_reverse_iterator &operator++() { --iter_; return *this; } //! Increment (Suffix) const_reverse_iterator operator++(int) { const_reverse_iterator tmp = *this; --iter_; return tmp; } //! Decrement (Prefix) const_reverse_iterator &operator--() { ++iter_; return *this; } //! Decrement (Suffix) const_reverse_iterator operator--(int) { const_reverse_iterator tmp = *this; ++iter_; return tmp; } //! Indirection (eg. *iter) const JsonValue &operator*() const { return *reinterpret_cast(iter_); } //! Structure dereference (eg. iter->) const JsonValue *operator->() const { return reinterpret_cast(iter_); } //! Retrieve as const iterator operator const_iterator() const { return const_iterator(iter_); } protected: friend class JsonArray; friend class JsonArray::iterator; friend class JsonArray::const_iterator; friend class JsonArray::reverse_iterator; //! Constructor for friends const_reverse_iterator(mod_json_value_t *const *iter) : iter_(iter) {} private: mod_json_value_t *const *iter_; }; /*! Reverse iterator of JSON Array */ class reverse_iterator { public: //! Constructor reverse_iterator(void) : iter_(0) {} //! Equality bool operator==(const reverse_iterator &rhs) const { return (iter_ == rhs.iter_); } //! No equality bool operator!=(const reverse_iterator &rhs) const { return (iter_ != rhs.iter_); } //! Increment (Prefix) reverse_iterator &operator++() { --iter_; return *this; } //! Increment (Suffix) reverse_iterator operator++(int) { reverse_iterator tmp = *this; --iter_; return tmp; } //! Decrement (Prefix) reverse_iterator &operator--() { ++iter_; return *this; } //! Decrement (Suffix) reverse_iterator operator--(int) { reverse_iterator tmp = *this; ++iter_; return tmp; } //! Indirection (eg. *iter) JsonValue &operator*() const { return *reinterpret_cast(iter_); } //! Structure dereference (eg. iter->) JsonValue *operator->() const { return reinterpret_cast(iter_); } //! Retrieve as iterator operator iterator() const { return iterator(iter_); } //! Retrieve as const iterator operator const_iterator() const { return const_iterator(iter_); } //! Retrieve as const reverse iterator operator const_reverse_iterator() const { return const_reverse_iterator(iter_); } protected: friend class JsonArray; friend class JsonArray::iterator; //! Constructor for friends reverse_iterator(mod_json_value_t **iter) : iter_(iter) {} private: mod_json_value_t **iter_; }; //! Constructor JsonArray(void) : arr_(0) {} //! Constructor JsonArray(const JsonArray &rhs) : arr_(0) { if (rhs.arr_) { arr_ = mod_json_array_grab(rhs.arr_); } } #if __cplusplus >= 201103L //! Constructor JsonArray(JsonArray &&rhs) : arr_(rhs.arr_) { rhs.arr_ = 0; } #endif //! Destructor ~JsonArray(void) { mod_json_array_unset(arr_); } //! Assign new contents to the array, replacing its current content JsonArray &operator=(const JsonArray &rhs) { this->assign(rhs); return *this; } #if __cplusplus >= 201103L //! Assign new contents to the array, replacing its current content JsonArray &operator=(JsonArray &&rhs) { this->assign(std::move(rhs)); return *this; } #endif //! Equality bool operator==(const JsonArray &rhs) const { return mod_json_array_is_equal(arr_, rhs.arr_); } //! No equality bool operator!=(const JsonArray &rhs) const { return !(*this == rhs); } //! Retrieve the value at index n, if no one exists, throw an exception. JsonValue &operator[](size_type n) { return this->at(n); } //! Retrieve the value at index n, if no one exists, return a null value. JsonValue operator[](size_type n) const { return ((n < this->size()) ? this->get_value(n) : JsonValue()); } //! Retrieve non-zero if the array is valid bool is_valid(void) const { return (arr_ != (mod_json_array_t *)0); } //! Retrieve non-zero if the array is empty bool empty(void) const { return mod_json_array_empty(arr_); } //! Retrieve the size of JSON array size_type size(void) const { return mod_json_array_count(arr_); } //! Retrieve the capacity of JSON array size_type capacity(void) const { return mod_json_array_capacity(arr_); } //! Retrieve refer-counter of JSON array ssize_type refer(void) const { return mod_json_array_refer(arr_); } //! Assign new contents to the array, replacing its current content void assign(const JsonArray &rhs) { mod_json_array_unset(arr_); arr_ = rhs.arr_ ? mod_json_array_grab(rhs.arr_) : 0; } #if __cplusplus >= 201103L //! Assign new contents to the array, replacing its current content void assign(JsonArray &&rhs) { mod_json_array_unset(arr_); arr_ = rhs.arr_; rhs.arr_ = 0; } #endif //! Request a change in capacity void reserve(size_type n) { if (!copy_on_write() || mod_json_array_reserve(arr_, n) != 0) { throw std::runtime_error("JsonArray::reserve"); } } //! Reverse the order of the elements void reverse(void) { if (arr_ && copy_on_write()) { mod_json_array_reverse(arr_); } } //! Push a value to array void push(const JsonValue &val) { JsonValue tmp(val); if (!copy_on_write() || mod_json_array_push(arr_, *((mod_json_value_t **)&tmp)) != 0) { throw std::runtime_error("JsonArray::push"); } } //! Pop the last element from array void pop(void) { if (arr_) { if (!copy_on_write()) { throw std::runtime_error("JsonArray::pop"); } mod_json_array_pop(arr_); } } //! Remove the first element of array void shift(void) { if (arr_) { if (!copy_on_write()) { throw std::runtime_error("JsonArray::shift"); } mod_json_array_shift(arr_); } } //! Retrieve the value at index n JsonValue &at(size_type n) { if (this->size() <= n) { throw std::out_of_range("JsonArray::at"); } if (!copy_and_leak()) { throw std::runtime_error("JsonArray::at"); } return this->get_value(n); } //! Retrieve the value at index n const JsonValue &at(size_type n) const { if (this->size() <= n) { throw std::out_of_range("JsonArray::at"); } return this->get_value(n); } //! Retrieve a reference to the first element JsonValue &front(void) { if (this->size() <= 0) { throw std::out_of_range("JsonArray::front"); } if (!copy_and_leak()) { throw std::runtime_error("JsonArray::front"); } return this->get_value(0); } //! Retrieve a reference to the first element const JsonValue &front(void) const { if (this->size() <= 0) { throw std::out_of_range("JsonArray::front"); } return this->get_value(0); } //! Retrieve a reference to the last element JsonValue &back(void) { if (this->size() <= 0) { throw std::out_of_range("JsonArray::back"); } if (!copy_and_leak()) { throw std::runtime_error("JsonArray::back"); } return this->get_value(this->size() - 1); } //! Retrieve a reference to the last element const JsonValue &back(void) const { if (this->size() <= 0) { throw std::out_of_range("JsonArray::back"); } return this->get_value(this->size() - 1); } //! Clear the JSON array void clear(void) { mod_json_array_unset(arr_); arr_ = 0; } //! Exchange the content with another JSON array void swap(JsonArray &rhs) { mod_json_array_t *arr = arr_; arr_ = rhs.arr_; rhs.arr_ = arr; } //! Merge another JSON array void merge(const JsonArray &rhs) { if (!copy_on_write()) { throw std::runtime_error("JsonArray::merge"); } mod_json_array_merge(arr_, rhs.arr_); } //! Resize a JSON array so that it contains n elements void resize(size_type n, const JsonValue &val = JsonValue()) { if (!copy_on_write() || mod_json_array_resize(arr_, n, *((mod_json_value_t **)&val)) != 0) { throw std::runtime_error("JsonArray::resize"); } } //! Retrieve an iterator pointing to the first element iterator begin(void) { if (copy_and_leak()) { return iterator(mod_json_array_begin(arr_)); } return iterator(); } //! Retrieve a const iterator pointing to the first element const_iterator begin(void) const { if (arr_) { return const_iterator(mod_json_array_begin(arr_)); } return const_iterator(); } //! Retrieve a const iterator pointing to the first element const_iterator cbegin(void) const { if (arr_) { return const_iterator(mod_json_array_begin(arr_)); } return const_iterator(); } //! Retrieve a reverse iterator pointing to the last element reverse_iterator rbegin(void) { if (copy_and_leak()) { return reverse_iterator(mod_json_array_rbegin(arr_)); } return reverse_iterator(); } //! Retrieve a const reverse iterator pointing to the last element const_reverse_iterator rbegin(void) const { if (arr_) { return const_reverse_iterator(mod_json_array_rbegin(arr_)); } return const_reverse_iterator(); } //! Retrieve a const reverse iterator pointing to the last element const_reverse_iterator crbegin(void) const { if (arr_) { return const_reverse_iterator(mod_json_array_rbegin(arr_)); } return const_reverse_iterator(); } //! Retrieve an iterator pointing to the past-the-end element iterator end(void) { if (copy_and_leak()) { return iterator(mod_json_array_end(arr_)); } return iterator(); } //! Retrieve a const iterator pointing to the past-the-end element const_iterator end(void) const { if (arr_) { return const_iterator(mod_json_array_end(arr_)); } return const_iterator(); } //! Retrieve a const iterator pointing to the past-the-end element const_iterator cend(void) const { if (arr_) { return const_iterator(mod_json_array_end(arr_)); } return const_iterator(); } //! Retrieve a reverse pointing to the past-the-end element reverse_iterator rend(void) { if (copy_and_leak()) { return reverse_iterator(mod_json_array_rend(arr_)); } return reverse_iterator(); } //! Retrieve a const reverse pointing to the past-the-end element const_reverse_iterator rend(void) const { if (arr_) { return const_reverse_iterator(mod_json_array_rend(arr_)); } return const_reverse_iterator(); } //! Retrieve a const reverse pointing to the past-the-end element const_reverse_iterator crend(void) const { if (arr_) { return const_reverse_iterator(mod_json_array_rend(arr_)); } return const_reverse_iterator(); } protected: //! Clone the array for writing bool copy_on_write(void) { if (arr_) { if (mod_json_array_is_shared(arr_)) { mod_json_array_put(arr_); arr_ = mod_json_array_clone(arr_); } } else { arr_ = mod_json_array_set_default(); } return (arr_ != 0); } //! Clone the array and leak it bool copy_and_leak(void) { if (copy_on_write()) { mod_json_array_set_leaked(arr_); return true; } return false; } //! Retrieve the value at index n JsonValue &get_value(size_type n) { return *reinterpret_cast(arr_->first + n); } //! Retrieve the value at index n const JsonValue &get_value(size_type n) const { return *reinterpret_cast(arr_->first + n); } private: mod_json_array_t *arr_; }; /*! JSON Pair */ class JsonPair { public: //! Constructor JsonPair(void) : pair_(0) {} //! Retrieve non-zero if the pair is valid bool is_valid(void) const { return (pair_ != (mod_json_pair_t *)0); } //! Retrieve the key of pair const JsonString &key(void) const { return *reinterpret_cast(&pair_->key); } //! Retrieve the value of pair JsonValue &value(void) { return *reinterpret_cast(&pair_->val); } //! Retrieve the value of pair const JsonValue &value(void) const { return *reinterpret_cast(&pair_->val); } protected: friend class JsonObject; //! Constructor for friends JsonPair(mod_json_pair_t *pair) : pair_(pair) {} //! Constructor for friends JsonPair(const JsonPair &rhs) : pair_(rhs.pair_) {} private: mod_json_pair_t *pair_; }; /*! JSON Object */ class JsonObject { public: typedef mod_json_size_t size_type; typedef mod_json_ssize_t ssize_type; class iterator; class const_iterator; class reverse_iterator; class const_reverse_iterator; /*! Const iterator of JSON Object */ class const_iterator { public: //! Constructor const_iterator(void) : iter_(0) {} //! Equality bool operator==(const const_iterator &rhs) const { return (iter_ == rhs.iter_); } //! No equality bool operator!=(const const_iterator &rhs) const { return (iter_ != rhs.iter_); } //! Increment (Prefix) const_iterator &operator++() { ++iter_; return *this; } //! Increment (Suffix) const_iterator operator++(int) { const_iterator tmp = *this; ++iter_; return tmp; } //! Decrement (Prefix) const_iterator &operator--() { --iter_; return *this; } //! Decrement (Suffix) const_iterator operator--(int) { const_iterator tmp = *this; --iter_; return tmp; } //! Indirection (eg. *iter) const JsonPair &operator*() const { return *reinterpret_cast(&iter_); } //! Structure dereference (eg. iter->) const JsonPair *operator->() const { return reinterpret_cast(&iter_); } //! Retrieve as const reverse iterator operator const_reverse_iterator() const { return const_reverse_iterator(iter_); } protected: friend class JsonObject; friend class JsonObject::iterator; friend class JsonObject::reverse_iterator; friend class JsonObject::const_reverse_iterator; //! Constructor for friends const_iterator(const mod_json_pair_t *iter) : iter_(iter) {} private: const mod_json_pair_t *iter_; }; /*! iterator of JSON Object */ class iterator { public: //! Constructor iterator(void) : iter_(0) {} //! Equality bool operator==(const iterator &rhs) const { return (iter_ == rhs.iter_); } //! No equality bool operator!=(const iterator &rhs) const { return (iter_ != rhs.iter_); } //! Increment (Prefix) iterator &operator++() { ++iter_; return *this; } //! Increment (Suffix) iterator operator++(int) { iterator tmp = *this; ++iter_; return tmp; } //! Decrement (Prefix) iterator &operator--() { --iter_; return *this; } //! Decrement (Suffix) iterator operator--(int) { iterator tmp = *this; --iter_; return tmp; } //! Indirection (eg. *iter) JsonPair &operator*() const { return *reinterpret_cast((mod_json_pair_t **)&iter_); } //! Structure dereference (eg. iter->) JsonPair *operator->() const { return reinterpret_cast((mod_json_pair_t **)&iter_); } //! Retrieve as const iterator operator const_iterator() const { return const_iterator(iter_); } //! Retrieve as reverse iterator operator reverse_iterator() const { return reverse_iterator(iter_); } //! Retrieve as const reverse iterator operator const_reverse_iterator() const { return const_reverse_iterator(iter_); } protected: friend class JsonObject; friend class JsonObject::reverse_iterator; //! Constructor for friends iterator(mod_json_pair_t *iter) : iter_(iter) {} private: mod_json_pair_t *iter_; }; /*! Const Reverse iterator of JSON Object */ class const_reverse_iterator { public: //! Constructor const_reverse_iterator(void) : iter_(0) {} //! Equality bool operator==(const const_reverse_iterator &rhs) const { return (iter_ == rhs.iter_); } //! No equality bool operator!=(const const_reverse_iterator &rhs) const { return (iter_ != rhs.iter_); } //! Increment (Prefix) const_reverse_iterator &operator++() { --iter_; return *this; } //! Increment (Suffix) const_reverse_iterator operator++(int) { const_reverse_iterator tmp = *this; --iter_; return tmp; } //! Decrement (Prefix) const_reverse_iterator &operator--() { ++iter_; return *this; } //! Decrement (Suffix) const_reverse_iterator operator--(int) { const_reverse_iterator tmp = *this; ++iter_; return tmp; } //! Indirection (eg. *iter) const JsonPair &operator*() const { return *reinterpret_cast(&iter_); } //! Structure dereference (eg. iter->) const JsonPair *operator->() const { return reinterpret_cast(&iter_); } //! Retrieve as const iterator operator const_iterator() const { return const_iterator(iter_); } protected: friend class JsonObject; friend class JsonObject::iterator; friend class JsonObject::const_iterator; friend class JsonObject::reverse_iterator; //! Constructor for friends const_reverse_iterator(const mod_json_pair_t *iter) : iter_(iter) {} private: const mod_json_pair_t *iter_; }; /*! iterator of JSON Object */ class reverse_iterator { public: //! Constructor reverse_iterator(void) : iter_(0) {} //! Equality bool operator==(const reverse_iterator &rhs) const { return (iter_ == rhs.iter_); } //! No equality bool operator!=(const reverse_iterator &rhs) const { return (iter_ != rhs.iter_); } //! Increment (Prefix) reverse_iterator &operator++() { --iter_; return *this; } //! Increment (Suffix) reverse_iterator operator++(int) { reverse_iterator tmp = *this; --iter_; return tmp; } //! Decrement (Prefix) reverse_iterator &operator--() { ++iter_; return *this; } //! Decrement (Suffix) reverse_iterator operator--(int) { reverse_iterator tmp = *this; ++iter_; return tmp; } //! Indirection (eg. *iter) JsonPair &operator*() const { return *reinterpret_cast((mod_json_pair_t **)&iter_); } //! Structure dereference (eg. iter->) JsonPair *operator->() const { return reinterpret_cast((mod_json_pair_t **)&iter_); } //! Retrieve as iterator operator iterator() const { return iterator(iter_); } //! Retrieve as const iterator operator const_iterator() const { return const_iterator(iter_); } //! Retrieve as const reverse iterator operator const_reverse_iterator() const { return const_reverse_iterator(iter_); } protected: friend class JsonObject; friend class JsonArray::iterator; //! Constructor for friends reverse_iterator(mod_json_pair_t *iter) : iter_(iter) {} private: mod_json_pair_t *iter_; }; //! Constructor JsonObject(void) : obj_(0) {} //! Constructor JsonObject(const JsonObject &rhs) : obj_(0) { if (rhs.obj_) { obj_ = mod_json_object_grab(rhs.obj_); } } #if __cplusplus >= 201103L //! Constructor JsonObject(JsonObject &&rhs) : obj_(rhs.obj_) { rhs.obj_ = 0; } #endif //! Destructor ~JsonObject(void) { mod_json_object_unset(obj_); } //! Assign new contents to the object, replacing its current content JsonObject &operator=(const JsonObject &rhs) { this->assign(rhs); return *this; } #if __cplusplus >= 201103L //! Assign new contents to the object, replacing its current content JsonObject &operator=(JsonObject &&rhs) { this->assign(std::move(rhs)); return *this; } #endif //! Equality bool operator==(const JsonObject &rhs) const { return mod_json_object_is_equal(obj_, rhs.obj_); } //! No equality bool operator!=(const JsonObject &rhs) const { return !(*this == rhs); } //! Retrieve the value of a key, if no one exists, create a new one. JsonValue &operator[](const char *key) { if (!key) { throw std::invalid_argument("JsonObject::operator[]"); } if (!copy_and_leak()) { throw std::runtime_error("JsonObject::operator[]"); } JsonPair pair(mod_json_object_touch(obj_, key)); if (!pair.is_valid()) { throw std::runtime_error("JsonObject::operator[]"); } return pair.value(); } //! Retrieve the value of a key, if no one exists, return a null value. JsonValue operator[](const char *key) const { if (!key) { throw std::invalid_argument("JsonObject::operator[]"); } JsonPair pair(mod_json_object_find(obj_, key)); return (pair.is_valid() ? pair.value() : JsonValue()); } //! Retrieve the value of a key, if no one exists, create a new one. JsonValue &operator[](const JsonString &key) { return (*this)[key.c_str()]; } //! Retrieve the value of a key, if no one exists, return a null value. JsonValue operator[](const JsonString &key) const { return (*this)[key.c_str()]; } //! Retrieve non-zero if the object is valid bool is_valid(void) const { return (obj_ != (mod_json_object_t *)0); } //! Retrieve non-zero if the object is empty bool empty(void) const { return mod_json_object_empty(obj_); } //! Retrieve the size of JSON object size_type size(void) const { return mod_json_object_count(obj_); } //! Retrieve refer-counter of JSON object ssize_type refer(void) const { return mod_json_object_refer(obj_); } //! Assign new contents to the object, replacing its current content void assign(const JsonObject &rhs) { mod_json_object_unset(obj_); obj_ = rhs.obj_ ? mod_json_object_grab(rhs.obj_) : 0; } #if __cplusplus >= 201103L //! Assign new contents to the object, replacing its current content void assign(JsonObject &&rhs) { mod_json_object_unset(obj_); obj_ = rhs.obj_; rhs.obj_ = 0; } #endif //! Clear the JSON object void clear(void) { mod_json_object_unset(obj_); obj_ = 0; } //! Set the value of a key bool set(const JsonString &key, const JsonValue &val) { JsonValue tmp(val); if (!copy_on_write()) { throw std::runtime_error("JsonObject::set"); } return (mod_json_object_insert(obj_, *(mod_json_string_t **)&key, *(mod_json_value_t **)&tmp) != (mod_json_pair_t *)0); } //! Retrieve the value of a key bool get(const char *key, JsonValue *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = pair.value(); return true; } //! Retrieve the value of a key bool get(const char *key, JsonString *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid() || !pair.value().is_string()) { return false; } *val = pair.value().as_string(); return true; } //! Retrieve the value of a key bool get(const char *key, std::string *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid() || !pair.value().is_string()) { return false; } *val = pair.value().as_stl_string(); return true; } //! Retrieve the value of a key bool get(const char *key, JsonArray *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid() || !pair.value().is_array()) { return false; } *val = pair.value().as_array(); return true; } //! Retrieve the value of a key bool get(const char *key, JsonObject *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid() || !pair.value().is_object()) { return false; } *val = pair.value().as_object(); return true; } //! Retrieve the value of a key bool get(const char *key, bool *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = pair.value().as_bool(); return true; } //! Retrieve the value of a key bool get(const char *key, signed char *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = static_cast(pair.value().as_integer()); return true; } //! Retrieve the value of a key bool get(const char *key, char *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = static_cast(pair.value().as_integer()); return true; } //! Retrieve the value of a key bool get(const char *key, short int *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = static_cast(pair.value().as_integer()); return true; } //! Retrieve the value of a key bool get(const char *key, int *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = static_cast(pair.value().as_integer()); return true; } //! Retrieve the value of a key bool get(const char *key, long int *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = static_cast(pair.value().as_integer()); return true; } //! Retrieve the value of a key bool get(const char *key, long long int *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = static_cast(pair.value().as_integer()); return true; } //! Retrieve the value of a key bool get(const char *key, unsigned char *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = static_cast(pair.value().as_integer()); return true; } //! Retrieve the value of a key bool get(const char *key, unsigned short int *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = static_cast(pair.value().as_integer()); return true; } //! Retrieve the value of a key bool get(const char *key, unsigned int *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = static_cast(pair.value().as_integer()); return true; } //! Retrieve the value of a key bool get(const char *key, unsigned long int *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = static_cast(pair.value().as_integer()); return true; } //! Retrieve the value of a key bool get(const char *key, unsigned long long int *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = static_cast(pair.value().as_integer()); return true; } //! Retrieve the value of a key bool get(const char *key, float *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = static_cast(pair.value().as_float()); return true; } //! Retrieve the value of a key bool get(const char *key, double *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = static_cast(pair.value().as_float()); return true; } //! Retrieve the value of a key bool get(const char *key, long double *val) const { const JsonPair pair(mod_json_object_find(obj_, key)); if (!pair.is_valid()) { return false; } *val = static_cast(pair.value().as_float()); return true; } //! Retrieve the value of a key template bool get(const JsonString &key, T *val) const { return this->get(key.c_str(), val); } //! Retrieve the value of a key template bool get(const std::string &key, T *val) const { return this->get(key.c_str(), val); } //! Delete a key-value pair from JSON object void unset(const char *key) { if (obj_ && key) { if (!copy_on_write()) { throw std::runtime_error("JsonObject::unset"); } mod_json_object_erase(obj_, key); } } //! Retrieve non-zero if the key exists in JSON object bool has(const char *key) const { return (mod_json_object_find(obj_, key) != (mod_json_pair_t *)0); } //! Exchange the content with another JSON object void swap(JsonObject &rhs) { mod_json_object_t *obj = obj_; obj_ = rhs.obj_; rhs.obj_ = obj; } //! Merge another JSON object void merge(const JsonObject &rhs) { if (!copy_on_write()) { throw std::runtime_error("JsonObject::merge"); } mod_json_object_merge(obj_, rhs.obj_); } //! Retrieve an iterator pointing to the first element iterator begin(void) { if (copy_and_leak()) { return iterator(mod_json_object_begin(obj_)); } return iterator(); } //! Retrieve a const iterator pointing to the first element const_iterator begin(void) const { if (obj_) { return const_iterator(mod_json_object_begin(obj_)); } return const_iterator(); } //! Retrieve a const iterator pointing to the first element const_iterator cbegin(void) const { if (obj_) { return const_iterator(mod_json_object_begin(obj_)); } return const_iterator(); } //! Retrieve a reverse iterator pointing to the last element reverse_iterator rbegin(void) { if (copy_and_leak()) { return reverse_iterator(mod_json_object_rbegin(obj_)); } return reverse_iterator(); } //! Retrieve a const reverse iterator pointing to the last element const_reverse_iterator rbegin(void) const { if (obj_) { return const_reverse_iterator(mod_json_object_rbegin(obj_)); } return const_reverse_iterator(); } //! Retrieve a const reverse iterator pointing to the last element const_reverse_iterator crbegin(void) const { if (obj_) { return const_reverse_iterator(mod_json_object_rbegin(obj_)); } return const_reverse_iterator(); } //! Retrieve an iterator pointing to the past-the-end element iterator end(void) { if (copy_and_leak()) { return iterator(mod_json_object_end(obj_)); } return iterator(); } //! Retrieve a const iterator pointing to the past-the-end element const_iterator end(void) const { if (obj_) { return const_iterator(mod_json_object_end(obj_)); } return const_iterator(); } //! Retrieve a const iterator pointing to the past-the-end element const_iterator cend(void) const { if (obj_) { return const_iterator(mod_json_object_end(obj_)); } return const_iterator(); } //! Retrieve a reverse pointing to the past-the-end element reverse_iterator rend(void) { if (copy_and_leak()) { return reverse_iterator(mod_json_object_rend(obj_)); } return reverse_iterator(); } //! Retrieve a const reverse pointing to the past-the-end element const_reverse_iterator rend(void) const { if (obj_) { return const_reverse_iterator(mod_json_object_rend(obj_)); } return const_reverse_iterator(); } //! Retrieve a const reverse pointing to the past-the-end element const_reverse_iterator crend(void) const { if (obj_) { return const_reverse_iterator(mod_json_object_rend(obj_)); } return const_reverse_iterator(); } protected: //! Clone the object for writing bool copy_on_write(void) { if (obj_) { if (mod_json_object_is_shared(obj_)) { mod_json_object_put(obj_); obj_ = mod_json_object_clone(obj_); } } else { obj_ = mod_json_object_set_default(); } return (obj_ != 0); } //! Clone the object and leak it bool copy_and_leak(void) { if (copy_on_write()) { mod_json_object_set_leaked(obj_); return true; } return false; } private: mod_json_object_t *obj_; }; //! Assign new contents to the value, replacing its current content inline void JsonValue::assign(const JsonArray &arr) { this->set_value(arr); } //! Assign new contents to the value, replacing its current content inline void JsonValue::assign(const JsonObject &obj) { this->set_value(obj); } //! Convert value to JSON object inline JsonObject &JsonValue::to_object(void) { return *reinterpret_cast(&val_->data.c_obj); } //! Convert value to JSON object inline const JsonObject &JsonValue::to_object(void) const { return *reinterpret_cast(&val_->data.c_obj); } //! Convert value to JSON array inline JsonArray &JsonValue::to_array(void) { return *reinterpret_cast(&val_->data.c_arr); } //! Convert value to JSON array inline const JsonArray &JsonValue::to_array(void) const { return *reinterpret_cast(&val_->data.c_arr); } //! Convert value to JSON string inline JsonString &JsonValue::to_string(void) { return *reinterpret_cast(&val_->data.c_str); } //! Convert value to JSON string inline const JsonString &JsonValue::to_string(void) const { return *reinterpret_cast(&val_->data.c_str); } //! Treat self value as object by force, retrieving value of a key inline JsonValue &JsonValue::get_value(const char *key) { if (!is_object()) { *this = JsonObject(); } if (!copy_and_leak()) { throw std::runtime_error("JsonValue::get_value"); } return (to_object())[key]; } //! Retrieve a reference of value by a key inline JsonValue JsonValue::get_value(const char *key) const { return (is_object() ? (to_object())[key] : JsonValue()); } //! Treat self value as array by force, retrieving value at index n inline JsonValue &JsonValue::get_value(size_type n) { if (!is_array()) { throw std::logic_error("JsonValue::get_value"); } if (!copy_and_leak()) { throw std::runtime_error("JsonValue::get_value"); } return (to_array())[n]; } //! Retrieve a reference of value at index n inline JsonValue JsonValue::get_value(size_type n) const { return (is_array() ? (to_array())[n] : JsonValue()); } //! Set the new array to the value, replacing its current content inline void JsonValue::set_value(const JsonArray &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::set_value"); } mod_json_value_assign_array(val_, *(mod_json_array_t **)&val); } //! Set the new object to the value, replacing its current content inline void JsonValue::set_value(const JsonObject &val) { if (!copy_on_write()) { throw std::runtime_error("JsonValue::set_value"); } mod_json_value_assign_object(val_, *(mod_json_object_t **)&val); } /*! JSON Parser */ class JsonParser { public: typedef mod_json_size_t size_type; //! Constructor JsonParser(void) : state_(mod_json_state_null), error_(mod_json_error_null), context_(0) { option_.options = 0; option_.object_depth = 0; option_.array_depth = 0; } //! Destructor ~JsonParser(void) {} //! Set the max object depth void set_object_depth(size_type depth) { option_.object_depth = depth; } //! Set the max array depth void set_array_depth(size_type depth) { option_.array_depth = depth; } //! Enable/Disable comments void set_comment(bool enable = true) { if (enable) { option_.options |= MOD_JSON_COMMENT; } else { option_.options &= ~MOD_JSON_COMMENT; } } //! Enable/Disable loose strings void set_unstrict(bool enable = true) { if (enable) { option_.options |= MOD_JSON_UNSTRICT; } else { option_.options &= ~MOD_JSON_UNSTRICT; } } //! Enable/Disable simple format void set_simple(bool enable = true) { if (enable) { option_.options |= MOD_JSON_SIMPLE; } else { option_.options &= ~MOD_JSON_SIMPLE; } } //! Enable/Disable single quotes support void set_squote(bool enable = true) { if (enable) { option_.options |= MOD_JSON_SQUOTE; } else { option_.options &= ~MOD_JSON_SQUOTE; } } //! Convert a sting to a JSON value bool parse(const char *str, JsonValue *out) { mod_json_token_t *tok; state_ = mod_json_state_null; error_ = mod_json_error_null; context_ = str; tok = mod_json_token_create(&option_); if (tok) { mod_json_value_t *jval; jval = mod_json_parse(tok, str); /* save information of token */ state_ = mod_json_token_state(tok); error_ = mod_json_token_error(tok); context_ = mod_json_token_context(tok); mod_json_token_destroy(tok); if (jval) { *out = *reinterpret_cast(&jval); mod_json_value_unset(jval); return out->is_valid(); } } return false; } //! Retrieve the error code of parser int error(void) const { return (int)error_; } //! Retrieve the state code of parser int state(void) const { return (int)state_; } //! Retrieve the context of parser const char *context(void) const { return context_; } private: mod_json_option_t option_; mod_json_state_t state_; mod_json_error_t error_; mod_json_cchar_t *context_; }; /*! JSON Dumper */ class JsonDumper { public: //! Constructor JsonDumper(void) : str_() {} //! Destructor ~JsonDumper(void) {} //! Dump a JSON value to string bool dump(const JsonValue &val) { mod_json_string_t *str; str = mod_json_dump(*((mod_json_value_t **)&val)); str_ = *reinterpret_cast(&str); if (str) { mod_json_string_unset(str); return true; } return false; } //! Retrieve result of dumper JsonString &result(void) { return str_; } //! Retrieve result of dumper const JsonString &result(void) const { return str_; } private: JsonString str_; }; //! Equality static inline bool operator==(const ailego::JsonString &lhs, const char *rhs) { const char *self = lhs.c_str(); if (self == rhs) { return true; } if (self && rhs) { return (std::strcmp(self, rhs) == 0); } return false; } //! Equality static inline bool operator==(const char *lhs, const ailego::JsonString &rhs) { return (rhs == lhs); } //! Equality static inline bool operator==(const ailego::JsonString &lhs, const std::string &rhs) { std::size_t ls = lhs.size(); std::size_t rs = rhs.size(); if (ls == 0 && rs == 0) { return true; } if (ls == rs) { const char *ld = lhs.data(); const char *rd = rhs.data(); if (ld && rd) { return (std::memcmp(ld, rd, ls) == 0); } } return false; } //! Equality static inline bool operator==(const std::string &lhs, const JsonString &rhs) { return (rhs == lhs); } //! Equality static inline bool operator==(const JsonString &lhs, const JsonValue &rhs) { return (rhs.is_string() ? lhs == rhs.as_string() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const JsonString &rhs) { return (lhs.is_string() ? lhs.as_string() == rhs : false); } //! Equality static inline bool operator==(const JsonArray &lhs, const JsonValue &rhs) { return (rhs.is_array() ? lhs == rhs.as_array() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const JsonArray &rhs) { return (lhs.is_array() ? lhs.as_array() == rhs : false); } //! Equality static inline bool operator==(const JsonObject &lhs, const JsonValue &rhs) { return (rhs.is_object() ? lhs == rhs.as_object() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const JsonObject &rhs) { return (lhs.is_object() ? lhs.as_object() == rhs : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const bool &rhs) { return (lhs.is_boolean() ? lhs.as_bool() == rhs : false); } //! Equality static inline bool operator==(const bool &lhs, const JsonValue &rhs) { return (rhs.is_boolean() ? lhs == rhs.as_bool() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const signed char &rhs) { return (lhs.is_integer() ? lhs.as_integer() == static_cast(rhs) : false); } //! Equality static inline bool operator==(const signed char &lhs, const JsonValue &rhs) { return (rhs.is_integer() ? static_cast(lhs) == rhs.as_integer() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const char &rhs) { return (lhs.is_integer() ? lhs.as_integer() == static_cast(rhs) : false); } //! Equality static inline bool operator==(const char &lhs, const JsonValue &rhs) { return (rhs.is_integer() ? static_cast(lhs) == rhs.as_integer() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const short int &rhs) { return (lhs.is_integer() ? lhs.as_integer() == static_cast(rhs) : false); } //! Equality static inline bool operator==(const short int &lhs, const JsonValue &rhs) { return (rhs.is_integer() ? static_cast(lhs) == rhs.as_integer() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const int &rhs) { return (lhs.is_integer() ? lhs.as_integer() == static_cast(rhs) : false); } //! Equality static inline bool operator==(const int &lhs, const JsonValue &rhs) { return (rhs.is_integer() ? static_cast(lhs) == rhs.as_integer() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const long int &rhs) { return (lhs.is_integer() ? lhs.as_integer() == static_cast(rhs) : false); } //! Equality static inline bool operator==(const long int &lhs, const JsonValue &rhs) { return (rhs.is_integer() ? static_cast(lhs) == rhs.as_integer() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const long long int &rhs) { return (lhs.is_integer() ? lhs.as_integer() == static_cast(rhs) : false); } //! Equality static inline bool operator==(const long long int &lhs, const JsonValue &rhs) { return (rhs.is_integer() ? static_cast(lhs) == rhs.as_integer() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const float &rhs) { if (lhs.is_float()) { double diff = static_cast(lhs.as_float() - rhs); return ((diff < DBL_EPSILON) && (diff > -DBL_EPSILON)); } return false; } //! Equality static inline bool operator==(const float &lhs, const JsonValue &rhs) { if (rhs.is_float()) { double diff = static_cast(rhs.as_float() - lhs); return ((diff < DBL_EPSILON) && (diff > -DBL_EPSILON)); } return false; } //! Equality static inline bool operator==(const JsonValue &lhs, const double &rhs) { if (lhs.is_float()) { double diff = static_cast(lhs.as_float() - rhs); return ((diff < DBL_EPSILON) && (diff > -DBL_EPSILON)); } return false; } //! Equality static inline bool operator==(const double &lhs, const JsonValue &rhs) { if (rhs.is_float()) { double diff = static_cast(rhs.as_float() - lhs); return ((diff < DBL_EPSILON) && (diff > -DBL_EPSILON)); } return false; } //! Equality static inline bool operator==(const JsonValue &lhs, const long double &rhs) { if (lhs.is_float()) { double diff = static_cast(lhs.as_float() - rhs); return ((diff < DBL_EPSILON) && (diff > -DBL_EPSILON)); } return false; } //! Equality static inline bool operator==(const long double &lhs, const JsonValue &rhs) { if (rhs.is_float()) { double diff = static_cast(rhs.as_float() - lhs); return ((diff < DBL_EPSILON) && (diff > -DBL_EPSILON)); } return false; } //! Equality static inline bool operator==(const JsonValue &lhs, const unsigned char &rhs) { return (lhs.is_integer() ? lhs.as_integer() == static_cast(rhs) : false); } //! Equality static inline bool operator==(const unsigned char &lhs, const JsonValue &rhs) { return (rhs.is_integer() ? static_cast(lhs) == rhs.as_integer() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const unsigned short int &rhs) { return (lhs.is_integer() ? lhs.as_integer() == static_cast(rhs) : false); } //! Equality static inline bool operator==(const unsigned short int &lhs, const JsonValue &rhs) { return (rhs.is_integer() ? static_cast(lhs) == rhs.as_integer() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const unsigned int &rhs) { return (lhs.is_integer() ? lhs.as_integer() == static_cast(rhs) : false); } //! Equality static inline bool operator==(const unsigned int &lhs, const JsonValue &rhs) { return (rhs.is_integer() ? static_cast(lhs) == rhs.as_integer() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const unsigned long int &rhs) { return (lhs.is_integer() ? lhs.as_integer() == static_cast(rhs) : false); } //! Equality static inline bool operator==(const unsigned long int &lhs, const JsonValue &rhs) { return (rhs.is_integer() ? static_cast(lhs) == rhs.as_integer() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const unsigned long long int &rhs) { return (lhs.is_integer() ? lhs.as_integer() == static_cast(rhs) : false); } //! Equality static inline bool operator==(const unsigned long long int &lhs, const JsonValue &rhs) { return (rhs.is_integer() ? static_cast(lhs) == rhs.as_integer() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const char *rhs) { return (lhs.is_string() ? lhs.as_string() == rhs : false); } //! Equality static inline bool operator==(const char *lhs, const JsonValue &rhs) { return (rhs.is_string() ? lhs == rhs.as_string() : false); } //! Equality static inline bool operator==(const JsonValue &lhs, const std::string &rhs) { return (lhs.is_string() ? lhs.as_string() == rhs : false); } //! Equality static inline bool operator==(const std::string &lhs, const JsonValue &rhs) { return (rhs.is_string() ? lhs == rhs.as_string() : false); } //! No equality static inline bool operator!=(const JsonString &lhs, const char *rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const char *lhs, const JsonString &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonString &lhs, const std::string &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const std::string &lhs, const JsonString &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonString &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const JsonString &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonArray &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const JsonArray &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonObject &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const JsonObject &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const bool &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const bool &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const signed char &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const signed char &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const char &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const char &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const short int &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const short int &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const int &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const int &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const long int &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const long int &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const long long int &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const long long int &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const float &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const float &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const double &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const double &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const long double &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const long double &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const unsigned char &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const unsigned char &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const unsigned short int &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const unsigned short int &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const unsigned int &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const unsigned int &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const unsigned long int &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const unsigned long int &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const unsigned long long int &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const unsigned long long int &lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const char *rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const char *lhs, const JsonValue &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const JsonValue &lhs, const std::string &rhs) { return !(lhs == rhs); } //! No equality static inline bool operator!=(const std::string &lhs, const JsonValue &rhs) { return !(lhs == rhs); } } // namespace ailego #endif // __AILEGO_ENCODING_JSON_MOD_JSON_PLUS_H__ ================================================ FILE: deps/proxima/include/ailego/encoding/json.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Jul 2018 * \brief Interface of JSON Parser/Generator */ #ifndef __AILEGO_ENCODING_JSON_H__ #define __AILEGO_ENCODING_JSON_H__ #include "json/mod_json_plus.h" #endif //__AILEGO_ENCODING_JSON_H__ ================================================ FILE: deps/proxima/include/ailego/encoding/uri.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Nov 2020 * \brief Interface of URI Parser */ #ifndef __AILEGO_ENCODING_URI_H__ #define __AILEGO_ENCODING_URI_H__ #include namespace ailego { /*! URI module */ class Uri { public: //! Constructor (STL-string) Uri(const std::string &str) { Uri::Parse(str, this); } //! Constructor (C-string) Uri(const char *str) { Uri::Parse(str, this); } //! Constructor (Empty) Uri(void) {} //! Test if the Uri is valid bool is_valid(void) const { return valid_; } //! Retrieve the scheme part of URI const std::string &scheme(void) const { return scheme_; } //! Retrieve the authority part of URI const std::string &authority(void) const { return authority_; } //! Retrieve the username part of URI const std::string &username(void) const { return username_; } //! Retrieve the password part of URI const std::string &password(void) const { return password_; } //! Retrieve the host part of URI const std::string &host(void) const { return host_; } //! Retrieve the port part of URI int32_t port(void) const { return port_; } //! Retrieve the path part of URI const std::string &path(void) const { return path_; } //! Retrieve the query part of URI const std::string &query(void) const { return query_; } //! Retrieve the fragment part of URI const std::string &fragment(void) const { return fragment_; } //! Parse a URI string (C-string) static bool Parse(const char *str, Uri *out); //! Parse a URI string (STL-string) static bool Parse(const std::string &str, Uri *out) { return Uri::Parse(str.c_str(), out); } private: bool valid_{false}; std::string scheme_{}; std::string authority_{}; std::string username_{}; std::string password_{}; std::string host_{}; int32_t port_{}; std::string path_{}; std::string query_{}; std::string fragment_{}; }; } // namespace ailego #endif //__AILEGO_ENCODING_URI_H__ ================================================ FILE: deps/proxima/include/ailego/hash/crc32c.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2017 * \brief Interface of CRC32C (Castagnoli) */ #ifndef __AILEGO_HASH_CRC32C_H__ #define __AILEGO_HASH_CRC32C_H__ #include namespace ailego { /*! Crc32c Hash */ struct Crc32c { //! Compute the CRC32C checksum for the source data buffer static uint32_t Hash(const void *data, size_t len, uint32_t crc); //! Compute the CRC32C checksum for the source data buffer static inline uint32_t Hash(const void *data, size_t len) { return Hash(data, len, 0u); } }; } // namespace ailego #endif // __AILEGO_HASH_CRC32C_H__ ================================================ FILE: deps/proxima/include/ailego/hash/fnv1.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Aug 2019 * \brief Interface of FNV-1 and FNV-1a Hash */ #ifndef __AILEGO_HASH_FNV1_H__ #define __AILEGO_HASH_FNV1_H__ #include namespace ailego { /*! FNV-1 Hash Helper (compile time) */ template struct Fnv1Helper { //! Compute FNV-1 32bit hash static inline constexpr uint32_t Hash32(const char *str) { return (Fnv1Helper::Hash32(str) * 0x1000193U) ^ (uint32_t)str[N - 1]; } //! Compute FNV-1 64bit hash static inline constexpr uint64_t Hash64(const char *str) { return (Fnv1Helper::Hash64(str) * 0x100000001B3LLU) ^ (uint64_t)str[N - 1]; } }; /*! FNV-1 Hash Helper (compile time) */ template <> struct Fnv1Helper<0> { //! Compute FNV-1 32bit hash static inline constexpr uint32_t Hash32(const char *) { return 0x811c9dc5U; } //! Compute FNV-1 64bit hash static inline constexpr uint64_t Hash64(const char *) { return 0xcbf29ce484222325LLU; } }; /*! FNV-1a Hash Helper (compile time) */ template struct Fnv1aHelper { //! Compute FNV-1 32bit hash static inline constexpr uint32_t Hash32(const char *str) { return (Fnv1aHelper::Hash32(str) ^ (uint32_t)str[N - 1]) * 0x1000193U; } //! Compute FNV-1 64bit hash static inline constexpr uint64_t Hash64(const char *str) { return (Fnv1aHelper::Hash64(str) ^ (uint64_t)str[N - 1]) * 0x100000001B3LLU; } }; /*! FNV-1a Hash Helper (compile time) */ template <> struct Fnv1aHelper<0> { //! Compute FNV-1 32bit hash static inline constexpr uint32_t Hash32(const char *) { return 0x811c9dc5U; } //! Compute FNV-1 64bit hash static inline constexpr uint64_t Hash64(const char *) { return 0xcbf29ce484222325LLU; } }; /*! FNV-1 Hash */ struct Fnv1 { //! Compute FNV-1 32bit hash in compile time template static inline constexpr uint32_t Hash32(const char (&str)[N]) { return Fnv1Helper::Hash32(str); } //! Compute FNV-1 64bit hash in compile time template static inline constexpr uint64_t Hash64(const char (&str)[N]) { return Fnv1Helper::Hash64(str); } //! Compute FNV-1 32bit hash for the source data buffer static inline uint32_t Hash32(const void *data, size_t len, uint32_t sum) { const uint8_t *iter = (const uint8_t *)data; const uint8_t *end = (const uint8_t *)data + len; while (iter < end) { // Multiply by the 32 bit FNV magic prime mod 2^32 sum += (sum << 1) + (sum << 4) + (sum << 7) + (sum << 8) + (sum << 24); // Xor the bottom with the current octet sum ^= (uint32_t)*iter++; } return sum; } //! Compute FNV-1 32bit hash for the source data buffer static inline uint32_t Hash32(const void *data, size_t len) { return Hash32(data, len, 0x811c9dc5U); } //! Compute FNV-1 64bit hash for the source data buffer static inline uint64_t Hash64(const void *data, size_t len, uint64_t sum) { const uint8_t *iter = (const uint8_t *)data; const uint8_t *end = (const uint8_t *)data + len; while (iter < end) { // Multiply by the 64 bit FNV magic prime mod 2^64 sum += (sum << 1) + (sum << 4) + (sum << 5) + (sum << 7) + (sum << 8) + (sum << 40); // Xor the bottom with the current octet sum ^= (uint64_t)*iter++; } return sum; } //! Compute FNV-1 64bit hash for the source data buffer static inline uint64_t Hash64(const void *data, size_t len) { return Hash64(data, len, 0xcbf29ce484222325LLU); } }; /*! FNV-1a Hash */ struct Fnv1a { //! Compute FNV-1a 32bit hash in compile time template static inline constexpr uint32_t Hash32(const char (&str)[N]) { return Fnv1aHelper::Hash32(str); } //! Compute FNV-1a 64bit hash in compile time template static inline constexpr uint64_t Hash64(const char (&str)[N]) { return Fnv1aHelper::Hash64(str); } //! Compute FNV-1a 32bit hash for the source data buffer static inline uint32_t Hash32(const void *data, size_t len, uint32_t sum) { const uint8_t *iter = (const uint8_t *)data; const uint8_t *end = (const uint8_t *)data + len; while (iter < end) { // Xor the bottom with the current octet sum ^= (uint32_t)*iter++; // Multiply by the 32 bit FNV magic prime mod 2^32 sum += (sum << 1) + (sum << 4) + (sum << 7) + (sum << 8) + (sum << 24); } return sum; } //! Compute FNV-1a 32bit hash for the source data buffer static inline uint32_t Hash32(const void *data, size_t len) { return Hash32(data, len, 0x811c9dc5U); } //! Compute FNV-1a 64bit hash for the source data buffer static inline uint64_t Hash64(const void *data, size_t len, uint64_t sum) { const uint8_t *iter = (const uint8_t *)data; const uint8_t *end = (const uint8_t *)data + len; while (iter < end) { // Xor the bottom with the current octet sum ^= (uint64_t)*iter++; // Multiply by the 64 bit FNV magic prime mod 2^64 sum += (sum << 1) + (sum << 4) + (sum << 5) + (sum << 7) + (sum << 8) + (sum << 40); } return sum; } //! Compute FNV-1a 64bit hash for the source data buffer static inline uint64_t Hash64(const void *data, size_t len) { return Hash64(data, len, 0xcbf29ce484222325LLU); } }; } // namespace ailego #endif // __AILEGO_HASH_FNV1_H__ ================================================ FILE: deps/proxima/include/ailego/hash/jump_hash.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2017 * \brief Interface of Jump Consistent Hash Algorithm */ #ifndef __AILEGO_HASH_JUMP_HASH_H__ #define __AILEGO_HASH_JUMP_HASH_H__ #include namespace ailego { //! Jump consistent hash algorithm (https://arxiv.org/pdf/1406.2294.pdf) static inline int32_t JumpHash(uint64_t key, int32_t num_buckets) { int64_t b = 1, j = 0; while (j < num_buckets) { b = j; key = key * 2862933555777941757ULL + 1; j = (int64_t)(double(b + 1) * (double(1LL << 31) / double((key >> 33) + 1))); } return (int32_t)b; } } // namespace ailego #endif // __AILEGO_HASH_JUMP_HASH_H__ ================================================ FILE: deps/proxima/include/ailego/internal/platform.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2017 * \brief Interface of Platform Definition */ #ifndef __AILEGO_INTERNAL_PLATFORM_H__ #define __AILEGO_INTERNAL_PLATFORM_H__ #if defined(_WIN32) || defined(_WIN64) #include #endif #include #include #include #include #include #include #include #include #include #if defined(_MSC_VER) #include #else #include #include #if defined(__x86_64__) || defined(__i386) #include #endif #if defined(__ARM_NEON) #include #endif #if defined(__ARM_FEATURE_CRC32) #include #endif #endif #if defined(__cplusplus) extern "C" { #endif #ifndef NDEBUG #define AILEGO_DEBUG #endif //! Fixed Intel intrinsics macro in MSVC #if defined(_MSC_VER) #if (_M_IX86_FP == 2 || defined(_M_AMD64) || defined(_M_X64)) #define __SSE__ 1 #define __SSE2__ 1 #if _MSC_VER >= 1500 #define __SSE3__ 1 #define __SSSE3__ 1 #define __SSE4_1__ 1 #define __SSE4_2__ 1 #endif #elif _M_IX86_FP == 1 #define __SSE__ 1 #endif #endif // _MSC_VER #if defined(_WIN32) || defined(_WIN64) #if defined(_WIN64) #define AILEGO_M64 #else #define AILEGO_M32 #endif #endif #if defined(__GNUC__) #if defined(__x86_64__) || defined(__aarch64__) || defined(__ppc64__) #define AILEGO_M64 #else #define AILEGO_M32 #endif #endif #ifndef AILEGO_ALIGNED #if defined(_MSC_VER) #define AILEGO_ALIGNED(x) __declspec(align(x)) #define AILEGO_DEPRECATED __declspec(deprecated) #elif defined(__GNUC__) #define AILEGO_ALIGNED(x) __attribute__((aligned(x))) #define AILEGO_DEPRECATED __attribute__((deprecated)) #else #define AILEGO_ALIGNED(x) #define AILEGO_DEPRECATED #endif #endif //! Add 'inline' for MSVC #if defined(_MSC_VER) && !defined(__cplusplus) #if !defined(inline) #define inline __inline #endif #endif //! Add 'ssize_t' for MSVC #if defined(_MSC_VER) typedef intptr_t ssize_t; #endif #if defined(_MSC_VER) //! Returns the number of trailing 0-bits in x static inline int ailego_ctz32(uint32_t x) { unsigned long r = 0; _BitScanForward(&r, x); return (int)r; } //! Returns the number of leading 0-bits in x static inline int ailego_clz32(uint32_t x) { unsigned long r = 0; _BitScanReverse(&r, x); return (31 - (int)r); } #if defined(AILEGO_M64) //! Returns the number of trailing 0-bits in x static inline int ailego_ctz64(uint64_t x) { unsigned long r = 0; _BitScanForward64(&r, x); return (int)r; } //! Returns the number of leading 0-bits in x static inline int ailego_clz64(uint64_t x) { unsigned long r = 0; _BitScanReverse64(&r, x); return (63 - (int)r); } #else //! Returns the number of trailing 0-bits in x static inline int ailego_ctz64(uint64_t x) { unsigned long r = 0; unsigned long m = (unsigned long)x; _BitScanForward(&r, m); if (r == 0) { m = (unsigned long)(x >> 32); _BitScanForward(&r, m); if (r != 0) { r += 32; } } return (int)r; } //! Returns the number of leading 0-bits in x static inline int ailego_clz64(uint64_t x) { unsigned long r = 0; unsigned long m = (unsigned long)(x >> 32); _BitScanReverse(&r, m); if (r != 0) { return (31 - (int)r); } m = (unsigned long)x; _BitScanReverse(&r, m); return (63 - (int)r); } #endif // AILEGO_M64 //! Counts the number of one bits #define ailego_popcount32(x) (__popcnt(x)) #define ailego_popcount64(x) (__popcnt64(x)) #define ailego_likely(x) (x) #define ailego_unlikely(x) (x) #ifdef __SSE__ #define ailego_prefetch(p) _mm_prefetch((p), 0) #else #define ailego_prefetch(p) ((void)(p)) #endif #else // !_MSC_VER #define ailego_ctz32(x) (__builtin_ctz(x)) #define ailego_ctz64(x) (__builtin_ctzll(x)) #define ailego_clz32(x) (__builtin_clz(x)) #define ailego_clz64(x) (__builtin_clzll(x)) #define ailego_popcount32(x) (__builtin_popcount(x)) #define ailego_popcount64(x) (__builtin_popcountl(x)) #define ailego_likely(x) (__builtin_expect(!!(x), 1)) #define ailego_unlikely(x) (__builtin_expect(!!(x), 0)) #define ailego_prefetch(p) (__builtin_prefetch((p))) #endif // _MSC_VER #if defined(AILEGO_M64) #define ailego_ctz ailego_ctz64 #define ailego_clz ailego_clz64 #define ailego_popcount ailego_popcount64 #else #define ailego_ctz ailego_ctz32 #define ailego_clz ailego_clz32 #define ailego_popcount ailego_popcount32 #endif // AILEGO_M64 #if defined(__arm__) || defined(__aarch64__) // ARMv7 Architecture Reference Manual (for YIELD) // ARM Compiler toolchain Compiler Reference (for __yield() instrinsic) #if defined(__CC_ARM) #define ailego_yield() __yield() #else #define ailego_yield() __asm__ __volatile__("yield") #endif // __CC_ARM #elif defined(__SSE2__) #define ailego_yield() _mm_pause() #else #define ailego_yield() ((void)0) #endif // __arm__ || __aarch64__ #if defined(_MSC_VER) #define ailego_aligned_malloc(SIZE, ALIGN) \ _aligned_malloc((size_t)(SIZE), (ALIGN)) #define ailego_aligned_free _aligned_free #else // !_MSC_VER #if defined(_ISOC11_SOURCE) #define ailego_aligned_malloc(SIZE, ALIGN) \ aligned_alloc((ALIGN), (size_t)(SIZE)) #else // !_ISOC11_SOURCE #define ailego_aligned_malloc(SIZE, ALIGN) \ ailego_posix_malloc((size_t)(SIZE), (ALIGN)) #endif // _ISOC11_SOURCE #define ailego_aligned_free free #endif // _MSC_VER #if !defined(__SANITIZE_ADDRESS__) #if defined(__has_feature) #if __has_feature(address_sanitizer) #define __SANITIZE_ADDRESS__ 1 #endif // address_sanitizer #endif // __has_feature #endif // !__SANITIZE_ADDRESS__ #if !defined(__SANITIZE_ADDRESS__) #if !defined(ailego_malloc) #if defined(__AVX512F__) #define ailego_malloc(SIZE) ailego_aligned_malloc((SIZE), 64) #elif defined(__AVX__) #define ailego_malloc(SIZE) ailego_aligned_malloc((SIZE), 32) #elif defined(__SSE__) #define ailego_malloc(SIZE) ailego_aligned_malloc((SIZE), 16) #elif defined(__ARM_NEON) #define ailego_malloc(SIZE) ailego_aligned_malloc((SIZE), 16) #endif #endif // !ailego_malloc #if (defined(__SSE__) || defined(__ARM_NEON)) && !defined(ailego_free) #define ailego_free ailego_aligned_free #endif #endif // !__SANITIZE_ADDRESS__ #ifndef ailego_malloc #define ailego_malloc(SIZE) malloc((size_t)(SIZE)) #endif #ifndef ailego_free #define ailego_free free #endif #ifndef ailego_offsetof #define ailego_offsetof(TYPE, MEMBER) ((size_t) & ((TYPE *)0)->MEMBER) #endif #ifndef ailego_align #define ailego_align(SIZE, BOUND) (((SIZE) + ((BOUND)-1)) & ~((BOUND)-1)) #endif #ifndef ailego_align8 #define ailego_align8(SIZE) ailego_align(SIZE, 8) #endif #ifndef ailego_min #define ailego_min(A, B) (((A) < (B)) ? (A) : (B)) #endif #ifndef ailego_max #define ailego_max(A, B) (((A) > (B)) ? (A) : (B)) #endif #ifndef ailego_malloc_object #define ailego_malloc_object(TYPE) ((TYPE *)ailego_malloc(sizeof(TYPE))) #endif #ifndef ailego_malloc_array #define ailego_malloc_array(TYPE, SIZE) \ ((TYPE *)ailego_malloc(SIZE * sizeof(TYPE))) #endif #ifndef ailego_minus_if_ne_zero #define ailego_minus_if_ne_zero(COND) \ if (ailego_unlikely((COND) != 0)) return (-1) #endif #ifndef ailego_zero_if_ne_zero #define ailego_zero_if_ne_zero(COND) \ if (ailego_unlikely((COND) != 0)) return (0) #endif #ifndef ailego_null_if_ne_zero #define ailego_null_if_ne_zero(COND) \ if (ailego_unlikely((COND) != 0)) return (NULL) #endif #ifndef ailego_false_if_ne_zero #define ailego_false_if_ne_zero(COND) \ if (ailego_unlikely((COND) != 0)) return (false) #endif #ifndef ailego_return_if_ne_zero #define ailego_return_if_ne_zero(COND) \ if (ailego_unlikely((COND) != 0)) return #endif #ifndef ailego_break_if_ne_zero #define ailego_break_if_ne_zero(COND) \ if (ailego_unlikely((COND) != 0)) break #endif #ifndef ailego_continue_if_ne_zero #define ailego_continue_if_ne_zero(COND) \ if (ailego_unlikely((COND) != 0)) continue #endif #ifndef ailego_do_if_ne_zero #define ailego_do_if_ne_zero(COND) if (ailego_unlikely((COND) != 0)) #endif #ifndef ailego_minus_if_lt_zero #define ailego_minus_if_lt_zero(COND) \ if (ailego_unlikely((COND) < 0)) return (-1) #endif #ifndef ailego_zero_if_lt_zero #define ailego_zero_if_lt_zero(COND) \ if (ailego_unlikely((COND) < 0)) return (0) #endif #ifndef ailego_null_if_lt_zero #define ailego_null_if_lt_zero(COND) \ if (ailego_unlikely((COND) < 0)) return (NULL) #endif #ifndef ailego_false_if_lt_zero #define ailego_false_if_lt_zero(COND) \ if (ailego_unlikely((COND) < 0)) return (false) #endif #ifndef ailego_return_if_lt_zero #define ailego_return_if_lt_zero(COND) \ if (ailego_unlikely((COND) < 0)) return #endif #ifndef ailego_break_if_lt_zero #define ailego_break_if_lt_zero(COND) \ if (ailego_unlikely((COND) < 0)) break #endif #ifndef ailego_continue_if_lt_zero #define ailego_continue_if_lt_zero(COND) \ if (ailego_unlikely((COND) < 0)) continue #endif #ifndef ailego_do_if_lt_zero #define ailego_do_if_lt_zero(COND) if (ailego_unlikely((COND) < 0)) #endif #ifndef ailego_minus_if_false #define ailego_minus_if_false(COND) \ if (ailego_unlikely(!(COND))) return (-1) #endif #ifndef ailego_zero_if_false #define ailego_zero_if_false(COND) \ if (ailego_unlikely(!(COND))) return (0) #endif #ifndef ailego_null_if_false #define ailego_null_if_false(COND) \ if (ailego_unlikely(!(COND))) return (NULL) #endif #ifndef ailego_false_if_false #define ailego_false_if_false(COND) \ if (ailego_unlikely(!(COND))) return (false) #endif #ifndef ailego_return_if_false #define ailego_return_if_false(COND) \ if (ailego_unlikely(!(COND))) return #endif #ifndef ailego_break_if_false #define ailego_break_if_false(COND) \ if (ailego_unlikely(!(COND))) break #endif #ifndef ailego_continue_if_false #define ailego_continue_if_false(COND) \ if (ailego_unlikely(!(COND))) continue #endif #ifndef ailego_do_if_false #define ailego_do_if_false(COND) if (ailego_unlikely(!(COND))) #endif #ifndef ailego_compile_assert #define ailego_compile_assert(COND, MSG) \ typedef char Static_Assertion_##MSG[(!!(COND)) * 2 - 1] #endif #ifndef ailego_static_assert3 #define ailego_static_assert3(COND, LINE) \ ailego_compile_assert(COND, At_Line_##LINE) #endif #ifndef ailego_static_assert2 #define ailego_static_assert2(COND, LINE) ailego_static_assert3(COND, LINE) #endif #ifndef ailego_static_assert #define ailego_static_assert(COND) ailego_static_assert2(COND, __LINE__) #endif //! Abort and report if an assertion is failed #ifndef ailego_assert_abort #define ailego_assert_abort(COND, MSG) \ (void)(ailego_likely(COND) || (ailego_assert_report(__FILE__, __FUNCTION__, \ __LINE__, #COND, (MSG)), \ abort(), 0)) #endif #ifdef AILEGO_DEBUG #ifndef ailego_assert #define ailego_assert(COND) ailego_assert_abort(COND, "") #endif #ifndef ailego_assert_with #define ailego_assert_with(COND, MSG) ailego_assert_abort(COND, MSG) #endif #else // !AILEGO_DEBUG #ifndef ailego_assert #define ailego_assert(COND) ((void)0) #endif #ifndef ailego_assert_with #define ailego_assert_with(COND, MSG) ((void)0) #endif #endif // AILEGO_DEBUG #ifndef ailego_check #define ailego_check(COND) ailego_assert_abort(COND, "") #endif #ifndef ailego_check_with #define ailego_check_with(COND, MSG) ailego_assert_abort(COND, MSG) #endif #ifndef _MSC_VER //! Allocates memory on a specified alignment boundary static inline void *ailego_posix_malloc(size_t size, size_t align) { void *ptr; ailego_null_if_ne_zero(posix_memalign(&ptr, align, size)); return ptr; } #endif //! Report an assertion is failed static inline void ailego_assert_report(const char *file, const char *func, int line, const char *cond, const char *msg) { fprintf(stderr, "Assertion failed: (%s) in %s(), %s line %d. %s\n", cond, func, file, line, msg); } #ifdef __cplusplus } /* extern "C" */ #endif #endif // __AILEGO_INTERNAL_PLATFORM_H__ ================================================ FILE: deps/proxima/include/ailego/io/file.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Apr 2018 * \brief Interface of AiLego Utility File */ #ifndef __AILEGO_IO_FILE_H__ #define __AILEGO_IO_FILE_H__ #include namespace ailego { /*! File Utility */ class File { public: //! Native Handle in OS typedef FileHelper::NativeHandle NativeHandle; //! Invalid Handle static constexpr NativeHandle InvalidHandle = (NativeHandle)(-1); //! Specifies the position in a file to use for seeking. enum struct Origin { Begin = 0, Current = 1, End = 2 }; //! Options of memory mapping enum { MMAP_READONLY = 1, MMAP_SHARED = 2, MMAP_LOCKED = 4, MMAP_WARMUP = 8, MMAP_POPULATE = 16 }; //! Constructor File(void) : native_handle_(File::InvalidHandle), read_only_(false) {} //! Constructor File(File &&rhs) { read_only_ = rhs.read_only_; native_handle_ = rhs.native_handle_; rhs.read_only_ = false; rhs.native_handle_ = File::InvalidHandle; } //! Destructor ~File(void) { this->close(); } //! Assignment File &operator=(File &&rhs) { read_only_ = rhs.read_only_; native_handle_ = rhs.native_handle_; rhs.read_only_ = false; rhs.native_handle_ = File::InvalidHandle; return *this; } //! Test if the file is valid bool is_valid(void) const { return (native_handle_ != File::InvalidHandle); } //! Retrieve non-zero if memory region is read only bool read_only(void) const { return read_only_; } //! Retrieve native handle NativeHandle native_handle(void) const { return native_handle_; } //! Create a local file bool create(const char *path, size_t size, bool direct); //! Open a local file bool open(const char *path, bool rdonly, bool direct); //! Close the local file void close(void); //! Reset the file void reset(void); //! Write data into the file size_t write(const void *data, size_t len); //! Write data into the file size_t write(ssize_t off, const void *data, size_t len); //! Read data from the file size_t read(void *buf, size_t len); //! Read data from the file size_t read(ssize_t off, void *buf, size_t len); //! Synchronize memory with physical storage bool flush(void); //! Sets the current position of the file to the given value bool seek(ssize_t off, Origin origin); //! Truncate the file to a specified length bool truncate(size_t len); //! Retrieve size of file size_t size(void) const; //! Retrieve offset of file ssize_t offset(void) const; //! Create a local file bool create(const char *path, size_t len) { return this->create(path, len, false); } //! Create a local file bool create(const std::string &path, size_t len, bool direct) { return this->create(path.c_str(), len, direct); } //! Create a local file bool create(const std::string &path, size_t len) { return this->create(path.c_str(), len); } //! Open a local file bool open(const char *path, bool rdonly) { return this->open(path, rdonly, false); } //! Open a local file bool open(const std::string &path, bool rdonly, bool direct) { return this->open(path.c_str(), rdonly, direct); } //! Open a local file bool open(const std::string &path, bool rdonly) { return this->open(path.c_str(), rdonly); } //! Map a region of file into memory void *map(ssize_t off, size_t len, int opts) { if (read_only_) { opts |= File::MMAP_READONLY; } return File::MemoryMap(native_handle_, off, len, opts); } //! Map a region of file into memory static void *MemoryMap(NativeHandle handle, ssize_t off, size_t len, int opts); //! Map an anonymous region into memory static void *MemoryMap(size_t len, int opts); //! Remap the region into memory static void *MemoryRemap(void *oldptr, size_t oldsize, void *newptr, size_t newsize); //! Unmap a mapping region static void MemoryUnmap(void *addr, size_t len); //! Synchronize a memory map static bool MemoryFlush(void *addr, size_t len); //! Lock the memory region into RAM static bool MemoryLock(void *addr, size_t len); //! Unlock the memory region in RAM static bool MemoryUnlock(void *addr, size_t len); //! Warm up a memory region static void MemoryWarmup(void *addr, size_t len); //! Delete a name and possibly the file it refers to static bool Delete(const char *path) { return FileHelper::DeleteFile(path); } //! Delete a name and possibly the file it refers to static bool Delete(const std::string &path) { return FileHelper::DeleteFile(path.c_str()); } //! Change the name or location of a file static bool Rename(const char *oldpath, const char *newpath) { return FileHelper::RenameFile(oldpath, newpath); } //! Change the name or location of a file static bool Rename(const std::string &oldpath, const std::string &newpath) { return FileHelper::RenameFile(oldpath.c_str(), newpath.c_str()); } //! Retrieve the base name from a path static const char *BaseName(const char *path) { return FileHelper::BaseName(path); } //! Retrieve the base name from a path static const char *BaseName(const std::string &path) { return BaseName(path.c_str()); } //! Make directories' path static bool MakePath(const char *path) { return FileHelper::MakePath(path); } //! Make directories' path static bool MakePath(const std::string &path) { return FileHelper::MakePath(path.c_str()); } //! Remove a file or a directory (includes files & subdirectories) static bool RemovePath(const char *path) { return FileHelper::RemovePath(path); } //! Remove a file or a directory (includes files & subdirectories) static bool RemovePath(const std::string &path) { return FileHelper::RemovePath(path.c_str()); } //! Remove a directory (includes files & subdirectories) static bool RemoveDirectory(const char *path) { return FileHelper::RemoveDirectory(path); } //! Remove a directory (includes files & subdirectories) static bool RemoveDirectory(const std::string &path) { return FileHelper::RemoveDirectory(path.c_str()); } //! Retrieve non-zero if the path exists static bool IsExist(const char *path) { return FileHelper::IsExist(path); } //! Retrieve non-zero if the path exists static bool IsExist(const std::string &path) { return FileHelper::IsExist(path.c_str()); } //! Retrieve non-zero if the path is a regular file static bool IsRegular(const char *path) { return FileHelper::IsRegular(path); } //! Retrieve non-zero if the path is a regular file static bool IsRegular(const std::string &path) { return FileHelper::IsRegular(path.c_str()); } //! Retrieve non-zero if the path is a directory static bool IsDirectory(const char *path) { return FileHelper::IsDirectory(path); } //! Retrieve non-zero if the path is a directory static bool IsDirectory(const std::string &path) { return FileHelper::IsDirectory(path.c_str()); } //! Retrieve non-zero if the path is a symbolic link static bool IsSymbolicLink(const char *path) { return FileHelper::IsSymbolicLink(path); } //! Retrieve non-zero if the path is a symbolic link static bool IsSymbolicLink(const std::string &path) { return FileHelper::IsSymbolicLink(path.c_str()); } //! Retrieve non-zero if two paths are pointing to the same file static bool IsSame(const char *path1, const char *path2) { return FileHelper::IsSame(path1, path2); } //! Retrieve non-zero if two paths are pointing to the same file static bool IsSame(const std::string &path1, const std::string &path2) { return FileHelper::IsSame(path1.c_str(), path2.c_str()); } private: //! Disable them File(const File &) = delete; File &operator=(const File &) = delete; //! Members NativeHandle native_handle_; bool read_only_; }; } // namespace ailego #endif // __AILEGO_IO_FILE_H__ ================================================ FILE: deps/proxima/include/ailego/io/file_lock.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Jan 2021 * \brief Interface of AiLego Utility File Lock */ #ifndef __AILEGO_IO_FILE_LOCK_H__ #define __AILEGO_IO_FILE_LOCK_H__ #include "file.h" namespace ailego { /*! File Utility */ class FileLock { public: //! Constructor FileLock(const File &file) : native_handle_(file.native_handle()) {} //! Constructor FileLock(File::NativeHandle handle) : native_handle_(handle) {} //! Locking bool lock(void) const { return FileLock::Lock(native_handle_); } //! Try locking bool try_lock(void) const { return FileLock::TryLock(native_handle_); } //! Locking (shared) bool lock_shared(void) const { return FileLock::LockShared(native_handle_); } //! Try locking (shared) bool try_lock_shared(void) const { return FileLock::TryLockShared(native_handle_); } //! Unlocking bool unlock(void) const { return FileLock::Unlock(native_handle_); } //! Locking static bool Lock(File::NativeHandle handle); //! Try locking static bool TryLock(File::NativeHandle handle); //! Locking (shared) static bool LockShared(File::NativeHandle handle); //! Try locking (shared) static bool TryLockShared(File::NativeHandle handle); //! Unlocking static bool Unlock(File::NativeHandle handle); private: //! Disable them FileLock(const FileLock &) = delete; FileLock(FileLock &&) = delete; FileLock &operator=(const FileLock &) = delete; FileLock &operator=(FileLock &&) = delete; //! Members File::NativeHandle native_handle_; }; } // namespace ailego #endif // __AILEGO_IO_FILE_LOCK_H__ ================================================ FILE: deps/proxima/include/ailego/io/file_writer.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Jan 2021 * \brief Interface of AiLego Utility File Writer */ #ifndef __AILEGO_IO_FILE_WRITER_H__ #define __AILEGO_IO_FILE_WRITER_H__ #include #include #include "file.h" namespace ailego { /*! File Stream Writer */ class FileWriter { public: //! Constructor FileWriter(void) {} //! Constructor FileWriter(FileWriter &&rhs) : file_(std::move(rhs.file_)) {} //! Destructor ~FileWriter(void) {} //! Assignment FileWriter &operator=(FileWriter &&rhs) { file_ = std::move(rhs.file_); return *this; } //! Output to writer FileWriter &operator<<(const char *str) { size_t len = std::strlen(str); if (file_.write(str, len) != len) { throw std::ios_base::failure("Write error"); } return *this; } //! Output to writer FileWriter &operator<<(const std::string &str) { if (file_.write(str.data(), str.size()) != str.size()) { throw std::ios_base::failure("Write error"); } return *this; } //! Output to writer FileWriter &operator<<(char c) { if (file_.write(&c, 1) != 1) { throw std::ios_base::failure("Write error"); } return *this; } //! Test if the file is valid bool is_valid(void) const { return file_.is_valid(); } //! Create a local file bool create(const char *path) { return file_.create(path, 0, false); } //! Open a local file bool open(const char *path) { return file_.open(path, false, false); } //! Close the local file void close(void) { file_.close(); } //! Write data into the file size_t write(const void *data, size_t len) { return file_.write(data, len); } //! Synchronize memory with physical storage bool flush(void) { return file_.flush(); } //! Output with format void print(const char *format, va_list args) { char buf[8192]; std::vsnprintf(buf, sizeof(buf), format, args); (*this) << buf; } //! Output with format #if defined(__GNUC__) void print(const char *format, ...) __attribute__((format(printf, 2, 3))) { #else void print(const char *format, ...) { #endif va_list args; va_start(args, format); this->print(format, args); va_end(args); } private: //! Disable them FileWriter(const FileWriter &) = delete; FileWriter &operator=(const FileWriter &) = delete; //! Members File file_; }; } // namespace ailego #endif // __AILEGO_IO_FILE_WRITER_H__ ================================================ FILE: deps/proxima/include/ailego/io/mmap_file.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Nov 2017 * \brief Interface of AiLego Utility Memory Mapping File */ #ifndef __AILEGO_IO_MMAP_FILE_H__ #define __AILEGO_IO_MMAP_FILE_H__ #include "file.h" namespace ailego { /*! Memory Mapping File */ class MMapFile { public: //! Constructor MMapFile(void) : read_only_(false), region_(nullptr), region_size_(0), offset_(0) {} //! Constructor MMapFile(MMapFile &&rhs) { read_only_ = rhs.read_only_; region_ = rhs.region_; region_size_ = rhs.region_size_; offset_ = rhs.offset_; rhs.read_only_ = false; rhs.region_ = nullptr; rhs.region_size_ = 0; rhs.offset_ = 0; } //! Destructor ~MMapFile(void) { this->close(); } //! Assignment MMapFile &operator=(MMapFile &&rhs) { read_only_ = rhs.read_only_; region_ = rhs.region_; region_size_ = rhs.region_size_; offset_ = rhs.offset_; rhs.read_only_ = false; rhs.region_ = nullptr; rhs.region_size_ = 0; rhs.offset_ = 0; return *this; } //! Test if the file is valid bool is_valid(void) const { return (region_ != nullptr); } //! Retrieve non-zero if memory region is read only bool read_only(void) const { return read_only_; } //! Create a memory mapping file bool create(const char *path, size_t len) { ailego_false_if_false(!region_ && path); File file; ailego_false_if_false(file.create(path, len)); region_ = File::MemoryMap(file.native_handle(), 0, len, File::MMAP_SHARED); ailego_false_if_false(region_); read_only_ = false; region_size_ = len; return true; } //! Create a memory mapping file bool create(const std::string &path, size_t len) { return this->create(path.c_str(), len); } //! Open a memory mapping file bool open(const char *path, bool rdonly, bool shared) { ailego_false_if_false(!region_ && path); File file; ailego_false_if_false(file.open(path, rdonly, false)); size_t len = file.size(); int opts = 0; if (rdonly) { opts |= File::MMAP_READONLY; } if (shared) { opts |= File::MMAP_SHARED; } region_ = File::MemoryMap(file.native_handle(), 0, len, opts); ailego_false_if_false(region_); read_only_ = rdonly; region_size_ = len; return true; } //! Open a memory mapping file bool open(const std::string &path, bool rdonly, bool shared) { return this->open(path.c_str(), rdonly, shared); } //! Open a memory mapping file bool open(const char *path, bool rdonly) { return this->open(path, rdonly, false); } //! Open a memory mapping file bool open(const std::string &path, bool rdonly) { return this->open(path, rdonly, false); } //! Close the memory mapping file void close(void) { File::MemoryUnmap(region_, region_size_); region_ = nullptr; region_size_ = 0; offset_ = 0; } //! Synchronize memory with physical storage bool flush(void) { return File::MemoryFlush(region_, region_size_); } //! Lock the memory region into RAM bool lock(void) { return File::MemoryLock(region_, region_size_); } //! Unlock the memory region in RAM bool unlock(void) { return File::MemoryUnlock(region_, region_size_); } //! Warm up the memory region void warmup(void) { File::MemoryWarmup(region_, region_size_); } //! Reset the file void reset(void) { offset_ = 0; } //! Write data into the storage size_t write(const void *data, size_t len) { if (offset_ + len > region_size_) { len = region_size_ - offset_; } memcpy((uint8_t *)region_ + offset_, data, len); offset_ += len; return len; } //! Write data into the storage size_t write(size_t off, const void *data, size_t len) { if (off + len > region_size_) { if (off > region_size_) { off = region_size_; } len = region_size_ - off; } memcpy((uint8_t *)region_ + off, data, len); return len; } //! Read data from the storage (Zero-copy) size_t read(const void **data, size_t len) { if (offset_ + len > region_size_) { len = region_size_ - offset_; } *data = (uint8_t *)region_ + offset_; offset_ += len; return len; } //! Read data from the storage (Zero-copy) size_t read(size_t off, const void **data, size_t len) { if (off + len > region_size_) { if (off > region_size_) { off = region_size_; } len = region_size_ - off; } *data = (uint8_t *)region_ + off; return len; } //! Read data from the storage size_t read(void *data, size_t len) { if (offset_ + len > region_size_) { len = region_size_ - offset_; } memcpy(data, (uint8_t *)region_ + offset_, len); offset_ += len; return len; } //! Read data from the storage size_t read(size_t off, void *data, size_t len) { if (off + len > region_size_) { if (off > region_size_) { off = region_size_; } len = region_size_ - off; } memcpy(data, (uint8_t *)region_ + off, len); return len; } //! Retrieve memory region of file void *region(void) const { return region_; } //! Retrieve region size of file size_t size(void) const { return region_size_; } //! Retrieve offset of file size_t offset(void) const { return offset_; } private: //! Disable them MMapFile(const MMapFile &) = delete; MMapFile &operator=(const MMapFile &) = delete; //! Members bool read_only_; void *region_; size_t region_size_; size_t offset_; }; } // namespace ailego #endif // __AILEGO_IO_MMAP_FILE_H__ ================================================ FILE: deps/proxima/include/ailego/io/pid_file.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Jan 2021 * \brief Interface of AiLego Process ID File */ #ifndef __AILEGO_IO_PID_FILE_H__ #define __AILEGO_IO_PID_FILE_H__ #include "file_lock.h" namespace ailego { /*! Process ID File */ class PidFile { public: //! Constructor PidFile(void) {} //! Constructor PidFile(PidFile &&rhs) : file_(std::move(rhs.file_)) {} //! Assignment PidFile &operator=(PidFile &&rhs) { file_ = std::move(rhs.file_); return *this; } //! Test if the pid file is valid bool is_valid(void) const { return file_.is_valid(); } //! Open a local file bool open(const char *path); //! Open a local file bool open(const std::string &path) { return this->open(path.c_str()); } //! Close the pid file void close(void); private: //! Disable them PidFile(const PidFile &) = delete; PidFile &operator=(const PidFile &) = delete; //! Members File file_{}; }; } // namespace ailego #endif // __AILEGO_IO_PID_FILE_H__ ================================================ FILE: deps/proxima/include/ailego/parallel/lock.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Jan 2018 * \brief Interface of AiLego Utility Lock */ #ifndef __AILEGO_PARALLEL_LOCK_H__ #define __AILEGO_PARALLEL_LOCK_H__ #include #include #include #include namespace ailego { // Test if atomic_bool is always lock free. // Arm may be always lock free using some compiler flags, // see https://stackoverflow.com/a/64253858/486350. #if ATOMIC_BOOL_LOCK_FREE == 2 /*! Spin Mutex (The atomic type is always lock-free) */ class SpinMutex { public: //! Constructor SpinMutex(void) {} //! Locking void lock(void) { bool expected = false; while (!flag_.compare_exchange_weak( expected, true, std::memory_order_acquire, std::memory_order_relaxed)) { expected = false; // Provide a hint to the processor that the code sequence is a spin-wait // loop. This can help improve the performance and power consumption of // spin-wait loops. ailego_yield(); } } //! Try locking bool try_lock(void) { bool expected = false; return flag_.compare_exchange_strong( expected, true, std::memory_order_acquire, std::memory_order_relaxed); } //! Unlocking void unlock(void) { flag_.store(false, std::memory_order_release); } private: //! Disable them SpinMutex(const SpinMutex &) = delete; SpinMutex(SpinMutex &&) = delete; SpinMutex &operator=(const SpinMutex &) = delete; SpinMutex &operator=(SpinMutex &&) = delete; //! Members std::atomic_bool flag_{false}; }; #else /*! Spin Mutex (General) */ class SpinMutex { public: //! Constructor SpinMutex(void) {} //! Locking void lock(void) { while (flag_.test_and_set(std::memory_order_acquire)) ; } //! Try locking bool try_lock(void) { return (!flag_.test_and_set(std::memory_order_acquire)); } //! Unlocking void unlock(void) { flag_.clear(std::memory_order_release); } private: //! Disable them SpinMutex(const SpinMutex &) = delete; SpinMutex(SpinMutex &&) = delete; SpinMutex &operator=(const SpinMutex &) = delete; SpinMutex &operator=(SpinMutex &&) = delete; //! Members std::atomic_flag flag_{}; }; #endif // ATOMIC_BOOL_LOCK_FREE == 2 /*! Shared Mutex */ class SharedMutex { public: //! Constructor SharedMutex(void) {} //! Locking void lock(void) { std::unique_lock q(mutex_); ++write_count_; write_cond_.wait(q, [this]() { return (pending_count_ == 0); }); --write_count_; --pending_count_; } //! Try locking bool try_lock(void) { std::unique_lock q(mutex_, std::defer_lock); if (q.try_lock()) { if (pending_count_ == 0) { --pending_count_; return true; } } return false; } //! Unlocking void unlock(void) { std::lock_guard q(mutex_); ++pending_count_; if (write_count_ != 0) { write_cond_.notify_one(); } else { read_cond_.notify_all(); } } //! Locking (shared) void lock_shared(void) { std::unique_lock q(mutex_); ++read_count_; read_cond_.wait( q, [this]() { return (write_count_ == 0 && pending_count_ >= 0); }); --read_count_; ++pending_count_; } //! Try locking (shared) bool try_lock_shared(void) { std::lock_guard q(mutex_); if (write_count_ == 0 && pending_count_ >= 0) { ++pending_count_; return true; } return false; } //! Unlocking (shared) void unlock_shared(void) { std::lock_guard q(mutex_); --pending_count_; if (write_count_ != 0 && pending_count_ == 0) { write_cond_.notify_one(); } else { read_cond_.notify_all(); } } private: //! Disable them SharedMutex(const SharedMutex &) = delete; SharedMutex(SharedMutex &&) = delete; SharedMutex &operator=(const SharedMutex &) = delete; SharedMutex &operator=(SharedMutex &&) = delete; //! Members int32_t pending_count_{0}; int32_t read_count_{0}; int32_t write_count_{0}; std::mutex mutex_{}; std::condition_variable read_cond_{}; std::condition_variable write_cond_{}; }; /*! Write Lock */ class WriteLock { public: //! Constructor WriteLock(SharedMutex &mutex) : mutex_(mutex) {} //! Locking void lock(void) { mutex_.lock(); } //! Try locking bool try_lock(void) { return mutex_.try_lock(); } //! Unlocking void unlock(void) { mutex_.unlock(); } private: //! Disable them WriteLock(void) = delete; WriteLock(const WriteLock &) = delete; WriteLock(WriteLock &&) = delete; WriteLock &operator=(const WriteLock &) = delete; WriteLock &operator=(WriteLock &&) = delete; //! Members SharedMutex &mutex_; }; /*! Read Lock */ class ReadLock { public: //! Constructor ReadLock(SharedMutex &mutex) : mutex_(mutex) {} //! Locking void lock(void) { mutex_.lock_shared(); } //! Try locking bool try_lock(void) { return mutex_.try_lock_shared(); } //! Unlocking void unlock(void) { mutex_.unlock_shared(); } private: //! Disable them ReadLock(void) = delete; ReadLock(const ReadLock &) = delete; ReadLock(ReadLock &&) = delete; ReadLock &operator=(const ReadLock &) = delete; ReadLock &operator=(ReadLock &&) = delete; //! Members SharedMutex &mutex_; }; } // namespace ailego #endif // __AILEGO_PARALLEL_LOCK_H__ ================================================ FILE: deps/proxima/include/ailego/parallel/semaphore.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Feb 2020 * \brief Interface of AiLego Utility Semaphore */ #ifndef __AILEGO_PARALLEL_SEMAPHORE_H__ #define __AILEGO_PARALLEL_SEMAPHORE_H__ #include #include #include #include #include namespace ailego { /*! Semaphore */ class Semaphore { public: //! Constructor Semaphore(void) : Semaphore{1} {} //! Constructor Semaphore(uint32_t count) : count_(count) {} //! Acquire a permit from this semaphore, suspending until one is available void lock(void) { while (!this->try_lock()) { std::unique_lock latch(mutex_); cond_.wait(latch, [this]() { return (count_ > 0); }); } } //! Try to acquire a permit from this semaphore without suspension bool try_lock(void) { uint32_t count = count_.load(std::memory_order_acquire); return (count > 0 ? count_.compare_exchange_strong( count, count - 1, std::memory_order_release, std::memory_order_relaxed) : false); } //! Release a permit, returning it into this semaphore void unlock(void) { ++count_; std::lock_guard latch(mutex_); cond_.notify_one(); } private: //! Disable them Semaphore(const Semaphore &) = delete; Semaphore(Semaphore &&) = delete; Semaphore &operator=(const Semaphore &) = delete; Semaphore &operator=(Semaphore &&) = delete; //! Members std::atomic count_{0}; std::mutex mutex_{}; std::condition_variable cond_{}; }; /*! Binary Semaphores */ template ::type> class BinarySemaphores { public: using BitwiseType = typename std::conditional< N <= 32u, typename std::conditional< N <= 16u, typename std::conditional::type, uint32_t>::type, uint64_t>::type; //! Constructor BinarySemaphores(void) : BinarySemaphores{1} {} //! Constructor BinarySemaphores(uint32_t count) { if (count == 0 || count > N) { count = N; } count_ = count; mask_ = static_cast(BitwiseType(1) << (count - 1)); mask_ |= static_cast(mask_ - 1); flags_.store(mask_); } //! Acquire a permit from this semaphore, suspending until one is available int acquire(void) { int index = -1; while ((index = this->try_acquire()) < 0) { std::unique_lock latch(mutex_); cond_.wait(latch, [this]() { return (flags_ > 0); }); } return index; } //! Try to acquire a permit from this semaphore without suspension int try_acquire(void) { BitwiseType flags = flags_.load(std::memory_order_relaxed); while (flags > 0) { int index = CountTrailingZeros(flags); if (flags_.compare_exchange_weak( flags, flags & (~(BitwiseType(1) << index)), std::memory_order_release, std::memory_order_relaxed)) { return index; } flags = flags_.load(std::memory_order_relaxed); } return -1; } //! Acquire a specified permit from this semaphore, suspending until index is //! available int acquire(int index) { if (index < 0 || (uint32_t)index >= count_) { return -1; } BitwiseType flags = flags_.load(std::memory_order_relaxed); BitwiseType mask = BitwiseType(1) << index; while (true) { if ((flags & mask) && flags_.compare_exchange_weak(flags, flags & (~mask), std::memory_order_release, std::memory_order_relaxed)) { return index; } flags = flags_.load(std::memory_order_relaxed); } } //! Release a permit, returning it into this semaphore void release(int index) { flags_.fetch_or((BitwiseType(1) << index) & mask_); std::lock_guard latch(mutex_); cond_.notify_one(); } protected: //! Count the trailing zeros (32 bits) template static inline auto CountTrailingZeros(T val) -> typename std::enable_if::type { return ailego_ctz32(val); } //! Count the trailing zeros (64 bits) template static inline auto CountTrailingZeros(T val) -> typename std::enable_if::type { return ailego_ctz64(val); } private: //! Disable them BinarySemaphores(const BinarySemaphores &) = delete; BinarySemaphores(BinarySemaphores &&) = delete; BinarySemaphores &operator=(const BinarySemaphores &) = delete; BinarySemaphores &operator=(BinarySemaphores &&) = delete; //! Members uint32_t count_{0}; BitwiseType mask_{0}; std::atomic flags_{0}; std::mutex mutex_{}; std::condition_variable cond_{}; }; } // namespace ailego #endif // __AILEGO_PARALLEL_SEMAPHORE_H__ ================================================ FILE: deps/proxima/include/ailego/parallel/thread_pool.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Jan 2018 * \brief Interface of AiLego Utility Thread Pool */ #ifndef __AILEGO_PARALLEL_THREAD_POOL_H__ #define __AILEGO_PARALLEL_THREAD_POOL_H__ #include #include #include #include #include #include #include #include namespace ailego { /*! Thread Pool */ class ThreadPool { public: /*! Thread Pool Task Group */ class TaskGroup : public std::enable_shared_from_this { public: using Pointer = std::shared_ptr; //! Constructor TaskGroup(ThreadPool *pool) : pool_(pool) {} //! Push a task to the queue void enqueue(const ClosureHandler &handle) { pool_->enqueue(handle, this->shared_from_this(), nullptr); } //! Push a task to the queue void enqueue(ClosureHandler &&handle) { pool_->enqueue(std::move(handle), this->shared_from_this(), nullptr); } //! Submit a task to the queue void submit(ClosureHandler &&handle) { return enqueue_and_wake(std::move(handle)); } //! Push a task to the queue void enqueue_and_wake(const ClosureHandler &handle) { pool_->enqueue_and_wake(handle, this->shared_from_this(), nullptr); } //! Push a task to the queue void enqueue_and_wake(ClosureHandler &&handle) { pool_->enqueue_and_wake(std::move(handle), this->shared_from_this(), nullptr); } //! Execute a function as a task in pool template void execute_and_wait(TArgs &&... args) { ThreadPool::TaskControl ctrl; pool_->enqueue_and_wake(Closure::New(std::forward(args)...), this->shared_from_this(), &ctrl); ctrl.wait(); } //! Execute a function as a task in pool template void execute(TArgs &&... args) { this->enqueue_and_wake(Closure::New(std::forward(args)...)); } //! Wait until all tasks in group finished void wait_finish(void) { std::unique_lock lock(mutex_); cond_.wait(lock, [this]() { return this->is_finished(); }); } //! Check if the group is finished bool is_finished(void) const { return (active_count_ == 0 && pending_count_ == 0); } //! Retrieve count of pending tasks in group size_t pending_count(void) const { return pending_count_.load(std::memory_order_relaxed); } //! Retrieve count of active tasks in group size_t active_count(void) const { return active_count_.load(std::memory_order_relaxed); } protected: friend class ThreadPool; //! Mark a task enqueued void mark_task_enqueued(void) { ++pending_count_; } //! Mark a task actived void mark_task_actived(void) { std::lock_guard lock(mutex_); ++active_count_; --pending_count_; } //! Notify a task finished void notify(void) { std::lock_guard lock(mutex_); if (--active_count_ == 0 && pending_count_ == 0) { cond_.notify_all(); } } private: //! Members ThreadPool *pool_{nullptr}; std::atomic_uint active_count_{0}; std::atomic_uint pending_count_{0}; std::mutex mutex_{}; std::condition_variable cond_{}; }; //! Constructor explicit ThreadPool(uint32_t size, bool binding); //! Constructor explicit ThreadPool(bool binding) : ThreadPool{std::max(std::thread::hardware_concurrency(), 1u), binding} { } //! Constructor ThreadPool(void) : ThreadPool{false} {} //! Destructor ~ThreadPool(void) { this->stop(); // Join all threads for (auto it = pool_.begin(); it != pool_.end(); ++it) { if (it->joinable()) { it->join(); } } } //! Retrieve thread count in pool size_t count(void) const { return pool_.size(); } //! Stop all threads void stop(void) { // Set stop flag as ture, then wake all threads stopping_ = true; std::lock_guard lock(queue_mutex_); work_cond_.notify_all(); } //! Push a task to the queue void enqueue(const ClosureHandler &handle) { this->enqueue(handle, nullptr); } //! Push a task to the queue void enqueue(ClosureHandler &&handle) { this->enqueue(std::move(handle), nullptr); } //! Push a task to the queue void enqueue_and_wake(const ClosureHandler &handle) { this->enqueue_and_wake(handle, nullptr); } //! Push a task to the queue void enqueue_and_wake(ClosureHandler &&handle) { this->enqueue_and_wake(std::move(handle), nullptr); } //! Execute a function as a task in pool template void execute_and_wait(TArgs &&... args) { ThreadPool::TaskControl ctrl; this->enqueue_and_wake(Closure::New(std::forward(args)...), &ctrl); ctrl.wait(); } //! Execute a function as a task in pool template void execute(TArgs &&... args) { this->enqueue_and_wake(Closure::New(std::forward(args)...)); } //! Wake any one thread void wake_any(void) { std::lock_guard lock(queue_mutex_); work_cond_.notify_one(); } //! Wake all threads void wake_all(void) { std::lock_guard lock(queue_mutex_); work_cond_.notify_all(); } //! Wait until all threads finished processing void wait_finish(void) { std::unique_lock lock(wait_mutex_); finished_cond_.wait(lock, [this]() { return this->is_finished(); }); } //! Wait until all threads stopped processing void wait_stop(void) { std::unique_lock lock(wait_mutex_); stopped_cond_.wait(lock, [this]() { return this->is_stopped(); }); } //! Make a task group TaskGroup::Pointer make_group(void) { return std::make_shared(this); } //! Check if the pool is finished bool is_finished(void) const { return (active_count_ == 0 && pending_count_ == 0); } //! Check if the pool is stopped bool is_stopped(void) const { return (worker_count_ == 0); } //! Retrieve count of worker in pool size_t worker_count(void) const { return worker_count_.load(std::memory_order_relaxed); } //! Retrieve count of pending tasks in pool size_t pending_count(void) const { return pending_count_.load(std::memory_order_relaxed); } //! Retrieve count of active tasks in pool size_t active_count(void) const { return active_count_.load(std::memory_order_relaxed); } //! Get the thread index via thread id int indexof(const std::thread::id &thread_id) const { for (size_t i = 0; i < pool_.size(); ++i) { if (pool_[i].get_id() == thread_id) { return static_cast(i); } } return -1; } //! Get the current work thread index int indexof_this(void) const { return this->indexof(std::this_thread::get_id()); } //! Bind threads to processors void bind(void); //! Unbind threads of processors void unbind(void); protected: //! Thread task control class TaskControl { public: //! Notify task finished void notify(void) { finished_ = true; std::lock_guard lock(mutex_); cond_.notify_one(); } //! Wait until task finished void wait(void) { std::unique_lock lock(mutex_); cond_.wait(lock, [this]() { return finished_.load(); }); } private: std::atomic_bool finished_{false}; std::mutex mutex_{}; std::condition_variable cond_{}; }; //! Thread task struct Task { // Constructor Task(const ClosureHandler &h, TaskControl *c) : handle(h), control(c) {} // Constructor Task(ClosureHandler &&h, TaskControl *c) : handle(std::move(h)), control(c) {} // Constructor Task(const ClosureHandler &h, TaskGroup::Pointer &&g, TaskControl *c) : handle(h), group(std::move(g)), control(c) {} // Constructor Task(ClosureHandler &&h, TaskGroup::Pointer &&g, TaskControl *c) : handle(std::move(h)), group(std::move(g)), control(c) {} // Constructor Task(void) {} //! Members ClosureHandler handle{}; TaskGroup::Pointer group{nullptr}; TaskControl *control{nullptr}; }; //! Thread worker callback void worker(void); //! Pick a task from queue bool picking(Task *task); //! Push a task to the queue template void enqueue(T &&handle, TaskControl *ctrl) { if (handle) { std::lock_guard lock(queue_mutex_); ++pending_count_; queue_.emplace(std::forward(handle), ctrl); } } //! Push a task to the queue with group template void enqueue(T &&handle, TaskGroup::Pointer &&group, TaskControl *ctrl) { if (handle) { std::lock_guard lock(queue_mutex_); ++pending_count_; group->mark_task_enqueued(); queue_.emplace(std::forward(handle), std::move(group), ctrl); } } //! Push a task to the queue template void enqueue_and_wake(T &&handle, TaskControl *ctrl) { if (handle) { std::lock_guard lock(queue_mutex_); ++pending_count_; queue_.emplace(std::forward(handle), ctrl); work_cond_.notify_one(); } } //! Push a task to the queue with group template void enqueue_and_wake(T &&handle, TaskGroup::Pointer &&group, TaskControl *ctrl) { if (handle) { std::lock_guard lock(queue_mutex_); ++pending_count_; group->mark_task_enqueued(); queue_.emplace(std::forward(handle), std::move(group), ctrl); work_cond_.notify_one(); } } private: //! Disable them ThreadPool(const ThreadPool &) = delete; ThreadPool(ThreadPool &&) = delete; ThreadPool &operator=(const ThreadPool &) = delete; //! Members std::queue queue_{}; std::atomic_bool stopping_{false}; std::atomic_uint worker_count_{0}; std::atomic_uint active_count_{0}; std::atomic_uint pending_count_{0}; std::mutex queue_mutex_{}; std::mutex wait_mutex_{}; std::condition_variable work_cond_{}; std::condition_variable finished_cond_{}; std::condition_variable stopped_cond_{}; std::vector pool_{}; }; } // namespace ailego #endif // __AILEGO_PARALLEL_THREAD_POOL_H__ ================================================ FILE: deps/proxima/include/ailego/parallel/thread_queue.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2020 * \brief Interface of AiLego Utility Thread Queue */ #ifndef __AILEGO_PARALLEL_THREAD_QUEUE_H__ #define __AILEGO_PARALLEL_THREAD_QUEUE_H__ #include #include #include #include #include #include #include #include #include namespace ailego { /*! Thread Queue (One Thread One Queue) */ class ThreadQueue { public: /*! Thread Worker (One Thread One Worker) */ class ThreadWorker { public: //! Constructor ThreadWorker(ThreadQueue *owner) : owner_(owner) {} //! Destructor ~ThreadWorker(void) { // Join the current thread if (thread_.joinable()) { thread_.join(); } } //! Push a task to the queue template void enqueue(T &&handle) { std::lock_guard lock(mutex_); queue_.emplace(std::forward(handle)); } //! Push a task to the queue template void enqueue_and_wake(T &&handle) { std::lock_guard lock(mutex_); queue_.emplace(std::forward(handle)); cond_.notify_one(); } //! Execute a function as a task template void execute(TArgs &&...args) { this->enqueue_and_wake(Closure::New(std::forward(args)...)); } //! Wake the thread void wake(void) { std::lock_guard lock(mutex_); cond_.notify_one(); } //! Notify thread stopped void stop(void) { // Set stop flag as ture, then wake the thread stopping_ = true; std::lock_guard lock(mutex_); cond_.notify_one(); } protected: //! Thread worker callback void worker(void) { owner_->mark_worker_started(); ClosureHandler task; while (this->picking(&task)) { // Run the task if (task) { task->run(); task = nullptr; } } owner_->mark_worker_stopped(); } //! Pick a task from queue bool picking(ClosureHandler *task) { std::unique_lock latch(mutex_); cond_.wait(latch, [this]() { return (queue_.size() > 0 || stopping_); }); if (stopping_) { return false; } *task = std::move(queue_.front()); queue_.pop(); return true; } private: //! Disable them ThreadWorker(void) = delete; ThreadWorker(ThreadWorker &&) = delete; ThreadWorker(const ThreadWorker &) = delete; ThreadWorker &operator=(const ThreadWorker &) = delete; //! Members ThreadQueue *owner_{nullptr}; std::queue queue_{}; std::atomic_bool stopping_{false}; std::mutex mutex_{}; std::condition_variable cond_{}; std::thread thread_{&ThreadWorker::worker, this}; }; //! Constructor ThreadQueue(void) : ThreadQueue{std::max(std::thread::hardware_concurrency(), 1u)} {} //! Constructor explicit ThreadQueue(uint32_t size) { for (uint32_t i = 0u; i < size; ++i) { threads_.emplace_back(new ThreadWorker(this)); } } //! Destructor ~ThreadQueue(void) { this->stop(); // Cleanup threads for (auto it = threads_.begin(); it != threads_.end(); ++it) { delete *it; } } //! operator [] ThreadWorker &operator[](size_t i) { return *(threads_[i]); } //! Stop the thread void stop(void) { // Stop all workers for (auto it = threads_.begin(); it != threads_.end(); ++it) { (*it)->stop(); } } //! Wake all worker threads void wake(void) { for (auto it = threads_.begin(); it != threads_.end(); ++it) { (*it)->wake(); } } //! Wait until all threads stopped processing void wait_stop(void) { std::unique_lock lock(wait_mutex_); stopped_cond_.wait(lock, [this]() { return this->is_stopped(); }); } //! Check if the pool is stopped bool is_stopped(void) const { return (worker_count_ == 0); } //! Retrieve count of worker in queue size_t worker_count(void) const { return worker_count_.load(std::memory_order_relaxed); } //! Retrieve thread count in queue size_t count(void) const { return threads_.size(); } //! Push a task to the queue template void enqueue(uint64_t key, T &&handle) { threads_[JumpHash(key, static_cast(threads_.size()))]->enqueue( std::forward(handle)); } //! Push a task to the queue template void enqueue_and_wake(uint64_t key, T &&handle) { threads_[JumpHash(key, static_cast(threads_.size()))] ->enqueue_and_wake(std::forward(handle)); } //! Execute a function as a task in pool template void execute(uint64_t key, TArgs &&...args) { this->enqueue_and_wake(key, Closure::New(std::forward(args)...)); } protected: //! Mark a worker started void mark_worker_started(void) { ++worker_count_; } //! Mark a worker stopped void mark_worker_stopped(void) { // Decrease count of workers std::lock_guard lock(wait_mutex_); if (--worker_count_ == 0) { stopped_cond_.notify_all(); } } private: //! Disable them ThreadQueue(const ThreadQueue &) = delete; ThreadQueue(ThreadQueue &&) = delete; ThreadQueue &operator=(const ThreadQueue &) = delete; //! Members std::atomic_uint worker_count_{0}; std::mutex wait_mutex_{}; std::condition_variable stopped_cond_{}; std::vector threads_{}; }; } // namespace ailego #endif // __AILEGO_PARALLEL_THREAD_QUEUE_H__ ================================================ FILE: deps/proxima/include/ailego/pattern/closure.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Aug 2019 * \brief Interface of AiLego Utility Closure * \detail Construct a closure and run it at another time. * All closure objects use the same running interfaces, but they * can be constructed with ifferent functions and parameters. * The parameters will be saved into the closure objects, then * passed to the callback functions when they are invoked. */ #ifndef __AILEGO_PATTERN_CLOSURE_H__ #define __AILEGO_PATTERN_CLOSURE_H__ #include #include #include namespace ailego { /*! Callback Validator (declaration) */ template struct CallbackValidator; /*! Callback Validator (function pointer) */ template struct CallbackValidator { enum { Value = true }; }; /*! Callback Validator (function) */ template struct CallbackValidator : CallbackValidator { }; /*! Callback Validator (member function pointer) */ template struct CallbackValidator : CallbackValidator {}; /*! Callback Validator (constable member function pointer) */ template struct CallbackValidator : CallbackValidator {}; /*! Callback Validator (volatile member function pointer) */ template struct CallbackValidator : CallbackValidator {}; /*! Callback Validator (constable volatile member function pointer) */ template struct CallbackValidator : CallbackValidator {}; /*! Callback Validator */ template struct CallbackValidator { protected: using FalseType = long; using TrueType = char; //! Check if the class contains operator() template static TrueType &Validate(decltype(&T::operator())); //! Check if the class contains operator() template static FalseType &Validate(...); public: enum { Value = (sizeof(Validate(nullptr)) == sizeof(TrueType)) }; }; /*! Callback Validator (left reference) */ template struct CallbackValidator : CallbackValidator {}; /*! Callback Validator (right reference) */ template struct CallbackValidator : CallbackValidator {}; /*! Callback Traits (declaration) */ template struct CallbackTraits; /*! Callback Traits (function pointer) */ template struct CallbackTraits { using Type = R (*)(TParams...); using ResultType = R; using TupleType = std::tuple::type...>; //! Callback Traits Parameter template struct Parameter { using Type = typename std::tuple_element>::type; }; //! Number of parameters enum { Arity = sizeof...(TParams) }; }; /*! Callback Traits (function) */ template struct CallbackTraits : CallbackTraits { using Type = R (*)(TParams...); }; /*! Callback Traits (member function pointer) */ template struct CallbackTraits : CallbackTraits { using Type = R (T::*)(TParams...); }; /*! Callback Traits (constable member function pointer) */ template struct CallbackTraits : CallbackTraits { using Type = R (T::*)(TParams...) const; }; /*! Callback Traits (volatile member function pointer) */ template struct CallbackTraits : CallbackTraits { using Type = R (T::*)(TParams...) volatile; }; /*! Callback Traits (constable volatile member function pointer) */ template struct CallbackTraits : CallbackTraits { using Type = R (T::*)(TParams...) const volatile; }; /*! Callback Traits */ template struct CallbackTraits : CallbackTraits { using Type = TFunc; }; /*! Callback Traits (left reference) */ template struct CallbackTraits : CallbackTraits {}; /*! Callback Traits (right reference) */ template struct CallbackTraits : CallbackTraits {}; /*! Callback Functor */ template struct CallbackFunctor { using Traits = CallbackTraits; using Type = typename Traits::Type; using ResultType = typename Traits::ResultType; using TupleType = typename Traits::TupleType; //! Tuple Index Maker template struct TupleIndexMaker : TupleIndexMaker {}; //! Tuple Index template struct TupleIndex {}; //! Tuple Index Maker (special) template struct TupleIndexMaker<0, I...> { using Type = TupleIndex; }; //! Run the callback function template static ResultType Run(Type &impl, TupleType &tuple, TupleIndex) { return (impl)(std::forward::Type>( std::get(tuple))...); } //! Run the callback member function template static ResultType Run(T *obj, Type &impl, TupleType &tuple, TupleIndex) { return (obj->*impl)( std::forward::Type>( std::get(tuple))...); } //! Run the callback function static ResultType Run(Type &impl, TupleType &tuple) { return Run(impl, tuple, typename TupleIndexMaker::Type()); } //! Run the callback member function template static ResultType Run(T *obj, Type &impl, TupleType &tuple) { return Run(obj, impl, tuple, typename TupleIndexMaker::Type()); } }; /*! Callback Object */ template struct CallbackObject { using Type = typename std::remove_reference::type; }; /*! Callback (declaration) */ template class Callback; /*! Callback (void) */ template <> class Callback { public: using Pointer = std::shared_ptr>; //! Destructor virtual ~Callback(void) {} //! Function call void operator()(void) { this->run(); } //! Run the callback function virtual void run(void) = 0; //! Create callback closure (member function pointer) template static typename Callback::Pointer New(T *obj, R (T::*impl)(TParams...), TArgs &&...args); //! Create callback closure (constable member function pointer) template static typename Callback::Pointer New(const T *obj, R (T::*impl)(TParams...) const, TArgs &&...args); //! Create callback closure (volatile member function pointer) template static typename Callback::Pointer New(volatile T *obj, R (T::*impl)(TParams...) volatile, TArgs &&...args); //! Create callback closure (constable volatile member function pointer) template static typename Callback::Pointer New(const volatile T *obj, R (T::*impl)(TParams...) const volatile, TArgs &&...args); //! Create callback closure (function) template < typename TFunc, typename... TArgs, typename = typename std::enable_if::Value>::type> static typename Callback::ResultType>::Pointer New(TFunc &&impl, TArgs &&...args); }; /*! Callback */ template class Callback : public Callback { public: using Pointer = std::shared_ptr>; using Callback::run; //! Function call void operator()(void) { this->run(); } //! Function call with return void operator()(R *r) { this->run(r); } //! Run the callback function virtual void run(R *) = 0; protected: //! Constructor Callback(void){}; }; /*! Callback Implementation */ template class CallbackImpl : public Callback { public: using Object = CallbackObject; using Functor = CallbackFunctor; //! Constructor template CallbackImpl(typename Object::Type *obj, const typename Functor::Type &impl, TArgs &&...args) : obj_(obj), impl_(impl), tuple_(std::forward(args)...) {} //! Constructor template CallbackImpl(typename Object::Type *obj, typename Functor::Type &&impl, TArgs &&...args) : obj_(obj), impl_(std::move(impl)), tuple_(std::forward(args)...) {} //! Run the callback function void run(void) override { Functor::Run(obj_, impl_, tuple_); } //! Run the callback function void run(R *r) override { *r = Functor::Run(obj_, impl_, tuple_); } protected: //! Disable them CallbackImpl(void) = delete; CallbackImpl(const CallbackImpl &) = delete; CallbackImpl(CallbackImpl &&) = delete; CallbackImpl &operator=(const CallbackImpl &) = delete; private: typename Object::Type *obj_; typename Functor::Type impl_; typename Functor::TupleType tuple_; }; /*! Callback Implementation */ template class CallbackImpl : public Callback { public: using Object = CallbackObject; using Functor = CallbackFunctor; //! Constructor template CallbackImpl(typename Object::Type *obj, const typename Functor::Type &impl, TArgs &&...args) : obj_(obj), impl_(impl), tuple_(std::forward(args)...) {} //! Constructor template CallbackImpl(typename Object::Type *obj, typename Functor::Type &&impl, TArgs &&...args) : obj_(obj), impl_(std::move(impl)), tuple_(std::forward(args)...) {} //! Run the callback function void run(void) override { Functor::Run(obj_, impl_, tuple_); } protected: //! Disable them CallbackImpl(void) = delete; CallbackImpl(const CallbackImpl &) = delete; CallbackImpl(CallbackImpl &&) = delete; CallbackImpl &operator=(const CallbackImpl &) = delete; private: typename Object::Type *obj_; typename Functor::Type impl_; typename Functor::TupleType tuple_; }; /*! Callback Implementation */ template class CallbackImpl : public Callback { public: using Functor = CallbackFunctor; //! Constructor template CallbackImpl(const typename Functor::Type &impl, TArgs &&...args) : impl_(impl), tuple_(std::forward(args)...) {} //! Constructor template CallbackImpl(typename Functor::Type &&impl, TArgs &&...args) : impl_(std::move(impl)), tuple_(std::forward(args)...) {} //! Run the callback function void run(void) override { Functor::Run(impl_, tuple_); } //! Run the callback function void run(R *r) override { *r = Functor::Run(impl_, tuple_); } protected: //! Disable them CallbackImpl(void) = delete; CallbackImpl(const CallbackImpl &) = delete; CallbackImpl(CallbackImpl &&) = delete; CallbackImpl &operator=(const CallbackImpl &) = delete; private: typename Functor::Type impl_; typename Functor::TupleType tuple_; }; /*! Callback Implementation */ template class CallbackImpl : public Callback { public: using Functor = CallbackFunctor; //! Constructor template CallbackImpl(const typename Functor::Type &impl, TArgs &&...args) : impl_(impl), tuple_(std::forward(args)...) {} //! Constructor template CallbackImpl(typename Functor::Type &&impl, TArgs &&...args) : impl_(std::move(impl)), tuple_(std::forward(args)...) {} //! Run the callback function void run(void) override { Functor::Run(impl_, tuple_); } protected: //! Disable them CallbackImpl(void) = delete; CallbackImpl(const CallbackImpl &) = delete; CallbackImpl(CallbackImpl &&) = delete; CallbackImpl &operator=(const CallbackImpl &) = delete; private: typename Functor::Type impl_; typename Functor::TupleType tuple_; }; //! Create callback closure (member function pointer) template typename Callback::Pointer Callback::New(T *obj, R (T::*impl)(TParams...), TArgs &&...args) { return std::make_shared>( obj, impl, std::forward(args)...); } //! Create callback closure (constable member function pointer) template typename Callback::Pointer Callback::New(const T *obj, R (T::*impl)(TParams...) const, TArgs &&...args) { return std::make_shared>( obj, impl, std::forward(args)...); } //! Create callback closure (volatile member function pointer) template typename Callback::Pointer Callback::New( volatile T *obj, R (T::*impl)(TParams...) volatile, TArgs &&...args) { return std::make_shared>( obj, impl, std::forward(args)...); } //! Create callback closure (constable volatile member function pointer) template typename Callback::Pointer Callback::New(const volatile T *obj, R (T::*impl)(TParams...) const volatile, TArgs &&...args) { return std::make_shared>( obj, impl, std::forward(args)...); } //! Create callback closure (function) template typename Callback::ResultType>::Pointer Callback::New(TFunc &&impl, TArgs &&...args) { return std::make_shared::ResultType, decltype(impl)>>( std::forward(impl), std::forward(args)...); } //! Callback Handler template using CallbackHandler = typename Callback::Pointer; //! Closure using Closure = Callback; //! Closure Handler using ClosureHandler = Closure::Pointer; } // namespace ailego #endif // __AILEGO_PATTERN_CLOSURE_H__ ================================================ FILE: deps/proxima/include/ailego/pattern/defer.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Feb 2020 * \brief Interface of AiLego defer operator */ #ifndef __AILEGO_PATTERN_DEFER_H__ #define __AILEGO_PATTERN_DEFER_H__ #include "scope_guard.h" #define AILEGO_DEFER_NAME_(x, y) x##y #define AILEGO_DEFER_NAME(x) AILEGO_DEFER_NAME_(__ailegoDefer_, x) //! Defer operator #define AILEGO_DEFER(...) \ auto AILEGO_DEFER_NAME(__LINE__) = ailego::ScopeGuard::Make(__VA_ARGS__) #endif // __AILEGO_PATTERN_DEFER_H__ ================================================ FILE: deps/proxima/include/ailego/pattern/factory.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Mar 2018 * \brief Interface of AiLego Utility Factory */ #ifndef __AILEGO_PATTERN_FACTORY_H__ #define __AILEGO_PATTERN_FACTORY_H__ #include #include #include #include #include #include #include namespace ailego { /*! Factory */ template class Factory { public: /*! Factory Register */ template ::value>::type> class Register { public: //! Constructor Register(const char *key) { Factory::Instance()->set(key, [] { return Register::Construct(); }); } //! Constructor template Register(const char *key, TArgs &&...args) { std::tuple tuple(std::forward(args)...); Factory::Instance()->set(key, [tuple] { return Register::Construct( tuple, typename TupleIndexMaker::Type()); }); } protected: //! Tuple Index Maker template struct TupleIndexMaker : TupleIndexMaker {}; //! Tuple Index template struct TupleIndex {}; //! Tuple Index Maker (special) template struct TupleIndexMaker<0, I...> { typedef TupleIndex Type; }; //! Construct a register object template static TImpl *Construct(const std::tuple &tuple, TupleIndex) { return new (std::nothrow) TImpl(std::get(tuple)...); } //! Construct a register object static TImpl *Construct(void) { return new (std::nothrow) TImpl(); } }; //! Produce an instance (c_ptr) static TBase *Make(const char *key) { return Factory::Instance()->produce(key); } //! Produce an instance (shared_ptr) static std::shared_ptr MakeShared(const char *key) { return std::shared_ptr(Factory::Make(key)); } //! Produce an instance (unique_ptr) static std::unique_ptr MakeUnique(const char *key) { return std::unique_ptr(Factory::Make(key)); } //! Test if the class is exist static bool Has(const char *key) { return Factory::Instance()->has(key); } //! Retrieve classes in factory static std::vector Classes(void) { return Factory::Instance()->classes(); } protected: //! Constructor Factory(void) : map_() {} //! Retrieve the singleton factory static Factory *Instance(void) { static Factory factory; return (&factory); } //! Inserts a new class into map template void set(const char *key, TFunc &&func) { map_[key] = std::forward(func); } //! Produce an instance TBase *produce(const char *key) { auto iter = map_.find(key); if (iter != map_.end()) { return iter->second(); } return nullptr; } //! Test if the class is exist bool has(const char *key) { return (map_.find(key) != map_.end()); } //! Retrieve classes in factory std::vector classes(void) const { std::vector vec; for (const auto &it : map_) { vec.push_back(std::string(it.first)); } return vec; } private: //! Disable them Factory(const Factory &); Factory(Factory &&); Factory &operator=(const Factory &); /*! Key Comparer */ struct KeyComparer { bool operator()(const char *lhs, const char *rhs) const { return (std::strcmp(lhs, rhs) < 0); } }; //! Don't use variable buffer as key store. //! The key must be use a static buffer to store. std::map, KeyComparer> map_; }; //! Factory Register #define AILEGO_FACTORY_REGISTER(__NAME__, __BASE__, __IMPL__, ...) \ static ailego::Factory<__BASE__>::Register<__IMPL__> \ __ailegoFactoryRegister_##__NAME__(#__NAME__, ##__VA_ARGS__) } // namespace ailego #endif // __AILEGO_PATTERN_FACTORY_H__ ================================================ FILE: deps/proxima/include/ailego/pattern/scope_guard.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Feb 2020 * \brief Interface of AiLego Scope Guard * \detail Scope guard is an object that employs RAII to execute * a provided callback when leaving scope, be it through * a fall-through, a return, or an exception. */ #ifndef __AILEGO_PATTERN_SCOPE_GUARD_H__ #define __AILEGO_PATTERN_SCOPE_GUARD_H__ #include "closure.h" namespace ailego { /*! Scope Guard Implementation */ template class ScopeGuardImpl { public: using Object = CallbackObject; using Functor = CallbackFunctor; //! Constructor ScopeGuardImpl(ScopeGuardImpl &&rhs) : obj_(rhs.obj_), impl_(std::move(rhs.impl_)), tuple_(std::move(rhs.tuple_)) { rhs.obj_ = nullptr; } //! Constructor template ScopeGuardImpl(typename Object::Type *obj, const typename Functor::Type &impl, TArgs &&...args) : obj_(obj), impl_(impl), tuple_(std::forward(args)...) {} //! Constructor template ScopeGuardImpl(typename Object::Type *obj, typename Functor::Type &&impl, TArgs &&...args) : obj_(obj), impl_(std::move(impl)), tuple_(std::forward(args)...) {} // Destructor ~ScopeGuardImpl(void) { if (obj_) { Functor::Run(obj_, impl_, tuple_); } } protected: //! Disable them ScopeGuardImpl(void) = delete; ScopeGuardImpl(const ScopeGuardImpl &) = delete; ScopeGuardImpl &operator=(const ScopeGuardImpl &) = delete; private: //! Members typename Object::Type *obj_; typename Functor::Type impl_; typename Functor::TupleType tuple_; }; /*! Scope Guard Implementation (void, TFunc) */ template class ScopeGuardImpl { public: //! Callback Functor Type using Functor = CallbackFunctor; //! Constructor ScopeGuardImpl(ScopeGuardImpl &&rhs) : impl_(std::move(rhs.impl_)), tuple_(std::move(rhs.tuple_)), valid_(rhs.valid_) { rhs.valid_ = false; } //! Constructor template ScopeGuardImpl(const typename Functor::Type &impl, TArgs &&...args) : impl_(impl), tuple_(std::forward(args)...), valid_(true) {} //! Constructor template ScopeGuardImpl(typename Functor::Type &&impl, TArgs &&...args) : impl_(std::move(impl)), tuple_(std::forward(args)...), valid_(true) {} // Destructor ~ScopeGuardImpl(void) { if (valid_) { Functor::Run(impl_, tuple_); } } protected: //! Disable them ScopeGuardImpl(void) = delete; ScopeGuardImpl(const ScopeGuardImpl &) = delete; ScopeGuardImpl &operator=(const ScopeGuardImpl &) = delete; private: //! Members typename Functor::Type impl_; typename Functor::TupleType tuple_; bool valid_; }; /*! Scope Guard */ struct ScopeGuard { //! Make a scope guard object (member function pointer) template static inline auto Make(T *obj, R (T::*impl)(TParams...), TArgs &&...args) -> ScopeGuardImpl::Type> { return ScopeGuardImpl::Type>( obj, impl, std::forward(args)...); } //! Make a scope guard object (constable member function pointer) template static inline auto Make(const T *obj, R (T::*impl)(TParams...) const, TArgs &&...args) -> ScopeGuardImpl::Type> { return ScopeGuardImpl::Type>( obj, impl, std::forward(args)...); } //! Make a scope guard object (volatile member function pointer) template static inline auto Make(volatile T *obj, R (T::*impl)(TParams...) volatile, TArgs &&...args) -> ScopeGuardImpl::Type> { return ScopeGuardImpl::Type>( obj, impl, std::forward(args)...); } //! Make a scope guard object (constable volatile member function pointer) template static inline auto Make(const volatile T *obj, R (T::*impl)(TParams...) const volatile, TArgs &&...args) -> ScopeGuardImpl::Type> { return ScopeGuardImpl::Type>( obj, impl, std::forward(args)...); } //! Make a scope guard object (function) template < typename TFunc, typename... TArgs, typename = typename std::enable_if::Value>::type> static inline auto Make(TFunc &&impl, TArgs &&...args) -> ScopeGuardImpl::Type> { return ScopeGuardImpl::Type>( std::forward(impl), std::forward(args)...); } }; } // namespace ailego #endif // __AILEGO_PATTERN_SCOPE_GUARD_H__ ================================================ FILE: deps/proxima/include/ailego/pattern/singleton.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Aug 2019 * \brief Interface of AiLego Utility Singleton */ #ifndef __AILEGO_PATTERN_SINGLETON_H__ #define __AILEGO_PATTERN_SINGLETON_H__ #include namespace ailego { /*! Singleton (C++11) */ template class Singleton { public: using ObjectType = typename std::remove_reference::type; //! Retrieve instance of object static ObjectType &Instance(void) noexcept( std::is_nothrow_constructible::value) { // Since it's a static variable, if the class has already been created, // it won't be created again. And it is thread-safe in C++11. static ObjectType obj; return obj; } protected: //! Constructor (Allow inheritance) Singleton(void) {} private: //! Disable them Singleton(Singleton const &) = delete; Singleton(Singleton &&) = delete; Singleton &operator=(Singleton const &) = delete; Singleton &operator=(Singleton &&) = delete; }; } // namespace ailego #endif // __AILEGO_PATTERN_SINGLETON_H__ ================================================ FILE: deps/proxima/include/ailego/string/string_concat_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Jiliang.ljl * \date Mar 2021 * \brief Alphameric interface * \detail Alphameric is used to facilitate string concatenation * memory allocation. */ #ifndef __AILEGO_STRING_STRING_CONCAT_HELPER_H__ #define __AILEGO_STRING_STRING_CONCAT_HELPER_H__ #include #include #include "string_view.h" namespace ailego { namespace internal { //! Helper class to convert integer and float types to string, facilitating //! string concatenation memory allocation. class Alphameric { public: //! Deals with int, int8_t, int16_t, int32_t, bool, short, signed char, non //! class enum Alphameric(int n) : view_(buffer_, snprintf(buffer_, sizeof(buffer_), "%d", n)) {} //! Deals with unsigned int, uint8_t, uint16_t, uint32_t, unsigned short, //! unsigned char Alphameric(unsigned int n) : view_(buffer_, snprintf(buffer_, sizeof(buffer_), "%u", n)) {} //! Deals with long, int32_t, int64_t Alphameric(long n) : view_(buffer_, snprintf(buffer_, sizeof(buffer_), "%ld", n)) {} //! Deals with unsigned long, uint32_t, uint64_t Alphameric(unsigned long n) : view_(buffer_, snprintf(buffer_, sizeof(buffer_), "%lu", n)) {} //! Deals with long long, int64_t Alphameric(long long n) : view_(buffer_, snprintf(buffer_, sizeof(buffer_), "%lld", n)) {} //! Deals with unsigned long long, uint64_t Alphameric(unsigned long long n) : view_(buffer_, snprintf(buffer_, sizeof(buffer_), "%llu", n)) {} //! Deals with float, with 6 precision digit the same as std::to_string Alphameric(float f) : view_(buffer_, snprintf(buffer_, sizeof(buffer_), "%g", f)) {} //! Deals with double, with 6 precision digit the same as std::to_string Alphameric(double f) : view_(buffer_, snprintf(buffer_, sizeof(buffer_), "%g", f)) {} //! Deals with long double, with 6 precision digit the same as std::to_string Alphameric(long double f) : view_(buffer_, snprintf(buffer_, sizeof(buffer_), "%Lg", f)) {} //! Deals with const char* Alphameric(const char *s) : view_(s) {} //! Deals with std::string Alphameric(const std::string &s) : view_(s) {} //! Deals with StringView Alphameric(StringView s) : view_(s) {} // Use string literals ":" instead of character literals ':'. Alphameric(char c) = delete; Alphameric(const Alphameric &) = delete; Alphameric &operator=(const Alphameric &) = delete; //! Deals with enum class with non int underlying type template {} && !std::is_convertible{}>::type> Alphameric(T e) : Alphameric(static_cast::type>(e)) {} //! Deals with std::vector subscript reference template ::value && (std::is_same::reference>::value || std::is_same::const_reference>::value)>:: type * = nullptr> Alphameric(T e) : Alphameric(static_cast(e)) {} //! string size size_t size() const { return view_.size(); } //! string data const char *data() const { return view_.data(); } //! string view StringView view() const { return view_; } private: static constexpr int kBufferSize = 32; char buffer_[kBufferSize]; StringView view_; }; } // namespace internal } // namespace ailego #endif // __AILEGO_STRING_STRING_CONCAT_HELPER_H__ ================================================ FILE: deps/proxima/include/ailego/string/string_view.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Jiliang.ljl * \date Mar 2021 * \brief StringView interface */ #ifndef __AILEGO_STRING_STRING_VIEW_H__ #define __AILEGO_STRING_STRING_VIEW_H__ #include namespace ailego { //! StringView provides a lightweight view into the string data provided by //! a `std::string`, double-quoted string literal, character array, or even //! another `StringView`. //! //! A `StringView` does *not* own the string to which it //! points, and that data cannot be modified through the view. class StringView { public: //! Default constructor StringView() = default; //! Construct from c-string StringView(const char *str) : data_(str), size_(str != nullptr ? strlen(str) : 0) {} //! Construct from [str, str+s) StringView(const char *str, size_t len) : data_(str), size_(len) {} //! Construct from std::string StringView(const std::string &str) : data_(str.data()), size_(str.size()) {} //! Retrieve data of string const char *data() const { return data_; } //! Retrieve size of string size_t size() const { return size_; } //! Retrieve non-zero if it is empty bool empty() const { return size_ == 0; } private: const char *data_{nullptr}; size_t size_{0}; }; } // namespace ailego #endif // __AILEGO_STRING_STRING_VIEW_H__ ================================================ FILE: deps/proxima/include/ailego/utility/bitset_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Aug 2018 * \brief Interface of AiLego Utility Flat Bitset */ #ifndef __AILEGO_UTILITY_BITSET_HELPER_H__ #define __AILEGO_UTILITY_BITSET_HELPER_H__ #include #include namespace ailego { /*! Bitset Helper */ class BitsetHelper { public: //! Constructor BitsetHelper(void) {} //! Constructor BitsetHelper(void *buf, size_t len) : array_(reinterpret_cast(buf)), size_(len / sizeof(uint32_t)) {} //! Mount a buffer as bitset void mount(void *buf, size_t len) { array_ = reinterpret_cast(buf); size_ = len / sizeof(uint32_t); } //! Umount the buffer void umount(void) { array_ = nullptr; size_ = 0u; } //!Clear the bitset void clear(void) { memset(array_, 0, sizeof(uint32_t) * size_); } //! Test a bit in bitset bool test(size_t num) const { ailego_assert_with((size_ << 5) > num, "overflow argument"); return ((array_[num >> 5] & (1u << (num & 0x1f))) != 0); } //! Set a bit in bitset void set(size_t num) { ailego_assert_with((size_ << 5) > num, "overflow argument"); uint32_t mask = (1u << (num & 0x1f)); array_[num >> 5] |= mask; } //! Reset a bit in bitset void reset(size_t num) { ailego_assert_with((size_ << 5) > num, "overflow argument"); uint32_t mask = (1u << (num & 0x1f)); array_[num >> 5] &= ~mask; } //! Toggle a bit in bitset void flip(size_t num) { ailego_assert_with((size_ << 5) > num, "overflow argument"); uint32_t mask = (1u << (num & 0x1f)); array_[num >> 5] ^= mask; } //! Extract the bitset to an array void extract(size_t base, std::vector *out) const { const uint32_t *iter = array_; const uint32_t *last = array_ + size_; for (; iter != last; ++iter) { uint32_t w = *iter; while (w != 0) { uint32_t c = ailego_ctz32(w); w &= ~(1u << c); out->push_back(base + c); } base += 32u; } } //! Extract the bitset to an array void extract(std::vector *out) const { this->extract(0, out); } //! Check if all bits are set to true bool test_all(void) const; //! Check if any bits are set to true bool test_any(void) const; //! Check if none of the bits are set to true bool test_none(void) const; //! Compute the cardinality of a bitset size_t cardinality(void) const; //! Calculate the size of buffer if it contains N bits static size_t BufferSize(size_t N) { return (((N + 0x1f) >> 5) << 2); } //! Calculate the count of bits can be contained static size_t BitsCount(size_t len) { return ((len >> 2) << 2); } //! Check if all bits are set to true static bool TestAll(const uint32_t *arr, size_t size); //! Check if cube bits are set to true static bool TestAny(const uint32_t *arr, size_t size); //! Check if none of the bits are set to true static bool TestNone(const uint32_t *arr, size_t size); //! Compute the AND cardinality between two bitsets static size_t BitwiseAndCardinality(const uint32_t *lhs, const uint32_t *rhs, size_t size); //! Compute the OR cardinality between two bitsets static size_t BitwiseOrCardinality(const uint32_t *lhs, const uint32_t *rhs, size_t size); //! Compute the ANDNOT cardinality between two bitsets static size_t BitwiseAndnotCardinality(const uint32_t *lhs, const uint32_t *rhs, size_t size); //! Compute the XOR cardinality between two bitsets static size_t BitwiseXorCardinality(const uint32_t *lhs, const uint32_t *rhs, size_t size); //! Compute the cardinality of a bitset static size_t Cardinality(const uint32_t *arr, size_t size); //! Perform binary AND static void BitwiseAnd(uint32_t *lhs, const uint32_t *rhs, size_t size); //! Perform binary AND_NOT static void BitwiseAndnot(uint32_t *lhs, const uint32_t *rhs, size_t size); //! Perform binary OR static void BitwiseOr(uint32_t *lhs, const uint32_t *rhs, size_t size); //! Perform binary XOR static void BitwiseXor(uint32_t *lhs, const uint32_t *rhs, size_t size); //! Perform binary NOT static void BitwiseNot(uint32_t *arr, size_t size); private: uint32_t *array_{nullptr}; size_t size_{0u}; }; } // namespace ailego #endif // __AILEGO_UTILITY_BITSET_HELPER_H__ ================================================ FILE: deps/proxima/include/ailego/utility/dl_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Aug 2020 * \brief Interface of AiLego Utility Dynamic Library Helper */ #ifndef __AILEGO_UTILITY_DL_HELPER_H__ #define __AILEGO_UTILITY_DL_HELPER_H__ #include #include namespace ailego { /*! Dynamic Library Helper */ struct DLHelper { //! Load library from path static void *Load(const char *path, std::string *err); //! Unload a library static void Unload(void *handle); //! Retrieve a symbol from a library handle static void *Symbol(void *handle, const char *symbol); //! Load library from path static void *Load(const std::string &path, std::string *err) { return DLHelper::Load(path.c_str(), err); } //! Retrieve a symbol from a library handle static void *Symbol(void *handle, const std::string &symbol) { return DLHelper::Symbol(handle, symbol.c_str()); } }; } // namespace ailego #endif // __AILEGO_UTILITY_DL_HELPER_H__ ================================================ FILE: deps/proxima/include/ailego/utility/file_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2020 * \brief Interface of AiLego Utility File Helper */ #ifndef __AILEGO_UTILITY_FILE_HELPER_H__ #define __AILEGO_UTILITY_FILE_HELPER_H__ #include #include #include namespace ailego { /*! File Helper Module */ struct FileHelper { #if defined(_WIN32) || defined(_WIN64) //! Native Handle in Windows typedef void *NativeHandle; #else //! Native Handle in POSIX typedef int NativeHandle; #endif //! Invalid Handle static constexpr NativeHandle InvalidHandle = (NativeHandle)(-1); //! Retrieve the path of self process static bool GetSelfPath(std::string *path); //! Retrieve the final path for the specified file static bool GetFilePath(NativeHandle handle, std::string *path); //! Retrieve current working directory static bool GetWorkingDirectory(std::string *path); //! Get the size of a file static bool GetFileSize(const char *path, size_t *psz); //! Delete a name and possibly the file it refers to static bool DeleteFile(const char *path); //! Change the name or location of a file static bool RenameFile(const char *oldpath, const char *newpath); //! Make directories' path static bool MakePath(const char *path); //! Remove a file or a directory (includes files & subdirectories) static bool RemovePath(const char *path); //! Remove a directory (includes files & subdirectories) static bool RemoveDirectory(const char *path); //! Retrieve non-zero if the path exists static bool IsExist(const char *path); //! Retrieve non-zero if the path is a regular file static bool IsRegular(const char *path); //! Retrieve non-zero if the path is a directory static bool IsDirectory(const char *path); //! Retrieve non-zero if the path is a symbolic link static bool IsSymbolicLink(const char *path); //! Retrieve non-zero if two paths are pointing to the same file static bool IsSame(const char *path1, const char *path2); //! Retrieve the size of a file static size_t FileSize(const char *path) { size_t file_size = 0; GetFileSize(path, &file_size); return file_size; } //! Retrieve the base name from a path static const char *BaseName(const char *path) { const char *output = std::strrchr(path, '/'); if (!output) { output = std::strrchr(path, '\\'); } return (output ? output + 1 : path); } }; } // namespace ailego #endif // __AILEGO_UTILITY_FILE_HELPER_H__ ================================================ FILE: deps/proxima/include/ailego/utility/float_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2019 * \brief Interface of AiLego Utility Float Helper */ #ifndef __AILEGO_UTILITY_FLOAT_HELPER_H__ #define __AILEGO_UTILITY_FLOAT_HELPER_H__ #include namespace ailego { /*! Float Helper */ struct FloatHelper { //! Convert FP16 to FP32 static float ToFP32(uint16_t val); //! Convert FP16 to FP32 (array) static void ToFP32(const uint16_t *arr, size_t size, float *out); //! Convert FP16 to FP32 with normalization (array) static void ToFP32(const uint16_t *arr, size_t size, float norm, float *out); //! Convert FP32 to FP16 static uint16_t ToFP16(float val); //! Convert FP32 to FP16 (array) static void ToFP16(const float *arr, size_t size, uint16_t *out); //! Convert FP32 to FP16 with normalization (array) static void ToFP16(const float *arr, size_t size, float norm, uint16_t *out); //! Convert FP16 to FP32 with normalization static inline float ToFP32(uint16_t val, float norm) { return (FloatHelper::ToFP32(val) / norm); } //! Convert FP32 to FP16 with normalization static inline uint16_t ToFP16(float val, float norm) { return FloatHelper::ToFP16(val / norm); } }; #if !defined(__aarch64__) /*! Half-Precision Floating Point */ class Float16 { public: //! Constructor Float16(void) : value_(0) {} //! Constructor Float16(float val) : value_(FloatHelper::ToFP16(val)) {} //! Constructor Float16(double val) : value_(FloatHelper::ToFP16(static_cast(val))) {} //! Assigment Float16 &operator=(float val) { this->value_ = FloatHelper::ToFP16(val); return *this; } //! Assigment Float16 &operator+=(float val) { this->value_ = FloatHelper::ToFP16(FloatHelper::ToFP32(this->value_) + val); return *this; } //! Assigment Float16 &operator-=(float val) { this->value_ = FloatHelper::ToFP16(FloatHelper::ToFP32(this->value_) - val); return *this; } //! Assigment Float16 &operator*=(float val) { this->value_ = FloatHelper::ToFP16(FloatHelper::ToFP32(this->value_) * val); return *this; } //! Assigment Float16 &operator/=(float val) { this->value_ = FloatHelper::ToFP16(FloatHelper::ToFP32(this->value_) / val); return *this; } //! Retrieve value in FP32 operator float() const { return FloatHelper::ToFP32(this->value_); } //! Equal operator bool operator==(const Float16 &rhs) const { return this->value_ == rhs.value_; } //! No equal operator bool operator!=(const Float16 &rhs) const { return this->value_ != rhs.value_; } //! Less than operator bool operator<(const Float16 &rhs) const { return FloatHelper::ToFP32(this->value_) < FloatHelper::ToFP32(rhs.value_); } //! Less than or equal operator bool operator<=(const Float16 &rhs) const { return FloatHelper::ToFP32(this->value_) <= FloatHelper::ToFP32(rhs.value_); } //! Greater than operator bool operator>(const Float16 &rhs) const { return FloatHelper::ToFP32(this->value_) > FloatHelper::ToFP32(rhs.value_); } //! Greater than or equal operator bool operator>=(const Float16 &rhs) const { return FloatHelper::ToFP32(this->value_) >= FloatHelper::ToFP32(rhs.value_); } //! Calculate the absolute value static inline Float16 Absolute(const Float16 &x) { Float16 abs; abs.value_ = static_cast(x.value_ & 0x7fff); return abs; } private: uint16_t value_; }; #else /*! Half-Precision Floating Point */ class Float16 { public: //! Constructor Float16(void) : value_(0) {} //! Constructor Float16(__fp16 val) : value_(val) {} //! Assigment Float16 &operator=(__fp16 val) { this->value_ = val; return *this; } //! Assigment Float16 &operator+=(__fp16 val) { this->value_ = this->value_ + val; return *this; } //! Assigment Float16 &operator-=(__fp16 val) { this->value_ = this->value_ - val; return *this; } //! Assigment Float16 &operator*=(__fp16 val) { this->value_ = this->value_ * val; return *this; } //! Assigment Float16 &operator/=(__fp16 val) { this->value_ = this->value_ / val; return *this; } //! Retrieve value in FP16 operator __fp16() const { return this->value_; } //! Equal operator bool operator==(const Float16 &rhs) const { return this->value_ == rhs.value_; } //! No equal operator bool operator!=(const Float16 &rhs) const { return this->value_ != rhs.value_; } //! Less than operator bool operator<(const Float16 &rhs) const { return this->value_ < rhs.value_; } //! Less than or equal operator bool operator<=(const Float16 &rhs) const { return this->value_ <= rhs.value_; } //! Greater than operator bool operator>(const Float16 &rhs) const { return this->value_ > rhs.value_; } //! Greater than or equal operator bool operator>=(const Float16 &rhs) const { return this->value_ >= rhs.value_; } //! Calculate the absolute value static inline Float16 Absolute(const Float16 &x) { Float16 abs(x.value_); uint16_t *p = reinterpret_cast(&abs.value_); *p &= 0x7fff; return abs; } private: __fp16 value_; }; #endif // Check size of Float16 static_assert(sizeof(Float16) == 2, "Float16 must be aligned with 2 bytes"); } // namespace ailego #endif // __AILEGO_UTILITY_FLOAT_HELPER_H__ ================================================ FILE: deps/proxima/include/ailego/utility/process_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2020 * \brief Interface of AiLego Utility Process Helper */ #ifndef __AILEGO_UTILITY_PROCESS_HELPER_H__ #define __AILEGO_UTILITY_PROCESS_HELPER_H__ #include namespace ailego { /*! Process Helper */ struct ProcessHelper { //! Retrieve current process id static uint32_t SelfPid(void); //! Retrieve current thread id static uint32_t SelfTid(void); //! Retrieve current parent process id static uint32_t ParentPid(void); //! Retrieve a backtrace for calling program static size_t BackTrace(void **buf, size_t size); //! Retrieve non-zero if the process id exists static bool IsExist(uint32_t pid); //! Run the process in the background static void Daemon(const char *out, const char *err); //! Ignore signal static void IgnoreSignal(int sig); //! Register signal static void RegisterSignal(int sig, void f(int)); //! Retrieve the name of a signal id static const char *SignalName(int sig); }; } // namespace ailego #endif // __AILEGO_UTILITY_PROCESS_HELPER_H__ ================================================ FILE: deps/proxima/include/ailego/utility/string_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2017 * \brief Interface of AiLego Utility String Helper */ #ifndef __AILEGO_UTILITY_STRING_HELPER_H__ #define __AILEGO_UTILITY_STRING_HELPER_H__ #include #include #include #include #include #include "string_helper_impl.h" namespace ailego { /*! String Helper */ struct StringHelper { //! Return true if the `ref` starts with the given prefix static bool StartsWith(const std::string &ref, const std::string &prefix); //! Return true if the `ref` ends with the given suffix static bool EndsWith(const std::string &ref, const std::string &suffix); //! Split a string into a vector of T //! NOTE: delim better NOT contain valid symbol for T, //! i.e. digits + - for integers, //! digits + - E e . for floating numbers //! otherwise there will be performance overhead. template static void Split(const std::string &str, char delim, std::vector *out) { return details::SplitImpl(str, delim, out); } template static void Split(const std::string &str, const char *delim, std::vector *out) { return details::SplitImpl(str, delim, out); } template static void Split(const std::string &str, const std::string &delim, std::vector *out) { return details::SplitImpl(str, delim, out); } // Trim from start (in place) static void LeftTrim(std::string &str); // Trim from end (in place) static void RightTrim(std::string &str); // Trim from both ends (in place) static void Trim(std::string &str); // Trim from start (copying) static std::string CopyLeftTrim(std::string str); // Trim from end (copying) static std::string CopyRightTrim(std::string str); // Trim from both ends (copying) static std::string CopyTrim(std::string str); //! Compare ignore case static bool CompareIgnoreCase(const std::string &a, const std::string &b); //! Convert string to floating-point number (double) static bool ToDouble(const std::string &str, double *val) { char *endptr = nullptr; *val = std::strtod(str.c_str(), &endptr); return (endptr && *endptr == '\0'); } //! Convert string to floating-point number (float) static bool ToFloat(const std::string &str, float *val) { char *endptr = nullptr; *val = std::strtof(str.c_str(), &endptr); return (endptr && *endptr == '\0'); } //! Convert string to integer number (int8_t) static bool ToInt8(const std::string &str, int8_t *val) { char *endptr = nullptr; *val = static_cast(std::strtol(str.c_str(), &endptr, 0)); return (endptr && *endptr == '\0'); } //! Convert string to integer number (int16_t) static bool ToInt16(const std::string &str, int16_t *val) { char *endptr = nullptr; *val = static_cast(std::strtol(str.c_str(), &endptr, 0)); return (endptr && *endptr == '\0'); } //! Convert string to integer number (int32_t) static bool ToInt32(const std::string &str, int32_t *val) { char *endptr = nullptr; *val = static_cast(std::strtol(str.c_str(), &endptr, 0)); return (endptr && *endptr == '\0'); } //! Convert string to integer number (int64_t) static bool ToInt64(const std::string &str, int64_t *val) { char *endptr = nullptr; *val = static_cast(std::strtoll(str.c_str(), &endptr, 0)); return (endptr && *endptr == '\0'); } //! Convert string to unsigned integer number (uint8_t) static bool ToUint8(const std::string &str, uint8_t *val) { char *endptr = nullptr; *val = static_cast(std::strtoul(str.c_str(), &endptr, 0)); return (endptr && *endptr == '\0'); } //! Convert string to unsigned integer number (uint16_t) static bool ToUint16(const std::string &str, uint16_t *val) { char *endptr = nullptr; *val = static_cast(std::strtoul(str.c_str(), &endptr, 0)); return (endptr && *endptr == '\0'); } //! Convert string to unsigned integer number (uint32_t) static bool ToUint32(const std::string &str, uint32_t *val) { char *endptr = nullptr; *val = static_cast(std::strtoul(str.c_str(), &endptr, 0)); return (endptr && *endptr == '\0'); } //! Convert string to unsigned integer number (uint64_t) static bool ToUint64(const std::string &str, uint64_t *val) { char *endptr = nullptr; *val = static_cast(std::strtoull(str.c_str(), &endptr, 0)); return (endptr && *endptr == '\0'); } //! Convert floating-point number string (double) static std::string ToString(double val) { return std::to_string(val); } //! Convert floating-point number string (float) static std::string ToString(float val) { return std::to_string(val); } //! Convert integer number to string (int8_t) static std::string ToString(int8_t val) { return std::to_string(val); } //! Convert integer number to string (int16_t) static std::string ToString(int16_t val) { return std::to_string(val); } //! Convert integer number to string (int32_t) static std::string ToString(int32_t val) { return std::to_string(val); } //! Convert integer number to string (int64_t) static std::string ToString(int64_t val) { return std::to_string(val); } //! Convert unsigned integer number to string (uint8_t) static std::string ToString(uint8_t val) { return std::to_string(val); } //! Convert unsigned integer number to string (uint16_t) static std::string ToString(uint16_t val) { return std::to_string(val); } //! Convert unsigned integer number to string (uint32_t) static std::string ToString(uint32_t val) { return std::to_string(val); } //! Convert unsigned integer number to string (uint64_t) static std::string ToString(uint64_t val) { return std::to_string(val); } //! Concatenation of arbitrary number of std::string, c-string, integers, //! floating point numbers with one memory allocation. //! E.g. auto s = Concat("foo", 123, std::string("bar"), 3.14159); //! //! Do not do the following, use Append instead //! str = Concat(str, ...); //! str.append(Concat(str, ...)); //! str += Concat(str, ...); //! //! NOTE: char literal(e.g. ':') is not allowed, //! use string literal(e.g. ":") instead. static std::string Concat() { return {}; } static std::string Concat(const internal::Alphameric &a); static std::string Concat(const internal::Alphameric &a, const internal::Alphameric &b); static std::string Concat(const internal::Alphameric &a, const internal::Alphameric &b, const internal::Alphameric &c); static std::string Concat(const internal::Alphameric &a, const internal::Alphameric &b, const internal::Alphameric &c, const internal::Alphameric &d); // Support 5 or more arguments template static std::string Concat(const internal::Alphameric &a, const internal::Alphameric &b, const internal::Alphameric &c, const internal::Alphameric &d, const internal::Alphameric &e, const T &...args) { std::string result; Append(&result, a, b, c, d, e, args...); return result; } //! Append arbitrary number of std::string, c-string, integers, //! floating point numbers to existing string with one memory allocation. //! E.g. Append(&str, "foo", 123, std::string("bar"), 3.14159); //! //! WARNING: Append requires that none of the arguments be a reference to //! destination str. //! //! Do not do the following //! std::string s = "foo"; //! Append(&s, s); //! //! NOTE: char literal(e.g. ':') is not allowed, //! use string literal(e.g. ":") instead. static void Append(std::string *) {} static void Append(std::string *str, const internal::Alphameric &a); static void Append(std::string *str, const internal::Alphameric &a, const internal::Alphameric &b); static void Append(std::string *str, const internal::Alphameric &a, const internal::Alphameric &b, const internal::Alphameric &c); static void Append(std::string *str, const internal::Alphameric &a, const internal::Alphameric &b, const internal::Alphameric &c, const internal::Alphameric &d); // Support 5 or more arguments template static void Append(std::string *str, const internal::Alphameric &a, const internal::Alphameric &b, const internal::Alphameric &c, const internal::Alphameric &d, const internal::Alphameric &e, const T &...args) { AppendViews(str, {a.view(), b.view(), c.view(), d.view(), e.view(), static_cast(args).view()...}); } //! Append list of StringView to str. static void AppendViews(std::string *str, std::initializer_list views); }; inline std::string StringHelper::Concat(const internal::Alphameric &a) { std::string result; Append(&result, a); return result; } inline std::string StringHelper::Concat(const internal::Alphameric &a, const internal::Alphameric &b) { std::string result; Append(&result, a, b); return result; } inline std::string StringHelper::Concat(const internal::Alphameric &a, const internal::Alphameric &b, const internal::Alphameric &c) { std::string result; Append(&result, a, b, c); return result; } inline std::string StringHelper::Concat(const internal::Alphameric &a, const internal::Alphameric &b, const internal::Alphameric &c, const internal::Alphameric &d) { std::string result; Append(&result, a, b, c, d); return result; } } // namespace ailego #endif // __AILEGO_UTILITY_STRING_HELPER_H__ ================================================ FILE: deps/proxima/include/ailego/utility/string_helper_impl.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author jiliang.ljl * \date Feb 2021 * \brief Impl details of AiLego Utility String Helper */ #ifndef __AILEGO_UTILITY_STRING_HELPER_IMPL_H__ #define __AILEGO_UTILITY_STRING_HELPER_IMPL_H__ #include #include #include namespace ailego { namespace details { //! Convert string to integers or floating point numbers template static T CStringToType(const char *begin, char **endptr) { static_assert( std::is_same::value || std::is_same::value || std::is_same::value || std::is_same::value || std::is_same::value || std::is_same::value || std::is_same::value || std::is_same::value || std::is_same::value || std::is_same::value, "type not supported"); if (std::is_same::value || std::is_same::value || std::is_same::value) { return static_cast(strtol(begin, endptr, 0)); } else if (std::is_same::value) { return static_cast(strtoll(begin, endptr, 0)); } else if (std::is_same::value || std::is_same::value || std::is_same::value) { return static_cast(strtoul(begin, endptr, 0)); } else if (std::is_same::value) { return static_cast(strtoull(begin, endptr, 0)); } else if (std::is_same::value) { return static_cast(strtof(begin, endptr)); } else { return static_cast(strtod(begin, endptr)); } } //! Convert [begin, end) to T //! If [end, ) contains valid T symbol, extra overhead will be incurred by //! constructing std::string template struct StringToType { T operator()(const char *begin, const char *end) { char *eptr = nullptr; auto v = CStringToType(begin, &eptr); if (eptr > end) { // NOTE: [begin, end) is not 0 terminated // If delimiter contains valid T symbol, eptr might point to location // after end. // We create string here, which is guaranteed to be 0 terminated. std::string s{begin, end}; return CStringToType(s.c_str(), &eptr); } return v; } }; //! Specialization for std::string template <> struct StringToType { std::string operator()(const char *begin, const char *end) { return {begin, end}; } }; //! Return delimiter length. template struct DelimiterLen { size_t operator()(T delimiter); }; //! Return delimiter length for char. template <> struct DelimiterLen { size_t operator()(char) { return 1; } }; //! Return delimiter length for const char*. template <> struct DelimiterLen { size_t operator()(const char *delimiter) { return delimiter == nullptr ? 0 : std::strlen(delimiter); } }; //! Return delimiter length for std::string. template <> struct DelimiterLen { size_t operator()(const std::string &delimiter) { return delimiter.size(); } }; //! Split implementation. template ::value || std::is_same::value || std::is_same::value, D>::type> static void SplitImpl(const std::string &str, D delim, std::vector *out) { StringToType func; out->clear(); auto s = str.data(); size_t delimiter_len = DelimiterLen()(delim); if (delimiter_len != 0) { size_t a = 0, b = str.find(delim); while (b != std::string::npos) { out->push_back(func(s + a, s + b)); a = b + delimiter_len; b = str.find(delim, a); } out->push_back(func(s + a, s + str.length())); } else { out->push_back(func(s + 0, s + str.length())); } } } // namespace details } // namespace ailego #endif ================================================ FILE: deps/proxima/include/ailego/utility/time_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2017 * \brief Interface of AiLego Utility Time Helper */ #ifndef __AILEGO_UTILITY_TIME_HELPER_H__ #define __AILEGO_UTILITY_TIME_HELPER_H__ #include #include namespace ailego { /*! Monotime */ struct Monotime { //! Retrieve monotonic time in nanoseconds static uint64_t NanoSeconds(void); //! Retrieve monotonic time in microseconds static uint64_t MicroSeconds(void); //! Retrieve monotonic time in milliseconds static uint64_t MilliSeconds(void); //! Retrieve monotonic time in seconds static uint64_t Seconds(void); }; /*! Realtime */ struct Realtime { //! Retrieve system time in nanoseconds static uint64_t NanoSeconds(void); //! Retrieve system time in microseconds static uint64_t MicroSeconds(void); //! Retrieve system time in milliseconds static uint64_t MilliSeconds(void); //! Retrieve system time in seconds static uint64_t Seconds(void); //! Retrieve a timestamp as a specific local time format static size_t Localtime(uint64_t stamp, const char *format, char *buf, size_t len); //! Retrieve a timestamp as a specific GMT time format static size_t Gmtime(uint64_t stamp, const char *format, char *buf, size_t len); //! Retrieve local time in string static size_t Localtime(const char *format, char *buf, size_t len); //! Retrieve GMT time in string static size_t Gmtime(const char *format, char *buf, size_t len); //! Retrieve local time in string static size_t Localtime(char *buf, size_t len) { return Localtime("%Y-%m-%d %H:%M:%S", buf, len); } //! Retrieve GMT time in string static size_t Gmtime(char *buf, size_t len) { return Gmtime("%Y-%m-%d %H:%M:%S", buf, len); } //! Retrieve local time in string static std::string Localtime(void) { char str[32]; Localtime(str, sizeof(str)); return std::string(str); } //! Retrieve GMT time in string static std::string Gmtime(void) { char str[32]; Gmtime(str, sizeof(str)); return std::string(str); } //! Retrieve a timestamp as a specific local time format static size_t Localtime(uint64_t stamp, char *buf, size_t len) { return Localtime(stamp, "%Y-%m-%d %H:%M:%S", buf, len); } //! Retrieve a timestamp as a specific GMT time format static size_t Gmtime(uint64_t stamp, char *buf, size_t len) { return Gmtime(stamp, "%Y-%m-%d %H:%M:%S", buf, len); } //! Retrieve a timestamp as a specific local time format static std::string Localtime(uint64_t stamp) { char str[32]; Localtime(stamp, str, sizeof(str)); return std::string(str); } //! Retrieve a timestamp as a specific GMT time format static std::string Gmtime(uint64_t stamp) { char str[32]; Gmtime(stamp, str, sizeof(str)); return std::string(str); } }; /*! Elapsed Time */ class ElapsedTime { public: //! Constructor ElapsedTime(void) : stamp_(Monotime::NanoSeconds()) {} //! Retrieve the elapsed time in nanoseconds uint64_t nano_seconds(void) const { return (Monotime::NanoSeconds() - stamp_); } //! Retrieve the elapsed time in milliseconds uint64_t micro_seconds(void) const { return (this->nano_seconds() / 1000u); } //! Retrieve the elapsed time in milliseconds uint64_t milli_seconds(void) const { return (this->nano_seconds() / 1000000u); } //! Retrieve the elapsed time in seconds uint64_t seconds(void) const { return (this->nano_seconds() / 1000000000u); } //! Update time stamp void reset(void) { stamp_ = Monotime::NanoSeconds(); } private: uint64_t stamp_; }; } // namespace ailego #endif // __AILEGO_UTILITY_TIME_HELPER_H__ ================================================ FILE: deps/proxima/include/ailego/utility/type_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Dec 2017 * \brief Interface of AiLego Utility Type Helper */ #ifndef __AILEGO_UTILITY_TYPE_HELPER_H__ #define __AILEGO_UTILITY_TYPE_HELPER_H__ #include #include #include "float_helper.h" namespace ailego { //! Determines if a type is an arithmetic type (includes Float16) template struct IsArithmetic : std::integral_constant::value || std::is_same::value> {}; //! Determines if a type is a signed arithmetic type (includes Float16) template struct IsSignedArithmetic : std::integral_constant::value || std::is_same::value> {}; //! Determines if a type is a unsigned arithmetic type (includes Float16) template struct IsUnsignedArithmetic : std::integral_constant::value> {}; //! Determines if a type is a floating-point type (includes Float16) template struct IsFloatingPoint : std::integral_constant::value || std::is_same::value> {}; #if __GNUC__ >= 5 || defined(_MSC_VER) || defined(__clang__) template using IsTriviallyCopyable = std::is_trivially_copyable; #else template using IsTriviallyCopyable = std::has_trivial_copy_constructor; #endif #if __cplusplus >= 201703L // C++17 //! Determines if a type can be invoked with the specified argument types template using IsInvocable = std::is_invocable; //! Determines if a type can be invoked with the specified argument types template using IsInvocableWithResult = std::is_invocable_r; #else //! Determines if a type can be invoked with the specified argument types template struct IsInvocable : std::is_constructible, std::reference_wrapper< typename std::remove_reference::type> > { }; //! Determines if a type can be invoked with the specified argument types template struct IsInvocableWithResult : std::is_constructible, std::reference_wrapper< typename std::remove_reference::type> > { }; #endif //! Fixed underlying_type used with conditional template ::value> struct UnderlyingType { typedef typename std::remove_cv::type type; }; //! Fixed underlying_type used with conditional template struct UnderlyingType { typedef typename std::underlying_type::type type; }; #if __cplusplus >= 201703L // C++17 //! Variadic logical AND metafunction template using Conjunction = std::conjunction; //! Variadic logical OR metafunction template using Disjunction = std::disjunction; #else //! Variadic logical AND metafunction template struct Conjunction : std::true_type {}; //! Variadic logical AND metafunction template struct Conjunction : std::conditional, std::false_type>::type {}; //! Variadic logical OR metafunction template struct Disjunction : std::false_type {}; //! Variadic logical OR metafunction template struct Disjunction : std::conditional >::type {}; #endif } // namespace ailego #endif // __AILEGO_UTILITY_TYPE_HELPER_H__ ================================================ FILE: deps/proxima/include/ailego/version.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Apr 2018 * \brief Interface of AiLego Version */ #ifndef __AILEGO_VERSION_H__ #define __AILEGO_VERSION_H__ namespace ailego { /*! AiLego Version */ struct Version { //! Retrieve the version number in string static const char *String(void); //! Retrieve the detailed version information static const char *Details(void); }; } // namespace ailego #endif // __AILEGO_VERSION_H__ ================================================ FILE: deps/proxima/include/ailego/version.i ================================================ /** * Copyright (C) The Software Authors. All rights reserved. * \file version.i * \author Hechong.xyf * \date Apr 2018 * \version 1.0.0 * \brief Definition of AiLego Version */ #include "internal/platform.h" #ifndef AILEGO_VERSION_TO_STRING_ #define AILEGO_VERSION_TO_STRING_(x) #x #endif #ifndef AILEGO_VERSION_TO_STRING #define AILEGO_VERSION_TO_STRING(x) AILEGO_VERSION_TO_STRING_(x) #endif /*! http://nadeausoftware.com/articles/2012/01/ * c_c_tip_how_use_compiler_predefined_macros_detect_operating_system */ #if defined(__linux) || defined(__linux__) #define AILEGO_VERSION_PLATFORM "Linux" #elif defined(__FreeBSD__) #define AILEGO_VERSION_PLATFORM "FreeBSD" #elif defined(__NetBSD__) #define AILEGO_VERSION_PLATFORM "NetBSD" #elif defined(__OpenBSD__) #define AILEGO_VERSION_PLATFORM "OpenBSD" #elif defined(__APPLE__) || defined(__MACH__) #define AILEGO_VERSION_PLATFORM "Darwin" #elif defined(__CYGWIN__) && !defined(_WIN32) #define AILEGO_VERSION_PLATFORM "Cygwin" #elif defined(_WIN64) #define AILEGO_VERSION_PLATFORM "Microsoft Windows (64-bit)" #elif defined(_WIN32) #define AILEGO_VERSION_PLATFORM "Microsoft Windows (32-bit)" #elif defined(__sun) && defined(__SVR4) #define AILEGO_VERSION_PLATFORM "Solaris" #elif defined(_AIX) #define AILEGO_VERSION_PLATFORM "AIX" #elif defined(__hpux) #define AILEGO_VERSION_PLATFORM "HP-UX" #elif defined(__unix) || defined(__unix__) #define AILEGO_VERSION_PLATFORM "Unix" #else #define AILEGO_VERSION_PLATFORM "Unknown Platform" #endif /*! http://nadeausoftware.com/articles/2012/10/ * c_c_tip_how_detect_compiler_name_and_version_using_compiler_predefined_macros */ #if defined(__NVCC__) #define AILEGO_VERSION_COMPILER_NAME "Nvidia CUDA Compiler" #elif defined(__clang__) #define AILEGO_VERSION_COMPILER_NAME "Clang/LLVM" #elif defined(__ICC) || defined(__INTEL_COMPILER) #define AILEGO_VERSION_COMPILER_NAME "Intel ICC/ICPC" #elif defined(__GNUC__) || defined(__GNUG__) #define AILEGO_VERSION_COMPILER_NAME "GNU GCC/G++" #elif defined(__HP_cc) || defined(__HP_aCC) #define AILEGO_VERSION_COMPILER_NAME "Hewlett-Packard C/aC++" #elif defined(__IBMC__) || defined(__IBMCPP__) #define AILEGO_VERSION_COMPILER_NAME "IBM XL C/C++" #elif defined(_MSC_VER) #define AILEGO_VERSION_COMPILER_NAME "Microsoft Visual C++" #elif defined(__PGI) #define AILEGO_VERSION_COMPILER_NAME "Portland Group PGCC/PGCPP" #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) #define AILEGO_VERSION_COMPILER_NAME "Oracle Solaris Studio" #else #define AILEGO_VERSION_COMPILER_NAME "Unknown Compiler" #endif #if defined(__CUDACC_VER_MAJOR__) #define AILEGO_VERSION_COMPILER \ AILEGO_VERSION_COMPILER_NAME \ " (" AILEGO_VERSION_TO_STRING(__CUDACC_VER_MAJOR__) \ "." AILEGO_VERSION_TO_STRING(__CUDACC_VER_MINOR__) \ "." AILEGO_VERSION_TO_STRING(__CUDACC_VER_BUILD__) ")" #elif defined(__VERSION__) #define AILEGO_VERSION_COMPILER \ AILEGO_VERSION_COMPILER_NAME " (" __VERSION__ ")" #elif defined(_MSC_FULL_VER) #define AILEGO_VERSION_COMPILER \ AILEGO_VERSION_COMPILER_NAME " (" AILEGO_VERSION_TO_STRING(_MSC_FULL_VER) ")" #elif defined(_MSC_VER) #define AILEGO_VERSION_COMPILER \ AILEGO_VERSION_COMPILER_NAME " (" AILEGO_VERSION_TO_STRING(_MSC_VER) ")" #elif defined(__PGIC__) #define AILEGO_VERSION_COMPILER \ AILEGO_VERSION_COMPILER_NAME \ " (" AILEGO_VERSION_TO_STRING(__PGIC__) "." AILEGO_VERSION_TO_STRING( \ __PGIC_MINOR__) "." AILEGO_VERSION_TO_STRING(__PGIC_PATCHLEVEL__) ")" #elif defined(__xlc__) #define AILEGO_VERSION_COMPILER AILEGO_VERSION_COMPILER_NAME " (" __xlc__ ")" #elif defined(__SUNPRO_C) #define AILEGO_VERSION_COMPILER \ AILEGO_VERSION_COMPILER_NAME " (" AILEGO_VERSION_TO_STRING(__SUNPRO_C) ")" #elif defined(__HP_cc) #define AILEGO_VERSION_COMPILER \ AILEGO_VERSION_COMPILER_NAME " (" AILEGO_VERSION_TO_STRING(__HP_cc) ")" #else #define AILEGO_VERSION_COMPILER AILEGO_VERSION_COMPILER_NAME #endif #if defined(__x86_64__) || defined(_M_X64) #define AILEGO_VERSION_PROCESSOR "x86 64-bit Processor" #elif defined(__i386) || defined(_M_IX86) #define AILEGO_VERSION_PROCESSOR "x86 32-bit Processor" #elif defined(__ARM_ARCH) #if defined(__ARM_64BIT_STATE) #define AILEGO_VERSION_PROCESSOR "ARM 64-bit Processor" #else #define AILEGO_VERSION_PROCESSOR "ARM 32-bit Processor" #endif #elif defined(__ia64) || defined(__itanium__) || defined(_M_IA64) #define AILEGO_VERSION_PROCESSOR "Itanium Processor" #elif defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) #define AILEGO_VERSION_PROCESSOR "PowerPC 64-bit Processor" #elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) #define AILEGO_VERSION_PROCESSOR "PowerPC 32-bit Processor" #elif defined(__sparc) #define AILEGO_VERSION_PROCESSOR "SPARC Processor" #else #define AILEGO_VERSION_PROCESSOR "Unknown Processor" #endif #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ #define AILEGO_VERSION_BYTE_ORDER " Little-endian Byte Order\n" #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #define AILEGO_VERSION_BYTE_ORDER " Big-endian Byte Order\n" #elif __BYTE_ORDER__ == __ORDER_PDP_ENDIAN__ #define AILEGO_VERSION_BYTE_ORDER " PDP-endian Byte Order\n" #else #define AILEGO_VERSION_BYTE_ORDER "" #endif #if defined(_DEBUG) || (!defined(__OPTIMIZE__) && !defined(NDEBUG)) #define AILEGO_VERSION_DEBUG_INFO " Debug Information\n" #else #define AILEGO_VERSION_DEBUG_INFO "" #endif #if defined(__SANITIZE_ADDRESS__) #define AILEGO_VERSION_ASAN " Address Sanitizer\n" #else #define AILEGO_VERSION_ASAN "" #endif #if defined(__STDC_VERSION__) #define AILEGO_VERSION_STDC \ " C Standard " AILEGO_VERSION_TO_STRING(__STDC_VERSION__) "\n" #else #define AILEGO_VERSION_STDC "" #endif #if defined(__cplusplus) #define AILEGO_VERSION_CPLUSPLUS \ " C++ Standard " AILEGO_VERSION_TO_STRING(__cplusplus) "\n" #else #define AILEGO_VERSION_CPLUSPLUS "" #endif #if defined(__GXX_ABI_VERSION) #define AILEGO_VERSION_GXX_ABI \ " GNU C++ ABI " AILEGO_VERSION_TO_STRING(__GXX_ABI_VERSION) "\n" #else #define AILEGO_VERSION_GXX_ABI "" #endif #if defined(__GLIBC__) #define AILEGO_VERSION_GLIBC \ " GNU glibc " AILEGO_VERSION_TO_STRING( \ __GLIBC__) "." AILEGO_VERSION_TO_STRING(__GLIBC_MINOR__) "\n" #else #define AILEGO_VERSION_GLIBC "" #endif #if defined(WINVER) #define AILEGO_VERSION_WINSDK \ " Microsoft Windows SDK " AILEGO_VERSION_TO_STRING(WINVER) "\n" #else #define AILEGO_VERSION_WINSDK "" #endif #if defined(__CLR_VER) #define AILEGO_VERSION_CLR \ " Microsoft CLR " AILEGO_VERSION_TO_STRING(__CLR_VER) "\n" #else #define AILEGO_VERSION_CLR "" #endif #if defined(__LSB_VERSION__) #define AILEGO_VERSION_LSB \ " Linux Standards Base " AILEGO_VERSION_TO_STRING(__LSB_VERSION__) "\n" #else #define AILEGO_VERSION_LSB "" #endif #if defined(_POSIX_VERSION) #define AILEGO_VERSION_POSIX \ " POSIX Specification " AILEGO_VERSION_TO_STRING(_POSIX_VERSION) "\n" #else #define AILEGO_VERSION_POSIX "" #endif #if defined(_XOPEN_VERSION) #define AILEGO_VERSION_XOPEN \ " X/Open Specification " AILEGO_VERSION_TO_STRING(_XOPEN_VERSION) "\n" #else #define AILEGO_VERSION_XOPEN "" #endif #if defined(_OPENMP) #define AILEGO_VERSION_OPENMP \ " OpenMP API " AILEGO_VERSION_TO_STRING(_OPENMP) "\n" #else #define AILEGO_VERSION_OPENMP "" #endif #if defined(__ARM_NEON) #define AILEGO_VERSION_SIMD " Arm Neon Instruction Set\n" #elif defined(__AVX512F__) #define AILEGO_VERSION_SIMD " AVX-512F Instruction Set\n" #elif defined(__AVX2__) #define AILEGO_VERSION_SIMD " AVX-2 Instruction Set\n" #elif defined(__AVX__) #define AILEGO_VERSION_SIMD " AVX Instruction Set\n" #elif defined(__SSE4_2__) #define AILEGO_VERSION_SIMD " SSE-4.2 Instruction Set\n" #elif defined(__SSE4_1__) #define AILEGO_VERSION_SIMD " SSE-4.1 Instruction Set\n" #elif defined(__SSSE3__) #define AILEGO_VERSION_SIMD " SSSE-3 Instruction Set\n" #elif defined(__SSE3__) #define AILEGO_VERSION_SIMD " SSE-3 Instruction Set\n" #elif defined(__SSE2__) #define AILEGO_VERSION_SIMD " SSE-2 Instruction Set\n" #elif defined(__SSE__) #define AILEGO_VERSION_SIMD " SSE Instruction Set\n" #elif defined(__MMX__) #define AILEGO_VERSION_SIMD " MMX Instruction Set\n" #else #define AILEGO_VERSION_SIMD "" #endif #if defined(PY_VERSION) #if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_ALPHA #define AILEGO_VERSION_PYTHON \ " Python API " PY_VERSION \ " Alpha " AILEGO_VERSION_TO_STRING(PY_RELEASE_SERIAL) "\n" #elif PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_BETA #define AILEGO_VERSION_PYTHON \ " Python API " PY_VERSION \ " Beta " AILEGO_VERSION_TO_STRING(PY_RELEASE_SERIAL) "\n" #elif PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_GAMMA #define AILEGO_VERSION_PYTHON \ " Python API " PY_VERSION \ " Release Candidate " AILEGO_VERSION_TO_STRING(PY_RELEASE_SERIAL) "\n" #elif PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_FINAL #define AILEGO_VERSION_PYTHON " Python API " PY_VERSION " Final\n" #else #define AILEGO_VERSION_PYTHON " Python API " PY_VERSION "\n" #endif #else #define AILEGO_VERSION_PYTHON "" #endif //! Gather information of compiling #define AILEGO_VERSION_COMPILE_DETAILS(__PREFIX_INFO__) \ __PREFIX_INFO__ \ "Compiled by " AILEGO_VERSION_COMPILER \ ".\n" \ "Compiled for " AILEGO_VERSION_PROCESSOR \ ".\n" \ "Compiled on " AILEGO_VERSION_PLATFORM " on " __DATE__ " " __TIME__ \ ".\n" \ "Compiled with: \n" \ "" AILEGO_VERSION_BYTE_ORDER "" AILEGO_VERSION_SIMD \ "" AILEGO_VERSION_DEBUG_INFO "" AILEGO_VERSION_ASAN "" AILEGO_VERSION_STDC \ "" AILEGO_VERSION_CPLUSPLUS "" AILEGO_VERSION_GXX_ABI \ "" AILEGO_VERSION_POSIX "" AILEGO_VERSION_XOPEN "" AILEGO_VERSION_LSB \ "" AILEGO_VERSION_GLIBC "" AILEGO_VERSION_WINSDK "" AILEGO_VERSION_CLR \ "" AILEGO_VERSION_OPENMP "" AILEGO_VERSION_PYTHON "\n" ================================================ FILE: deps/proxima/include/aitheta2/index_closet.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author daibing.db * \date Jun 2021 * \brief Interface of AiTheta Index Closet */ #ifndef __AITHETA2_INDEX_SUMMARY_H__ #define __AITHETA2_INDEX_SUMMARY_H__ #include "index_context.h" #include "index_helper.h" #include "index_provider.h" #include "index_stats.h" namespace aitheta2 { /*! Index Closet */ class IndexCloset : public IndexModule { public: //! Index Closet Pointer typedef std::shared_ptr Pointer; //! Destructor virtual ~IndexCloset(void) {} //! Initialize the closet virtual int init(const IndexParams ¶ms) = 0; //! Cleanup the closet virtual int cleanup(void) = 0; //! Open a closet index from storage virtual int open(IndexStorage::Pointer stg) = 0; //! Close closet index virtual int close(void) = 0; //! Flush closet index virtual int flush(uint64_t check_point) = 0; //! Put a document and retrieve the local index virtual int append(const void *data, size_t len, uint64_t *index) = 0; //! Delete the document by local index virtual int erase(uint64_t index) = 0; //! Fetch a document via a local index virtual int fetch(uint64_t index, std::string *out) const = 0; //! Update the document via a local index virtual int update(uint64_t index, const void *data, size_t len) = 0; //! Retrieve the count of index virtual uint64_t count(void) const = 0; //! Dump closet index into storage virtual int dump(const IndexDumper::Pointer &dumper) = 0; }; /*! Index Immutable Closet */ class IndexImmutableCloset : public IndexModule { public: //! Index Closet Searcher Pointer typedef std::shared_ptr Pointer; //! Destructor virtual ~IndexImmutableCloset(void) {} //! Initialize the closet virtual int init(const IndexParams ¶ms) = 0; //! Cleanup the closet virtual int cleanup(void) = 0; //! Open a closet index from storage virtual int load(IndexContainer::Pointer cntr) = 0; //! Close closet index virtual int unload(void) = 0; //! Fetch a document via a local index virtual int fetch(uint64_t index, std::string *out) const = 0; //! Retrieve the count of index virtual uint64_t count(void) const = 0; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_CLOSET_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_container.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Container */ #ifndef __AITHETA2_INDEX_CONTAINER_H__ #define __AITHETA2_INDEX_CONTAINER_H__ #include "index_module.h" #include "index_unpacker.h" namespace aitheta2 { /*! Index Container */ class IndexContainer : public IndexModule { public: //! Index Container Pointer typedef std::shared_ptr Pointer; /*! Index Container Segment Data */ struct SegmentData { //! Constructor SegmentData(void) : offset(0u), length(0u), data(nullptr) {} //! Constructor SegmentData(size_t off, size_t len) : offset(off), length(len), data(nullptr) {} //! Members size_t offset; size_t length; const void *data; }; /*! Index Container Segment */ struct Segment { //! Index Container Pointer typedef std::shared_ptr Pointer; //! Destructor virtual ~Segment(void) {} //! Retrieve size of data virtual size_t data_size(void) const = 0; //! Retrieve crc of data virtual uint32_t data_crc(void) const = 0; //! Retrieve size of padding virtual size_t padding_size(void) const = 0; //! Fetch data from segment (with own buffer) virtual size_t fetch(size_t offset, void *buf, size_t len) const = 0; //! Read data from segment virtual size_t read(size_t offset, const void **data, size_t len) = 0; //! Read data from segment virtual bool read(SegmentData *iovec, size_t count) = 0; //! Clone the segment virtual Pointer clone(void) = 0; }; //! Destructor virtual ~IndexContainer(void) {} //! Initialize container virtual int init(const IndexParams ¶ms) = 0; //! Cleanup container virtual int cleanup(void) = 0; //! Load a index file into container virtual int load(const std::string &path) = 0; //! Load the current index into container virtual int load(void) = 0; //! Unload all indexes virtual int unload(void) = 0; //! Retrieve a segment by id virtual Segment::Pointer get(const std::string &id) const = 0; //! Test if it a segment exists virtual bool has(const std::string &id) const = 0; //! Retrieve all segments virtual std::map get_all(void) const = 0; //! Retrieve magic number of index virtual uint32_t magic(void) const = 0; //! Fetch a segment by id with level (0 high, 1 normal, 2 low) virtual Segment::Pointer fetch(const std::string &id, int /*level*/) const { return this->get(id); } }; /*! Index Segment Container */ class IndexSegmentContainer : public IndexContainer { public: //! Index Segment Container Pointer typedef std::shared_ptr Pointer; /*! Index Container Segment */ class Segment : public IndexContainer::Segment { public: //! Index Container Pointer typedef std::shared_ptr Pointer; //! Constructor Segment(const Segment &rhs) : data_offset_(rhs.data_offset_), data_size_(rhs.data_size_), padding_size_(rhs.padding_size_), region_size_(rhs.region_size_), data_crc_(rhs.data_crc_), parent_(rhs.parent_->clone()) {} //! Constructor Segment(const IndexContainer::Segment::Pointer &parent, const IndexUnpacker::SegmentMeta &segment) : data_offset_(segment.data_offset()), data_size_(segment.data_size()), padding_size_(segment.padding_size()), region_size_(segment.data_size() + segment.padding_size()), data_crc_(segment.data_crc()), parent_(parent->clone()) {} //! Destructor virtual ~Segment(void) {} //! Retrieve size of data size_t data_size(void) const override { return data_size_; } //! Retrieve crc of data uint32_t data_crc(void) const override { return data_crc_; } //! Retrieve size of padding size_t padding_size(void) const override { return padding_size_; } //! Fetch data from segment (with own buffer) size_t fetch(size_t offset, void *buf, size_t len) const override { return parent_->fetch(data_offset_ + offset, buf, len); } //! Read data from segment size_t read(size_t offset, const void **data, size_t len) override { return parent_->read(data_offset_ + offset, data, len); } //! Read data from segment bool read(SegmentData *iovec, size_t count) override { for (SegmentData *it = iovec, *end = iovec + count; it != end; ++it) { it->offset += data_offset_; } bool success = parent_->read(iovec, count); for (SegmentData *it = iovec, *end = iovec + count; it != end; ++it) { it->offset -= data_offset_; } return success; } //! Clone the segment IndexContainer::Segment::Pointer clone(void) override { return std::make_shared(*this); } private: size_t data_offset_{0u}; size_t data_size_{0u}; size_t padding_size_{0u}; size_t region_size_{0u}; uint32_t data_crc_{0u}; IndexContainer::Segment::Pointer parent_{nullptr}; }; //! Constructor IndexSegmentContainer(IndexContainer::Segment::Pointer &&seg) : parent_(std::move(seg)) {} //! Constructor IndexSegmentContainer(const IndexContainer::Segment::Pointer &seg) : parent_(seg) {} //! Destructor virtual ~IndexSegmentContainer(void) {} //! Initialize container int init(const IndexParams &) override { return 0; } //! Cleanup container int cleanup(void) override { return 0; } //! Load the current index into container int load(void) override { if (!parent_) { LOG_ERROR("Failed to load an empty segment"); return IndexError_NoReady; } auto read_data = [this](size_t offset, const void **data, size_t len) { return this->parent_->read(offset, data, len); }; IndexUnpacker unpacker; if (!unpacker.unpack(read_data, parent_->data_size(), false)) { LOG_ERROR("Failed to unpack segment data"); return IndexError_UnpackIndex; } segments_ = std::move(*unpacker.mutable_segments()); magic_ = unpacker.magic(); return 0; } //! Load the current segment, ignore path int load(const std::string &) override { return this->load(); } //! Retrieve a segment by id IndexContainer::Segment::Pointer get(const std::string &id) const override { if (!parent_) { return IndexContainer::Segment::Pointer(); } auto it = segments_.find(id); if (it == segments_.end()) { return IndexContainer::Segment::Pointer(); } return std::make_shared(parent_, it->second); } //! Test if it a segment exists bool has(const std::string &id) const override { return (segments_.find(id) != segments_.end()); } //! Retrieve all segments std::map get_all( void) const override { std::map result; if (parent_) { for (const auto &it : segments_) { result.emplace(it.first, std::make_shared( parent_, it.second)); } } return result; } //! Unload all indexes int unload(void) override { parent_ = nullptr; segments_.clear(); return 0; } //! Retrieve magic number of index uint32_t magic(void) const override { return magic_; } private: uint32_t magic_{0}; std::map segments_{}; IndexContainer::Segment::Pointer parent_{}; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_CONTAINER_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_context.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Context */ #ifndef __AITHETA2_INDEX_CONTEXT_H__ #define __AITHETA2_INDEX_CONTEXT_H__ #include #include "index_document.h" #include "index_error.h" #include "index_filter.h" #include "index_params.h" namespace aitheta2 { /*! Index Context */ class IndexContext { public: //! Index Context Pointer typedef std::unique_ptr Pointer; //! Destructor virtual ~IndexContext(void) {} //! Set topk of search result virtual void set_topk(uint32_t topk) = 0; //! Set mode of debug virtual void set_debug_mode(bool /*enable*/) {} //! Retrieve search result virtual const IndexDocumentList &result(void) const = 0; //! Retrieve search result with index virtual const IndexDocumentList &result(size_t /*index*/) const { return this->result(); } //! Update the parameters of context virtual int update(const IndexParams & /*params*/) { return IndexError_NotImplemented; } //! Retrieve mode of debug virtual bool debug_mode(void) const { return false; } //! Retrieve debug information virtual std::string debug_string(void) const { return std::string(); } //! Retrieve magic number virtual uint32_t magic(void) const { return 0; } //! Retrieve search filter const IndexFilter &filter(void) const { return filter_; } //! Set the filter of context template void set_filter(T &&func) { filter_.set(std::forward(func)); } //! Reset the filter of context void reset_filter(void) { filter_.reset(); } //! Set threshold for RNN void set_threshold(float val) { threshold_ = val; } //! Retrieve value of threshold for RNN float threshold(void) const { return threshold_; } //! Generate a global magic number static uint32_t GenerateMagic(void); private: //! Members IndexFilter filter_{}; float threshold_{std::numeric_limits::max()}; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_CONTEXT_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_converter.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Converter */ #ifndef __AITHETA2_INDEX_CONVERTER_H__ #define __AITHETA2_INDEX_CONVERTER_H__ #include "index_dumper.h" #include "index_holder.h" #include "index_meta.h" #include "index_stats.h" namespace aitheta2 { /*! Index Converter */ class IndexConverter : public IndexModule { public: //! Index Converter Pointer typedef std::shared_ptr Pointer; /*! Index Converter Stats */ class Stats : public IndexStats { public: //! Set count of documents trained void set_trained_count(size_t count) { trained_count_ = count; } //! Set count of documents transformed void set_transformed_count(size_t count) { transformed_count_ = count; } //! Set size of documents dumped void set_dumped_size(size_t size) { dumped_size_ = size; } //! Set count of documents discarded void set_discarded_count(size_t count) { discarded_count_ = count; } //! Set time cost of documents trained void set_trained_costtime(uint64_t cost) { trained_costtime_ = cost; } //! Set time cost of documents transformed void set_transformed_costtime(uint64_t cost) { transformed_costtime_ = cost; } //! Set time cost of documents dumped void set_dumped_costtime(uint64_t cost) { dumped_costtime_ = cost; } //! Retrieve count of documents trained size_t trained_count(void) const { return trained_count_; } //! Retrieve count of documents transformed size_t transformed_count(void) const { return transformed_count_; } //! Retrieve size of documents dumped size_t dumped_size(void) const { return dumped_size_; } //! Retrieve count of documents discarded size_t discarded_count(void) const { return discarded_count_; } //! Retrieve time cost of documents trained uint64_t trained_costtime(void) const { return trained_costtime_; } //! Retrieve time cost of documents transformed uint64_t transformed_costtime(void) const { return transformed_costtime_; } //! Retrieve time cost of documents dumped uint64_t dumped_costtime(void) const { return dumped_costtime_; } //! Retrieve count of documents trained (mutable) size_t *mutable_trained_count(void) { return &trained_count_; } //! Retrieve count of documents transformed (mutable) size_t *mutable_transformed_count(void) { return &transformed_count_; } //! Retrieve size of documents dumped (mutable) size_t *mutable_dumped_size(void) { return &dumped_size_; } //! Retrieve count of documents discarded (mutable) size_t *mutable_discarded_count(void) { return &discarded_count_; } //! Retrieve time cost of documents trained (mutable) uint64_t *mutable_trained_costtime(void) { return &trained_costtime_; } //! Retrieve time cost of documents transformed (mutable) uint64_t *mutable_transformed_costtime(void) { return &transformed_costtime_; } //! Retrieve time cost of documents dumped (mutable) uint64_t *mutable_dumped_costtime(void) { return &dumped_costtime_; } private: //! Members size_t trained_count_{0u}; size_t transformed_count_{0u}; size_t dumped_size_{0u}; size_t discarded_count_{0u}; uint64_t trained_costtime_{0u}; uint64_t transformed_costtime_{0u}; uint64_t dumped_costtime_{0u}; }; //! Destructor virtual ~IndexConverter(void) {} //! Initialize Converter virtual int init(const IndexMeta &meta, const IndexParams ¶ms) = 0; //! Cleanup Converter virtual int cleanup(void) = 0; //! Train the data virtual int train(IndexHolder::Pointer holder) = 0; //! Transform the data virtual int transform(IndexHolder::Pointer holder) = 0; //! Dump index into storage virtual int dump(const IndexDumper::Pointer &dumper) = 0; //! Retrieve statistics virtual const Stats &stats(void) const = 0; //! Retrieve a holder as result virtual IndexHolder::Pointer result(void) const = 0; //! Retrieve Index Meta virtual const IndexMeta &meta(void) const = 0; //! Train and transform the index static int TrainAndTransform(const IndexConverter::Pointer &converter, IndexHolder::Pointer holder); //! Train, transform and dump the index static int TrainTransformAndDump(const IndexConverter::Pointer &converter, IndexHolder::Pointer holder, const IndexDumper::Pointer &dumper); }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_CONVERTER_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_document.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Document */ #ifndef __AITHETA2_INDEX_DOCUMENT_H__ #define __AITHETA2_INDEX_DOCUMENT_H__ #include #include namespace aitheta2 { /*! Index Document */ class IndexDocument { public: //! Constructor IndexDocument() = default; //! Constructor IndexDocument(uint64_t k, float v) : key_(k), score_(v) {} //! Constructor IndexDocument(uint64_t k, float v, uint32_t i) : key_(k), score_(v), index_(i) {} //! Constructor IndexDocument(const IndexDocument &rhs) : key_(rhs.key_), score_(rhs.score_), index_(rhs.index_) {} //! Assignment IndexDocument &operator=(const IndexDocument &rhs) { key_ = rhs.key_; score_ = rhs.score_; index_ = rhs.index_; return *this; } //! Less than bool operator<(const IndexDocument &rhs) const { return (this->score_ < rhs.score_); } //! Greater than bool operator>(const IndexDocument &rhs) const { return (this->score_ > rhs.score_); } //! Retrieve primary key uint64_t key(void) const { return key_; } //! Retrieve score value float score(void) const { return score_; } //! Retrieve index id uint32_t index(void) const { return index_; } //! Retrieve mutable primary key uint64_t *mutable_key(void) { return &key_; } //! Retrieve mutable score value float *mutable_score(void) { return &score_; } //! Retrieve mutable index id uint32_t *mutable_index(void) { return &index_; } //! Retrieve primary key void set_key(uint64_t val) { key_ = val; } //! Retrieve score value void set_score(float val) { score_ = val; } //! Retrieve index id void set_index(uint32_t val) { index_ = val; } private: //! Data members uint64_t key_{0u}; float score_{0.0f}; uint32_t index_{0u}; }; /*! Index Document Heap */ class IndexDocumentHeap : public ailego::Heap { public: //! Constructor IndexDocumentHeap(void) : ailego::Heap() {} //! Constructor IndexDocumentHeap(size_t max) : ailego::Heap(max) {} //! Constructor IndexDocumentHeap(size_t max, float val) : ailego::Heap(max), threshold_(val) {} //! Constructor IndexDocumentHeap(const IndexDocumentHeap &rhs) : ailego::Heap(rhs), threshold_(rhs.threshold_) {} //! Constructor IndexDocumentHeap(IndexDocumentHeap &&rhs) : ailego::Heap(std::move(rhs)), threshold_(rhs.threshold_) {} //! Constructor IndexDocumentHeap(const std::vector &rhs) : ailego::Heap(rhs) {} //! Constructor IndexDocumentHeap(std::vector &&rhs) : ailego::Heap(std::move(rhs)) {} //! Insert a document into the heap void emplace(uint64_t key, float score) { if (score <= threshold_) { ailego::Heap::emplace(key, score); } } //! Insert a document into the heap void emplace(uint64_t key, float score, uint32_t index) { if (score <= threshold_) { ailego::Heap::emplace(key, score, index); } } //! Set threshold for RNN void set_threshold(float val) { threshold_ = val; } //! Retrieve value of threshold for RNN float threshold(void) const { return threshold_; } private: //! members float threshold_{std::numeric_limits::max()}; }; /*! Index Document List */ using IndexDocumentList = std::vector; } // namespace aitheta2 #endif // __AITHETA2_INDEX_DOCUMENT_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_dumper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Dumper */ #ifndef __AITHETA2_INDEX_DUMPER_H__ #define __AITHETA2_INDEX_DUMPER_H__ #include "index_module.h" #include "index_packer.h" #include "index_params.h" namespace aitheta2 { /*! Index Dumper */ class IndexDumper : public IndexModule { public: //! Index Dumper Pointer typedef std::shared_ptr Pointer; //! Destructor virtual ~IndexDumper(void) {} //! Initialize dumper virtual int init(const IndexParams ¶ms) = 0; //! Cleanup dumper virtual int cleanup(void) = 0; //! Create a file for dumping virtual int create(const std::string &path) = 0; //! Close file virtual int close(void) = 0; //! Append a segment meta into table virtual int append(const std::string &id, size_t data_size, size_t padding_size, uint32_t crc) = 0; //! Write data to the storage virtual size_t write(const void *data, size_t len) = 0; //! Retrieve magic number of index virtual uint32_t magic(void) const = 0; }; /*! Index Segment Dumper */ class IndexSegmentDumper : public IndexDumper { public: //! Index Segment Dumper Pointer typedef std::shared_ptr Pointer; //! Constructor IndexSegmentDumper(IndexDumper::Pointer dumper, std::string segid) : segment_id_(std::move(segid)), dumper_(std::move(dumper)) {} //! Destructor virtual ~IndexSegmentDumper(void) { this->close_index(); } //! Initialize dumper int init(const IndexParams &) override { return 0; } //! Cleanup dumper int cleanup(void) override { return 0; } //! Create a file for dumping int create(const std::string &segid) override { if (dumped_size_ != 0) { return IndexError_NoReady; } auto write_data = [&](const void *buf, size_t size) { return this->write_to_dumper(buf, size); }; if (!packer_.setup(write_data)) { return IndexError_WriteData; } segment_id_ = segid; return 0; } //! Close file int close(void) override { return this->close_index(); } //! Append a segment meta into table int append(const std::string &id, size_t data_size, size_t padding_size, uint32_t crc) override { stab_.emplace_back(id, data_size, padding_size, crc); return 0; } //! Write data to the storage size_t write(const void *data, size_t len) override { auto write_data = [&](const void *buf, size_t size) { return this->write_to_dumper(buf, size); }; if (dumped_size_ == 0 && !packer_.setup(write_data)) { return 0; } return packer_.pack(write_data, data, len); } //! Retrieve magic number of index uint32_t magic(void) const override { return packer_.magic(); } protected: //! Write data to dumper size_t write_to_dumper(const void *data, size_t len) { size_t wrlen = dumper_->write(data, len); dumped_size_ += wrlen; return wrlen; } //! Close index file int close_index(void) { if (dumped_size_ == 0) { return 0; } auto write_data = [&](const void *buf, size_t size) { return this->write_to_dumper(buf, size); }; if (!packer_.finish(write_data, stab_)) { return IndexError_WriteData; } stab_.clear(); int ret = dumper_->append(segment_id_, dumped_size_, 0, 0); dumped_size_ = 0u; return ret; } private: size_t dumped_size_{0}; std::string segment_id_{}; IndexDumper::Pointer dumper_{}; IndexPacker packer_{}; std::vector stab_{}; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_DUMPER_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_error.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Apr 2018 * \brief Interface of AiTheta Index Error */ #ifndef __AITHETA2_INDEX_ERROR_H__ #define __AITHETA2_INDEX_ERROR_H__ #include namespace aitheta2 { /*! Index Error */ class IndexError { public: /*! Index Error Code */ class Code { public: //! Constructor Code(int val, const char *str) : value_(-val), desc_(str) { IndexError::Instance()->emplace(this); } //! Retrieve the value of code operator int() const { return (this->value_); } //! Retrieve the value of code int value() const { return (this->value_); } //! Retrieve the description of code const char *desc() const { return (this->desc_); } private: int value_; const char *desc_; }; //! Retrieve the description of code static const char *What(int val) { return IndexError::Instance()->what(val); } protected: //! Constructor IndexError(void) : map_() {} //! Inserts a new code into map void emplace(const IndexError::Code *code) { map_.emplace(code->value(), code); } //! Retrieve the description of code const char *what(int val) const { auto iter = map_.find(val); if (iter != map_.end()) { return iter->second->desc(); } return ""; } //! Retrieve the singleton static IndexError *Instance(void) { static IndexError error; return (&error); } private: //! Disable them IndexError(const IndexError &) = delete; IndexError(IndexError &&) = delete; IndexError &operator=(const IndexError &) = delete; //! Error code map std::map map_; }; //! Index Error Code Define #define INDEX_ERROR_CODE_DEFINE(__NAME__, __VAL__, __DESC__) \ const aitheta2::IndexError::Code IndexError_##__NAME__((__VAL__), \ (__DESC__)); \ const aitheta2::IndexError::Code &_IndexErrorCode_##__VAL__##_Register( \ IndexError_##__NAME__) //! Index Error Code Declare #define INDEX_ERROR_CODE_DECLARE(__NAME__) \ extern const aitheta2::IndexError::Code IndexError_##__NAME__ //! Build-in error code INDEX_ERROR_CODE_DECLARE(Success); // Success INDEX_ERROR_CODE_DECLARE(Runtime); // Runtime error INDEX_ERROR_CODE_DECLARE(Logic); // Logic error INDEX_ERROR_CODE_DECLARE(Type); // Type error INDEX_ERROR_CODE_DECLARE(System); // System call error INDEX_ERROR_CODE_DECLARE(Cast); // Cast error INDEX_ERROR_CODE_DECLARE(IO); // IO error INDEX_ERROR_CODE_DECLARE(NotImplemented); // Not implemented INDEX_ERROR_CODE_DECLARE(Unsupported); // Unsupported INDEX_ERROR_CODE_DECLARE(Denied); // Permission denied INDEX_ERROR_CODE_DECLARE(Canceled); // Operation canceled INDEX_ERROR_CODE_DECLARE(Overflow); // Overflow INDEX_ERROR_CODE_DECLARE(Underflow); // Underflow INDEX_ERROR_CODE_DECLARE(OutOfRange); // Out of range INDEX_ERROR_CODE_DECLARE(NoBuffer); // No buffer space available INDEX_ERROR_CODE_DECLARE(NoMemory); // Not enough space INDEX_ERROR_CODE_DECLARE(NoParamFound); // No parameter found INDEX_ERROR_CODE_DECLARE(NoReady); // No ready INDEX_ERROR_CODE_DECLARE(NoExist); // No exist INDEX_ERROR_CODE_DECLARE(Exist); // Already exist INDEX_ERROR_CODE_DECLARE(Mismatch); // Mismatch INDEX_ERROR_CODE_DECLARE(Duplicate); // Duplicate INDEX_ERROR_CODE_DECLARE(Uninitialized); // Uninitialized INDEX_ERROR_CODE_DECLARE(InvalidArgument); // Invalid argument INDEX_ERROR_CODE_DECLARE(InvalidFormat); // Invalid format INDEX_ERROR_CODE_DECLARE(InvalidLength); // Invalid length INDEX_ERROR_CODE_DECLARE(InvalidChecksum); // Invalid checksum INDEX_ERROR_CODE_DECLARE(InvalidValue); // Invalid value INDEX_ERROR_CODE_DECLARE(CreateDirectory); // Create directory error INDEX_ERROR_CODE_DECLARE(OpenDirectory); // Open directory error INDEX_ERROR_CODE_DECLARE(Serialize); // Serialize error INDEX_ERROR_CODE_DECLARE(Deserialize); // Deserialize error INDEX_ERROR_CODE_DECLARE(CreateFile); // Create file error INDEX_ERROR_CODE_DECLARE(OpenFile); // Open file error INDEX_ERROR_CODE_DECLARE(SeekFile); // Seek file error INDEX_ERROR_CODE_DECLARE(CloseFile); // Close file error INDEX_ERROR_CODE_DECLARE(TruncateFile); // TruncateFile file error INDEX_ERROR_CODE_DECLARE(MMapFile); // MMap file error INDEX_ERROR_CODE_DECLARE(FlushFile); // Flush file error INDEX_ERROR_CODE_DECLARE(WriteData); // Write data error INDEX_ERROR_CODE_DECLARE(ReadData); // Read data error INDEX_ERROR_CODE_DECLARE(PackIndex); // Read data error INDEX_ERROR_CODE_DECLARE(UnpackIndex); // Read data error INDEX_ERROR_CODE_DECLARE(IndexLoaded); // Index loaded INDEX_ERROR_CODE_DECLARE(NoIndexLoaded); // No index loaded INDEX_ERROR_CODE_DECLARE(NoTrained); // No trained INDEX_ERROR_CODE_DECLARE(IndexFull); // Index full } // namespace aitheta2 #endif // __AITHETA2_INDEX_ERROR_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_factory.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Mar 2018 * \brief Interface of AiTheta Index Factory */ #ifndef __AITHETA2_INDEX_FACTORY_H__ #define __AITHETA2_INDEX_FACTORY_H__ #include #include "index_closet.h" #include "index_container.h" #include "index_converter.h" #include "index_dumper.h" #include "index_logger.h" #include "index_measure.h" #include "index_reformer.h" #include "index_searcher.h" #include "index_storage.h" #include "index_streamer.h" namespace aitheta2 { /*! Index Factory */ struct IndexFactory { //! Create a index measure by name static IndexMeasure::Pointer CreateMeasure(const std::string &name); //! Test if the measure is exist static bool HasMeasure(const std::string &name); //! Retrieve all measure classes static std::vector AllMeasures(void); //! Create a index logger by name static IndexLogger::Pointer CreateLogger(const std::string &name); //! Test if the logger is exist static bool HasLogger(const std::string &name); //! Create a index dumper by name static IndexDumper::Pointer CreateDumper(const std::string &name); //! Test if the dumper is exist static bool HasDumper(const std::string &name); //! Create a index container by name static IndexContainer::Pointer CreateContainer(const std::string &name); //! Test if the container is exist static bool HasContainer(const std::string &name); //! Create a index storage by name static IndexStorage::Pointer CreateStorage(const std::string &name); //! Test if the storage is exist static bool HasStorage(const std::string &name); //! Create a index converter by name static IndexConverter::Pointer CreateConverter(const std::string &name); //! Test if the converter is exist static bool HasConverter(const std::string &name); //! Create a index reformer by name static IndexReformer::Pointer CreateReformer(const std::string &name); //! Test if the reformer is exist static bool HasReformer(const std::string &name); //! Create a index searcher by name static IndexSearcher::Pointer CreateSearcher(const std::string &name); //! Test if the searcher is exist static bool HasSearcher(const std::string &name); //! Create a index streamer by name static IndexStreamer::Pointer CreateStreamer(const std::string &name); //! Test if the streamer is exist static bool HasStreamer(const std::string &name); //! Create a index closet by name static IndexCloset::Pointer CreateCloset(const std::string &name); //! Test if the closet is exist static bool HasCloset(const std::string &name); //! Create a index closet searcher by name static IndexImmutableCloset::Pointer CreateImmutableCloset( const std::string &name); //! Test if the closet searcher exists static bool HasImmutableCloset(const std::string &name); }; //! Register Index Measure #define INDEX_FACTORY_REGISTER_MEASURE_ALIAS(__NAME__, __IMPL__, ...) \ AILEGO_FACTORY_REGISTER(__NAME__, aitheta2::IndexMeasure, __IMPL__, \ ##__VA_ARGS__) //! Register Index Measure #define INDEX_FACTORY_REGISTER_MEASURE(__IMPL__, ...) \ INDEX_FACTORY_REGISTER_MEASURE_ALIAS(__IMPL__, __IMPL__, ##__VA_ARGS__) //! Register Index Logger #define INDEX_FACTORY_REGISTER_LOGGER_ALIAS(__NAME__, __IMPL__, ...) \ AILEGO_FACTORY_REGISTER(__NAME__, aitheta2::IndexLogger, __IMPL__, \ ##__VA_ARGS__) //! Register Index Logger #define INDEX_FACTORY_REGISTER_LOGGER(__IMPL__, ...) \ INDEX_FACTORY_REGISTER_LOGGER_ALIAS(__IMPL__, __IMPL__, ##__VA_ARGS__) //! Register Index Dumper #define INDEX_FACTORY_REGISTER_DUMPER_ALIAS(__NAME__, __IMPL__, ...) \ AILEGO_FACTORY_REGISTER(__NAME__, aitheta2::IndexDumper, __IMPL__, \ ##__VA_ARGS__) //! Register Index Dumper #define INDEX_FACTORY_REGISTER_DUMPER(__IMPL__, ...) \ INDEX_FACTORY_REGISTER_DUMPER_ALIAS(__IMPL__, __IMPL__, ##__VA_ARGS__) //! Register Index Container #define INDEX_FACTORY_REGISTER_CONTAINER_ALIAS(__NAME__, __IMPL__, ...) \ AILEGO_FACTORY_REGISTER(__NAME__, aitheta2::IndexContainer, __IMPL__, \ ##__VA_ARGS__) //! Register Index Container #define INDEX_FACTORY_REGISTER_CONTAINER(__IMPL__, ...) \ INDEX_FACTORY_REGISTER_CONTAINER_ALIAS(__IMPL__, __IMPL__, ##__VA_ARGS__) //! Register Index Storage #define INDEX_FACTORY_REGISTER_STORAGE_ALIAS(__NAME__, __IMPL__, ...) \ AILEGO_FACTORY_REGISTER(__NAME__, aitheta2::IndexStorage, __IMPL__, \ ##__VA_ARGS__) //! Register Index Storage #define INDEX_FACTORY_REGISTER_STORAGE(__IMPL__, ...) \ INDEX_FACTORY_REGISTER_STORAGE_ALIAS(__IMPL__, __IMPL__, ##__VA_ARGS__) //! Register Index Converter #define INDEX_FACTORY_REGISTER_CONVERTER_ALIAS(__NAME__, __IMPL__, ...) \ AILEGO_FACTORY_REGISTER(__NAME__, aitheta2::IndexConverter, __IMPL__, \ ##__VA_ARGS__) //! Register Index Converter #define INDEX_FACTORY_REGISTER_CONVERTER(__IMPL__, ...) \ INDEX_FACTORY_REGISTER_CONVERTER_ALIAS(__IMPL__, __IMPL__, ##__VA_ARGS__) //! Register Index Reformer #define INDEX_FACTORY_REGISTER_REFORMER_ALIAS(__NAME__, __IMPL__, ...) \ AILEGO_FACTORY_REGISTER(__NAME__, aitheta2::IndexReformer, __IMPL__, \ ##__VA_ARGS__) //! Register Index Reformer #define INDEX_FACTORY_REGISTER_REFORMER(__IMPL__, ...) \ INDEX_FACTORY_REGISTER_REFORMER_ALIAS(__IMPL__, __IMPL__, ##__VA_ARGS__) //! Register Index Searcher #define INDEX_FACTORY_REGISTER_SEARCHER_ALIAS(__NAME__, __IMPL__, ...) \ AILEGO_FACTORY_REGISTER(__NAME__, aitheta2::IndexSearcher, __IMPL__, \ ##__VA_ARGS__) //! Register Index Searcher #define INDEX_FACTORY_REGISTER_SEARCHER(__IMPL__, ...) \ INDEX_FACTORY_REGISTER_SEARCHER_ALIAS(__IMPL__, __IMPL__, ##__VA_ARGS__) //! Register Index Streamer #define INDEX_FACTORY_REGISTER_STREAMER_ALIAS(__NAME__, __IMPL__, ...) \ AILEGO_FACTORY_REGISTER(__NAME__, aitheta2::IndexStreamer, __IMPL__, \ ##__VA_ARGS__) //! Register Index Streamer #define INDEX_FACTORY_REGISTER_STREAMER(__IMPL__, ...) \ INDEX_FACTORY_REGISTER_STREAMER_ALIAS(__IMPL__, __IMPL__, ##__VA_ARGS__) //! Register Index Closet #define INDEX_FACTORY_REGISTER_CLOSET_ALIAS(__NAME__, __IMPL__, ...) \ AILEGO_FACTORY_REGISTER(__NAME__, aitheta2::IndexCloset, __IMPL__, \ ##__VA_ARGS__) //! Register Index Closet #define INDEX_FACTORY_REGISTER_CLOSET(__IMPL__, ...) \ INDEX_FACTORY_REGISTER_CLOSET_ALIAS(__IMPL__, __IMPL__, ##__VA_ARGS__) //! Register Index Closet Searcher #define INDEX_FACTORY_REGISTER_IMMUTABLE_CLOSET_ALIAS(__NAME__, __IMPL__, ...) \ AILEGO_FACTORY_REGISTER(__NAME__, aitheta2::IndexImmutableCloset, __IMPL__, \ ##__VA_ARGS__) //! Register Index Closet Searcher #define INDEX_FACTORY_REGISTER_IMMUTABLE_CLOSET(__IMPL__, ...) \ INDEX_FACTORY_REGISTER_IMMUTABLE_CLOSET_ALIAS(__IMPL__, __IMPL__, \ ##__VA_ARGS__) } // namespace aitheta2 #endif // __AITHETA2_INDEX_FACTORY_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_filter.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Filter */ #ifndef __AITHETA2_INDEX_FILTER_H__ #define __AITHETA2_INDEX_FILTER_H__ #include namespace aitheta2 { /*! Index Filter */ class IndexFilter { public: //! Constructor IndexFilter(void) {} //! Constructor IndexFilter(const IndexFilter &rhs) : filter_(rhs.filter_) {} //! Constructor IndexFilter(IndexFilter &&rhs) : filter_(std::forward(rhs.filter_)) {} //! Copy assignment operator IndexFilter &operator=(const IndexFilter &rhs) { filter_ = rhs.filter_; return *this; } //! Copy assignment operator IndexFilter &operator=(IndexFilter &&rhs) { filter_ = std::forward(rhs.filter_); return *this; } //! Function call bool operator()(uint64_t key) const { return (filter_ ? filter_(key) : false); } //! Set the filter function template void set(T &&func) { filter_ = std::forward(func); } //! Reset the filter function void reset(void) { filter_ = nullptr; } //! Test if the function is valid bool is_valid(void) const { return (!!filter_); } private: //! Members std::function filter_{}; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_FILTER_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_format.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Nov 2019 * \brief Interface of AiTheta Index Format */ #ifndef __AITHETA2_INDEX_FORMAT_H__ #define __AITHETA2_INDEX_FORMAT_H__ #include #include #include #include #include namespace aitheta2 { /*! Index Format */ struct IndexFormat { /*! Version Number */ enum { FORMAT_VERSION = 0x0002 }; /*! Index Format Meta Header */ struct MetaHeader { uint32_t header_crc; uint16_t reserved1_; uint16_t version; uint32_t revision; uint32_t magic; uint16_t meta_header_size; uint16_t meta_footer_size; uint32_t meta_footer_offset; uint32_t content_offset; uint32_t reserved2_; uint64_t setup_time; uint64_t reserved3_[3]; }; static_assert(sizeof(MetaHeader) % 32 == 0, "MetaHeader must be aligned with 32 bytes"); /*! Index Format Meta Footer */ struct MetaFooter { uint32_t footer_crc; uint32_t segments_meta_crc; uint32_t content_crc; uint32_t segment_count; uint32_t segments_meta_size; uint32_t reserved1_; uint64_t content_size; uint64_t content_padding_size; uint64_t check_point; uint64_t update_time; uint64_t reserved2_[8]; uint64_t total_size; }; static_assert(sizeof(MetaFooter) % 32 == 0, "MetaFooter must be aligned with 32 bytes"); /*! Index Format Segment Meta */ struct SegmentMeta { uint32_t segment_id_offset; uint32_t data_crc; uint64_t data_index; uint64_t data_size; uint64_t padding_size; }; static_assert(sizeof(SegmentMeta) % 32 == 0, "SegmentMeta must be aligned with 32 bytes"); /*! Index Format Segment Meta Buffer */ class SegmentMetaBuffer { public: //! Constructor SegmentMetaBuffer(uint32_t count) : capacity_(count) { buffer_.clear(); buffer_.resize(sizeof(SegmentMeta) * capacity_); } //! Append a segment meta into buffer bool append(const std::string &id, size_t data_size, size_t padding_size, uint32_t data_crc) { if (count_ >= capacity_) { return false; } SegmentMeta *meta = (SegmentMeta *)buffer_.data() + count_; meta->segment_id_offset = static_cast(buffer_.size()); meta->data_index = offset_; meta->data_size = data_size; meta->data_crc = data_crc; meta->padding_size = padding_size; buffer_.append(id.c_str(), std::strlen(id.c_str()) + 1); count_ += 1; offset_ += data_size + padding_size; return true; } //! Resize the buffer void resize(size_t val) { buffer_.resize(val); } //! Retrieve pointer of data const void *data(void) const { return buffer_.data(); } //! Retrieve size of data size_t size(void) const { return buffer_.size(); } //! Retrieve crc of buffer uint32_t crc(void) const { return ailego::Crc32c::Hash(buffer_.data(), buffer_.size(), 0); } private: //! Disable them SegmentMetaBuffer(void) = delete; //! Members std::string buffer_{}; size_t offset_{0u}; uint32_t capacity_{0u}; uint32_t count_{0u}; }; //! Setup meta header structure static void SetupMetaHeader(MetaHeader *header, uint32_t footer_offset, uint32_t content_offset) { memset(header, 0, sizeof(MetaHeader)); header->version = IndexFormat::FORMAT_VERSION; header->revision = 0; header->magic = std::random_device()(); header->meta_header_size = sizeof(MetaHeader); header->meta_footer_size = sizeof(MetaFooter); header->meta_footer_offset = footer_offset; header->content_offset = content_offset; header->setup_time = ailego::Realtime::Seconds(); header->header_crc = ailego::Crc32c::Hash(header, sizeof(MetaHeader), 0); } //! Setup meta footer structure static void SetupMetaFooter(MetaFooter *footer) { memset(footer, 0, sizeof(MetaFooter)); } //! Update meta footer structure static void UpdateMetaFooter(MetaFooter *footer, uint64_t check_point) { if (check_point != 0) { footer->check_point = check_point; } footer->update_time = ailego::Realtime::Seconds(); footer->footer_crc = 0; footer->footer_crc = ailego::Crc32c::Hash(footer, sizeof(MetaFooter), 0); } }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_FORMAT_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_framework.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Framework */ #ifndef __AITHETA2_INDEX_FRAMEWORK_H__ #define __AITHETA2_INDEX_FRAMEWORK_H__ #include "index_closet.h" #include "index_container.h" #include "index_context.h" #include "index_converter.h" #include "index_document.h" #include "index_dumper.h" #include "index_error.h" #include "index_factory.h" #include "index_filter.h" #include "index_format.h" #include "index_helper.h" #include "index_holder.h" #include "index_logger.h" #include "index_measure.h" #include "index_meta.h" #include "index_module.h" #include "index_packer.h" #include "index_params.h" #include "index_reformer.h" #include "index_searcher.h" #include "index_stats.h" #include "index_streamer.h" #include "index_threads.h" #include "index_unpacker.h" #include "index_version.h" #endif // __AITHETA2_INDEX_FRAMEWORK_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2020 * \brief Interface of AiTheta Index Helper */ #ifndef __AITHETA2_INDEX_HELPER_H__ #define __AITHETA2_INDEX_HELPER_H__ #include "index_container.h" #include "index_dumper.h" #include "index_holder.h" #include "index_meta.h" #include "index_storage.h" namespace aitheta2 { /*! Index Helper */ struct IndexHelper { //! Serialize meta information to dumper static int SerializeToDumper(const IndexMeta &mt, IndexDumper *dumper, const std::string &key); //! Derialize meta information from container static int DeserializeFromContainer(IndexContainer *container, const std::string &key, IndexMeta *out); //! Serialize meta information to storage static int SerializeToStorage(const IndexMeta &mt, IndexStorage *storage, const std::string &key); //! Derialize meta information from storage static int DeserializeFromStorage(IndexStorage *storage, const std::string &key, IndexMeta *out); //! Serialize meta information to dumper static int SerializeToDumper(const IndexMeta &mt, IndexDumper *dumper) { return SerializeToDumper(mt, dumper, "IndexMeta"); } //! Derialize meta information from container static int DeserializeFromContainer(IndexContainer *container, IndexMeta *out) { return DeserializeFromContainer(container, "IndexMeta", out); } //! Serialize meta information to storage static int SerializeToStorage(const IndexMeta &mt, IndexStorage *storage) { return SerializeToStorage(mt, storage, "IndexMeta"); } //! Derialize meta information from storage static int DeserializeFromStorage(IndexStorage *storage, IndexMeta *out) { return DeserializeFromStorage(storage, "IndexMeta", out); } //! Create a proxy holder that can be traversed twice. static IndexHolder::Pointer MakeTwoPassHolder(IndexHolder::Pointer holder); }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_HELPER_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_holder.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Holder */ #ifndef __AITHETA2_INDEX_HOLDER_H__ #define __AITHETA2_INDEX_HOLDER_H__ #include #include #include #include #include #include #include "index_meta.h" #include "index_params.h" namespace aitheta2 { /*! Index Holder */ struct IndexHolder { //! Index Holder Pointer typedef std::shared_ptr Pointer; /*! Index Holder Iterator */ struct Iterator { //! Index Holder Iterator Pointer typedef std::unique_ptr Pointer; //! Destructor virtual ~Iterator(void) {} //! Retrieve pointer of data virtual const void *data(void) const = 0; //! Test if the iterator is valid virtual bool is_valid(void) const = 0; //! Retrieve primary key virtual uint64_t key(void) const = 0; //! Next iterator virtual void next(void) = 0; }; //! Destructor virtual ~IndexHolder(void) {} //! Retrieve count of elements in holder (-1 indicates unknown) virtual size_t count(void) const = 0; //! Retrieve dimension virtual size_t dimension(void) const = 0; //! Retrieve type information virtual IndexMeta::FeatureTypes type(void) const = 0; //! Retrieve element size in bytes virtual size_t element_size(void) const = 0; //! Retrieve if it can multi-pass virtual bool multipass(void) const = 0; //! Create a new iterator virtual Iterator::Pointer create_iterator(void) = 0; //! Test if matchs the meta bool is_matched(const IndexMeta &meta) const { return (this->type() == meta.type() && this->dimension() == meta.dimension() && this->element_size() == meta.element_size()); } }; /*! One-Pass Numerical Index Holder */ template class OnePassNumericalIndexHolder : public IndexHolder { public: /*! One-Pass Index Holder Iterator */ class Iterator : public IndexHolder::Iterator { public: //! Index Holder Iterator Pointer typedef std::unique_ptr Pointer; //! Constructor Iterator(OnePassNumericalIndexHolder *owner) : holder_(owner) { features_iter_ = holder_->features_.begin(); } //! Destructor virtual ~Iterator(void) {} //! Retrieve pointer of data const void *data(void) const override { return features_iter_->second.data(); } //! Test if the iterator is valid bool is_valid(void) const override { return (features_iter_ != holder_->features_.end()); } //! Retrieve primary key uint64_t key(void) const override { return features_iter_->first; } //! Next iterator void next(void) override { holder_->features_.erase(features_iter_++); } private: OnePassNumericalIndexHolder *holder_{nullptr}; typename std::list>>:: iterator features_iter_{}; }; //! Constructor OnePassNumericalIndexHolder(size_t dim) : dimension_(dim) {} //! Retrieve count of elements in holder (-1 indicates unknown) size_t count(void) const override { return features_.size(); } //! Retrieve dimension size_t dimension(void) const override { return dimension_; } //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_UNDEFINED; } //! Retrieve element size in bytes size_t element_size(void) const override { return dimension_ * sizeof(T); } //! Retrieve if it can multi-pass bool multipass(void) const override { return false; } //! Create a new iterator IndexHolder::Iterator::Pointer create_iterator(void) override { return IndexHolder::Iterator::Pointer( new OnePassNumericalIndexHolder::Iterator(this)); } //! Append an element into holder bool emplace(uint64_t key, const ailego::NumericalVector &vec) { if (vec.size() != dimension_) { return false; } features_.emplace_back(key, vec); return true; } //! Append an element into holder bool emplace(uint64_t key, ailego::NumericalVector &&vec) { if (vec.size() != dimension_) { return false; } features_.emplace_back(key, std::move(vec)); return true; } private: //! Disable them OnePassNumericalIndexHolder(void) = delete; //! Members size_t dimension_{0}; std::list>> features_; }; /*! Multi-Pass Numerical Index Holder */ template class MultiPassNumericalIndexHolder : public IndexHolder { public: /*! Multi-Pass Index Holder Iterator */ class Iterator : public IndexHolder::Iterator { public: //! Index Holder Iterator Pointer typedef std::unique_ptr Pointer; //! Constructor Iterator(MultiPassNumericalIndexHolder *owner) : holder_(owner) { features_iter_ = holder_->features_.begin(); } //! Destructor virtual ~Iterator(void) {} //! Retrieve pointer of data const void *data(void) const override { return features_iter_->second.data(); } //! Test if the iterator is valid bool is_valid(void) const override { return (features_iter_ != holder_->features_.end()); } //! Retrieve primary key uint64_t key(void) const override { return features_iter_->first; } //! Next iterator void next(void) override { ++features_iter_; } private: MultiPassNumericalIndexHolder *holder_{nullptr}; typename std::vector>>:: iterator features_iter_{}; }; //! Constructor MultiPassNumericalIndexHolder(size_t dim) : dimension_(dim) {} //! Retrieve count of elements in holder (-1 indicates unknown) size_t count(void) const override { return features_.size(); } //! Retrieve dimension size_t dimension(void) const override { return dimension_; } //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_UNDEFINED; } //! Retrieve element size in bytes size_t element_size(void) const override { return dimension_ * sizeof(T); } //! Retrieve if it can multi-pass bool multipass(void) const override { return true; } //! Create a new iterator IndexHolder::Iterator::Pointer create_iterator(void) override { return IndexHolder::Iterator::Pointer( new MultiPassNumericalIndexHolder::Iterator(this)); } //! Append an element into holder bool emplace(uint64_t key, const ailego::NumericalVector &vec) { if (vec.size() != dimension_) { return false; } features_.emplace_back(key, vec); return true; } //! Append an element into holder bool emplace(uint64_t key, ailego::NumericalVector &&vec) { if (vec.size() != dimension_) { return false; } features_.emplace_back(key, std::move(vec)); return true; } //! Request a change in capacity void reserve(size_t size) { features_.reserve(size); } private: //! Disable them MultiPassNumericalIndexHolder(void) = delete; //! Members size_t dimension_{0}; std::vector>> features_; }; /*! One-Pass Binary Index Holder */ template class OnePassBinaryIndexHolder : public IndexHolder { public: /*! One-Pass Index Holder Iterator */ class Iterator : public IndexHolder::Iterator { public: //! Index Holder Iterator Pointer typedef std::unique_ptr Pointer; //! Constructor Iterator(OnePassBinaryIndexHolder *owner) : holder_(owner) { features_iter_ = holder_->features_.begin(); } //! Destructor virtual ~Iterator(void) {} //! Retrieve pointer of data const void *data(void) const override { return features_iter_->second.data(); } //! Test if the iterator is valid bool is_valid(void) const override { return (features_iter_ != holder_->features_.end()); } //! Retrieve primary key uint64_t key(void) const override { return features_iter_->first; } //! Next iterator void next(void) override { holder_->features_.erase(features_iter_++); } private: OnePassBinaryIndexHolder *holder_{nullptr}; typename std::list>>::iterator features_iter_{}; }; //! Constructor OnePassBinaryIndexHolder(size_t dim) : dimension_(dim) {} //! Retrieve count of elements in holder (-1 indicates unknown) size_t count(void) const override { return features_.size(); } //! Retrieve dimension size_t dimension(void) const override { return dimension_; } //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_UNDEFINED; } //! Retrieve element size in bytes size_t element_size(void) const override { return (dimension_ + (sizeof(T) << 3) - 1) / (sizeof(T) << 3) * sizeof(T); } //! Retrieve if it can multi-pass bool multipass(void) const override { return false; } //! Create a new iterator IndexHolder::Iterator::Pointer create_iterator(void) override { return IndexHolder::Iterator::Pointer( new OnePassBinaryIndexHolder::Iterator(this)); } //! Append an element into holder bool emplace(uint64_t key, const ailego::BinaryVector &vec) { if (vec.size() != dimension_) { return false; } features_.emplace_back(key, vec); return true; } //! Append an element into holder bool emplace(uint64_t key, ailego::BinaryVector &&vec) { if (vec.size() != dimension_) { return false; } features_.emplace_back(key, std::move(vec)); return true; } private: //! Disable them OnePassBinaryIndexHolder(void) = delete; //! Members size_t dimension_{0}; std::list>> features_; }; /*! Multi-Pass Binary Index Holder */ template class MultiPassBinaryIndexHolder : public IndexHolder { public: /*! Multi-Pass Index Holder Iterator */ class Iterator : public IndexHolder::Iterator { public: //! Index Holder Iterator Pointer typedef std::unique_ptr Pointer; //! Constructor Iterator(MultiPassBinaryIndexHolder *owner) : holder_(owner) { features_iter_ = holder_->features_.begin(); } //! Destructor virtual ~Iterator(void) {} //! Retrieve pointer of data const void *data(void) const override { return features_iter_->second.data(); } //! Test if the iterator is valid bool is_valid(void) const override { return (features_iter_ != holder_->features_.end()); } //! Retrieve primary key uint64_t key(void) const override { return features_iter_->first; } //! Next iterator void next(void) override { ++features_iter_; } private: MultiPassBinaryIndexHolder *holder_{nullptr}; typename std::vector>>::iterator features_iter_{}; }; //! Constructor MultiPassBinaryIndexHolder(size_t dim) : dimension_(dim) {} //! Retrieve count of elements in holder (-1 indicates unknown) size_t count(void) const override { return features_.size(); } //! Retrieve dimension size_t dimension(void) const override { return dimension_; } //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_UNDEFINED; } //! Retrieve element size in bytes size_t element_size(void) const override { return (dimension_ + (sizeof(T) << 3) - 1) / (sizeof(T) << 3) * sizeof(T); } //! Retrieve if it can multi-pass bool multipass(void) const override { return true; } //! Create a new iterator IndexHolder::Iterator::Pointer create_iterator(void) override { return IndexHolder::Iterator::Pointer( new MultiPassBinaryIndexHolder::Iterator(this)); } //! Append an element into holder bool emplace(uint64_t key, const ailego::BinaryVector &vec) { if (vec.size() != dimension_) { return false; } features_.emplace_back(key, vec); return true; } //! Append an element into holder bool emplace(uint64_t key, ailego::BinaryVector &&vec) { if (vec.size() != dimension_) { return false; } features_.emplace_back(key, std::move(vec)); return true; } //! Request a change in capacity void reserve(size_t size) { features_.reserve(size); } private: //! Disable them MultiPassBinaryIndexHolder(void) = delete; //! Members size_t dimension_{0}; std::vector>> features_; }; /*! One-Pass Index Holder */ template struct OnePassIndexHolder; /*! One-Pass Index Holder (BINARY32) */ template <> struct OnePassIndexHolder : public OnePassBinaryIndexHolder { //! Constructor using OnePassBinaryIndexHolder::OnePassBinaryIndexHolder; //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_BINARY32; } }; /*! One-Pass Index Holder (BINARY64) */ template <> struct OnePassIndexHolder : public OnePassBinaryIndexHolder { //! Constructor using OnePassBinaryIndexHolder::OnePassBinaryIndexHolder; //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_BINARY64; } }; /*! One-Pass Index Holder (FP16) */ template <> struct OnePassIndexHolder : public OnePassNumericalIndexHolder { //! Constructor using OnePassNumericalIndexHolder::OnePassNumericalIndexHolder; //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_FP16; } }; /*! One-Pass Index Holder (FP32) */ template <> struct OnePassIndexHolder : public OnePassNumericalIndexHolder { //! Constructor using OnePassNumericalIndexHolder::OnePassNumericalIndexHolder; //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_FP32; } }; /*! One-Pass Index Holder (FP64) */ template <> struct OnePassIndexHolder : public OnePassNumericalIndexHolder { //! Constructor using OnePassNumericalIndexHolder::OnePassNumericalIndexHolder; //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_FP64; } }; /*! One-Pass Index Holder (INT8) */ template <> struct OnePassIndexHolder : public OnePassNumericalIndexHolder { //! Constructor using OnePassNumericalIndexHolder::OnePassNumericalIndexHolder; //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_INT8; } }; /*! One-Pass Index Holder (INT16) */ template <> struct OnePassIndexHolder : public OnePassNumericalIndexHolder { //! Constructor using OnePassNumericalIndexHolder::OnePassNumericalIndexHolder; //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_INT16; } }; /*! Multi-Pass Index Holder */ template struct MultiPassIndexHolder; /*! Multi-Pass Index Holder (BINARY32) */ template <> struct MultiPassIndexHolder : public MultiPassBinaryIndexHolder { //! Constructor using MultiPassBinaryIndexHolder::MultiPassBinaryIndexHolder; //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_BINARY32; } }; /*! Multi-Pass Index Holder (BINARY64) */ template <> struct MultiPassIndexHolder : public MultiPassBinaryIndexHolder { //! Constructor using MultiPassBinaryIndexHolder::MultiPassBinaryIndexHolder; //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_BINARY64; } }; /*! Multi-Pass Index Holder (FP16) */ template <> struct MultiPassIndexHolder : public MultiPassNumericalIndexHolder { //! Constructor using MultiPassNumericalIndexHolder::MultiPassNumericalIndexHolder; //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_FP16; } }; /*! Multi-Pass Index Holder (FP32) */ template <> struct MultiPassIndexHolder : public MultiPassNumericalIndexHolder { //! Constructor using MultiPassNumericalIndexHolder::MultiPassNumericalIndexHolder; //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_FP32; } }; /*! Multi-Pass Index Holder (FP64) */ template <> struct MultiPassIndexHolder : public MultiPassNumericalIndexHolder { //! Constructor using MultiPassNumericalIndexHolder::MultiPassNumericalIndexHolder; //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_FP64; } }; /*! Multi-Pass Index Holder (INT8) */ template <> struct MultiPassIndexHolder : public MultiPassNumericalIndexHolder { //! Constructor using MultiPassNumericalIndexHolder::MultiPassNumericalIndexHolder; //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_INT8; } }; /*! Multi-Pass Index Holder (INT16) */ template <> struct MultiPassIndexHolder : public MultiPassNumericalIndexHolder { //! Constructor using MultiPassNumericalIndexHolder::MultiPassNumericalIndexHolder; //! Retrieve type information IndexMeta::FeatureTypes type(void) const override { return IndexMeta::FT_INT16; } }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_HOLDER_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_logger.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date May 2018 * \brief Interface of AiTheta Index Logger */ #ifndef __AITHETA2_INDEX_LOGGER_H__ #define __AITHETA2_INDEX_LOGGER_H__ #include #include #include #include "index_module.h" #include "index_params.h" //! Log Debug Message #ifndef LOG_DEBUG #define LOG_DEBUG(format, ...) \ aitheta2::IndexLoggerBroker::Log(aitheta2::IndexLogger::LEVEL_DEBUG, \ __FILE__, __LINE__, format, ##__VA_ARGS__) #endif //! Log Information Message #ifndef LOG_INFO #define LOG_INFO(format, ...) \ aitheta2::IndexLoggerBroker::Log(aitheta2::IndexLogger::LEVEL_INFO, \ __FILE__, __LINE__, format, ##__VA_ARGS__) #endif //! Log Warn Message #ifndef LOG_WARN #define LOG_WARN(format, ...) \ aitheta2::IndexLoggerBroker::Log(aitheta2::IndexLogger::LEVEL_WARN, \ __FILE__, __LINE__, format, ##__VA_ARGS__) #endif //! Log Error Message #ifndef LOG_ERROR #define LOG_ERROR(format, ...) \ aitheta2::IndexLoggerBroker::Log(aitheta2::IndexLogger::LEVEL_ERROR, \ __FILE__, __LINE__, format, ##__VA_ARGS__) #endif //! Log Fatal Message #ifndef LOG_FATAL #define LOG_FATAL(format, ...) \ aitheta2::IndexLoggerBroker::Log(aitheta2::IndexLogger::LEVEL_FATAL, \ __FILE__, __LINE__, format, ##__VA_ARGS__) #endif namespace aitheta2 { /*! Index Logger */ struct IndexLogger : public IndexModule { //! Index Logger Pointer typedef std::shared_ptr Pointer; static const int LEVEL_DEBUG; static const int LEVEL_INFO; static const int LEVEL_WARN; static const int LEVEL_ERROR; static const int LEVEL_FATAL; //! Retrieve string of level static const char *LevelString(int level) { static const char *info[] = {"DEBUG", " INFO", " WARN", "ERROR", "FATAL"}; if (level < (int)(sizeof(info) / sizeof(info[0]))) { return info[level]; } return ""; } //! Retrieve symbol of level static char LevelSymbol(int level) { static const char info[5] = {'D', 'I', 'W', 'E', 'F'}; if (level < (int)(sizeof(info) / sizeof(info[0]))) { return info[level]; } return ' '; } //! Destructor virtual ~IndexLogger(void) {} //! Initialize Logger virtual int init(const IndexParams ¶ms) = 0; //! Cleanup Logger virtual int cleanup(void) = 0; //! Log Message virtual void log(int level, const char *file, int line, const char *format, va_list args) = 0; }; /*! Index Logger Broker */ class IndexLoggerBroker { public: //! Register Logger static IndexLogger::Pointer Register(IndexLogger::Pointer logger) { IndexLogger::Pointer ret = std::move(logger_); logger_ = std::move(logger); return ret; } //! Register Logger with init params static int Register(IndexLogger::Pointer logger, const aitheta2::IndexParams ¶ms) { //! Cleanup the previous, before initizlizing the new one if (logger_) { logger_->cleanup(); } logger_ = std::move(logger); return logger_->init(params); } //! Unregister Logger static void Unregister(void) { logger_ = nullptr; } //! Set Level of Logger static void SetLevel(int level) { logger_level_ = level; } //! Log Message __attribute__((format(printf, 4, 5))) static void Log( int level, const char *file, int line, const char *format, ...) { if (logger_level_ <= level && logger_) { va_list args; va_start(args, format); logger_->log(level, file, line, format, args); va_end(args); } } private: //! Disable them IndexLoggerBroker(void) = delete; IndexLoggerBroker(const IndexLoggerBroker &) = delete; IndexLoggerBroker(IndexLoggerBroker &&) = delete; //! Members static int logger_level_; static IndexLogger::Pointer logger_; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_LOGGER_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_measure.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date May 2019 * \brief Interface of AiTheta Index Measure */ #ifndef __AITHETA2_INDEX_MEASURE_H__ #define __AITHETA2_INDEX_MEASURE_H__ #include "index_meta.h" #include "index_module.h" namespace aitheta2 { /*! Index Measure */ struct IndexMeasure : public IndexModule { //! Index Measure Pointer typedef std::shared_ptr Pointer; //! Matrix Distance Function typedef void (*MatrixDistanceHandle)(const void *m, const void *q, size_t dim, float *out); //! Matrix Distance Function Object using MatrixDistance = std::function; //! Destructor virtual ~IndexMeasure(void) {} //! Initialize Measure virtual int init(const IndexMeta &meta, const IndexParams ¶ms) = 0; //! Cleanup Measure virtual int cleanup(void) = 0; //! Retrieve if it matched virtual bool is_matched(const IndexMeta &meta) const = 0; //! Retrieve if it matched virtual bool is_matched(const IndexMeta &meta, const IndexQueryMeta &qmeta) const = 0; //! Retrieve distance function for query virtual MatrixDistance distance(void) const = 0; //! Retrieve distance function for index features virtual MatrixDistance distance_matrix(size_t m, size_t n) const = 0; //! Retrieve params of Measure virtual const IndexParams ¶ms(void) const = 0; //! Retrieve query measure object of this index measure virtual Pointer query_measure(void) const = 0; //! Normalize result virtual void normalize(float *score) const { (void)score; } //! Retrieve if it supports normalization virtual bool support_normalize(void) const { return false; } //! Train the measure virtual int train(const void *vec, size_t dim) { (void)vec; (void)dim; return 0; } //! Retrieve if it supports training virtual bool support_train(void) const { return false; } //! Compute the distance between feature and query float distance(const void *m, const void *q, size_t dim) const { float dist; (this->distance())(m, q, dim, &dist); return dist; } }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_MEASURE_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_meta.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Mar 2018 * \brief Interface of AiTheta Index Meta */ #ifndef __AITHETA2_INDEX_META_H__ #define __AITHETA2_INDEX_META_H__ #include "index_params.h" namespace aitheta2 { /*! Index Meta */ class IndexMeta { public: /*! Feature Types */ enum FeatureTypes { FT_UNDEFINED = 0, FT_BINARY32 = 1, FT_BINARY64 = 2, FT_FP16 = 3, FT_FP32 = 4, FT_FP64 = 5, FT_INT8 = 6, FT_INT16 = 7, FT_INT4 = 8, }; /*! Major Orders */ enum MajorOrders { MO_UNDEFINED = 0, MO_ROW = 1, MO_COLUMN = 2, }; //! Constructor IndexMeta(void) { this->set_meta(FeatureTypes::FT_FP32, 128u); this->set_measure("SquaredEuclidean", 0, IndexParams()); } //! Constructor IndexMeta(FeatureTypes tp, uint32_t dim) { this->set_meta(tp, dim); this->set_measure("SquaredEuclidean", 0, IndexParams()); } //! Constructor IndexMeta(const IndexMeta &rhs) : major_order_(rhs.major_order_), type_(rhs.type_), dimension_(rhs.dimension_), unit_size_(rhs.unit_size_), element_size_(rhs.element_size_), space_id_(rhs.space_id_), measure_revision_(rhs.measure_revision_), converter_revision_(rhs.converter_revision_), reformer_revision_(rhs.reformer_revision_), trainer_revision_(rhs.trainer_revision_), builder_revision_(rhs.builder_revision_), reducer_revision_(rhs.reducer_revision_), searcher_revision_(rhs.searcher_revision_), streamer_revision_(rhs.streamer_revision_), measure_name_(rhs.measure_name_), converter_name_(rhs.converter_name_), reformer_name_(rhs.reformer_name_), trainer_name_(rhs.trainer_name_), builder_name_(rhs.builder_name_), reducer_name_(rhs.reducer_name_), searcher_name_(rhs.searcher_name_), streamer_name_(rhs.streamer_name_), measure_params_(rhs.measure_params_), converter_params_(rhs.converter_params_), reformer_params_(rhs.reformer_params_), trainer_params_(rhs.trainer_params_), builder_params_(rhs.builder_params_), reducer_params_(rhs.reducer_params_), searcher_params_(rhs.searcher_params_), streamer_params_(rhs.streamer_params_), attributes_(rhs.attributes_) {} //! Constructor IndexMeta(IndexMeta &&rhs) : major_order_(rhs.major_order_), type_(rhs.type_), dimension_(rhs.dimension_), unit_size_(rhs.unit_size_), element_size_(rhs.element_size_), space_id_(rhs.space_id_), measure_revision_(rhs.measure_revision_), converter_revision_(rhs.converter_revision_), reformer_revision_(rhs.reformer_revision_), trainer_revision_(rhs.trainer_revision_), builder_revision_(rhs.builder_revision_), reducer_revision_(rhs.reducer_revision_), searcher_revision_(rhs.searcher_revision_), streamer_revision_(rhs.streamer_revision_), measure_name_(std::move(rhs.measure_name_)), converter_name_(std::move(rhs.converter_name_)), reformer_name_(std::move(rhs.reformer_name_)), trainer_name_(std::move(rhs.trainer_name_)), builder_name_(std::move(rhs.builder_name_)), reducer_name_(std::move(rhs.reducer_name_)), searcher_name_(std::move(rhs.searcher_name_)), streamer_name_(std::move(rhs.streamer_name_)), measure_params_(std::move(rhs.measure_params_)), converter_params_(std::move(rhs.converter_params_)), reformer_params_(std::move(rhs.reformer_params_)), trainer_params_(std::move(rhs.trainer_params_)), builder_params_(std::move(rhs.builder_params_)), reducer_params_(std::move(rhs.reducer_params_)), searcher_params_(std::move(rhs.searcher_params_)), streamer_params_(std::move(rhs.streamer_params_)), attributes_(std::move(rhs.attributes_)) {} //! Assignment IndexMeta &operator=(const IndexMeta &rhs) { major_order_ = rhs.major_order_; type_ = rhs.type_; dimension_ = rhs.dimension_; unit_size_ = rhs.unit_size_; element_size_ = rhs.element_size_; measure_revision_ = rhs.measure_revision_; converter_revision_ = rhs.converter_revision_; reformer_revision_ = rhs.reformer_revision_; trainer_revision_ = rhs.trainer_revision_; builder_revision_ = rhs.builder_revision_; reducer_revision_ = rhs.reducer_revision_; searcher_revision_ = rhs.searcher_revision_; streamer_revision_ = rhs.streamer_revision_; measure_name_ = rhs.measure_name_; converter_name_ = rhs.converter_name_; reformer_name_ = rhs.reformer_name_; trainer_name_ = rhs.trainer_name_; builder_name_ = rhs.builder_name_; reducer_name_ = rhs.reducer_name_; searcher_name_ = rhs.searcher_name_; streamer_name_ = rhs.streamer_name_; measure_params_ = rhs.measure_params_; converter_params_ = rhs.converter_params_; reformer_params_ = rhs.reformer_params_; trainer_params_ = rhs.trainer_params_; builder_params_ = rhs.builder_params_; reducer_params_ = rhs.reducer_params_; searcher_params_ = rhs.searcher_params_; streamer_params_ = rhs.streamer_params_; attributes_ = rhs.attributes_; return *this; } //! Assignment IndexMeta &operator=(IndexMeta &&rhs) { major_order_ = rhs.major_order_; type_ = rhs.type_; dimension_ = rhs.dimension_; unit_size_ = rhs.unit_size_; element_size_ = rhs.element_size_; space_id_ = rhs.space_id_; measure_revision_ = rhs.measure_revision_; converter_revision_ = rhs.converter_revision_; reformer_revision_ = rhs.reformer_revision_; trainer_revision_ = rhs.trainer_revision_; builder_revision_ = rhs.builder_revision_; reducer_revision_ = rhs.reducer_revision_; searcher_revision_ = rhs.searcher_revision_; streamer_revision_ = rhs.streamer_revision_; measure_name_ = std::move(rhs.measure_name_); converter_name_ = std::move(rhs.converter_name_); reformer_name_ = std::move(rhs.reformer_name_); trainer_name_ = std::move(rhs.trainer_name_); builder_name_ = std::move(rhs.builder_name_); reducer_name_ = std::move(rhs.reducer_name_); searcher_name_ = std::move(rhs.searcher_name_); streamer_name_ = std::move(rhs.streamer_name_); measure_params_ = std::move(rhs.measure_params_); converter_params_ = std::move(rhs.converter_params_); reformer_params_ = std::move(rhs.reformer_params_); trainer_params_ = std::move(rhs.trainer_params_); builder_params_ = std::move(rhs.builder_params_); reducer_params_ = std::move(rhs.reducer_params_); searcher_params_ = std::move(rhs.searcher_params_); streamer_params_ = std::move(rhs.streamer_params_); attributes_ = std::move(rhs.attributes_); return *this; } //! Reset the meta void clear(void) { major_order_ = MajorOrders::MO_UNDEFINED; type_ = FeatureTypes::FT_UNDEFINED; dimension_ = 0; unit_size_ = 0; element_size_ = 0; space_id_ = 0; measure_revision_ = 0; converter_revision_ = 0; reformer_revision_ = 0; trainer_revision_ = 0; builder_revision_ = 0; reducer_revision_ = 0; searcher_revision_ = 0; streamer_revision_ = 0; measure_name_.clear(); converter_name_.clear(); reformer_name_.clear(); trainer_name_.clear(); builder_name_.clear(); reducer_name_.clear(); searcher_name_.clear(); streamer_name_.clear(); measure_params_.clear(); converter_params_.clear(); reformer_params_.clear(); trainer_params_.clear(); builder_params_.clear(); reducer_params_.clear(); searcher_params_.clear(); streamer_params_.clear(); attributes_.clear(); } //! Retrieve major order information MajorOrders major_order(void) const { return major_order_; } //! Retrieve type information FeatureTypes type(void) const { return type_; } //! Retrieve dimension uint32_t dimension(void) const { return dimension_; } //! Retrieve unit size in bytes uint32_t unit_size(void) const { return unit_size_; } //! Retrieve element size in bytes uint32_t element_size(void) const { return element_size_; } //! Retrieve space id uint64_t space_id(void) const { return space_id_; } //! Retrieve revision of measure uint32_t measure_revision(void) const { return measure_revision_; } //! Retrieve revision of converter uint32_t converter_revision(void) const { return converter_revision_; } //! Retrieve revision of reformer uint32_t reformer_revision(void) const { return reformer_revision_; } //! Retrieve revision of trainer uint32_t trainer_revision(void) const { return trainer_revision_; } //! Retrieve revision of builder uint32_t builder_revision(void) const { return builder_revision_; } //! Retrieve revision of searcher uint32_t searcher_revision(void) const { return searcher_revision_; } //! Retrieve revision of reducer uint32_t reducer_revision(void) const { return reducer_revision_; } //! Retrieve revision of streamer uint32_t streamer_revision(void) const { return streamer_revision_; } //! Retrieve name of measure const std::string &measure_name(void) const { return measure_name_; } //! Retrieve name of converter const std::string &converter_name(void) const { return converter_name_; } //! Retrieve name of reformer const std::string &reformer_name(void) const { return reformer_name_; } //! Retrieve name of trainer const std::string &trainer_name(void) const { return trainer_name_; } //! Retrieve name of builder const std::string &builder_name(void) const { return builder_name_; } //! Retrieve name of reducer const std::string &reducer_name(void) const { return reducer_name_; } //! Retrieve name of searcher const std::string &searcher_name(void) const { return searcher_name_; } //! Retrieve name of streamer const std::string &streamer_name(void) const { return streamer_name_; } //! Retrieve measure params const IndexParams &measure_params(void) const { return measure_params_; } //! Retrieve converter params const IndexParams &converter_params(void) const { return converter_params_; } //! Retrieve reformer params const IndexParams &reformer_params(void) const { return reformer_params_; } //! Retrieve trainer params const IndexParams &trainer_params(void) const { return trainer_params_; } //! Retrieve builder params const IndexParams &builder_params(void) const { return builder_params_; } //! Retrieve reducer params const IndexParams &reducer_params(void) const { return reducer_params_; } //! Retrieve searcher params const IndexParams &searcher_params(void) const { return searcher_params_; } //! Retrieve streamer params const IndexParams &streamer_params(void) const { return streamer_params_; } //! Retrieve attributes const IndexParams &attributes(void) const { return attributes_; } //! Retrieve mutable attributes IndexParams *mutable_attributes(void) { return &attributes_; } //! Set major order of features void set_major_order(MajorOrders order) { major_order_ = order; } //! Set dimension of feature void set_dimension(uint32_t dim) { dimension_ = dim; element_size_ = IndexMeta::ElementSizeof(type_, unit_size_, dim); } //! Set meta information of feature void set_meta(FeatureTypes tp, uint32_t unit, uint32_t dim) { type_ = tp; dimension_ = dim; unit_size_ = unit; element_size_ = ElementSizeof(tp, unit, dim); } //! Set meta information of feature void set_meta(FeatureTypes tp, uint32_t dim) { this->set_meta(tp, UnitSizeof(tp), dim); } //! Set space id of index void set_space_id(uint64_t val) { space_id_ = val; } //! Set information of measure template void set_measure(TName &&name, uint32_t rev, TParams &¶ms) { measure_name_ = std::forward(name); measure_revision_ = rev; measure_params_ = std::forward(params); } //! Set information of converter template void set_converter(TName &&name, uint32_t rev, TParams &¶ms) { converter_name_ = std::forward(name); converter_revision_ = rev; converter_params_ = std::forward(params); } //! Set information of reformer template void set_reformer(TName &&name, uint32_t rev, TParams &¶ms) { reformer_name_ = std::forward(name); reformer_revision_ = rev; reformer_params_ = std::forward(params); } //! Set information of trainer template void set_trainer(TName &&name, uint32_t rev, TParams &¶ms) { trainer_name_ = std::forward(name); trainer_revision_ = rev; trainer_params_ = std::forward(params); } //! Set information of builder template void set_builder(TName &&name, uint32_t rev, TParams &¶ms) { builder_name_ = std::forward(name); builder_revision_ = rev; builder_params_ = std::forward(params); } //! Set information of reducer template void set_reducer(TName &&name, uint32_t rev, TParams &¶ms) { reducer_name_ = std::forward(name); reducer_revision_ = rev; reducer_params_ = std::forward(params); } //! Set information of searcher template void set_searcher(TName &&name, uint32_t rev, TParams &¶ms) { searcher_name_ = std::forward(name); searcher_revision_ = rev; searcher_params_ = std::forward(params); } //! Set information of streamer template void set_streamer(TName &&name, uint32_t rev, TParams &¶ms) { streamer_name_ = std::forward(name); streamer_revision_ = rev; streamer_params_ = std::forward(params); } //! Serialize meta information into buffer void serialize(std::string *out) const; //! Derialize meta information from buffer bool deserialize(const void *data, size_t len); //! Retrieve debug information std::string debug_string(void) const; //! Calculate unit size of feature static uint32_t UnitSizeof(FeatureTypes ft) { static const uint32_t unit_size_table[] = { 0u, // FT_UNDEFINED sizeof(uint32_t), // FT_BINARY32 sizeof(uint64_t), // FT_BINARY64 sizeof(uint16_t), // FT_FP16 sizeof(float), // FT_FP32 sizeof(double), // FT_FP64 sizeof(int8_t), // FT_INT8 sizeof(int16_t), // FT_INT16 sizeof(uint8_t) // FT_INT4 }; return unit_size_table[ft]; } //! Calculate align size of feature static uint32_t AlignSizeof(FeatureTypes ft) { static const uint32_t align_size_table[] = { 0u, // FT_UNDEFINED sizeof(uint32_t), // FT_BINARY32 sizeof(uint64_t), // FT_BINARY64 sizeof(uint16_t), // FT_FP16 sizeof(float), // FT_FP32 sizeof(double), // FT_FP64 sizeof(int8_t) * 4, // FT_INT8 sizeof(int16_t), // FT_INT16 sizeof(uint8_t) * 4 // FT_INT4 }; return align_size_table[ft]; } //! Calculate element size of feature static uint32_t ElementSizeof(FeatureTypes ft, uint32_t unit, uint32_t dim) { switch (ft) { case FeatureTypes::FT_UNDEFINED: return 0; case FeatureTypes::FT_BINARY32: case FeatureTypes::FT_BINARY64: return (dim + unit * 8 - 1) / (unit * 8) * unit; case FeatureTypes::FT_FP16: case FeatureTypes::FT_FP32: case FeatureTypes::FT_FP64: case FeatureTypes::FT_INT8: case FeatureTypes::FT_INT16: return (dim * unit); case FeatureTypes::FT_INT4: return (dim + unit * 2 - 1) / (unit * 2) * unit; } return 0; } //! Calculate element size of feature static uint32_t ElementSizeof(FeatureTypes ft, uint32_t dim) { return ElementSizeof(ft, UnitSizeof(ft), dim); } private: MajorOrders major_order_{MajorOrders::MO_UNDEFINED}; FeatureTypes type_{FeatureTypes::FT_UNDEFINED}; uint32_t dimension_{0}; uint32_t unit_size_{0}; uint32_t element_size_{0}; uint64_t space_id_{0}; uint32_t measure_revision_{0}; uint32_t converter_revision_{0}; uint32_t reformer_revision_{0}; uint32_t trainer_revision_{0}; uint32_t builder_revision_{0}; uint32_t reducer_revision_{0}; uint32_t searcher_revision_{0}; uint32_t streamer_revision_{0}; std::string measure_name_{}; std::string converter_name_{}; std::string reformer_name_{}; std::string trainer_name_{}; std::string builder_name_{}; std::string reducer_name_{}; std::string searcher_name_{}; std::string streamer_name_{}; IndexParams measure_params_{}; IndexParams converter_params_{}; IndexParams reformer_params_{}; IndexParams trainer_params_{}; IndexParams builder_params_{}; IndexParams reducer_params_{}; IndexParams searcher_params_{}; IndexParams streamer_params_{}; IndexParams attributes_{}; }; /*! Index Query Meta */ class IndexQueryMeta { public: //! Constructor IndexQueryMeta(void) {} //! Constructor IndexQueryMeta(IndexMeta::FeatureTypes ft, uint32_t unit, uint32_t dim) : type_(ft), dimension_(dim), unit_size_(unit), element_size_(IndexMeta::ElementSizeof(ft, unit, dim)) {} //! Constructor IndexQueryMeta(IndexMeta::FeatureTypes ft, uint32_t dim) : IndexQueryMeta{ft, IndexMeta::UnitSizeof(ft), dim} {} //! Retrieve type of features IndexMeta::FeatureTypes type(void) const { return type_; } //! Retrieve dimension of features uint32_t dimension(void) const { return dimension_; } //! Retrieve unit size of feature uint32_t unit_size(void) const { return unit_size_; } //! Retrieve element size of feature uint32_t element_size(void) const { return element_size_; } //! Set dimension of feature void set_dimension(uint32_t dim) { dimension_ = dim; element_size_ = IndexMeta::ElementSizeof(type_, unit_size_, dim); } //! Set meta information of feature void set_meta(IndexMeta::FeatureTypes tp, uint32_t unit, uint32_t dim) { type_ = tp; dimension_ = dim; unit_size_ = unit; element_size_ = IndexMeta::ElementSizeof(tp, unit, dim); } //! Set meta information of feature void set_meta(IndexMeta::FeatureTypes tp, uint32_t dim) { this->set_meta(tp, IndexMeta::UnitSizeof(tp), dim); } private: IndexMeta::FeatureTypes type_{IndexMeta::FT_UNDEFINED}; uint32_t dimension_{0}; uint32_t unit_size_{0}; uint32_t element_size_{0}; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_META_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_module.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Module */ #ifndef __AITHETA2_INDEX_MODULE_H__ #define __AITHETA2_INDEX_MODULE_H__ #include #include namespace aitheta2 { struct IndexFactory; /*! Index Module */ class IndexModule { public: //! Index Module Pointer typedef std::shared_ptr Pointer; //! Destructor virtual ~IndexModule(void) {} //! Retrieve debug information virtual std::string debug_string(void) const { return std::string(); } //! Retrieve name of module const std::string &name(void) const { return name_; } //! Retrieve revision of module uint32_t revision(void) const { return revision_; } protected: friend struct IndexFactory; //! Set name of module void set_name(const std::string &str) { name_ = str; } //! Set revision of module void set_revision(uint32_t val) { revision_ = val; } private: //! Members uint32_t revision_{0u}; std::string name_{}; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_MODULE_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_packer.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Packer */ #ifndef __AITHETA2_INDEX_PACKER_H__ #define __AITHETA2_INDEX_PACKER_H__ #include #include "index_error.h" #include "index_format.h" #include "index_version.h" namespace aitheta2 { /*! Index Packer */ class IndexPacker { public: /*! Index Packer Segment Meta */ class SegmentMeta { public: //! Constructor SegmentMeta(const std::string &str, size_t dsz, size_t psz, uint32_t crc) : data_size_(dsz), padding_size_(psz), data_crc_(crc), id_(str) {} //! Constructor SegmentMeta(std::string &&str, size_t dsz, size_t psz, uint32_t crc) : data_size_(dsz), padding_size_(psz), data_crc_(crc), id_(std::forward(str)) {} //! Constructor SegmentMeta(const SegmentMeta &rhs) : data_size_(rhs.data_size_), padding_size_(rhs.padding_size_), data_crc_(rhs.data_crc_), id_(rhs.id_) {} //! Constructor SegmentMeta(SegmentMeta &&rhs) : data_size_(rhs.data_size_), padding_size_(rhs.padding_size_), data_crc_(rhs.data_crc_), id_(std::move(rhs.id_)) {} //! Retrieve id of segment const std::string &id(void) const { return id_; } //! Retrieve size of data size_t data_size(void) const { return data_size_; } //! Retrieve crc of data uint32_t data_crc(void) const { return data_crc_; } //! Retrieve size of padding size_t padding_size(void) const { return padding_size_; } private: size_t data_size_{0}; size_t padding_size_{0}; uint32_t data_crc_{0}; std::string id_{}; }; //! Retrieve magic number of index uint32_t magic(void) const { return magic_; } //! Reset the packer void reset(void) { magic_ = 0; data_crc_ = 0u; data_size_ = 0u; } //! Setup header of index pacakge template bool setup(TFunc write_data) { static_assert(ailego::IsInvocableWithResult::value, "Invocable function type"); IndexFormat::MetaHeader header; IndexFormat::SetupMetaHeader( &header, (uint32_t)(0 - sizeof(IndexFormat::MetaFooter)), sizeof(IndexFormat::MetaHeader)); if (write_data(&header, sizeof(header)) != sizeof(header)) { return false; } magic_ = header.magic; return true; } //! Pack index data template size_t pack(TFunc write_data, const void *data, size_t len) { static_assert(ailego::IsInvocableWithResult::value, "Invocable function type"); size_t wrlen = write_data(data, len); if (wrlen > 0u) { data_crc_ = ailego::Crc32c::Hash(data, wrlen, data_crc_); data_size_ += wrlen; } return wrlen; } //! Finish packing data template bool finish(TFunc write_data, std::vector &stab) { static_assert(ailego::IsInvocableWithResult::value, "Invocable function type"); size_t content_size = 0u; for (const auto &it : stab) { content_size += it.data_size() + it.padding_size(); } if (content_size != data_size_) { return false; } if (!this->pack_version(write_data, stab)) { return false; } // Write the padding if need size_t content_padding_size = ailego_align(data_size_, 32) - data_size_; if (content_padding_size) { std::string padding(content_padding_size, '\0'); if (write_data(padding.data(), padding.size()) != padding.size()) { return false; } } // Prepare segment meta buffer IndexFormat::SegmentMetaBuffer buffer(stab.size()); for (const auto &it : stab) { buffer.append(it.id(), it.data_size(), it.padding_size(), it.data_crc()); } buffer.resize(ailego_align(buffer.size(), 32)); // Write segment table into file if (write_data(buffer.data(), buffer.size()) != buffer.size()) { return false; } // Update footer IndexFormat::MetaFooter footer; IndexFormat::SetupMetaFooter(&footer); footer.segments_meta_crc = buffer.crc(); footer.content_crc = data_crc_; footer.segment_count = stab.size(); footer.segments_meta_size = buffer.size(); footer.content_size = data_size_; footer.content_padding_size = content_padding_size; footer.total_size = footer.content_size + footer.content_padding_size + footer.segments_meta_size + sizeof(IndexFormat::MetaHeader) + sizeof(IndexFormat::MetaFooter); IndexFormat::UpdateMetaFooter(&footer, 0); // Write footer into file if (write_data(&footer, sizeof(footer)) != sizeof(footer)) { return false; } return true; } //! Pack index version template bool pack_version(TFunc write_data, std::vector &stab) { static_assert(ailego::IsInvocableWithResult::value, "Invocable function type"); std::string buffer(IndexVersion::Details()); size_t data_size = buffer.size(); uint32_t data_crc = ailego::Crc32c::Hash(buffer.data(), buffer.size(), 0); buffer.resize((data_size + 31u) & ~31u); if (write_data(buffer.data(), buffer.size()) != buffer.size()) { return false; } data_crc_ = ailego::Crc32c::Hash(buffer.data(), buffer.size(), data_crc_); data_size_ += buffer.size(); stab.emplace_back(std::string("IndexVersion"), data_size, buffer.size() - data_size, data_crc); return true; } private: uint32_t magic_{0u}; uint32_t data_crc_{0u}; size_t data_size_{0u}; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_PACKER_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_params.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Mar 2018 * \brief Interface of AiTheta Index Parameters */ #ifndef __AITHETA2_INDEX_PARAMS_H__ #define __AITHETA2_INDEX_PARAMS_H__ #include namespace aitheta2 { //! Trying compatible with T #define _TRYING_COMPATIBLE(cube, T, out) \ if (cube->compatible()) \ return ( \ *out = static_cast::type>( \ cube->unsafe_cast()), \ true) //! Trying compatible with T (Boolean) #define _TRYING_COMPATIBLE_BOOL(cube, T, out) \ if (cube->compatible()) return (*out = !!cube->unsafe_cast(), true) //! Trying compatible with T (String) #define _TRYING_COMPATIBLE_STRING(cube, T, out) \ if (cube->compatible()) \ return (out->assign(std::to_string(cube->unsafe_cast())), true) //! Trying convert string #define _TRYING_CONVERT_STRING(cube, out) \ if (cube->compatible()) \ return ( \ *out = \ IndexParams::StringCast::type>( \ cube->unsafe_cast()), \ true) /*! Index Params */ class IndexParams { public: //! Constructor IndexParams(void) : hypercube_() {} //! Constructor IndexParams(const IndexParams &rhs) : hypercube_(rhs.hypercube_) {} //! Constructor IndexParams(IndexParams &&rhs) : hypercube_() { hypercube_.swap(rhs.hypercube_); } //! Destructor ~IndexParams(void) {} //! Assignment IndexParams &operator=(const IndexParams &rhs) { hypercube_ = rhs.hypercube_; return *this; } //! Assignment IndexParams &operator=(IndexParams &&rhs) { hypercube_.swap(rhs.hypercube_); return *this; } //! Overloaded operator [] ailego::Cube &operator[](const std::string &key) { return hypercube_[key]; } //! Overloaded operator [] ailego::Cube &operator[](std::string &&key) { return hypercube_[std::move(key)]; } //! Test if the element is exist bool has(const std::string &key) const { return hypercube_.has(key); } //! Test if the map is empty bool empty(void) const { return hypercube_.empty(); } //! Clear the map void clear(void) { hypercube_.clear(); } //! Erase the pair via a key bool erase(const std::string &key) { return hypercube_.erase(key); } //! Merge another index params void merge(const IndexParams &rhs) { hypercube_.merge(rhs.hypercube_); } //! Merge another index params void merge(IndexParams &&rhs) { hypercube_.merge(std::move(rhs.hypercube_)); } //! Set the value of key in T template bool insert(const std::string &key, T &&val) { return hypercube_.insert(key, std::forward(val)); } //! Set the value of key in T template bool insert(std::string &&key, T &&val) { return hypercube_.insert(std::forward(key), std::forward(val)); } //! Set the value of key in T template void set(const std::string &key, T &&val) { hypercube_.insert_or_assign(key, std::forward(val)); } //! Set the value of key in T template void set(std::string &&key, T &&val) { hypercube_.insert_or_assign(std::forward(key), std::forward(val)); } //! Retrieve the value in boolean bool get(const std::string &key, bool *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, bool, out); _TRYING_COMPATIBLE_BOOL(cube, char, out); _TRYING_COMPATIBLE_BOOL(cube, unsigned char, out); _TRYING_COMPATIBLE_BOOL(cube, signed char, out); _TRYING_COMPATIBLE_BOOL(cube, short int, out); _TRYING_COMPATIBLE_BOOL(cube, unsigned short int, out); _TRYING_COMPATIBLE_BOOL(cube, int, out); _TRYING_COMPATIBLE_BOOL(cube, unsigned int, out); _TRYING_COMPATIBLE_BOOL(cube, long int, out); _TRYING_COMPATIBLE_BOOL(cube, unsigned long int, out); _TRYING_COMPATIBLE_BOOL(cube, long long int, out); _TRYING_COMPATIBLE_BOOL(cube, unsigned long long int, out); _TRYING_COMPATIBLE_BOOL(cube, float, out); _TRYING_COMPATIBLE_BOOL(cube, double, out); _TRYING_COMPATIBLE_BOOL(cube, long double, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in 'char' bool get(const std::string &key, char *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, char, out); _TRYING_COMPATIBLE(cube, unsigned char, out); _TRYING_COMPATIBLE(cube, signed char, out); _TRYING_COMPATIBLE(cube, bool, out); _TRYING_COMPATIBLE(cube, short int, out); _TRYING_COMPATIBLE(cube, unsigned short int, out); _TRYING_COMPATIBLE(cube, int, out); _TRYING_COMPATIBLE(cube, unsigned int, out); _TRYING_COMPATIBLE(cube, long int, out); _TRYING_COMPATIBLE(cube, unsigned long int, out); _TRYING_COMPATIBLE(cube, long long int, out); _TRYING_COMPATIBLE(cube, unsigned long long int, out); _TRYING_COMPATIBLE(cube, float, out); _TRYING_COMPATIBLE(cube, double, out); _TRYING_COMPATIBLE(cube, long double, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in 'unsigned char' bool get(const std::string &key, unsigned char *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, unsigned char, out); _TRYING_COMPATIBLE(cube, char, out); _TRYING_COMPATIBLE(cube, signed char, out); _TRYING_COMPATIBLE(cube, bool, out); _TRYING_COMPATIBLE(cube, unsigned short int, out); _TRYING_COMPATIBLE(cube, short int, out); _TRYING_COMPATIBLE(cube, unsigned int, out); _TRYING_COMPATIBLE(cube, int, out); _TRYING_COMPATIBLE(cube, unsigned long int, out); _TRYING_COMPATIBLE(cube, long int, out); _TRYING_COMPATIBLE(cube, unsigned long long int, out); _TRYING_COMPATIBLE(cube, long long int, out); _TRYING_COMPATIBLE(cube, float, out); _TRYING_COMPATIBLE(cube, double, out); _TRYING_COMPATIBLE(cube, long double, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in 'signed char' bool get(const std::string &key, signed char *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, signed char, out); _TRYING_COMPATIBLE(cube, char, out); _TRYING_COMPATIBLE(cube, unsigned char, out); _TRYING_COMPATIBLE(cube, bool, out); _TRYING_COMPATIBLE(cube, short int, out); _TRYING_COMPATIBLE(cube, unsigned short int, out); _TRYING_COMPATIBLE(cube, int, out); _TRYING_COMPATIBLE(cube, unsigned int, out); _TRYING_COMPATIBLE(cube, long int, out); _TRYING_COMPATIBLE(cube, unsigned long int, out); _TRYING_COMPATIBLE(cube, long long int, out); _TRYING_COMPATIBLE(cube, unsigned long long int, out); _TRYING_COMPATIBLE(cube, float, out); _TRYING_COMPATIBLE(cube, double, out); _TRYING_COMPATIBLE(cube, long double, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in 'short int' bool get(const std::string &key, short int *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, short int, out); _TRYING_COMPATIBLE(cube, unsigned short int, out); _TRYING_COMPATIBLE(cube, char, out); _TRYING_COMPATIBLE(cube, unsigned char, out); _TRYING_COMPATIBLE(cube, signed char, out); _TRYING_COMPATIBLE(cube, bool, out); _TRYING_COMPATIBLE(cube, int, out); _TRYING_COMPATIBLE(cube, unsigned int, out); _TRYING_COMPATIBLE(cube, long int, out); _TRYING_COMPATIBLE(cube, unsigned long int, out); _TRYING_COMPATIBLE(cube, long long int, out); _TRYING_COMPATIBLE(cube, unsigned long long int, out); _TRYING_COMPATIBLE(cube, float, out); _TRYING_COMPATIBLE(cube, double, out); _TRYING_COMPATIBLE(cube, long double, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in 'unsigned short int' bool get(const std::string &key, unsigned short int *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, unsigned short int, out); _TRYING_COMPATIBLE(cube, short int, out); _TRYING_COMPATIBLE(cube, unsigned char, out); _TRYING_COMPATIBLE(cube, char, out); _TRYING_COMPATIBLE(cube, signed char, out); _TRYING_COMPATIBLE(cube, bool, out); _TRYING_COMPATIBLE(cube, unsigned int, out); _TRYING_COMPATIBLE(cube, int, out); _TRYING_COMPATIBLE(cube, unsigned long int, out); _TRYING_COMPATIBLE(cube, long int, out); _TRYING_COMPATIBLE(cube, unsigned long long int, out); _TRYING_COMPATIBLE(cube, long long int, out); _TRYING_COMPATIBLE(cube, float, out); _TRYING_COMPATIBLE(cube, double, out); _TRYING_COMPATIBLE(cube, long double, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in 'int' bool get(const std::string &key, int *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, int, out); _TRYING_COMPATIBLE(cube, unsigned int, out); _TRYING_COMPATIBLE(cube, short int, out); _TRYING_COMPATIBLE(cube, unsigned short int, out); _TRYING_COMPATIBLE(cube, char, out); _TRYING_COMPATIBLE(cube, unsigned char, out); _TRYING_COMPATIBLE(cube, signed char, out); _TRYING_COMPATIBLE(cube, bool, out); _TRYING_COMPATIBLE(cube, long int, out); _TRYING_COMPATIBLE(cube, unsigned long int, out); _TRYING_COMPATIBLE(cube, long long int, out); _TRYING_COMPATIBLE(cube, unsigned long long int, out); _TRYING_COMPATIBLE(cube, float, out); _TRYING_COMPATIBLE(cube, double, out); _TRYING_COMPATIBLE(cube, long double, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in 'unsigned int' bool get(const std::string &key, unsigned int *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, unsigned int, out); _TRYING_COMPATIBLE(cube, int, out); _TRYING_COMPATIBLE(cube, unsigned short int, out); _TRYING_COMPATIBLE(cube, short int, out); _TRYING_COMPATIBLE(cube, unsigned char, out); _TRYING_COMPATIBLE(cube, char, out); _TRYING_COMPATIBLE(cube, signed char, out); _TRYING_COMPATIBLE(cube, bool, out); _TRYING_COMPATIBLE(cube, unsigned long int, out); _TRYING_COMPATIBLE(cube, long int, out); _TRYING_COMPATIBLE(cube, unsigned long long int, out); _TRYING_COMPATIBLE(cube, long long int, out); _TRYING_COMPATIBLE(cube, float, out); _TRYING_COMPATIBLE(cube, double, out); _TRYING_COMPATIBLE(cube, long double, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in 'long int' bool get(const std::string &key, long int *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, long int, out); _TRYING_COMPATIBLE(cube, unsigned long int, out); _TRYING_COMPATIBLE(cube, int, out); _TRYING_COMPATIBLE(cube, unsigned int, out); _TRYING_COMPATIBLE(cube, short int, out); _TRYING_COMPATIBLE(cube, unsigned short int, out); _TRYING_COMPATIBLE(cube, char, out); _TRYING_COMPATIBLE(cube, unsigned char, out); _TRYING_COMPATIBLE(cube, signed char, out); _TRYING_COMPATIBLE(cube, bool, out); _TRYING_COMPATIBLE(cube, long long int, out); _TRYING_COMPATIBLE(cube, unsigned long long int, out); _TRYING_COMPATIBLE(cube, float, out); _TRYING_COMPATIBLE(cube, double, out); _TRYING_COMPATIBLE(cube, long double, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in 'unsigned long int' bool get(const std::string &key, unsigned long int *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, unsigned long int, out); _TRYING_COMPATIBLE(cube, long int, out); _TRYING_COMPATIBLE(cube, unsigned int, out); _TRYING_COMPATIBLE(cube, int, out); _TRYING_COMPATIBLE(cube, unsigned short int, out); _TRYING_COMPATIBLE(cube, short int, out); _TRYING_COMPATIBLE(cube, unsigned char, out); _TRYING_COMPATIBLE(cube, char, out); _TRYING_COMPATIBLE(cube, signed char, out); _TRYING_COMPATIBLE(cube, bool, out); _TRYING_COMPATIBLE(cube, unsigned long long int, out); _TRYING_COMPATIBLE(cube, long long int, out); _TRYING_COMPATIBLE(cube, float, out); _TRYING_COMPATIBLE(cube, double, out); _TRYING_COMPATIBLE(cube, long double, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in 'long long int' bool get(const std::string &key, long long int *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, long long int, out); _TRYING_COMPATIBLE(cube, unsigned long long int, out); _TRYING_COMPATIBLE(cube, long int, out); _TRYING_COMPATIBLE(cube, unsigned long int, out); _TRYING_COMPATIBLE(cube, int, out); _TRYING_COMPATIBLE(cube, unsigned int, out); _TRYING_COMPATIBLE(cube, short int, out); _TRYING_COMPATIBLE(cube, unsigned short int, out); _TRYING_COMPATIBLE(cube, char, out); _TRYING_COMPATIBLE(cube, unsigned char, out); _TRYING_COMPATIBLE(cube, signed char, out); _TRYING_COMPATIBLE(cube, bool, out); _TRYING_COMPATIBLE(cube, float, out); _TRYING_COMPATIBLE(cube, double, out); _TRYING_COMPATIBLE(cube, long double, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in 'unsigned long long int' bool get(const std::string &key, unsigned long long int *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, unsigned long long int, out); _TRYING_COMPATIBLE(cube, long long int, out); _TRYING_COMPATIBLE(cube, unsigned long int, out); _TRYING_COMPATIBLE(cube, long int, out); _TRYING_COMPATIBLE(cube, unsigned int, out); _TRYING_COMPATIBLE(cube, int, out); _TRYING_COMPATIBLE(cube, unsigned short int, out); _TRYING_COMPATIBLE(cube, short int, out); _TRYING_COMPATIBLE(cube, unsigned char, out); _TRYING_COMPATIBLE(cube, char, out); _TRYING_COMPATIBLE(cube, signed char, out); _TRYING_COMPATIBLE(cube, bool, out); _TRYING_COMPATIBLE(cube, float, out); _TRYING_COMPATIBLE(cube, double, out); _TRYING_COMPATIBLE(cube, long double, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in 'float' bool get(const std::string &key, float *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, float, out); _TRYING_COMPATIBLE(cube, double, out); _TRYING_COMPATIBLE(cube, long double, out); _TRYING_COMPATIBLE(cube, long long int, out); _TRYING_COMPATIBLE(cube, unsigned long long int, out); _TRYING_COMPATIBLE(cube, long int, out); _TRYING_COMPATIBLE(cube, unsigned long int, out); _TRYING_COMPATIBLE(cube, int, out); _TRYING_COMPATIBLE(cube, unsigned int, out); _TRYING_COMPATIBLE(cube, short int, out); _TRYING_COMPATIBLE(cube, unsigned short int, out); _TRYING_COMPATIBLE(cube, char, out); _TRYING_COMPATIBLE(cube, unsigned char, out); _TRYING_COMPATIBLE(cube, signed char, out); _TRYING_COMPATIBLE(cube, bool, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in 'double' bool get(const std::string &key, double *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, double, out); _TRYING_COMPATIBLE(cube, float, out); _TRYING_COMPATIBLE(cube, long double, out); _TRYING_COMPATIBLE(cube, long long int, out); _TRYING_COMPATIBLE(cube, unsigned long long int, out); _TRYING_COMPATIBLE(cube, long int, out); _TRYING_COMPATIBLE(cube, unsigned long int, out); _TRYING_COMPATIBLE(cube, int, out); _TRYING_COMPATIBLE(cube, unsigned int, out); _TRYING_COMPATIBLE(cube, short int, out); _TRYING_COMPATIBLE(cube, unsigned short int, out); _TRYING_COMPATIBLE(cube, char, out); _TRYING_COMPATIBLE(cube, unsigned char, out); _TRYING_COMPATIBLE(cube, signed char, out); _TRYING_COMPATIBLE(cube, bool, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in 'long double' bool get(const std::string &key, long double *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, long double, out); _TRYING_COMPATIBLE(cube, double, out); _TRYING_COMPATIBLE(cube, float, out); _TRYING_COMPATIBLE(cube, long long int, out); _TRYING_COMPATIBLE(cube, unsigned long long int, out); _TRYING_COMPATIBLE(cube, long int, out); _TRYING_COMPATIBLE(cube, unsigned long int, out); _TRYING_COMPATIBLE(cube, int, out); _TRYING_COMPATIBLE(cube, unsigned int, out); _TRYING_COMPATIBLE(cube, short int, out); _TRYING_COMPATIBLE(cube, unsigned short int, out); _TRYING_COMPATIBLE(cube, char, out); _TRYING_COMPATIBLE(cube, unsigned char, out); _TRYING_COMPATIBLE(cube, signed char, out); _TRYING_COMPATIBLE(cube, bool, out); _TRYING_CONVERT_STRING(cube, out); } return false; } //! Retrieve the value in string bool get(const std::string &key, std::string *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, std::string, out); _TRYING_COMPATIBLE_STRING(cube, bool, out); _TRYING_COMPATIBLE_STRING(cube, char, out); _TRYING_COMPATIBLE_STRING(cube, unsigned char, out); _TRYING_COMPATIBLE_STRING(cube, signed char, out); _TRYING_COMPATIBLE_STRING(cube, short int, out); _TRYING_COMPATIBLE_STRING(cube, unsigned short int, out); _TRYING_COMPATIBLE_STRING(cube, int, out); _TRYING_COMPATIBLE_STRING(cube, unsigned int, out); _TRYING_COMPATIBLE_STRING(cube, long int, out); _TRYING_COMPATIBLE_STRING(cube, unsigned long int, out); _TRYING_COMPATIBLE_STRING(cube, long long int, out); _TRYING_COMPATIBLE_STRING(cube, unsigned long long int, out); _TRYING_COMPATIBLE_STRING(cube, float, out); _TRYING_COMPATIBLE_STRING(cube, double, out); _TRYING_COMPATIBLE_STRING(cube, long double, out); } return false; } //! Retrieve the value in T template bool get(const std::string &key, T *out) const { const ailego::Cube *cube = hypercube_.get(key); if (cube) { _TRYING_COMPATIBLE(cube, T, out); } return false; } //! Retrieve the value in boolean bool get_as_bool(const std::string &key) const { bool result = false; this->get(key, &result); return result; } //! Retrieve the value in int8 int8_t get_as_int8(const std::string &key) const { int8_t result = 0; this->get(key, &result); return result; } //! Retrieve the value in int16 int16_t get_as_int16(const std::string &key) const { int16_t result = 0; this->get(key, &result); return result; } //! Retrieve the value in int32 int32_t get_as_int32(const std::string &key) const { int32_t result = 0; this->get(key, &result); return result; } //! Retrieve the value in int64 int64_t get_as_int64(const std::string &key) const { int64_t result = 0; this->get(key, &result); return result; } //! Retrieve the value in uint8 uint8_t get_as_uint8(const std::string &key) const { uint8_t result = 0; this->get(key, &result); return result; } //! Retrieve the value in uint16 uint16_t get_as_uint16(const std::string &key) const { uint16_t result = 0; this->get(key, &result); return result; } //! Retrieve the value in uint32 uint32_t get_as_uint32(const std::string &key) const { uint32_t result = 0; this->get(key, &result); return result; } //! Retrieve the value in uint64 uint64_t get_as_uint64(const std::string &key) const { uint64_t result = 0; this->get(key, &result); return result; } //! Retrieve the value in float float get_as_float(const std::string &key) const { float result = 0.0f; this->get(key, &result); return result; } //! Retrieve the value in double double get_as_double(const std::string &key) const { double result = 0.0f; this->get(key, &result); return result; } //! Retrieve the value in string std::string get_as_string(const std::string &key) const { std::string result; this->get(key, &result); return result; } //! Retrieve the debug string std::string debug_string(void) const { std::string str; SerializeToBuffer(*this, &str); return str; } //! Retrieve the map of parameters const ailego::Hypercube &hypercube(void) const { return hypercube_; } //! Retrieve the map of parameters ailego::Hypercube *mutable_hypercube(void) { return &hypercube_; } //! Parse parameters from buffer (Json format) static bool ParseFromBuffer(const std::string &buf, IndexParams *params); //! Parse parameters from OS environment static void ParseFromEnvironment(IndexParams *params); //! Serialize parameters into buffer static void SerializeToBuffer(const IndexParams ¶ms, std::string *buf); protected: //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { return std::strtof(str.c_str(), nullptr); } //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { return std::strtod(str.c_str(), nullptr); } //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { return std::strtold(str.c_str(), nullptr); } //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { return static_cast(std::strtol(str.c_str(), nullptr, 0)); } //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { return static_cast(std::strtol(str.c_str(), nullptr, 0)); } //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { return static_cast(std::strtoul(str.c_str(), nullptr, 0)); } //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { return static_cast(std::strtol(str.c_str(), nullptr, 0)); } //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { return static_cast(std::strtol(str.c_str(), nullptr, 0)); } //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { return static_cast(std::strtol(str.c_str(), nullptr, 0)); } //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { return static_cast(std::strtoll(str.c_str(), nullptr, 0)); } //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { return static_cast( std::strtoul(str.c_str(), nullptr, 0)); } //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { return static_cast(std::strtoul(str.c_str(), nullptr, 0)); } //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { return static_cast( std::strtoul(str.c_str(), nullptr, 0)); } //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { return static_cast( std::strtoull(str.c_str(), nullptr, 0)); } //! Convert string type to another type template static auto StringCast(const std::string &str) -> typename std::enable_if::value, T>::type { if (str.empty()) { return false; } char c = str[0]; if (c == 'Y' || c == 'T' || c == 'y' || c == 't') { return true; } return !!std::strtof(str.c_str(), nullptr); } private: ailego::Hypercube hypercube_; }; #undef _TRYING_COMPATIBLE #undef _TRYING_COMPATIBLE #undef _TRYING_COMPATIBLE_BOOL #undef _TRYING_COMPATIBLE_STRING #undef _TRYING_CONVERT_STRING } // namespace aitheta2 #endif // __AITHETA2_INDEX_PARAMS_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_plugin.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Apr 2018 * \brief Interface of AiTheta Index Plugin */ #ifndef __AITHETA2_INDEX_PLUGIN_H__ #define __AITHETA2_INDEX_PLUGIN_H__ #include #include namespace aitheta2 { /*! Index Plugin */ class IndexPlugin { public: //! Constructor IndexPlugin(void) : handle_(nullptr) {} //! Constructor IndexPlugin(IndexPlugin &&plugin) : handle_(plugin.handle_) { plugin.handle_ = nullptr; } //! Constructor explicit IndexPlugin(const std::string &path) : handle_(nullptr) { this->load(path); } //! Destructor ~IndexPlugin(void) {} //! Test if the plugin is valid bool is_valid(void) const { return (!!handle_); } //! Retrieve the handle void *handle(void) const { return handle_; } //! Load the library path bool load(const std::string &path); //! Load the library path bool load(const std::string &path, std::string *err); //! Unload plugin void unload(void); private: //! Disable them IndexPlugin(const IndexPlugin &) = delete; IndexPlugin &operator=(const IndexPlugin &) = delete; //! Members void *handle_; }; /*! Index Plugin Broker */ class IndexPluginBroker { public: //! Constructor IndexPluginBroker(void) : plugins_() {} //! Constructor IndexPluginBroker(IndexPluginBroker &&broker) : plugins_(std::move(broker.plugins_)) {} //! Destructor ~IndexPluginBroker(void) {} //! Emplace a plugin bool emplace(IndexPlugin &&plugin); //! Emplace a plugin via library path bool emplace(const std::string &path) { return this->emplace(IndexPlugin(path)); } //! Emplace a plugin via library path bool emplace(const std::string &path, std::string *err) { aitheta2::IndexPlugin plugin; if (!plugin.load(path, err)) { return false; } return this->emplace(std::move(plugin)); } //! Retrieve count of plugins in broker size_t count(void) const { return plugins_.size(); } private: //! Disable them IndexPluginBroker(const IndexPluginBroker &) = delete; IndexPluginBroker &operator=(const IndexPluginBroker &) = delete; //! Members std::vector plugins_; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_PLUGIN_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_provider.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Feb 2020 * \brief Interface of AiTheta Index Provider */ #ifndef __AITHETA2_INDEX_PROVIDER_H__ #define __AITHETA2_INDEX_PROVIDER_H__ #include "index_holder.h" namespace aitheta2 { /*! Index Provider */ struct IndexProvider { //! Index Provider Pointer typedef std::shared_ptr Pointer; //! Index Provider Iterator typedef IndexHolder::Iterator Iterator; //! Destructor virtual ~IndexProvider(void) {} //! Create a new iterator virtual Iterator::Pointer create_iterator(void) const = 0; //! Retrieve count of elements in provider virtual size_t count(void) const = 0; //! Retrieve dimension of vector virtual size_t dimension(void) const = 0; //! Retrieve type of vector virtual IndexMeta::FeatureTypes vector_type(void) const = 0; //! Retrieve vector size in bytes virtual size_t vector_size(void) const = 0; //! Retrieve a vector using a primary key virtual const void *get_vector(uint64_t key) const = 0; //! Retrieve an attachment using a primary key virtual const void *get_attachment(uint64_t key, size_t *len) const = 0; //! Retrieve the owner class virtual const std::string &owner_class(void) const = 0; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_PROVIDER_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_reformer.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Reformer */ #ifndef __AITHETA2_INDEX_REFORMER_H__ #define __AITHETA2_INDEX_REFORMER_H__ #include "index_container.h" #include "index_document.h" namespace aitheta2 { /*! Index Reformer */ class IndexReformer : public IndexModule { public: //! Index Reformer Pointer typedef std::shared_ptr Pointer; //! Destructor virtual ~IndexReformer(void) {} //! Initialize Reformer virtual int init(const IndexParams ¶ms) = 0; //! Cleanup Reformer virtual int cleanup(void) = 0; //! Load index from container virtual int load(IndexContainer::Pointer cntr) = 0; //! Unload index virtual int unload(void) = 0; //! Transform a query virtual int transform(const void *query, const IndexQueryMeta &qmeta, std::string *out, IndexQueryMeta *ometa) const = 0; //! Transform queries virtual int transform(const void *query, const IndexQueryMeta &qmeta, uint32_t count, std::string *out, IndexQueryMeta *ometa) const = 0; //! Convert a record virtual int convert(const void *record, const IndexQueryMeta &rmeta, std::string *out, IndexQueryMeta *ometa) const { return this->transform(record, rmeta, out, ometa); } //! Convert records virtual int convert(const void *records, const IndexQueryMeta &rmeta, uint32_t count, std::string *out, IndexQueryMeta *ometa) const { return this->transform(records, rmeta, count, out, ometa); } //! Normalize results virtual int normalize(const void *query, const IndexQueryMeta &qmeta, IndexDocumentList &result) const = 0; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_REFORMER_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_searcher.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Searcher */ #ifndef __AITHETA2_INDEX_SEARCHER_H__ #define __AITHETA2_INDEX_SEARCHER_H__ #include "index_container.h" #include "index_context.h" #include "index_measure.h" #include "index_provider.h" #include "index_stats.h" namespace aitheta2 { /*! Index Searcher */ class IndexSearcher : public IndexModule { public: //! Index Searcher Pointer typedef std::shared_ptr Pointer; /*! Index Searcher Stats */ class Stats : public IndexStats { public: //! Set count of documents loaded void set_loaded_count(size_t count) { loaded_count_ = count; } //! Set time cost of documents loaded void set_loaded_costtime(uint64_t cost) { loaded_costtime_ = cost; } //! Retrieve count of documents loaded size_t loaded_count(void) const { return loaded_count_; } //! Retrieve time cost of documents loaded uint64_t loaded_costtime(void) const { return loaded_costtime_; } //! Retrieve count of documents loaded (mutable) size_t *mutable_loaded_count(void) { return &loaded_count_; } //! Retrieve time cost of documents loaded (mutable) uint64_t *mutable_loaded_costtime(void) { return &loaded_costtime_; } private: //! Members size_t loaded_count_{0u}; uint64_t loaded_costtime_{0u}; }; /*! Index Searcher Context */ struct Context : public IndexContext {}; /*! Index Searcher Provider */ struct Provider : public IndexProvider {}; //! Destructor virtual ~IndexSearcher(void) {} //! Initialize Searcher virtual int init(const IndexParams ¶ms) = 0; //! Cleanup Searcher virtual int cleanup(void) = 0; //! Load index from container virtual int load(IndexContainer::Pointer cntr, IndexMeasure::Pointer measure) = 0; //! Unload index virtual int unload(void) = 0; //! Similarity brute force search virtual int search_bf_impl(const void *query, const IndexQueryMeta &qmeta, Context::Pointer &context) const = 0; //! Similarity search virtual int search_impl(const void *query, const IndexQueryMeta &qmeta, Context::Pointer &context) const = 0; //! Similarity brute force search virtual int search_bf_impl(const void *query, const IndexQueryMeta &qmeta, uint32_t count, Context::Pointer &context) const = 0; //! Similarity search virtual int search_impl(const void *query, const IndexQueryMeta &qmeta, uint32_t count, Context::Pointer &context) const = 0; //! Retrieve statistics virtual const Stats &stats(void) const = 0; //! Retrieve meta of index virtual const IndexMeta &meta(void) const = 0; //! Retrieve params of index virtual const IndexParams ¶ms(void) const = 0; //! Create a searcher context virtual Context::Pointer create_context(void) const = 0; //! Create a searcher provider virtual Provider::Pointer create_provider(void) const { return Provider::Pointer(); } //! Similarity search (FP16) template ::type> int search_bf(const ailego::Float16 *vec, size_t dim, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (FP32) template ::type> int search_bf(const float *vec, size_t dim, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (INT8) template ::type> int search_bf(const int8_t *vec, size_t dim, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (INT4) template ::type> int search_bf(const uint8_t *vec, size_t dim, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (BINARY) template ::type> int search_bf(const uint32_t *vec, size_t dim, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search in batch (FP16) template ::type> int search_bf(const ailego::Float16 *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity search in batch (FP32) template ::type> int search_bf(const float *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity search in batch (INT8) template ::type> int search_bf(const int8_t *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity search in batch (INT4) template ::type> int search_bf(const uint8_t *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity Search in batch (BINARY) template ::type> int search_bf(const uint32_t *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity search (FP16) template ::type> int search(const ailego::Float16 *vec, size_t dim, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (FP32) template ::type> int search(const float *vec, size_t dim, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (INT8) template ::type> int search(const int8_t *vec, size_t dim, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (INT4) template ::type> int search(const uint8_t *vec, size_t dim, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (BINARY32) template ::type> int search(const uint32_t *vec, size_t dim, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search in batch (FP16) template ::type> int search(const ailego::Float16 *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity search in batch (FP32) template ::type> int search(const float *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity search in batch (INT8) template ::type> int search(const int8_t *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity Search in batch (INT4) template ::type> int search(const uint8_t *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity Search in batch (BINARY) template ::type> int search(const uint32_t *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), rows, context); } }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_SEARCHER_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_stats.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Stats */ #ifndef __AITHETA2_INDEX_STATS_H__ #define __AITHETA2_INDEX_STATS_H__ #include "index_params.h" namespace aitheta2 { /*! Index Stats */ class IndexStats { public: //! Test if the element is exist bool has_attribute(const std::string &key) const { return attributes_.has(key); } //! Set the value of key in T template bool set_attribute(const std::string &key, T &&val) { return attributes_.set(key, std::forward(val)); } //! Retrieve attribute with key template bool get_attribute(const std::string &key, T *out) const { return attributes_.get(key, out); } //! Erase the pair via a key bool erase_attribute(const std::string &key) { return attributes_.erase(key); } //! Clear the attributes void clear_attributes(void) { attributes_.clear(); } //! Retrieve attributes const IndexParams &attributes(void) const { return attributes_; } //! Retrieve mutable attributes IndexParams *mutable_attributes(void) { return &attributes_; } private: //! Members IndexParams attributes_{}; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_STATS_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_storage.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Jan 2020 * \brief Interface of AiTheta Index Storage */ #ifndef __AITHETA2_INDEX_STORAGE_H__ #define __AITHETA2_INDEX_STORAGE_H__ #include "index_module.h" #include "index_params.h" namespace aitheta2 { /*! Index Storage */ class IndexStorage : public IndexModule { public: //! Index Storage Pointer typedef std::shared_ptr Pointer; /*! Index Storage Segment */ struct Segment { //! Index Storage Pointer typedef std::shared_ptr Pointer; //! Destructor virtual ~Segment(void) {} //! Retrieve size of data virtual size_t data_size(void) const = 0; //! Retrieve crc of data virtual uint32_t data_crc(void) const = 0; //! Retrieve size of padding virtual size_t padding_size(void) const = 0; //! Retrieve capacity of segment virtual size_t capacity(void) const = 0; //! Fetch data from segment (with own buffer) virtual size_t fetch(size_t offset, void *buf, size_t len) const = 0; //! Read data from segment virtual size_t read(size_t offset, const void **data, size_t len) = 0; //! Write data into the storage with offset virtual size_t write(size_t offset, const void *data, size_t len) = 0; //! Resize size of data virtual size_t resize(size_t size) = 0; //! Update crc of data virtual void update_data_crc(uint32_t crc) = 0; //! Clone the segment virtual Pointer clone(void) = 0; }; //! Destructor virtual ~IndexStorage(void) {} //! Initialize storage virtual int init(const IndexParams ¶ms) = 0; //! Cleanup storage virtual int cleanup(void) = 0; //! Open storage virtual int open(const std::string &path, bool create) = 0; //! Flush storage virtual int flush(void) = 0; //! Close storage virtual int close(void) = 0; //! Append a segment into storage virtual int append(const std::string &id, size_t size) = 0; //! Refresh meta information (checksum, update time, etc.) virtual void refresh(uint64_t check_point) = 0; //! Retrieve check point of storage virtual uint64_t check_point(void) const = 0; //! Retrieve a segment by id virtual Segment::Pointer get(const std::string &id) = 0; //! Test if it a segment exists virtual bool has(const std::string &id) const = 0; //! Retrieve magic number of index virtual uint32_t magic(void) const = 0; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_STORAGE_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_streamer.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Realtime Streamer */ #ifndef __AITHETA2_INDEX_STREAMER_H__ #define __AITHETA2_INDEX_STREAMER_H__ #include "index_context.h" #include "index_helper.h" #include "index_provider.h" #include "index_stats.h" #include "index_threads.h" namespace aitheta2 { /*! Index Streamer */ class IndexStreamer : public IndexModule { public: //! Index Streamer Pointer typedef std::shared_ptr Pointer; /*! Index Streamer Stats */ class Stats : public IndexStats { public: //! Set revision id void set_revision_id(size_t rev) { revision_id_ = rev; } //! Set count of documents loaded void set_loaded_count(size_t count) { loaded_count_ = count; } //! Set count of documents added void set_added_count(size_t count) { added_count_ = count; } //! Set count of documents discarded void set_discarded_count(size_t count) { discarded_count_ = count; } //! Set count of documents updated void set_updated_count(size_t count) { updated_count_ = count; } //! Set count of documents deleted void set_deleted_count(size_t count) { deleted_count_ = count; } //! Set size of index void set_index_size(size_t count) { index_size_ = count; } //! Set size of index dumped void set_dumped_size(size_t count) { dumped_size_ = count; } //! Retrieve create time void set_create_time(uint64_t val) { create_time_ = val; } //! Retrieve update time void set_update_time(uint64_t val) { update_time_ = val; } //! Retrieve revision id size_t revision_id(void) const { return revision_id_; } //! Retrieve count of documents loaded size_t loaded_count(void) const { return loaded_count_; } //! Retrieve count of documents added size_t added_count(void) const { return added_count_; } //! Retrieve count of documents discarded size_t discarded_count(void) const { return discarded_count_; } //! Retrieve count of documents updated size_t updated_count(void) const { return updated_count_; } //! Retrieve count of documents deleted size_t deleted_count(void) const { return deleted_count_; } //! Retrieve size of index size_t index_size(void) const { return index_size_; } //! Retrieve size of index dumped size_t dumped_size(void) const { return dumped_size_; } //! Retrieve check point of index uint64_t check_point(void) const { return check_point_; } //! Retrieve create time of index uint64_t create_time(void) const { return create_time_; } //! Retrieve update time of index uint64_t update_time(void) const { return update_time_; } //! Retrieve count of documents loaded (mutable) size_t *mutable_loaded_count(void) { return &loaded_count_; } //! Retrieve count of documents added (mutable) size_t *mutable_added_count(void) { return &added_count_; } //! Retrieve count of documents discarded (mutable) size_t *mutable_discarded_count(void) { return &discarded_count_; } //! Retrieve count of documents updated (mutable) size_t *mutable_updated_count(void) { return &updated_count_; } //! Retrieve count of documents deleted (mutable) size_t *mutable_deleted_count(void) { return &deleted_count_; } //! Retrieve size of index (mutable) size_t *mutable_index_size(void) { return &index_size_; } //! Retrieve size of index dumped (mutable) size_t *mutable_dumped_size(void) { return &dumped_size_; } //! Retrieve check point of index (mutable) uint64_t *mutable_check_point(void) { return &check_point_; } //! Retrieve create time of index (mutable) uint64_t *mutable_create_time(void) { return &create_time_; } //! Retrieve update time of index (mutable) uint64_t *mutable_update_time(void) { return &update_time_; } private: //! Members size_t revision_id_{0u}; size_t loaded_count_{0u}; size_t added_count_{0u}; size_t discarded_count_{0u}; size_t updated_count_{0u}; size_t deleted_count_{0u}; size_t index_size_{0u}; size_t dumped_size_{0u}; uint64_t check_point_{0u}; uint64_t create_time_{0u}; uint64_t update_time_{0u}; }; /*! Index Streamer Context */ struct Context : public IndexContext {}; /*! Index Streamer Provider */ struct Provider : public IndexProvider {}; //! Destructor virtual ~IndexStreamer(void) {} //! Initialize the streamer virtual int init(const IndexMeta &mt, const IndexParams ¶ms) = 0; //! Cleanup the streamer virtual int cleanup(void) = 0; //! Create a context virtual Context::Pointer create_context(void) const = 0; //! Similarity search virtual int search_impl(const void *query, const IndexQueryMeta &qmeta, Context::Pointer &context) const = 0; //! Similarity search virtual int search_impl(const void *query, const IndexQueryMeta &qmeta, uint32_t count, Context::Pointer &context) const = 0; //! Similarity brute force search virtual int search_bf_impl(const void *query, const IndexQueryMeta &qmeta, Context::Pointer &context) const = 0; //! Similarity brute force search virtual int search_bf_impl(const void *query, const IndexQueryMeta &qmeta, uint32_t count, Context::Pointer &context) const = 0; //! Add a vector into index virtual int add_impl(uint64_t key, const void *query, const IndexQueryMeta &qmeta, Context::Pointer &context) = 0; //! Update the vector in index virtual int update_impl(uint64_t /*key*/, const void * /*query*/, const IndexQueryMeta & /*qmeta*/, Context::Pointer & /*context*/) { return IndexError_NotImplemented; } //! Delete the vector in index virtual int remove_impl(uint64_t /*key*/, Context::Pointer & /*context*/) { return IndexError_NotImplemented; } //! Optimize the index virtual int optimize_impl(aitheta2::IndexThreads::Pointer) { return aitheta2::IndexError_NotImplemented; } //! Open a index from storage virtual int open(IndexStorage::Pointer stg) = 0; //! Flush index virtual int flush(uint64_t check_point) = 0; //! Close index virtual int close(void) = 0; //! Dump index into storage virtual int dump(const IndexDumper::Pointer &dumper) = 0; //! Retrieve statistics virtual const Stats &stats(void) const = 0; //! Retrieve meta of index virtual const IndexMeta &meta(void) const = 0; //! Initialize the streamer with container virtual int init(IndexContainer::Pointer cntr, const IndexParams ¶ms) { IndexMeta mt; int ret = IndexHelper::DeserializeFromContainer(cntr.get(), &mt); if (ret == 0) { ret = this->init(mt, params); } return ret; } //! Create a streamer provider virtual Provider::Pointer create_provider(void) const { return Provider::Pointer(); } //! Similarity search (FP16) template ::type> int search_bf(const ailego::Float16 *vec, size_t dim, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (FP32) template ::type> int search_bf(const float *vec, size_t dim, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (INT8) template ::type> int search_bf(const int8_t *vec, size_t dim, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (INT4) template ::type> int search_bf(const uint8_t *vec, size_t dim, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (BINARY) template ::type> int search_bf(const uint32_t *vec, size_t dim, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search in batch (FP16) template ::type> int search_bf(const ailego::Float16 *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity search in batch (FP32) template ::type> int search_bf(const float *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity search in batch (INT8) template ::type> int search_bf(const int8_t *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity Search in batch (INT4) template ::type> int search_bf(const uint8_t *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity Search in batch (BINARY) template ::type> int search_bf(const uint32_t *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_bf_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity search (FP16) template ::type> int search(const ailego::Float16 *vec, size_t dim, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (FP32) template ::type> int search(const float *vec, size_t dim, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (INT8) template ::type> int search(const int8_t *vec, size_t dim, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (INT4) template ::type> int search(const uint8_t *vec, size_t dim, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search (BINARY32) template ::type> int search(const uint32_t *vec, size_t dim, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), context); } //! Similarity search in batch (FP16) template ::type> int search(const ailego::Float16 *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity search in batch (FP32) template ::type> int search(const float *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity search in batch (INT8) template ::type> int search(const int8_t *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity Search in batch (INT4) template ::type> int search(const uint8_t *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Similarity Search in batch (BINARY) template ::type> int search(const uint32_t *vec, size_t dim, size_t rows, Context::Pointer &context) const { return this->search_impl(vec, IndexQueryMeta(FT, dim), rows, context); } //! Add a vector into index (FP16) template ::type> int add(uint64_t key, const ailego::Float16 *vec, size_t dim, Context::Pointer &context) { return this->add_impl(key, vec, IndexQueryMeta(FT, dim), context); } //! Add a vector into index (FP32) template ::type> int add(uint64_t key, const float *vec, size_t dim, Context::Pointer &context) { return this->add_impl(key, vec, IndexQueryMeta(FT, dim), context); } //! Add a vector into index (INT8) template ::type> int add(uint64_t key, const int8_t *vec, size_t dim, Context::Pointer &context) { return this->add_impl(key, vec, IndexQueryMeta(FT, dim), context); } //! Add a vector into index (INT4) template ::type> int add(uint64_t key, const uint8_t *vec, size_t dim, Context::Pointer &context) { return this->add_impl(key, vec, IndexQueryMeta(FT, dim), context); } //! Add a vector into index (BINARY) template ::type> int add(uint64_t key, const uint32_t *vec, size_t dim, Context::Pointer &context) { return this->add_impl(key, vec, IndexQueryMeta(FT, dim), context); } //! Update the vector to index (FP16) template ::type> int update(uint64_t key, const ailego::Float16 *vec, size_t dim, Context::Pointer &context) { return this->update_impl(key, vec, IndexQueryMeta(FT, dim), context); } //! Update the vector to index (FP32) template ::type> int update(uint64_t key, const float *vec, size_t dim, Context::Pointer &context) { return this->update_impl(key, vec, IndexQueryMeta(FT, dim), context); } //! Update the vector to index (INT8) template ::type> int update(uint64_t key, const int8_t *vec, size_t dim, Context::Pointer &context) { return this->update_impl(key, vec, IndexQueryMeta(FT, dim), context); } //! Update the vector in index (INT4) template ::type> int update(uint64_t key, const uint8_t *vec, size_t dim, Context::Pointer &context) { return this->update_impl(key, vec, IndexQueryMeta(FT, dim), context); } //! Update the vector in index (BINARY) template ::type> int update(uint64_t key, const uint32_t *vec, size_t dim, Context::Pointer &context) { return this->update_impl(key, vec, IndexQueryMeta(FT, dim), context); } //! Delete the vector in index int remove(uint64_t key, Context::Pointer &context) { return this->remove_impl(key, context); } //! Optimize the index int optimize(aitheta2::IndexThreads::Pointer threads) { return this->optimize_impl(threads); } }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_STREAMER_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_threads.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf, daibing.db * \date Jun 2021 * \brief Interface of AiTheta Index Threads */ #ifndef __AITHETA2_INDEX_THREADS_H__ #define __AITHETA2_INDEX_THREADS_H__ #include #include #include #include #include #include #include #include #include namespace aitheta2 { /*! Index Threads * Index ThreadPool maintains multiple threads resources to execute the tasks * concurrently */ class IndexThreads { public: using Pointer = std::shared_ptr; /*! Threads Task Group * Manage of a group of sub-tasks which can be seen as a big task, * so we can wait all sub-tasks finished, or get the status of them */ class TaskGroup { public: using Pointer = std::shared_ptr; //! Destructor virtual ~TaskGroup(void) {} //! Submit a task to be executed asynchronous virtual void submit(ailego::ClosureHandler &&task) = 0; //! Check if the group is finished virtual bool is_finished(void) const = 0; //! Wait until all tasks in group finished virtual void wait_finish(void) = 0; }; //! Destructor virtual ~IndexThreads(void) {} //! Retrieve thread count in pool virtual size_t count(void) const = 0; //! Stop all threads virtual void stop(void) = 0; //! Submit a task to be executed asynchronous virtual void submit(ailego::ClosureHandler &&task) = 0; //! Make a task group virtual TaskGroup::Pointer make_group(void) = 0; //! Get the current work thread index virtual int indexof_this(void) const = 0; }; /*! Single Queue Index Threads */ class SingleQueueIndexThreads : public IndexThreads { public: /*! Single Queue Index Threads Task Group */ class SingleQueueTaskGroup : public TaskGroup { public: using Pointer = std::shared_ptr; //! Constructor explicit SingleQueueTaskGroup( ailego::ThreadPool::TaskGroup::Pointer task_group) : task_group_(std::move(task_group)) {} //! Submit a task to be executed asynchronous void submit(ailego::ClosureHandler &&task) override { while (task_group_->pending_count() >= kMaxQueueSize) { std::this_thread::sleep_for(std::chrono::milliseconds(1)); } task_group_->enqueue_and_wake(std::move(task)); } //! Check if the group is finished bool is_finished(void) const override { return task_group_->is_finished(); } //! Wait until all tasks in group finished void wait_finish(void) override { return task_group_->wait_finish(); } private: //! Members ailego::ThreadPool::TaskGroup::Pointer task_group_{}; }; //! Constructor SingleQueueIndexThreads(uint32_t size, bool binding) : pool_( size > 0 ? size : std::max(std::thread::hardware_concurrency(), 1u), binding) {} //! Constructor explicit SingleQueueIndexThreads(bool binding) : SingleQueueIndexThreads(0, binding) {} //! Constructor SingleQueueIndexThreads(void) : SingleQueueIndexThreads{false} {} //! Destructor virtual ~SingleQueueIndexThreads(void) {} //! Retrieve thread count in pool size_t count(void) const override { return pool_.count(); } //! Stop all threads void stop(void) override { pool_.stop(); } //! Submit a task to be executed asynchronous void submit(ailego::ClosureHandler &&task) override { while (pool_.pending_count() >= kMaxQueueSize) { std::this_thread::sleep_for(std::chrono::milliseconds(1)); } pool_.enqueue_and_wake(std::move(task)); } //! Make a task group TaskGroup::Pointer make_group(void) override { return std::make_shared(pool_.make_group()); } //! Get the current work thread index int indexof_this(void) const override { return pool_.indexof_this(); } private: static constexpr size_t kMaxQueueSize = 4096u; //! Disable them SingleQueueIndexThreads(const SingleQueueIndexThreads &) = delete; SingleQueueIndexThreads(SingleQueueIndexThreads &&) = delete; SingleQueueIndexThreads &operator=(const SingleQueueIndexThreads &) = delete; //! Members ailego::ThreadPool pool_{}; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_THREADS_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_unpacker.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Oct 2019 * \brief Interface of AiTheta Index Unpacker */ #ifndef __AITHETA2_INDEX_UNPACKER_H__ #define __AITHETA2_INDEX_UNPACKER_H__ #include #include #include "index_error.h" #include "index_format.h" #include "index_logger.h" namespace aitheta2 { /*! Index Unpacker */ class IndexUnpacker { public: /*! Index Unpacker Segment Meta */ class SegmentMeta { public: //! Constructor SegmentMeta(size_t offset, size_t dsz, size_t psz, uint32_t crc) : data_offset_(offset), data_size_(dsz), padding_size_(psz), data_crc_(crc) {} //! Retrieve offset of data size_t data_offset(void) const { return data_offset_; } //! Retrieve size of data size_t data_size(void) const { return data_size_; } //! Retrieve crc of data uint32_t data_crc(void) const { return data_crc_; } //! Retrieve size of padding size_t padding_size(void) const { return padding_size_; } private: size_t data_offset_{0}; size_t data_size_{0}; size_t padding_size_{0}; uint32_t data_crc_{0}; }; //! Reset the unpacker void reset(void) { segments_.clear(); } //! Retrieve segments of index package const std::map &segments(void) const { return segments_; } //! Retrieve magic number of index uint32_t magic(void) const { return header_.magic; } //! Retrieve header of index package const IndexFormat::MetaHeader &header(void) const { return header_; } //! Retrieve footer of index package const IndexFormat::MetaFooter &footer(void) const { return footer_; } //! Retrieve version information const std::string &version(void) const { return version_; } //! Retrieve mutable segments of index package std::map *mutable_segments(void) { return &segments_; } //! Unpack index data template bool unpack(TFunc read_data, size_t total, bool checksum) { static_assert(ailego::IsInvocableWithResult::value, "Invocable function type"); if (!this->unpack_header(read_data)) { LOG_ERROR("Failed to unpack index header"); return false; } if (!this->unpack_footer(read_data, total)) { LOG_ERROR("Failed to unpack index footer"); return false; } if (!this->unpack_segments(read_data, total)) { LOG_ERROR("Failed to unpack index segments' meta"); return false; } if (checksum && !this->validate_checksum(read_data)) { LOG_ERROR("Failed to validate checksum of index content"); return false; } if (!this->unpack_version(read_data)) { LOG_ERROR("Failed to unpack index version"); return false; } return true; } //! Unpack index header template bool unpack_header(TFunc read_data) { static_assert(ailego::IsInvocableWithResult::value, "Invocable function type"); const void *data = nullptr; if (read_data(0u, &data, sizeof(header_)) != sizeof(header_)) { return false; } memcpy(&header_, data, sizeof(header_)); if (header_.meta_header_size != sizeof(header_)) { return false; } if (ailego::Crc32c::Hash(&header_, sizeof(header_), header_.header_crc) != header_.header_crc) { return false; } return true; } //! Unpack index footer template bool unpack_footer(TFunc read_data, size_t total) { static_assert(ailego::IsInvocableWithResult::value, "Invocable function type"); if (header_.meta_footer_size != sizeof(footer_)) { return false; } size_t footer_offset = ((int32_t)header_.meta_footer_offset < 0) ? total + (int32_t)header_.meta_footer_offset : header_.meta_footer_offset; if (footer_offset + sizeof(footer_) > total) { return false; } const void *data = nullptr; if (read_data(footer_offset, &data, sizeof(footer_)) != sizeof(footer_)) { return false; } memcpy(&footer_, data, sizeof(footer_)); if ((footer_.total_size != total) || (footer_.content_size + footer_.content_padding_size + header_.content_offset > total)) { return false; } if (ailego::Crc32c::Hash(&footer_, sizeof(footer_), footer_.footer_crc) != footer_.footer_crc) { return false; } return true; } //! Unpack segments' meta template bool unpack_segments(TFunc read_data, size_t total) { static_assert(ailego::IsInvocableWithResult::value, "Invocable function type"); if (sizeof(IndexFormat::SegmentMeta) * footer_.segment_count > footer_.segments_meta_size) { return false; } size_t offset = ((int32_t)header_.meta_footer_offset < 0) ? total + (int32_t)header_.meta_footer_offset : header_.meta_footer_offset; if (offset < footer_.segments_meta_size || offset > total) { return false; } offset -= footer_.segments_meta_size; const void *data = nullptr; if (read_data(offset, &data, footer_.segments_meta_size) != footer_.segments_meta_size) { return false; } if (ailego::Crc32c::Hash(data, footer_.segments_meta_size, 0u) != footer_.segments_meta_crc) { return false; } IndexFormat::SegmentMeta *seg = (IndexFormat::SegmentMeta *)data; for (size_t i = 0; i < footer_.segment_count; ++i, ++seg) { if (seg->segment_id_offset > footer_.segments_meta_size) { return false; } if (seg->data_index > footer_.content_size) { return false; } if (seg->data_index + seg->data_size > footer_.content_size) { return false; } segments_.emplace( std::string(reinterpret_cast(data) + seg->segment_id_offset), SegmentMeta(seg->data_index + header_.content_offset, seg->data_size, seg->padding_size, seg->data_crc)); } return true; } //! Unpack index version template bool unpack_version(TFunc read_data) { static_assert(ailego::IsInvocableWithResult::value, "Invocable function type"); auto it = segments_.find("IndexVersion"); if (it == segments_.end()) { return false; } const SegmentMeta &segment = it->second; const void *data = nullptr; if (read_data(segment.data_offset(), &data, segment.data_size()) != segment.data_size()) { return false; } if (segment.data_crc() != 0u && ailego::Crc32c::Hash(data, segment.data_size(), 0u) != segment.data_crc()) { return false; } version_.assign(reinterpret_cast(data), segment.data_size()); return true; } //! Validate checksum of content template bool validate_checksum(TFunc read_data) const { static_assert(ailego::IsInvocableWithResult::value, "Invocable function type"); if (footer_.content_crc == 0) { return true; } const size_t block_size = 4096u; const void *data = nullptr; uint32_t checksum = 0u; size_t total = footer_.content_size; size_t offset = sizeof(header_); while (total >= block_size) { if (read_data(offset, &data, block_size) != block_size) { return false; } checksum = ailego::Crc32c::Hash(data, block_size, checksum); total -= block_size; offset += block_size; } if (read_data(offset, &data, total) != total) { return false; } checksum = ailego::Crc32c::Hash(data, total, checksum); return (checksum == footer_.content_crc); } private: IndexFormat::MetaHeader header_; IndexFormat::MetaFooter footer_; std::string version_{}; std::map segments_{}; }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_UNPACKER_H__ ================================================ FILE: deps/proxima/include/aitheta2/index_version.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hechong.xyf * \date Apr 2018 * \brief Interface of AiTheta Version */ #ifndef __AITHETA2_INDEX_VERSION_H__ #define __AITHETA2_INDEX_VERSION_H__ namespace aitheta2 { /*! Index Version */ struct IndexVersion { //! Retrieve the version number in string static const char *String(void); //! Retrieve the detailed version information static const char *Details(void); }; } // namespace aitheta2 #endif // __AITHETA2_INDEX_VERSION_H__ ================================================ FILE: deps/thirdparty/.gitignore ================================================ .* *~ bazel-* build/* bin/* lib/* var/* !.git* !.clang-format ================================================ FILE: deps/thirdparty/CMakeLists.txt ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## ## \file CMakeLists.txt ## \author Hechong.xyf ## \date Mar 2018 ## \version 1.0 ## \brief Detail cmake build script (thirdparty) ## cmake_minimum_required(VERSION 3.1 FATAL_ERROR) cmake_policy(SET CMP0048 NEW) project(thirdparty) set(CMAKE_MACOSX_RPATH ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(EXTERNAL_BINARY_DIR ${CMAKE_BINARY_DIR}/external) file(GLOB PATCHES "${CMAKE_CURRENT_SOURCE_DIR}/patches/*.patch") if(PATCHES) foreach(PATCH ${PATCHES}) execute_process( COMMAND patch -p1 --forward --ignore-whitespace WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" INPUT_FILE "${PATCH}" RESULT_VARIABLE RESULT ) if(RESULT EQUAL 0) message(STATUS "Patch applied: ${PATCH}") endif() endforeach() endif() ## EXCLUDE_FROM_ALL add_subdirectory(openssl openssl EXCLUDE_FROM_ALL) add_subdirectory(ncurses ncurses EXCLUDE_FROM_ALL) add_subdirectory(googletest googletest EXCLUDE_FROM_ALL) add_subdirectory(gflags gflags EXCLUDE_FROM_ALL) add_subdirectory(glog glog EXCLUDE_FROM_ALL) add_subdirectory(snappy snappy EXCLUDE_FROM_ALL) add_subdirectory(leveldb leveldb EXCLUDE_FROM_ALL) add_subdirectory(sparsehash sparsehash EXCLUDE_FROM_ALL) add_subdirectory(protobuf protobuf EXCLUDE_FROM_ALL) add_subdirectory(brpc brpc EXCLUDE_FROM_ALL) add_subdirectory(mysql mysql EXCLUDE_FROM_ALL) add_subdirectory(sqlite sqlite EXCLUDE_FROM_ALL) ================================================ FILE: deps/thirdparty/brpc/CMakeLists.txt ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## ## \file CMakeLists.txt ## \author Hechong.xyf ## \date Nov 2020 ## \version 1.0 ## \brief Detail cmake build script for brpc (thirdparty) ## set(GFLAGS_INCLUDE_PATH ${GFLAGS_INCLUDE_DIR}) set(GFLAGS_LIBRARY ${GFLAGS_LIBRARIES}) set(GLOG_INCLUDE_PATH ${GLOG_INCLUDE_DIR}) set(GLOG_LIB ${GLOG_LIBRARY}) set(LEVELDB_INCLUDE_PATH ${LEVELDB_INCLUDE_DIR}) set(LEVELDB_LIB ${LEVELDB_LIBRARY}) set(PROTOC_LIB ${PROTOBUF_PROTOC_LIBRARY}) set(DOWNLOAD_GTEST OFF CACHE BOOL "Disable download gtest in leveldb" FORCE) set(WITH_GLOG ON CACHE BOOL "Enable glog in brpc" FORCE) set(BRPC_FOLDER brpc) add_compile_options(-Wno-shadow -Wno-format -Wno-deprecated-declarations -Wno-sign-compare -Wno-pessimizing-move -Wno-mismatched-tags -Wno-unused-private-field -Wno-unused-local-typedefs -Wno-delete-abstract-non-virtual-dtor -Wno-inconsistent-missing-override) add_subdirectory(${BRPC_FOLDER}) add_dependencies(BUTIL_LIB OpenSSL.SSL OpenSSL.Crypto protoc glog leveldb gflags) add_dependencies(SOURCES_LIB OpenSSL.SSL OpenSSL.Crypto protoc glog leveldb gflags) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${BRPC_FOLDER}/output/include) add_library(brpc UNKNOWN IMPORTED GLOBAL) set_target_properties( brpc PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/${BRPC_FOLDER}/output/include" IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/${BRPC_FOLDER}/output/lib/libbrpc.a" INTERFACE_LINK_LIBRARIES "leveldb;libprotobuf;glog;gflags;OpenSSL.SSL;OpenSSL.Crypto" ) add_dependencies(brpc brpc-static) ================================================ FILE: deps/thirdparty/gflags/CMakeLists.txt ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## ## \file CMakeLists.txt ## \author Hechong.xyf ## \date Nov 2020 ## \version 1.0 ## \brief Detail cmake build script for gflags (thirdparty) ## set(BUILD_TESTING OFF CACHE BOOL "Disable Unit Tests" FORCE) set(GFLAGS_BUILD_TESTING OFF CACHE BOOL "Disable unittest in gflags" FORCE) if(NOT BUILD_SHARED_LIBS) set(GFLAGS_BUILD_SHARED_LIBS OFF) set(GFLAGS_BUILD_STATIC_LIBS ON) else() set(GFLAGS_BUILD_SHARED_LIBS ON) set(GFLAGS_BUILD_STATIC_LIBS OFF) endif() set(GFLAGS_IS_SUBPROJECT ON) add_subdirectory(gflags) get_target_property(gflags_OUTPUT_NAME gflags OUTPUT_NAME) get_target_property(gflags_BINARY_DIR gflags BINARY_DIR) get_target_property(gflags_SOURCE_DIR gflags SOURCE_DIR) get_target_property(gflags_PREFIX gflags PREFIX) get_target_property(gflags_SUFFIX gflags SUFFIX) set(gflags_OUTPUT_DIR ${gflags_BINARY_DIR}) if(NOT BUILD_SHARED_LIBS) if (NOT gflags_PREFIX) set(gflags_PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX}) endif() if (NOT gflags_SUFFIX) set(gflags_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX}) endif() if(CMAKE_ARCHIVE_OUTPUT_DIRECTORY) set(gflags_OUTPUT_DIR ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}) endif() else() if (NOT gflags_PREFIX) set(gflags_PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX}) endif() if (NOT gflags_SUFFIX) set(gflags_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) endif() if(CMAKE_LIBRARY_OUTPUT_DIRECTORY) set(gflags_OUTPUT_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) endif() endif() set(gflags_FOUND TRUE PARENT_SCOPE) set(gflags_INCLUDE_DIR ${gflags_BINARY_DIR}/include PARENT_SCOPE) set(gflags_LIBRARIES ${gflags_OUTPUT_DIR}/${gflags_PREFIX}${gflags_OUTPUT_NAME}${gflags_SUFFIX} PARENT_SCOPE) set(gflags_DIR ${gflags_BINARY_DIR} PARENT_SCOPE) set(GFLAGS_FOUND TRUE PARENT_SCOPE) set(GFLAGS_INCLUDE_DIR ${gflags_BINARY_DIR}/include PARENT_SCOPE) set(GFLAGS_LIBRARIES ${gflags_OUTPUT_DIR}/${gflags_PREFIX}${gflags_OUTPUT_NAME}${gflags_SUFFIX} PARENT_SCOPE) set(GFLAGS_DIR ${gflags_BINARY_DIR} PARENT_SCOPE) ================================================ FILE: deps/thirdparty/glog/CMakeLists.txt ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## ## \file CMakeLists.txt ## \author Hechong.xyf ## \date Nov 2020 ## \version 1.0 ## \brief Detail cmake build script for googletest (thirdparty) ## set(BUILD_TESTING OFF CACHE BOOL "Disable Unit Tests" FORCE) set(WITH_GFLAGS OFF CACHE BOOL "Disable find_package(gflags) in glog" FORCE) set(HAVE_LIB_GFLAGS TRUE CACHE BOOL "") add_compile_options(-Wno-deprecated-declarations) add_subdirectory(glog) add_dependencies(glog gflags) get_target_property(glog_BINARY_DIR glog BINARY_DIR) get_target_property(glog_SOURCE_DIR glog SOURCE_DIR) # get_target_property(GLOG_INCLUDE_DIRS glog INTERFACE_INCLUDE_DIRECTORIES) set(GLOG_INCLUDE_DIRS ${glog_BINARY_DIR} ${glog_SOURCE_DIR}/src) set(GLOG_FOUND TRUE PARENT_SCOPE) set(GLOG_INCLUDE_DIR ${GLOG_INCLUDE_DIRS} PARENT_SCOPE) set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIRS} PARENT_SCOPE) set(GLOG_LIBRARY $ PARENT_SCOPE) set(GLOG_LIBRARIES $ PARENT_SCOPE) ================================================ FILE: deps/thirdparty/googletest/CMakeLists.txt ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## ## \file CMakeLists.txt ## \author Hechong.xyf ## \date Nov 2020 ## \version 1.0 ## \brief Detail cmake build script for glog (thirdparty) ## add_subdirectory(googletest) get_target_property(GTEST_INCLUDE_DIRS gtest INTERFACE_INCLUDE_DIRECTORIES) set(GTEST_FOUND TRUE PARENT_SCOPE) set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} PARENT_SCOPE) set(GTEST_LIBRARIES $ PARENT_SCOPE) set(GTEST_MAIN_LIBRARIES $ PARENT_SCOPE) set(GTEST_BOTH_LIBRARIES $ $ PARENT_SCOPE) ================================================ FILE: deps/thirdparty/leveldb/CMakeLists.txt ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## ## \file CMakeLists.txt ## \author Hechong.xyf ## \date Nov 2020 ## \version 1.0 ## \brief Detail cmake build script for leveldb (thirdparty) ## set(HAVE_TCMALLOC OFF CACHE BOOL "Disable tcmalloc in leveldb" FORCE) set(HAVE_SNAPPY ON CACHE BOOL "Enable snappy in leveldb" FORCE) set(LEVELDB_BUILD_TESTS OFF CACHE BOOL "Disable testing in leveldb" FORCE) set(LEVELDB_BUILD_BENCHMARKS OFF CACHE BOOL "Disable benchmarks in leveldb" FORCE) set(LEVELDB_INSTALL OFF CACHE BOOL "Disable install in leveldb" FORCE) add_subdirectory(leveldb) get_target_property(leveldb_SOURCE_DIR leveldb SOURCE_DIR) set(LEVELDB_FOUND TRUE PARENT_SCOPE) set(LEVELDB_INCLUDE_DIR ${leveldb_SOURCE_DIR}/include PARENT_SCOPE) set(LEVELDB_INCLUDE_DIRS ${leveldb_SOURCE_DIR}/include PARENT_SCOPE) set(LEVELDB_LIBRARY $ PARENT_SCOPE) set(LEVELDB_LIBRARIES $ PARENT_SCOPE) ================================================ FILE: deps/thirdparty/mysql/CMakeLists.txt ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## ## \file CMakeLists.txt ## \author Hechong.xyf ## \date Nov 2020 ## \version 1.0 ## \brief Detail cmake build script for mysql (thirdparty) ## include(ExternalProject) set(MYSQL_INCLUDE_DIR "${EXTERNAL_BINARY_DIR}/usr/local/mysql/include") set(MYSQL_LIBRARY_DIR "${EXTERNAL_BINARY_DIR}/usr/local/mysql/lib/mysql") file(MAKE_DIRECTORY ${MYSQL_INCLUDE_DIR}) file(MAKE_DIRECTORY ${MYSQL_LIBRARY_DIR}) ## https://dev.mysql.com/doc/refman/5.7/en/installing-source-distribution.html list(APPEND CMAKE_CACHE_ARGS -DWITHOUT_SERVER:BOOL=OFF) list(APPEND CMAKE_CACHE_ARGS -DWITH_EMBEDDED_SERVER:BOOL=ON) list(APPEND CMAKE_CACHE_ARGS -DWITH_DEFAULT_FEATURE_SET:BOOL=OFF) list(APPEND CMAKE_CACHE_ARGS -DWITH_SSL:PATH=${OPENSSL_INCLUDE_DIR}/..) list(APPEND CMAKE_CACHE_ARGS -DWITH_DEBUG:BOOL=OFF) list(APPEND CMAKE_CACHE_ARGS -DWITH_LIBEVENT:STRING=bundled) list(APPEND CMAKE_CACHE_ARGS -DWITH_UNIT_TESTS:BOOL=OFF) list(APPEND CMAKE_CACHE_ARGS -DBOOST_INCLUDE_DIR:PATH=/boost/boost_1_59_0) list(APPEND CMAKE_CACHE_ARGS -DCURSES_LIBRARY:PATH=${CURSES_LIBRARY}) list(APPEND CMAKE_CACHE_ARGS -DCURSES_INCLUDE_PATH:PATH=${CURSES_INCLUDE_PATH}) ExternalProject_Add( MySQL.BUILD PREFIX mysql URL "https://downloads.mysql.com/archives/get/p/23/file/mysql-boost-5.7.33.tar.gz" CONFIGURE_COMMAND "${CMAKE_COMMAND}" ${CMAKE_CACHE_ARGS} -G ${CMAKE_GENERATOR} "" BUILD_COMMAND "${CMAKE_COMMAND}" --build . --target mysqlclient -- -j INSTALL_COMMAND "${CMAKE_COMMAND}" -E env DESTDIR=${EXTERNAL_BINARY_DIR} "${CMAKE_COMMAND}" --build ./include --target install COMMAND "${CMAKE_COMMAND}" -E copy "/include/hash.h" "${MYSQL_INCLUDE_DIR}/" COMMAND "${CMAKE_COMMAND}" -E copy "/include/myisampack.h" "${MYSQL_INCLUDE_DIR}/" COMMAND "${CMAKE_COMMAND}" -E copy ./archive_output_directory/libmysqlclient.a "${MYSQL_LIBRARY_DIR}/" COMMAND "${CMAKE_COMMAND}" -E copy ./archive_output_directory/libstrings.a "${MYSQL_LIBRARY_DIR}/" LOG_DOWNLOAD ON LOG_CONFIGURE ON LOG_BUILD ON LOG_INSTALL ON ) add_dependencies(MySQL.BUILD OpenSSL.BUILD) add_dependencies(MySQL.BUILD Ncurses.BUILD) add_library(MySQL.mysqlclient UNKNOWN IMPORTED GLOBAL) set_target_properties( MySQL.mysqlclient PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MYSQL_INCLUDE_DIR}" IMPORTED_LOCATION "${MYSQL_LIBRARY_DIR}/libmysqlclient.a" ) add_dependencies(MySQL.mysqlclient MySQL.BUILD) add_library(MySQL.strings UNKNOWN IMPORTED GLOBAL) set_target_properties( MySQL.strings PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MYSQL_INCLUDE_DIR}" IMPORTED_LOCATION "${MYSQL_LIBRARY_DIR}/libstrings.a" ) add_dependencies(MySQL.strings MySQL.BUILD) ================================================ FILE: deps/thirdparty/ncurses/CMakeLists.txt ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## ## \file CMakeLists.txt ## \author Hechong.xyf ## \date Nov 2020 ## \version 1.0 ## \brief Detail cmake build script for ncurses (thirdparty) ## include(ExternalProject) ExternalProject_Add( Ncurses.BUILD PREFIX ncurses URL "https://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz" CONFIGURE_COMMAND /configure --without-manpages --without-progs --without-tack --without-tests --with-normal --disable-db-install --without-ada --with-build-cc=${CMAKE_C_COMPILER} --with-build-cpp=${CMAKE_CXX_COMPILER} --with-build-cflags=${CMAKE_C_CFLAGS} --with-build-cppflags=${CMAKE_CXX_CFLAGS} BUILD_COMMAND make -j all INSTALL_COMMAND make DESTDIR=${EXTERNAL_BINARY_DIR} install LOG_DOWNLOAD ON LOG_CONFIGURE ON LOG_BUILD ON LOG_INSTALL ON ) set(NCURSES_INCLUDE_DIR ${EXTERNAL_BINARY_DIR}/usr/include) set(NCURSES_LIBRARY_DIR ${EXTERNAL_BINARY_DIR}/usr/lib) set(NCURSES_LIBRARIES ${NCURSES_LIBRARY_DIR}/libcurses.a) set(CURSES_FOUND TRUE PARENT_SCOPE) set(CURSES_INCLUDE_DIRS ${NCURSES_INCLUDE_DIR} PARENT_SCOPE) set(CURSES_LIBRARIES ${NCURSES_LIBRARIES} PARENT_SCOPE) set(CURSES_CFLAGS ${CMAKE_C_COMPILER} PARENT_SCOPE) set(CURSES_HAVE_CURSES_H TRUE PARENT_SCOPE) set(CURSES_HAVE_NCURSES_H TRUE PARENT_SCOPE) set(CURSES_HAVE_NCURSES_NCURSES_H FALSE PARENT_SCOPE) set(CURSES_HAVE_NCURSES_CURSES_H FALSE PARENT_SCOPE) set(CURSES_INCLUDE_DIR ${NCURSES_INCLUDE_DIR} PARENT_SCOPE) set(CURSES_LIBRARY ${NCURSES_LIBRARIES} PARENT_SCOPE) set(CURSES_INCLUDE_PATH ${NCURSES_INCLUDE_DIR} PARENT_SCOPE) ================================================ FILE: deps/thirdparty/openssl/CMakeLists.txt ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## ## \file CMakeLists.txt ## \author Hechong.xyf ## \date Nov 2020 ## \version 1.0 ## \brief Detail cmake build script for openssl (thirdparty) ## set(OPENSSL_INCLUDE_DIR ${EXTERNAL_BINARY_DIR}/usr/local/include) set(OPENSSL_LIBRARY_DIR ${EXTERNAL_BINARY_DIR}/usr/local/lib) set(OPENSSL_CRYPTO_LIBRARY ${OPENSSL_LIBRARY_DIR}/libcrypto.a) set(OPENSSL_SSL_LIBRARY ${OPENSSL_LIBRARY_DIR}/libssl.a) file(MAKE_DIRECTORY ${OPENSSL_INCLUDE_DIR}) file(MAKE_DIRECTORY ${OPENSSL_LIBRARY_DIR}) include(ExternalProject) ExternalProject_Add( OpenSSL.BUILD PREFIX openssl URL "https://www.openssl.org/source/old/1.1.1/openssl-1.1.1i.tar.gz" CONFIGURE_COMMAND /config no-shared no-tests no-ui-console --openssldir=ssl --release BUILD_COMMAND make -j build_libs INSTALL_COMMAND make DESTDIR=${EXTERNAL_BINARY_DIR} LIBDIR=lib install_dev LOG_DOWNLOAD ON LOG_CONFIGURE ON LOG_BUILD ON LOG_INSTALL ON ) set(OPENSSL_FOUND TRUE PARENT_SCOPE) set(OPENSSL_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR} PARENT_SCOPE) set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR} PARENT_SCOPE) set(OPENSSL_SSL_LIBRARY ${OPENSSL_SSL_LIBRARY} PARENT_SCOPE) set(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} PARENT_SCOPE) set(OPENSSL_CRYPTO_LIBRARY ${OPENSSL_CRYPTO_LIBRARY} PARENT_SCOPE) set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY} PARENT_SCOPE) set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} PARENT_SCOPE) set(OPENSSL_VERSION 1.1.1i PARENT_SCOPE) file(MAKE_DIRECTORY ${OPENSSL_INCLUDE_DIR}) add_library(OpenSSL.Crypto UNKNOWN IMPORTED GLOBAL) set_target_properties( OpenSSL.Crypto PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${OPENSSL_INCLUDE_DIR} IMPORTED_LOCATION ${OPENSSL_CRYPTO_LIBRARY} ) add_dependencies(OpenSSL.Crypto OpenSSL.BUILD) add_library(OpenSSL.SSL UNKNOWN IMPORTED GLOBAL) set_target_properties( OpenSSL.SSL PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${OPENSSL_INCLUDE_DIR} IMPORTED_LOCATION ${OPENSSL_SSL_LIBRARY} ) add_dependencies(OpenSSL.SSL OpenSSL.BUILD) ================================================ FILE: deps/thirdparty/patches/brpc.patch ================================================ diff --git a/CMakeLists.txt b/CMakeLists.txt index 3deb7342..2937c8d6 100644 --- a/brpc/brpc/CMakeLists.txt +++ b/brpc/brpc/CMakeLists.txt @@ -141,7 +141,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") endif() endif() -include(FindProtobuf) +# include(FindProtobuf) include(FindThreads) find_path(LEVELDB_INCLUDE_PATH NAMES leveldb/db.h) @@ -433,7 +433,7 @@ if(BUILD_UNIT_TESTS) enable_testing() add_subdirectory(test) endif() -add_subdirectory(tools) +# add_subdirectory(tools) file(COPY ${CMAKE_CURRENT_BINARY_DIR}/brpc/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/output/include/brpc/ diff --git a/src/butil/containers/case_ignored_flat_map.cpp b/src/butil/containers/case_ignored_flat_map.cpp index 7f2fadc5..ce699a9a 100644 --- a/brpc/brpc/src/butil/containers/case_ignored_flat_map.cpp +++ b/brpc/brpc/src/butil/containers/case_ignored_flat_map.cpp @@ -19,7 +19,7 @@ namespace butil { -static const char g_tolower_map_base[] = { +static const signed char g_tolower_map_base[] = { -128, -127, -126, -125, -124, -123, -122, -121, -120, -119, -118, -117, -116, -115, -114, -113, -112, -111, -110, -109, -108, -107, -106, -105, -104, -103, -102, -101, -100, @@ -48,6 +48,6 @@ static const char g_tolower_map_base[] = { 120, 121, 122, 123, 124, 125, 126, 127 }; -extern const char* const g_tolower_map = g_tolower_map_base + 128; +extern const char* const g_tolower_map = (const char*)g_tolower_map_base + 128; } // namespace butil ================================================ FILE: deps/thirdparty/protobuf/CMakeLists.txt ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## ## \file CMakeLists.txt ## \author Hechong.xyf ## \date Nov 2020 ## \version 1.0 ## \brief Detail cmake build script for protobuf (thirdparty) ## set(protobuf_BUILD_TESTS OFF CACHE BOOL "Disable testing in protobuf" FORCE) set(protobuf_WITH_ZLIB ON CACHE BOOL "Disable zlib support in protobuf" FORCE) add_subdirectory(protobuf/cmake protobuf) get_target_property(libprotobuf_SOURCE_DIR libprotobuf SOURCE_DIR) get_filename_component(libprotobuf_INCLUDE_DIR ${libprotobuf_SOURCE_DIR}/../src ABSOLUTE) # set(Protobuf_FOUND TRUE PARENT_SCOPE) # set(Protobuf_INCLUDE_DIR ${libprotobuf_INCLUDE_DIR} PARENT_SCOPE) # set(Protobuf_INCLUDE_DIRS ${libprotobuf_INCLUDE_DIR} PARENT_SCOPE) # set(Protobuf_LIBRARY $ PARENT_SCOPE) # set(Protobuf_LIBRARIES $ PARENT_SCOPE) # set(Protobuf_LITE_LIBRARY $ PARENT_SCOPE) # set(Protobuf_LITE_LIBRARIES $ PARENT_SCOPE) # set(Protobuf_PROTOC_LIBRARY $ PARENT_SCOPE) # set(Protobuf_PROTOC_LIBRARIES $ PARENT_SCOPE) # set(Protobuf_PROTOC_EXECUTABLE $ PARENT_SCOPE) set(PROTOBUF_FOUND TRUE PARENT_SCOPE) set(PROTOBUF_INCLUDE_DIR ${libprotobuf_INCLUDE_DIR} PARENT_SCOPE) set(PROTOBUF_INCLUDE_DIRS ${libprotobuf_INCLUDE_DIR} PARENT_SCOPE) set(PROTOBUF_LIBRARY $ PARENT_SCOPE) set(PROTOBUF_LIBRARIES $ PARENT_SCOPE) set(PROTOBUF_LITE_LIBRARY $ PARENT_SCOPE) set(PROTOBUF_LITE_LIBRARIES $ PARENT_SCOPE) set(PROTOBUF_PROTOC_LIBRARY $ PARENT_SCOPE) set(PROTOBUF_PROTOC_LIBRARIES $ PARENT_SCOPE) set(PROTOBUF_PROTOC_EXECUTABLE $ PARENT_SCOPE) ================================================ FILE: deps/thirdparty/snappy/CMakeLists.txt ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## ## \file CMakeLists.txt ## \author Hechong.xyf ## \date Nov 2020 ## \version 1.0 ## \brief Detail cmake build script for leveldb (thirdparty) ## set(SNAPPY_BUILD_TESTS OFF CACHE BOOL "Disable testing in snappy" FORCE) set(SNAPPY_INSTALL OFF CACHE BOOL "Disable install in snappy" FORCE) add_subdirectory(snappy) ================================================ FILE: deps/thirdparty/sparsehash/CMakeLists.txt ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## ## \file CMakeLists.txt ## \author Hechong.xyf ## \date Nov 2020 ## \version 1.0 ## \brief Detail cmake build script for glog (thirdparty) ## add_library(sparsehash INTERFACE) target_include_directories( sparsehash INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/sparsehash/src/" ) ================================================ FILE: deps/thirdparty/sqlite/CMakeLists.txt ================================================ ## ## Copyright (C) The Software Authors. All rights reserved. ## ## \file CMakeLists.txt ## \author Hechong.xyf ## \date Mar 2018 ## \version 1.0 ## \brief Detail cmake build script (sqlite) ## cmake_minimum_required(VERSION 3.1) cmake_policy(SET CMP0048 NEW) project(sqlite) # sqlite source folder http_archive( NAME sqlite URL https://sqlite.org/2021/sqlite-amalgamation-3360000.zip PATH sqlite-3.36.0 ) set(SQLITE_FOLDER sqlite-3.36.0) find_package(Threads REQUIRED) add_library(sqlite STATIC ${SQLITE_FOLDER}/sqlite3.c) target_link_libraries(sqlite ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}) target_include_directories(sqlite PUBLIC ${SQLITE_FOLDER}) add_executable(sqlite_shell ${SQLITE_FOLDER}/shell.c) target_link_libraries(sqlite_shell sqlite) ================================================ FILE: scripts/README.md ================================================ ================================================ FILE: scripts/conf/proxima_be.conf ================================================ common_config { grpc_listen_port: 16000 http_listen_port: 16001 } query_config { query_thread_count: 8 } ================================================ FILE: scripts/conf/proxima_se.conf ================================================ common_config { log_directory: "/var/lib/proxima-se/log/" metrics_config { name: "bvar" } grpc_listen_port: 16000 http_listen_port: 16001 } index_config { index_directory: "/var/lib/proxima-se/data/" } meta_config { meta_uri: "sqlite:///var/lib/proxima-se/data/proxima_se.sqlite" } ================================================ FILE: scripts/gcc4.9-build.sh ================================================ #!/bin/bash type=$1 arch=$2 eval $(ssh-agent -s) chmod 600 .gitrsa && ssh-add .gitrsa workdir=build/gcc4.9-$arch mkdir -p $workdir rsync -av . $workdir --exclude=build --exclude=.git || exit 1 cd $workdir cmake -DCMAKE_BUILD_TYPE=$type -DENABLE_${arch^^}=ON . || exit 1 cmake --build . --target all -- -j || exit 1 ================================================ FILE: scripts/gcc4.9-unittest.sh ================================================ #!/bin/bash arch=$1 workdir=build/gcc4.9-$arch cd $workdir || exit 1 env ASAN_OPTIONS=detect_leaks=1 cmake --build . --target unittest -- -j || exit 1 ================================================ FILE: scripts/gcc8.3-build.sh ================================================ #!/bin/bash export PATH=/usr/local/gcc-8.3.0/bin:/opt/cmake/bin/:$PATH export LD_LIBRARY_PATH=/usr/local/gcc-8.3.0/lib64 export CC=/usr/local/gcc-8.3.0/bin/gcc export CXX=/usr/local/gcc-8.3.0/bin/g++ $CC --version type=$1 arch=$2 eval $(ssh-agent -s) chmod 600 .gitrsa && ssh-add .gitrsa workdir=build/gcc8.3-$arch mkdir -p $workdir rsync -av . $workdir --exclude=build --exclude=.git || exit 1 cd $workdir cmake -DCMAKE_BUILD_TYPE=$type -DENABLE_${arch^^}=ON -DENABLE_LOCAL_INTEGRATION=ON. || exit 1 cmake --build . --target all -- -j || exit 1 ================================================ FILE: scripts/gcc8.3-integration.sh ================================================ #!/bin/bash export PATH=/usr/local/gcc-8.3.0/bin:/opt/cmake/bin/:$PATH export LD_LIBRARY_PATH=/usr/local/gcc-8.3.0/lib64 export CC=/usr/local/gcc-8.3.0/bin/gcc export CXX=/usr/local/gcc-8.3.0/bin/g++ arch=$1 workdir=build/gcc8.3-$arch cd $workdir || exit 1 env ASAN_OPTIONS=detect_leaks=1,verify_asan_link_order=0 cmake --build . --target integration -- -j || exit 1 ================================================ FILE: scripts/gcc8.3-unittest.sh ================================================ #!/bin/bash export PATH=/usr/local/gcc-8.3.0/bin:/opt/cmake/bin/:$PATH export LD_LIBRARY_PATH=/usr/local/gcc-8.3.0/lib64 export CC=/usr/local/gcc-8.3.0/bin/gcc export CXX=/usr/local/gcc-8.3.0/bin/g++ arch=$1 workdir=build/gcc8.3-$arch cd $workdir || exit 1 env ASAN_OPTIONS=detect_leaks=1,verify_asan_link_order=0 cmake --build . --target unittest -- -j || exit 1 ================================================ FILE: scripts/gcov.sh ================================================ #!/bin/bash project_name=proxima-be gcov_tool=gcov zip_html=false output_name=html script_dir=$(cd "$(dirname "$0")"; pwd) source_base=$(dirname "$script_dir") filter_list="'*/tests/*' '*/thirdparty/*' '*/deps/*' '*/proto/*' '*/external/*'" while getopts t:p:o:z option; do case "$option" in t) gcov_tool=$OPTARG;; p) project_name=$OPTARG;; o) output_name=$OPTARG;; z) zip_html=true;; esac done # Process sources lcov -c -b "$source_base" -d . -o $project_name.lcov.info --gcov-tool=$gcov_tool --no-external || exit 1 eval $(echo lcov -r $project_name.lcov.info -o $project_name-filtered.lcov.info $filter_list) || exit 1 # Gather HTML files genhtml -t "$project_name" -o $output_name $project_name-filtered.lcov.info || exit 1 rm -rf *.lcov.info # Zip HTML files if $zip_html ; then zip -r $output_name.zip $output_name/ fi ================================================ FILE: scripts/hooks/clang-format.sh ================================================ #!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" . $DIR/common.sh ignore_merge check_clang_version updated= for file in `git show --pretty="format:" --name-only HEAD` ; do if ! [[ "$file" =~ $CPP_PATTERN ]]; then #echo "non cpp $file" continue fi # ignore deleted file if ! [ -f $file ]; then #echo "deleted $file" continue fi # ignore modified file if [ -n "`git status -s $file `" ]; then #echo "modified $file" continue fi clang-format -i "${file}" updated="${file} $updated" done if [ -n "$updated" ]; then if [ -n "`git status -s $updated `" ]; then git commit --amend -C HEAD --no-verify $updated fi fi ================================================ FILE: scripts/hooks/common.sh ================================================ #!/bin/bash check_clang_version() { if ! hash clang-format 2> /dev/null; then echo 'clang-format not installed' echo 'Maybe run `yum install -y ob-clang`' exit fi version=$(clang-format --version | awk '{print $3}' | awk -F. '{print $1}') if [ "$version" -le 5 ]; then echo 'clang-format too old' echo 'Maybe run `yum install -y ob-clang`' exit fi } ignore_merge() { # ignore merge request if git rev-parse MERGE_HEAD >/dev/null 2>&1; then exit fi } CPP_PATTERN="(src|tests)/.*\.(c|h|cpp|cc)$" ================================================ FILE: scripts/hooks/post-commit ================================================ #!/bin/bash if ! [ -f .commit ]; then # not trigerred by user commit, exit exit fi rm -f .commit ./scripts/hooks/clang-format.sh ================================================ FILE: scripts/hooks/pre-commit ================================================ #!/bin/bash # create a tag file to notify post-commit touch .commit ================================================ FILE: scripts/install-git-hooks.sh ================================================ #!/bin/bash if [ -d .git/hooks ]; then for f in pre-commit post-commit do ln -snf ../../scripts/hooks/$f .git/hooks/$f done fi ================================================ FILE: sdk/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author haichao.chc ## \date Oct 2020 ## \brief Detail cmake build script ## include(../cmake/bazel.cmake) cc_directory(cpp) ================================================ FILE: sdk/cpp/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author haichao.chc ## \date Oct 2020 ## \brief Detail cmake build script ## include (../../cmake/bazel.cmake) git_version(PROXIMA_BE_CLIENT_VERSION ${CMAKE_CURRENT_SOURCE_DIR}) if(APPLE) set(APPLE_FRAMEWORK_LIBS -framework CoreFoundation -framework CoreGraphics -framework CoreData -framework CoreText -framework Security -framework Foundation -Wl,-U,_MallocExtension_ReleaseFreeMemory -Wl,-U,_ProfilerStart -Wl,-U,_ProfilerStop -Wl,-U,_RegisterThriftProtocol ) endif() cc_library( NAME proxima_search_client STATIC SHARED STRICT PACKED SRCS src/*.cc LIBS proxima_be_proto proxima_be_common brpc proxima ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} INCS . .. ./include/ ../../src/ PUBINCS ./include/ LDFLAGS ${APPLE_FRAMEWORK_LIBS} VERSION "${PROXIMA_BE_CLIENT_VERSION}" ) cc_binary( NAME client_example STRICT SRCS examples/client_example.cc LIBS proxima_search_client INCS . .. ./include/ ) set_target_properties(client_example PROPERTIES INSTALL_RPATH ${LIB_PATH}) ================================================ FILE: sdk/cpp/README.txt ================================================ ================================================ FILE: sdk/cpp/examples/client_example.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Example usage of proxima client */ #include #include "proxima_search_client.h" using namespace proxima::be; int main() { // Create a client instance ProximaSearchClientPtr client = ProximaSearchClient::Create(); // Try to connect server { ChannelOptions options("127.0.0.1:16000"); Status status = client->connect(options); if (status.code != 0) { std::cerr << "Connect server failed. code[" << status.code << "] reason[" << status.reason << "]" << std::endl; return status.code; } std::cout << "===>Connect server success." << std::endl; } // Create collection { // Describe a collection config which // set collection name --> "test_collection" // set one index column --> "test_column" // set two forward columsn --> "fwd_column1" and "fwd_column2" CollectionConfig config; config.collection_name = "test_collection"; config.forward_columns = {"fwd_column1", "fwd_column2"}; config.index_columns = { IndexColumnParam("test_column", DataType::VECTOR_FP32, 8)}; Status status = client->create_collection(config); if (status.code != 0) { std::cerr << "Create collection failed. code[" << status.code << "] reason[" << status.reason << "]" << std::endl; return status.code; } std::cout << "===>Create collection success." << std::endl; } // Get collection information { CollectionInfo collection_info; Status status = client->describe_collection("test_collection", &collection_info); if (status.code != 0) { std::cerr << "Describe collection failed. code[" << status.code << "] reason[" << status.reason << "]" << std::endl; return status.code; } std::cout << "===>Describe collection success." << std::endl; std::cout << "collection_name: " << collection_info.collection_name << std::endl; std::cout << "collection_status: " << (int)collection_info.collection_status << std::endl; std::cout << "collection_uuid: " << collection_info.collection_uuid << std::endl; for (size_t i = 0; i < collection_info.forward_columns.size(); i++) { std::cout << "forward_column: " << collection_info.forward_columns[i] << std::endl; } for (size_t i = 0; i < collection_info.index_columns.size(); i++) { IndexColumnParam &index_param = collection_info.index_columns[i]; std::cout << "index_column: " << index_param.column_name << std::endl; std::cout << "index_type: " << (int)index_param.index_type << std::endl; std::cout << "data_type: " << (int)index_param.data_type << std::endl; std::cout << "dimension: " << index_param.dimension << std::endl; } } // Insert records { WriteRequestPtr write_request = WriteRequest::Create(); write_request->set_collection_name("test_collection"); // Set row meta first, just decribe the format of sending records // Make sure the sort of forward columns and index columns match // upper CollectionConfig's sort. write_request->add_forward_columns({"fwd_column1", "fwd_column2"}); write_request->add_index_column("test_column", DataType::VECTOR_FP32, 8); for (int i = 0; i < 10; i++) { WriteRequest::RowPtr row = write_request->add_row(); row->set_primary_key(i); row->set_operation_type(OperationType::INSERT); row->add_index_value({i + 0.1f, i + 0.2f, i + 0.3f, i + 0.4f, i + 0.5f, i + 0.6f, i + 0.7f, i + 0.8f}); // "test_column" row->add_forward_value("hello" + std::to_string(i)); // "fwd_column1" row->add_forward_value(1); // "fwd_column2" } Status status = client->write(*write_request); if (status.code != 0) { std::cerr << "Write records failed. code[" << status.code << "] reason[" << status.reason << "]" << std::endl; return status.code; } std::cout << "===>Write records success." << std::endl; } // Get document by key { GetDocumentRequestPtr get_document_request = GetDocumentRequest::Create(); GetDocumentResponsePtr get_document_response = GetDocumentResponse::Create(); get_document_request->set_collection_name("test_collection"); get_document_request->set_primary_key(0); Status status = client->get_document_by_key(*get_document_request, get_document_response.get()); if (status.code != 0) { std::cerr << "Get document by key failed. code[" << status.code << "] reason[" << status.reason << "]" << std::endl; return status.code; } std::cout << "===>Get document by key success." << std::endl; auto doc = get_document_response->document(); std::cout << "doc_key: " << doc->primary_key() << std::endl; } // Query records { QueryRequestPtr query_request = QueryRequest::Create(); QueryResponsePtr query_response = QueryResponse::Create(); query_request->set_collection_name("test_collection"); QueryRequest::KnnQueryParamPtr knn_param = query_request->add_knn_query_param(); knn_param->set_column_name("test_column"); knn_param->set_topk(10); knn_param->set_features({0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8}); Status status = client->query(*query_request, query_response.get()); if (status.code != 0) { std::cerr << "Query records failed. code[" << status.code << "] reason[" << status.reason << "]" << std::endl; return status.code; } std::cout << "===>Query records success." << std::endl; for (size_t i = 0; i < query_response->result_count(); i++) { auto result = query_response->result(i); for (size_t j = 0; j < result->document_count(); j++) { auto doc = result->document(j); std::cout << "doc_key: " << doc->primary_key() << std::endl; std::cout << "doc_score: " << doc->score() << std::endl; std::string fwd_val1; int fwd_val2; doc->get_forward_value("fwd_column1", &fwd_val1); doc->get_forward_value("fwd_column2", &fwd_val2); std::cout << "forward count: " << doc->forward_count() << std::endl; std::cout << "fwd_column1: " << fwd_val1 << std::endl; std::cout << "fwd_column2: " << fwd_val2 << std::endl; } } // Print end } // Drop collection { Status status = client->drop_collection("test_collection"); if (status.code != 0) { std::cerr << "Drop collection failed. code[" << status.code << "] reason[" << status.reason << "]" << std::endl; return status.code; } std::cout << "===>Drop collection success" << std::endl; } } ================================================ FILE: sdk/cpp/include/proxima_search_client.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Abstract class to describe proxima client interface and action. * You can get more details usage from examples */ #pragma once #include #include #include namespace proxima { namespace be { struct Status; struct ChannelOptions; struct CollectionConfig; struct CollectionInfo; struct CollectionStats; class WriteRequest; class QueryRequest; class Document; class QueryResponse; class GetDocumentRequest; class GetDocumentResponse; class ProximaSearchClient; using ProximaSearchClientPtr = std::shared_ptr; /** * ProximaSearchClient wrappers the operations used to call proxima search * engine's service. Server may be running on another machines. It shields * implementation of communication protocol and rpc details, and provide * extremely high bench performance. * * Usage exp: * auto client = ProximaSearchClient::Create(); * if (client != nullptr) { * client->connect(ChannelOptions("127.0.0.1:16000")); * ... * client->create_collection(); * client->close(); * } * * Please read the examples/client_example.cc for more details. * * Note: the functions of this class are sync call. */ class ProximaSearchClient { public: //! Destructor virtual ~ProximaSearchClient() = default; /// @brief Create a client instance and return its shared ptr. /// /// @param type Client type, support "GrpcClient" and "HttpClient" now. /// @return Shared ptr pointed to client impl. /// /// @note If input type is wrong, it may return nullptr static ProximaSearchClientPtr Create(const std::string &type); //! Create a shared ptr of client with default type static ProximaSearchClientPtr Create(); /// @brief Try to connect remote server and establish connection. /// /// @param options Socket connection relative configs. /// @return Status.code 0 means success, other means fail /// /// @note This function will try to send a list collections command /// to test if the server alive. virtual Status connect(const ChannelOptions &options) = 0; //! Close connection to remote server and cleanup self virtual Status close() = 0; /// @brief Create a collection with specific config. /// /// @param config Collection config /// @return Status.code 0 means success, other means fail virtual Status create_collection(const CollectionConfig &config) = 0; /// @brief Drop a collection with specific name. /// /// @param collection_name Collection name /// @return Status.code 0 means success, other means fail virtual Status drop_collection(const std::string &collection_name) = 0; /// @brief Show the detailed information of collection. /// /// @param[in] collection_name Collection name /// @param[out] collection_info Collection information /// @return Status.code 0 means success, other means fail virtual Status describe_collection(const std::string &collection_name, CollectionInfo *collection_info) = 0; /// @brief Get collection statics. /// /// @param[in] collection_name Collection name /// @param[out] stats Collection statistics struct /// @return Status.code 0 means success, other means fail. virtual Status stats_collection(const std::string &collection_name, CollectionStats *stats) = 0; /// @brief List all collections. /// /// @param[out] collections Collection infomations /// @return Status.code 0 means success, other means fail virtual Status list_collections(std::vector *collections) = 0; /// @brief Insert/Update/Delete records. /// /// @param request Write request /// @return Status.code means success, other means fail virtual Status write(const WriteRequest &request) = 0; /// @brief Knn query similar results /// /// @param[in] request Query request /// @param[out] respnose Query response /// @return Status.code means success, other means fail virtual Status query(const QueryRequest &request, QueryResponse *response) = 0; /// @brief Get document by primary key /// /// @param[in] request Get document request /// @param[out] response Get document response /// @return Status.code means success, other means fail virtual Status get_document_by_key(const GetDocumentRequest &request, GetDocumentResponse *response) = 0; }; /** * IndexColumn's index type, only supports PROXIMA_GRAPH_INDEX for vector. */ enum class IndexType : uint32_t { UNDEFINED = 0, PROXIMA_GRAPH_INDEX = 1 }; /** * Supported input data type. */ enum class DataType : uint32_t { UNDEFINED = 0, BINARY = 1, STRING = 2, BOOL = 3, INT32 = 4, INT64 = 5, UINT32 = 6, UINT64 = 7, FLOAT = 8, DOUBLE = 9, VECTOR_BINARY32 = 20, VECTOR_BINARY64 = 21, VECTOR_FP16 = 22, VECTOR_FP32 = 23, VECTOR_FP64 = 24, VECTOR_INT4 = 25, VECTOR_INT8 = 26, VECTOR_INT16 = 27 }; /** * Operation type of records. */ enum class OperationType : uint32_t { INSERT = 0, UPDATE = 1, DELETE = 2 }; /** * Status struct wrappers remote server's response. */ struct Status { /// Response error code /// 0 means success /// ~0 means error int code{0U}; /// Response error message, default is "Success" std::string reason{"Success"}; }; /** * ChannelOptions represents the connection config. */ struct ChannelOptions { /// Host name of proxima be server /// For exapmle: "127.0.0.1:16000" /// Required field std::string host{}; /// Max rpc duration out over server /// Optional field, default 1000 uint32_t timeout_ms{1000U}; /// Max retry times when rpc failed /// Optional filed, default 3 uint32_t max_retry{3U}; /// Connection pool count /// Optional filed, default 1 uint32_t connection_count{1}; ChannelOptions(const std::string &val) : host(val) {} }; /** * Common key-value pair struct */ struct KVPair { std::string key{}; std::string value{}; }; /** * IndexColumnParam represents the index config of index column. */ struct IndexColumnParam { /// Column name /// Required field std::string column_name{}; /// Column index type /// Optional field, default IndexType::PROXIMA_GRAPH_INDEX IndexType index_type{IndexType::PROXIMA_GRAPH_INDEX}; /// Stored data type /// Optional filed, default DataType::VECTOR_FP32 DataType data_type{DataType::VECTOR_FP32}; /// Stored data dimension /// Optional filed, default 0 uint32_t dimension{0U}; /// Extra params for column index /// Optional field /// For example: /// {"ef_construction": "400", "ef_search": "300"} std::vector extra_params{}; IndexColumnParam() = default; IndexColumnParam(const std::string &val1, DataType val2, uint32_t val3) : column_name(val1), data_type(val2), dimension(val3) {} }; /** * DatabaseRepository represents database config which stores * source data, it's like some kind of ETL config. */ struct DatabaseRepository { /// Repository name, make sure it's unique /// Required field std::string repository_name{}; /// Database connection uri, like JDBC string format /// Required field std::string connection_uri{}; /// Table name in database /// Required field std::string table_name{}; /// User name which connect to database /// Optional field, default empty std::string user{}; /// Password relative to user name /// Optional password, default empty std::string password{}; }; /** * CollectionConfig describes the config options of collection. * It includes description of index columns and forward columns. * Index columns means that this column data is for knn searching. * Forward columns means that this column data is just for display, * which is not anticipating in search process. */ struct CollectionConfig { /// Collection name, it should be unique /// Required field std::string collection_name{}; /// Collection will split into serveral segments /// This param means max doc limits in one segment /// Optional field, default 0, means no limit uint32_t max_docs_per_segment{0U}; /// Forward column names /// Optional field std::vector forward_columns{}; /// Index column infos /// Required filed std::vector index_columns{}; /// Database repository config /// Optional field, default empty DatabaseRepository database_repository{}; }; /** * CollectionInfo describes the detailed information of collection, * which is ProximaSE server returned. */ struct CollectionInfo { enum class CollectionStatus : uint32_t { INITIALIZED = 0, SERVING = 1, DRPPED = 2 }; //! Collection name std::string collection_name{}; //! Collection status CollectionStatus collection_status{CollectionStatus::INITIALIZED}; //! Unique uuid to a collection std::string collection_uuid{}; //! Latest record's log sequence number uint64_t latest_lsn{0U}; //! Latest record's lsn context std::string latest_lsn_context{}; //! Server magic number, generally is server started timestamp uint64_t magic_number{0U}; //! Collection's config max doc number per segment uint32_t max_docs_per_segment{0U}; //! Collection's forward column names std::vector forward_columns{}; //! Collection's index column params std::vector index_columns{}; //! Collection's database repository information DatabaseRepository database_repository{}; }; /** * CollectionStats describes the detailed stastistics of collection */ struct CollectionStats { /** * Segment state */ enum class SegmentState : uint32_t { CREATED = 0, WRITING = 1, DUMPING = 2, COMPACTING = 3, PERSIST = 4 }; /* * SegmentStats describes the detailed stastistics of segment */ struct SegmentStats { //! Segment unique id uint64_t segment_id{0U}; //! Segment state SegmentState segment_state{SegmentState::CREATED}; //! Document count in this segment uint64_t doc_count{0U}; //! Index file count of this segment uint64_t index_file_count{0U}; //! Totaol index file size uint64_t index_file_size{0U}; //! Min document id uint64_t min_doc_id{0U}; //! Max document id uint64_t max_doc_id{0U}; //! Min primary key value of the segment uint64_t min_primary_key{0U}; //! Min primary key value of the segment uint64_t max_primary_key{0U}; //! Earliest record timestamp uint64_t min_timestamp{0U}; //! Last record timestamp uint64_t max_timestamp{0U}; //! Minimal log sequence number uint64_t min_lsn{0U}; //! Maximum log sequence number uint64_t max_lsn{0U}; }; //! Collection name std::string collection_name{}; //! Total document count of this collection uint64_t total_doc_count{0U}; //! Total segment count of this collectoin uint64_t total_segment_count{0U}; //! Total index file count uint64_t total_index_file_count{0U}; //! Total index file size uint64_t total_index_file_size{0U}; //! Detailed segment stastistics std::vector segment_stats{}; }; using WriteRequestPtr = std::shared_ptr; /** * WriteRequest shows how to wrapper write request data fields. * * Usage exp: * WriteRequestPtr request = WriteRequest::Create(); * request->set_collection_name("test_collection"); * request->set_row_meta({"test_column"}, {}); * auto row = request->add_row(); * row->set_primary_key = 123; * row->set_operation_type(OperationType::OP_INSERT); * row->add_index_value({0.1, 0.2, 0.3}); * ... * client->write(*request); */ class WriteRequest { public: /** * A row describes the format of one record */ class Row { public: //! Destructor virtual ~Row() = default; //! Set primary key, required virtual void set_primary_key(uint64_t val) = 0; //! Set operation type, optional, default DataType::INSERT virtual void set_operation_type(OperationType op_type) = 0; //! Set lsn, optional, default 0 virtual void set_lsn(uint64_t lsn) = 0; //! Set lsn context, optional, default "" virtual void set_lsn_context(const std::string &lsn_context) = 0; /// @brief Add forward value with string type /// /// @note Add forward value sort must match configured /// forward columns in CollectionConfig virtual void add_forward_value(const std::string &val) = 0; //! Add forward value with bool type virtual void add_forward_value(bool val) = 0; //! Add forward value with int32 type virtual void add_forward_value(int32_t val) = 0; //! Add forward value with int64 type virtual void add_forward_value(int64_t val) = 0; //! Add forward value with uint32 type virtual void add_forward_value(uint32_t val) = 0; //! Add forward value with uint64 type virtual void add_forward_value(uint64_t val) = 0; //! Add forward value with float type virtual void add_forward_value(float val) = 0; //! Add forward value with double type virtual void add_forward_value(double val) = 0; /// @brief Add index value, vector bytes type /// /// @note Add index value sort must match configured /// index columns in CollectionConfig virtual void add_index_value(const void *val, size_t val_len) = 0; //! Add index value, vector array type virtual void add_index_value(const std::vector &val) = 0; /// Add index value by json format /// Two json format: /// "[0.1, 0.2, 0.3, 0.4]" /// "[[0.1, 0.2, 0.3, 0.4], [0.5, 0.6, 0.7, 0.8]]" virtual void add_index_value_by_json(const std::string &json_val) = 0; }; using RowPtr = std::shared_ptr; public: //! Constructor static WriteRequestPtr Create(); //! Destructor virtual ~WriteRequest() = default; //! Set collection name, required, must be unique virtual void set_collection_name(const std::string &val) = 0; /// @brief Add forward column in row meta /// @note Forward column names' sort must match configured /// forward columns in CollectionConfig virtual void add_forward_column(const std::string &column_name) = 0; /// @brief Add forward columns in row meta /// @note Forward column names' sort must match configured /// forward columns in CollectionConfig virtual void add_forward_columns( const std::vector &column_names) = 0; /// @brief Add index column in row meta /// /// @param column_name Column name /// @param data_type Send data type /// @param dimension Send data dimension /// /// @note Index column names' sort must match configured /// index columns in CollectionConfig virtual void add_index_column(const std::string &column_name, DataType data_type, uint32_t dimension) = 0; //! Add row data, required, can't send empty request virtual WriteRequest::RowPtr add_row() = 0; //! Set request id for tracelog, optional virtual void set_request_id(const std::string &request_id) = 0; //! Set magic number for validation, optional virtual void set_magic_number(uint64_t magic_number) = 0; }; using QueryRequestPtr = std::shared_ptr; /** * QueryRequest shows how to wrapper query data fields. * * Usage exp: * QueryRequestPtr request = QueryRequest::Create(); * request->set_collection_name("test_colletion"); * auto knn_param = request->add_knn_query_param(); * knn_param->set_column_name("test_column"); * knn_param->set_features({0.1, 0.2, 0.3, 0.4}); * knn_param->set_batch_count(1); * knn_param->set_dimension(4); * knn_param->set_data_type(DT_VECTOR_FP32); * ... * */ class QueryRequest { public: /** * KnnQueryParam describes the options of knn query */ class KnnQueryParam { public: // Destructor virtual ~KnnQueryParam() = default; //! Set column name, required virtual void set_column_name(const std::string &val) = 0; //! Set topk, required virtual void set_topk(uint32_t val) = 0; /// Set query vector with bytes format by single /// Required set virtual void set_features(const void *val, size_t val_len) = 0; //! Set features with vector array format by single virtual void set_features(const std::vector &val) = 0; //! Set query vector with bytes format by batch virtual void set_features(const void *val, size_t val_len, uint32_t batch) = 0; /// Set features by json format /// Two json format: /// "[0.1, 0.2, 0.3, 0.4]" /// "[[0.1, 0.2, 0.3, 0.4], [0.5, 0.6, 0.7, 0.8]]" virtual void set_features_by_json(const std::string &json_val) = 0; //! Set features by json format and by batch virtual void set_features_by_json(const std::string &json_val, uint32_t batch) = 0; //! Set vector data dimension, required virtual void set_dimension(uint32_t val) = 0; //! Set vector data type, required virtual void set_data_type(DataType val) = 0; //! Set search radius, optional, default 0.0f not open virtual void set_radius(float val) = 0; //! Set if use linear search, optional, default false virtual void set_linear(bool val) = 0; //! Add extra params, like ef_search ..etc, optional virtual void add_extra_param(const std::string &key, const std::string &val) = 0; }; using KnnQueryParamPtr = std::shared_ptr; public: //! Constructor static QueryRequestPtr Create(); //! Destructor virtual ~QueryRequest() = default; //! Set collection name, required virtual void set_collection_name(const std::string &val) = 0; //! Set knn query param, required virtual QueryRequest::KnnQueryParamPtr add_knn_query_param() = 0; //! Set debug mode, optional, default false virtual void set_debug_mode(bool val) = 0; }; using DocumentPtr = std::shared_ptr; /** * Document shows the format of knn query response */ class Document { public: //! Destructor virtual ~Document() = default; //! Return document primary key virtual uint64_t primary_key() const = 0; //! Return calculated knn distance score virtual float score() const = 0; //! Return forward values count virtual size_t forward_count() const = 0; //! Get forward names virtual void get_forward_names( std::vector *forward_names) const = 0; //! Get forward value with string type virtual void get_forward_value(const std::string &key, std::string *val) const = 0; //! Get forward value with bool type virtual void get_forward_value(const std::string &key, bool *val) const = 0; //! Get forward value with int32 type virtual void get_forward_value(const std::string &key, int32_t *val) const = 0; //! Get forward value with int64 type virtual void get_forward_value(const std::string &key, int64_t *val) const = 0; //! Get forward value with uint32 type virtual void get_forward_value(const std::string &key, uint32_t *val) const = 0; //! Get forward value with uint64 type virtual void get_forward_value(const std::string &key, uint64_t *val) const = 0; //! Get forward value with float type virtual void get_forward_value(const std::string &key, float *val) const = 0; //! Get forward value with double type virtual void get_forward_value(const std::string &key, double *val) const = 0; }; using QueryResponsePtr = std::shared_ptr; /** * QueryResponse shows the format of query response. */ class QueryResponse { public: /** * Result represents a knn query's result */ class Result { public: //! Destructor virtual ~Result() = default; //! Return document count virtual size_t document_count() const = 0; //! Return document pointer of specific pos virtual DocumentPtr document(int index) const = 0; }; using ResultPtr = std::shared_ptr; public: //! Constructor static QueryResponsePtr Create(); //! Destructor virtual ~QueryResponse() = default; //! Return debug info virtual const std::string &debug_info() const = 0; //! Return query latency, microseconds virtual uint64_t latency_us() const = 0; //! Return batch result count virtual size_t result_count() const = 0; //! Return result pointer of specific batch pos virtual QueryResponse::ResultPtr result(int index) const = 0; }; using GetDocumentRequestPtr = std::shared_ptr; /* * GetDocumentRequest shows the format of get document request. * * Usage exp: * GetDocumentRequestPtr request = GetDocumentRequest::Create(); * request->set_collection_name("test_collection"); * request->set_primary_key(123); * ... */ class GetDocumentRequest { public: //! Constructor static GetDocumentRequestPtr Create(); //! Destructor virtual ~GetDocumentRequest() = default; //! Set collection name, required virtual void set_collection_name(const std::string &val) = 0; //! Set primary key, required virtual void set_primary_key(uint64_t val) = 0; //! Set debug mode, optional, default false virtual void set_debug_mode(bool val) = 0; }; using GetDocumentResponsePtr = std::shared_ptr; /* * GetDocumentResponse shows the format of get document response */ class GetDocumentResponse { public: //! Constructor static GetDocumentResponsePtr Create(); //! Destructor virtual ~GetDocumentResponse() = default; //! Return debug info virtual const std::string &debug_info() const = 0; //! Return document that found virtual DocumentPtr document() const = 0; }; } // end namespace be } // end namespace proxima ================================================ FILE: sdk/cpp/src/grpc_client.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation with grpc protocol protocol */ #include "grpc_client.h" #include #include #include "version.h" namespace proxima { namespace be { Status GrpcProximaSearchClient::connect(const ChannelOptions &options) { Status status; brpc::ChannelOptions brpc_options; brpc_options.protocol = "h2:grpc"; brpc_options.timeout_ms = options.timeout_ms; brpc_options.max_retry = options.max_retry; int ret = client_channel_.Init("rr", &brpc_options); if (ret != 0) { status.code = ErrorCode_InitChannel; status.reason = "Init client channel failed"; return status; } for (uint32_t i = 0; i < options.connection_count; i++) { auto *sub_channel = new brpc::Channel; brpc_options.connection_group = std::string("group").append(std::to_string(i)); ret = sub_channel->Init(options.host.c_str(), &brpc_options); if (ret != 0) { status.code = ErrorCode_InitChannel; status.reason = "Init sub client channel failed."; return status; } ret = client_channel_.AddChannel(sub_channel, nullptr); if (ret != 0) { status.code = ErrorCode_InitChannel; status.reason = "Add sub channel failed."; return status; } } // check versions of client and server if matched first if (!check_server_version(&status)) { return status; } connected_ = true; return status; } Status GrpcProximaSearchClient::close() { // DO NOTHING NOW connected_ = false; return Status(); } #define CHECK_CONNECTED() \ if (!connected_) { \ status.code = ErrorCode_NotConnected; \ status.reason = "Not connected yet"; \ return status; \ } #define RETURN_STATUS(cntl, response) \ if (cntl.Failed()) { \ status.code = ErrorCode_RpcError; \ status.reason = cntl.ErrorText(); \ } else { \ status.code = response.code(); \ status.reason = response.reason(); \ } \ return status; Status GrpcProximaSearchClient::create_collection( const CollectionConfig &config) { Status status; // Check connected CHECK_CONNECTED(); // Validate request status = this->validate(config); if (status.code != 0) { return status; } // Prepare brpc::Controller cntl; proto::CollectionConfig request; this->convert(config, &request); proto::Status response; this->rpc_create_collection(&cntl, &request, &response); RETURN_STATUS(cntl, response); } Status GrpcProximaSearchClient::drop_collection( const std::string &collection_name) { Status status; // Check connected CHECK_CONNECTED(); // Validate request if (collection_name.empty()) { status.code = ErrorCode_ValidateError; status.reason = "Collection name can't be empty"; return status; } // Prepare brpc::Controller cntl; proto::Status response; proto::CollectionName request; request.set_collection_name(collection_name); this->rpc_drop_collection(&cntl, &request, &response); // Send rpc request RETURN_STATUS(cntl, response); } Status GrpcProximaSearchClient::describe_collection( const std::string &collection_name, CollectionInfo *collection_info) { Status status; // Check connected CHECK_CONNECTED(); // Validate request if (collection_name.empty()) { status.code = ErrorCode_ValidateError; status.reason = "Collection name can't be empty"; return status; } // Prepare brpc::Controller cntl; proto::DescribeCollectionResponse response; proto::CollectionName request; request.set_collection_name(collection_name); // Send rpc request this->rpc_describe_collection(&cntl, &request, &response); // Transform response if (!cntl.Failed() && response.status().code() == 0) { this->convert(response.collection(), collection_info); } RETURN_STATUS(cntl, response.status()); } Status GrpcProximaSearchClient::stats_collection( const std::string &collection_name, CollectionStats *stats) { Status status; // Check connected CHECK_CONNECTED(); // Validate request if (collection_name.empty()) { status.code = ErrorCode_ValidateError; status.reason = "Collection name can't be empty"; return status; } // Prepare brpc::Controller cntl; proto::StatsCollectionResponse response; proto::CollectionName request; request.set_collection_name(collection_name); this->rpc_stats_collection(&cntl, &request, &response); // Transform response if (!cntl.Failed() && response.status().code() == 0) { this->convert(response.collection_stats(), stats); } RETURN_STATUS(cntl, response.status()); } Status GrpcProximaSearchClient::list_collections( std::vector *collections) { Status status; // Check connected CHECK_CONNECTED(); // Prepare brpc::Controller cntl; proto::ListCollectionsResponse response; proto::ListCondition request; // Send rpc request this->rpc_list_collections(&cntl, &request, &response); // Transform response if (!cntl.Failed() && response.status().code() == 0) { for (int i = 0; i < response.collections_size(); i++) { CollectionInfo ci; this->convert(response.collections(i), &ci); collections->emplace_back(ci); } } RETURN_STATUS(cntl, response.status()); } Status GrpcProximaSearchClient::write(const WriteRequest &write_request) { Status status; // Check connected CHECK_CONNECTED(); // Validate auto &pb_req = (const PbWriteRequest &)write_request; status = this->validate(pb_req); if (status.code != 0) { return status; } // Prepare brpc::Controller cntl; proto::Status response; this->rpc_write(&cntl, pb_req.data(), &response); RETURN_STATUS(cntl, response); } Status GrpcProximaSearchClient::query(const QueryRequest &query_request, QueryResponse *query_response) { Status status; // Check connected CHECK_CONNECTED(); // Validate auto &pb_req = (const PbQueryRequest &)query_request; auto *pb_resp = (PbQueryResponse *)query_response; status = this->validate(pb_req); if (status.code != 0) { return status; } // Prepare brpc::Controller cntl; this->rpc_query(&cntl, pb_req.data(), pb_resp->data()); RETURN_STATUS(cntl, pb_resp->data()->status()); } Status GrpcProximaSearchClient::get_document_by_key( const GetDocumentRequest &get_request, GetDocumentResponse *get_response) { Status status; // Check connected CHECK_CONNECTED(); // Validate auto &pb_req = (const PbGetDocumentRequest &)get_request; auto *pb_resp = (PbGetDocumentResponse *)get_response; status = this->validate(pb_req); if (status.code != 0) { return status; } // Prepare brpc::Controller cntl; this->rpc_get_document_by_key(&cntl, pb_req.data(), pb_resp->data()); RETURN_STATUS(cntl, pb_resp->data()->status()); } bool GrpcProximaSearchClient::check_server_version(Status *status) { proto::ProximaService_Stub stub(&client_channel_); brpc::Controller cntl; proto::GetVersionRequest request; proto::GetVersionResponse response; stub.get_version(&cntl, &request, &response, nullptr); if (cntl.Failed()) { status->code = ErrorCode_RpcError; status->reason = cntl.ErrorText(); return false; } if (response.status().code() != 0) { status->code = response.status().code(); status->reason = response.status().reason(); } std::string server_version = response.version(); std::string client_version = Version::String(); if (server_version == client_version) { return true; } // Temporarily we just use first two seq number of version string to compare // For exp: version[0.1.2] match version[0.1.3] with "0.1" std::vector server_sub_seqs; ailego::StringHelper::Split(server_version, '.', &server_sub_seqs); std::vector client_sub_seqs; ailego::StringHelper::Split(client_version, '.', &client_sub_seqs); int compare_count = 2; for (int i = 0; i < compare_count; i++) { if (client_sub_seqs[i] != server_sub_seqs[i]) { status->code = ErrorCode_MismatchedVersion; status->reason = std::string() .append("client version:") .append(Version::String()) .append(" not match server version:") .append(server_version); return false; } } return true; } void GrpcProximaSearchClient::convert(const CollectionConfig &config, proto::CollectionConfig *pb_request) { pb_request->set_collection_name(config.collection_name); pb_request->set_max_docs_per_segment(config.max_docs_per_segment); for (auto &it : config.forward_columns) { pb_request->add_forward_column_names(it); } for (auto &it : config.index_columns) { auto *param = pb_request->add_index_column_params(); param->set_column_name(it.column_name); param->set_index_type((proto::IndexType)it.index_type); param->set_data_type((proto::DataType)it.data_type); param->set_dimension(it.dimension); for (auto &kv : it.extra_params) { auto *extra_param = param->add_extra_params(); extra_param->set_key(kv.key); extra_param->set_value(kv.value); } } auto &input_repo = config.database_repository; if (!input_repo.repository_name.empty()) { auto *repo_config = pb_request->mutable_repository_config(); repo_config->set_repository_type( proto::CollectionConfig::RepositoryConfig::RT_DATABASE); repo_config->set_repository_name(input_repo.repository_name); repo_config->mutable_database()->set_connection_uri( input_repo.connection_uri); repo_config->mutable_database()->set_table_name(input_repo.table_name); repo_config->mutable_database()->set_user(input_repo.user); repo_config->mutable_database()->set_password(input_repo.password); } } void GrpcProximaSearchClient::convert(const proto::CollectionInfo &pb_response, CollectionInfo *collection_info) { collection_info->collection_name = pb_response.config().collection_name(); collection_info->collection_status = (CollectionInfo::CollectionStatus)pb_response.status(); collection_info->collection_uuid = pb_response.uuid(); collection_info->latest_lsn = pb_response.latest_lsn_context().lsn(); collection_info->latest_lsn_context = pb_response.latest_lsn_context().context(); collection_info->magic_number = pb_response.magic_number(); collection_info->max_docs_per_segment = pb_response.config().max_docs_per_segment(); // copy forward columns for (int i = 0; i < pb_response.config().forward_column_names_size(); i++) { collection_info->forward_columns.emplace_back( pb_response.config().forward_column_names(i)); } // copy index columns for (int i = 0; i < pb_response.config().index_column_params_size(); i++) { auto &rp = pb_response.config().index_column_params(i); IndexColumnParam index_param; index_param.column_name = rp.column_name(); index_param.index_type = (IndexType)rp.index_type(); index_param.data_type = (DataType)rp.data_type(); index_param.dimension = rp.dimension(); for (int j = 0; j < rp.extra_params_size(); j++) { KVPair pair; pair.key = rp.extra_params(j).key(); pair.value = rp.extra_params(j).value(); index_param.extra_params.emplace_back(pair); } collection_info->index_columns.emplace_back(index_param); } // copy database repository if (pb_response.config().has_repository_config() && pb_response.config().repository_config().repository_type() == proto::CollectionConfig::RepositoryConfig::RT_DATABASE) { auto &rc = pb_response.config().repository_config(); collection_info->database_repository.repository_name = rc.repository_name(); collection_info->database_repository.connection_uri = rc.database().connection_uri(); collection_info->database_repository.table_name = rc.database().table_name(); collection_info->database_repository.user = rc.database().user(); collection_info->database_repository.password = rc.database().password(); } } void GrpcProximaSearchClient::convert(const proto::CollectionStats &pb_response, CollectionStats *collection_stats) { collection_stats->collection_name = pb_response.collection_name(); collection_stats->total_doc_count = pb_response.total_doc_count(); collection_stats->total_segment_count = pb_response.total_segment_count(); collection_stats->total_index_file_count = pb_response.total_index_file_count(); collection_stats->total_index_file_size = pb_response.total_index_file_size(); for (int i = 0; i < pb_response.segment_stats_size(); i++) { auto &ss = pb_response.segment_stats(i); CollectionStats::SegmentStats segment_stats; segment_stats.segment_id = ss.segment_id(); segment_stats.segment_state = (CollectionStats::SegmentState)ss.state(); segment_stats.doc_count = ss.doc_count(); segment_stats.index_file_count = ss.index_file_count(); segment_stats.index_file_size = ss.index_file_size(); segment_stats.min_doc_id = ss.min_doc_id(); segment_stats.max_doc_id = ss.max_doc_id(); segment_stats.min_primary_key = ss.min_primary_key(); segment_stats.max_primary_key = ss.max_primary_key(); segment_stats.min_timestamp = ss.min_timestamp(); segment_stats.max_timestamp = ss.max_timestamp(); segment_stats.min_lsn = ss.min_lsn(); segment_stats.max_lsn = ss.max_lsn(); collection_stats->segment_stats.emplace_back(segment_stats); } } Status GrpcProximaSearchClient::validate(const CollectionConfig &config) { Status status; if (config.collection_name.empty()) { status.code = ErrorCode_ValidateError; status.reason = "Collection name can't be empty"; return status; } if (config.index_columns.size() == 0) { status.code = ErrorCode_ValidateError; status.reason = "Index columns can't be empty"; return status; } for (auto &index_column : config.index_columns) { if (index_column.column_name.empty()) { status.code = ErrorCode_ValidateError; status.reason = "Column name can't be empty"; return status; } if (index_column.dimension == 0U) { status.code = ErrorCode_ValidateError; status.reason = "Dimension can't be 0"; return status; } if (index_column.data_type == DataType::UNDEFINED) { status.code = ErrorCode_ValidateError; status.reason = "Data type can't be undefined"; return status; } } return status; } Status GrpcProximaSearchClient::validate(const PbWriteRequest &request) { Status status; auto *wreq = request.data(); if (!wreq) { status.code = ErrorCode_ValidateError; status.reason = "Invalid write request"; return status; } if (wreq->collection_name().empty()) { status.code = ErrorCode_ValidateError; status.reason = "Collection name can't be empty"; return status; } if (wreq->rows_size() == 0) { status.code = ErrorCode_ValidateError; status.reason = "Rows can't be empty"; return status; } for (int i = 0; i < wreq->rows_size(); i++) { auto &row = wreq->rows(i); if (row.operation_type() == proto::OperationType::OP_INSERT || row.operation_type() == proto::OperationType::OP_UPDATE) { if (row.index_column_values().values_size() != wreq->row_meta().index_column_metas_size()) { status.code = ErrorCode_ValidateError; status.reason = "Index columns not match values"; return status; } if (row.forward_column_values().values_size() != wreq->row_meta().forward_column_names_size()) { status.code = ErrorCode_ValidateError; status.reason = "Forward columns not match values"; return status; } } } return status; } Status GrpcProximaSearchClient::validate(const PbQueryRequest &request) { Status status; auto *qreq = request.data(); if (!qreq) { status.code = ErrorCode_ValidateError; status.reason = "Invalid query request."; return status; } if (qreq->collection_name().empty()) { status.code = ErrorCode_ValidateError; status.reason = "Collection name can't be empty"; return status; } if (qreq->knn_param().column_name().empty()) { status.code = ErrorCode_ValidateError; status.reason = "Knn param column name can't be empty"; return status; } if (qreq->knn_param().topk() == 0U) { status.code = ErrorCode_ValidateError; status.reason = "Knn param topk can't be 0"; return status; } if (qreq->knn_param().features().empty() && qreq->knn_param().matrix().empty()) { status.code = ErrorCode_ValidateError; status.reason = "Knn param features and matrix can't be empty at the same time"; return status; } if (qreq->knn_param().batch_count() == 0U) { status.code = ErrorCode_ValidateError; status.reason = "Knn param batch count can't be 0"; return status; } if (qreq->knn_param().dimension() == 0U) { status.code = ErrorCode_ValidateError; status.reason = "Knn param dimension can't be 0"; return status; } if (qreq->knn_param().data_type() == proto::DataType::DT_UNDEFINED) { status.code = ErrorCode_ValidateError; status.reason = "Knn param data type can't be undefined"; return status; } return status; } Status GrpcProximaSearchClient::validate(const PbGetDocumentRequest &request) { Status status; auto *gdreq = request.data(); if (!gdreq) { status.code = ErrorCode_ValidateError; status.reason = "Invalid get document request"; return status; } if (gdreq->collection_name().empty()) { status.code = ErrorCode_ValidateError; status.reason = "Collection name can't be empty"; return status; } return status; } void GrpcProximaSearchClient::rpc_create_collection( brpc::Controller *cntl, const proto::CollectionConfig *request, proto::Status *response) { proto::ProximaService_Stub stub(&client_channel_); stub.create_collection(cntl, request, response, nullptr); } void GrpcProximaSearchClient::rpc_drop_collection( brpc::Controller *cntl, const proto::CollectionName *request, proto::Status *response) { proto::ProximaService_Stub stub(&client_channel_); stub.drop_collection(cntl, request, response, nullptr); } void GrpcProximaSearchClient::rpc_describe_collection( brpc::Controller *cntl, const proto::CollectionName *request, proto::DescribeCollectionResponse *response) { proto::ProximaService_Stub stub(&client_channel_); stub.describe_collection(cntl, request, response, nullptr); } void GrpcProximaSearchClient::rpc_stats_collection( brpc::Controller *cntl, const proto::CollectionName *request, proto::StatsCollectionResponse *response) { proto::ProximaService_Stub stub(&client_channel_); stub.stats_collection(cntl, request, response, nullptr); } void GrpcProximaSearchClient::rpc_list_collections( brpc::Controller *cntl, const proto::ListCondition *request, proto::ListCollectionsResponse *response) { proto::ProximaService_Stub stub(&client_channel_); stub.list_collections(cntl, request, response, nullptr); } void GrpcProximaSearchClient::rpc_write(brpc::Controller *cntl, const proto::WriteRequest *request, proto::Status *response) { proto::ProximaService_Stub stub(&client_channel_); stub.write(cntl, request, response, nullptr); } void GrpcProximaSearchClient::rpc_query(brpc::Controller *cntl, const proto::QueryRequest *request, proto::QueryResponse *response) { proto::ProximaService_Stub stub(&client_channel_); stub.query(cntl, request, response, nullptr); } void GrpcProximaSearchClient::rpc_get_document_by_key( brpc::Controller *cntl, const proto::GetDocumentRequest *request, proto::GetDocumentResponse *response) { proto::ProximaService_Stub stub(&client_channel_); stub.get_document_by_key(cntl, request, response, nullptr); } #undef CHECK_CONNECTED #undef RETURN_STATUS } // namespace be } // end namespace proxima ================================================ FILE: sdk/cpp/src/grpc_client.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation with grpc protobuf protocol */ #pragma once #include #include #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif #include #include #ifdef __GNUC__ #pragma GCC diagnostic pop #endif #include "proxima_search_client.h" #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wunused-parameter" #endif #include "proto/proxima_be.pb.h" #ifdef __GNUC__ #pragma GCC diagnostic pop #endif namespace proxima { namespace be { class PbWriteRequest; class PbQueryRequest; class PbQueryResponse; class PbGetDocumentRequest; class PbGetDocumentResponse; /* * ProximaSearchClient implementation with grpc protobuf protocol */ class GrpcProximaSearchClient : public ProximaSearchClient { public: //! Constructor GrpcProximaSearchClient() = default; //! Destructor ~GrpcProximaSearchClient() override = default; //! Connect remote server Status connect(const ChannelOptions &options) override; //! Close connection to remote server Status close() override; //! Create a collection with config Status create_collection(const CollectionConfig &config) override; //! Drop a collection with specific collection name Status drop_collection(const std::string &collection_name) override; //! Get collection information with specific collection name Status describe_collection(const std::string &collection_name, CollectionInfo *collection_info) override; //! Get collection stastics with specific collection name Status stats_collection(const std::string &collection_name, CollectionStats *stats) override; //! Get all the collections' information Status list_collections(std::vector *collections) override; //! Write records, including insert/update/delete operations Status write(const WriteRequest &request) override; //! Query records, including knn query saerch Status query(const QueryRequest &request, QueryResponse *response) override; //! Get specific record with primary key Status get_document_by_key(const GetDocumentRequest &request, GetDocumentResponse *response) override; protected: virtual void rpc_create_collection(brpc::Controller *cntl, const proto::CollectionConfig *request, proto::Status *response); virtual void rpc_drop_collection(brpc::Controller *cntl, const proto::CollectionName *request, proto::Status *response); virtual void rpc_describe_collection( brpc::Controller *cntl, const proto::CollectionName *request, proto::DescribeCollectionResponse *response); virtual void rpc_stats_collection(brpc::Controller *cntl, const proto::CollectionName *request, proto::StatsCollectionResponse *response); virtual void rpc_list_collections(brpc::Controller *cntl, const proto::ListCondition *request, proto::ListCollectionsResponse *response); virtual void rpc_write(brpc::Controller *cntl, const proto::WriteRequest *request, proto::Status *response); virtual void rpc_query(brpc::Controller *cntl, const proto::QueryRequest *request, proto::QueryResponse *response); virtual void rpc_get_document_by_key(brpc::Controller *cntl, const proto::GetDocumentRequest *request, proto::GetDocumentResponse *response); protected: static constexpr uint32_t ErrorCode_InitChannel = 10000; static constexpr uint32_t ErrorCode_RpcError = 10001; static constexpr uint32_t ErrorCode_MismatchedVersion = 10002; static constexpr uint32_t ErrorCode_NotConnected = 10003; static constexpr uint32_t ErrorCode_ValidateError = 10004; private: //! Check version bool check_server_version(Status *status); //! Convert struct to protobuf object void convert(const CollectionConfig &config, proto::CollectionConfig *pb_request); //! Convert struct to protobuf object void convert(const proto::CollectionInfo &pb_response, CollectionInfo *collection_info); //! Convert struct to protobuf object void convert(const proto::CollectionStats &pb_response, CollectionStats *collection_stats); //! Validate legality of collection config Status validate(const CollectionConfig &config); //! Validate legality of write request Status validate(const PbWriteRequest &request); //! Validate legality of query request Status validate(const PbQueryRequest &request); //! Validate legality of get document request Status validate(const PbGetDocumentRequest &request); protected: bool connected_{false}; private: brpc::SelectiveChannel client_channel_{}; }; /* * WriteRequest implementation with protobuf protocol */ class PbWriteRequest : public WriteRequest { public: /* * A row describes the format of one record */ class PbRow : public WriteRequest::Row { public: //! Constructor PbRow(proto::WriteRequest::Row *p_row) : row_(p_row) {} //! Destructor ~PbRow() override = default; //! Set primary key, must set void set_primary_key(uint64_t val) override { row_->set_primary_key(val); } //! Set operation type, default OP_INSERT void set_operation_type(OperationType op_type) override { row_->set_operation_type((proto::OperationType)op_type); } //! Set lsn, optional set, generally used by database repo void set_lsn(uint64_t lsn) override { row_->mutable_lsn_context()->set_lsn(lsn); } //! Set lsn context, optional set, generally used by database repo void set_lsn_context(const std::string &lsn_context) override { row_->mutable_lsn_context()->set_context(lsn_context); } //! Add forward value, must match forward column names void add_forward_value(const std::string &val) override { row_->mutable_forward_column_values()->add_values()->set_string_value( val); } //! Add forward value with bool type void add_forward_value(bool val) override { row_->mutable_forward_column_values()->add_values()->set_bool_value(val); } //! Add forward value with int32 type void add_forward_value(int32_t val) override { row_->mutable_forward_column_values()->add_values()->set_int32_value(val); } //! Add forward value with int64 type void add_forward_value(int64_t val) override { row_->mutable_forward_column_values()->add_values()->set_int64_value(val); } //! Add forward value with uint32 type void add_forward_value(uint32_t val) override { row_->mutable_forward_column_values()->add_values()->set_uint32_value( val); } //! Add forward value with uint64 type void add_forward_value(uint64_t val) override { row_->mutable_forward_column_values()->add_values()->set_uint64_value( val); } //! Add forward value with float type void add_forward_value(float val) override { row_->mutable_forward_column_values()->add_values()->set_float_value(val); } //! Add forward value with double type void add_forward_value(double val) override { row_->mutable_forward_column_values()->add_values()->set_double_value( val); } //! Add index value, vector bytes type void add_index_value(const void *val, size_t val_len) override { row_->mutable_index_column_values()->add_values()->set_bytes_value( std::string((const char *)val, val_len)); } //! Add index value, vector array type void add_index_value(const std::vector &val) override { row_->mutable_index_column_values()->add_values()->set_bytes_value( std::string((const char *)val.data(), val.size() * sizeof(float))); } //! Add index value by json format void add_index_value_by_json(const std::string &json_val) override { row_->mutable_index_column_values()->add_values()->set_string_value( json_val); } private: proto::WriteRequest::Row *row_{nullptr}; }; public: //! Constructor PbWriteRequest() = default; //! Destructor ~PbWriteRequest() override = default; //! Set collection name, must set void set_collection_name(const std::string &val) override { request_.set_collection_name(val); } //! Add forward column void add_forward_column(const std::string &column_name) override { request_.mutable_row_meta()->add_forward_column_names(column_name); } //! Add forward columns void add_forward_columns( const std::vector &column_names) override { for (auto &it : column_names) { request_.mutable_row_meta()->add_forward_column_names(it); } } //! Add index column void add_index_column(const std::string &column_name, DataType data_type, uint32_t dimension) override { auto *index_column = request_.mutable_row_meta()->add_index_column_metas(); index_column->set_column_name(column_name); index_column->set_data_type((proto::DataType)data_type); index_column->set_dimension(dimension); } //! Add row data, must add, can't send empty request WriteRequest::RowPtr add_row() override { return std::make_shared(request_.add_rows()); } //! Set request id for tracelog, optional set void set_request_id(const std::string &request_id) override { request_.set_request_id(request_id); } //! Set magic number for validation, optional set void set_magic_number(uint64_t magic_number) override { request_.set_magic_number(magic_number); } //! Return raw protobuf data pointer, read only const proto::WriteRequest *data() const { return &request_; } private: proto::WriteRequest request_; }; /* * QueryRequest implementation with protobuf protocol */ class PbQueryRequest : public QueryRequest { public: /* * KnnQueryParam implementation with protobuf protocol */ class PbKnnQueryParam : public QueryRequest::KnnQueryParam { public: //! Constructor PbKnnQueryParam(proto::QueryRequest::KnnQueryParam *val) : knn_param_(val) {} //! Destructor ~PbKnnQueryParam() override = default; //! Set column name, must set void set_column_name(const std::string &val) override { knn_param_->set_column_name(val); } //! Set topk, must set void set_topk(uint32_t val) override { knn_param_->set_topk(val); } //! Set features with vector array format by single void set_features(const void *val, size_t val_len) override { knn_param_->set_batch_count(1); knn_param_->set_features((const char *)val, val_len); } //! Set features with vector array format by single void set_features(const std::vector &val) override { knn_param_->set_features( std::string((const char *)val.data(), val.size() * sizeof(float))); knn_param_->set_batch_count(1); knn_param_->set_data_type((proto::DataType)DataType::VECTOR_FP32); knn_param_->set_dimension(val.size()); } //! Set query vector with bytes format by batch void set_features(const void *val, size_t val_len, uint32_t batch) override { knn_param_->set_batch_count(batch); knn_param_->set_features((const char *)val, val_len); } //! Set features by json format void set_features_by_json(const std::string &json_val) override { knn_param_->set_batch_count(1); knn_param_->set_matrix(json_val); } //! Set features by json format and by batch void set_features_by_json(const std::string &json_val, uint32_t batch) override { knn_param_->set_batch_count(batch); knn_param_->set_matrix(json_val); } //! Set search radius, default 0.0f, not open void set_radius(float val) override { knn_param_->set_radius(val); } //! Set if use linear search, default false void set_linear(bool val) override { knn_param_->set_is_linear(val); } //! Set vector data dimension, must set void set_dimension(uint32_t val) override { knn_param_->set_dimension(val); } //! Set vector data type, must set void set_data_type(DataType val) override { knn_param_->set_data_type((proto::DataType)val); } //! Add extra params, like ef_search ..etc void add_extra_param(const std::string &key, const std::string &val) override { auto *extra_param = knn_param_->add_extra_params(); extra_param->set_key(key); extra_param->set_value(val); } private: proto::QueryRequest::KnnQueryParam *knn_param_{nullptr}; }; public: //! Constructor PbQueryRequest() = default; //! Destructor ~PbQueryRequest() override = default; //! Set collection name, must set void set_collection_name(const std::string &val) override { request_.set_collection_name(val); } //! Set debug mode, optional set void set_debug_mode(bool val) override { request_.set_debug_mode(val); } //! Set knn query param QueryRequest::KnnQueryParamPtr add_knn_query_param() override { return std::make_shared(request_.mutable_knn_param()); } //! Return protobuf data pointer, readonly const proto::QueryRequest *data() const { return &request_; } private: proto::QueryRequest request_{}; }; /* * Document implementation with protobuf protocol */ class PbDocument : public Document { public: //! Constructor PbDocument(const proto::Document *doc_val) { doc_ = doc_val; /// Actually it shoule be in another function to load /// It's safe to iterate input value, so just keep it in construtor for (int i = 0; i < doc_->forward_column_values_size(); i++) { auto &fwd_val = doc_->forward_column_values(i); auto &key = fwd_val.key(); auto &val = fwd_val.value(); forward_map_.emplace(key, &val); } } //! Destructor ~PbDocument() override = default; //! Return primary key uint64_t primary_key() const override { return doc_->primary_key(); } //! Return knn distance score float score() const override { return doc_->score(); } //! Return forward count size_t forward_count() const override { return forward_map_.size(); } //! Return forward names void get_forward_names( std::vector *forward_names) const override { for (const auto &it : forward_map_) { forward_names->emplace_back(it.first); } } //! Return forward value with string type void get_forward_value(const std::string &key, std::string *val) const override { if (forward_map_.find(key) != forward_map_.end()) { *val = forward_map_.at(key)->string_value(); } } //! Return forward value with bool type void get_forward_value(const std::string &key, bool *val) const override { if (forward_map_.find(key) != forward_map_.end()) { *val = forward_map_.at(key)->bool_value(); } } //! Return forward value with int32 type void get_forward_value(const std::string &key, int32_t *val) const override { if (forward_map_.find(key) != forward_map_.end()) { *val = forward_map_.at(key)->int32_value(); } } //! Return forward value with int64 type void get_forward_value(const std::string &key, int64_t *val) const override { if (forward_map_.find(key) != forward_map_.end()) { *val = forward_map_.at(key)->int64_value(); } } //! Return forward value with uint32 type void get_forward_value(const std::string &key, uint32_t *val) const override { if (forward_map_.find(key) != forward_map_.end()) { *val = forward_map_.at(key)->uint32_value(); } } //! Return forward value with uint64 type void get_forward_value(const std::string &key, uint64_t *val) const override { if (forward_map_.find(key) != forward_map_.end()) { *val = forward_map_.at(key)->uint64_value(); } } //! Return forward value with float type void get_forward_value(const std::string &key, float *val) const override { if (forward_map_.find(key) != forward_map_.end()) { *val = forward_map_.at(key)->float_value(); } } //! Return forward value with double type void get_forward_value(const std::string &key, double *val) const override { if (forward_map_.find(key) != forward_map_.end()) { *val = forward_map_.at(key)->double_value(); } } private: const proto::Document *doc_{nullptr}; std::map forward_map_{}; }; /* * QueryResponse implementation of protobuf protocol */ class PbQueryResponse : public QueryResponse { public: /* * Result implementation of protobuf protocol */ class PbResult : public QueryResponse::Result { public: //! Constructor PbResult(const proto::QueryResponse::Result *val) : result_(val) {} //! Destructor ~PbResult() override = default; //! Return document count size_t document_count() const override { return result_->documents_size(); } //! Return document pointer of specific pos DocumentPtr document(int index) const override { if (index < result_->documents_size()) { return std::make_shared(&result_->documents(index)); } else { return DocumentPtr(); } } private: const proto::QueryResponse::Result *result_{nullptr}; }; public: //! Constructor PbQueryResponse() = default; //! Destructor ~PbQueryResponse() override = default; //! Return debug info const std::string &debug_info() const override { return response_.debug_info(); } //! Return query latency, microseconds uint64_t latency_us() const override { return response_.latency_us(); } //! Return batch result count size_t result_count() const override { return response_.results_size(); } //! Return result of specific batch pos QueryResponse::ResultPtr result(int index) const override { return std::make_shared( &response_.results(index)); } //! Return protobuf data pointer, readonly proto::QueryResponse *data() { return &response_; } private: proto::QueryResponse response_; }; /* * GetDocumentRequest implementation of protobuf protocol */ class PbGetDocumentRequest : public GetDocumentRequest { public: //! Constructor PbGetDocumentRequest() = default; //! Destructor ~PbGetDocumentRequest() = default; //! Set collection name, must set void set_collection_name(const std::string &val) override { request_.set_collection_name(val); } //! Set primary key, must set void set_primary_key(uint64_t val) override { request_.set_primary_key(val); } //! Set debug mode, default false void set_debug_mode(bool val) override { request_.set_debug_mode(val); } //! Return protobuf data pointer, readonly const proto::GetDocumentRequest *data() const { return &request_; } private: proto::GetDocumentRequest request_; }; /* * GetDocumentResponse implementation of protobuf protocol */ class PbGetDocumentResponse : public GetDocumentResponse { public: //! Constructor PbGetDocumentResponse() = default; //! Destructor ~PbGetDocumentResponse() override = default; //! Return debug info const std::string &debug_info() const override { return response_.debug_info(); } //! If not exist the key, return nullptr, or return document shared ptr DocumentPtr document() const override { if (response_.has_document()) { return std::make_shared(&response_.document()); } else { return DocumentPtr(); } } //! Return protobuf data pointer proto::GetDocumentResponse *data() { return &response_; } private: proto::GetDocumentResponse response_; }; } // namespace be } // end namespace proxima ================================================ FILE: sdk/cpp/src/http_client.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation with http protocol */ #include "http_client.h" #include #include #include "common/protobuf_helper.h" #include "version.h" namespace proxima { namespace be { Status HttpProximaSearchClient::connect(const ChannelOptions &options) { Status status; brpc::ChannelOptions brpc_options; brpc_options.protocol = "http"; brpc_options.timeout_ms = options.timeout_ms; brpc_options.max_retry = options.max_retry; http_host_ = std::string("http://").append(options.host); int ret = client_channel_.Init(http_host_.c_str(), "", &brpc_options); if (ret != 0) { status.code = ErrorCode_InitChannel; status.reason = "Init client channel failed"; return status; } // check versions of client and server if matched first status = check_server_version(); if (status.code != 0) { return status; } connected_ = true; return status; } Status HttpProximaSearchClient::close() { // DO NOTHING NOW connected_ = false; return Status(); } void HttpProximaSearchClient::rpc_create_collection( brpc::Controller *cntl, const proto::CollectionConfig *request, proto::Status *response) { std::string url; url.append(http_host_) .append("/v1/collection/") .append(request->collection_name()); std::string json_body; ProtobufHelper::MessageToJson(*request, &json_body); cntl->http_request().uri() = url; cntl->http_request().set_method(brpc::HTTP_METHOD_POST); cntl->request_attachment().append(json_body); client_channel_.CallMethod(nullptr, cntl, nullptr, nullptr, nullptr); if (!cntl->Failed()) { ProtobufHelper::JsonToMessage(cntl->response_attachment().to_string(), response); } } void HttpProximaSearchClient::rpc_drop_collection( brpc::Controller *cntl, const proto::CollectionName *request, proto::Status *response) { std::string url; url.append(http_host_) .append("/v1/collection/") .append(request->collection_name()); cntl->http_request().uri() = url; cntl->http_request().set_method(brpc::HTTP_METHOD_DELETE); client_channel_.CallMethod(nullptr, cntl, nullptr, nullptr, nullptr); if (!cntl->Failed()) { ProtobufHelper::JsonToMessage(cntl->response_attachment().to_string(), response); } } void HttpProximaSearchClient::rpc_describe_collection( brpc::Controller *cntl, const proto::CollectionName *request, proto::DescribeCollectionResponse *response) { std::string url; url.append(http_host_) .append("/v1/collection/") .append(request->collection_name()); cntl->http_request().uri() = url; cntl->http_request().set_method(brpc::HTTP_METHOD_GET); client_channel_.CallMethod(nullptr, cntl, nullptr, nullptr, nullptr); if (!cntl->Failed()) { ProtobufHelper::JsonToMessage(cntl->response_attachment().to_string(), response); } } void HttpProximaSearchClient::rpc_stats_collection( brpc::Controller *cntl, const proto::CollectionName *request, proto::StatsCollectionResponse *response) { std::string url; url.append(http_host_) .append("/v1/collection/") .append(request->collection_name()) .append("/stats"); cntl->http_request().uri() = url; cntl->http_request().set_method(brpc::HTTP_METHOD_GET); client_channel_.CallMethod(nullptr, cntl, nullptr, nullptr, nullptr); if (!cntl->Failed()) { ProtobufHelper::JsonToMessage(cntl->response_attachment().to_string(), response); } } void HttpProximaSearchClient::rpc_list_collections( brpc::Controller *cntl, const proto::ListCondition * /* request */, proto::ListCollectionsResponse *response) { std::string url; url.append(http_host_).append("/v1/collections"); cntl->http_request().uri() = url; cntl->http_request().set_method(brpc::HTTP_METHOD_GET); client_channel_.CallMethod(nullptr, cntl, nullptr, nullptr, nullptr); if (!cntl->Failed()) { ProtobufHelper::JsonToMessage(cntl->response_attachment().to_string(), response); } } void HttpProximaSearchClient::rpc_write(brpc::Controller *cntl, const proto::WriteRequest *request, proto::Status *response) { std::string url; url.append(http_host_) .append("/v1/collection/") .append(request->collection_name()) .append("/index"); std::string json_body; ProtobufHelper::MessageToJson(*request, &json_body); cntl->http_request().uri() = url; cntl->http_request().set_method(brpc::HTTP_METHOD_POST); cntl->request_attachment().append(json_body); client_channel_.CallMethod(nullptr, cntl, nullptr, nullptr, nullptr); if (!cntl->Failed()) { ProtobufHelper::JsonToMessage(cntl->response_attachment().to_string(), response); } } void HttpProximaSearchClient::rpc_query(brpc::Controller *cntl, const proto::QueryRequest *request, proto::QueryResponse *response) { std::string url; url.append(http_host_) .append("/v1/collection/") .append(request->collection_name()) .append("/query"); std::string json_body; ProtobufHelper::MessageToJson(*request, &json_body); cntl->http_request().uri() = url; cntl->http_request().set_method(brpc::HTTP_METHOD_POST); cntl->request_attachment().append(json_body); client_channel_.CallMethod(nullptr, cntl, nullptr, nullptr, nullptr); if (!cntl->Failed()) { ProtobufHelper::JsonToMessage(cntl->response_attachment().to_string(), response); } } void HttpProximaSearchClient::rpc_get_document_by_key( brpc::Controller *cntl, const proto::GetDocumentRequest *request, proto::GetDocumentResponse *response) { std::string url; url.append(http_host_) .append("/v1/collection/") .append(request->collection_name()) .append("/doc?key=") .append(std::to_string(request->primary_key())); cntl->http_request().uri() = url; cntl->http_request().set_method(brpc::HTTP_METHOD_GET); client_channel_.CallMethod(nullptr, cntl, nullptr, nullptr, nullptr); if (!cntl->Failed()) { ProtobufHelper::JsonToMessage(cntl->response_attachment().to_string(), response); } } Status HttpProximaSearchClient::check_server_version() { Status status; std::string url; url.append(http_host_).append("/service_version"); brpc::Controller cntl; cntl.http_request().uri() = url; cntl.http_request().set_method(brpc::HTTP_METHOD_GET); client_channel_.CallMethod(nullptr, &cntl, nullptr, nullptr, nullptr); if (cntl.Failed()) { status.code = ErrorCode_RpcError; status.reason = cntl.ErrorText(); return status; } proto::GetVersionResponse resp; ProtobufHelper::JsonToMessage(cntl.response_attachment().to_string(), &resp); std::string server_version = resp.version(); std::string client_version = Version::String(); if (server_version == client_version) { return status; } // Temporarily we just use first two seq number of version string to compare // For exp: version[0.1.2] match version[0.1.3] with "0.1" std::vector server_sub_seqs; ailego::StringHelper::Split(server_version, '.', &server_sub_seqs); std::vector client_sub_seqs; ailego::StringHelper::Split(client_version, '.', &client_sub_seqs); int compare_count = 2; for (int i = 0; i < compare_count; i++) { if (client_sub_seqs[i] != server_sub_seqs[i]) { status.code = ErrorCode_MismatchedVersion; status.reason = std::string() .append("client version:") .append(Version::String()) .append(" not match server version:") .append(server_version); return status; } } return status; } } // namespace be } // namespace proxima ================================================ FILE: sdk/cpp/src/http_client.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation with http protocol */ #pragma once #include "grpc_client.h" namespace proxima { namespace be { /* * HttpProximaSearchClient communicate to BE server with http protocol */ class HttpProximaSearchClient : public GrpcProximaSearchClient { public: //! Constructor HttpProximaSearchClient() = default; //! Destructor ~HttpProximaSearchClient() override = default; //! Connect remote server Status connect(const ChannelOptions &options) override; //! Close connection to remote server Status close() override; /// Other functions inherit from GrpcProximaSearchClient protected: void rpc_create_collection(brpc::Controller *cntl, const proto::CollectionConfig *request, proto::Status *response) override; void rpc_drop_collection(brpc::Controller *cntl, const proto::CollectionName *request, proto::Status *response) override; void rpc_describe_collection( brpc::Controller *cntl, const proto::CollectionName *request, proto::DescribeCollectionResponse *response) override; void rpc_stats_collection(brpc::Controller *cntl, const proto::CollectionName *request, proto::StatsCollectionResponse *response) override; void rpc_list_collections(brpc::Controller *cntl, const proto::ListCondition *request, proto::ListCollectionsResponse *response) override; void rpc_write(brpc::Controller *cntl, const proto::WriteRequest *request, proto::Status *response) override; void rpc_query(brpc::Controller *cntl, const proto::QueryRequest *request, proto::QueryResponse *response) override; void rpc_get_document_by_key(brpc::Controller *cntl, const proto::GetDocumentRequest *request, proto::GetDocumentResponse *response) override; private: Status check_server_version(); private: brpc::Channel client_channel_{}; std::string http_host_{}; }; } // namespace be } // end namespace proxima ================================================ FILE: sdk/cpp/src/proxima_search_client.cc ================================================ #include "grpc_client.h" #include "http_client.h" namespace proxima { namespace be { ProximaSearchClientPtr ProximaSearchClient::Create(const std::string &type) { if (type.empty() || type == "GrpcClient") { return ProximaSearchClientPtr(new GrpcProximaSearchClient()); } else if (type == "HttpClient") { return ProximaSearchClientPtr(new HttpProximaSearchClient()); } else { return ProximaSearchClientPtr(); } } ProximaSearchClientPtr ProximaSearchClient::ProximaSearchClient::Create() { return Create(""); } WriteRequestPtr WriteRequest::Create() { return std::make_shared(); } QueryRequestPtr QueryRequest::Create() { return std::make_shared(); } QueryResponsePtr QueryResponse::Create() { return std::make_shared(); } GetDocumentRequestPtr GetDocumentRequest::Create() { return std::make_shared(); } GetDocumentResponsePtr GetDocumentResponse::Create() { return std::make_shared(); } } // namespace be } // end namespace proxima ================================================ FILE: sdk/cpp/src/version.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Apr 2021 * \brief Proxima Search Client version information */ #pragma once #ifdef proxima_search_client_VERSION #define PROXIMA_SEARCH_CLIENT_VERSION_STRING proxima_search_client_VERSION #else #define PROXIMA_SEARCH_CLIENT_VERSION_STRING "unknown" #endif namespace proxima { namespace be { struct Version { static const char *String(void) { return PROXIMA_SEARCH_CLIENT_VERSION_STRING; } }; } // namespace be } // end namespace proxima ================================================ FILE: sdk/go/.gitignore ================================================ .* *~ bazel-* build/* bin/* lib/* var/* deps/* !.git* !.clang-format !.circleci !.drone.yml ================================================ FILE: sdk/go/README.md ================================================ ## Quickstart ```go func ExampleNewClient() { protoc := be.GrpcProtocol if *Http { protoc = be.HttpProtocol } client, err := be.NewProximaSearchClient(protoc, &address) if err != nil { log.Fatal("Can't create ProximaClient instance.", err) } } func ExampleListCollections(client *be.ProximaSearchClient) { // List all collections collections, err := client.ListCollections() if err != nil { log.Fatal("Can't retrieve collections from Proxima Server.", err) } log.Printf("Collections (%d): \n", len(collections)) for _, collection := range collections { log.Printf("%+v\n", collection) } // List all collections by Repo collections, err = client.ListCollections(be.ByRepo("repo")) if err != nil { log.Fatal("Can't retrieve collections from Proxima Server.", err) } log.Printf("Collections (%d): \n", len(collections)) for _, collection := range collections { log.Printf("%+v\n", collection) } } ``` ## Howto Please go through [sdk/references]() to get an idea how to use this package. ## Look and feel ## Release Rules: Dev management: Using lightweight tag to release package, using annotation tag for develop. ================================================ FILE: sdk/go/client_proxy.go ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Mar 2021 * \brief Implementation of ProximaBEClient interface */ package be import ( "errors" pb "github.com/alibaba/proximabilin/sdk/go/proto" ) func wrapError(in *pb.Status) error { err := Status{ Code: in.Code, Reason: in.Reason, } if err.OK() { return nil } return &err } type proximaSEClientProxy struct { client proximaSEPBClient } func (proxy *proximaSEClientProxy) CreateCollection(config *CollectionConfig) error { in, err := buildPBCollectionConfig(config) if err != nil { return err } status, err := proxy.client.CreateCollection(in) if err != nil { return err } return wrapError(status) } func (proxy *proximaSEClientProxy) DropCollection(collection string) error { status, err := proxy.client.DropCollection(&pb.CollectionName{ CollectionName: collection, }) if err != nil { return err } return wrapError(status) } func (proxy *proximaSEClientProxy) DescribeCollection(collection string) (*CollectionInfo, error) { resp, err := proxy.client.DescribeCollection(&pb.CollectionName{ CollectionName: collection, }) // Error of rpc client if err != nil { return nil, err } // Error from BE err = wrapError(resp.Status) if err != nil { return nil, err } return buildCollectionInfoFromPB(resp.Collection) } func (proxy *proximaSEClientProxy) ListCollections(filters ...ListCollectionFilter) ([]*CollectionInfo, error) { cond := pb.ListCondition{} for _, filter := range filters { filter.apply(&cond) } resp, err := proxy.client.ListCollections(&cond) if err != nil { return nil, err } err = wrapError(resp.Status) if err != nil { return nil, err } collections := make([]*CollectionInfo, len(resp.Collections)) for i, param := range resp.Collections { collection, err := buildCollectionInfoFromPB(param) if err != nil { return nil, err } collections[i] = collection } return collections, nil } func (proxy *proximaSEClientProxy) StatCollection(collection string) (*CollectionStat, error) { in := pb.CollectionName{ CollectionName: collection, } resp, err := proxy.client.StatsCollection(&in) if err != nil { return nil, err } err = wrapError(resp.Status) if err != nil { return nil, err } return buildCollectionStatFromPB(resp.CollectionStats) } func (proxy *proximaSEClientProxy) Write(req *WriteRequest) error { in, err := buildPBWriteRequest(req) if err != nil { return &Status{ Code: int32(Unknown), Reason: err.Error(), } } status, err := proxy.client.Write(in) if err != nil { return &Status{ Code: int32(Unknown), Reason: err.Error(), } } if err = wrapError(status); err != nil { if ErrorCode(status.Code) == RetryLater { return &Status{ Code: int32(RetryLater), Reason: err.Error(), } } return &Status{ Code: int32(Unknown), Reason: err.Error(), } } return nil } func (proxy *proximaSEClientProxy) Query(collection string, column string, features interface{}, opts ...QueryOption) (*QueryResponse, error) { req, err := buildPBQueryRequest(collection, column, features, opts...) if err != nil { return nil, err } resp, err := proxy.client.Query(req) if err != nil { return nil, err } if err = wrapError(resp.Status); err != nil { return nil, err } return buildQueryResponseFromPB(resp) } func (proxy *proximaSEClientProxy) GetDocumentByKey(collection string, primaryKey uint64) (*Document, error) { in := &pb.GetDocumentRequest{ CollectionName: collection, PrimaryKey: primaryKey, DebugMode: false, } resp, err := proxy.client.GetDocumentByKey(in) if err != nil { return nil, err } if err = wrapError(resp.Status); err != nil { return nil, err } if resp.Document == nil { return nil, errors.New("Null Document") } return buildDocumentFromPB(resp.Document), nil } // DefaultAddress create one address for Proxima Search Engine func DefaultAddress() *Address { return &Address{ Host: "127.0.0.1", Port: 16000, } } // NewProximaSearchClient create new ProximaSearchClient object func NewProximaSearchClient(conn ConnectionProtocol, address *Address) (ProximaSearchClient, error) { client, err := newProximaSEPBClient(conn, *address) if err != nil { // log.Printf("Failed to create PB client. err: %+v", err) return nil, err } ver, err := client.GetVersion() if err != nil { return nil, err } v := Version{Client: VERSION, Server: ver} if v.Compatible() { return &proximaSEClientProxy{ client: client, }, nil } return nil, errors.New("Uncompatible SDK and Proxima BE. " + v.String()) } ================================================ FILE: sdk/go/clients.go ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Mar 2021 * \brief Implementation of ProximaBEClient interface */ package be import ( "bytes" "context" "fmt" "io" "io/ioutil" "math" "net/http" "time" pb "github.com/alibaba/proximabilin/sdk/go/proto" "google.golang.org/grpc" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) // proximaSEPBClient implements ProximaSEClient type proximaSEPBClient interface { // get version from Proxima BE, format: Major.Minor.Patch-xxx GetVersion() (string, error) // create collectionp CreateCollection(in *pb.CollectionConfig) (*pb.Status, error) // drop collection DropCollection(in *pb.CollectionName) (*pb.Status, error) // retrieve collection DescribeCollection(in *pb.CollectionName) (*pb.DescribeCollectionResponse, error) // retrieve collection list ListCollections(in *pb.ListCondition) (*pb.ListCollectionsResponse, error) // stats collection StatsCollection(in *pb.CollectionName) (*pb.StatsCollectionResponse, error) // write records Write(in *pb.WriteRequest) (*pb.Status, error) // query records Query(in *pb.QueryRequest) (*pb.QueryResponse, error) // get document by key GetDocumentByKey(in *pb.GetDocumentRequest) (*pb.GetDocumentResponse, error) } func buildContext() (context.Context, context.CancelFunc) { return context.WithTimeout(context.Background(), 10*time.Second) } // Grpc client type grpcClient struct { // Grpc connection client pb.ProximaServiceClient } func (c *grpcClient) GetVersion() (string, error) { context, _ := buildContext() version, err := c.client.GetVersion(context, &pb.GetVersionRequest{}) if err != nil { return "", nil } return version.Version, nil } func (c *grpcClient) CreateCollection(in *pb.CollectionConfig) (*pb.Status, error) { context, _ := buildContext() return c.client.CreateCollection(context, in) } func (c *grpcClient) DropCollection(in *pb.CollectionName) (*pb.Status, error) { context, _ := buildContext() return c.client.DropCollection(context, in) } func (c *grpcClient) DescribeCollection(in *pb.CollectionName) (*pb.DescribeCollectionResponse, error) { context, _ := buildContext() return c.client.DescribeCollection(context, in) } func (c *grpcClient) ListCollections(in *pb.ListCondition) (*pb.ListCollectionsResponse, error) { context, _ := buildContext() return c.client.ListCollections(context, in) } func (c *grpcClient) StatsCollection(in *pb.CollectionName) (*pb.StatsCollectionResponse, error) { context, _ := buildContext() return c.client.StatsCollection(context, in) } func (c *grpcClient) Write(in *pb.WriteRequest) (*pb.Status, error) { context, _ := buildContext() return c.client.Write(context, in) } func (c *grpcClient) Query(in *pb.QueryRequest) (*pb.QueryResponse, error) { context, _ := buildContext() return c.client.Query(context, in) } func (c *grpcClient) GetDocumentByKey(in *pb.GetDocumentRequest) (*pb.GetDocumentResponse, error) { context, _ := buildContext() return c.client.GetDocumentByKey(context, in) } var ( versionPath = "/service_version" collectionManagePath = "/v1/collection/%s" statCollectionPath = "/v1/collection/%s/stats" writePath = "/v1/collection/%s/index" getDocumentByKeyPath = "/v1/collection/%s/doc?key=%d" queryPath = "/v1/collection/%s/query" listCollectionsPath = "/v1/collections%s" ) type httpClient struct { host string } func (c *httpClient) makeURI(format string, args ...interface{}) string { path := fmt.Sprintf(format, args...) return fmt.Sprintf("http://%s%s", c.host, path) } func (c *httpClient) getMessageFromIO(r io.Reader, m proto.Message) error { body, err := ioutil.ReadAll(r) if err != nil { return err } return protojson.Unmarshal(body, m) } func (c *httpClient) getStatusFromIO(r io.Reader) (*pb.Status, error) { status := new(pb.Status) err := c.getMessageFromIO(r, status) if err != nil { return nil, err } return status, nil } func httpGetWithBody(url string, contentType string, body io.Reader) (resp *http.Response, err error) { req, err := http.NewRequest("GET", url, body) if err != nil { return nil, err } req.Header.Set("Content-Type", contentType) return http.DefaultClient.Do(req) } func httpDel(url string) (resp *http.Response, err error) { req, err := http.NewRequest("DELETE", url, nil) if err != nil { return nil, err } return http.DefaultClient.Do(req) } func (c *httpClient) GetVersion() (string, error) { res, err := http.Get(c.makeURI(versionPath)) if err != nil { return "", err } defer res.Body.Close() version := new(pb.GetVersionResponse) err = c.getMessageFromIO(res.Body, version) if err != nil { return "", err } return version.Version, nil } func (c *httpClient) CreateCollection(in *pb.CollectionConfig) (*pb.Status, error) { body, err := protojson.Marshal(in) if err != nil { return nil, err } res, err := http.Post(c.makeURI(collectionManagePath, in.CollectionName), "application/json", bytes.NewReader(body)) if err != nil { return nil, err } defer res.Body.Close() return c.getStatusFromIO(res.Body) } func (c *httpClient) DropCollection(in *pb.CollectionName) (*pb.Status, error) { res, err := httpDel(c.makeURI(collectionManagePath, in.CollectionName)) if err != nil { return nil, err } defer res.Body.Close() return c.getStatusFromIO(res.Body) } func (c *httpClient) DescribeCollection(in *pb.CollectionName) (*pb.DescribeCollectionResponse, error) { res, err := http.Get(c.makeURI(collectionManagePath, in.CollectionName)) if err != nil { return nil, err } defer res.Body.Close() resp := new(pb.DescribeCollectionResponse) err = c.getMessageFromIO(res.Body, resp) if err != nil { return nil, err } return resp, nil } func (c *httpClient) ListCollections(in *pb.ListCondition) (*pb.ListCollectionsResponse, error) { query := "" if len(in.RepositoryName) != 0 { query = fmt.Sprintf("?repository=%s", in.RepositoryName) } res, err := http.Get(c.makeURI(listCollectionsPath, query)) if err != nil { return nil, err } defer res.Body.Close() resp := &pb.ListCollectionsResponse{} err = c.getMessageFromIO(res.Body, resp) if err != nil { return nil, err } return resp, nil } func (c *httpClient) StatsCollection(in *pb.CollectionName) (*pb.StatsCollectionResponse, error) { res, err := http.Get(c.makeURI(statCollectionPath, in.CollectionName)) if err != nil { return nil, err } defer res.Body.Close() resp := new(pb.StatsCollectionResponse) err = c.getMessageFromIO(res.Body, resp) if err != nil { return nil, err } return resp, nil } func (c *httpClient) Write(in *pb.WriteRequest) (*pb.Status, error) { body, err := protojson.Marshal(in) if err != nil { return nil, err } res, err := http.Post(c.makeURI(writePath, in.CollectionName), "application/json", bytes.NewReader(body)) if err != nil { return nil, err } defer res.Body.Close() return c.getStatusFromIO(res.Body) } func (c *httpClient) Query(in *pb.QueryRequest) (*pb.QueryResponse, error) { body, err := protojson.Marshal(in) if err != nil { return nil, err } res, err := http.Post(c.makeURI(queryPath, in.CollectionName), "application/json", bytes.NewReader(body)) if err != nil { return nil, err } defer res.Body.Close() resp := new(pb.QueryResponse) err = c.getMessageFromIO(res.Body, resp) if err != nil { return nil, err } return resp, nil } func (c *httpClient) GetDocumentByKey(in *pb.GetDocumentRequest) (*pb.GetDocumentResponse, error) { res, err := http.Get(c.makeURI(getDocumentByKeyPath, in.CollectionName, in.PrimaryKey)) if err != nil { return nil, err } defer res.Body.Close() resp := new(pb.GetDocumentResponse) err = c.getMessageFromIO(res.Body, resp) if err != nil { return nil, err } return resp, nil } // newProximaSEPBClientFromClient create PB Client func newProximaSEPBClient(connType ConnectionProtocol, address Address) (proximaSEPBClient, error) { if connType == GrpcProtocol { var opts []grpc.DialOption opts = append(opts, grpc.WithInsecure()) opts = append(opts, grpc.WithBlock()) opts = append(opts, grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(math.MaxInt64))) opts = append(opts, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(math.MaxInt64))) ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() conn, err := grpc.DialContext(ctx, address.address(), opts...) if err != nil { return nil, err } return &grpcClient{client: pb.NewProximaServiceClient(conn)}, nil } return &httpClient{host: address.address()}, nil } ================================================ FILE: sdk/go/const.go ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Mar 2021 * \brief */ package be // ConnectionProtocol types type ConnectionProtocol uint32 // Available types of connection const ( // Using GRPC to communicate with ProximaSE, which is default GrpcProtocol ConnectionProtocol = iota // Using HTTP to communicate with ProximaSE HttpProtocol ) // MetricType indicates the method of distance between vector type MetricType uint32 // Available metric types const ( // Undefined method, this is not illegal argument for column configuration MetricTypeUndefined MetricType = iota // Squared Euclidean SquaredEuclidean // Euclidean Euclidean // Manhattan Manhattan // Inner Product InnerProduct // Hamming Hamming ) // IndexType is types of index type IndexType uint32 // Available index types const ( // Undefined, which is not illegal argument for column configuration IndexTypeUndefined IndexType = iota // Proxima HNSW Index, Default value ProximaGraphIndex ) // DataType is types of data type DataType uint32 // Available data types const ( // Undefined type DataTypeUndefined DataType = iota // Binary type Binary DataType = 1 // String type String DataType = 2 // Boolean type Bool DataType = 3 // Signed integer with 4 bytes Int32 DataType = 4 // Signed integer with 8 bytes Int64 DataType = 5 // Unsigned integer with 4 bytes Uint32 DataType = 6 // Unsigned integer with 8 bytes Uint64 DataType = 7 // Single precision float Float DataType = 8 // Double precision float Double DataType = 9 // Binary with 4 bytes array // Memory layout: [item1 item2 item3] // Offset 0 ... 4 ... 8 .. 12 VectorBinary32 DataType = 20 // Binary with 8 bytes array // Memory layout: [item1 item2 item3] // Offset 0 ... 8 .. 16 .. 24 VectorBinary64 DataType = 21 // Float with 2 bytes array, // Tips: Create index with fp16, the query should be float32 if no float16 type in language built-in types VectorFP16 DataType = 22 // Single precision float with 4 bytes array VectorFP32 DataType = 23 // Double precision float with 8 bytes array VectorFP64 DataType = 24 // Signed integer with 4 bits array VectorInt4 DataType = 25 // Signed integer with 8 bits array VectorInt8 DataType = 26 // Signed integer with 16 bits array VectorInt16 DataType = 27 ) // OperationType operation type type OperationType uint32 // Available operations const ( // Insert Operation Insert OperationType = iota // Update Operation Update // Delete Operation Delete ) // ErrorCode type of Code type ErrorCode int32 // Code list of client only const ( Success ErrorCode = 0 // ProximaSE has been overload, please retry later RetryLater ErrorCode = -4009 // Unknown error, which equals to MaxProximaSEErrorCode(refers to ProximaSE manual book) Unknown ErrorCode = -1000000 // Incompatible error, current client can't work with ProximaSE // (please check web side of ProximaSE for release notes) Incompatible ErrorCode = -1000001 ) // RepositoryType type of repository type RepositoryType uint32 // Repository list const ( // Database repository Database RepositoryType = iota ) // CollectionStatus collection Status type type CollectionStatus uint32 // Available status of collection const ( // Collection has been initialized, is ready for serving Initialized CollectionStatus = iota // Collection is serving Serving // Collection has been dropped permanently Dropped ) // SegmentState state of segment type SegmentState uint32 // Available states of segment const ( // Segment has been created Created SegmentState = iota // Writing operation on Segment Writing // Segment is dumping Dumping // Compacting operation on segment Compacting // Persistent Segment Persist ) ================================================ FILE: sdk/go/doc.go ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Mar 2021 * \brief */ // package be is client of Proxima BE project // package be ================================================ FILE: sdk/go/examples/demo/README.md ================================================ ### SDK Example Demo for collections and document management #### To Run without arguments: - `go run .` #### To Run with help: - `go mod download` - `go build` - `./main -h` ================================================ FILE: sdk/go/examples/demo/example.go ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Mar 2021 * \brief Implementation of ProximaBEClient interface */ package main import ( "flag" "fmt" "log" "os" be "github.com/alibaba/proximabilin/sdk/go" ) var ( Host = flag.String("host", "localhost", "Host of ProximaBE") Port = flag.Uint("port", 16000, "Port of ProximaBE") Http = flag.Bool("http", false, "Using http protocol to communicate with ProximaBE, default is false") ) func initAndParseArgs() { flag.Usage = func() { _, _ = fmt.Fprint(os.Stderr, "cli : example -host=127.0.0.1 -port=16000\n") _, _ = fmt.Fprint(os.Stderr, "cli : example -host=127.0.0.1 -port=16001 -http\n") flag.PrintDefaults() } flag.Parse() } func main() { initAndParseArgs() address := be.Address{ Host: *Host, Port: uint32(*Port), } protoc := be.GrpcProtocol if *Http { protoc = be.HttpProtocol } client, err := be.NewProximaSearchClient(protoc, &address) if err != nil { log.Fatal("Can't create ProximaClient instance.", err) } // List all collections collections, err := client.ListCollections() if err != nil { log.Fatal("Can't retrieve collections from Proxima Server.", err) } log.Printf("Collections (%d): \n", len(collections)) for _, collection := range collections { log.Printf("%+v\n", collection) } // List all collections by Repo collections, err = client.ListCollections(be.ByRepo("repo")) if err != nil { log.Fatal("Can't retrieve collections from Proxima Server.", err) } log.Printf("Collections (%d): \n", len(collections)) for _, collection := range collections { log.Printf("%+v\n", collection) } client.DropCollection("example") // Create collection with no attached repository config := &be.CollectionConfig{ CollectionName: "example", MaxDocsPerSegment: 0, // 0 means unlimited, which is equal max value of system ForwardColumns: []string{"forward", "forward1", "forward2"}, Columns: []be.ColumnIndex{{ Name: "column", IndexType: 0, // 0 means default index, which is be.ProximaGraphIndex DataType: 0, // 0 means default, which is be.VectorFP32 Dimension: 8, // Required field, no default value, 0 is not legal argument ExtraParams: map[string]string{"ef_search": "200"}, // Advanced params }, { Name: "column1", IndexType: be.ProximaGraphIndex, DataType: be.VectorFP16, // Index type is fp16, query could be fp32 for lack of language types Dimension: 128, ExtraParams: map[string]string{}, }, }, Repository: nil, // No repository attached } if err = client.CreateCollection(config); err != nil { log.Fatal("Can't create collection.", err) } log.Print("Create collection succeed.") // Retrieve collection named by 'example' info, err := client.DescribeCollection("example") if err != nil { log.Fatal("Lost collection named by 'example', which created before.", err) } log.Printf("Collection: %+v\n", info) // Create collection with no attached repository config = &be.CollectionConfig{ CollectionName: "example_with_repo", MaxDocsPerSegment: 0, // 0 means unlimited, which is equal max value of system ForwardColumns: []string{"forward", "forward1"}, Columns: []be.ColumnIndex{{ Name: "column1", IndexType: 0, // 0 means default index, which is be.ProximaGraphIndex DataType: 0, // 0 means default, which is be.VectorFP32 Dimension: 512, // Required field, no default value, 0 is not legal argument ExtraParams: map[string]string{"ef_search": "200"}, // Advanced params }, }, Repository: &be.DatabaseRepository{ Repository: be.Repository{ Name: "mysql_repo", Type: be.Database, }, Connection: "mysql://host.com:8080/mysql_database", // JDBC connection uri TableName: "table_name", // Table name User: "root", // User name Password: "root", // Password }, } client.DropCollection("example_with_repo") if err = client.CreateCollection(config); err != nil { log.Fatal("Can't create collection.", err) } log.Print("Create collection with attached mysql repository succeed.") // Retrieve collection named by 'example_with_repo' info, err = client.DescribeCollection("example_with_repo") if err != nil { log.Fatal("Lost collection named by 'example_with_repo', which created before.", err) } log.Printf("Collection(With Repository): %+v\n", info) // Delete collection if err = client.DropCollection("example_with_repo"); err != nil { log.Fatal("Failed to drop collection,", err) } log.Print("Drop collection succeed.") rows := &be.WriteRequest{ CollectionName: "example", Meta: be.RowMeta{ IndexColumnNames: []string{"column"}, ForwardColumnNames: []string{"forward", "forward1", "forward2"}, }, Rows: []be.Row{ { PrimaryKey: 0, OperationType: be.Insert, ForwardColumnValues: []interface{}{1, float32(1.1), true}, IndexColumnValues: []interface{}{ // Data type should same with index created before []float32{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0}, }, LsnContext: nil, // With empty context }, { PrimaryKey: 2, OperationType: be.Insert, ForwardColumnValues: []interface{}{2, float32(2.2), false}, IndexColumnValues: []interface{}{ // Data type should same with index created before []float32{21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0}, }, LsnContext: &be.LsnContext{ // With valid context LSN: 0, Context: "write context hear", }, }}, RequestID: "", // Optional field MagicNumber: 0, // Optional field } // Write rows to collection err = client.Write(rows) if err != nil { log.Fatal("Insert data to collection failed.", err) } stat, err := client.StatCollection("example") if err != nil { log.Fatal("Stat collection failed.", err) } log.Printf("Collection Stat: %+v", stat) // Query one vector resp, err := client.Query("example", "column", []float32{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0}, be.WithTopK(10)) if err != nil { log.Fatal("Query failed.", err) } log.Printf("Response: %+v\n", resp) // Query with matrix resp, err = client.Query("example", "column", [][]float32{{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0}, {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0}, {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0}, {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0}, }, be.WithTopK(10), be.WithDebugMode(), // Enable debug mode, do not recommend on product environments be.WithRadius(1.5), // Search radius, no effect if be.WithLinearSearch enabled be.WithLinearSearch(), // Enable linear search be.WithParam("customize_param", 10), be.WithParam("customize_param2", 1.0), be.WithParam("customize_param3", "str")) if err != nil { log.Fatal("Query failed.", err) } log.Printf("Response: %+v\n", resp) // Retrieve document by primary key doc, err := client.GetDocumentByKey("example", 0) if err != nil { log.Fatal("Failed to retrieve document from server.", err) } log.Printf("Document: %+v\n", doc) // Retrieve stat of collection stat, err = client.StatCollection("example") if err != nil { log.Fatal("Failed to retrieve stat of collection.", err) } log.Printf("Stat: %+v\n", stat) } ================================================ FILE: sdk/go/examples/demo/go.mod ================================================ module github.com/alibaba/proximabilin/sdk/go/example/demo go 1.16 require github.com/alibaba/proximabilin/sdk/go v0.1.0 replace github.com/alibaba/proximabilin/sdk/go => ../../ ================================================ FILE: sdk/go/examples/demo/go.sum ================================================ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d h1:zsO4lp+bjv5XvPTF58Vq+qgmZEYZttJK+CWtSZhKenI= github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d/go.mod h1:f1iKL6ZhUWvbk7PdWVmOaak10o86cqMUYEmn1CZNGEI= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY= golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.36.0 h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= ================================================ FILE: sdk/go/go.mod ================================================ module github.com/alibaba/proximabilin/sdk/go go 1.16 require ( github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d github.com/golang/protobuf v1.4.2 golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect golang.org/x/sys v0.0.0-20210309074719-68d13333faf2 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/grpc v1.36.0 google.golang.org/protobuf v1.25.0 ) ================================================ FILE: sdk/go/go.sum ================================================ cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d h1:zsO4lp+bjv5XvPTF58Vq+qgmZEYZttJK+CWtSZhKenI= github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d/go.mod h1:f1iKL6ZhUWvbk7PdWVmOaak10o86cqMUYEmn1CZNGEI= github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403 h1:cqQfy1jclcSy/FwLjemeg3SR1yaINm74aQyupQ0Bl8M= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad h1:EmNYJhPYy0pOFjCx2PrgtaBXmee0iUX9hLlxE1xHOJE= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1 h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/exp v0.0.0-20190121172915-509febef88a4 h1:c2HOrn5iMezYjSlGPncknSEr/8x5LELb/ilJbXi9DEA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY= golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135 h1:5Beo0mZN8dRzgrMMkDp0jc8YXQKx9DiJ2k1dkvGsn5A= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.36.0 h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc h1:/hemPrYIhOhy8zYrNj+069zDB68us2sMGsfkFJO0iZs= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= ================================================ FILE: sdk/go/interfaces.go ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Mar 2021 * \brief */ package be // ProximaSearchClient is the client API for Proxima BE service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ProximaSearchClient interface { // CreateCollection method to create one collection // // Return error not nil means error, otherwise succeed // Example: // CreateCollection(config *CollectionConfig) error // DropCollection for delete collection // // return error is nil for success, otherwise failed DropCollection(name string) error // DescribeCollection method used to retrieve details of collection // Argument @name indicate interested collection // Return pointer of CollectionInfo, error not nil for failed DescribeCollection(name string) (*CollectionInfo, error) // ListCollections method, used to retrieve collections from ProximaSE // Available filters listed as following: // ByRepo(repo string): only list collection which name of repository equals repo. // last one task effect, if multiple instance passed // Return pointer of CollectionInfo array, error not nil for failed ListCollections(filters ...ListCollectionFilter) ([]*CollectionInfo, error) // StatCollection used for retrieve stat of collection // Return pointer of CollectionStat, error not nil for failed StatCollection(name string) (*CollectionStat, error) // Write Collection // Return Status object, error not nil for failed Write(in *WriteRequest) error // Perform Query Request to Proxima BE // Return pointer of QueryResponse, error not nil for failed // Note: acceptable features listed below // // slice/array/matrix of [int8, uint32, uint64, float32] // features := []int8{1,2,3,4} // features := [5]int8{1,2,3,4} // features := [][]int8{{1,2,3,4},{1,2,3,4}} // features := [5][5]int8{{1,2,3,4},{1,2,3,4}} // features := []uint32{1,2,3,4} // features := [5]uint32{1,2,3,4} // features := [][]uint32{{1,2,3,4},{1,2,3,4}} // features := [5][5]uint32{{1,2,3,4},{1,2,3,4}} // features := []float32{1,2,3,4} // features := [5]float32{1,2,3,4} // features := [][]float32{{1,2,3,4},{1,2,3,4}} // features := [5][5]float32{{1,2,3,4},{1,2,3,4}} // opts parameter is interface of QueryOptions, possible value listed below: // WithTopK(int): customize topk // WithRadius(float32): customize search radius // WithLinearSearch(): enable linear search // WithDebugMode(): enable debug mode // WithParam(string, interface{}): for advance configuration // example: // client.Query("collection", "column", []int{1,2}, WithTopK(10), WithRadius(0.6), WithLinearSearch(), WithDebugMode(), WithParam("key", 1)) Query(collection string, column string, features interface{}, opts ...QueryOption) (*QueryResponse, error) // GetDocumentByKey retrieve document which primary key was indicated by param req // Return pointer of Document, error not nil for failed GetDocumentByKey(collection string, primaryKey uint64) (*Document, error) } ================================================ FILE: sdk/go/options.go ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Mar 2021 * \brief */ package be import ( "fmt" pb "github.com/alibaba/proximabilin/sdk/go/proto" ) // ListCollectionFilter for ListCollections method type ListCollectionFilter interface { apply(*pb.ListCondition) } type listCollectionFilter struct { filter func(*pb.ListCondition) } func (opt *listCollectionFilter) apply(opts *pb.ListCondition) { opt.filter(opts) } func newlistCollectionFilter(filter func(*pb.ListCondition)) *listCollectionFilter { return &listCollectionFilter{ filter: filter, } } // ByRepo list collections by repo func ByRepo(repo string) ListCollectionFilter { return newlistCollectionFilter(func(opts *pb.ListCondition) { opts.RepositoryName = repo }) } // queryOptions advance configuration for customize query type queryOptions struct { // topk, default is 100 topk uint32 // Search radius radius float32 // Linear search linear bool // Debug mode debug bool // Advanced params params map[string]string } // QueryOption for customize query params type QueryOption interface { apply(*queryOptions) bool } type funcOption struct { f func(*queryOptions) bool } func (opt *funcOption) apply(opts *queryOptions) bool { return opt.f(opts) } func defaultOptions() *queryOptions { return &queryOptions{ topk: 100, radius: 0.5, linear: false, debug: false, params: map[string]string{}, } } func newQueryOption(f func(opts *queryOptions) bool) *funcOption { return &funcOption{ f: f, } } // WithTopK customize topk param, default is 100 func WithTopK(topk uint32) QueryOption { return newQueryOption(func(opts *queryOptions) bool { if topk < 10000 { opts.topk = topk return true } return false }) } // WithRadius customize radius param, default is 0.5 func WithRadius(radius float32) QueryOption { return newQueryOption(func(opts *queryOptions) bool { if radius >= 0.0 { opts.radius = radius return true } return false }) } // WithLinearSearch enable linear search mode func WithLinearSearch() QueryOption { return newQueryOption(func(opts *queryOptions) bool { opts.linear = true return true }) } // WithDebugMode enable debug search mode, consequence bigger latench, // does not recommend in product environments func WithDebugMode() QueryOption { return newQueryOption(func(opts *queryOptions) bool { opts.debug = true return true }) } // WithParam customize param, // Acceptable value type listed below // types of value: [[]byte, string, bool, int32, int64, uint32, uint64, float32, float64] // Examples: // int32opt := WithParam("key", int32(10)) // int64opt := WithParam("key", 10) func WithParam(key string, value interface{}) QueryOption { return newQueryOption(func(opts *queryOptions) bool { if acceptableValueTypes(value) { opts.params[key] = fmt.Sprint(value) return true } return false }) } ================================================ FILE: sdk/go/proto/common.pb.go ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. \author Hechong.xyf \date Oct 2020 \brief Common definition for bilin engine */ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 // protoc v3.14.0 // source: proto/common.proto package proto import ( proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // This is a compile-time assertion that a sufficiently up-to-date version // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 //! Types of Operation type OperationType int32 const ( OperationType_OP_INSERT OperationType = 0 // Insert Operation OperationType_OP_UPDATE OperationType = 1 // Update Operation OperationType_OP_DELETE OperationType = 2 // Delete Operation ) // Enum value maps for OperationType. var ( OperationType_name = map[int32]string{ 0: "OP_INSERT", 1: "OP_UPDATE", 2: "OP_DELETE", } OperationType_value = map[string]int32{ "OP_INSERT": 0, "OP_UPDATE": 1, "OP_DELETE": 2, } ) func (x OperationType) Enum() *OperationType { p := new(OperationType) *p = x return p } func (x OperationType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (OperationType) Descriptor() protoreflect.EnumDescriptor { return file_proto_common_proto_enumTypes[0].Descriptor() } func (OperationType) Type() protoreflect.EnumType { return &file_proto_common_proto_enumTypes[0] } func (x OperationType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use OperationType.Descriptor instead. func (OperationType) EnumDescriptor() ([]byte, []int) { return file_proto_common_proto_rawDescGZIP(), []int{0} } //! Types of Feature (same as Proxima) type FeatureType int32 const ( FeatureType_FT_UNDEFINED FeatureType = 0 // Undefined FeatureType_FT_BINARY32 FeatureType = 1 // 32-bits Binary FeatureType_FT_BINARY64 FeatureType = 2 // 64-bits Binary FeatureType_FT_FP16 FeatureType = 3 // 16-bits Float Number FeatureType_FT_FP32 FeatureType = 4 // 32-bits Float Number FeatureType_FT_FP64 FeatureType = 5 // 64-bits Float Number FeatureType_FT_INT8 FeatureType = 6 // 8-bits Integer FeatureType_FT_INT16 FeatureType = 7 // 16-bits Integer FeatureType_FT_INT4 FeatureType = 8 // 4-bits Integer ) // Enum value maps for FeatureType. var ( FeatureType_name = map[int32]string{ 0: "FT_UNDEFINED", 1: "FT_BINARY32", 2: "FT_BINARY64", 3: "FT_FP16", 4: "FT_FP32", 5: "FT_FP64", 6: "FT_INT8", 7: "FT_INT16", 8: "FT_INT4", } FeatureType_value = map[string]int32{ "FT_UNDEFINED": 0, "FT_BINARY32": 1, "FT_BINARY64": 2, "FT_FP16": 3, "FT_FP32": 4, "FT_FP64": 5, "FT_INT8": 6, "FT_INT16": 7, "FT_INT4": 8, } ) func (x FeatureType) Enum() *FeatureType { p := new(FeatureType) *p = x return p } func (x FeatureType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (FeatureType) Descriptor() protoreflect.EnumDescriptor { return file_proto_common_proto_enumTypes[1].Descriptor() } func (FeatureType) Type() protoreflect.EnumType { return &file_proto_common_proto_enumTypes[1] } func (x FeatureType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use FeatureType.Descriptor instead. func (FeatureType) EnumDescriptor() ([]byte, []int) { return file_proto_common_proto_rawDescGZIP(), []int{1} } //! Types of Index type IndexType int32 const ( IndexType_IT_UNDEFINED IndexType = 0 // Undefined IndexType_IT_PROXIMA_GRAPH_INDEX IndexType = 1 // Proxima Graph Index ) // Enum value maps for IndexType. var ( IndexType_name = map[int32]string{ 0: "IT_UNDEFINED", 1: "IT_PROXIMA_GRAPH_INDEX", } IndexType_value = map[string]int32{ "IT_UNDEFINED": 0, "IT_PROXIMA_GRAPH_INDEX": 1, } ) func (x IndexType) Enum() *IndexType { p := new(IndexType) *p = x return p } func (x IndexType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (IndexType) Descriptor() protoreflect.EnumDescriptor { return file_proto_common_proto_enumTypes[2].Descriptor() } func (IndexType) Type() protoreflect.EnumType { return &file_proto_common_proto_enumTypes[2] } func (x IndexType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use IndexType.Descriptor instead. func (IndexType) EnumDescriptor() ([]byte, []int) { return file_proto_common_proto_rawDescGZIP(), []int{2} } type DataType int32 const ( DataType_DT_UNDEFINED DataType = 0 DataType_DT_BINARY DataType = 1 DataType_DT_STRING DataType = 2 DataType_DT_BOOL DataType = 3 DataType_DT_INT32 DataType = 4 DataType_DT_INT64 DataType = 5 DataType_DT_UINT32 DataType = 6 DataType_DT_UINT64 DataType = 7 DataType_DT_FLOAT DataType = 8 DataType_DT_DOUBLE DataType = 9 DataType_DT_VECTOR_BINARY32 DataType = 20 DataType_DT_VECTOR_BINARY64 DataType = 21 DataType_DT_VECTOR_FP16 DataType = 22 DataType_DT_VECTOR_FP32 DataType = 23 DataType_DT_VECTOR_FP64 DataType = 24 DataType_DT_VECTOR_INT4 DataType = 25 DataType_DT_VECTOR_INT8 DataType = 26 DataType_DT_VECTOR_INT16 DataType = 27 ) // Enum value maps for DataType. var ( DataType_name = map[int32]string{ 0: "DT_UNDEFINED", 1: "DT_BINARY", 2: "DT_STRING", 3: "DT_BOOL", 4: "DT_INT32", 5: "DT_INT64", 6: "DT_UINT32", 7: "DT_UINT64", 8: "DT_FLOAT", 9: "DT_DOUBLE", 20: "DT_VECTOR_BINARY32", 21: "DT_VECTOR_BINARY64", 22: "DT_VECTOR_FP16", 23: "DT_VECTOR_FP32", 24: "DT_VECTOR_FP64", 25: "DT_VECTOR_INT4", 26: "DT_VECTOR_INT8", 27: "DT_VECTOR_INT16", } DataType_value = map[string]int32{ "DT_UNDEFINED": 0, "DT_BINARY": 1, "DT_STRING": 2, "DT_BOOL": 3, "DT_INT32": 4, "DT_INT64": 5, "DT_UINT32": 6, "DT_UINT64": 7, "DT_FLOAT": 8, "DT_DOUBLE": 9, "DT_VECTOR_BINARY32": 20, "DT_VECTOR_BINARY64": 21, "DT_VECTOR_FP16": 22, "DT_VECTOR_FP32": 23, "DT_VECTOR_FP64": 24, "DT_VECTOR_INT4": 25, "DT_VECTOR_INT8": 26, "DT_VECTOR_INT16": 27, } ) func (x DataType) Enum() *DataType { p := new(DataType) *p = x return p } func (x DataType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (DataType) Descriptor() protoreflect.EnumDescriptor { return file_proto_common_proto_enumTypes[3].Descriptor() } func (DataType) Type() protoreflect.EnumType { return &file_proto_common_proto_enumTypes[3] } func (x DataType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use DataType.Descriptor instead. func (DataType) EnumDescriptor() ([]byte, []int) { return file_proto_common_proto_rawDescGZIP(), []int{3} } //! Types of Field type GenericValueMeta_FieldType int32 const ( GenericValueMeta_FT_BYTES GenericValueMeta_FieldType = 0 // bytes GenericValueMeta_FT_STRING GenericValueMeta_FieldType = 1 // string GenericValueMeta_FT_BOOL GenericValueMeta_FieldType = 2 // bool GenericValueMeta_FT_INT32 GenericValueMeta_FieldType = 3 // int32 GenericValueMeta_FT_INT64 GenericValueMeta_FieldType = 4 // int64 GenericValueMeta_FT_UINT32 GenericValueMeta_FieldType = 5 // uint32 GenericValueMeta_FT_UINT64 GenericValueMeta_FieldType = 6 // uint64 GenericValueMeta_FT_FLOAT GenericValueMeta_FieldType = 7 // float GenericValueMeta_FT_DOUBLE GenericValueMeta_FieldType = 8 // double float ) // Enum value maps for GenericValueMeta_FieldType. var ( GenericValueMeta_FieldType_name = map[int32]string{ 0: "FT_BYTES", 1: "FT_STRING", 2: "FT_BOOL", 3: "FT_INT32", 4: "FT_INT64", 5: "FT_UINT32", 6: "FT_UINT64", 7: "FT_FLOAT", 8: "FT_DOUBLE", } GenericValueMeta_FieldType_value = map[string]int32{ "FT_BYTES": 0, "FT_STRING": 1, "FT_BOOL": 2, "FT_INT32": 3, "FT_INT64": 4, "FT_UINT32": 5, "FT_UINT64": 6, "FT_FLOAT": 7, "FT_DOUBLE": 8, } ) func (x GenericValueMeta_FieldType) Enum() *GenericValueMeta_FieldType { p := new(GenericValueMeta_FieldType) *p = x return p } func (x GenericValueMeta_FieldType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (GenericValueMeta_FieldType) Descriptor() protoreflect.EnumDescriptor { return file_proto_common_proto_enumTypes[4].Descriptor() } func (GenericValueMeta_FieldType) Type() protoreflect.EnumType { return &file_proto_common_proto_enumTypes[4] } func (x GenericValueMeta_FieldType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use GenericValueMeta_FieldType.Descriptor instead. func (GenericValueMeta_FieldType) EnumDescriptor() ([]byte, []int) { return file_proto_common_proto_rawDescGZIP(), []int{2, 0} } //! Union of Generic Value type GenericValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to ValueOneof: // *GenericValue_BytesValue // *GenericValue_StringValue // *GenericValue_BoolValue // *GenericValue_Int32Value // *GenericValue_Int64Value // *GenericValue_Uint32Value // *GenericValue_Uint64Value // *GenericValue_FloatValue // *GenericValue_DoubleValue ValueOneof isGenericValue_ValueOneof `protobuf_oneof:"value_oneof"` } func (x *GenericValue) Reset() { *x = GenericValue{} if protoimpl.UnsafeEnabled { mi := &file_proto_common_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GenericValue) String() string { return protoimpl.X.MessageStringOf(x) } func (*GenericValue) ProtoMessage() {} func (x *GenericValue) ProtoReflect() protoreflect.Message { mi := &file_proto_common_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GenericValue.ProtoReflect.Descriptor instead. func (*GenericValue) Descriptor() ([]byte, []int) { return file_proto_common_proto_rawDescGZIP(), []int{0} } func (m *GenericValue) GetValueOneof() isGenericValue_ValueOneof { if m != nil { return m.ValueOneof } return nil } func (x *GenericValue) GetBytesValue() []byte { if x, ok := x.GetValueOneof().(*GenericValue_BytesValue); ok { return x.BytesValue } return nil } func (x *GenericValue) GetStringValue() string { if x, ok := x.GetValueOneof().(*GenericValue_StringValue); ok { return x.StringValue } return "" } func (x *GenericValue) GetBoolValue() bool { if x, ok := x.GetValueOneof().(*GenericValue_BoolValue); ok { return x.BoolValue } return false } func (x *GenericValue) GetInt32Value() int32 { if x, ok := x.GetValueOneof().(*GenericValue_Int32Value); ok { return x.Int32Value } return 0 } func (x *GenericValue) GetInt64Value() int64 { if x, ok := x.GetValueOneof().(*GenericValue_Int64Value); ok { return x.Int64Value } return 0 } func (x *GenericValue) GetUint32Value() uint32 { if x, ok := x.GetValueOneof().(*GenericValue_Uint32Value); ok { return x.Uint32Value } return 0 } func (x *GenericValue) GetUint64Value() uint64 { if x, ok := x.GetValueOneof().(*GenericValue_Uint64Value); ok { return x.Uint64Value } return 0 } func (x *GenericValue) GetFloatValue() float32 { if x, ok := x.GetValueOneof().(*GenericValue_FloatValue); ok { return x.FloatValue } return 0 } func (x *GenericValue) GetDoubleValue() float64 { if x, ok := x.GetValueOneof().(*GenericValue_DoubleValue); ok { return x.DoubleValue } return 0 } type isGenericValue_ValueOneof interface { isGenericValue_ValueOneof() } type GenericValue_BytesValue struct { BytesValue []byte `protobuf:"bytes,1,opt,name=bytes_value,json=bytesValue,proto3,oneof"` } type GenericValue_StringValue struct { StringValue string `protobuf:"bytes,2,opt,name=string_value,json=stringValue,proto3,oneof"` } type GenericValue_BoolValue struct { BoolValue bool `protobuf:"varint,3,opt,name=bool_value,json=boolValue,proto3,oneof"` } type GenericValue_Int32Value struct { Int32Value int32 `protobuf:"varint,4,opt,name=int32_value,json=int32Value,proto3,oneof"` } type GenericValue_Int64Value struct { Int64Value int64 `protobuf:"varint,5,opt,name=int64_value,json=int64Value,proto3,oneof"` } type GenericValue_Uint32Value struct { Uint32Value uint32 `protobuf:"varint,6,opt,name=uint32_value,json=uint32Value,proto3,oneof"` } type GenericValue_Uint64Value struct { Uint64Value uint64 `protobuf:"varint,7,opt,name=uint64_value,json=uint64Value,proto3,oneof"` } type GenericValue_FloatValue struct { FloatValue float32 `protobuf:"fixed32,8,opt,name=float_value,json=floatValue,proto3,oneof"` } type GenericValue_DoubleValue struct { DoubleValue float64 `protobuf:"fixed64,9,opt,name=double_value,json=doubleValue,proto3,oneof"` } func (*GenericValue_BytesValue) isGenericValue_ValueOneof() {} func (*GenericValue_StringValue) isGenericValue_ValueOneof() {} func (*GenericValue_BoolValue) isGenericValue_ValueOneof() {} func (*GenericValue_Int32Value) isGenericValue_ValueOneof() {} func (*GenericValue_Int64Value) isGenericValue_ValueOneof() {} func (*GenericValue_Uint32Value) isGenericValue_ValueOneof() {} func (*GenericValue_Uint64Value) isGenericValue_ValueOneof() {} func (*GenericValue_FloatValue) isGenericValue_ValueOneof() {} func (*GenericValue_DoubleValue) isGenericValue_ValueOneof() {} //! Message of Generic Value List type GenericValueList struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Values []*GenericValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` } func (x *GenericValueList) Reset() { *x = GenericValueList{} if protoimpl.UnsafeEnabled { mi := &file_proto_common_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GenericValueList) String() string { return protoimpl.X.MessageStringOf(x) } func (*GenericValueList) ProtoMessage() {} func (x *GenericValueList) ProtoReflect() protoreflect.Message { mi := &file_proto_common_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GenericValueList.ProtoReflect.Descriptor instead. func (*GenericValueList) Descriptor() ([]byte, []int) { return file_proto_common_proto_rawDescGZIP(), []int{1} } func (x *GenericValueList) GetValues() []*GenericValue { if x != nil { return x.Values } return nil } //! Message of Generic Value Meta type GenericValueMeta struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields FieldName string `protobuf:"bytes,1,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"` FieldType GenericValueMeta_FieldType `protobuf:"varint,2,opt,name=field_type,json=fieldType,proto3,enum=proxima.be.proto.GenericValueMeta_FieldType" json:"field_type,omitempty"` } func (x *GenericValueMeta) Reset() { *x = GenericValueMeta{} if protoimpl.UnsafeEnabled { mi := &file_proto_common_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GenericValueMeta) String() string { return protoimpl.X.MessageStringOf(x) } func (*GenericValueMeta) ProtoMessage() {} func (x *GenericValueMeta) ProtoReflect() protoreflect.Message { mi := &file_proto_common_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GenericValueMeta.ProtoReflect.Descriptor instead. func (*GenericValueMeta) Descriptor() ([]byte, []int) { return file_proto_common_proto_rawDescGZIP(), []int{2} } func (x *GenericValueMeta) GetFieldName() string { if x != nil { return x.FieldName } return "" } func (x *GenericValueMeta) GetFieldType() GenericValueMeta_FieldType { if x != nil { return x.FieldType } return GenericValueMeta_FT_BYTES } //! Message of Generic Key-Value Pair type GenericKeyValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value *GenericValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } func (x *GenericKeyValue) Reset() { *x = GenericKeyValue{} if protoimpl.UnsafeEnabled { mi := &file_proto_common_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GenericKeyValue) String() string { return protoimpl.X.MessageStringOf(x) } func (*GenericKeyValue) ProtoMessage() {} func (x *GenericKeyValue) ProtoReflect() protoreflect.Message { mi := &file_proto_common_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GenericKeyValue.ProtoReflect.Descriptor instead. func (*GenericKeyValue) Descriptor() ([]byte, []int) { return file_proto_common_proto_rawDescGZIP(), []int{3} } func (x *GenericKeyValue) GetKey() string { if x != nil { return x.Key } return "" } func (x *GenericKeyValue) GetValue() *GenericValue { if x != nil { return x.Value } return nil } //! Message of IndexParameter, which used to customize index, and query type KeyValuePair struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } func (x *KeyValuePair) Reset() { *x = KeyValuePair{} if protoimpl.UnsafeEnabled { mi := &file_proto_common_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *KeyValuePair) String() string { return protoimpl.X.MessageStringOf(x) } func (*KeyValuePair) ProtoMessage() {} func (x *KeyValuePair) ProtoReflect() protoreflect.Message { mi := &file_proto_common_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use KeyValuePair.ProtoReflect.Descriptor instead. func (*KeyValuePair) Descriptor() ([]byte, []int) { return file_proto_common_proto_rawDescGZIP(), []int{4} } func (x *KeyValuePair) GetKey() string { if x != nil { return x.Key } return "" } func (x *KeyValuePair) GetValue() string { if x != nil { return x.Value } return "" } //! Common Response type CommonResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` } func (x *CommonResponse) Reset() { *x = CommonResponse{} if protoimpl.UnsafeEnabled { mi := &file_proto_common_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CommonResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*CommonResponse) ProtoMessage() {} func (x *CommonResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_common_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CommonResponse.ProtoReflect.Descriptor instead. func (*CommonResponse) Descriptor() ([]byte, []int) { return file_proto_common_proto_rawDescGZIP(), []int{5} } func (x *CommonResponse) GetCode() int32 { if x != nil { return x.Code } return 0 } func (x *CommonResponse) GetReason() string { if x != nil { return x.Reason } return "" } type Status struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` } func (x *Status) Reset() { *x = Status{} if protoimpl.UnsafeEnabled { mi := &file_proto_common_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Status) String() string { return protoimpl.X.MessageStringOf(x) } func (*Status) ProtoMessage() {} func (x *Status) ProtoReflect() protoreflect.Message { mi := &file_proto_common_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Status.ProtoReflect.Descriptor instead. func (*Status) Descriptor() ([]byte, []int) { return file_proto_common_proto_rawDescGZIP(), []int{6} } func (x *Status) GetCode() int32 { if x != nil { return x.Code } return 0 } func (x *Status) GetReason() string { if x != nil { return x.Reason } return "" } //! Common Http Request for admin type HttpRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *HttpRequest) Reset() { *x = HttpRequest{} if protoimpl.UnsafeEnabled { mi := &file_proto_common_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *HttpRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*HttpRequest) ProtoMessage() {} func (x *HttpRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_common_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use HttpRequest.ProtoReflect.Descriptor instead. func (*HttpRequest) Descriptor() ([]byte, []int) { return file_proto_common_proto_rawDescGZIP(), []int{7} } //! Common Http Response for admin type HttpResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *HttpResponse) Reset() { *x = HttpResponse{} if protoimpl.UnsafeEnabled { mi := &file_proto_common_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *HttpResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*HttpResponse) ProtoMessage() {} func (x *HttpResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_common_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use HttpResponse.ProtoReflect.Descriptor instead. func (*HttpResponse) Descriptor() ([]byte, []int) { return file_proto_common_proto_rawDescGZIP(), []int{8} } var File_proto_common_proto protoreflect.FileDescriptor var file_proto_common_proto_rawDesc = []byte{ 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x4a, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x8d, 0x02, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x54, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x54, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x54, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x54, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x54, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x54, 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x54, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x08, 0x22, 0x59, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x36, 0x0a, 0x0c, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3c, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x34, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x0d, 0x0a, 0x0b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x3c, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x50, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x50, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x2a, 0x90, 0x01, 0x0a, 0x0b, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x54, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x54, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x33, 0x32, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x54, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x36, 0x34, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x54, 0x5f, 0x46, 0x50, 0x31, 0x36, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x54, 0x5f, 0x46, 0x50, 0x33, 0x32, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x54, 0x5f, 0x46, 0x50, 0x36, 0x34, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x34, 0x10, 0x08, 0x2a, 0x39, 0x0a, 0x09, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x54, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x49, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x49, 0x4d, 0x41, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x5f, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x10, 0x01, 0x2a, 0xc7, 0x02, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x54, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x54, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x54, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x54, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x54, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x54, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x54, 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x54, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x09, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x54, 0x5f, 0x56, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x33, 0x32, 0x10, 0x14, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x54, 0x5f, 0x56, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x36, 0x34, 0x10, 0x15, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x54, 0x5f, 0x56, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x46, 0x50, 0x31, 0x36, 0x10, 0x16, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x54, 0x5f, 0x56, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x46, 0x50, 0x33, 0x32, 0x10, 0x17, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x54, 0x5f, 0x56, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x46, 0x50, 0x36, 0x34, 0x10, 0x18, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x54, 0x5f, 0x56, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x34, 0x10, 0x19, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x54, 0x5f, 0x56, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x1a, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x54, 0x5f, 0x56, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x1b, 0x42, 0x12, 0x5a, 0x10, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2f, 0x73, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_proto_common_proto_rawDescOnce sync.Once file_proto_common_proto_rawDescData = file_proto_common_proto_rawDesc ) func file_proto_common_proto_rawDescGZIP() []byte { file_proto_common_proto_rawDescOnce.Do(func() { file_proto_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_common_proto_rawDescData) }) return file_proto_common_proto_rawDescData } var file_proto_common_proto_enumTypes = make([]protoimpl.EnumInfo, 5) var file_proto_common_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_proto_common_proto_goTypes = []interface{}{ (OperationType)(0), // 0: proxima.be.proto.OperationType (FeatureType)(0), // 1: proxima.be.proto.FeatureType (IndexType)(0), // 2: proxima.be.proto.IndexType (DataType)(0), // 3: proxima.be.proto.DataType (GenericValueMeta_FieldType)(0), // 4: proxima.be.proto.GenericValueMeta.FieldType (*GenericValue)(nil), // 5: proxima.be.proto.GenericValue (*GenericValueList)(nil), // 6: proxima.be.proto.GenericValueList (*GenericValueMeta)(nil), // 7: proxima.be.proto.GenericValueMeta (*GenericKeyValue)(nil), // 8: proxima.be.proto.GenericKeyValue (*KeyValuePair)(nil), // 9: proxima.be.proto.KeyValuePair (*CommonResponse)(nil), // 10: proxima.be.proto.CommonResponse (*Status)(nil), // 11: proxima.be.proto.Status (*HttpRequest)(nil), // 12: proxima.be.proto.HttpRequest (*HttpResponse)(nil), // 13: proxima.be.proto.HttpResponse } var file_proto_common_proto_depIdxs = []int32{ 5, // 0: proxima.be.proto.GenericValueList.values:type_name -> proxima.be.proto.GenericValue 4, // 1: proxima.be.proto.GenericValueMeta.field_type:type_name -> proxima.be.proto.GenericValueMeta.FieldType 5, // 2: proxima.be.proto.GenericKeyValue.value:type_name -> proxima.be.proto.GenericValue 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name } func init() { file_proto_common_proto_init() } func file_proto_common_proto_init() { if File_proto_common_proto != nil { return } if !protoimpl.UnsafeEnabled { file_proto_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenericValue); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenericValueList); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenericValueMeta); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenericKeyValue); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*KeyValuePair); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CommonResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Status); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HttpRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HttpResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_proto_common_proto_msgTypes[0].OneofWrappers = []interface{}{ (*GenericValue_BytesValue)(nil), (*GenericValue_StringValue)(nil), (*GenericValue_BoolValue)(nil), (*GenericValue_Int32Value)(nil), (*GenericValue_Int64Value)(nil), (*GenericValue_Uint32Value)(nil), (*GenericValue_Uint64Value)(nil), (*GenericValue_FloatValue)(nil), (*GenericValue_DoubleValue)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_common_proto_rawDesc, NumEnums: 5, NumMessages: 9, NumExtensions: 0, NumServices: 0, }, GoTypes: file_proto_common_proto_goTypes, DependencyIndexes: file_proto_common_proto_depIdxs, EnumInfos: file_proto_common_proto_enumTypes, MessageInfos: file_proto_common_proto_msgTypes, }.Build() File_proto_common_proto = out.File file_proto_common_proto_rawDesc = nil file_proto_common_proto_goTypes = nil file_proto_common_proto_depIdxs = nil } ================================================ FILE: sdk/go/proto/config.pb.go ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Config definition for proxima_be */ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 // protoc v3.14.0 // source: proto/config.proto package proto import ( proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // This is a compile-time assertion that a sufficiently up-to-date version // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 type MetricsConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } func (x *MetricsConfig) Reset() { *x = MetricsConfig{} if protoimpl.UnsafeEnabled { mi := &file_proto_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MetricsConfig) String() string { return protoimpl.X.MessageStringOf(x) } func (*MetricsConfig) ProtoMessage() {} func (x *MetricsConfig) ProtoReflect() protoreflect.Message { mi := &file_proto_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use MetricsConfig.ProtoReflect.Descriptor instead. func (*MetricsConfig) Descriptor() ([]byte, []int) { return file_proto_config_proto_rawDescGZIP(), []int{0} } func (x *MetricsConfig) GetName() string { if x != nil { return x.Name } return "" } //! Message of Common Config type CommonConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Protocol string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` GrpcListenPort uint32 `protobuf:"varint,2,opt,name=grpc_listen_port,json=grpcListenPort,proto3" json:"grpc_listen_port,omitempty"` HttpListenPort uint32 `protobuf:"varint,3,opt,name=http_listen_port,json=httpListenPort,proto3" json:"http_listen_port,omitempty"` LoggerType string `protobuf:"bytes,4,opt,name=logger_type,json=loggerType,proto3" json:"logger_type,omitempty"` LogDirectory string `protobuf:"bytes,5,opt,name=log_directory,json=logDirectory,proto3" json:"log_directory,omitempty"` LogFile string `protobuf:"bytes,6,opt,name=log_file,json=logFile,proto3" json:"log_file,omitempty"` LogLevel int32 `protobuf:"varint,7,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` MetricsConfig *MetricsConfig `protobuf:"bytes,8,opt,name=metrics_config,json=metricsConfig,proto3" json:"metrics_config,omitempty"` } func (x *CommonConfig) Reset() { *x = CommonConfig{} if protoimpl.UnsafeEnabled { mi := &file_proto_config_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CommonConfig) String() string { return protoimpl.X.MessageStringOf(x) } func (*CommonConfig) ProtoMessage() {} func (x *CommonConfig) ProtoReflect() protoreflect.Message { mi := &file_proto_config_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CommonConfig.ProtoReflect.Descriptor instead. func (*CommonConfig) Descriptor() ([]byte, []int) { return file_proto_config_proto_rawDescGZIP(), []int{1} } func (x *CommonConfig) GetProtocol() string { if x != nil { return x.Protocol } return "" } func (x *CommonConfig) GetGrpcListenPort() uint32 { if x != nil { return x.GrpcListenPort } return 0 } func (x *CommonConfig) GetHttpListenPort() uint32 { if x != nil { return x.HttpListenPort } return 0 } func (x *CommonConfig) GetLoggerType() string { if x != nil { return x.LoggerType } return "" } func (x *CommonConfig) GetLogDirectory() string { if x != nil { return x.LogDirectory } return "" } func (x *CommonConfig) GetLogFile() string { if x != nil { return x.LogFile } return "" } func (x *CommonConfig) GetLogLevel() int32 { if x != nil { return x.LogLevel } return 0 } func (x *CommonConfig) GetMetricsConfig() *MetricsConfig { if x != nil { return x.MetricsConfig } return nil } //! Message of Query Config type QueryConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields QueryThreadCount uint32 `protobuf:"varint,1,opt,name=query_thread_count,json=queryThreadCount,proto3" json:"query_thread_count,omitempty"` } func (x *QueryConfig) Reset() { *x = QueryConfig{} if protoimpl.UnsafeEnabled { mi := &file_proto_config_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryConfig) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryConfig) ProtoMessage() {} func (x *QueryConfig) ProtoReflect() protoreflect.Message { mi := &file_proto_config_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use QueryConfig.ProtoReflect.Descriptor instead. func (*QueryConfig) Descriptor() ([]byte, []int) { return file_proto_config_proto_rawDescGZIP(), []int{2} } func (x *QueryConfig) GetQueryThreadCount() uint32 { if x != nil { return x.QueryThreadCount } return 0 } //! Message of Index Config type IndexConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields BuildThreadCount uint32 `protobuf:"varint,1,opt,name=build_thread_count,json=buildThreadCount,proto3" json:"build_thread_count,omitempty"` DumpThreadCount uint32 `protobuf:"varint,2,opt,name=dump_thread_count,json=dumpThreadCount,proto3" json:"dump_thread_count,omitempty"` MaxBuildQps uint32 `protobuf:"varint,3,opt,name=max_build_qps,json=maxBuildQps,proto3" json:"max_build_qps,omitempty"` IndexDirectory string `protobuf:"bytes,5,opt,name=index_directory,json=indexDirectory,proto3" json:"index_directory,omitempty"` FlushInternal uint32 `protobuf:"varint,6,opt,name=flush_internal,json=flushInternal,proto3" json:"flush_internal,omitempty"` } func (x *IndexConfig) Reset() { *x = IndexConfig{} if protoimpl.UnsafeEnabled { mi := &file_proto_config_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *IndexConfig) String() string { return protoimpl.X.MessageStringOf(x) } func (*IndexConfig) ProtoMessage() {} func (x *IndexConfig) ProtoReflect() protoreflect.Message { mi := &file_proto_config_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use IndexConfig.ProtoReflect.Descriptor instead. func (*IndexConfig) Descriptor() ([]byte, []int) { return file_proto_config_proto_rawDescGZIP(), []int{3} } func (x *IndexConfig) GetBuildThreadCount() uint32 { if x != nil { return x.BuildThreadCount } return 0 } func (x *IndexConfig) GetDumpThreadCount() uint32 { if x != nil { return x.DumpThreadCount } return 0 } func (x *IndexConfig) GetMaxBuildQps() uint32 { if x != nil { return x.MaxBuildQps } return 0 } func (x *IndexConfig) GetIndexDirectory() string { if x != nil { return x.IndexDirectory } return "" } func (x *IndexConfig) GetFlushInternal() uint32 { if x != nil { return x.FlushInternal } return 0 } //! Meta configuration type MetaConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields MetaUri string `protobuf:"bytes,1,opt,name=meta_uri,json=metaUri,proto3" json:"meta_uri,omitempty"` // meta database config, default sqlite://meta.sqlite } func (x *MetaConfig) Reset() { *x = MetaConfig{} if protoimpl.UnsafeEnabled { mi := &file_proto_config_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MetaConfig) String() string { return protoimpl.X.MessageStringOf(x) } func (*MetaConfig) ProtoMessage() {} func (x *MetaConfig) ProtoReflect() protoreflect.Message { mi := &file_proto_config_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use MetaConfig.ProtoReflect.Descriptor instead. func (*MetaConfig) Descriptor() ([]byte, []int) { return file_proto_config_proto_rawDescGZIP(), []int{4} } func (x *MetaConfig) GetMetaUri() string { if x != nil { return x.MetaUri } return "" } //! Message of Proxima BE Config type ProximaSEConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields CommonConfig *CommonConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` QueryConfig *QueryConfig `protobuf:"bytes,2,opt,name=query_config,json=queryConfig,proto3" json:"query_config,omitempty"` IndexConfig *IndexConfig `protobuf:"bytes,3,opt,name=index_config,json=indexConfig,proto3" json:"index_config,omitempty"` MetaConfig *MetaConfig `protobuf:"bytes,4,opt,name=meta_config,json=metaConfig,proto3" json:"meta_config,omitempty"` } func (x *ProximaSEConfig) Reset() { *x = ProximaSEConfig{} if protoimpl.UnsafeEnabled { mi := &file_proto_config_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ProximaSEConfig) String() string { return protoimpl.X.MessageStringOf(x) } func (*ProximaSEConfig) ProtoMessage() {} func (x *ProximaSEConfig) ProtoReflect() protoreflect.Message { mi := &file_proto_config_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ProximaSEConfig.ProtoReflect.Descriptor instead. func (*ProximaSEConfig) Descriptor() ([]byte, []int) { return file_proto_config_proto_rawDescGZIP(), []int{5} } func (x *ProximaSEConfig) GetCommonConfig() *CommonConfig { if x != nil { return x.CommonConfig } return nil } func (x *ProximaSEConfig) GetQueryConfig() *QueryConfig { if x != nil { return x.QueryConfig } return nil } func (x *ProximaSEConfig) GetIndexConfig() *IndexConfig { if x != nil { return x.IndexConfig } return nil } func (x *ProximaSEConfig) GetMetaConfig() *MetaConfig { if x != nil { return x.MetaConfig } return nil } var File_proto_config_proto protoreflect.FileDescriptor var file_proto_config_proto_rawDesc = []byte{ 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x23, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xc4, 0x02, 0x0a, 0x0c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x28, 0x0a, 0x10, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x67, 0x72, 0x70, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x68, 0x74, 0x74, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x46, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x3b, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2c, 0x0a, 0x12, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xdb, 0x01, 0x0a, 0x0b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2c, 0x0a, 0x12, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x64, 0x75, 0x6d, 0x70, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x71, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x51, 0x70, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x22, 0x27, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x61, 0x55, 0x72, 0x69, 0x22, 0x99, 0x02, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x53, 0x45, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x43, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x40, 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x40, 0x0a, 0x0c, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x12, 0x5a, 0x10, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2f, 0x73, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_proto_config_proto_rawDescOnce sync.Once file_proto_config_proto_rawDescData = file_proto_config_proto_rawDesc ) func file_proto_config_proto_rawDescGZIP() []byte { file_proto_config_proto_rawDescOnce.Do(func() { file_proto_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_config_proto_rawDescData) }) return file_proto_config_proto_rawDescData } var file_proto_config_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_proto_config_proto_goTypes = []interface{}{ (*MetricsConfig)(nil), // 0: proxima.be.proto.MetricsConfig (*CommonConfig)(nil), // 1: proxima.be.proto.CommonConfig (*QueryConfig)(nil), // 2: proxima.be.proto.QueryConfig (*IndexConfig)(nil), // 3: proxima.be.proto.IndexConfig (*MetaConfig)(nil), // 4: proxima.be.proto.MetaConfig (*ProximaSEConfig)(nil), // 5: proxima.be.proto.ProximaSEConfig } var file_proto_config_proto_depIdxs = []int32{ 0, // 0: proxima.be.proto.CommonConfig.metrics_config:type_name -> proxima.be.proto.MetricsConfig 1, // 1: proxima.be.proto.ProximaSEConfig.common_config:type_name -> proxima.be.proto.CommonConfig 2, // 2: proxima.be.proto.ProximaSEConfig.query_config:type_name -> proxima.be.proto.QueryConfig 3, // 3: proxima.be.proto.ProximaSEConfig.index_config:type_name -> proxima.be.proto.IndexConfig 4, // 4: proxima.be.proto.ProximaSEConfig.meta_config:type_name -> proxima.be.proto.MetaConfig 5, // [5:5] is the sub-list for method output_type 5, // [5:5] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name 5, // [5:5] is the sub-list for extension extendee 0, // [0:5] is the sub-list for field type_name } func init() { file_proto_config_proto_init() } func file_proto_config_proto_init() { if File_proto_config_proto != nil { return } if !protoimpl.UnsafeEnabled { file_proto_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MetricsConfig); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CommonConfig); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryConfig); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IndexConfig); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MetaConfig); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProximaSEConfig); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_config_proto_rawDesc, NumEnums: 0, NumMessages: 6, NumExtensions: 0, NumServices: 0, }, GoTypes: file_proto_config_proto_goTypes, DependencyIndexes: file_proto_config_proto_depIdxs, MessageInfos: file_proto_config_proto_msgTypes, }.Build() File_proto_config_proto = out.File file_proto_config_proto_rawDesc = nil file_proto_config_proto_goTypes = nil file_proto_config_proto_depIdxs = nil } ================================================ FILE: sdk/go/proto/proxima_be.pb.go ================================================ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 // protoc v3.14.0 // source: proto/proxima_be.proto package proto import ( context "context" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // This is a compile-time assertion that a sufficiently up-to-date version // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 type CollectionConfig_RepositoryConfig_RepositoryType int32 const ( CollectionConfig_RepositoryConfig_RT_DATABASE CollectionConfig_RepositoryConfig_RepositoryType = 0 ) // Enum value maps for CollectionConfig_RepositoryConfig_RepositoryType. var ( CollectionConfig_RepositoryConfig_RepositoryType_name = map[int32]string{ 0: "RT_DATABASE", } CollectionConfig_RepositoryConfig_RepositoryType_value = map[string]int32{ "RT_DATABASE": 0, } ) func (x CollectionConfig_RepositoryConfig_RepositoryType) Enum() *CollectionConfig_RepositoryConfig_RepositoryType { p := new(CollectionConfig_RepositoryConfig_RepositoryType) *p = x return p } func (x CollectionConfig_RepositoryConfig_RepositoryType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (CollectionConfig_RepositoryConfig_RepositoryType) Descriptor() protoreflect.EnumDescriptor { return file_proto_proxima_be_proto_enumTypes[0].Descriptor() } func (CollectionConfig_RepositoryConfig_RepositoryType) Type() protoreflect.EnumType { return &file_proto_proxima_be_proto_enumTypes[0] } func (x CollectionConfig_RepositoryConfig_RepositoryType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use CollectionConfig_RepositoryConfig_RepositoryType.Descriptor instead. func (CollectionConfig_RepositoryConfig_RepositoryType) EnumDescriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{0, 1, 0} } type CollectionInfo_CollectionStatus int32 const ( CollectionInfo_CS_INITIALIZED CollectionInfo_CollectionStatus = 0 CollectionInfo_CS_SERVING CollectionInfo_CollectionStatus = 1 CollectionInfo_CS_DROPPED CollectionInfo_CollectionStatus = 2 ) // Enum value maps for CollectionInfo_CollectionStatus. var ( CollectionInfo_CollectionStatus_name = map[int32]string{ 0: "CS_INITIALIZED", 1: "CS_SERVING", 2: "CS_DROPPED", } CollectionInfo_CollectionStatus_value = map[string]int32{ "CS_INITIALIZED": 0, "CS_SERVING": 1, "CS_DROPPED": 2, } ) func (x CollectionInfo_CollectionStatus) Enum() *CollectionInfo_CollectionStatus { p := new(CollectionInfo_CollectionStatus) *p = x return p } func (x CollectionInfo_CollectionStatus) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (CollectionInfo_CollectionStatus) Descriptor() protoreflect.EnumDescriptor { return file_proto_proxima_be_proto_enumTypes[1].Descriptor() } func (CollectionInfo_CollectionStatus) Type() protoreflect.EnumType { return &file_proto_proxima_be_proto_enumTypes[1] } func (x CollectionInfo_CollectionStatus) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use CollectionInfo_CollectionStatus.Descriptor instead. func (CollectionInfo_CollectionStatus) EnumDescriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{3, 0} } type CollectionStats_SegmentStats_SegmentState int32 const ( CollectionStats_SegmentStats_SS_CREATED CollectionStats_SegmentStats_SegmentState = 0 CollectionStats_SegmentStats_SS_WRITING CollectionStats_SegmentStats_SegmentState = 1 CollectionStats_SegmentStats_SS_DUMPING CollectionStats_SegmentStats_SegmentState = 2 CollectionStats_SegmentStats_SS_COMPACTING CollectionStats_SegmentStats_SegmentState = 3 CollectionStats_SegmentStats_SS_PERSIST CollectionStats_SegmentStats_SegmentState = 4 ) // Enum value maps for CollectionStats_SegmentStats_SegmentState. var ( CollectionStats_SegmentStats_SegmentState_name = map[int32]string{ 0: "SS_CREATED", 1: "SS_WRITING", 2: "SS_DUMPING", 3: "SS_COMPACTING", 4: "SS_PERSIST", } CollectionStats_SegmentStats_SegmentState_value = map[string]int32{ "SS_CREATED": 0, "SS_WRITING": 1, "SS_DUMPING": 2, "SS_COMPACTING": 3, "SS_PERSIST": 4, } ) func (x CollectionStats_SegmentStats_SegmentState) Enum() *CollectionStats_SegmentStats_SegmentState { p := new(CollectionStats_SegmentStats_SegmentState) *p = x return p } func (x CollectionStats_SegmentStats_SegmentState) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (CollectionStats_SegmentStats_SegmentState) Descriptor() protoreflect.EnumDescriptor { return file_proto_proxima_be_proto_enumTypes[2].Descriptor() } func (CollectionStats_SegmentStats_SegmentState) Type() protoreflect.EnumType { return &file_proto_proxima_be_proto_enumTypes[2] } func (x CollectionStats_SegmentStats_SegmentState) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use CollectionStats_SegmentStats_SegmentState.Descriptor instead. func (CollectionStats_SegmentStats_SegmentState) EnumDescriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{7, 0, 0} } type QueryRequest_QueryType int32 const ( QueryRequest_QT_KNN QueryRequest_QueryType = 0 ) // Enum value maps for QueryRequest_QueryType. var ( QueryRequest_QueryType_name = map[int32]string{ 0: "QT_KNN", } QueryRequest_QueryType_value = map[string]int32{ "QT_KNN": 0, } ) func (x QueryRequest_QueryType) Enum() *QueryRequest_QueryType { p := new(QueryRequest_QueryType) *p = x return p } func (x QueryRequest_QueryType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (QueryRequest_QueryType) Descriptor() protoreflect.EnumDescriptor { return file_proto_proxima_be_proto_enumTypes[3].Descriptor() } func (QueryRequest_QueryType) Type() protoreflect.EnumType { return &file_proto_proxima_be_proto_enumTypes[3] } func (x QueryRequest_QueryType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use QueryRequest_QueryType.Descriptor instead. func (QueryRequest_QueryType) EnumDescriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{11, 0} } type CollectionConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields CollectionName string `protobuf:"bytes,1,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` MaxDocsPerSegment uint64 `protobuf:"varint,2,opt,name=max_docs_per_segment,json=maxDocsPerSegment,proto3" json:"max_docs_per_segment,omitempty"` ForwardColumnNames []string `protobuf:"bytes,3,rep,name=forward_column_names,json=forwardColumnNames,proto3" json:"forward_column_names,omitempty"` IndexColumnParams []*CollectionConfig_IndexColumnParam `protobuf:"bytes,4,rep,name=index_column_params,json=indexColumnParams,proto3" json:"index_column_params,omitempty"` RepositoryConfig *CollectionConfig_RepositoryConfig `protobuf:"bytes,5,opt,name=repository_config,json=repositoryConfig,proto3" json:"repository_config,omitempty"` //optional } func (x *CollectionConfig) Reset() { *x = CollectionConfig{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CollectionConfig) String() string { return protoimpl.X.MessageStringOf(x) } func (*CollectionConfig) ProtoMessage() {} func (x *CollectionConfig) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CollectionConfig.ProtoReflect.Descriptor instead. func (*CollectionConfig) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{0} } func (x *CollectionConfig) GetCollectionName() string { if x != nil { return x.CollectionName } return "" } func (x *CollectionConfig) GetMaxDocsPerSegment() uint64 { if x != nil { return x.MaxDocsPerSegment } return 0 } func (x *CollectionConfig) GetForwardColumnNames() []string { if x != nil { return x.ForwardColumnNames } return nil } func (x *CollectionConfig) GetIndexColumnParams() []*CollectionConfig_IndexColumnParam { if x != nil { return x.IndexColumnParams } return nil } func (x *CollectionConfig) GetRepositoryConfig() *CollectionConfig_RepositoryConfig { if x != nil { return x.RepositoryConfig } return nil } type CollectionName struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields CollectionName string `protobuf:"bytes,1,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` } func (x *CollectionName) Reset() { *x = CollectionName{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CollectionName) String() string { return protoimpl.X.MessageStringOf(x) } func (*CollectionName) ProtoMessage() {} func (x *CollectionName) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CollectionName.ProtoReflect.Descriptor instead. func (*CollectionName) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{1} } func (x *CollectionName) GetCollectionName() string { if x != nil { return x.CollectionName } return "" } type LsnContext struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Lsn uint64 `protobuf:"varint,1,opt,name=lsn,proto3" json:"lsn,omitempty"` Context string `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"` } func (x *LsnContext) Reset() { *x = LsnContext{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *LsnContext) String() string { return protoimpl.X.MessageStringOf(x) } func (*LsnContext) ProtoMessage() {} func (x *LsnContext) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use LsnContext.ProtoReflect.Descriptor instead. func (*LsnContext) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{2} } func (x *LsnContext) GetLsn() uint64 { if x != nil { return x.Lsn } return 0 } func (x *LsnContext) GetContext() string { if x != nil { return x.Context } return "" } type CollectionInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // static collection config Config *CollectionConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` // variable collection status Status CollectionInfo_CollectionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=proxima.be.proto.CollectionInfo_CollectionStatus" json:"status,omitempty"` Uuid string `protobuf:"bytes,3,opt,name=uuid,proto3" json:"uuid,omitempty"` LatestLsnContext *LsnContext `protobuf:"bytes,4,opt,name=latest_lsn_context,json=latestLsnContext,proto3" json:"latest_lsn_context,omitempty"` MagicNumber uint64 `protobuf:"varint,5,opt,name=magic_number,json=magicNumber,proto3" json:"magic_number,omitempty"` } func (x *CollectionInfo) Reset() { *x = CollectionInfo{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CollectionInfo) String() string { return protoimpl.X.MessageStringOf(x) } func (*CollectionInfo) ProtoMessage() {} func (x *CollectionInfo) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CollectionInfo.ProtoReflect.Descriptor instead. func (*CollectionInfo) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{3} } func (x *CollectionInfo) GetConfig() *CollectionConfig { if x != nil { return x.Config } return nil } func (x *CollectionInfo) GetStatus() CollectionInfo_CollectionStatus { if x != nil { return x.Status } return CollectionInfo_CS_INITIALIZED } func (x *CollectionInfo) GetUuid() string { if x != nil { return x.Uuid } return "" } func (x *CollectionInfo) GetLatestLsnContext() *LsnContext { if x != nil { return x.LatestLsnContext } return nil } func (x *CollectionInfo) GetMagicNumber() uint64 { if x != nil { return x.MagicNumber } return 0 } type DescribeCollectionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` Collection *CollectionInfo `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` } func (x *DescribeCollectionResponse) Reset() { *x = DescribeCollectionResponse{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DescribeCollectionResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*DescribeCollectionResponse) ProtoMessage() {} func (x *DescribeCollectionResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use DescribeCollectionResponse.ProtoReflect.Descriptor instead. func (*DescribeCollectionResponse) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{4} } func (x *DescribeCollectionResponse) GetStatus() *Status { if x != nil { return x.Status } return nil } func (x *DescribeCollectionResponse) GetCollection() *CollectionInfo { if x != nil { return x.Collection } return nil } type ListCondition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RepositoryName string `protobuf:"bytes,1,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"` // optional } func (x *ListCondition) Reset() { *x = ListCondition{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ListCondition) String() string { return protoimpl.X.MessageStringOf(x) } func (*ListCondition) ProtoMessage() {} func (x *ListCondition) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ListCondition.ProtoReflect.Descriptor instead. func (*ListCondition) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{5} } func (x *ListCondition) GetRepositoryName() string { if x != nil { return x.RepositoryName } return "" } type ListCollectionsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` Collections []*CollectionInfo `protobuf:"bytes,2,rep,name=collections,proto3" json:"collections,omitempty"` } func (x *ListCollectionsResponse) Reset() { *x = ListCollectionsResponse{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ListCollectionsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ListCollectionsResponse) ProtoMessage() {} func (x *ListCollectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ListCollectionsResponse.ProtoReflect.Descriptor instead. func (*ListCollectionsResponse) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{6} } func (x *ListCollectionsResponse) GetStatus() *Status { if x != nil { return x.Status } return nil } func (x *ListCollectionsResponse) GetCollections() []*CollectionInfo { if x != nil { return x.Collections } return nil } type CollectionStats struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields CollectionName string `protobuf:"bytes,1,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` CollectionPath string `protobuf:"bytes,2,opt,name=collection_path,json=collectionPath,proto3" json:"collection_path,omitempty"` TotalDocCount uint64 `protobuf:"varint,3,opt,name=total_doc_count,json=totalDocCount,proto3" json:"total_doc_count,omitempty"` TotalSegmentCount uint64 `protobuf:"varint,4,opt,name=total_segment_count,json=totalSegmentCount,proto3" json:"total_segment_count,omitempty"` TotalIndexFileCount uint64 `protobuf:"varint,5,opt,name=total_index_file_count,json=totalIndexFileCount,proto3" json:"total_index_file_count,omitempty"` TotalIndexFileSize uint64 `protobuf:"varint,6,opt,name=total_index_file_size,json=totalIndexFileSize,proto3" json:"total_index_file_size,omitempty"` SegmentStats []*CollectionStats_SegmentStats `protobuf:"bytes,7,rep,name=segment_stats,json=segmentStats,proto3" json:"segment_stats,omitempty"` } func (x *CollectionStats) Reset() { *x = CollectionStats{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CollectionStats) String() string { return protoimpl.X.MessageStringOf(x) } func (*CollectionStats) ProtoMessage() {} func (x *CollectionStats) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CollectionStats.ProtoReflect.Descriptor instead. func (*CollectionStats) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{7} } func (x *CollectionStats) GetCollectionName() string { if x != nil { return x.CollectionName } return "" } func (x *CollectionStats) GetCollectionPath() string { if x != nil { return x.CollectionPath } return "" } func (x *CollectionStats) GetTotalDocCount() uint64 { if x != nil { return x.TotalDocCount } return 0 } func (x *CollectionStats) GetTotalSegmentCount() uint64 { if x != nil { return x.TotalSegmentCount } return 0 } func (x *CollectionStats) GetTotalIndexFileCount() uint64 { if x != nil { return x.TotalIndexFileCount } return 0 } func (x *CollectionStats) GetTotalIndexFileSize() uint64 { if x != nil { return x.TotalIndexFileSize } return 0 } func (x *CollectionStats) GetSegmentStats() []*CollectionStats_SegmentStats { if x != nil { return x.SegmentStats } return nil } type StatsCollectionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` CollectionStats *CollectionStats `protobuf:"bytes,2,opt,name=collection_stats,json=collectionStats,proto3" json:"collection_stats,omitempty"` } func (x *StatsCollectionResponse) Reset() { *x = StatsCollectionResponse{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *StatsCollectionResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*StatsCollectionResponse) ProtoMessage() {} func (x *StatsCollectionResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use StatsCollectionResponse.ProtoReflect.Descriptor instead. func (*StatsCollectionResponse) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{8} } func (x *StatsCollectionResponse) GetStatus() *Status { if x != nil { return x.Status } return nil } func (x *StatsCollectionResponse) GetCollectionStats() *CollectionStats { if x != nil { return x.CollectionStats } return nil } type WriteRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields CollectionName string `protobuf:"bytes,1,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` RowMeta *WriteRequest_RowMeta `protobuf:"bytes,2,opt,name=row_meta,json=rowMeta,proto3" json:"row_meta,omitempty"` Rows []*WriteRequest_Row `protobuf:"bytes,3,rep,name=rows,proto3" json:"rows,omitempty"` RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // optional MagicNumber uint64 `protobuf:"varint,5,opt,name=magic_number,json=magicNumber,proto3" json:"magic_number,omitempty"` // optional } func (x *WriteRequest) Reset() { *x = WriteRequest{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *WriteRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*WriteRequest) ProtoMessage() {} func (x *WriteRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead. func (*WriteRequest) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{9} } func (x *WriteRequest) GetCollectionName() string { if x != nil { return x.CollectionName } return "" } func (x *WriteRequest) GetRowMeta() *WriteRequest_RowMeta { if x != nil { return x.RowMeta } return nil } func (x *WriteRequest) GetRows() []*WriteRequest_Row { if x != nil { return x.Rows } return nil } func (x *WriteRequest) GetRequestId() string { if x != nil { return x.RequestId } return "" } func (x *WriteRequest) GetMagicNumber() uint64 { if x != nil { return x.MagicNumber } return 0 } type Document struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PrimaryKey uint64 `protobuf:"varint,1,opt,name=primary_key,json=primaryKey,proto3" json:"primary_key,omitempty"` Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"` ForwardColumnValues []*GenericKeyValue `protobuf:"bytes,3,rep,name=forward_column_values,json=forwardColumnValues,proto3" json:"forward_column_values,omitempty"` } func (x *Document) Reset() { *x = Document{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Document) String() string { return protoimpl.X.MessageStringOf(x) } func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Document.ProtoReflect.Descriptor instead. func (*Document) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{10} } func (x *Document) GetPrimaryKey() uint64 { if x != nil { return x.PrimaryKey } return 0 } func (x *Document) GetScore() float32 { if x != nil { return x.Score } return 0 } func (x *Document) GetForwardColumnValues() []*GenericKeyValue { if x != nil { return x.ForwardColumnValues } return nil } type QueryRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields CollectionName string `protobuf:"bytes,1,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` QueryType QueryRequest_QueryType `protobuf:"varint,2,opt,name=query_type,json=queryType,proto3,enum=proxima.be.proto.QueryRequest_QueryType" json:"query_type,omitempty"` DebugMode bool `protobuf:"varint,3,opt,name=debug_mode,json=debugMode,proto3" json:"debug_mode,omitempty"` // Types that are assignable to QueryParam: // *QueryRequest_KnnParam QueryParam isQueryRequest_QueryParam `protobuf_oneof:"query_param"` } func (x *QueryRequest) Reset() { *x = QueryRequest{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryRequest) ProtoMessage() {} func (x *QueryRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead. func (*QueryRequest) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{11} } func (x *QueryRequest) GetCollectionName() string { if x != nil { return x.CollectionName } return "" } func (x *QueryRequest) GetQueryType() QueryRequest_QueryType { if x != nil { return x.QueryType } return QueryRequest_QT_KNN } func (x *QueryRequest) GetDebugMode() bool { if x != nil { return x.DebugMode } return false } func (m *QueryRequest) GetQueryParam() isQueryRequest_QueryParam { if m != nil { return m.QueryParam } return nil } func (x *QueryRequest) GetKnnParam() *QueryRequest_KnnQueryParam { if x, ok := x.GetQueryParam().(*QueryRequest_KnnParam); ok { return x.KnnParam } return nil } type isQueryRequest_QueryParam interface { isQueryRequest_QueryParam() } type QueryRequest_KnnParam struct { KnnParam *QueryRequest_KnnQueryParam `protobuf:"bytes,4,opt,name=knn_param,json=knnParam,proto3,oneof"` } func (*QueryRequest_KnnParam) isQueryRequest_QueryParam() {} type QueryResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` DebugInfo string `protobuf:"bytes,2,opt,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"` LatencyUs uint64 `protobuf:"varint,3,opt,name=latency_us,json=latencyUs,proto3" json:"latency_us,omitempty"` Results []*QueryResponse_Result `protobuf:"bytes,4,rep,name=results,proto3" json:"results,omitempty"` } func (x *QueryResponse) Reset() { *x = QueryResponse{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryResponse) ProtoMessage() {} func (x *QueryResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead. func (*QueryResponse) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{12} } func (x *QueryResponse) GetStatus() *Status { if x != nil { return x.Status } return nil } func (x *QueryResponse) GetDebugInfo() string { if x != nil { return x.DebugInfo } return "" } func (x *QueryResponse) GetLatencyUs() uint64 { if x != nil { return x.LatencyUs } return 0 } func (x *QueryResponse) GetResults() []*QueryResponse_Result { if x != nil { return x.Results } return nil } type GetDocumentRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields CollectionName string `protobuf:"bytes,1,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` PrimaryKey uint64 `protobuf:"varint,2,opt,name=primary_key,json=primaryKey,proto3" json:"primary_key,omitempty"` DebugMode bool `protobuf:"varint,3,opt,name=debug_mode,json=debugMode,proto3" json:"debug_mode,omitempty"` } func (x *GetDocumentRequest) Reset() { *x = GetDocumentRequest{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetDocumentRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetDocumentRequest) ProtoMessage() {} func (x *GetDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GetDocumentRequest.ProtoReflect.Descriptor instead. func (*GetDocumentRequest) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{13} } func (x *GetDocumentRequest) GetCollectionName() string { if x != nil { return x.CollectionName } return "" } func (x *GetDocumentRequest) GetPrimaryKey() uint64 { if x != nil { return x.PrimaryKey } return 0 } func (x *GetDocumentRequest) GetDebugMode() bool { if x != nil { return x.DebugMode } return false } type GetDocumentResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` DebugInfo string `protobuf:"bytes,2,opt,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"` Document *Document `protobuf:"bytes,3,opt,name=document,proto3" json:"document,omitempty"` } func (x *GetDocumentResponse) Reset() { *x = GetDocumentResponse{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetDocumentResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetDocumentResponse) ProtoMessage() {} func (x *GetDocumentResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GetDocumentResponse.ProtoReflect.Descriptor instead. func (*GetDocumentResponse) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{14} } func (x *GetDocumentResponse) GetStatus() *Status { if x != nil { return x.Status } return nil } func (x *GetDocumentResponse) GetDebugInfo() string { if x != nil { return x.DebugInfo } return "" } func (x *GetDocumentResponse) GetDocument() *Document { if x != nil { return x.Document } return nil } type GetVersionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *GetVersionRequest) Reset() { *x = GetVersionRequest{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetVersionRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetVersionRequest) ProtoMessage() {} func (x *GetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GetVersionRequest.ProtoReflect.Descriptor instead. func (*GetVersionRequest) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{15} } type GetVersionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` } func (x *GetVersionResponse) Reset() { *x = GetVersionResponse{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GetVersionResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetVersionResponse) ProtoMessage() {} func (x *GetVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GetVersionResponse.ProtoReflect.Descriptor instead. func (*GetVersionResponse) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{16} } func (x *GetVersionResponse) GetStatus() *Status { if x != nil { return x.Status } return nil } func (x *GetVersionResponse) GetVersion() string { if x != nil { return x.Version } return "" } type CollectionConfig_IndexColumnParam struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ColumnName string `protobuf:"bytes,1,opt,name=column_name,json=columnName,proto3" json:"column_name,omitempty"` IndexType IndexType `protobuf:"varint,2,opt,name=index_type,json=indexType,proto3,enum=proxima.be.proto.IndexType" json:"index_type,omitempty"` DataType DataType `protobuf:"varint,3,opt,name=data_type,json=dataType,proto3,enum=proxima.be.proto.DataType" json:"data_type,omitempty"` Dimension uint32 `protobuf:"varint,4,opt,name=dimension,proto3" json:"dimension,omitempty"` ExtraParams []*KeyValuePair `protobuf:"bytes,5,rep,name=extra_params,json=extraParams,proto3" json:"extra_params,omitempty"` //optional } func (x *CollectionConfig_IndexColumnParam) Reset() { *x = CollectionConfig_IndexColumnParam{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CollectionConfig_IndexColumnParam) String() string { return protoimpl.X.MessageStringOf(x) } func (*CollectionConfig_IndexColumnParam) ProtoMessage() {} func (x *CollectionConfig_IndexColumnParam) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CollectionConfig_IndexColumnParam.ProtoReflect.Descriptor instead. func (*CollectionConfig_IndexColumnParam) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{0, 0} } func (x *CollectionConfig_IndexColumnParam) GetColumnName() string { if x != nil { return x.ColumnName } return "" } func (x *CollectionConfig_IndexColumnParam) GetIndexType() IndexType { if x != nil { return x.IndexType } return IndexType_IT_UNDEFINED } func (x *CollectionConfig_IndexColumnParam) GetDataType() DataType { if x != nil { return x.DataType } return DataType_DT_UNDEFINED } func (x *CollectionConfig_IndexColumnParam) GetDimension() uint32 { if x != nil { return x.Dimension } return 0 } func (x *CollectionConfig_IndexColumnParam) GetExtraParams() []*KeyValuePair { if x != nil { return x.ExtraParams } return nil } type CollectionConfig_RepositoryConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields RepositoryType CollectionConfig_RepositoryConfig_RepositoryType `protobuf:"varint,1,opt,name=repository_type,json=repositoryType,proto3,enum=proxima.be.proto.CollectionConfig_RepositoryConfig_RepositoryType" json:"repository_type,omitempty"` RepositoryName string `protobuf:"bytes,2,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"` // Types that are assignable to Entity: // *CollectionConfig_RepositoryConfig_Database_ Entity isCollectionConfig_RepositoryConfig_Entity `protobuf_oneof:"entity"` } func (x *CollectionConfig_RepositoryConfig) Reset() { *x = CollectionConfig_RepositoryConfig{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CollectionConfig_RepositoryConfig) String() string { return protoimpl.X.MessageStringOf(x) } func (*CollectionConfig_RepositoryConfig) ProtoMessage() {} func (x *CollectionConfig_RepositoryConfig) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CollectionConfig_RepositoryConfig.ProtoReflect.Descriptor instead. func (*CollectionConfig_RepositoryConfig) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{0, 1} } func (x *CollectionConfig_RepositoryConfig) GetRepositoryType() CollectionConfig_RepositoryConfig_RepositoryType { if x != nil { return x.RepositoryType } return CollectionConfig_RepositoryConfig_RT_DATABASE } func (x *CollectionConfig_RepositoryConfig) GetRepositoryName() string { if x != nil { return x.RepositoryName } return "" } func (m *CollectionConfig_RepositoryConfig) GetEntity() isCollectionConfig_RepositoryConfig_Entity { if m != nil { return m.Entity } return nil } func (x *CollectionConfig_RepositoryConfig) GetDatabase() *CollectionConfig_RepositoryConfig_Database { if x, ok := x.GetEntity().(*CollectionConfig_RepositoryConfig_Database_); ok { return x.Database } return nil } type isCollectionConfig_RepositoryConfig_Entity interface { isCollectionConfig_RepositoryConfig_Entity() } type CollectionConfig_RepositoryConfig_Database_ struct { Database *CollectionConfig_RepositoryConfig_Database `protobuf:"bytes,3,opt,name=database,proto3,oneof"` } func (*CollectionConfig_RepositoryConfig_Database_) isCollectionConfig_RepositoryConfig_Entity() {} type CollectionConfig_RepositoryConfig_Database struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ConnectionUri string `protobuf:"bytes,1,opt,name=connection_uri,json=connectionUri,proto3" json:"connection_uri,omitempty"` TableName string `protobuf:"bytes,2,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` } func (x *CollectionConfig_RepositoryConfig_Database) Reset() { *x = CollectionConfig_RepositoryConfig_Database{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CollectionConfig_RepositoryConfig_Database) String() string { return protoimpl.X.MessageStringOf(x) } func (*CollectionConfig_RepositoryConfig_Database) ProtoMessage() {} func (x *CollectionConfig_RepositoryConfig_Database) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CollectionConfig_RepositoryConfig_Database.ProtoReflect.Descriptor instead. func (*CollectionConfig_RepositoryConfig_Database) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{0, 1, 0} } func (x *CollectionConfig_RepositoryConfig_Database) GetConnectionUri() string { if x != nil { return x.ConnectionUri } return "" } func (x *CollectionConfig_RepositoryConfig_Database) GetTableName() string { if x != nil { return x.TableName } return "" } func (x *CollectionConfig_RepositoryConfig_Database) GetUser() string { if x != nil { return x.User } return "" } func (x *CollectionConfig_RepositoryConfig_Database) GetPassword() string { if x != nil { return x.Password } return "" } type CollectionStats_SegmentStats struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields SegmentId uint32 `protobuf:"varint,1,opt,name=segment_id,json=segmentId,proto3" json:"segment_id,omitempty"` State CollectionStats_SegmentStats_SegmentState `protobuf:"varint,2,opt,name=state,proto3,enum=proxima.be.proto.CollectionStats_SegmentStats_SegmentState" json:"state,omitempty"` DocCount uint64 `protobuf:"varint,3,opt,name=doc_count,json=docCount,proto3" json:"doc_count,omitempty"` IndexFileCount uint64 `protobuf:"varint,4,opt,name=index_file_count,json=indexFileCount,proto3" json:"index_file_count,omitempty"` IndexFileSize uint64 `protobuf:"varint,5,opt,name=index_file_size,json=indexFileSize,proto3" json:"index_file_size,omitempty"` MinDocId uint64 `protobuf:"varint,6,opt,name=min_doc_id,json=minDocId,proto3" json:"min_doc_id,omitempty"` MaxDocId uint64 `protobuf:"varint,7,opt,name=max_doc_id,json=maxDocId,proto3" json:"max_doc_id,omitempty"` MinPrimaryKey uint64 `protobuf:"varint,8,opt,name=min_primary_key,json=minPrimaryKey,proto3" json:"min_primary_key,omitempty"` MaxPrimaryKey uint64 `protobuf:"varint,9,opt,name=max_primary_key,json=maxPrimaryKey,proto3" json:"max_primary_key,omitempty"` MinTimestamp uint64 `protobuf:"varint,10,opt,name=min_timestamp,json=minTimestamp,proto3" json:"min_timestamp,omitempty"` MaxTimestamp uint64 `protobuf:"varint,11,opt,name=max_timestamp,json=maxTimestamp,proto3" json:"max_timestamp,omitempty"` MinLsn uint64 `protobuf:"varint,12,opt,name=min_lsn,json=minLsn,proto3" json:"min_lsn,omitempty"` MaxLsn uint64 `protobuf:"varint,13,opt,name=max_lsn,json=maxLsn,proto3" json:"max_lsn,omitempty"` SegmentPath string `protobuf:"bytes,14,opt,name=segment_path,json=segmentPath,proto3" json:"segment_path,omitempty"` } func (x *CollectionStats_SegmentStats) Reset() { *x = CollectionStats_SegmentStats{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CollectionStats_SegmentStats) String() string { return protoimpl.X.MessageStringOf(x) } func (*CollectionStats_SegmentStats) ProtoMessage() {} func (x *CollectionStats_SegmentStats) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CollectionStats_SegmentStats.ProtoReflect.Descriptor instead. func (*CollectionStats_SegmentStats) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{7, 0} } func (x *CollectionStats_SegmentStats) GetSegmentId() uint32 { if x != nil { return x.SegmentId } return 0 } func (x *CollectionStats_SegmentStats) GetState() CollectionStats_SegmentStats_SegmentState { if x != nil { return x.State } return CollectionStats_SegmentStats_SS_CREATED } func (x *CollectionStats_SegmentStats) GetDocCount() uint64 { if x != nil { return x.DocCount } return 0 } func (x *CollectionStats_SegmentStats) GetIndexFileCount() uint64 { if x != nil { return x.IndexFileCount } return 0 } func (x *CollectionStats_SegmentStats) GetIndexFileSize() uint64 { if x != nil { return x.IndexFileSize } return 0 } func (x *CollectionStats_SegmentStats) GetMinDocId() uint64 { if x != nil { return x.MinDocId } return 0 } func (x *CollectionStats_SegmentStats) GetMaxDocId() uint64 { if x != nil { return x.MaxDocId } return 0 } func (x *CollectionStats_SegmentStats) GetMinPrimaryKey() uint64 { if x != nil { return x.MinPrimaryKey } return 0 } func (x *CollectionStats_SegmentStats) GetMaxPrimaryKey() uint64 { if x != nil { return x.MaxPrimaryKey } return 0 } func (x *CollectionStats_SegmentStats) GetMinTimestamp() uint64 { if x != nil { return x.MinTimestamp } return 0 } func (x *CollectionStats_SegmentStats) GetMaxTimestamp() uint64 { if x != nil { return x.MaxTimestamp } return 0 } func (x *CollectionStats_SegmentStats) GetMinLsn() uint64 { if x != nil { return x.MinLsn } return 0 } func (x *CollectionStats_SegmentStats) GetMaxLsn() uint64 { if x != nil { return x.MaxLsn } return 0 } func (x *CollectionStats_SegmentStats) GetSegmentPath() string { if x != nil { return x.SegmentPath } return "" } type WriteRequest_Row struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields PrimaryKey uint64 `protobuf:"varint,1,opt,name=primary_key,json=primaryKey,proto3" json:"primary_key,omitempty"` OperationType OperationType `protobuf:"varint,2,opt,name=operation_type,json=operationType,proto3,enum=proxima.be.proto.OperationType" json:"operation_type,omitempty"` ForwardColumnValues *GenericValueList `protobuf:"bytes,3,opt,name=forward_column_values,json=forwardColumnValues,proto3" json:"forward_column_values,omitempty"` IndexColumnValues *GenericValueList `protobuf:"bytes,4,opt,name=index_column_values,json=indexColumnValues,proto3" json:"index_column_values,omitempty"` LsnContext *LsnContext `protobuf:"bytes,5,opt,name=lsn_context,json=lsnContext,proto3" json:"lsn_context,omitempty"` // optional } func (x *WriteRequest_Row) Reset() { *x = WriteRequest_Row{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *WriteRequest_Row) String() string { return protoimpl.X.MessageStringOf(x) } func (*WriteRequest_Row) ProtoMessage() {} func (x *WriteRequest_Row) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use WriteRequest_Row.ProtoReflect.Descriptor instead. func (*WriteRequest_Row) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{9, 0} } func (x *WriteRequest_Row) GetPrimaryKey() uint64 { if x != nil { return x.PrimaryKey } return 0 } func (x *WriteRequest_Row) GetOperationType() OperationType { if x != nil { return x.OperationType } return OperationType_OP_INSERT } func (x *WriteRequest_Row) GetForwardColumnValues() *GenericValueList { if x != nil { return x.ForwardColumnValues } return nil } func (x *WriteRequest_Row) GetIndexColumnValues() *GenericValueList { if x != nil { return x.IndexColumnValues } return nil } func (x *WriteRequest_Row) GetLsnContext() *LsnContext { if x != nil { return x.LsnContext } return nil } type WriteRequest_IndexColumnMeta struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ColumnName string `protobuf:"bytes,1,opt,name=column_name,json=columnName,proto3" json:"column_name,omitempty"` DataType DataType `protobuf:"varint,2,opt,name=data_type,json=dataType,proto3,enum=proxima.be.proto.DataType" json:"data_type,omitempty"` Dimension uint32 `protobuf:"varint,3,opt,name=dimension,proto3" json:"dimension,omitempty"` } func (x *WriteRequest_IndexColumnMeta) Reset() { *x = WriteRequest_IndexColumnMeta{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *WriteRequest_IndexColumnMeta) String() string { return protoimpl.X.MessageStringOf(x) } func (*WriteRequest_IndexColumnMeta) ProtoMessage() {} func (x *WriteRequest_IndexColumnMeta) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use WriteRequest_IndexColumnMeta.ProtoReflect.Descriptor instead. func (*WriteRequest_IndexColumnMeta) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{9, 1} } func (x *WriteRequest_IndexColumnMeta) GetColumnName() string { if x != nil { return x.ColumnName } return "" } func (x *WriteRequest_IndexColumnMeta) GetDataType() DataType { if x != nil { return x.DataType } return DataType_DT_UNDEFINED } func (x *WriteRequest_IndexColumnMeta) GetDimension() uint32 { if x != nil { return x.Dimension } return 0 } type WriteRequest_RowMeta struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ForwardColumnNames []string `protobuf:"bytes,1,rep,name=forward_column_names,json=forwardColumnNames,proto3" json:"forward_column_names,omitempty"` IndexColumnMetas []*WriteRequest_IndexColumnMeta `protobuf:"bytes,2,rep,name=index_column_metas,json=indexColumnMetas,proto3" json:"index_column_metas,omitempty"` } func (x *WriteRequest_RowMeta) Reset() { *x = WriteRequest_RowMeta{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *WriteRequest_RowMeta) String() string { return protoimpl.X.MessageStringOf(x) } func (*WriteRequest_RowMeta) ProtoMessage() {} func (x *WriteRequest_RowMeta) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use WriteRequest_RowMeta.ProtoReflect.Descriptor instead. func (*WriteRequest_RowMeta) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{9, 2} } func (x *WriteRequest_RowMeta) GetForwardColumnNames() []string { if x != nil { return x.ForwardColumnNames } return nil } func (x *WriteRequest_RowMeta) GetIndexColumnMetas() []*WriteRequest_IndexColumnMeta { if x != nil { return x.IndexColumnMetas } return nil } type QueryRequest_KnnQueryParam struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ColumnName string `protobuf:"bytes,1,opt,name=column_name,json=columnName,proto3" json:"column_name,omitempty"` Topk uint32 `protobuf:"varint,2,opt,name=topk,proto3" json:"topk,omitempty"` // Types that are assignable to FeaturesValue: // *QueryRequest_KnnQueryParam_Features // *QueryRequest_KnnQueryParam_Matrix FeaturesValue isQueryRequest_KnnQueryParam_FeaturesValue `protobuf_oneof:"features_value"` BatchCount uint32 `protobuf:"varint,5,opt,name=batch_count,json=batchCount,proto3" json:"batch_count,omitempty"` Dimension uint32 `protobuf:"varint,6,opt,name=dimension,proto3" json:"dimension,omitempty"` DataType DataType `protobuf:"varint,7,opt,name=data_type,json=dataType,proto3,enum=proxima.be.proto.DataType" json:"data_type,omitempty"` Radius float32 `protobuf:"fixed32,8,opt,name=radius,proto3" json:"radius,omitempty"` // optional IsLinear bool `protobuf:"varint,9,opt,name=is_linear,json=isLinear,proto3" json:"is_linear,omitempty"` // optional ExtraParams []*KeyValuePair `protobuf:"bytes,10,rep,name=extra_params,json=extraParams,proto3" json:"extra_params,omitempty"` // optional } func (x *QueryRequest_KnnQueryParam) Reset() { *x = QueryRequest_KnnQueryParam{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryRequest_KnnQueryParam) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryRequest_KnnQueryParam) ProtoMessage() {} func (x *QueryRequest_KnnQueryParam) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use QueryRequest_KnnQueryParam.ProtoReflect.Descriptor instead. func (*QueryRequest_KnnQueryParam) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{11, 0} } func (x *QueryRequest_KnnQueryParam) GetColumnName() string { if x != nil { return x.ColumnName } return "" } func (x *QueryRequest_KnnQueryParam) GetTopk() uint32 { if x != nil { return x.Topk } return 0 } func (m *QueryRequest_KnnQueryParam) GetFeaturesValue() isQueryRequest_KnnQueryParam_FeaturesValue { if m != nil { return m.FeaturesValue } return nil } func (x *QueryRequest_KnnQueryParam) GetFeatures() []byte { if x, ok := x.GetFeaturesValue().(*QueryRequest_KnnQueryParam_Features); ok { return x.Features } return nil } func (x *QueryRequest_KnnQueryParam) GetMatrix() string { if x, ok := x.GetFeaturesValue().(*QueryRequest_KnnQueryParam_Matrix); ok { return x.Matrix } return "" } func (x *QueryRequest_KnnQueryParam) GetBatchCount() uint32 { if x != nil { return x.BatchCount } return 0 } func (x *QueryRequest_KnnQueryParam) GetDimension() uint32 { if x != nil { return x.Dimension } return 0 } func (x *QueryRequest_KnnQueryParam) GetDataType() DataType { if x != nil { return x.DataType } return DataType_DT_UNDEFINED } func (x *QueryRequest_KnnQueryParam) GetRadius() float32 { if x != nil { return x.Radius } return 0 } func (x *QueryRequest_KnnQueryParam) GetIsLinear() bool { if x != nil { return x.IsLinear } return false } func (x *QueryRequest_KnnQueryParam) GetExtraParams() []*KeyValuePair { if x != nil { return x.ExtraParams } return nil } type isQueryRequest_KnnQueryParam_FeaturesValue interface { isQueryRequest_KnnQueryParam_FeaturesValue() } type QueryRequest_KnnQueryParam_Features struct { Features []byte `protobuf:"bytes,3,opt,name=features,proto3,oneof"` } type QueryRequest_KnnQueryParam_Matrix struct { Matrix string `protobuf:"bytes,4,opt,name=matrix,proto3,oneof"` } func (*QueryRequest_KnnQueryParam_Features) isQueryRequest_KnnQueryParam_FeaturesValue() {} func (*QueryRequest_KnnQueryParam_Matrix) isQueryRequest_KnnQueryParam_FeaturesValue() {} type QueryResponse_Result struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Documents []*Document `protobuf:"bytes,1,rep,name=documents,proto3" json:"documents,omitempty"` } func (x *QueryResponse_Result) Reset() { *x = QueryResponse_Result{} if protoimpl.UnsafeEnabled { mi := &file_proto_proxima_be_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *QueryResponse_Result) String() string { return protoimpl.X.MessageStringOf(x) } func (*QueryResponse_Result) ProtoMessage() {} func (x *QueryResponse_Result) ProtoReflect() protoreflect.Message { mi := &file_proto_proxima_be_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use QueryResponse_Result.ProtoReflect.Descriptor instead. func (*QueryResponse_Result) Descriptor() ([]byte, []int) { return file_proto_proxima_be_proto_rawDescGZIP(), []int{12, 0} } func (x *QueryResponse_Result) GetDocuments() []*Document { if x != nil { return x.Documents } return nil } var File_proto_proxima_be_proto protoreflect.FileDescriptor var file_proto_proxima_be_proto_rawDesc = []byte{ 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x5f, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, 0x08, 0x0a, 0x10, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x44, 0x6f, 0x63, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x63, 0x0a, 0x13, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x11, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x60, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x89, 0x02, 0x0a, 0x10, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x72, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0xb4, 0x03, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6b, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x42, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x1a, 0x80, 0x01, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x21, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x54, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x10, 0x00, 0x42, 0x08, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x39, 0x0a, 0x0e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x38, 0x0a, 0x0a, 0x4c, 0x73, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6c, 0x73, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0xe2, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x4a, 0x0a, 0x12, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x73, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x73, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x10, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4c, 0x73, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x46, 0x0a, 0x10, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x53, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x53, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x53, 0x5f, 0x44, 0x52, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x02, 0x22, 0x90, 0x01, 0x0a, 0x1a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x40, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x38, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x42, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf8, 0x07, 0x0a, 0x0f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x53, 0x0a, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0c, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x1a, 0xfd, 0x04, 0x0a, 0x0c, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x6f, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x44, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x6f, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x44, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6d, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x73, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x4c, 0x73, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x73, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x4c, 0x73, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x61, 0x0a, 0x0c, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x53, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x53, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x53, 0x5f, 0x44, 0x55, 0x4d, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x43, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x53, 0x49, 0x53, 0x54, 0x10, 0x04, 0x22, 0x99, 0x01, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4c, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0xf8, 0x06, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x72, 0x6f, 0x77, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x07, 0x72, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x1a, 0xd9, 0x02, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x56, 0x0a, 0x15, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x13, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x13, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x11, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x6c, 0x73, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x73, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0a, 0x6c, 0x73, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x1a, 0x89, 0x01, 0x0a, 0x0f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x99, 0x01, 0x0a, 0x07, 0x52, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x12, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x10, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x55, 0x0a, 0x15, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x95, 0x05, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x64, 0x65, 0x62, 0x75, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x4b, 0x0a, 0x09, 0x6b, 0x6e, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4b, 0x6e, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x08, 0x6b, 0x6e, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0xfe, 0x02, 0x0a, 0x0d, 0x4b, 0x6e, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x6f, 0x70, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x6f, 0x70, 0x6b, 0x12, 0x1c, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x06, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x12, 0x41, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x72, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x17, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x51, 0x54, 0x5f, 0x4b, 0x4e, 0x4e, 0x10, 0x00, 0x42, 0x0d, 0x0a, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x22, 0x85, 0x02, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x55, 0x73, 0x12, 0x40, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0x42, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x7d, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x64, 0x65, 0x62, 0x75, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x60, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xa5, 0x06, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4d, 0x0a, 0x0f, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x65, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x2c, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x10, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x05, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x13, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0b, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xbb, 0x04, 0x0a, 0x12, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x05, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x13, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x10, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x15, 0x5a, 0x10, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x2f, 0x73, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x80, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_proto_proxima_be_proto_rawDescOnce sync.Once file_proto_proxima_be_proto_rawDescData = file_proto_proxima_be_proto_rawDesc ) func file_proto_proxima_be_proto_rawDescGZIP() []byte { file_proto_proxima_be_proto_rawDescOnce.Do(func() { file_proto_proxima_be_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_proxima_be_proto_rawDescData) }) return file_proto_proxima_be_proto_rawDescData } var file_proto_proxima_be_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_proto_proxima_be_proto_msgTypes = make([]protoimpl.MessageInfo, 26) var file_proto_proxima_be_proto_goTypes = []interface{}{ (CollectionConfig_RepositoryConfig_RepositoryType)(0), // 0: proxima.be.proto.CollectionConfig.RepositoryConfig.RepositoryType (CollectionInfo_CollectionStatus)(0), // 1: proxima.be.proto.CollectionInfo.CollectionStatus (CollectionStats_SegmentStats_SegmentState)(0), // 2: proxima.be.proto.CollectionStats.SegmentStats.SegmentState (QueryRequest_QueryType)(0), // 3: proxima.be.proto.QueryRequest.QueryType (*CollectionConfig)(nil), // 4: proxima.be.proto.CollectionConfig (*CollectionName)(nil), // 5: proxima.be.proto.CollectionName (*LsnContext)(nil), // 6: proxima.be.proto.LsnContext (*CollectionInfo)(nil), // 7: proxima.be.proto.CollectionInfo (*DescribeCollectionResponse)(nil), // 8: proxima.be.proto.DescribeCollectionResponse (*ListCondition)(nil), // 9: proxima.be.proto.ListCondition (*ListCollectionsResponse)(nil), // 10: proxima.be.proto.ListCollectionsResponse (*CollectionStats)(nil), // 11: proxima.be.proto.CollectionStats (*StatsCollectionResponse)(nil), // 12: proxima.be.proto.StatsCollectionResponse (*WriteRequest)(nil), // 13: proxima.be.proto.WriteRequest (*Document)(nil), // 14: proxima.be.proto.Document (*QueryRequest)(nil), // 15: proxima.be.proto.QueryRequest (*QueryResponse)(nil), // 16: proxima.be.proto.QueryResponse (*GetDocumentRequest)(nil), // 17: proxima.be.proto.GetDocumentRequest (*GetDocumentResponse)(nil), // 18: proxima.be.proto.GetDocumentResponse (*GetVersionRequest)(nil), // 19: proxima.be.proto.GetVersionRequest (*GetVersionResponse)(nil), // 20: proxima.be.proto.GetVersionResponse (*CollectionConfig_IndexColumnParam)(nil), // 21: proxima.be.proto.CollectionConfig.IndexColumnParam (*CollectionConfig_RepositoryConfig)(nil), // 22: proxima.be.proto.CollectionConfig.RepositoryConfig (*CollectionConfig_RepositoryConfig_Database)(nil), // 23: proxima.be.proto.CollectionConfig.RepositoryConfig.Database (*CollectionStats_SegmentStats)(nil), // 24: proxima.be.proto.CollectionStats.SegmentStats (*WriteRequest_Row)(nil), // 25: proxima.be.proto.WriteRequest.Row (*WriteRequest_IndexColumnMeta)(nil), // 26: proxima.be.proto.WriteRequest.IndexColumnMeta (*WriteRequest_RowMeta)(nil), // 27: proxima.be.proto.WriteRequest.RowMeta (*QueryRequest_KnnQueryParam)(nil), // 28: proxima.be.proto.QueryRequest.KnnQueryParam (*QueryResponse_Result)(nil), // 29: proxima.be.proto.QueryResponse.Result (*Status)(nil), // 30: proxima.be.proto.Status (*GenericKeyValue)(nil), // 31: proxima.be.proto.GenericKeyValue (IndexType)(0), // 32: proxima.be.proto.IndexType (DataType)(0), // 33: proxima.be.proto.DataType (*KeyValuePair)(nil), // 34: proxima.be.proto.KeyValuePair (OperationType)(0), // 35: proxima.be.proto.OperationType (*GenericValueList)(nil), // 36: proxima.be.proto.GenericValueList (*HttpRequest)(nil), // 37: proxima.be.proto.HttpRequest (*HttpResponse)(nil), // 38: proxima.be.proto.HttpResponse } var file_proto_proxima_be_proto_depIdxs = []int32{ 21, // 0: proxima.be.proto.CollectionConfig.index_column_params:type_name -> proxima.be.proto.CollectionConfig.IndexColumnParam 22, // 1: proxima.be.proto.CollectionConfig.repository_config:type_name -> proxima.be.proto.CollectionConfig.RepositoryConfig 4, // 2: proxima.be.proto.CollectionInfo.config:type_name -> proxima.be.proto.CollectionConfig 1, // 3: proxima.be.proto.CollectionInfo.status:type_name -> proxima.be.proto.CollectionInfo.CollectionStatus 6, // 4: proxima.be.proto.CollectionInfo.latest_lsn_context:type_name -> proxima.be.proto.LsnContext 30, // 5: proxima.be.proto.DescribeCollectionResponse.status:type_name -> proxima.be.proto.Status 7, // 6: proxima.be.proto.DescribeCollectionResponse.collection:type_name -> proxima.be.proto.CollectionInfo 30, // 7: proxima.be.proto.ListCollectionsResponse.status:type_name -> proxima.be.proto.Status 7, // 8: proxima.be.proto.ListCollectionsResponse.collections:type_name -> proxima.be.proto.CollectionInfo 24, // 9: proxima.be.proto.CollectionStats.segment_stats:type_name -> proxima.be.proto.CollectionStats.SegmentStats 30, // 10: proxima.be.proto.StatsCollectionResponse.status:type_name -> proxima.be.proto.Status 11, // 11: proxima.be.proto.StatsCollectionResponse.collection_stats:type_name -> proxima.be.proto.CollectionStats 27, // 12: proxima.be.proto.WriteRequest.row_meta:type_name -> proxima.be.proto.WriteRequest.RowMeta 25, // 13: proxima.be.proto.WriteRequest.rows:type_name -> proxima.be.proto.WriteRequest.Row 31, // 14: proxima.be.proto.Document.forward_column_values:type_name -> proxima.be.proto.GenericKeyValue 3, // 15: proxima.be.proto.QueryRequest.query_type:type_name -> proxima.be.proto.QueryRequest.QueryType 28, // 16: proxima.be.proto.QueryRequest.knn_param:type_name -> proxima.be.proto.QueryRequest.KnnQueryParam 30, // 17: proxima.be.proto.QueryResponse.status:type_name -> proxima.be.proto.Status 29, // 18: proxima.be.proto.QueryResponse.results:type_name -> proxima.be.proto.QueryResponse.Result 30, // 19: proxima.be.proto.GetDocumentResponse.status:type_name -> proxima.be.proto.Status 14, // 20: proxima.be.proto.GetDocumentResponse.document:type_name -> proxima.be.proto.Document 30, // 21: proxima.be.proto.GetVersionResponse.status:type_name -> proxima.be.proto.Status 32, // 22: proxima.be.proto.CollectionConfig.IndexColumnParam.index_type:type_name -> proxima.be.proto.IndexType 33, // 23: proxima.be.proto.CollectionConfig.IndexColumnParam.data_type:type_name -> proxima.be.proto.DataType 34, // 24: proxima.be.proto.CollectionConfig.IndexColumnParam.extra_params:type_name -> proxima.be.proto.KeyValuePair 0, // 25: proxima.be.proto.CollectionConfig.RepositoryConfig.repository_type:type_name -> proxima.be.proto.CollectionConfig.RepositoryConfig.RepositoryType 23, // 26: proxima.be.proto.CollectionConfig.RepositoryConfig.database:type_name -> proxima.be.proto.CollectionConfig.RepositoryConfig.Database 2, // 27: proxima.be.proto.CollectionStats.SegmentStats.state:type_name -> proxima.be.proto.CollectionStats.SegmentStats.SegmentState 35, // 28: proxima.be.proto.WriteRequest.Row.operation_type:type_name -> proxima.be.proto.OperationType 36, // 29: proxima.be.proto.WriteRequest.Row.forward_column_values:type_name -> proxima.be.proto.GenericValueList 36, // 30: proxima.be.proto.WriteRequest.Row.index_column_values:type_name -> proxima.be.proto.GenericValueList 6, // 31: proxima.be.proto.WriteRequest.Row.lsn_context:type_name -> proxima.be.proto.LsnContext 33, // 32: proxima.be.proto.WriteRequest.IndexColumnMeta.data_type:type_name -> proxima.be.proto.DataType 26, // 33: proxima.be.proto.WriteRequest.RowMeta.index_column_metas:type_name -> proxima.be.proto.WriteRequest.IndexColumnMeta 33, // 34: proxima.be.proto.QueryRequest.KnnQueryParam.data_type:type_name -> proxima.be.proto.DataType 34, // 35: proxima.be.proto.QueryRequest.KnnQueryParam.extra_params:type_name -> proxima.be.proto.KeyValuePair 14, // 36: proxima.be.proto.QueryResponse.Result.documents:type_name -> proxima.be.proto.Document 4, // 37: proxima.be.proto.ProximaService.create_collection:input_type -> proxima.be.proto.CollectionConfig 5, // 38: proxima.be.proto.ProximaService.drop_collection:input_type -> proxima.be.proto.CollectionName 5, // 39: proxima.be.proto.ProximaService.describe_collection:input_type -> proxima.be.proto.CollectionName 9, // 40: proxima.be.proto.ProximaService.list_collections:input_type -> proxima.be.proto.ListCondition 5, // 41: proxima.be.proto.ProximaService.stats_collection:input_type -> proxima.be.proto.CollectionName 13, // 42: proxima.be.proto.ProximaService.write:input_type -> proxima.be.proto.WriteRequest 15, // 43: proxima.be.proto.ProximaService.query:input_type -> proxima.be.proto.QueryRequest 17, // 44: proxima.be.proto.ProximaService.get_document_by_key:input_type -> proxima.be.proto.GetDocumentRequest 19, // 45: proxima.be.proto.ProximaService.get_version:input_type -> proxima.be.proto.GetVersionRequest 37, // 46: proxima.be.proto.HttpProximaService.collection:input_type -> proxima.be.proto.HttpRequest 37, // 47: proxima.be.proto.HttpProximaService.stats_collection:input_type -> proxima.be.proto.HttpRequest 37, // 48: proxima.be.proto.HttpProximaService.write:input_type -> proxima.be.proto.HttpRequest 37, // 49: proxima.be.proto.HttpProximaService.query:input_type -> proxima.be.proto.HttpRequest 37, // 50: proxima.be.proto.HttpProximaService.get_document_by_key:input_type -> proxima.be.proto.HttpRequest 37, // 51: proxima.be.proto.HttpProximaService.list_collections:input_type -> proxima.be.proto.HttpRequest 37, // 52: proxima.be.proto.HttpProximaService.get_version:input_type -> proxima.be.proto.HttpRequest 30, // 53: proxima.be.proto.ProximaService.create_collection:output_type -> proxima.be.proto.Status 30, // 54: proxima.be.proto.ProximaService.drop_collection:output_type -> proxima.be.proto.Status 8, // 55: proxima.be.proto.ProximaService.describe_collection:output_type -> proxima.be.proto.DescribeCollectionResponse 10, // 56: proxima.be.proto.ProximaService.list_collections:output_type -> proxima.be.proto.ListCollectionsResponse 12, // 57: proxima.be.proto.ProximaService.stats_collection:output_type -> proxima.be.proto.StatsCollectionResponse 30, // 58: proxima.be.proto.ProximaService.write:output_type -> proxima.be.proto.Status 16, // 59: proxima.be.proto.ProximaService.query:output_type -> proxima.be.proto.QueryResponse 18, // 60: proxima.be.proto.ProximaService.get_document_by_key:output_type -> proxima.be.proto.GetDocumentResponse 20, // 61: proxima.be.proto.ProximaService.get_version:output_type -> proxima.be.proto.GetVersionResponse 38, // 62: proxima.be.proto.HttpProximaService.collection:output_type -> proxima.be.proto.HttpResponse 38, // 63: proxima.be.proto.HttpProximaService.stats_collection:output_type -> proxima.be.proto.HttpResponse 38, // 64: proxima.be.proto.HttpProximaService.write:output_type -> proxima.be.proto.HttpResponse 38, // 65: proxima.be.proto.HttpProximaService.query:output_type -> proxima.be.proto.HttpResponse 38, // 66: proxima.be.proto.HttpProximaService.get_document_by_key:output_type -> proxima.be.proto.HttpResponse 38, // 67: proxima.be.proto.HttpProximaService.list_collections:output_type -> proxima.be.proto.HttpResponse 38, // 68: proxima.be.proto.HttpProximaService.get_version:output_type -> proxima.be.proto.HttpResponse 53, // [53:69] is the sub-list for method output_type 37, // [37:53] is the sub-list for method input_type 37, // [37:37] is the sub-list for extension type_name 37, // [37:37] is the sub-list for extension extendee 0, // [0:37] is the sub-list for field type_name } func init() { file_proto_proxima_be_proto_init() } func file_proto_proxima_be_proto_init() { if File_proto_proxima_be_proto != nil { return } file_proto_common_proto_init() if !protoimpl.UnsafeEnabled { file_proto_proxima_be_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CollectionConfig); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CollectionName); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LsnContext); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CollectionInfo); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DescribeCollectionResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListCondition); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListCollectionsResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CollectionStats); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatsCollectionResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WriteRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Document); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDocumentRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDocumentResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetVersionRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetVersionResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CollectionConfig_IndexColumnParam); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CollectionConfig_RepositoryConfig); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CollectionConfig_RepositoryConfig_Database); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CollectionStats_SegmentStats); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WriteRequest_Row); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WriteRequest_IndexColumnMeta); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WriteRequest_RowMeta); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryRequest_KnnQueryParam); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_proto_proxima_be_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryResponse_Result); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } file_proto_proxima_be_proto_msgTypes[11].OneofWrappers = []interface{}{ (*QueryRequest_KnnParam)(nil), } file_proto_proxima_be_proto_msgTypes[18].OneofWrappers = []interface{}{ (*CollectionConfig_RepositoryConfig_Database_)(nil), } file_proto_proxima_be_proto_msgTypes[24].OneofWrappers = []interface{}{ (*QueryRequest_KnnQueryParam_Features)(nil), (*QueryRequest_KnnQueryParam_Matrix)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_proxima_be_proto_rawDesc, NumEnums: 4, NumMessages: 26, NumExtensions: 0, NumServices: 2, }, GoTypes: file_proto_proxima_be_proto_goTypes, DependencyIndexes: file_proto_proxima_be_proto_depIdxs, EnumInfos: file_proto_proxima_be_proto_enumTypes, MessageInfos: file_proto_proxima_be_proto_msgTypes, }.Build() File_proto_proxima_be_proto = out.File file_proto_proxima_be_proto_rawDesc = nil file_proto_proxima_be_proto_goTypes = nil file_proto_proxima_be_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion6 // ProximaServiceClient is the client API for ProximaService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ProximaServiceClient interface { // Create a collection CreateCollection(ctx context.Context, in *CollectionConfig, opts ...grpc.CallOption) (*Status, error) // Drop a collection DropCollection(ctx context.Context, in *CollectionName, opts ...grpc.CallOption) (*Status, error) // Get information of a collection DescribeCollection(ctx context.Context, in *CollectionName, opts ...grpc.CallOption) (*DescribeCollectionResponse, error) // Get all collection information ListCollections(ctx context.Context, in *ListCondition, opts ...grpc.CallOption) (*ListCollectionsResponse, error) // Get collection statstics StatsCollection(ctx context.Context, in *CollectionName, opts ...grpc.CallOption) (*StatsCollectionResponse, error) // Write records Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*Status, error) // Knn query records Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) // Get document information by primary key GetDocumentByKey(ctx context.Context, in *GetDocumentRequest, opts ...grpc.CallOption) (*GetDocumentResponse, error) // Get server version GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error) } type proximaServiceClient struct { cc grpc.ClientConnInterface } func NewProximaServiceClient(cc grpc.ClientConnInterface) ProximaServiceClient { return &proximaServiceClient{cc} } func (c *proximaServiceClient) CreateCollection(ctx context.Context, in *CollectionConfig, opts ...grpc.CallOption) (*Status, error) { out := new(Status) err := c.cc.Invoke(ctx, "/proxima.be.proto.ProximaService/create_collection", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *proximaServiceClient) DropCollection(ctx context.Context, in *CollectionName, opts ...grpc.CallOption) (*Status, error) { out := new(Status) err := c.cc.Invoke(ctx, "/proxima.be.proto.ProximaService/drop_collection", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *proximaServiceClient) DescribeCollection(ctx context.Context, in *CollectionName, opts ...grpc.CallOption) (*DescribeCollectionResponse, error) { out := new(DescribeCollectionResponse) err := c.cc.Invoke(ctx, "/proxima.be.proto.ProximaService/describe_collection", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *proximaServiceClient) ListCollections(ctx context.Context, in *ListCondition, opts ...grpc.CallOption) (*ListCollectionsResponse, error) { out := new(ListCollectionsResponse) err := c.cc.Invoke(ctx, "/proxima.be.proto.ProximaService/list_collections", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *proximaServiceClient) StatsCollection(ctx context.Context, in *CollectionName, opts ...grpc.CallOption) (*StatsCollectionResponse, error) { out := new(StatsCollectionResponse) err := c.cc.Invoke(ctx, "/proxima.be.proto.ProximaService/stats_collection", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *proximaServiceClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*Status, error) { out := new(Status) err := c.cc.Invoke(ctx, "/proxima.be.proto.ProximaService/write", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *proximaServiceClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { out := new(QueryResponse) err := c.cc.Invoke(ctx, "/proxima.be.proto.ProximaService/query", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *proximaServiceClient) GetDocumentByKey(ctx context.Context, in *GetDocumentRequest, opts ...grpc.CallOption) (*GetDocumentResponse, error) { out := new(GetDocumentResponse) err := c.cc.Invoke(ctx, "/proxima.be.proto.ProximaService/get_document_by_key", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *proximaServiceClient) GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error) { out := new(GetVersionResponse) err := c.cc.Invoke(ctx, "/proxima.be.proto.ProximaService/get_version", in, out, opts...) if err != nil { return nil, err } return out, nil } // ProximaServiceServer is the server API for ProximaService service. type ProximaServiceServer interface { // Create a collection CreateCollection(context.Context, *CollectionConfig) (*Status, error) // Drop a collection DropCollection(context.Context, *CollectionName) (*Status, error) // Get information of a collection DescribeCollection(context.Context, *CollectionName) (*DescribeCollectionResponse, error) // Get all collection information ListCollections(context.Context, *ListCondition) (*ListCollectionsResponse, error) // Get collection statstics StatsCollection(context.Context, *CollectionName) (*StatsCollectionResponse, error) // Write records Write(context.Context, *WriteRequest) (*Status, error) // Knn query records Query(context.Context, *QueryRequest) (*QueryResponse, error) // Get document information by primary key GetDocumentByKey(context.Context, *GetDocumentRequest) (*GetDocumentResponse, error) // Get server version GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error) } // UnimplementedProximaServiceServer can be embedded to have forward compatible implementations. type UnimplementedProximaServiceServer struct { } func (*UnimplementedProximaServiceServer) CreateCollection(context.Context, *CollectionConfig) (*Status, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateCollection not implemented") } func (*UnimplementedProximaServiceServer) DropCollection(context.Context, *CollectionName) (*Status, error) { return nil, status.Errorf(codes.Unimplemented, "method DropCollection not implemented") } func (*UnimplementedProximaServiceServer) DescribeCollection(context.Context, *CollectionName) (*DescribeCollectionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DescribeCollection not implemented") } func (*UnimplementedProximaServiceServer) ListCollections(context.Context, *ListCondition) (*ListCollectionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListCollections not implemented") } func (*UnimplementedProximaServiceServer) StatsCollection(context.Context, *CollectionName) (*StatsCollectionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StatsCollection not implemented") } func (*UnimplementedProximaServiceServer) Write(context.Context, *WriteRequest) (*Status, error) { return nil, status.Errorf(codes.Unimplemented, "method Write not implemented") } func (*UnimplementedProximaServiceServer) Query(context.Context, *QueryRequest) (*QueryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Query not implemented") } func (*UnimplementedProximaServiceServer) GetDocumentByKey(context.Context, *GetDocumentRequest) (*GetDocumentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDocumentByKey not implemented") } func (*UnimplementedProximaServiceServer) GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") } func RegisterProximaServiceServer(s *grpc.Server, srv ProximaServiceServer) { s.RegisterService(&_ProximaService_serviceDesc, srv) } func _ProximaService_CreateCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CollectionConfig) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProximaServiceServer).CreateCollection(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.ProximaService/CreateCollection", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProximaServiceServer).CreateCollection(ctx, req.(*CollectionConfig)) } return interceptor(ctx, in, info, handler) } func _ProximaService_DropCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CollectionName) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProximaServiceServer).DropCollection(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.ProximaService/DropCollection", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProximaServiceServer).DropCollection(ctx, req.(*CollectionName)) } return interceptor(ctx, in, info, handler) } func _ProximaService_DescribeCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CollectionName) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProximaServiceServer).DescribeCollection(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.ProximaService/DescribeCollection", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProximaServiceServer).DescribeCollection(ctx, req.(*CollectionName)) } return interceptor(ctx, in, info, handler) } func _ProximaService_ListCollections_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListCondition) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProximaServiceServer).ListCollections(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.ProximaService/ListCollections", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProximaServiceServer).ListCollections(ctx, req.(*ListCondition)) } return interceptor(ctx, in, info, handler) } func _ProximaService_StatsCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CollectionName) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProximaServiceServer).StatsCollection(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.ProximaService/StatsCollection", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProximaServiceServer).StatsCollection(ctx, req.(*CollectionName)) } return interceptor(ctx, in, info, handler) } func _ProximaService_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(WriteRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProximaServiceServer).Write(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.ProximaService/Write", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProximaServiceServer).Write(ctx, req.(*WriteRequest)) } return interceptor(ctx, in, info, handler) } func _ProximaService_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProximaServiceServer).Query(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.ProximaService/Query", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProximaServiceServer).Query(ctx, req.(*QueryRequest)) } return interceptor(ctx, in, info, handler) } func _ProximaService_GetDocumentByKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetDocumentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProximaServiceServer).GetDocumentByKey(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.ProximaService/GetDocumentByKey", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProximaServiceServer).GetDocumentByKey(ctx, req.(*GetDocumentRequest)) } return interceptor(ctx, in, info, handler) } func _ProximaService_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetVersionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProximaServiceServer).GetVersion(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.ProximaService/GetVersion", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProximaServiceServer).GetVersion(ctx, req.(*GetVersionRequest)) } return interceptor(ctx, in, info, handler) } var _ProximaService_serviceDesc = grpc.ServiceDesc{ ServiceName: "proxima.be.proto.ProximaService", HandlerType: (*ProximaServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "create_collection", Handler: _ProximaService_CreateCollection_Handler, }, { MethodName: "drop_collection", Handler: _ProximaService_DropCollection_Handler, }, { MethodName: "describe_collection", Handler: _ProximaService_DescribeCollection_Handler, }, { MethodName: "list_collections", Handler: _ProximaService_ListCollections_Handler, }, { MethodName: "stats_collection", Handler: _ProximaService_StatsCollection_Handler, }, { MethodName: "write", Handler: _ProximaService_Write_Handler, }, { MethodName: "query", Handler: _ProximaService_Query_Handler, }, { MethodName: "get_document_by_key", Handler: _ProximaService_GetDocumentByKey_Handler, }, { MethodName: "get_version", Handler: _ProximaService_GetVersion_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/proxima_be.proto", } // HttpProximaServiceClient is the client API for HttpProximaService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type HttpProximaServiceClient interface { //! Collection management APIS // 1. Create Collection // Http: POST /v1/collection/{collection} // You can use the create collection API to add a new collection to an Proxima BE server. When creating an // index, you need specify the CollectionConfig as json string attached to the body // 2. Get Collection // HTTP: GET /{collection} // Returns information about one collection named by Path Param ${collection}. // 3. Delete Collection // HTTP: DEL /{collection} // Deletes an existing collection named by Path Param ${collection} // 4. Update Collection // HTTP: PUT /{collection}, supported later // Collection(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error) //! Retrieve Stat of Collection // HTTP: GET /v1/collection/{collection}/stat // StatsCollection(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error) //! Write records to collection // HTTP: POST /v1/collection/{collection}/index // Write(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error) //! Query documents on collection // HTTP: POST /v1/collection/{collection}/query // Query(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error) //! Write records to collection // HTTP: GET /v1/collection/{collection}/doc?key={primary_key} // GetDocumentByKey(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error) //! List Collections // HTTP: GET /v1/collections?repository={repo} // Returns information about collections. Query param ${repo} specified collection should have been attached // repository named by ${repo} // ListCollections(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error) //! Get server version // HTTP: GET /version // Returns version string GetVersion(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error) } type httpProximaServiceClient struct { cc grpc.ClientConnInterface } func NewHttpProximaServiceClient(cc grpc.ClientConnInterface) HttpProximaServiceClient { return &httpProximaServiceClient{cc} } func (c *httpProximaServiceClient) Collection(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error) { out := new(HttpResponse) err := c.cc.Invoke(ctx, "/proxima.be.proto.HttpProximaService/collection", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *httpProximaServiceClient) StatsCollection(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error) { out := new(HttpResponse) err := c.cc.Invoke(ctx, "/proxima.be.proto.HttpProximaService/stats_collection", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *httpProximaServiceClient) Write(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error) { out := new(HttpResponse) err := c.cc.Invoke(ctx, "/proxima.be.proto.HttpProximaService/write", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *httpProximaServiceClient) Query(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error) { out := new(HttpResponse) err := c.cc.Invoke(ctx, "/proxima.be.proto.HttpProximaService/query", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *httpProximaServiceClient) GetDocumentByKey(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error) { out := new(HttpResponse) err := c.cc.Invoke(ctx, "/proxima.be.proto.HttpProximaService/get_document_by_key", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *httpProximaServiceClient) ListCollections(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error) { out := new(HttpResponse) err := c.cc.Invoke(ctx, "/proxima.be.proto.HttpProximaService/list_collections", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *httpProximaServiceClient) GetVersion(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error) { out := new(HttpResponse) err := c.cc.Invoke(ctx, "/proxima.be.proto.HttpProximaService/get_version", in, out, opts...) if err != nil { return nil, err } return out, nil } // HttpProximaServiceServer is the server API for HttpProximaService service. type HttpProximaServiceServer interface { //! Collection management APIS // 1. Create Collection // Http: POST /v1/collection/{collection} // You can use the create collection API to add a new collection to an Proxima BE server. When creating an // index, you need specify the CollectionConfig as json string attached to the body // 2. Get Collection // HTTP: GET /{collection} // Returns information about one collection named by Path Param ${collection}. // 3. Delete Collection // HTTP: DEL /{collection} // Deletes an existing collection named by Path Param ${collection} // 4. Update Collection // HTTP: PUT /{collection}, supported later // Collection(context.Context, *HttpRequest) (*HttpResponse, error) //! Retrieve Stat of Collection // HTTP: GET /v1/collection/{collection}/stat // StatsCollection(context.Context, *HttpRequest) (*HttpResponse, error) //! Write records to collection // HTTP: POST /v1/collection/{collection}/index // Write(context.Context, *HttpRequest) (*HttpResponse, error) //! Query documents on collection // HTTP: POST /v1/collection/{collection}/query // Query(context.Context, *HttpRequest) (*HttpResponse, error) //! Write records to collection // HTTP: GET /v1/collection/{collection}/doc?key={primary_key} // GetDocumentByKey(context.Context, *HttpRequest) (*HttpResponse, error) //! List Collections // HTTP: GET /v1/collections?repository={repo} // Returns information about collections. Query param ${repo} specified collection should have been attached // repository named by ${repo} // ListCollections(context.Context, *HttpRequest) (*HttpResponse, error) //! Get server version // HTTP: GET /version // Returns version string GetVersion(context.Context, *HttpRequest) (*HttpResponse, error) } // UnimplementedHttpProximaServiceServer can be embedded to have forward compatible implementations. type UnimplementedHttpProximaServiceServer struct { } func (*UnimplementedHttpProximaServiceServer) Collection(context.Context, *HttpRequest) (*HttpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Collection not implemented") } func (*UnimplementedHttpProximaServiceServer) StatsCollection(context.Context, *HttpRequest) (*HttpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StatsCollection not implemented") } func (*UnimplementedHttpProximaServiceServer) Write(context.Context, *HttpRequest) (*HttpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Write not implemented") } func (*UnimplementedHttpProximaServiceServer) Query(context.Context, *HttpRequest) (*HttpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Query not implemented") } func (*UnimplementedHttpProximaServiceServer) GetDocumentByKey(context.Context, *HttpRequest) (*HttpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDocumentByKey not implemented") } func (*UnimplementedHttpProximaServiceServer) ListCollections(context.Context, *HttpRequest) (*HttpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListCollections not implemented") } func (*UnimplementedHttpProximaServiceServer) GetVersion(context.Context, *HttpRequest) (*HttpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") } func RegisterHttpProximaServiceServer(s *grpc.Server, srv HttpProximaServiceServer) { s.RegisterService(&_HttpProximaService_serviceDesc, srv) } func _HttpProximaService_Collection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(HttpRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(HttpProximaServiceServer).Collection(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.HttpProximaService/Collection", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HttpProximaServiceServer).Collection(ctx, req.(*HttpRequest)) } return interceptor(ctx, in, info, handler) } func _HttpProximaService_StatsCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(HttpRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(HttpProximaServiceServer).StatsCollection(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.HttpProximaService/StatsCollection", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HttpProximaServiceServer).StatsCollection(ctx, req.(*HttpRequest)) } return interceptor(ctx, in, info, handler) } func _HttpProximaService_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(HttpRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(HttpProximaServiceServer).Write(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.HttpProximaService/Write", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HttpProximaServiceServer).Write(ctx, req.(*HttpRequest)) } return interceptor(ctx, in, info, handler) } func _HttpProximaService_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(HttpRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(HttpProximaServiceServer).Query(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.HttpProximaService/Query", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HttpProximaServiceServer).Query(ctx, req.(*HttpRequest)) } return interceptor(ctx, in, info, handler) } func _HttpProximaService_GetDocumentByKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(HttpRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(HttpProximaServiceServer).GetDocumentByKey(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.HttpProximaService/GetDocumentByKey", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HttpProximaServiceServer).GetDocumentByKey(ctx, req.(*HttpRequest)) } return interceptor(ctx, in, info, handler) } func _HttpProximaService_ListCollections_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(HttpRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(HttpProximaServiceServer).ListCollections(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.HttpProximaService/ListCollections", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HttpProximaServiceServer).ListCollections(ctx, req.(*HttpRequest)) } return interceptor(ctx, in, info, handler) } func _HttpProximaService_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(HttpRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(HttpProximaServiceServer).GetVersion(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proxima.be.proto.HttpProximaService/GetVersion", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HttpProximaServiceServer).GetVersion(ctx, req.(*HttpRequest)) } return interceptor(ctx, in, info, handler) } var _HttpProximaService_serviceDesc = grpc.ServiceDesc{ ServiceName: "proxima.be.proto.HttpProximaService", HandlerType: (*HttpProximaServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "collection", Handler: _HttpProximaService_Collection_Handler, }, { MethodName: "stats_collection", Handler: _HttpProximaService_StatsCollection_Handler, }, { MethodName: "write", Handler: _HttpProximaService_Write_Handler, }, { MethodName: "query", Handler: _HttpProximaService_Query_Handler, }, { MethodName: "get_document_by_key", Handler: _HttpProximaService_GetDocumentByKey_Handler, }, { MethodName: "list_collections", Handler: _HttpProximaService_ListCollections_Handler, }, { MethodName: "get_version", Handler: _HttpProximaService_GetVersion_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/proxima_be.proto", } ================================================ FILE: sdk/go/status.go ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Mar 2021 * \brief */ package be import ( "encoding/json" "errors" "fmt" ) // Status object type Status struct { // Response code from ProximaSE, 0 for success, otherwise for failed Code int32 `json:"code"` // Detail message explain failed reason, Optional field Reason string `json:"reason,omitempty"` } // OK check status func (s *Status) OK() bool { return s.Code == 0 } func (s *Status) IsGrpcError() bool { return s.Code > 0 } // Error msg func (s *Status) Error() string { if s.OK() { return "" } else if s.IsGrpcError() { return fmt.Sprintf("rpc error: code = %d desc = %s", s.Code, s.Reason) } return fmt.Sprintf(fmt.Sprintf("proxima be error: code = %d desc = %s", s.Code, s.Reason)) } // String return json formatted string of Status func (s *Status) String() string { if bytes, err := json.Marshal(s); err == nil { return string(bytes) } return "{}" } // WrapStatus wrap error as Status, for further actions func WrapStatus(err error) (*Status, error) { if s, ok := err.(*Status); ok { return s, nil } return nil, errors.New("Wrap error as sdk.Status failed.") } ================================================ FILE: sdk/go/types.go ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Mar 2021 * \brief */ package be import ( "encoding/json" "errors" "fmt" "reflect" "strings" ) // Version object type Version struct { // Version of client Client string `json:"client:omitempty"` // Version of ProximaSE Server string `json:"server:omitempty"` } // Compatible check compatibility between client and server func (ver *Version) Compatible() bool { return strings.HasPrefix(ver.Server, ver.Client) } // String return json formatted string of Version object func (version *Version) String() string { if bytes, err := json.Marshal(version); err == nil { return string(bytes) } return "{}" } // Address reference to entrypoint of ProximaSE type Address struct { // Host IP address or host name Host string `json:"host:omitempty"` // Port Port uint32 `json:"port"` } // String return json formatted string of Address object func (address *Address) String() string { if bytes, err := json.Marshal(address); err == nil { return string(bytes) } return "{}" } func (addr *Address) address() string { return fmt.Sprintf("%s:%d", addr.Host, addr.Port) } var ( // InvalidIndex used for GenericValueList InvalidIndex int = -1 ) // ColumnIndex Description of column type ColumnIndex struct { // Name of column, empty Name is illegal argument Name string `json:"name,omitempty"` // Type of column, Default is IT_PROXIMA_HNSW_INDEX IndexType `json:"index_type"` // Datatype of column DataType `json:"data_type"` // Dimension of column, Default is 0 Dimension uint32 `json:"dimension"` // Customized parameters for column, Optional ExtraParams map[string]string `json:"extra_params,omitempty"` } // String return json format string of ColumnIndex func (column *ColumnIndex) String() string { if bytes, err := json.Marshal(column); err == nil { return string(bytes) } return "{}" } // Repository Base Description of Repository, drove class specific one type of repository type Repository struct { // Name of repository, empty is illegal argument Name string `json:"name,omitempty"` // Type of repository, Optional field, Default is RT_DATABASE Type RepositoryType `json:"type"` } // DatabaseRepository database repository // Indicate where the data of collection coming from, Proxima BE synchronize Collection // with Database automatically if create collection with Repository. type DatabaseRepository struct { // Derived from Repository class Repository // URI of database, invalid uri will be deferred by Proxima BE, // example: mysql://localhost:3033/example_database // Details: // Schema: indicate drivers, mysql is only supported // Path: indicate databases // Connection string `json:"connection,omitempty"` // Table name TableName string `json:"table_name,omitempty"` // User name used to login database User string `json:"user,omitempty"` // User password Password string `json:"password,omitempty"` } // String return json format string of Repository func (repo *DatabaseRepository) String() string { if bytes, err := json.Marshal(repo); err == nil { return string(bytes) } return "{}" } // CollectionConfig configuration of collection type CollectionConfig struct { // Name of collection CollectionName string `json:"collection_name,omitempty"` // Max documents per segment, Optional field, default is max value of system(^uint64(0) = 18446744073709551615) MaxDocsPerSegment uint64 `json:"max_docs_per_segment"` // Entity of document, optional field, default is empty ForwardColumns []string `json:"forward_columns,omitempty"` // Columns of document, empty array is illegal argument Columns []ColumnIndex `json:"columns"` // Repository of collection, Optional field, nil for collection which import from client only Repository *DatabaseRepository `json:"repository,omitempty"` } // String method return json formatted string of CollectionConfig func (config *CollectionConfig) String() string { if bytes, err := json.Marshal(config); err == nil { return string(bytes) } return "{}" } // LsnContext Log Sequence Number Context indicate specific point of collection type LsnContext struct { // Sequence number of collection LSN uint64 `json:"lsn"` // Context of collection Context string `json:"context,omitempty"` } // String return json format of LsnContext func (context *LsnContext) String() string { if bytes, err := json.Marshal(context); err == nil { return string(bytes) } return "{}" } // CollectionInfo Details of collection type CollectionInfo struct { // Collection config CollectionConfig // Status of collection Status CollectionStatus `json:"status"` // Unique id of collection, allocated by ProximaSE UUID string `json:"uuid,omitempty"` // Latest LSN Context Context *LsnContext `json:"context"` // Magic number of collection MagicNumber uint64 `json:"magic_number"` } // String method return json formatted string of CollectionInfo func (info *CollectionInfo) String() string { if bytes, err := json.Marshal(info); err == nil { return string(bytes) } return "{}" } // Range for define limitation of properties type Range struct { // Beginning of range Min uint64 // Ending of range Max uint64 } // SegmentStat stats of Segment type SegmentStat struct { // ID of segment SegmentID uint32 // State of segment State SegmentState // Count of documents in segment DocCount uint64 // Index files inside segment IndexFileCount uint64 // Size of segment IndexFileSize uint64 // Range of documents inside segment DocsRange Range // Primary key range of segment PrimaryKeyRange Range // Range of document timestamp inside segment TimestampRange Range // Range of LSN LSNRange Range // Storage path of segment SegmentPath string } // String method return json formatted string of SegmentStat func (stat *SegmentStat) String() string { if bytes, err := json.Marshal(stat); err == nil { return string(bytes) } return "{}" } // CollectionStat stat of Collection type CollectionStat struct { // Name of collection CollectionName string // Storage path of collection CollectionPath string // Total documents inside collection TotalDocCount uint64 // The number of segments in collection TotalSegmentCount uint64 // The number of files in collection TotalIndexFileCount uint64 // The total size of storage, count by bytes TotalIndexFileSize uint64 // Segment stats SegmentStats []SegmentStat } // String method return json formatted string of CollectionStat func (stat *CollectionStat) String() string { if bytes, err := json.Marshal(stat); err == nil { return string(bytes) } return "{}" } // Row record type Row struct { // Primary key of row record PrimaryKey uint64 // Operation type OperationType // Index column value list IndexColumnValues []interface{} // Forward column value list ForwardColumnValues []interface{} // Log Sequence Number context *LsnContext } // RowMeta meta for row records type RowMeta struct { // Index column name list IndexColumnNames []string // Index column name list ForwardColumnNames []string } // WriteRequest object, the parameter of ProximaSEClient.Write method type WriteRequest struct { // Name of collection CollectionName string // Meta header Meta RowMeta // Row record list Rows []Row // Request ID, Optional RequestID string // Magic number, Optional MagicNumber uint64 } // Document for search result type Document struct { // Primary key of document PrimaryKey uint64 `json:"primary_key,omitempty"` // Similarity of document to query vector, bigger is more similar Score float32 `json:"score"` // Properties of document ForwardColumns map[string]interface{} `json:"forwards,omitempty"` } // String return json format of document func (doc *Document) String() string { if bytes, err := json.Marshal(doc); err == nil { return string(bytes) } return "{}" } func (doc *Document) GetForward(name string) (reflect.Value, error) { if value, ok := doc.ForwardColumns[name]; ok { return reflect.ValueOf(value), nil } return reflect.ValueOf(nil), errors.New("Can't get forward value") } // QueryResponse Response of QueryRequest type QueryResponse struct { // Debug Information, json format string DebugInfo string // Latency of request, count by ms Latency uint64 // Documents of query Documents [][]*Document } // String return json format of QueryResponse func (resp *QueryResponse) String() string { if bytes, err := json.Marshal(resp); err == nil { return string(bytes) } return "{}" } ================================================ FILE: sdk/go/utils.go ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Mar 2021 * \brief */ package be import ( "bytes" "encoding/binary" "errors" "log" "math" "reflect" pb "github.com/alibaba/proximabilin/sdk/go/proto" "github.com/boljen/go-bitmap" ) func createAcceptableTypes() bitmap.Bitmap { var bitmaps = bitmap.New(int(reflect.UnsafePointer)) bitmaps.Set(int(reflect.Slice), true) bitmaps.Set(int(reflect.String), true) bitmaps.Set(int(reflect.Bool), true) bitmaps.Set(int(reflect.Int), true) bitmaps.Set(int(reflect.Int32), true) bitmaps.Set(int(reflect.Int64), true) bitmaps.Set(int(reflect.Uint), true) bitmaps.Set(int(reflect.Uint32), true) bitmaps.Set(int(reflect.Uint64), true) bitmaps.Set(int(reflect.Float32), true) bitmaps.Set(int(reflect.Float64), true) return bitmaps } func createAcceptableFeatureTypes() bitmap.Bitmap { var bitmaps = bitmap.New(int(reflect.UnsafePointer)) bitmaps.Set(int(reflect.Int8), true) bitmaps.Set(int(reflect.Uint32), true) bitmaps.Set(int(reflect.Uint64), true) bitmaps.Set(int(reflect.Float32), true) return bitmaps } func indexTypeApplier(column *pb.CollectionConfig_IndexColumnParam) { if column.IndexType == pb.IndexType_IT_UNDEFINED { column.IndexType = pb.IndexType_IT_PROXIMA_GRAPH_INDEX } } func dataTypeApplier(column *pb.CollectionConfig_IndexColumnParam) { if column.DataType == pb.DataType_DT_UNDEFINED { column.DataType = pb.DataType_DT_VECTOR_FP32 } } var ( genericAcceptableTypes = createAcceptableTypes() queryFeatureTypes = createAcceptableFeatureTypes() columnDefaultValueAppliers = []func(*pb.CollectionConfig_IndexColumnParam){ indexTypeApplier, dataTypeApplier, } sizeOfDataType = map[pb.DataType]int{ pb.DataType_DT_VECTOR_BINARY32: 4, pb.DataType_DT_VECTOR_BINARY64: 8, pb.DataType_DT_VECTOR_FP32: 4, pb.DataType_DT_VECTOR_INT8: 1, } ) func acceptableValueTypes(value interface{}) bool { kind := reflect.TypeOf(value).Kind() return genericAcceptableTypes.Get(int(kind)) } func acceptableFeatureTypes(t reflect.Type) bool { return queryFeatureTypes.Get(int(t.Kind())) } func isSlice(t reflect.Type) bool { return t.Kind() == reflect.Slice } func isArray(t reflect.Type) bool { return t.Kind() == reflect.Array } func isSliceOrArray(t reflect.Type) bool { return isSlice(t) || isArray(t) } func inferVectorFeatureType(features interface{}) (reflect.Kind, bool) { ft := reflect.ValueOf(features) if isSliceOrArray(ft.Type()) { if ft.Len() > 0 && acceptableFeatureTypes(ft.Index(0).Type()) { return ft.Index(0).Kind(), true } } return reflect.Invalid, false } func inferMatrixFeatureType(features interface{}) (reflect.Kind, bool) { ft := reflect.ValueOf(features) if isSliceOrArray(ft.Type()) && ft.Len() > 0 && isSliceOrArray(ft.Index(0).Type()) && ft.Index(0).Len() > 0 && acceptableFeatureTypes(ft.Index(0).Index(0).Type()) { return ft.Index(0).Index(0).Kind(), true } return reflect.Invalid, false } func inferMatrixDimension(matrix interface{}) (int, int, error) { ft := reflect.ValueOf(matrix) min, max := math.MaxInt32, math.MinInt32 for i := 0; i < ft.Len(); i++ { counts := ft.Index(i).Len() if counts < min { min = counts } if counts > max { max = counts } } if min == max || min > 0 { return ft.Len(), max, nil } return 0, 0, errors.New("Dimension of vectors not equal") } func inferFeatures(features interface{}) (pb.DataType, int, int, error) { if kind, ok := inferMatrixFeatureType(features); ok { if batch, dimension, err := inferMatrixDimension(features); err == nil { switch kind { case reflect.Int8: return pb.DataType_DT_VECTOR_INT8, dimension, batch, nil case reflect.Uint32: return pb.DataType_DT_VECTOR_BINARY32, dimension, batch, nil case reflect.Uint64: return pb.DataType_DT_VECTOR_BINARY64, dimension, batch, nil case reflect.Float32: return pb.DataType_DT_VECTOR_FP32, dimension, batch, nil } } } else if kind, ok := inferVectorFeatureType(features); ok { value := reflect.ValueOf(features) switch kind { case reflect.Int8: return pb.DataType_DT_VECTOR_INT8, value.Len(), 1, nil case reflect.Uint32: return pb.DataType_DT_VECTOR_BINARY32, value.Len(), 1, nil case reflect.Uint64: return pb.DataType_DT_VECTOR_BINARY64, value.Len(), 1, nil case reflect.Float32: return pb.DataType_DT_VECTOR_FP32, value.Len(), 1, nil } } return pb.DataType_DT_UNDEFINED, 0, 0, errors.New("The type of features can't acceptable, please refers to help of Query method") } func applyDefaultValue(column *pb.CollectionConfig_IndexColumnParam) *pb.CollectionConfig_IndexColumnParam { for _, applier := range columnDefaultValueAppliers { applier(column) } return column } func buildPBCollectionConfig(config *CollectionConfig) (*pb.CollectionConfig, error) { in := pb.CollectionConfig{ CollectionName: config.CollectionName, MaxDocsPerSegment: config.MaxDocsPerSegment, ForwardColumnNames: config.ForwardColumns, IndexColumnParams: make([]*pb.CollectionConfig_IndexColumnParam, len(config.Columns)), RepositoryConfig: nil, } for i, cc := range config.Columns { column := pb.CollectionConfig_IndexColumnParam{ ColumnName: cc.Name, IndexType: pb.IndexType(cc.IndexType), DataType: pb.DataType(cc.DataType), Dimension: cc.Dimension, ExtraParams: []*pb.KeyValuePair{}, } for k, v := range cc.ExtraParams { column.ExtraParams = append(column.ExtraParams, &pb.KeyValuePair{Key: k, Value: v}) } in.IndexColumnParams[i] = applyDefaultValue(&column) } if config.Repository != nil { if config.Repository.Type == Database { in.RepositoryConfig = &pb.CollectionConfig_RepositoryConfig{ RepositoryType: pb.CollectionConfig_RepositoryConfig_RepositoryType(Database), RepositoryName: config.Repository.Name, Entity: &pb.CollectionConfig_RepositoryConfig_Database_{ Database: &pb.CollectionConfig_RepositoryConfig_Database{ ConnectionUri: config.Repository.Connection, TableName: config.Repository.TableName, User: config.Repository.User, Password: config.Repository.Password, }, }, } } else { // Error, Unknown respository type return nil, errors.New("Error, Unknown respository type") } } return &in, nil } func buildRepositoryConfigFromPB(in *pb.CollectionConfig_RepositoryConfig) *DatabaseRepository { if in == nil { return nil } // Deserialize DatabaseRepository from PB message repo := DatabaseRepository{ Repository: Repository{ Name: in.RepositoryName, Type: RepositoryType(in.RepositoryType), }, Connection: in.GetDatabase().ConnectionUri, TableName: in.GetDatabase().TableName, User: in.GetDatabase().User, Password: in.GetDatabase().Password, } // Error if repo.Repository.Type != Database { log.Print("Error: can't deserialize DatabaseRepository from PB") return nil } return &repo } func buildCollectionInfoFromPB(collection *pb.CollectionInfo) (*CollectionInfo, error) { info := CollectionInfo{ CollectionConfig: CollectionConfig{ CollectionName: collection.Config.CollectionName, MaxDocsPerSegment: collection.Config.MaxDocsPerSegment, ForwardColumns: collection.Config.ForwardColumnNames, Columns: make([]ColumnIndex, len(collection.Config.IndexColumnParams)), Repository: nil, }, Status: CollectionStatus(collection.Status), UUID: collection.Uuid, Context: nil, MagicNumber: collection.MagicNumber, } if collection.LatestLsnContext != nil { info.Context = &LsnContext{ LSN: collection.LatestLsnContext.Lsn, Context: collection.LatestLsnContext.Context, } } for i, param := range collection.Config.IndexColumnParams { column := ColumnIndex{ Name: param.ColumnName, IndexType: IndexType(param.IndexType), DataType: DataType(param.DataType), Dimension: param.Dimension, ExtraParams: map[string]string{}, } for _, kv := range param.ExtraParams { column.ExtraParams[kv.Key] = kv.Value } info.CollectionConfig.Columns[i] = column } info.CollectionConfig.Repository = buildRepositoryConfigFromPB(collection.Config.RepositoryConfig) return &info, nil } func buildCollectionStatFromPB(in *pb.CollectionStats) (*CollectionStat, error) { stat := CollectionStat{ CollectionName: in.CollectionName, CollectionPath: in.CollectionPath, TotalDocCount: in.TotalDocCount, TotalSegmentCount: in.TotalSegmentCount, TotalIndexFileCount: in.TotalIndexFileCount, TotalIndexFileSize: in.TotalIndexFileSize, SegmentStats: make([]SegmentStat, len(in.SegmentStats)), } for i, segment := range in.SegmentStats { ss := SegmentStat{ SegmentID: segment.SegmentId, State: SegmentState(segment.State), DocCount: segment.DocCount, IndexFileCount: segment.IndexFileCount, IndexFileSize: segment.IndexFileSize, DocsRange: Range{ Min: segment.MinDocId, Max: segment.MaxDocId, }, PrimaryKeyRange: Range{ Min: segment.MinPrimaryKey, Max: segment.MaxPrimaryKey, }, TimestampRange: Range{ Min: segment.MinTimestamp, Max: segment.MaxTimestamp, }, LSNRange: Range{ Min: segment.MinLsn, Max: segment.MaxLsn, }, SegmentPath: segment.SegmentPath, } stat.SegmentStats[i] = ss } return &stat, nil } func serializeSlice(in reflect.Value) ([]byte, error) { if in.Kind() != reflect.Array && in.Kind() != reflect.Slice { return nil, errors.New("Input value is not array or slice") } bytes := bytes.NewBuffer(make([]byte, 0, 1024)) if err := binary.Write(bytes, binary.LittleEndian, in.Interface()); err != nil { return nil, err } return bytes.Bytes(), nil } func buildPBGenericValue(value interface{}) *pb.GenericValue { gv := &pb.GenericValue{ ValueOneof: nil, } v := reflect.ValueOf(value) switch v.Kind() { case reflect.String: gv.ValueOneof = &pb.GenericValue_StringValue{ StringValue: v.String(), } case reflect.Bool: gv.ValueOneof = &pb.GenericValue_BoolValue{ BoolValue: v.Bool(), } case reflect.Int32: gv.ValueOneof = &pb.GenericValue_Int32Value{ Int32Value: int32(v.Int()), } case reflect.Int64, reflect.Int: gv.ValueOneof = &pb.GenericValue_Int64Value{ Int64Value: v.Int(), } case reflect.Uint32: gv.ValueOneof = &pb.GenericValue_Uint32Value{ Uint32Value: uint32(v.Uint()), } case reflect.Uint64, reflect.Uint: gv.ValueOneof = &pb.GenericValue_Uint64Value{ Uint64Value: v.Uint(), } case reflect.Float32: gv.ValueOneof = &pb.GenericValue_FloatValue{ FloatValue: float32(v.Float()), } case reflect.Float64: gv.ValueOneof = &pb.GenericValue_DoubleValue{ DoubleValue: v.Float(), } case reflect.Slice, reflect.Array: bytes, err := serializeSlice(v) if err == nil { gv.ValueOneof = &pb.GenericValue_BytesValue{ BytesValue: bytes, } } else { log.Print(err) } default: log.Print("Unknown value type skip it") } if gv.ValueOneof == nil { return nil } return gv } func buildGenericValueList(in []interface{}, out *pb.GenericValueList) error { for i, v := range in { gv := buildPBGenericValue(v) if gv == nil { return errors.New("Serialize value to pb failed") } out.Values[i] = gv } return nil } func buildPBWriteRequest(req *WriteRequest) (*pb.WriteRequest, error) { in := pb.WriteRequest{ CollectionName: req.CollectionName, RowMeta: &pb.WriteRequest_RowMeta{ IndexColumnMetas: make([]*pb.WriteRequest_IndexColumnMeta, len(req.Meta.IndexColumnNames)), ForwardColumnNames: req.Meta.ForwardColumnNames, }, Rows: make([]*pb.WriteRequest_Row, len(req.Rows)), RequestId: req.RequestID, MagicNumber: req.MagicNumber, } for i, row := range req.Rows { pbRow := pb.WriteRequest_Row{ PrimaryKey: row.PrimaryKey, OperationType: pb.OperationType(row.OperationType), IndexColumnValues: &pb.GenericValueList{ Values: make([]*pb.GenericValue, len(row.IndexColumnValues)), }, ForwardColumnValues: &pb.GenericValueList{ Values: make([]*pb.GenericValue, len(row.ForwardColumnValues)), }, LsnContext: nil, } err := buildGenericValueList(row.IndexColumnValues, pbRow.IndexColumnValues) if err != nil { log.Print("Can't serialize value to PB") return nil, err } err = buildGenericValueList(row.ForwardColumnValues, pbRow.ForwardColumnValues) if err != nil { log.Print("Can't serialize value to PB") return nil, err } if row.LsnContext != nil { pbRow.LsnContext = &pb.LsnContext{ Lsn: row.LsnContext.LSN, Context: row.LsnContext.Context, } } in.Rows[i] = &pbRow } if len(req.Rows) == 0 { return nil, errors.New("No attached rows in request") } row := req.Rows[0] for i, name := range req.Meta.IndexColumnNames { if len(row.IndexColumnValues) <= i { return nil, errors.New("Mismatched values in write request") } dataType, dimension, _, err := inferFeatures(row.IndexColumnValues[i]) if err != nil { return nil, errors.New("Can't infer the data type of vector") } in.RowMeta.IndexColumnMetas[i] = &pb.WriteRequest_IndexColumnMeta{ ColumnName: name, DataType: dataType, Dimension: uint32(dimension), } } return &in, nil } func serializeFeature(batch int, features interface{}) (*bytes.Buffer, error) { bytes := bytes.NewBuffer(make([]byte, 0, 1024)) if batch > 1 { queryFeatures := reflect.ValueOf(features) for i := 0; i < batch; i++ { err := binary.Write(bytes, binary.LittleEndian, queryFeatures.Index(i).Interface()) if err != nil { return nil, err } } } else { if err := binary.Write(bytes, binary.LittleEndian, features); err != nil { return nil, err } } return bytes, nil } func buildPBQueryRequest(collection string, column string, features interface{}, opts ...QueryOption) (*pb.QueryRequest, error) { options := defaultOptions() for _, opt := range opts { if !opt.apply(options) { return nil, errors.New("Can't serialize options to query request") } } dataType, dimension, batch, err := inferFeatures(features) if err != nil { return nil, err } pbReq := &pb.QueryRequest{ QueryType: pb.QueryRequest_QT_KNN, CollectionName: collection, DebugMode: options.debug, QueryParam: nil, } bytes, err := serializeFeature(batch, features) if err != nil { return nil, err } param := &pb.QueryRequest_KnnParam{ KnnParam: &pb.QueryRequest_KnnQueryParam{ ColumnName: column, Topk: options.topk, FeaturesValue: &pb.QueryRequest_KnnQueryParam_Features{Features: bytes.Bytes()}, BatchCount: uint32(batch), Dimension: uint32(dimension), DataType: dataType, Radius: options.radius, IsLinear: options.linear, ExtraParams: []*pb.KeyValuePair{}, }, } for k, v := range options.params { kv := &pb.KeyValuePair{ Key: k, Value: v, } param.KnnParam.ExtraParams = append(param.KnnParam.ExtraParams, kv) } pbReq.QueryParam = param return pbReq, nil } func buildDocumentFromPB(doc *pb.Document) *Document { document := &Document{ PrimaryKey: doc.PrimaryKey, Score: doc.Score, ForwardColumns: map[string]interface{}{}, } for _, pair := range doc.ForwardColumnValues { switch pair.Value.ValueOneof.(type) { case (*pb.GenericValue_BytesValue): document.ForwardColumns[pair.Key] = pair.Value.GetBytesValue() case (*pb.GenericValue_StringValue): document.ForwardColumns[pair.Key] = pair.Value.GetStringValue() case (*pb.GenericValue_BoolValue): document.ForwardColumns[pair.Key] = pair.Value.GetBoolValue() case (*pb.GenericValue_Int32Value): document.ForwardColumns[pair.Key] = pair.Value.GetInt32Value() case (*pb.GenericValue_Int64Value): document.ForwardColumns[pair.Key] = pair.Value.GetInt64Value() case (*pb.GenericValue_Uint32Value): document.ForwardColumns[pair.Key] = pair.Value.GetUint32Value() case (*pb.GenericValue_Uint64Value): document.ForwardColumns[pair.Key] = pair.Value.GetUint64Value() case (*pb.GenericValue_FloatValue): document.ForwardColumns[pair.Key] = pair.Value.GetFloatValue() case (*pb.GenericValue_DoubleValue): document.ForwardColumns[pair.Key] = pair.Value.GetDoubleValue() } } return document } func buildQueryResponseFromPB(resp *pb.QueryResponse) (*QueryResponse, error) { response := &QueryResponse{ DebugInfo: resp.DebugInfo, Latency: resp.LatencyUs, Documents: make([][]*Document, len(resp.Results)), } for nRes, res := range resp.Results { documents := make([]*Document, len(res.Documents)) for i, doc := range res.Documents { documents[i] = buildDocumentFromPB(doc) } response.Documents[nRes] = documents } return response, nil } ================================================ FILE: sdk/go/utils_test.go ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Mar 2021 * \brief */ package be import ( "reflect" "testing" pb "proto" ) func TestAcceptableFeatureType(t *testing.T) { if acceptableFeatureTypes(reflect.TypeOf(int(10))) { t.Error("int64 is not acceptable as features") } } func TestIsSlice(t *testing.T) { if !isSlice(reflect.ValueOf([]int{1, 2}).Type()) { t.Error("Check []int slice failed") } if !isSlice(reflect.ValueOf([]float32{1.0, 3.0}).Type()) { t.Error("Check []float32 slice failed") } if isSlice(reflect.ValueOf([3]float32{1.0, 3.0}).Type()) { t.Error("Check [3]float32 slice failed") } } func TestIsArray(t *testing.T) { if isArray(reflect.ValueOf([]int{1, 2}).Type()) { t.Error("Check []int is array failed") } if isArray(reflect.ValueOf([]float32{1.0, 3.0}).Type()) { t.Error("Check []float32 is array failed") } if !isArray(reflect.ValueOf([3]float32{1.0, 3.0}).Type()) { t.Error("Check [3]float32 is array failed") } } func TestIsSliceOrArray(t *testing.T) { if !isSliceOrArray(reflect.ValueOf([]int{1, 2}).Type()) { t.Error("Check []int is slice or array failed") } if !isSliceOrArray(reflect.ValueOf([]float32{1.0, 3.0}).Type()) { t.Error("Check []int is slice or array failed") } if !isSliceOrArray(reflect.ValueOf([3]float32{1.0, 3.0}).Type()) { t.Error("Check [3]float32 is slice or array failed") } } func TestInferVectorFeature(t *testing.T) { // supportted list kind, ok := inferVectorFeatureType([]int8{1, 2, 3}) if !ok || kind != reflect.Int8 { t.Error("Can't infer feature type of int8 vector") } kind, ok = inferVectorFeatureType([]uint32{1, 2, 3}) if !ok || kind != reflect.Uint32 { t.Error("Can't infer feature type of uint32 vector") } kind, ok = inferVectorFeatureType([]uint64{1, 2, 3}) if !ok || kind != reflect.Uint64 { t.Error("Can't infer feature type of uint64 vector") } kind, ok = inferVectorFeatureType([]float32{1, 2, 3}) if !ok || kind != reflect.Float32 { t.Error("Can't infer feature type of float32 vector") } // Not supportted if _, ok = inferVectorFeatureType([]int32{1, 2, 3}); ok { t.Error("infer feature type of int32 vector") } if _, ok = inferVectorFeatureType([]int64{1, 2, 3}); ok { t.Error("infer feature type of int64 vector") } if _, ok = inferVectorFeatureType([][]int64{{1, 2, 3}}); ok { t.Error("infer feature type of int64 metrix") } if _, ok = inferVectorFeatureType(10); ok { t.Error("infer feature type of int64 metrix") } } func TestInferMatrixFeatureType(t *testing.T) { kind, ok := inferMatrixFeatureType([][]int8{{1, 2, 3}}) if !ok || kind != reflect.Int8 { t.Error("Can't infer feature type of int8 vector") } kind, ok = inferMatrixFeatureType([][]uint32{{1, 2, 3}}) if !ok || kind != reflect.Uint32 { t.Error("Can't infer feature type of uint32 vector") } kind, ok = inferMatrixFeatureType([][]uint64{{1, 2, 3}}) if !ok || kind != reflect.Uint64 { t.Error("Can't infer feature type of uint64 vector") } kind, ok = inferMatrixFeatureType([][]float32{{1.0, 2, 3}}) if !ok || kind != reflect.Float32 { t.Error("Can't infer feature type of float32 vector") } if _, ok = inferMatrixFeatureType([][]int8{{}}); ok { t.Error("infer feature type of [][]int8{{}} vector") } if _, ok = inferMatrixFeatureType([][]int8{}); ok { t.Error("infer feature type of [][]int8{ vector") } if _, ok = inferMatrixFeatureType([][]int32{{1, 2, 3}}); ok { t.Error("infer feature type of [][]int32{{1, 2, 3}} vector") } if _, ok = inferMatrixFeatureType([][]int32{{}}); ok { t.Error("infer feature type of [][]int32{{}} vector") } if _, ok = inferMatrixFeatureType([][]int32{}); ok { t.Error("infer feature type of [][]int32{ vector") } } func TestInferMatrixDimension(t *testing.T) { batch, deminsion, err := inferMatrixDimension([][]float32{{1.0, 2, 3}}) if err != nil || batch != 1 || deminsion != 3 { t.Error("Can't refer batch and dimension from [][]float32{{1.0, 2, 3}}") } batch, deminsion, err = inferMatrixDimension([][]int{{1, 2, 3}, {2, 3, 4}}) if err != nil || batch != 2 || deminsion != 3 { t.Error("Can't refer batch and dimension from [][]float32{{1.0, 2, 3}}") } batch, deminsion, err = inferMatrixDimension([][]float32{{1.0, 2, 3}, {}}) if err == nil { t.Error("Can't refer batch and dimension from [][]float32{{1.0, 2, 3}}") } } func TestInferFeatures(t *testing.T) { dt, deminsion, batch, err := inferFeatures([][]float32{{1.0, 2, 3}}) if err != nil || dt != pb.DataType_DT_VECTOR_FP32 || deminsion != 3 || batch != 1 { t.Error(err) t.Error("can't infer features of [][]float32{{1.0, 2, 3}}") } dt, deminsion, batch, err = inferFeatures([][]float32{{1.0, 2, 3}, {2, 3, 4}}) if err != nil || dt != pb.DataType_DT_VECTOR_FP32 || deminsion != 3 || batch != 2 { t.Error(err) t.Error("can't infer features of [][]float32{{1.0, 2, 3}, {2, 3, 4}}") } dt, deminsion, batch, err = inferFeatures([]float32{1.0, 2, 3, 2, 3, 4}) if err != nil || dt != pb.DataType_DT_VECTOR_FP32 || deminsion != 6 || batch != 1 { t.Error(err) t.Error("can't infer features of []float32{1.0, 2, 3, 2, 3, 4}") } } ================================================ FILE: sdk/go/version.go ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Mar 2021 * \brief */ // package be is client of Proxima BE project // package be const ( VERSION = "0.2.0" ) ================================================ FILE: sdk/java/README.txt ================================================ ================================================ FILE: sdk/java/example/pom.xml ================================================ 4.0.0 com.alibaba.test proxima-example 1.0-SNAPSHOT com.alibaba.proxima proxima-be-java-sdk 0.1.0 org.slf4j slf4j-api 1.7.30 org.apache.logging.log4j log4j-slf4j-impl 2.17.1 org.apache.maven.plugins maven-compiler-plugin 2.3.2 1.8 1.8 UTF-8 org.apache.maven.plugins maven-shade-plugin 1.2.1 package shade com.alibaba.example.BenchClient ================================================ FILE: sdk/java/example/src/main/java/com/alibaba/example/BenchClient.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Apr 2021 * \brief Bench client for java sdk */ package com.alibaba.example; import com.alibaba.proxima.be.client.*; import io.grpc.internal.JsonParser; import io.grpc.internal.JsonUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.*; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; public class BenchClient { private static Logger logger = LoggerFactory.getLogger(BenchClient.class); private Map kv; private String collection; private List clientList; private long[] keys; private byte[][] features; private String columnName; private int dimension = 512; private int topk = 10; public static class ThreadWorker implements Runnable { private WorkerType workerType; private ProximaSearchClient client; private String collection; private String columnName; private int dimension; private int topk; private long[] keys; private byte[][] features; private int start; private int end; private AtomicInteger index; public enum WorkerType { WT_INSERT, WT_SEARCH } public ThreadWorker(WorkerType workerType, ProximaSearchClient client, String collection, String columnName, int dimension, long[] keys, byte[][] features, int start, int end, AtomicInteger index) { this.workerType = workerType; this.client = client; this.collection = collection; this.columnName = columnName; this.dimension = dimension; this.keys = keys; this.features = features; this.start = start; this.end = end; this.index = index; } public ThreadWorker(WorkerType workerType, ProximaSearchClient client, String collection, String columnName, int dimension, int topk, long[] keys, byte[][] features, int start, int end, AtomicInteger index) { this.workerType = workerType; this.client = client; this.collection = collection; this.columnName = columnName; this.topk = topk; this.dimension = dimension; this.keys = keys; this.features = features; this.start = start; this.end = end; this.index = index; } private void insert() { int i = index.getAndIncrement(); int total = features.length; while (i < total) { // for (int i = start; i < end; ++i) { WriteRequest request = WriteRequest.newBuilder() .withCollectionName(collection) .addIndexColumnMeta(columnName, DataType.VECTOR_FP32, dimension) .addRow(WriteRequest.Row.newBuilder() .withPrimaryKey(keys[i]) .withOperationType(WriteRequest.OperationType.INSERT) .addIndexValue(features[i]) .build()) .build(); try { Status status = client.write(request); if (!status.ok()) { logger.error("Write failed " + status.toString()); } } catch (ProximaSEException e) { e.printStackTrace(); } if (i % 10000 == 0) { logger.info("processed " + i); } i = index.getAndIncrement(); } } private void search() { int i = index.getAndIncrement(); int total = features.length; while (i < total) { // for (int i = start; i < end; ++i) { QueryRequest request = QueryRequest.newBuilder() .withCollectionName(collection) .withKnnQueryParam(QueryRequest.KnnQueryParam.newBuilder() .withColumnName(columnName) .withTopk(topk) .withFeatures(features[i], DataType.VECTOR_FP32, dimension, 1) .build()) .build(); try { QueryResponse response = client.query(request); if (!response.ok()) { logger.error("Query failed " + response.getStatus().toString()); } } catch (ProximaSEException e) { e.printStackTrace(); } i = index.getAndIncrement(); } } public void run() { if (workerType == WorkerType.WT_INSERT) { insert(); } else if (workerType == WorkerType.WT_SEARCH) { search(); } } } public BenchClient(Map kv) { this.kv = kv; clientList = new ArrayList(); } public boolean init() { if (!kv.containsKey("address")) { logger.error("address no specified."); return false; } String address = kv.get("address"); String[] array = address.split(":"); if (array.length != 2) { logger.error("invalid address."); return false; } String host = array[0]; int port = Integer.valueOf(array[1]); ConnectParam connectParam = ConnectParam.newBuilder() .withHost(host) .withPort(port) .build(); int concurrency = 1; if (kv.containsKey("concurrency")) { concurrency = Integer.valueOf(kv.get("concurrency")); } for (int i = 0; i < concurrency; ++i) { clientList.add(new ProximaGrpcSearchClient(connectParam)); } if (!kv.containsKey("collection")) { logger.error("collection no specified."); return false; } collection = kv.get("collection"); if (kv.containsKey("column")) { columnName = kv.get("column"); } if (!kv.containsKey("command")) { logger.error("command no specified."); return false; } return true; } public boolean execute() { String command = kv.get("command"); if (command.equals("create")) { return createCollection(); } else if (command.equals("drop")) { dropCollection(); } else if (command.equals("describe")) { describeCollection(); } else if (command.equals("stats")) { statsCollection(); } else if (command.equals("insert")) { insertCollection(); } else if (command.equals("search")) { searchCollection(); } else { logger.error("invalid command " + command); return false; } return true; } public boolean createCollection() { String schema = kv.get("schema"); Object object; try { object = JsonParser.parse(schema); } catch (IOException e) { e.printStackTrace(); return false; } if (!(object instanceof Map)) { throw new RuntimeException("invalid schema"); } Map kvMap = (Map)object; List indexColumnParams = (List)kvMap.get("index_column_params"); List indexList = new ArrayList<>(); for (int i = 0; i < indexColumnParams.size(); ++i) { Map paramObj = (Map)indexColumnParams.get(i); indexList.add(IndexColumnParam.newBuilder() .withColumnName((String)paramObj.get("column_name")) .withDataType(DataType.valueOf((JsonUtil.getNumberAsInteger(paramObj,"data_type")).intValue())) .withDimension((JsonUtil.getNumberAsInteger(paramObj,"dimension")).intValue()) .build()); } CollectionConfig config = CollectionConfig.newBuilder() .withCollectionName(collection) .withIndexColumnParams(indexList) .withMaxDocsPerSegment(0) .build(); try { Status status = clientList.get(0).createCollection(config); if (status.ok()) { logger.info("Create collection success."); return true; } else { logger.info("Create collection failed " + status.toString()); return false; } } catch (ProximaSEException e) { e.printStackTrace(); return false; } } public void dropCollection() { Status status = clientList.get(0).dropCollection(collection); if (status.ok()) { logger.info("Drop collection success."); } else { logger.info("Drop collection failed " + status.toString()); } } public void describeCollection() { DescribeCollectionResponse response = clientList.get(0).describeCollection(collection); if (response.ok()) { logger.info("Describe collection success."); CollectionConfig config = response.getCollectionInfo().getCollectionConfig(); List indexColumnParams = config.getIndexColumnParams(); for (int i = 0; i < indexColumnParams.size(); ++i) { logger.info("IndexColumnName: " + indexColumnParams.get(i).getColumnName()); logger.info("DataType: " + indexColumnParams.get(i).getDataType().name()); logger.info("Dimension: " + indexColumnParams.get(i).getDimension()); } logger.info("ForwardColumnNames: " + config.getForwardColumnNames()); } else { logger.error("Describe collection failed " + response.getStatus().toString()); } } public void statsCollection() { StatsCollectionResponse response = clientList.get(0).statsCollection(collection); if (response.ok()) { logger.info("Stats collection success."); CollectionStats stats = response.getCollectionStats(); logger.info("TotalDocCount: " + stats.getTotalDocCount()); logger.info("SegmentCount: " + stats.getSegmentStatsCount()); } else { logger.error("Describe collection failed " + response.getStatus().toString()); } } private boolean loadTxtFile(String fileName) { File file = new File(fileName); BufferedReader reader = null; List> vectorArray = new ArrayList>(); List vectorKeys = new ArrayList(); try { reader = new BufferedReader(new FileReader(fileName)); String tempStr; while ((tempStr = reader.readLine()) != null) { String[] array = tempStr.split(";"); String[] vector; if (array.length == 2) { vector = array[1].split(" "); vectorKeys.add(Long.valueOf(array[0])); } else { continue; } List floatVector = new ArrayList<>(); for (int i = 0; i < vector.length; ++i) { floatVector.add(Float.valueOf(vector[i])); } vectorArray.add(floatVector); } reader.close(); } catch (IOException e) { e.printStackTrace(); } finally { if (reader != null) { try { reader.close(); } catch (IOException e1) { e1.printStackTrace(); } } } this.features = new byte[vectorArray.size()][]; this.keys = new long[vectorArray.size()]; for (int i = 0; i < vectorArray.size(); ++i) { List tmpArray = vectorArray.get(i); ByteBuffer bf = ByteBuffer.allocate(dimension * 4).order(ByteOrder.LITTLE_ENDIAN); FloatBuffer floatBuffer = bf.asFloatBuffer(); for (int j = 0; j < dimension; ++j) { floatBuffer.put(tmpArray.get(j)); } this.features[i] = bf.array(); this.keys[i] = vectorKeys.get(i).longValue(); } return true; } private boolean loadVecs2File(String fileName) { File file = new File(fileName); FileInputStream stream; try { stream = new FileInputStream(file); byte[] vecsHeaderBytes = new byte[12]; int bytes = stream.read(vecsHeaderBytes); if (bytes != 12) { logger.error("invalid vecs file."); return false; } long totalCount = 0; for (int i = 0; i < 8; ++i) { totalCount += ((long)(vecsHeaderBytes[i] & 0xFF) << (i * 8)); } int metaSize = 0; for (int i = 8; i < 12; ++i) { metaSize += ((vecsHeaderBytes[i] & 0xFF) << ((i - 8) * 8)); } logger.info(String.valueOf(metaSize)); stream.skip(metaSize); this.features = new byte[(int)totalCount][dimension * 4]; this.keys = new long[(int)totalCount]; for (int i = 0; i < totalCount; ++i) { stream.read(this.features[i]); } byte[] keysBuf = new byte[(int)totalCount * 8]; stream.read(keysBuf); for (int i = 0; i < totalCount; ++i) { int start = i * 8; long value = 0; for (int j = 0; j < 8; ++j) { value += ((long)(keysBuf[start + j] & 0xFF) << (j * 8)); } this.keys[i] = value; } return true; } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return true; } private boolean loadFileData() { if (!kv.containsKey("file")) { logger.error("file no specified."); return false; } String file = kv.get("file"); if (file.endsWith(".txt")) { return loadTxtFile(file); } else if (file.endsWith(".vecs2")) { return loadVecs2File(file); } else { logger.error("unsupported file " + file); return false; } } public void insertCollection() { if (columnName == null || columnName.isEmpty()) { logger.error("column no specified."); return; } if (!loadFileData()) { logger.error("Load file data failed."); return; } long startTime = System.currentTimeMillis(); int totalCount = this.features.length; int concurrency = this.clientList.size(); int step = (totalCount + concurrency - 1) / concurrency; List threads = new ArrayList(); int start = 0; AtomicInteger idx = new AtomicInteger(0); for (int i = 0; i < concurrency; ++i) { threads.add(new Thread(new ThreadWorker(ThreadWorker.WorkerType.WT_INSERT, clientList.get(i), collection, columnName, dimension, keys, features, start, start + step, idx))); start += step; threads.get(i).start(); logger.info("Thread " + i + " start working."); } for (int i = 0; i < concurrency; ++i) { try { threads.get(i).join(); logger.info("Thread " + i + " stopped."); } catch (InterruptedException e) { e.printStackTrace(); } } long endTime = System.currentTimeMillis(); logger.info("Build Qps: " + totalCount * 1000 / (endTime - startTime)); } public void searchCollection() { if (columnName == null || columnName.isEmpty()) { logger.error("column no specified."); return; } if (kv.containsKey("topk")) { topk = Integer.valueOf(kv.get("topk")).intValue(); } if (!loadFileData()) { logger.error("Load file data failed."); return; } // long startTime = System.currentTimeMillis(); int totalCount = this.features.length; // if (totalCount > 10000) { // totalCount = 10000; // } int concurrency = this.clientList.size(); int step = (totalCount + concurrency - 1) / concurrency; List threads = new ArrayList(); int start = 0; AtomicInteger idx = new AtomicInteger(0); long startTime = System.currentTimeMillis(); for (int i = 0; i < concurrency; ++i) { threads.add(new Thread(new ThreadWorker(ThreadWorker.WorkerType.WT_SEARCH, clientList.get(i), collection, columnName, dimension, topk, keys, features, start, start + step, idx))); start += step; threads.get(i).start(); // logger.info("Thread " + i + " start working."); } for (int i = 0; i < concurrency; ++i) { try { threads.get(i).join(); // logger.info("Thread " + i + " stopped."); } catch (InterruptedException e) { e.printStackTrace(); } } long endTime = System.currentTimeMillis(); logger.info("Search Qps: " + totalCount * 1000.0 / (endTime - startTime)); } /** * Example: * --command create --address 127.0.0.1:16000 --collection test1 --schema {\"index_column_params\":[{\"column_name\":\"index1\",\"data_type\":23,\"dimension\":4}]} * --command describe --address 127.0.0.1:16000 --collection test1 * --command drop --address 127.0.0.1:16000 --collection test1 * --command insert --address 127.0.0.1:16000 --collection test1 --column index1 --file insert_vectors.txt --concurrency 8 * --command search --address 127.0.0.1:16000 --collection test1 --column index1 --file query_vectors.txt --concurrency 8 * * Each line format(key;dim1 dim2 dim3 dim4) in file insert_vectors.txt or query_vectors.txt as follows: * 3;0.13 0.03 0.31 0.24 * 10;0.25 0.65 0.23 0.14 * @param args */ public static void main(String[] args) { logger.info(args.length + " " + args); if (args.length <= 1) { logger.info("Usage: BenchClient --command [create/drop/insert/search] ..."); return; } Map kv = new HashMap(); for (int i = 0; i < args.length; i += 2) { kv.put(args[i].substring(2), args[i + 1]); logger.info(args[i].substring(2) + " -> " + args[i + 1]); } if (!kv.containsKey("command")) { logger.info("Usage: BenchClient --command [create/drop/insert/search] ..."); return; } BenchClient client = new BenchClient(kv); if (!client.init()) { logger.error("BenchClient init failed."); return; } if (!client.execute()) { logger.error("BenchClient execute failed."); return; } else { logger.info("BenchClient execute success."); } } } ================================================ FILE: sdk/java/example/src/main/java/com/alibaba/example/TestExample.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Apr 2021 */ package com.alibaba.example; import com.alibaba.proxima.be.client.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Arrays; import java.util.List; import java.util.Set; public class TestExample { private static final Logger logger = LoggerFactory.getLogger(TestExample.class); public static void main(String[] args) { // init connect params ConnectParam connectParam = ConnectParam.newBuilder() .withHost("127.0.0.1") .withPort(16000) .build(); // create client ProximaSearchClient client = new ProximaGrpcSearchClient(connectParam); String collectionName = "collection1"; int dimension = 8; // create collection CollectionConfig config = CollectionConfig.newBuilder() .withCollectionName(collectionName) .withForwardColumnNames(Arrays.asList("forward1", "forward2")) .addIndexColumnParam("index1", DataType.VECTOR_FP32, dimension) .build(); try { Status status = client.createCollection(config); if (status.ok()) { logger.info("============== Create collection success. ================"); } else { logger.info("Create collection failed." + status.toString()); } } catch (ProximaSEException e) { e.printStackTrace(); } // describe collection DescribeCollectionResponse descResponse = client.describeCollection(collectionName); if (descResponse.ok()) { logger.info("================ Describe collection success. ==================="); CollectionInfo info = descResponse.getCollectionInfo(); CollectionConfig collectionConfig = info.getCollectionConfig(); logger.info("CollectionName: " + collectionConfig.getCollectionName()); logger.info("CollectionStatus: " + info.getCollectionStatus()); logger.info("Uuid: " + info.getUuid()); logger.info("Forward columns: " + collectionConfig.getForwardColumnNames()); List indexColumnParamList = collectionConfig.getIndexColumnParams(); for (int i = 0; i < indexColumnParamList.size(); ++i) { IndexColumnParam indexParam = indexColumnParamList.get(i); logger.info("IndexColumn: " + indexParam.getColumnName()); logger.info("IndexType: " + indexParam.getDataType()); logger.info("DataType: " + indexParam.getDataType()); logger.info("Dimension: " + indexParam.getDimension()); } } else { logger.info("Describe collection failed " + descResponse.toString()); return; } // list collections ListCondition listCondition = null; ListCollectionsResponse listResponse = client.listCollections(listCondition); if (listResponse.ok()) { logger.info("List collections success."); for (int i = 0; i < listResponse.getCollectionCount(); ++i) { logger.info("Collection " + i); CollectionInfo info = listResponse.getCollection(i); CollectionConfig collectionConfig = info.getCollectionConfig(); logger.info("CollectionName: " + collectionConfig.getCollectionName()); logger.info("CollectionStatus: " + info.getCollectionStatus()); logger.info("Uuid: " + info.getUuid()); logger.info("Forward columns: " + collectionConfig.getForwardColumnNames()); List indexColumnParamList = collectionConfig.getIndexColumnParams(); for (int j = 0; j < indexColumnParamList.size(); ++j) { IndexColumnParam indexParam = indexColumnParamList.get(j); logger.info("IndexColumn: " + indexParam.getColumnName()); logger.info("IndexType: " + indexParam.getDataType()); logger.info("DataType: " + indexParam.getDataType()); logger.info("Dimension: " + indexParam.getDimension()); } } } else { logger.info("List collections failed " + listResponse.toString()); return; } // write request float[] vectors = {1, 2, 3, 4, 5, 6, 7, 8}; WriteRequest.Row row1 = WriteRequest.Row.newBuilder() .withPrimaryKey(123456) .withOperationType(WriteRequest.OperationType.INSERT) .addIndexValue(vectors) .addForwardValue(123) .addForwardValue(100.123) .build(); WriteRequest writeRequest; try { writeRequest = WriteRequest.newBuilder() .withCollectionName(collectionName) .withForwardColumnList(Arrays.asList("forward1", "forward2")) .addIndexColumnMeta("index1", DataType.VECTOR_FP32, dimension) .addRow(row1) .build(); } catch (ProximaSEException e) { e.printStackTrace(); return; } Status status = client.write(writeRequest); if (status.ok()) { logger.info("============== Write success. ==============="); } else { logger.info("Write failed " + status.toString()); } // search with float array float[] features = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}; // float[][] features = { // {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}, // {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f} // }; QueryRequest queryRequest = QueryRequest.newBuilder() .withCollectionName(collectionName) .withKnnQueryParam(QueryRequest.KnnQueryParam.newBuilder() .withColumnName("index1") .withTopk(10) .withFeatures(features) .build()) .build(); QueryResponse queryResponse = null; try { queryResponse = client.query(queryRequest); } catch (ProximaSEException e) { e.printStackTrace(); return; } if (queryResponse.ok()) { logger.info("================ Query success ====================="); for (int i = 0; i < queryResponse.getQueryResultCount(); ++i) { QueryResult queryResult = queryResponse.getQueryResult(i); for (int d = 0; d < queryResult.getDocumentCount(); ++d) { Document document = queryResult.getDocument(d); logger.info("Doc key: " + document.getPrimaryKey()); logger.info("Doc score: " + document.getScore()); Set forwardKeys = document.getForwardKeySet(); for (String forwardKey : forwardKeys) { logger.info( "Doc forward: " + forwardKey + " -> " + document.getForwardValue(forwardKey).getStringValue()); } } } } else { logger.info("Query failed: " + queryResponse.getStatus().toString()); } // search with json matrix String matrix = "[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0], [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]]"; QueryRequest queryRequest1 = QueryRequest.newBuilder() .withCollectionName(collectionName) .withKnnQueryParam(QueryRequest.KnnQueryParam.newBuilder() .withColumnName("index1") .withTopk(10) .withFeatures(matrix, DataType.VECTOR_FP32, dimension, 2) .build()) .build(); QueryResponse queryResponse1 = null; try { queryResponse1 = client.query(queryRequest1); } catch (ProximaSEException e) { e.printStackTrace(); return; } if (queryResponse1.ok()) { logger.info("================ Query success ====================="); for (int i = 0; i < queryResponse1.getQueryResultCount(); ++i) { QueryResult queryResult = queryResponse1.getQueryResult(i); for (int d = 0; d < queryResult.getDocumentCount(); ++d) { Document document = queryResult.getDocument(d); logger.info("Doc key: " + document.getPrimaryKey()); logger.info("Doc score: " + document.getScore()); Set forwardKeys = document.getForwardKeySet(); for (String forwardKey : forwardKeys) { logger.info( "Doc forward: " + forwardKey + " -> " + document.getForwardValue(forwardKey).getStringValue()); } } } } else { logger.info("Query failed: " + queryResponse1.getStatus().toString()); } // Get document by pk GetDocumentRequest getRequest = GetDocumentRequest.newBuilder() .withCollectionName(collectionName) .withPrimaryKey(123456) .withDebugMode(true) .build(); GetDocumentResponse getResponse = null; try { getResponse = client.getDocumentByKey(getRequest); } catch (ProximaSEException e) { e.printStackTrace(); return; } if (getResponse.ok()) { logger.info("======================== Get Document success ======================== "); Document document = getResponse.getDocument(); logger.info("PrimaryKey: " + document.getPrimaryKey()); logger.info("Score: " + document.getScore()); Set forwardKeys = document.getForwardKeySet(); for (String forwardKey : forwardKeys) { logger.info( "Doc forward: " + forwardKey + " -> " + document.getForwardValue(forwardKey).getStringValue()); } logger.info("DebugInfo: " + getResponse.getDebugInfo()); } else { logger.info("Get document failed " + getResponse.getStatus().toString()); } // stats collection StatsCollectionResponse statsResponse = client.statsCollection(collectionName); if (statsResponse.ok()) { logger.info("==================== Stats collection success. ======================"); CollectionStats stats = statsResponse.getCollectionStats(); logger.info("CollectionName: " + stats.getCollectionName()); logger.info("TotalDocCount: " + stats.getTotalDocCount()); logger.info("TotalSegmentCount: " + stats.getTotalSegmentCount()); } else { logger.info("Stats collection failed " + statsResponse.getStatus().toString()); } // drop collection status = client.dropCollection(collectionName); if (status.ok()) { logger.info("==================== Dorp collection success. ========================"); } else { logger.info("Drop collection failed " + status.toString()); } // close client client.close(); } } ================================================ FILE: sdk/java/example/src/main/resources/log4j2.xml ================================================ ================================================ FILE: sdk/java/pom.xml ================================================ 4.0.0 com.alibaba.proxima proxima-be-java-sdk 0.1.0 UTF-8 io.grpc grpc-netty-shaded 1.36.0 io.grpc grpc-stub 1.36.0 io.grpc grpc-protobuf 1.36.0 com.google.guava guava 21.0 org.projectlombok lombok 1.16.16 com.google.protobuf protobuf-java 3.14.0 src/main/resources true kr.motd.maven os-maven-plugin 1.6.2 org.apache.maven.plugins maven-compiler-plugin 2.3.2 1.8 1.8 UTF-8 org.xolstice.maven.plugins protobuf-maven-plugin 0.6.1 com.google.protobuf:protoc:3.14.0:exe:${os.detected.classifier} grpc-java io.grpc:protoc-gen-grpc-java:1.36.0:exe:${os.detected.classifier} false compile compile-custom org.apache.maven.plugins maven-source-plugin 2.2.1 true maven-jar-plugin 3.0.2 *.proto ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/CollectionConfig.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief CollectionConfig contains params for collection */ package com.alibaba.proxima.be.client; import java.util.*; /** * Contains config for collection */ public class CollectionConfig { private final String collectionName; private final long maxDocsPerSegment; private final List forwardColumnNames; private final List indexColumnParams; private final DatabaseRepository databaseRepository; private CollectionConfig(Builder builder) { this.collectionName = builder.collectionName; this.maxDocsPerSegment = builder.maxDocsPerSegment; this.forwardColumnNames = builder.forwardColumnNames; this.indexColumnParams = builder.indexColumnParams; this.databaseRepository = builder.databaseRepository; } public String getCollectionName() { return collectionName; } public long getMaxDocsPerSegment() { return maxDocsPerSegment; } public List getForwardColumnNames() { return forwardColumnNames; } public List getIndexColumnParams() { return indexColumnParams; } public DatabaseRepository getDatabaseRepository() { return databaseRepository; } /** * New collection config builder object * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** * Builder for CollectionConfig */ public static class Builder { // Required parameters private String collectionName; private List indexColumnParams = new ArrayList<>(); // Optional parameters private long maxDocsPerSegment = 0; private List forwardColumnNames = new ArrayList<>(); private DatabaseRepository databaseRepository = null; /** * Constructor without parameters */ public Builder() { } /** * Constructor with collectionName and indexColumnParams * @param collectionName collection name * @param indexColumnParams index column parameters */ public Builder(String collectionName, List indexColumnParams) { this.collectionName = collectionName; this.indexColumnParams = indexColumnParams; } /** * Set collection name * @param collectionName collection name * @return Builder */ public Builder withCollectionName(String collectionName) { this.collectionName = collectionName; return this; } /** * Optional. Set forward column names * @param forwardColumnNames forward column name list * @return Builder */ public Builder withForwardColumnNames(List forwardColumnNames) { this.forwardColumnNames = forwardColumnNames; return this; } // /** * Optional. Set max docs per segment. Default 0 * @param maxDocsPerSegment max docs per segment * @return Builder */ public Builder withMaxDocsPerSegment(long maxDocsPerSegment) { this.maxDocsPerSegment = maxDocsPerSegment; return this; } // Set index column params list /** * Set index column parameters * @param indexColumnParams index column parameters * @return Buildder */ public Builder withIndexColumnParams(List indexColumnParams) { this.indexColumnParams = indexColumnParams; return this; } /** * Optional. Set database repository * @param databaseRepository mysql database repository * @return Builder */ public Builder withDatabaseRepository(DatabaseRepository databaseRepository) { this.databaseRepository = databaseRepository; return this; } /** * Add one forward column * @param forwardColumn forward column name * @return Builder */ public Builder addForwardColumn(String forwardColumn) { this.forwardColumnNames.add(forwardColumn); return this; } /** * Add one column index param * @param indexParam index column parameters * @return Builder */ public Builder addIndexColumnParam(IndexColumnParam indexParam) { this.indexColumnParams.add(indexParam); return this; } /** * Add one index column param * @param columnName index column name * @param dataType index data type * @param dimension index dimension * @return Builder */ public Builder addIndexColumnParam(String columnName, DataType dataType, int dimension) { this.indexColumnParams.add(IndexColumnParam.newBuilder() .withColumnName(columnName) .withDataType(dataType) .withDimension(dimension) .build()); return this; } /** * Build collection config * @return CollectionConfig */ public CollectionConfig build() { return new CollectionConfig(this); } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/CollectionInfo.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief CollectionInfo contains information for collection */ package com.alibaba.proxima.be.client; /** * Contains information for collection */ public class CollectionInfo { private final CollectionConfig collectionConfig; private final CollectionStatus collectionStatus; private final String uuid; private final LsnContext latestLsnContext; private final long magicNumber; private CollectionInfo(Builder builder) { this.collectionConfig = builder.collectionConfig; this.collectionStatus = builder.collectionStatus; this.uuid = builder.uuid; this.latestLsnContext = builder.latestLsnContext; this.magicNumber = builder.magicNumber; } public CollectionConfig getCollectionConfig() { return collectionConfig; } public CollectionStatus getCollectionStatus() { return collectionStatus; } public String getUuid() { return uuid; } public LsnContext getLatestLsnContext() { return latestLsnContext; } public long getMagicNumber() { return magicNumber; } // New CollectionInfo builder public static Builder newBuilder() { return new Builder(); } /** * Builder for CollectionInfo */ public static class Builder { // required parameters private CollectionConfig collectionConfig; private CollectionStatus collectionStatus; private String uuid; // optional parameters private LsnContext latestLsnContext = null; private long magicNumber = 0; /** * Constructor without parameters */ public Builder() { } /** * Set collection config * @param collectionConfig collection config * @return Builder */ public Builder withCollectionConfig(CollectionConfig collectionConfig) { this.collectionConfig = collectionConfig; return this; } /** * Sset collection status * @param collectionStatus collection status * @return Builder */ public Builder withCollectionStatus(CollectionStatus collectionStatus) { this.collectionStatus = collectionStatus; return this; } /** * Set uuid * @param uuid unique user id * @return Builder */ public Builder withUuid(String uuid) { this.uuid = uuid; return this; } /** * Set latest lsn context * @param latestLsnContext latest lsn context, only use with mysql repository * @return Builder */ public Builder withLatestLsnContext(LsnContext latestLsnContext) { this.latestLsnContext = latestLsnContext; return this; } /** * Set magic number * @param magicNumber magic number from server * @return Builder */ public Builder withMagicNumber(long magicNumber) { this.magicNumber = magicNumber; return this; } /** * Build CollectionInfo object * @return CollectionInfo */ public CollectionInfo build() { return new CollectionInfo(this); } } /** * Collection running status */ public enum CollectionStatus { /** * Collection initialized */ INITIALIZED(0), /** * Collection serving */ SERVING(1), /** * Collection dropped */ DROPPED(2), /** * Unknown status */ UNKNOWN(-1); private int value; CollectionStatus(int value) { this.value = value; } public int getValue() { return this.value; } public static CollectionStatus valueOf(int value) { switch (value) { case 0: return INITIALIZED; case 1: return SERVING; case 2: return DROPPED; default: return UNKNOWN; } } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/CollectionStats.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief CollectionStats contains running statistic information for collection */ package com.alibaba.proxima.be.client; import java.util.ArrayList; import java.util.List; /** * Contains statistic information for collection */ public class CollectionStats { private final String collectionName; private final String collectionPath; private final long totalDocCount; private final long totalSegmentCount; private final long totalIndexFileCount; private final long totalIndexFileSize; private final List segmentStats; public CollectionStats(Builder builder) { this.collectionName = builder.collectionName; this.collectionPath = builder.collectionPath; this.totalDocCount = builder.totalDocCount; this.totalSegmentCount = builder.totalSegmentCount; this.totalIndexFileCount = builder.totalIndexFileCount; this.totalIndexFileSize = builder.totalIndexFileSize; this.segmentStats = builder.segmentStats; } public String getCollectionName() { return collectionName; } public String getCollectionPath() { return collectionPath; } public long getTotalDocCount() { return totalDocCount; } public long getTotalSegmentCount() { return totalSegmentCount; } public long getTotalIndexFileCount() { return totalIndexFileCount; } public long getTotalIndexFileSize() { return totalIndexFileSize; } public List getSegmentStats() { return segmentStats; } /** * Get total segments count * @return total segment stats count */ public int getSegmentStatsCount() { if (this.segmentStats != null) { return this.segmentStats.size(); } return 0; } /** * Get one segments stats * @param index segment index * @return SegmentStats */ public SegmentStats getSegmentStats(int index) { return this.segmentStats.get(index); } /** * New Collection stats builder * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** * Builder for CollectionStats */ public static class Builder { // required parameters private String collectionName; private String collectionPath; private long totalDocCount; private long totalSegmentCount; private long totalIndexFileCount; private long totalIndexFileSize; private List segmentStats = new ArrayList<>(); /** * Constructor without parameters */ public Builder() { } /** * Set collection name * @param collectionName collection name * @return Builder */ public Builder withCollectionName(String collectionName) { this.collectionName = collectionName; return this; } /** * Set collection path * @param collectionPath collection index path * @return Builder */ public Builder withCollectionPath(String collectionPath) { this.collectionPath = collectionPath; return this; } /** * Set total document count * @param totalDocCount total document count * @return Builder */ public Builder withTotalDocCount(long totalDocCount) { this.totalDocCount = totalDocCount; return this; } /** * Set total segment count * @param totalSegmentCount total segment count * @return Builder */ public Builder withTotalSegmentCount(long totalSegmentCount) { this.totalSegmentCount = totalSegmentCount; return this; } /** * Set total index file count * @param totalIndexFileCount total index file count * @return Builder */ public Builder withTotalIndexFileCount(long totalIndexFileCount) { this.totalIndexFileCount = totalIndexFileCount; return this; } /** * Set total index file size * @param totalIndexFileSize total index file size * @return Builder */ public Builder withTotalIndexFileSize(long totalIndexFileSize) { this.totalIndexFileSize = totalIndexFileSize; return this; } /** * Set segment stats list * @param segmentStatsList segment stats list * @return Builder */ public Builder withSegmentStats(List segmentStatsList) { this.segmentStats = segmentStatsList; return this; } /** * Add segment stats * @param segmentStats segment stats * @return Builder */ public Builder addSegmentStats(SegmentStats segmentStats) { this.segmentStats.add(segmentStats); return this; } /** * Build collection stats object * @return CollectionStats */ public CollectionStats build() { return new CollectionStats(this); } } /** * Segment running state */ public enum SegmentState { /** * Segment created */ CREATED(0), /** * Segment writing */ WRITING(1), /** * Segment dumping */ DUMPING(2), /** * Segment compacting */ COMPACTING(3), /** * Segment persist */ PERSIST(4), /** * Unknown state */ UNKNOWN(-1); private final int value; SegmentState(int value) { this.value = value; } public int getValue() { return this.value; } public static SegmentState valueOf(int value) { switch (value) { case 0: return CREATED; case 1: return WRITING; case 2: return DUMPING; case 3: return COMPACTING; case 4: return PERSIST; default: return UNKNOWN; } } } /** * Statistic for one segment */ public static class SegmentStats { private final int segmentId; private final SegmentState segmentState; private final long docDount; private final long indexFileCount; private final long indexFileSize; private final long minDocId; private final long maxDocId; private final long minPrimaryKey; private final long maxPrimaryKey; private final long minTimestamp; private final long maxTimestamp; private final long minLsn; private final long maxLsn; private final String segmentPath; private SegmentStats(Builder builder) { this.segmentId = builder.segmentId; this.segmentState = builder.segmentState; this.docDount = builder.docDount; this.indexFileCount = builder.indexFileCount; this.indexFileSize = builder.indexFileSize; this.minDocId = builder.minDocId; this.maxDocId = builder.maxDocId; this.minPrimaryKey = builder.minPrimaryKey; this.maxPrimaryKey = builder.maxPrimaryKey; this.minTimestamp = builder.minTimestamp; this.maxTimestamp = builder.maxTimestamp; this.minLsn = builder.minLsn; this.maxLsn = builder.maxLsn; this.segmentPath = builder.segmentPath; } public int getSegmentId() { return segmentId; } public SegmentState getSegmentState() { return segmentState; } public long getDocDount() { return docDount; } public long getIndexFileCount() { return indexFileCount; } public long getIndexFileSize() { return indexFileSize; } public long getMinDocId() { return minDocId; } public long getMaxDocId() { return maxDocId; } public long getMinPrimaryKey() { return minPrimaryKey; } public long getMaxPrimaryKey() { return maxPrimaryKey; } public long getMinTimestamp() { return minTimestamp; } public long getMaxTimestamp() { return maxTimestamp; } public long getMinLsn() { return minLsn; } public long getMaxLsn() { return maxLsn; } public String getSegmentPath() { return segmentPath; } public static Builder newBuilder() { return new Builder(); } /** * Segment stats builder */ public static class Builder { private int segmentId; private SegmentState segmentState; private long docDount; private long indexFileCount; private long indexFileSize; private long minDocId; private long maxDocId; private long minPrimaryKey; private long maxPrimaryKey; private long minTimestamp; private long maxTimestamp; private long minLsn; private long maxLsn; private String segmentPath; public Builder() { } public Builder withSegmentId(int segmentId) { this.segmentId = segmentId; return this; } public Builder withSegmentState(SegmentState segmentState) { this.segmentState = segmentState; return this; } public Builder withDocDount(long docDount) { this.docDount = docDount; return this; } public Builder withIndexFileCount(long indexFileCount) { this.indexFileCount = indexFileCount; return this; } public Builder withIndexFileSize(long indexFileSize) { this.indexFileSize = indexFileSize; return this; } public Builder withMinDocId(long minDocId) { this.minDocId = minDocId; return this; } public Builder withMaxDocId(long maxDocId) { this.maxDocId = maxDocId; return this; } public Builder withMinPrimaryKey(long minPrimaryKey) { this.minPrimaryKey = minPrimaryKey; return this; } public Builder withMaxPrimaryKey(long maxPrimaryKey) { this.maxPrimaryKey = maxPrimaryKey; return this; } public Builder withMinTimestamp(long minTimestamp) { this.minTimestamp = minTimestamp; return this; } public Builder withMaxTimestamp(long maxTimestamp) { this.maxTimestamp = maxTimestamp; return this; } public Builder withMinLsn(long minLsn) { this.minLsn = minLsn; return this; } public Builder withMaxLsn(long maxLsn) { this.maxLsn = maxLsn; return this; } public Builder withSegmentPath(String segmentPath) { this.segmentPath = segmentPath; return this; } /** * Build segment stats object * @return SegmentStats */ public SegmentStats build() { return new SegmentStats(this); } } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/ConnectParam.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief ConnectParam contains the grpc connecting parameters */ package com.alibaba.proxima.be.client; import java.util.concurrent.TimeUnit; /** * ConnectParam contains the grpc connecting param */ public class ConnectParam { // required parameters private final String host; private final int port; // optional parameters private final long timeoutNanos; private final long idleTimeoutNanos; private final long keepAliveTimeNanos; private final long keepAliveTimeoutNanos; // /** * Constructor with builder * @param builder builder */ private ConnectParam(Builder builder) { this.port = builder.port; this.host = builder.host; this.timeoutNanos = builder.timeoutNanos; this.idleTimeoutNanos = builder.idleTimeoutNanos; this.keepAliveTimeNanos = builder.keepAliveTimeNanos; this.keepAliveTimeoutNanos = builder.keepAliveTimeoutNanos; } /** * Get host * @return String */ public String getHost() { return this.host; } /** * Get port * @return int */ public int getPort() { return this.port; } /** * Get timeout with unit * @param timeUnit time unit * @return request timeout */ public long getTimeout(TimeUnit timeUnit) { return timeUnit.convert(this.timeoutNanos, TimeUnit.NANOSECONDS); } /** * Get idle timeout with unit * @param timeUnit time unit * @return idle timeout by time unit */ public long getIdleTimeout(TimeUnit timeUnit) { return timeUnit.convert(this.idleTimeoutNanos, TimeUnit.NANOSECONDS); } /** * Get keep alive time with unit * @param timeUnit time unit * @return keep alive time by time unit */ public long getKeepAliveTime(TimeUnit timeUnit) { return timeUnit.convert(this.keepAliveTimeNanos, TimeUnit.NANOSECONDS); } /** * Get keep alive timeout with unit * @param timeUnit time unit * @return keep alive timeout by time unit */ public long getKeepAliveTimeout(TimeUnit timeUnit) { return timeUnit.convert(this.keepAliveTimeoutNanos, TimeUnit.NANOSECONDS); } /** * New ConnectParam builder * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** * Builder for ConnectParam */ public static class Builder { private String host = "localhost"; private int port = 16000; private long timeoutNanos = TimeUnit.NANOSECONDS.convert(1, TimeUnit.SECONDS); private long idleTimeoutNanos = TimeUnit.NANOSECONDS.convert(12, TimeUnit.HOURS); private long keepAliveTimeNanos = Long.MAX_VALUE; private long keepAliveTimeoutNanos = TimeUnit.NANOSECONDS.convert(30, TimeUnit.SECONDS); /** * Build ConnectParam object * @return ConnectParam */ public ConnectParam build() { return new ConnectParam(this); } /** * Set host * @param host grpc server host * @return Builder */ public Builder withHost(String host) { this.host = host; return this; } /** * Set grpc port * @param port grpc server port * @return Builder */ public Builder withPort(int port) { this.port = port; return this; } /** * Set request timeout * @param timeout request timeout value * @param timeUnit time unit * @return Builder */ public Builder withTimeout(long timeout, TimeUnit timeUnit) { this.timeoutNanos = timeUnit.toNanos(timeout); return this; } /** * Set idle timeout * @param idleTimeout idle timeout by time unit * @param timeUnit time unit * @return Builder */ public Builder withIdleTimeout(long idleTimeout, TimeUnit timeUnit) { this.idleTimeoutNanos = timeUnit.toNanos(idleTimeout); return this; } /** * Set keep alive time * @param keepAliveTime keep alive time by time unit * @param timeUnit time unit * @return Builder */ public Builder withKeepAliveTimeNanos(long keepAliveTime, TimeUnit timeUnit) { this.keepAliveTimeNanos = timeUnit.toNanos(keepAliveTime); return this; } /** * Set keep alive timeout * @param keepAliveTimeout keep alive timeout by time unit * @param timeUnit time unit * @return Builder */ public Builder withKeepAliveTimeoutNanos(long keepAliveTimeout, TimeUnit timeUnit) { this.keepAliveTimeoutNanos = timeUnit.toNanos(keepAliveTimeout); return this; } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/DataType.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief DataType contains all data types for proxima search engine */ package com.alibaba.proxima.be.client; /** * DataType contains all supported data types */ public enum DataType { /** * Undefined data type */ UNDEFINED(0), /** * Binary data type */ BINARY(1), /** * String data type */ STRING(2), /** * Bool data type */ BOOL(3), /** * Int32 data type */ INT32(4), /** * Int64 data type */ INT64(5), /** * Uint32 data type */ UINT32(6), /** * Uint64 data type */ UINT64(7), /** * Float data type */ FLOAT(8), /** * Double data type */ DOUBLE(9), /** * Vector binary32 data type */ VECTOR_BINARY32(20), /** * Vector binary64 data type */ VECTOR_BINARY64(21), /** * Vector fp16 data type */ VECTOR_FP16(22), /** * Vector fp32 data type */ VECTOR_FP32(23), /** * Vector double data type */ VECTOR_FP64(24), /** * Vector int4 data type */ VECTOR_INT4(25), /** * Vector int8 data type */ VECTOR_INT8(26), /** * Vector int16 data type */ VECTOR_INT16(27); private int value; DataType(int value) { this.value = value; } public int getValue() { return this.value; } public static DataType valueOf(int value) { switch (value) { case 0: return UNDEFINED; case 1: return BINARY; case 2: return STRING; case 3: return BOOL; case 4: return INT32; case 5: return INT64; case 6: return UINT32; case 7: return UINT64; case 8: return FLOAT; case 9: return DOUBLE; case 20: return VECTOR_BINARY32; case 21: return VECTOR_BINARY64; case 22: return VECTOR_FP16; case 23: return VECTOR_FP32; case 24: return VECTOR_FP64; case 25: return VECTOR_INT4; case 26: return VECTOR_INT8; case 27: return VECTOR_INT16; default: return UNDEFINED; } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/DatabaseRepository.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief DatabaseRepository contains the database config */ package com.alibaba.proxima.be.client; /** * Contains the database config */ public class DatabaseRepository { private final String repositoryName; private final String connectionUri; private final String tableName; private final String user; private final String password; private DatabaseRepository(Builder builder) { this.repositoryName = builder.repositoryName; this.connectionUri = builder.connectionUri; this.tableName = builder.tableName; this.user = builder.user; this.password = builder.password; } public String getRepositoryName() { return repositoryName; } public String getConnectionUri() { return connectionUri; } public String getTableName() { return tableName; } public String getUser() { return user; } public String getPassword() { return password; } /** * New DatabaseRepository builde * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** * Builder for DatabaseRepository */ public static class Builder { // required parameters private String repositoryName; private String connectionUri; private String tableName; private String user; private String password; /** * Empty constructor */ public Builder() { } /** * Set repository name * @param repositoryName repository name * @return Builder */ public Builder withRepositoryName(String repositoryName) { this.repositoryName = repositoryName; return this; } /** * Set connection uri * @param connectionUri connection uri * @return Builder */ public Builder withConnectionUri(String connectionUri) { this.connectionUri = connectionUri; return this; } /** * Set table name * @param tableName mysql table name * @return Builder */ public Builder withTableName(String tableName) { this.tableName = tableName; return this; } /** * Set database username * @param user user name * @return Builder */ public Builder withUser(String user) { this.user = user; return this; } /** * Set database password * @param password myssql password * @return Builder */ public Builder withPassword(String password) { this.password = password; return this; } /** * Build the DatabaseRepository object * @return DatabaseRepository */ public DatabaseRepository build() { return new DatabaseRepository(this); } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/DescribeCollectionResponse.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Contains the specified collection info */ package com.alibaba.proxima.be.client; /** * Contains the specified collection information */ public class DescribeCollectionResponse { private Status status; private CollectionInfo collectionInfo; /** * Constructor with status and collection info * @param status request success or failed * @param collectionInfo collection info */ public DescribeCollectionResponse(Status status, CollectionInfo collectionInfo) { this.status = status; this.collectionInfo = collectionInfo; } /** * Constructor with ErrorCode * @param code error code */ public DescribeCollectionResponse(Status.ErrorCode code) { this.status = new Status(code); this.collectionInfo = null; } /** * Constructor with error code and reason * @param code error code * @param reason error reason */ public DescribeCollectionResponse(Status.ErrorCode code, String reason) { this.status = new Status(code, reason); this.collectionInfo = null; } public Status getStatus() { return status; } public CollectionInfo getCollectionInfo() { return collectionInfo; } /** * Is response success * @return true means success. */ public boolean ok() { return this.status.ok(); } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/Document.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Document contains the pk, score, and forward values */ package com.alibaba.proxima.be.client; import com.alibaba.proxima.be.grpc.GenericValue; import java.util.HashMap; import java.util.Map; import java.util.Set; /** * Document information */ public class Document { private final long primaryKey; private final float score; private final Map forwardColumnMap; private Document(Builder builder) { this.primaryKey = builder.primaryKey; this.score = builder.score; this.forwardColumnMap = builder.forwardColumnMap; } public long getPrimaryKey() { return primaryKey; } public float getScore() { return score; } public Map getForwardColumnMap() { return forwardColumnMap; } /** * Get forward column count * @return Forward column count */ public int getForwardColumnCount() { if (forwardColumnMap != null) { return forwardColumnMap.size(); } return 0; } /** * Get forward key set * @return forward key set */ public Set getForwardKeySet() { return this.forwardColumnMap.keySet(); } /** * Get specified forward value * @param key the forward key * @return ForwardValue */ public ForwardValue getForwardValue(String key) { return this.forwardColumnMap.get(key); } /** * New document builder * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** * Represents all types forward value */ public static class ForwardValue { private GenericValue value; private ForwardValue(Builder builder) { this.value = builder.value; } // Get float value public float getFloatValue() { return this.value.getFloatValue(); } // Get double value public double getDoubleValue() { return this.value.getDoubleValue(); } // Get int64 value public long getInt64Value() { return this.value.getInt64Value(); } // Get int32 value public int getInt32Value() { return this.value.getInt32Value(); } // Get uint64 value public long getUint64Value() { return this.value.getUint64Value(); } // Get uint32 value public int getUint32Value() { return this.value.getUint32Value(); } // Get boolean value public boolean getBooleanValue() { return this.value.getBoolValue(); } /** * Get string value, if forward's type not string, will also convert to string * @return String */ public String getStringValue() { switch (value.getValueOneofCase()) { case VALUEONEOF_NOT_SET: return ""; case BYTES_VALUE: return value.getBytesValue().toString(); case STRING_VALUE: return value.getStringValue(); case BOOL_VALUE: return String.valueOf(value.getBoolValue()); case INT32_VALUE: return String.valueOf(value.getInt32Value()); case INT64_VALUE: return String.valueOf(value.getInt64Value()); case UINT32_VALUE: return String.valueOf(value.getUint32Value()); case UINT64_VALUE: return String.valueOf(value.getUint64Value()); case FLOAT_VALUE: return String.valueOf(value.getFloatValue()); case DOUBLE_VALUE: return String.valueOf(value.getDoubleValue()); default: return ""; } } // Get bytes value public byte[] getBytesValue() { return this.value.getBytesValue().toByteArray(); } /** Builder for ForwardValue */ public static class Builder { private GenericValue value; public Builder(GenericValue genericValue) { this.value = genericValue; } public ForwardValue build() { return new ForwardValue(this); } } } /** * Builder for Document */ public static class Builder { // required parameters private long primaryKey; private float score; // optional parameters private Map forwardColumnMap = new HashMap<>(); // Empty constructor public Builder() { } // Constructor public Builder withPrimaryKey(long primaryKey) { this.primaryKey = primaryKey; return this; } // Set score public Builder withScore(float score) { this.score = score; return this; } // Set forward column map public Builder withForwardColumnMap(Map forwardColumnMap) { this.forwardColumnMap = forwardColumnMap; return this; } // Build Document object public Document build() { return new Document(this); } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/GetDocumentRequest.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Get single document by primary key */ package com.alibaba.proxima.be.client; /** * Get document request */ public class GetDocumentRequest { private final String collectionName; private final long primaryKey; private boolean debugMode; private GetDocumentRequest(Builder builder) { this.collectionName = builder.collectionName; this.primaryKey = builder.primaryKey; this.debugMode = builder.debugMode; } public String getCollectionName() { return collectionName; } public long getPrimaryKey() { return primaryKey; } public boolean isDebugMode() { return debugMode; } /** * New GetDocumentRequest builder * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** * Builder for GetDocumentRequest */ public static class Builder { // required parameters private String collectionName; private long primaryKey; // optional parameters private boolean debugMode = false; /** * Empty constructor */ public Builder() { } /** * Constructor with collection name and primary key * @param collectionName collection name * @param primaryKey primary key */ public Builder(String collectionName, long primaryKey) { this.collectionName = collectionName; this.primaryKey = primaryKey; } /** * Set collection name * @param collectionName collection name * @return Builder */ public Builder withCollectionName(String collectionName) { this.collectionName = collectionName; return this; } /** * Set primary key * @param primaryKey primary key to query * @return Builder */ public Builder withPrimaryKey(long primaryKey) { this.primaryKey = primaryKey; return this; } /** * Set debug mode * @param debugMode is debug mode, true means debug * @return Builder */ public Builder withDebugMode(boolean debugMode) { this.debugMode = debugMode; return this; } /** * Build get document request object * @return GetDocumentRequest */ public GetDocumentRequest build() { return new GetDocumentRequest(this); } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/GetDocumentResponse.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Contains document information */ package com.alibaba.proxima.be.client; /** * GetDocumentResponse contains document information */ public class GetDocumentResponse { private Status status; private String debugInfo; private Document document; public GetDocumentResponse(Status.ErrorCode code) { this.status = new Status(code); this.debugInfo = null; this.document = null; } public GetDocumentResponse(Status.ErrorCode code, String reason) { this.status = new Status(code, reason); this.debugInfo = ""; this.document = null; } public GetDocumentResponse(Status status, String debugInfo, Document document) { this.status = status; this.debugInfo = debugInfo; this.document = document; } public Status getStatus() { return status; } public String getDebugInfo() { return debugInfo; } public Document getDocument() { return document; } /** * Is response success, true means success, false means failed * @return boolean */ public boolean ok() { return this.status.getCode() == 0; } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/GetVersionResponse.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Proxima Search Engine version */ package com.alibaba.proxima.be.client; /** * Contains the server version */ public class GetVersionResponse { Status status; String version; public GetVersionResponse(Status.ErrorCode errorCode) { this.status = new Status(errorCode); this.version = ""; } public GetVersionResponse(Status.ErrorCode errorCode, String errorMsg) { this.status = new Status(errorCode, errorMsg); this.version = ""; } public GetVersionResponse(Status status, String version) { this.status = status; this.version = version; } public Status getStatus() { return status; } public String getVersion() { return version; } /** * Is the response success * @return boolean */ public boolean ok() { return this.status.ok(); } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/IndexColumnParam.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief IndexColumnParam contains parameters for index column */ package com.alibaba.proxima.be.client; import java.util.HashMap; import java.util.Map; /** * Contains parameters for index column */ public class IndexColumnParam { private final String columnName; private final IndexType indexType; private final DataType dataType; private final int dimension; private final Map extraParams; private IndexColumnParam(Builder builder) { this.columnName = builder.columnName; this.indexType = builder.indexType; this.dataType = builder.dataType; this.dimension = builder.dimension; this.extraParams = builder.extraParams; } public String getColumnName() { return columnName; } public IndexType getIndexType() { return indexType; } public DataType getDataType() { return dataType; } public int getDimension() { return dimension; } public Map getExtraParams() { return extraParams; } /** * New IndexColumnParam builder * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** * Builder for IndexColumnParam */ public static class Builder { // required parameters private String columnName; private DataType dataType = DataType.UNDEFINED; private int dimension = 0; // optional parameters private IndexType indexType = IndexType.PROXIMA_GRAPH_INDEX; private Map extraParams = new HashMap<>(); /** * Empty constructor */ public Builder() { } /** * Constructor with parameters * @param columnName index column name * @param dataType index data type * @param dimension index dimension */ public Builder(String columnName, DataType dataType, int dimension) { this.columnName = columnName; this.dataType = dataType; this.dimension = dimension; } /** * Set index column name * @param columnName index column name * @return Builder */ public Builder withColumnName(String columnName) { this.columnName = columnName; return this; } /** * Set index data type * @param dataType index data type * @return Builder */ public Builder withDataType(DataType dataType) { this.dataType = dataType; return this; } // Set dimension /** * Set index dimension * @param dimension index dimension * @return Builder */ public Builder withDimension(int dimension) { this.dimension = dimension; return this; } /** * Set index type * @param indexType index type * @return Builder */ public Builder withIndexType(IndexType indexType) { this.indexType = indexType; return this; } // Set extra params /** * Set extra parameters * @param extraParams extra parameters * @return Builder */ public Builder withExtraParams(Map extraParams) { this.extraParams = extraParams; return this; } /** * Add one extra param * @param key extra parameter key * @param value extra parameter value * @return Builder */ public Builder addExtraParam(String key, String value) { this.extraParams.put(key, value); return this; } /** * Build IndexColumnParam object * @return IndexColumnParam */ public IndexColumnParam build() { return new IndexColumnParam(this); } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/IndexType.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief IndexType contains all supported index types */ package com.alibaba.proxima.be.client; /** * Contains all index types */ public enum IndexType { /** * Undefined index type */ UNDEFINED(0), /** * Poxima graph index type */ PROXIMA_GRAPH_INDEX(1); private int value; IndexType(int value) { this.value = value; } public int getValue() { return value; } public static IndexType valueOf(int value) { switch (value) { case 0: return UNDEFINED; case 1: return PROXIMA_GRAPH_INDEX; default: return UNDEFINED; } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/ListCollectionsResponse.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief ListCollectionsResponse contains collections info and status */ package com.alibaba.proxima.be.client; import java.util.List; /** * Contains collections information */ public class ListCollectionsResponse { private Status status; private List collections; // Constructor /** * Constructor with status and collections * @param status status * @param collections collection list */ public ListCollectionsResponse(Status status, List collections) { this.status = status; this.collections = collections; } /** * Constructor with error code * @param code error code */ public ListCollectionsResponse(Status.ErrorCode code) { this.status = new Status(code); this.collections = null; } /** * Constructor with code and reason * @param code error code * @param reason error message */ public ListCollectionsResponse(Status.ErrorCode code, String reason) { this.status = new Status(code, reason); this.collections = null; } /** * Get collection count * @return int */ public int getCollectionCount() { if (this.collections != null) { return this.collections.size(); } return 0; } /** * Get specified collection info * @param index the collection index * @return CollectionInfo */ public CollectionInfo getCollection(int index) { return this.collections.get(index); } /** * Get status * @return Status */ public Status getStatus() { return this.status; } /** * Is request success, true means success * @return boolean */ public boolean ok() { return this.status.ok(); } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/ListCondition.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Represents the list condition. */ package com.alibaba.proxima.be.client; /** * List collections condition */ public class ListCondition { private final String repositoryName; private ListCondition(Builder builder) { this.repositoryName = builder.repositoryName; } public String getRepositoryName() { return repositoryName; } /** * New ListCondition builder * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** * Builder for ListCondition */ public static class Builder { private String repositoryName; /** * Empty constructor */ public Builder() { } /** * Set repository name * @param repositoryName repository name * @return Builder */ public Builder withRepositoryName(String repositoryName) { this.repositoryName = repositoryName; return this; } /** * Build list condition object * @return ListCondition */ public ListCondition build() { return new ListCondition(this); } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/LsnContext.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Contains lsn and context infor */ package com.alibaba.proxima.be.client; /** * Lsn context information */ public class LsnContext { private long lsn; private String context; private LsnContext(Builder builder) { this.lsn = builder.lsn; this.context = builder.context; } public long getLsn() { return lsn; } public String getContext() { return context; } // New LsnContext builder public static Builder newBuilder() { return new Builder(); } /** * Builder for LsnContext */ public static class Builder { // required parameters private long lsn; private String context; public Builder() { } public Builder(long lsn, String context) { this.lsn = lsn; this.context = context; } /** * Set lsn number * @param lsn log sequence number * @return Builder */ public Builder withLsn(long lsn) { this.lsn = lsn; return this; } /** * Set context information * @param context lsn context * @return Builder */ public Builder withContext(String context) { this.context = context; return this; } /** * Build LsnContext object * @return LsnContext */ public LsnContext build() { return new LsnContext(this); } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/ProtoConverter.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Convert between proto and inner struct */ package com.alibaba.proxima.be.client; import com.google.protobuf.ByteString; import com.alibaba.proxima.be.grpc.KeyValuePair; import com.alibaba.proxima.be.grpc.CollectionName; import com.alibaba.proxima.be.grpc.OperationType; import com.alibaba.proxima.be.grpc.GenericKeyValue; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Convert between proto object and inner object */ public class ProtoConverter { public static com.alibaba.proxima.be.grpc.DataType toPb(DataType dataType) { return com.alibaba.proxima.be.grpc.DataType.forNumber(dataType.getValue()); } public static com.alibaba.proxima.be.grpc.IndexType toPb(IndexType indexType) { return com.alibaba.proxima.be.grpc.IndexType.forNumber(indexType.getValue()); } public static com.alibaba.proxima.be.grpc.CollectionConfig toPb(CollectionConfig config) { List indexParams = config.getIndexColumnParams(); List indexParamList = new ArrayList<>(); for (IndexColumnParam indexParam : indexParams) { Map extraParams = indexParam.getExtraParams(); List extraParamList = new ArrayList<>(); for (Map.Entry entry : extraParams.entrySet()) { extraParamList.add( KeyValuePair.newBuilder().setKey(entry.getKey()).setValue(entry.getValue()).build()); } indexParamList.add( com.alibaba.proxima.be.grpc.CollectionConfig.IndexColumnParam.newBuilder() .setColumnName(indexParam.getColumnName()) .setDataType(toPb(indexParam.getDataType())) .setIndexType(toPb(indexParam.getIndexType())) .setDimension(indexParam.getDimension()) .addAllExtraParams(extraParamList) .build() ); } com.alibaba.proxima.be.grpc.CollectionConfig.Builder builder = com.alibaba.proxima.be.grpc.CollectionConfig.newBuilder() .setCollectionName(config.getCollectionName()) .setMaxDocsPerSegment(config.getMaxDocsPerSegment()) .addAllForwardColumnNames(config.getForwardColumnNames()) .addAllIndexColumnParams(indexParamList); DatabaseRepository databaseRepository = config.getDatabaseRepository(); if (databaseRepository != null) { com.alibaba.proxima.be.grpc.CollectionConfig.RepositoryConfig.Database database = com.alibaba.proxima.be.grpc.CollectionConfig.RepositoryConfig.Database.newBuilder() .setConnectionUri(databaseRepository.getConnectionUri()) .setTableName(databaseRepository.getTableName()) .setUser(databaseRepository.getUser()) .setPassword(databaseRepository.getPassword()) .build(); com.alibaba.proxima.be.grpc.CollectionConfig.RepositoryConfig repositoryConfig = com.alibaba.proxima.be.grpc.CollectionConfig.RepositoryConfig.newBuilder() .setRepositoryType(com.alibaba.proxima.be.grpc.CollectionConfig .RepositoryConfig.RepositoryType.RT_DATABASE) .setRepositoryName(databaseRepository.getRepositoryName()) .setDatabase(database) .build(); builder.setRepositoryConfig(repositoryConfig); } return builder.build(); } public static CollectionName toPb(String collectionName) { return CollectionName.newBuilder() .setCollectionName(collectionName) .build(); } public static com.alibaba.proxima.be.grpc.ListCondition toPb(ListCondition listCondition) { if (listCondition == null || listCondition.getRepositoryName() == null) { return com.alibaba.proxima.be.grpc.ListCondition.newBuilder().build(); } return com.alibaba.proxima.be.grpc.ListCondition.newBuilder() .setRepositoryName(listCondition.getRepositoryName()) .build(); } public static com.alibaba.proxima.be.grpc.WriteRequest toPb(WriteRequest request) { return com.alibaba.proxima.be.grpc.WriteRequest.newBuilder() .setCollectionName(request.getCollectionName()) .setRowMeta(toPb(request.getRowMeta())) .addAllRows(toPb(request.getRows())) .setRequestId(request.getRequestId()) .setMagicNumber(request.getMagicNumber()) .build(); } public static com.alibaba.proxima.be.grpc.QueryRequest toPb(QueryRequest request) { return com.alibaba.proxima.be.grpc.QueryRequest.newBuilder() .setQueryType( com.alibaba.proxima.be.grpc.QueryRequest.QueryType.forNumber(request.getQueryType().getValue())) .setCollectionName(request.getCollectionName()) .setDebugMode(request.isDebugMode()) .setKnnParam(toPb(request.getKnnQueryParam())) .build(); } public static com.alibaba.proxima.be.grpc.GetDocumentRequest toPb(GetDocumentRequest request) { return com.alibaba.proxima.be.grpc.GetDocumentRequest.newBuilder() .setCollectionName(request.getCollectionName()) .setPrimaryKey(request.getPrimaryKey()) .setDebugMode(request.isDebugMode()) .build(); } public static Status fromPb(com.alibaba.proxima.be.grpc.Status status) { return new Status(status.getCode(), status.getReason()); } public static ListCollectionsResponse fromPb(com.alibaba.proxima.be.grpc.ListCollectionsResponse pbResponse) { Status status = new Status(pbResponse.getStatus().getCode(), pbResponse.getStatus().getReason()); List collectionInfoList = new ArrayList<>(); for (int i = 0; i < pbResponse.getCollectionsCount(); ++i) { collectionInfoList.add(fromPb(pbResponse.getCollections(i))); } return new ListCollectionsResponse(status, collectionInfoList); } public static DescribeCollectionResponse fromPb(com.alibaba.proxima.be.grpc.DescribeCollectionResponse pbResponse) { Status status = new Status(pbResponse.getStatus().getCode(), pbResponse.getStatus().getReason()); return new DescribeCollectionResponse(status, fromPb(pbResponse.getCollection())); } public static StatsCollectionResponse fromPb(com.alibaba.proxima.be.grpc.StatsCollectionResponse pbResponse) { Status status = new Status(pbResponse.getStatus().getCode(), pbResponse.getStatus().getReason()); return new StatsCollectionResponse(status, fromPb(pbResponse.getCollectionStats())); } public static QueryResponse fromPb(com.alibaba.proxima.be.grpc.QueryResponse pbResponse) { Status status = new Status(pbResponse.getStatus().getCode(), pbResponse.getStatus().getReason()); return new QueryResponse(status, pbResponse.getLatencyUs(), pbResponse.getDebugInfo(), fromPb(pbResponse.getResultsList())); } public static GetDocumentResponse fromPb(com.alibaba.proxima.be.grpc.GetDocumentResponse pbResponse) { Status status = new Status(pbResponse.getStatus().getCode(), pbResponse.getStatus().getReason()); Document document = fromPb(pbResponse.getDocument()); return new GetDocumentResponse(status, pbResponse.getDebugInfo(), document); } public static GetVersionResponse fromPb(com.alibaba.proxima.be.grpc.GetVersionResponse pbResponse) { return new GetVersionResponse(fromPb(pbResponse.getStatus()), pbResponse.getVersion()); } private static com.alibaba.proxima.be.grpc.QueryRequest.KnnQueryParam toPb(QueryRequest.KnnQueryParam queryParam) { com.alibaba.proxima.be.grpc.QueryRequest.KnnQueryParam.Builder builder = com.alibaba.proxima.be.grpc.QueryRequest.KnnQueryParam.newBuilder() .setColumnName(queryParam.getColumnName()) .setTopk(queryParam.getTopk()) .setBatchCount(queryParam.getBatchCount()) .setDimension(queryParam.getDimension()) .setDataType(com.alibaba.proxima.be.grpc.DataType.forNumber(queryParam.getDataType().getValue())) .setRadius(queryParam.getRadius()) .setIsLinear(queryParam.isLinear()); if (queryParam.getFeatures() != null) { builder.setFeatures(ByteString.copyFrom(queryParam.getFeatures())); } else { builder.setMatrix(queryParam.getMatrix()); } List extraParamList = new ArrayList<>(); Map extraParams = queryParam.getExtraParams(); for (Map.Entry entry : extraParams.entrySet()) { extraParamList.add( KeyValuePair.newBuilder() .setKey(entry.getKey()) .setValue(entry.getValue()) .build() ); } builder.addAllExtraParams(extraParamList); return builder.build(); } private static com.alibaba.proxima.be.grpc.WriteRequest.RowMeta toPb(WriteRequest.RowMeta rowMeta) { List indexColumnMetaList = new ArrayList<>(); List indexColumnMetas = rowMeta.getIndexColumnMetas(); for (int i = 0; i < indexColumnMetas.size(); ++i) { WriteRequest.IndexColumnMeta columnMeta = indexColumnMetas.get(i); indexColumnMetaList.add(com.alibaba.proxima.be.grpc.WriteRequest.IndexColumnMeta.newBuilder() .setColumnName(columnMeta.getColumnName()) .setDataType(com.alibaba.proxima.be.grpc.DataType.forNumber(columnMeta.getDataType().getValue())) .setDimension(columnMeta.getDimension()) .build()); } return com.alibaba.proxima.be.grpc.WriteRequest.RowMeta.newBuilder() .addAllForwardColumnNames(rowMeta.getForwardColumnNames()) .addAllIndexColumnMetas(indexColumnMetaList) .build(); } private static List toPb(List rows) { List pbRowList = new ArrayList<>(); for (int i = 0; i < rows.size(); ++i) { WriteRequest.Row row = rows.get(i); com.alibaba.proxima.be.grpc.WriteRequest.Row.Builder builder = com.alibaba.proxima.be.grpc.WriteRequest.Row.newBuilder() .setPrimaryKey(row.getPrimaryKey()) .setOperationType(OperationType.forNumber(row.getOperationType().getValue())) .setIndexColumnValues(row.getIndexValues()) .setForwardColumnValues(row.getForwardValues()); LsnContext lsnContext = row.getLsnContext(); if (lsnContext != null) { builder.setLsnContext( com.alibaba.proxima.be.grpc.LsnContext.newBuilder() .setLsn(lsnContext.getLsn()) .setContext(lsnContext.getContext()) .build()); } pbRowList.add(builder.build()); } return pbRowList; } private static List fromPb(List pbResults) { List queryResultList = new ArrayList<>(); if (pbResults == null) { return queryResultList; } for (int i = 0; i < pbResults.size(); ++i) { queryResultList.add(fromPb(pbResults.get(i))); } return queryResultList; } private static QueryResult fromPb(com.alibaba.proxima.be.grpc.QueryResponse.Result pbResult) { QueryResult.Builder builder = new QueryResult.Builder(); for (int i = 0; i < pbResult.getDocumentsCount(); ++i) { builder.addDocument(fromPb(pbResult.getDocuments(i))); } return builder.build(); } private static Document fromPb(com.alibaba.proxima.be.grpc.Document pbDocument) { if (pbDocument == null) { return null; } Map forwardMap = new HashMap<>(); for (int i = 0; i < pbDocument.getForwardColumnValuesCount(); ++i) { GenericKeyValue keyValue = pbDocument.getForwardColumnValues(i); forwardMap.put(keyValue.getKey(), new Document.ForwardValue.Builder(keyValue.getValue()).build()); } return new Document.Builder() .withPrimaryKey(pbDocument.getPrimaryKey()) .withScore(pbDocument.getScore()) .withForwardColumnMap(forwardMap) .build(); } private static CollectionStats fromPb(com.alibaba.proxima.be.grpc.CollectionStats pbStats) { CollectionStats.Builder builder = new CollectionStats.Builder() .withCollectionName(pbStats.getCollectionName()) .withCollectionPath(pbStats.getCollectionPath()) .withTotalDocCount(pbStats.getTotalDocCount()) .withTotalIndexFileCount(pbStats.getTotalIndexFileCount()) .withTotalIndexFileSize(pbStats.getTotalIndexFileSize()) .withTotalSegmentCount(pbStats.getTotalSegmentCount()); for (int i = 0; i < pbStats.getSegmentStatsCount(); ++i) { builder.addSegmentStats(fromPb(pbStats.getSegmentStats(i))); } return builder.build(); } private static CollectionStats.SegmentStats fromPb( com.alibaba.proxima.be.grpc.CollectionStats.SegmentStats pbStats) { if (pbStats == null) { return null; } return new CollectionStats.SegmentStats.Builder() .withSegmentId(pbStats.getSegmentId()) .withSegmentState(CollectionStats.SegmentState.valueOf(pbStats.getState().getNumber())) .withDocDount(pbStats.getDocCount()) .withIndexFileCount(pbStats.getIndexFileCount()) .withIndexFileSize(pbStats.getIndexFileSize()) .withMinDocId(pbStats.getMinDocId()) .withMaxDocId(pbStats.getMaxDocId()) .withMinDocId(pbStats.getMinDocId()) .withMinPrimaryKey(pbStats.getMinPrimaryKey()) .withMaxPrimaryKey(pbStats.getMaxPrimaryKey()) .withMinTimestamp(pbStats.getMinTimestamp()) .withMaxTimestamp(pbStats.getMaxTimestamp()) .withMinLsn(pbStats.getMinLsn()) .withMaxLsn(pbStats.getMaxLsn()) .withSegmentPath(pbStats.getSegmentPath()) .build(); } private static CollectionInfo fromPb(com.alibaba.proxima.be.grpc.CollectionInfo pbInfo) { if (pbInfo == null) { return null; } CollectionInfo.Builder builder = new CollectionInfo.Builder() .withCollectionConfig(fromPb(pbInfo.getConfig())) .withCollectionStatus(fromPb(pbInfo.getStatus())) .withUuid(pbInfo.getUuid()) .withMagicNumber(pbInfo.getMagicNumber()); if (pbInfo.hasLatestLsnContext()) { com.alibaba.proxima.be.grpc.LsnContext lsnContext = pbInfo.getLatestLsnContext(); builder.withLatestLsnContext( LsnContext.newBuilder() .withLsn(lsnContext.getLsn()) .withContext(lsnContext.getContext()) .build()); } return builder.build(); } private static CollectionConfig fromPb(com.alibaba.proxima.be.grpc.CollectionConfig config) { List columnParams = config.getIndexColumnParamsList(); List columnParamList = new ArrayList<>(); for (int i = 0; i < columnParams.size(); ++i) { columnParamList.add(fromPb(columnParams.get(i))); } CollectionConfig.Builder builder = new CollectionConfig.Builder() .withCollectionName(config.getCollectionName()) .withMaxDocsPerSegment(config.getMaxDocsPerSegment()) .withForwardColumnNames(config.getForwardColumnNamesList()) .withIndexColumnParams(columnParamList); if (config.hasRepositoryConfig()) { builder.withDatabaseRepository(fromPb(config.getRepositoryConfig())); } return builder.build(); } private static IndexColumnParam fromPb( com.alibaba.proxima.be.grpc.CollectionConfig.IndexColumnParam indexParam) { if (indexParam == null) { return null; } Map extraParamMap = new HashMap<>(); for (int i = 0; i < indexParam.getExtraParamsCount(); ++i) { KeyValuePair keyValuePair = indexParam.getExtraParams(i); extraParamMap.put(keyValuePair.getKey(), keyValuePair.getValue()); } return new IndexColumnParam.Builder( indexParam.getColumnName(), DataType.valueOf(indexParam.getDataType().getNumber()), indexParam.getDimension()) .withIndexType(IndexType.valueOf(indexParam.getIndexType().getNumber())) .build(); } private static DatabaseRepository fromPb( com.alibaba.proxima.be.grpc.CollectionConfig.RepositoryConfig config) { return new DatabaseRepository.Builder() .withConnectionUri(config.getDatabase().getConnectionUri()) .withPassword(config.getDatabase().getPassword()) .withUser(config.getDatabase().getUser()) .withTableName(config.getDatabase().getTableName()) .withRepositoryName(config.getRepositoryName()) .build(); } private static CollectionInfo.CollectionStatus fromPb( com.alibaba.proxima.be.grpc.CollectionInfo.CollectionStatus status) { return CollectionInfo.CollectionStatus.valueOf(status.getNumber()); } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/ProximaGrpcSearchClient.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Implements all interfaces with ProximaSearchClient */ package com.alibaba.proxima.be.client; import com.alibaba.proxima.be.grpc.CollectionName; import com.alibaba.proxima.be.grpc.GetVersionRequest; import com.alibaba.proxima.be.grpc.ProximaServiceGrpc; import io.grpc.ConnectivityState; import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; import io.grpc.StatusRuntimeException; import java.util.List; import java.util.concurrent.TimeUnit; /** * Proxima Grpc Search Client */ public class ProximaGrpcSearchClient implements ProximaSearchClient { private ManagedChannel channel; private ProximaServiceGrpc.ProximaServiceBlockingStub blockingStub; private ConnectParam connectParam; /** * Constructor ProximaGrpcSearchClient with ConnectParam * @param connectParam grpc connecting parameters */ public ProximaGrpcSearchClient(ConnectParam connectParam) { this.connectParam = connectParam; this.channel = ManagedChannelBuilder.forAddress(connectParam.getHost(), connectParam.getPort()) .usePlaintext() .idleTimeout(connectParam.getIdleTimeout(TimeUnit.NANOSECONDS), TimeUnit.NANOSECONDS) .keepAliveTime(connectParam.getKeepAliveTime(TimeUnit.NANOSECONDS), TimeUnit.NANOSECONDS) .keepAliveTimeout(connectParam.getKeepAliveTimeout(TimeUnit.NANOSECONDS), TimeUnit.NANOSECONDS) .maxInboundMessageSize(Integer.MAX_VALUE) .build(); this.blockingStub = ProximaServiceGrpc.newBlockingStub(this.channel); this.checkServerVersion(); } /** * Close client */ @Override public void close() { this.close(10); } /** * Close client * @param maxWaitSeconds max wait seconds when close client */ @Override public void close(int maxWaitSeconds) { this.channel.shutdown(); long now = System.nanoTime(); long deadline = now + TimeUnit.SECONDS.toNanos(maxWaitSeconds); boolean interrupted = false; try { while (now < deadline && !channel.isTerminated()) { try { channel.awaitTermination(deadline - now, TimeUnit.NANOSECONDS); } catch (InterruptedException ex) { interrupted = true; } } if (!channel.isTerminated()) { channel.shutdownNow(); } } finally { if (interrupted) { Thread.currentThread().interrupt(); } } } /** * Get proxima server version * @return GetVersionResponse */ @Override public GetVersionResponse getVersion() { if (!checkAvailable()) { return new GetVersionResponse(Status.ErrorCode.CLIENT_NOT_CONNECTED); } GetVersionRequest request = GetVersionRequest.newBuilder().build(); com.alibaba.proxima.be.grpc.GetVersionResponse pbResponse; try { pbResponse = blockingStub().getVersion(request); } catch (StatusRuntimeException e) { return new GetVersionResponse(errorCode(e), e.getStatus().toString()); } return ProtoConverter.fromPb(pbResponse); } /** * Create collection with collection config * @param collectionConfig the CollectionConfig object * @return Status */ @Override public Status createCollection(CollectionConfig collectionConfig) { if (!checkAvailable()) { return new Status(Status.ErrorCode.CLIENT_NOT_CONNECTED); } this.validate(collectionConfig); com.alibaba.proxima.be.grpc.Status status; com.alibaba.proxima.be.grpc.CollectionConfig request = ProtoConverter.toPb(collectionConfig); try { status = blockingStub().createCollection(request); } catch (StatusRuntimeException e) { return new Status(errorCode(e), e.getStatus().toString()); } return ProtoConverter.fromPb(status); } /** * Drop collection with colleciton name * @param collectionName the collection name * @return Status */ @Override public Status dropCollection(String collectionName) { if (!checkAvailable()) { return new Status(Status.ErrorCode.CLIENT_NOT_CONNECTED); } CollectionName request = ProtoConverter.toPb(collectionName); com.alibaba.proxima.be.grpc.Status status; try { status = blockingStub().dropCollection(request); } catch (StatusRuntimeException e) { return new Status(errorCode(e), e.getStatus().toString()); } return ProtoConverter.fromPb(status); } /** * Describe collection with colleciton name * @param collectionName the collection name * @return describe collection response */ @Override public DescribeCollectionResponse describeCollection(String collectionName) { if (!checkAvailable()) { return new DescribeCollectionResponse(Status.ErrorCode.CLIENT_NOT_CONNECTED); } CollectionName request = ProtoConverter.toPb(collectionName); com.alibaba.proxima.be.grpc.DescribeCollectionResponse pbResponse; try { pbResponse = blockingStub().withDeadlineAfter(connectParam.getTimeout(TimeUnit.NANOSECONDS), TimeUnit.NANOSECONDS) .describeCollection(request); } catch (StatusRuntimeException e) { return new DescribeCollectionResponse(errorCode(e), e.getStatus().toString()); } return ProtoConverter.fromPb(pbResponse); } /** * List collections with list condition * @param listCondition list collections condition * @return list collection response */ @Override public ListCollectionsResponse listCollections(ListCondition listCondition) { if (!checkAvailable()) { return new ListCollectionsResponse(Status.ErrorCode.CLIENT_NOT_CONNECTED); } com.alibaba.proxima.be.grpc.ListCondition request = ProtoConverter.toPb(listCondition); com.alibaba.proxima.be.grpc.ListCollectionsResponse pbResponse; try { pbResponse = blockingStub().listCollections(request); } catch (StatusRuntimeException e) { return new ListCollectionsResponse(errorCode(e), e.getStatus().toString()); } return ProtoConverter.fromPb(pbResponse); } /** * Stats collection with collection name * @param collectionName the collection name * @return stats collection response */ @Override public StatsCollectionResponse statsCollection(String collectionName) { if (!checkAvailable()) { return new StatsCollectionResponse(Status.ErrorCode.CLIENT_NOT_CONNECTED); } com.alibaba.proxima.be.grpc.CollectionName request = ProtoConverter.toPb(collectionName); com.alibaba.proxima.be.grpc.StatsCollectionResponse pbResponse; try { pbResponse = blockingStub().statsCollection(request); } catch (StatusRuntimeException e) { return new StatsCollectionResponse(errorCode(e), e.getStatus().toString()); } return ProtoConverter.fromPb(pbResponse); } /** * Write records for collection * @param request write request included insert/update/delete operations * @return Status */ @Override public Status write(WriteRequest request) { if (!checkAvailable()) { return new Status(Status.ErrorCode.CLIENT_NOT_CONNECTED); } this.validate(request); com.alibaba.proxima.be.grpc.WriteRequest pbRequest = ProtoConverter.toPb(request); com.alibaba.proxima.be.grpc.Status pbResponse; try { pbResponse = blockingStub().write(pbRequest); } catch (StatusRuntimeException e) { return new Status(errorCode(e), e.getStatus().toString()); } return ProtoConverter.fromPb(pbResponse); } /** * Query records with specified features * @param request query request included querying featuress * @return QueryResponse included query result */ @Override public QueryResponse query(QueryRequest request) { if (!checkAvailable()) { return new QueryResponse(Status.ErrorCode.CLIENT_NOT_CONNECTED); } this.validate(request); com.alibaba.proxima.be.grpc.QueryRequest pbRequest = ProtoConverter.toPb(request); com.alibaba.proxima.be.grpc.QueryResponse pbResponse; try { pbResponse = blockingStub().query(pbRequest); } catch (StatusRuntimeException e) { return new QueryResponse(errorCode(e), e.getStatus().toString()); } return ProtoConverter.fromPb(pbResponse); } /** * Get document by primary key * @param request the GetDocumentRequest object included collection name and primary key * @return GetDocumentResponse */ @Override public GetDocumentResponse getDocumentByKey(GetDocumentRequest request) { if (!checkAvailable()) { return new GetDocumentResponse(Status.ErrorCode.CLIENT_NOT_CONNECTED); } this.validate(request); com.alibaba.proxima.be.grpc.GetDocumentRequest pbRequest = ProtoConverter.toPb(request); com.alibaba.proxima.be.grpc.GetDocumentResponse pbResponse; try { pbResponse = blockingStub().getDocumentByKey(pbRequest); } catch (StatusRuntimeException e) { return new GetDocumentResponse(errorCode(e), e.getStatus().toString()); } return ProtoConverter.fromPb(pbResponse); } private boolean checkAvailable() { ConnectivityState state = this.channel.getState(false); switch (state) { case IDLE: case READY: case CONNECTING: return true; default: return false; } } private void validate(CollectionConfig config) throws ProximaSEException { if (config.getCollectionName() == null || config.getCollectionName().isEmpty()) { throw new ProximaSEException("Collection name is empty."); } List indexParamList = config.getIndexColumnParams(); if (indexParamList == null || indexParamList.isEmpty()) { throw new ProximaSEException("Index Column params is empty."); } for (IndexColumnParam indexParam : indexParamList) { if (indexParam.getColumnName() == null || indexParam.getColumnName().isEmpty()) { throw new ProximaSEException("Index column name is empty."); } if (indexParam.getIndexType() != IndexType.PROXIMA_GRAPH_INDEX) { throw new ProximaSEException("Index type is invalid."); } if (indexParam.getDataType() == DataType.UNDEFINED) { throw new ProximaSEException("Index data type is undefined."); } if (indexParam.getDimension() <= 0) { throw new ProximaSEException("Index dimension should > 0"); } } DatabaseRepository dbRepo = config.getDatabaseRepository(); if (dbRepo != null) { if (dbRepo.getRepositoryName() == null || dbRepo.getRepositoryName().isEmpty()) { throw new ProximaSEException("Repository name is empty."); } if (dbRepo.getConnectionUri() == null || dbRepo.getConnectionUri().isEmpty()) { throw new ProximaSEException("Connection uri is empty."); } if (dbRepo.getTableName() == null || dbRepo.getTableName().isEmpty()) { throw new ProximaSEException("Table name is empty."); } if (dbRepo.getUser() == null || dbRepo.getUser().isEmpty()) { throw new ProximaSEException("User name is empty."); } if (dbRepo.getPassword() == null || dbRepo.getPassword().isEmpty()) { throw new ProximaSEException("Password is empty."); } } } private void validate(WriteRequest request) throws ProximaSEException { if (request.getCollectionName() == null || request.getCollectionName().isEmpty()) { throw new ProximaSEException("Collection name is empty."); } WriteRequest.RowMeta rowMeta = request.getRowMeta(); if (rowMeta == null) { throw new ProximaSEException("RowMeta is empty."); } if (rowMeta.getIndexColumnMetas() == null || rowMeta.getIndexColumnMetas().isEmpty()) { throw new ProximaSEException("Index column metas is empty in RowMeta."); } List rows = request.getRows(); if (rows == null || rows.isEmpty()) { throw new ProximaSEException("Rows is empty."); } for (WriteRequest.Row row : rows) { if(row.getOperationType() != WriteRequest.OperationType.DELETE){ if (row.getIndexValues() == null || row.getIndexValues().getValuesCount() == 0) { throw new ProximaSEException("Index column values is empty in Row."); } } } } private void validate(QueryRequest request) throws ProximaSEException { if (request.getQueryType() != QueryRequest.QueryType.KNN) { throw new ProximaSEException("Query type is invalid."); } if (request.getCollectionName() == null || request.getCollectionName().isEmpty()) { throw new ProximaSEException("Collection name is empty."); } QueryRequest.KnnQueryParam knnQueryParam = request.getKnnQueryParam(); if (knnQueryParam == null) { throw new ProximaSEException("Knn query param is empty."); } if (knnQueryParam.getColumnName() == null || knnQueryParam.getColumnName().isEmpty()) { throw new ProximaSEException("Column name is empty in KnnQueryParam."); } if (knnQueryParam.getTopk() <= 0) { throw new ProximaSEException("Topk should > 0 in KnnQueryParam"); } if ((knnQueryParam.getFeatures() == null || knnQueryParam.getFeatures().length == 0) && (knnQueryParam.getMatrix() == null || knnQueryParam.getMatrix().length() == 0)) { throw new ProximaSEException("Features is empty in KnnQueryParam"); } if (knnQueryParam.getBatchCount() <= 0) { throw new ProximaSEException("Batch count should > 0 in KnnQueryParam"); } if (knnQueryParam.getDimension() <= 0) { throw new ProximaSEException("Dimension should > 0 in KnnQueryParam"); } } private void validate(GetDocumentRequest request) throws ProximaSEException { if (request.getCollectionName() == null || request.getCollectionName().isEmpty()) { throw new ProximaSEException("Collection name is empty."); } } private ProximaServiceGrpc.ProximaServiceBlockingStub blockingStub() { return this.blockingStub.withDeadlineAfter( this.connectParam.getTimeout(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS); } private void checkServerVersion() throws ProximaSEException { String clientVersion = this.getClientVersion(); if (clientVersion == null || clientVersion.isEmpty()) { throw new ProximaSEException("Java SDK client version is empty."); } GetVersionResponse response = this.getVersion(); if (!response.ok()) { throw new ProximaSEException("Get server version failed: " + response.getStatus().getReason()); } String serverVersion = response.getVersion(); String[] clientArray = clientVersion.split("\\."); String[] serverArray = serverVersion.split("\\."); if (clientArray.length != 3) { throw new ProximaSEException("Get client version failed."); } if (serverArray.length < 3) { throw new ProximaSEException("Server version is invalid."); } if (clientArray[0].compareTo(serverArray[0]) != 0 || clientArray[1].compareTo(serverArray[1]) != 0) { throw new ProximaSEException("Client and server version mismatched."); } } private Status.ErrorCode errorCode(StatusRuntimeException e) { io.grpc.Status status = e.getStatus(); if (status == null) { return Status.ErrorCode.RPC_ERROR; } if (status.getCode() == io.grpc.Status.Code.DEADLINE_EXCEEDED) { return Status.ErrorCode.RPC_TIMEOUT; } else { return Status.ErrorCode.RPC_ERROR; } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/ProximaSEException.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Represents proxima be exception */ package com.alibaba.proxima.be.client; /** * Proxima Search Engine Exception */ public class ProximaSEException extends RuntimeException { public ProximaSEException(String message) { super(message); } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/ProximaSearchClient.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Interface to describe proxima client interface and action. * You can get more details usage from examples */ package com.alibaba.proxima.be.client; import java.io.IOException; import java.io.InputStream; import java.util.Properties; import java.util.function.Supplier; /** * The Proxima Search Client Interface */ public interface ProximaSearchClient { final String CLIENT_VERSION = new Supplier() { @Override public String get() { Properties properties = new Properties(); InputStream inputStream = ProximaSearchClient.class.getClassLoader() .getResourceAsStream("proxima-be.properties"); try { properties.load(inputStream); } catch (IOException e) { e.printStackTrace(); } finally { try { inputStream.close(); } catch (IOException e) { } } return properties.getProperty("version"); } }.get(); /** * Get proxima search client version * @return String: client version */ default String getClientVersion() { return this.CLIENT_VERSION; } /** * Get proxima server version * @return GetVersionResponse */ GetVersionResponse getVersion(); /** * Create collection with collection config * @param collectionConfig the CollectionConfig object * @return Status */ Status createCollection(CollectionConfig collectionConfig); /** * Drop collection with colleciton name * @param collectionName the collection name * @return Status */ Status dropCollection(String collectionName); /** * Describe collection with colleciton name * @param collectionName the collection name * @return DescribeCollectionResponse: describe collection response */ DescribeCollectionResponse describeCollection(String collectionName); /** * List collections with list condition * @param listCondition list collections condition * @return ListCollectionsResponse: list collections response */ ListCollectionsResponse listCollections(ListCondition listCondition); // Stats collection with collection name /** * Stats collection with collection name * @param collectionName the collection name * @return stats collection response */ StatsCollectionResponse statsCollection(String collectionName); /** * Write records for collection * @param request write request included insert/update/delete operations * @return Status */ Status write(WriteRequest request); /** * Query records with specified features * @param request query request included querying featuress * @return QueryResponse: included query result */ QueryResponse query(QueryRequest request); /** * Get document by primary key * @param request the GetDocumentRequest object included collection name and primary key * @return GetDocumentResponse: document response */ GetDocumentResponse getDocumentByKey(GetDocumentRequest request); /** * Close client */ void close(); /** * Close client * @param maxWaitSeconds max wait seconds when close client */ void close(int maxWaitSeconds); } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/QueryRequest.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Contains the query information */ package com.alibaba.proxima.be.client; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; import java.util.HashMap; import java.util.Map; /** * Contains query information */ public class QueryRequest { private final QueryType queryType; private final String collectionName; private final boolean debugMode; private final KnnQueryParam knnQueryParam; private QueryRequest(Builder builder) { this.queryType = builder.queryType; this.collectionName = builder.collectionName; this.debugMode = builder.debugMode; this.knnQueryParam = builder.knnQueryParam; } public QueryType getQueryType() { return queryType; } public String getCollectionName() { return collectionName; } public boolean isDebugMode() { return debugMode; } public KnnQueryParam getKnnQueryParam() { return knnQueryParam; } /** * New QueryRequest builder * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** * Builder for QueryRequest */ public static class Builder { // required parameters private String collectionName; private KnnQueryParam knnQueryParam; // optional parameters private QueryType queryType = QueryType.KNN; private boolean debugMode = false; /** * Empty constructor */ public Builder() { } /** * Constructor with collection name and query param * @param collectionName collection name * @param knnQueryParam knn query parameters */ public Builder(String collectionName, KnnQueryParam knnQueryParam) { this.collectionName = collectionName; this.knnQueryParam = knnQueryParam; } /** * Set query type * @param queryType query type * @return Builder */ public Builder withQueryType(QueryType queryType) { this.queryType = queryType; return this; } /** * Set collection name * @param collectionName collection name * @return Builder */ public Builder withCollectionName(String collectionName) { this.collectionName = collectionName; return this; } /** * Set debug mode * @param debugMode debug mode, true means turnning the debug function * @return Builder */ public Builder withDebugMode(boolean debugMode) { this.debugMode = debugMode; return this; } /** * Set knn query param * @param knnQueryParam knn query parameters * @return Builder */ public Builder withKnnQueryParam(KnnQueryParam knnQueryParam) { this.knnQueryParam = knnQueryParam; return this; } /** * Build QueryRequest object * @return QueryRequest */ public QueryRequest build() { return new QueryRequest(this); } } /** * Contains the query parameters */ public static class KnnQueryParam { private final String columnName; private final int topk; private final byte[] features; private String matrix; private final int batchCount; private final int dimension; private final DataType dataType; private final float radius; private final boolean isLinear; private final Map extraParams; private KnnQueryParam(Builder builder) { this.columnName = builder.columnName; this.topk = builder.topk; this.features = builder.features; this.matrix = builder.matrix; this.batchCount = builder.batchCount; this.dimension = builder.dimension; this.dataType = builder.dataType; this.radius = builder.radius; this.isLinear = builder.isLinear; this.extraParams = builder.extraParams; } public String getColumnName() { return columnName; } public int getTopk() { return topk; } public byte[] getFeatures() { return features; } public String getMatrix() { return matrix; } public int getBatchCount() { return batchCount; } public int getDimension() { return dimension; } public DataType getDataType() { return dataType; } public float getRadius() { return radius; } public boolean isLinear() { return isLinear; } public Map getExtraParams() { return extraParams; } /** * New KnnQueryParam builder * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** * Builder for KnnQueryParam */ public static class Builder { // required parameters private String columnName; private byte[] features = null; private String matrix = null; // optional parameters private int topk = 100; private int batchCount = 1; private int dimension = 0; private DataType dataType = DataType.UNDEFINED; private float radius = 0.0f; private boolean isLinear = false; private Map extraParams = new HashMap<>(); /** * Empty constructor */ public Builder() { } /** * Constructor with column name * @param columnName index column name */ public Builder(String columnName) { this.columnName = columnName; } /** * Set index column name * @param columnName index column name * @return Builder */ public Builder withColumnName(String columnName) { this.columnName = columnName; return this; } /** * Set topk * @param topk return result number * @return Builder */ public Builder withTopk(int topk) { this.topk = topk; return this; } /** * Set radius * @param radius score threshold, result that score less than radius can be return * @return Builder */ public Builder withRadius(float radius) { this.radius = radius; return this; } // Set use linear /** * Set use linear search flag * @param linear use linear * @return Builder */ public Builder withLinear(boolean linear) { isLinear = linear; return this; } /** * Set extra params * @param extraParams extra parameters * @return Builder */ public Builder withExtraParams(Map extraParams) { this.extraParams = extraParams; return this; } /** * Set bytes features * @param features bytes features * @param dataType data type * @param dimension dimension * @param batchCount query batch count * @return Builder */ public Builder withFeatures(byte[] features, DataType dataType, int dimension, int batchCount) { if (features == null || features.length == 0) { return this; } this.features = features; this.dataType = dataType; this.dimension = dimension; this.batchCount = batchCount; return this; } /** * Set features with json matrix * @param jsonMatrix json format matrix * @param dataType data type * @param dimension dimension * @param batchCount query batch count * @return Builder */ public Builder withFeatures(String jsonMatrix, DataType dataType, int dimension, int batchCount) { if (jsonMatrix == null || jsonMatrix.isEmpty()) { return this; } this.matrix = jsonMatrix; this.dataType = dataType; this.dimension = dimension; this.batchCount = batchCount; return this; } /** * Set float type features * @param features query features * @return Builder */ public Builder withFeatures(float[] features) { // pack float features if (features == null || features.length == 0) { return this; } ByteBuffer bf = ByteBuffer.allocate(features.length * 4).order(ByteOrder.LITTLE_ENDIAN); bf.asFloatBuffer().put(features); this.features = bf.array(); this.dataType = DataType.VECTOR_FP32; this.dimension = features.length; this.batchCount = 1; return this; } /** * Set two dimension float type features * @param features query features * @return Builder */ public Builder withFeatures(float[][] features) { if (features == null || features.length == 0) { return this; } int dim = features[0].length; for (int i = 0; i < features.length; ++i) { if (features[i].length != dim) { return this; } } ByteBuffer bf = ByteBuffer.allocate(features.length * dim * 4).order(ByteOrder.LITTLE_ENDIAN); FloatBuffer floatBuffer = bf.asFloatBuffer(); for (int i = 0; i < features.length; ++i) { floatBuffer.put(features[i]); } this.features = bf.array(); this.dataType = DataType.VECTOR_FP32; this.batchCount = features.length; this.dimension = dim; return this; } /** * Add one extra parameter * @param key extra parameter key * @param value extra parameter value * @return Builder */ public Builder addExtraParam(String key, String value) { this.extraParams.put(key, value); return this; } /** * Build KnnQueryParam object * @return KnnQueryBuilder */ public KnnQueryParam build() { return new KnnQueryParam(this); } } } /** * Query type */ public enum QueryType { /** * Knn query type */ KNN(0); private int value; QueryType(int value) { this.value = value; } public int getValue() { return this.value; } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/QueryResponse.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief QueryResponse contains the query documents and status */ package com.alibaba.proxima.be.client; import java.util.List; /** * Contains query documents and status */ public class QueryResponse { private Status status; private long latencyUs; private String debugInfo; private List queryResults; public QueryResponse(Status status, long latencyMs, String debugInfo, List queryResults) { this.status = status; this.latencyUs = latencyMs; this.debugInfo = debugInfo; this.queryResults = queryResults; } public QueryResponse(Status.ErrorCode code) { this.status = new Status(code); this.latencyUs = 0; this.debugInfo = null; this.queryResults = null; } public QueryResponse(Status.ErrorCode code, String reason) { this.status = new Status(code, reason); this.latencyUs = 0; this.debugInfo = null; this.queryResults = null; } public Status getStatus() { return status; } public long getLatencyUs() { return latencyUs; } public String getDebugInfo() { return debugInfo; } public List getQueryResults() { return queryResults; } /** * Get query result batch count * @return int */ public int getQueryResultCount() { if (this.queryResults != null) { return this.queryResults.size(); } return 0; } /** * Get specified query result * @param index query result index * @return QueryResult */ public QueryResult getQueryResult(int index) { return this.queryResults.get(index); } /** * Is query request success * @return boolean */ public boolean ok() { return this.status.ok(); } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/QueryResult.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Represents the result for one query */ package com.alibaba.proxima.be.client; import java.util.ArrayList; import java.util.List; /** * Contains query result documents */ public class QueryResult { private final List documents; private QueryResult(Builder builder) { this.documents = builder.documents; } public List getDocuments() { return documents; } /** * Get query document count * @return int */ public int getDocumentCount() { if (this.documents != null) { return this.documents.size(); } return 0; } /** * Get specified document * @param index docucment index * @return Document */ public Document getDocument(int index) { if (index < documents.size()) { return this.documents.get(index); } return null; } /** * New QueryResult builder * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** * Builder for QueryResult */ public static class Builder { private List documents = new ArrayList<>(); /** * Empty constructor */ public Builder() { } /** * Set document list * @param documents document list * @return Builder */ public Builder withDocuments(List documents) { this.documents = documents; return this; } /** * Add one document * @param document added document * @return Builder */ public Builder addDocument(Document document) { this.documents.add(document); return this; } /** * Build QueryResult object * @return QueryResult */ public QueryResult build() { return new QueryResult(this); } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/StatsCollectionResponse.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief StatsCollectionResponse contains the statistic info for collection */ package com.alibaba.proxima.be.client; /** * Contains statistic information for collection */ public class StatsCollectionResponse { private Status status; private CollectionStats collectionStats; /** * Constructor with statuss and collection stats * @param status status * @param collectionStats collection stats */ public StatsCollectionResponse(Status status, CollectionStats collectionStats) { this.status = status; this.collectionStats = collectionStats; } /** * Constructor with error code * @param code error code */ public StatsCollectionResponse(Status.ErrorCode code) { this.status = new Status(code); this.collectionStats = null; } /** * Constructor with code and reason * @param code error code * @param reason error message */ public StatsCollectionResponse(Status.ErrorCode code, String reason) { this.status = new Status(code, reason); this.collectionStats = null; } public Status getStatus() { return status; } public CollectionStats getCollectionStats() { return collectionStats; } /** * Is request success, true means success * @return boolean */ public boolean ok() { return this.status.ok(); } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/Status.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Contains the code and reason */ package com.alibaba.proxima.be.client; /** * Status for response */ public class Status { private final int code; private final String reason; /** * Constructor with int code and reason * @param code code value from server * @param reason error message */ public Status(int code, String reason) { this.code = code; this.reason = reason; } /** * Constructor with ErrorCode and reason * @param code error code * @param reason error message */ public Status(ErrorCode code, String reason) { this.code = code.getCode(); this.reason = reason; } /** * Constructor with error code * @param code error code */ public Status(ErrorCode code) { this.code = code.getCode(); if (code == ErrorCode.CLIENT_NOT_CONNECTED) { this.reason = "Client not connected to proxima search engine"; } else if (code == ErrorCode.RPC_TIMEOUT) { this.reason = "Rpc request timeout"; } else if (code == ErrorCode.RPC_ERROR) { this.reason = "Rpc error occurred"; } else if (code == ErrorCode.UNKNOWN_ERROR) { this.reason = "Unknown error occurred"; } else { this.reason = "Success"; } } public int getCode() { return code; } public String getReason() { return reason; } /** * Is status normal * @return boolean */ public boolean ok() { return this.code == 0; } /** * Convert the Status to json string * @return String */ public String toString() { return "{ \"code\": " + String.valueOf(code) + ", \"reason\": \"" + reason + "\"}"; } /** * Java client side error */ public enum ErrorCode { /** * Success status */ SUCCESSS(0), /** * Rpc timeout */ RPC_TIMEOUT(10000), /** * Rpc call error */ RPC_ERROR(10001), /** * Client not connected */ CLIENT_NOT_CONNECTED(10002), /** * Unknown error */ UNKNOWN_ERROR(10003); private int code; ErrorCode(int code) { this.code = code; } public int getCode() { return this.code; } } } ================================================ FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/WriteRequest.java ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* \author Hongqing.hu * \date Mar 2021 * \brief Contains the rows information for collection */ package com.alibaba.proxima.be.client; import com.alibaba.proxima.be.grpc.GenericValue; import com.alibaba.proxima.be.grpc.GenericValueList; import com.google.protobuf.ByteString; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.ArrayList; import java.util.List; /** * Contains the write rows information */ public class WriteRequest { private final String collectionName; private final RowMeta rowMeta; private final List rows; private final String requestId; private final long magicNumber; private WriteRequest(Builder builder) { this.collectionName = builder.collectionName; this.rowMeta = builder.rowMetaBuilder.build(); this.rows = builder.rows; this.requestId = builder.requestId; this.magicNumber = builder.magicNumber; } public String getCollectionName() { return collectionName; } public RowMeta getRowMeta() { return rowMeta; } public List getRows() { return rows; } public String getRequestId() { return requestId; } public long getMagicNumber() { return magicNumber; } /** * New WriteRequest builder * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** * Builder for WriteRequest */ public static class Builder { // required parameters private String collectionName; private RowMeta.Builder rowMetaBuilder = RowMeta.newBuilder(); private List rows = new ArrayList<>(); // optional parameters private String requestId = ""; private long magicNumber = 0; /** * Constructor without parameters */ public Builder() { } /** * Set collection name * @param collectionName collection name * @return Builder */ public Builder withCollectionName(String collectionName) { this.collectionName = collectionName; return this; } /** * Set row list * @param rows write row list * @return Builder */ public Builder withRows(List rows) { this.rows = rows; return this; } /** * Set Request id * @param requestId request id * @return Builder */ public Builder withRequestId(String requestId) { this.requestId = requestId; return this; } /** * Set magic number * @param magicNumber magic number * @return Builder */ public Builder withMagicNumber(long magicNumber) { this.magicNumber = magicNumber; return this; } /** * Set forward column list * @param forwardColumnList forward column list * @return Builder */ public Builder withForwardColumnList(List forwardColumnList) { for (String columnName : forwardColumnList) { this.rowMetaBuilder.addForwardColumnName(columnName); } return this; } /** * Set index column meta list * @param indexColumnMetaList index column meta list * @return Builder */ public Builder withIndexColumnMetaList(List indexColumnMetaList) { this.rowMetaBuilder.withIndexColumnMetas(indexColumnMetaList); return this; } /** * Add one index column meta information * @param columnName index column name * @param dataType index data type * @param dimension index dimension * @return Builder */ public Builder addIndexColumnMeta(String columnName, DataType dataType, int dimension) { this.rowMetaBuilder.addIndexColumnMeta( new IndexColumnMeta.Builder(columnName, dataType, dimension).build()); return this; } /** * Add one forward column * @param columnName forward column name * @return Builder */ public Builder addForwardColumn(String columnName) { this.rowMetaBuilder.addForwardColumnName(columnName); return this; } /** * Add one row * @param row write row information * @return Builder */ public Builder addRow(Row row) { this.rows.add(row); return this; } /** * Build WriteRequest object * @return WriteRequest */ public WriteRequest build() { return new WriteRequest(this); } } /** * Document operation type */ public enum OperationType { /** * Insert record */ INSERT(0), /** * Update record */ UPDATE(1), /** * Delete record */ DELETE(2); private int value; OperationType(int value) { this.value = value; } public int getValue() { return this.value; } } /** * Contains index and forward writing information */ public static class Row { private final long primaryKey; private final OperationType operationType; private final GenericValueList indexValues; private final GenericValueList forwardValues; private final LsnContext lsnContext; private Row(Builder builder) { this.primaryKey = builder.primaryKey; this.operationType = builder.operationType; this.indexValues = builder.indexColumnBuilder.build(); this.forwardValues = builder.forwardColumnBuilder.build(); this.lsnContext = builder.lsnContext; } public long getPrimaryKey() { return primaryKey; } public OperationType getOperationType() { return operationType; } public GenericValueList getIndexValues() { return indexValues; } public GenericValueList getForwardValues() { return forwardValues; } public LsnContext getLsnContext() { return lsnContext; } /** * New row builder object * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** * Builder for Row */ public static class Builder { // required parameters private long primaryKey; private OperationType operationType; private GenericValueList.Builder indexColumnBuilder = GenericValueList.newBuilder(); // optional parameters private GenericValueList.Builder forwardColumnBuilder = GenericValueList.newBuilder(); private LsnContext lsnContext = null; /** * Empty constructor */ public Builder() { } /** * Constructor with primary key and operation type * @param primaryKey primary key * @param operationType operation type */ public Builder(long primaryKey, OperationType operationType) { this.primaryKey = primaryKey; this.operationType = operationType; } /** * Set primary key * @param primaryKey primary key * @return Builder */ public Builder withPrimaryKey(long primaryKey) { this.primaryKey = primaryKey; return this; } /** * Set operation type * @param operationType operation type * @return Builder */ public Builder withOperationType(OperationType operationType) { this.operationType = operationType; return this; } /** * Set lsn context * @param lsnContext lsn context information * @return Builder */ public Builder withLsnContext(LsnContext lsnContext) { this.lsnContext = lsnContext; return this; } /** * Add string type index column value * @param indexValue string index column value * @return Builder */ public Builder addIndexValue(String indexValue) { indexColumnBuilder.addValues( GenericValue.newBuilder().setStringValue(indexValue).build() ); return this; } /** * Add bytes type index column value * @param indexValue bytes index column value * @return Builder */ public Builder addIndexValue(byte[] indexValue) { indexColumnBuilder.addValues( GenericValue.newBuilder().setBytesValue(ByteString.copyFrom(indexValue)) ); return this; } /** * Add float type index column value * @param indexValue float index column value * @return Builder */ public Builder addIndexValue(float[] indexValue) { if (indexValue == null || indexValue.length == 0) { return this; } ByteBuffer bf = ByteBuffer.allocate(indexValue.length * 4).order(ByteOrder.LITTLE_ENDIAN); bf.asFloatBuffer().put(indexValue); indexColumnBuilder.addValues( GenericValue.newBuilder().setBytesValue(ByteString.copyFrom(bf.array()))); return this; } /** * Add byte type forward column value * @param forwardValue bytes forward column value * @return Builder */ public Builder addForwardValue(byte[] forwardValue) { forwardColumnBuilder.addValues( GenericValue.newBuilder().setBytesValue(ByteString.copyFrom(forwardValue)) ); return this; } /** * Add string type forward column value * @param forwardValuey string forward value * @return Builder */ public Builder addForwardValue(String forwardValuey) { forwardColumnBuilder.addValues( GenericValue.newBuilder().setStringValue(forwardValuey) ); return this; } /** * Add boolean type forward column value * @param forwardValuey boolean forward value * @return Builder */ public Builder addForwardValue(boolean forwardValuey) { forwardColumnBuilder.addValues( GenericValue.newBuilder().setBoolValue(forwardValuey) ); return this; } /** * Add int type forward column value * @param forwardValuey int forward value * @return Builder */ public Builder addForwardValue(int forwardValuey) { forwardColumnBuilder.addValues( GenericValue.newBuilder().setInt32Value(forwardValuey) ); return this; } /** * Add long type forward column value * @param forwardValuey long forward value * @return Builder */ public Builder addForwardValue(long forwardValuey) { forwardColumnBuilder.addValues( GenericValue.newBuilder().setInt64Value(forwardValuey) ); return this; } /** * Add float type forward column value * @param forwardValuey float forward value * @return Builder */ public Builder addForwardValue(float forwardValuey) { forwardColumnBuilder.addValues( GenericValue.newBuilder().setFloatValue(forwardValuey) ); return this; } /** * Add double type forward column value * @param forwardValuey double forward value * @return Builder */ public Builder addForwardValue(double forwardValuey) { forwardColumnBuilder.addValues( GenericValue.newBuilder().setDoubleValue(forwardValuey) ); return this; } /** * Build Row object * @return Row */ public Row build() { return new Row(this); } } } /** * Contains the index column information */ public static class IndexColumnMeta { private final String columnName; private final DataType dataType; private final int dimension; private IndexColumnMeta(Builder builder) { this.columnName = builder.columnName; this.dataType = builder.dataType; this.dimension = builder.dimension; } public String getColumnName() { return columnName; } public DataType getDataType() { return dataType; } public int getDimension() { return dimension; } /** * New IndexColumnMeta builder * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** Builder for IndexColumnMeta */ public static class Builder { // required parameters private String columnName; private DataType dataType; private int dimension; /** * Empty constructor */ public Builder() { } /** * Constructor with parameters * @param columnName index column name * @param dataType index data type * @param dimension index dimension */ public Builder(String columnName, DataType dataType, int dimension) { this.columnName = columnName; this.dataType = dataType; this.dimension = dimension; } /** * Set column name * @param columnName index column name * @return Builder */ public Builder withColumnName(String columnName) { this.columnName = columnName; return this; } /** * Set data type * @param dataType index data type * @return Builder */ public Builder withDataType(DataType dataType) { this.dataType = dataType; return this; } /** * Set dimension * @param dimension index dimension * @return Builder */ public Builder withDimension(int dimension) { this.dimension = dimension; return this; } /** * Build IndexColumnMeta object * @return IndexColumnMeta */ public IndexColumnMeta build() { return new IndexColumnMeta(this); } } } /** * Contains index and forward metas */ public static class RowMeta { private final List indexColumnMetas; private final List forwardColumnNames; private RowMeta(Builder builder) { this.indexColumnMetas = builder.indexColumnMetas; this.forwardColumnNames = builder.forwardColumnNames; } public List getIndexColumnMetas() { return indexColumnMetas; } public List getForwardColumnNames() { return forwardColumnNames; } /** * New RowMeta builder * @return Builder */ public static Builder newBuilder() { return new Builder(); } /** Builder for RowMeta */ public static class Builder { // required parameters private List indexColumnMetas = new ArrayList<>(); // optional parameters private List forwardColumnNames = new ArrayList<>(); /** * Empty constructor */ public Builder() { } /** * Set index column meta list * @param indexColumnMetas index column meta list * @return Builder */ public Builder withIndexColumnMetas(List indexColumnMetas) { this.indexColumnMetas = indexColumnMetas; return this; } /** * Set forward column name list * @param forwardColumnNames forward column name list * @return Builder */ public Builder withForwardColumnNames(List forwardColumnNames) { this.forwardColumnNames = forwardColumnNames; return this; } /** * Add single index column meta * @param indexColumnMeta index column meta * @return Builder */ public Builder addIndexColumnMeta(IndexColumnMeta indexColumnMeta) { this.indexColumnMetas.add(indexColumnMeta); return this; } /** * Add single forward column name * @param forwardColumnName forward column name * @return Builder */ public Builder addForwardColumnName(String forwardColumnName) { this.forwardColumnNames.add(forwardColumnName); return this; } /** * Build RowMeta object * @return RowMeta */ public RowMeta build() { return new RowMeta(this); } } } } ================================================ FILE: sdk/java/src/main/proto/common.proto ================================================ /** * Copyright (C) The Software Authors. All rights reserved. * \file common.proto * \author Hechong.xyf * \date Oct 2020 * \version 1.0.0 * \brief Common definition for bilin engine */ syntax = "proto3"; option java_package = "com.alibaba.proxima.be.grpc"; option java_multiple_files = true; option java_outer_classname = "ProximaCommonProto"; package proxima.be.proto; // The Go package name, refers to https://developers.google.com/protocol-buffers/docs/reference/go-generated#package option go_package = "proxima/be/proto"; /*! Union of Generic Value */ message GenericValue { oneof value_oneof { bytes bytes_value = 1; string string_value = 2; bool bool_value = 3; int32 int32_value = 4; int64 int64_value = 5; uint32 uint32_value = 6; uint64 uint64_value = 7; float float_value = 8; double double_value = 9; }; }; /*! Message of Generic Value List */ message GenericValueList { repeated GenericValue values = 1; }; /*! Message of Generic Value Meta */ message GenericValueMeta { /*! Types of Field */ enum FieldType { FT_BYTES = 0; // bytes FT_STRING = 1; // string FT_BOOL = 2; // bool FT_INT32 = 3; // int32 FT_INT64 = 4; // int64 FT_UINT32 = 5; // uint32 FT_UINT64 = 6; // uint64 FT_FLOAT = 7; // float FT_DOUBLE = 8; // double float }; string field_name = 1; FieldType field_type = 2; }; /*! Message of Generic Key-Value Pair */ message GenericKeyValue { string key = 1; GenericValue value = 2; }; /*! Message of IndexParameter, which used to customize index, and query */ message KeyValuePair { string key = 1; string value = 2; } /*! Types of Operation */ enum OperationType { OP_INSERT = 0; // Insert Operation OP_UPDATE = 1; // Update Operation OP_DELETE = 2; // Delete Operation }; /*! Types of Feature (same as Proxima) */ enum FeatureType { FT_UNDEFINED = 0; // Undefined FT_BINARY32 = 1; // 32-bits Binary FT_BINARY64 = 2; // 64-bits Binary FT_FP16 = 3; // 16-bits Float Number FT_FP32 = 4; // 32-bits Float Number FT_FP64 = 5; // 64-bits Float Number FT_INT8 = 6; // 8-bits Integer FT_INT16 = 7; // 16-bits Integer FT_INT4 = 8; // 4-bits Integer }; /*! Types of Index */ enum IndexType { IT_UNDEFINED = 0; // Undefined IT_PROXIMA_GRAPH_INDEX = 1; // Proxima Graph Index }; enum DataType { DT_UNDEFINED = 0; DT_BINARY = 1; DT_STRING = 2; DT_BOOL = 3; DT_INT32 = 4; DT_INT64 = 5; DT_UINT32 = 6; DT_UINT64 = 7; DT_FLOAT = 8; DT_DOUBLE = 9; DT_VECTOR_BINARY32 = 20; DT_VECTOR_BINARY64 = 21; DT_VECTOR_FP16 = 22; DT_VECTOR_FP32 = 23; DT_VECTOR_FP64 = 24; DT_VECTOR_INT4 = 25; DT_VECTOR_INT8 = 26; DT_VECTOR_INT16 = 27; } //! Common Response message CommonResponse { int32 code = 1; string reason = 2; }; message Status { int32 code = 1; string reason = 2; } //! Common Http Request for admin message HttpRequest {}; //! Common Http Response for admin message HttpResponse {}; ================================================ FILE: sdk/java/src/main/proto/proxima_be.proto ================================================ syntax = "proto3"; import "common.proto"; package proxima.be.proto; option java_package = "com.alibaba.proxima.be.grpc"; option java_multiple_files = true; option java_outer_classname = "ProximaSeProto"; // CC options option cc_generic_services = true; // The Go package name, refers to https://developers.google.com/protocol-buffers/docs/reference/go-generated#package option go_package = "proxima/be/proto"; message CollectionConfig { message IndexColumnParam { string column_name = 1; IndexType index_type = 2; DataType data_type = 3; uint32 dimension = 4; repeated KeyValuePair extra_params = 5; //optional } message RepositoryConfig { enum RepositoryType { RT_DATABASE = 0; } message Database { string connection_uri = 1; string table_name = 2; string user = 3; string password = 4; } RepositoryType repository_type = 1; string repository_name = 2; oneof entity{ Database database = 3; } } string collection_name = 1; uint64 max_docs_per_segment = 2; repeated string forward_column_names = 3; repeated IndexColumnParam index_column_params = 4; RepositoryConfig repository_config = 5; //optional } message CollectionName { string collection_name = 1; } message LsnContext { uint64 lsn = 1; string context = 2; } message CollectionInfo { enum CollectionStatus { CS_INITIALIZED = 0; CS_SERVING = 1; CS_DROPPED = 2; } // static collection config CollectionConfig config = 1; // variable collection status CollectionStatus status = 2; string uuid = 3; LsnContext latest_lsn_context = 4; uint64 magic_number = 5; } message DescribeCollectionResponse { Status status = 1; CollectionInfo collection = 2; }; message ListCondition { string repository_name = 1; // optional } message ListCollectionsResponse { Status status = 1; repeated CollectionInfo collections = 2; }; message CollectionStats { message SegmentStats { enum SegmentState { SS_CREATED = 0; SS_WRITING = 1; SS_DUMPING = 2; SS_COMPACTING = 3; SS_PERSIST = 4; } uint32 segment_id = 1; SegmentState state = 2; uint64 doc_count = 3; uint64 index_file_count = 4; uint64 index_file_size = 5; uint64 min_doc_id = 6; uint64 max_doc_id = 7; uint64 min_primary_key = 8; uint64 max_primary_key = 9; uint64 min_timestamp = 10; uint64 max_timestamp = 11; uint64 min_lsn = 12; uint64 max_lsn = 13; string segment_path = 14; } string collection_name = 1; string collection_path = 2; uint64 total_doc_count = 3; uint64 total_segment_count = 4; uint64 total_index_file_count = 5; uint64 total_index_file_size = 6; repeated SegmentStats segment_stats = 7; } message StatsCollectionResponse { Status status = 1; CollectionStats collection_stats = 2; }; message WriteRequest { message Row { uint64 primary_key = 1; OperationType operation_type = 2; GenericValueList forward_column_values = 3; GenericValueList index_column_values = 4; LsnContext lsn_context = 5; // optional } message IndexColumnMeta { string column_name = 1; DataType data_type = 2; uint32 dimension = 3; } message RowMeta { repeated string forward_column_names = 1; repeated IndexColumnMeta index_column_metas = 2; } string collection_name = 1; RowMeta rowMeta = 2; repeated Row rows = 3; string request_id = 4; // optional uint64 magic_number = 5; // optional } message Document { uint64 primary_key = 1; float score = 2; repeated GenericKeyValue forward_column_values = 3; }; message QueryRequest { enum QueryType { QT_KNN = 0; } message KnnQueryParam { string column_name = 1; uint32 topk = 2; oneof features_value { bytes features = 3; string matrix = 4; } uint32 batch_count = 5; uint32 dimension = 6; DataType data_type = 7; float radius = 8; // optional bool is_linear = 9; // optional repeated KeyValuePair extra_params = 10; // optional } string collection_name = 1; QueryType query_type = 2; bool debug_mode = 3; oneof query_param { KnnQueryParam knn_param = 4; }; } message QueryResponse { message Result{ repeated Document documents = 1; }; Status status = 1; string debug_info = 2; uint64 latency_us = 3; repeated Result results = 4; } message GetDocumentRequest { string collection_name = 1; uint64 primary_key = 2; bool debug_mode = 3; } message GetDocumentResponse { Status status = 1; string debug_info = 2; Document document = 3; } message GetVersionRequest { } message GetVersionResponse { Status status = 1; string version = 2; } //! GRPC service service ProximaService { // Create a collection rpc create_collection(CollectionConfig) returns (Status); // Drop a collection rpc drop_collection(CollectionName) returns (Status); // Get information of a collection rpc describe_collection(CollectionName) returns (DescribeCollectionResponse); // Get all collection information rpc list_collections(ListCondition) returns (ListCollectionsResponse); // Get collection statstics rpc stats_collection(CollectionName) returns (StatsCollectionResponse); // Write records rpc write(WriteRequest) returns (Status); // Knn query records rpc query(QueryRequest) returns (QueryResponse); // Get document information by primary key rpc get_document_by_key(GetDocumentRequest) returns (GetDocumentResponse); // Get server version rpc get_version(GetVersionRequest) returns (GetVersionResponse); } //! Restful APIs of ProximaService for management of proxima be service HttpProximaService { //! Collection management APIS // 1. Create Collection // Http: POST /v1/collection/{collection} // You can use the create collection API to add a new collection to an Proxima BE server. When creating an // index, you need specify the CollectionConfig as json string attached to the body // 2. Get Collection // HTTP: GET /{collection} // Returns information about one collection named by Path Param ${collection}. // 3. Delete Collection // HTTP: DEL /{collection} // Deletes an existing collection named by Path Param ${collection} // 4. Update Collection // HTTP: PUT /{collection}, supported later // rpc collection(HttpRequest) returns (HttpResponse); //! Retrieve Stat of Collection // HTTP: GET /v1/collection/{collection}/stat // rpc stats_collection(HttpRequest) returns (HttpResponse); //! Write records to collection // HTTP: POST /v1/collection/{collection}/index // rpc write(HttpRequest) returns (HttpResponse); //! Query documents on collection // HTTP: POST /v1/collection/{collection}/query // rpc query(HttpRequest) returns (HttpResponse); //! Write records to collection // HTTP: GET /v1/collection/{collection}/doc?key={primary_key} // rpc get_document_by_key(HttpRequest) returns (HttpResponse); //! List Collections // HTTP: GET /v1/collections?repository={repo} // Returns information about collections. Query param ${repo} specified collection should have been attached // repository named by ${repo} // rpc list_collections(HttpRequest) returns (HttpResponse); //! Get server version // HTTP: GET /version // Returns version string rpc get_version(HttpRequest) returns (HttpResponse); } ================================================ FILE: sdk/java/src/main/resources/proxima-be.properties ================================================ groupId=${project.groupId} artifactId=${project.artifactId} version=${project.version} ================================================ FILE: sdk/python/docs/.gitignore ================================================ _build _static _templates _docs ================================================ FILE: sdk/python/docs/Makefile ================================================ # Minimal makefile for Sphinx documentation # # You can set these variables from the command line, and also # from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = . BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile # sphinx-apidoc -f -o _docs ../pyproximabe @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) ================================================ FILE: sdk/python/docs/README.md ================================================ pip3 install -r ../requirements-dev.txt make html ================================================ FILE: sdk/python/docs/conf.py ================================================ # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # import os import sys sys.path.insert(0, os.path.abspath('..')) # -- Project information ----------------------------------------------------- project = 'pyproximabe' # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinxcontrib.napoleon', 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx_rtd_theme', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] autodoc_member_order = 'bysource' ================================================ FILE: sdk/python/docs/index.rst ================================================ ============================== Pyproximabe API reference ============================== Client ======= Constructor ------------ .. list-table:: :widths: 30 70 :header-rows: 1 * - Constructor - Description * - `Client() <#pyproximabe.Client>`_ - ProximaSe client * - `AsyncClient() <#pyproximabe.AsyncClient>`_ - ProximaSe asyncio based client, with the same interface as Client. Methods -------- .. list-table:: :widths: 20 20 60 :header-rows: 1 * - Client - AsyncClient - Description * - `create_collection() <#pyproximabe.Client.create_collection>`__ - `create_collection() <#pyproximabe.AsyncClient.create_collection>`__ - Creates a collection. * - `describe_collection() <#pyproximabe.Client.describe_collection>`__ - `describe_collection() <#pyproximabe.AsyncClient.describe_collection>`__ - Gets collection information. * - `drop_collection() <#pyproximabe.Client.drop_collection>`__ - `drop_collection() <#pyproximabe.AsyncClient.drop_collection>`__ - Removes a collection. * - `stats_collection() <#pyproximabe.Client.stats_collection>`__ - `stats_collection() <#pyproximabe.AsyncClient.stats_collection>`__ - Gets collection statistics. * - `create_collection() <#pyproximabe.Client.create_collection>`__ - `create_collection() <#pyproximabe.AsyncClient.create_collection>`__ - Creates a collection. * - `list_collections() <#pyproximabe.Client.list_collections>`__ - `list_collections() <#pyproximabe.AsyncClient.list_collections>`__ - List all collections possibly filtered by repository name. * - `query() <#pyproximabe.Client.query>`__ - `query() <#pyproximabe.AsyncClient.query>`__ - Queries by vector. * - `get_document_by_key() <#pyproximabe.Client.get_document_by_key>`__ - `get_document_by_key() <#pyproximabe.AsyncClient.get_document_by_key>`__ - Gets document by key. * - `write() <#pyproximabe.Client.write>`__ - `write() <#pyproximabe.AsyncClient.write>`__ - Inserts/updates/deletes documents to a specified collection. * - `delete_document_by_keys() <#pyproximabe.Client.delete_document_by_keys>`__ - `delete_document_by_keys() <#pyproximabe.AsyncClient.delete_document_by_keys>`__ - Deletes documents from a collection(convenient interface). * - `close() <#pyproximabe.Client.close>`__ - `close() <#pyproximabe.AsyncClient.close>`__ - Close connection. .. autoclass:: pyproximabe.Client :members: __init__, create_collection, describe_collection, drop_collection, stats_collection, list_collections, query, get_document_by_key, write, delete_document_by_keys, close :member-order: bysource .. autoclass:: pyproximabe.AsyncClient :members: __init__, create_collection, describe_collection, drop_collection, stats_collection, list_collections, query, get_document_by_key, write, delete_document_by_keys, close :member-order: bysource Types ========= ProximaSeStatus ----------------- .. autoclass:: pyproximabe.ProximaSeStatus :members: __init__, ok DataType ----------------- .. autoclass:: pyproximabe.DataType :show-inheritance: :members: :undoc-members: IndexType ----------------- .. autoclass:: pyproximabe.IndexType :show-inheritance: :members: :undoc-members: IndexColumnParam ----------------- .. autoclass:: pyproximabe.IndexColumnParam :members: __init__ CollectionConfig ----------------- .. autoclass:: pyproximabe.CollectionConfig :members: __init__ CollectionInfo ----------------- .. autoclass:: pyproximabe.CollectionInfo :members: __init__ DatabaseRepository ------------------- .. autoclass:: pyproximabe.DatabaseRepository :members: __init__ WriteRequest ----------------- .. autoclass:: pyproximabe.WriteRequest :members: __init__ .. autoclass:: pyproximabe::WriteRequest.RowMeta :members: __init__ .. autoclass:: pyproximabe::WriteRequest.OperationType :show-inheritance: :members: :undoc-members: .. autoclass:: pyproximabe::WriteRequest.Row :members: __init__ Document ----------------- .. autoclass:: pyproximabe.Document QueryResponse ----------------- .. autoclass:: pyproximabe.QueryResponse CollectionStats ----------------- .. autoclass:: pyproximabe.CollectionStats .. autoclass:: pyproximabe.CollectionStats.SegmentStats LsnContext ----------------- .. autoclass:: pyproximabe.LsnContext :members: __init__ ================================================ FILE: sdk/python/example/example.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import time import random import numpy as np from pyproximabe import * HOST = '127.0.0.1' GRPC_PORT = 16000 HTTP_PORT = 16001 TIMEOUT = 10 handler = random.choice(['grpc', 'http']) print('use', handler) if handler == 'grpc': client = Client(HOST, GRPC_PORT, handler='grpc', timeout=TIMEOUT) else: client = Client(HOST, HTTP_PORT, handler='http', timeout=TIMEOUT) collection_name = 'iris' # drop collection if exist _ = client.drop_collection(collection_name) # create collection index_column = IndexColumnParam(name='length', dimension=4, index_type=IndexType.PROXIMA_GRAPH_INDEX) collection_config = CollectionConfig(collection_name=collection_name, index_column_params=[index_column], max_docs_per_segment=10000, forward_column_names=['iris_type']) status = client.create_collection(collection_config) print('---------create collection------------') print(status) if not status.ok(): # error handling pass print('\n') # write rows = [] iris_datas = [ ('[4.8,3.0,1.4,0.3]', 'Iris-setosa'), ('[5.1,3.8,1.6,0.2]', 'Iris-setosa'), ('[4.6,3.2,1.4,0.2]', 'Iris-setosa'), ('[5.3,3.7,1.5,0.2]', 'Iris-setosa'), ('[5.0,3.3,1.4,0.2]', 'Iris-setosa'), ('[7.0,3.2,4.7,1.4]', 'Iris-versicolor'), ('[6.4,3.2,4.5,1.5]', 'Iris-versicolor'), ('[6.9,3.1,4.9,1.5]', 'Iris-versicolor'), ('[5.5,2.3,4.0,1.3]', 'Iris-versicolor'), ('[6.5,2.8,4.6,1.5]', 'Iris-versicolor'), ('[6.7,3.0,5.2,2.3]', 'Iris-virginica'), ('[6.3,2.5,5.0,1.9]', 'Iris-virginica'), ('[6.5,3.0,5.2,2.0]', 'Iris-virginica'), ('[6.2,3.4,5.4,2.3]', 'Iris-virginica'), ('[5.9,3.0,5.1,1.8]', 'Iris-virginica'), ] row_meta = WriteRequest.RowMeta(index_column_metas=[WriteRequest.IndexColumnMeta(name='length', data_type='VECTOR_FP32', dimension=4)], forward_column_names=['iris_type'], forward_column_types=[DataType.STRING]) for i, data in enumerate(iris_datas): rows.append( WriteRequest.Row(primary_key=i, operation_type=WriteRequest.OperationType.INSERT, index_column_values=[data[0]], forward_column_values=[data[1]])) write_request = WriteRequest(collection_name=collection_name, rows=rows, row_meta=row_meta) status = client.write(write_request) print("-----------write-------------") print(status) print('\n') time.sleep(1) status = client.delete_document_by_keys(collection_name, 2) print("-----------delete-------------") print(status) print('\n') # get document by key status, res = client.get_document_by_key(collection_name, primary_key=3) print('---------get document by key------------') print(status) print(res) print('\n') # query status, knn_res = client.query(collection_name, column_name='length', features=[[5.1, 3.5, 1.4, 0.2], [5.5, 2.3, 4.0, 1.3]], data_type='VECTOR_FP32', topk=2) print('---------query knn------------') print(status) print(knn_res) for i, result in enumerate(knn_res.results): print(f'Query: {i}') for doc in result: forward_values = ','.join( f'{k}={v}' for k, v in doc.forward_column_values.items()) print( f' primary_key={doc.primary_key}, score={doc.score}, forward_column_values=[{forward_values}]' ) print('\n') # query by numpy array array = np.array([[5.1, 3.5, 1.4, 0.2], [5.5, 2.3, 4.0, 1.3]], dtype=np.float32) _, _ = client.query(collection_name, column_name='length', features=array.tobytes(), batch_count=2, dimension=4, data_type='VECTOR_FP32', # optional for bytes feature topk=2) # stats collection status, collection_stats = client.stats_collection(collection_name) print('----------------get collection stats----------------') print(status) print(collection_stats) print('\n') # describe status, collection_info = client.describe_collection(collection_name) print('----------------describe collection----------------') print(status) print(collection_info) print('\n') # list all collections status, collections_data = client.list_collections() print('----------------list collections----------------') print(status) print(collections_data) print('\n') # drop status = client.drop_collection(collection_name) print('------------------drop-----------------') print(status) client.close() ================================================ FILE: sdk/python/example/example_async.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import time import random import numpy as np import asyncio from pyproximabe import * HOST = '127.0.0.1' GRPC_PORT = 16000 TIMEOUT = 10 async def main(): client = AsyncClient(HOST, GRPC_PORT, timeout=TIMEOUT) collection_name = 'iris' # drop collection if exist _ = await client.drop_collection(collection_name) # create collection index_column = IndexColumnParam(name='length', dimension=4, index_type=IndexType.PROXIMA_GRAPH_INDEX) collection_config = CollectionConfig(collection_name=collection_name, index_column_params=[index_column], max_docs_per_segment=10000, forward_column_names=['iris_type']) status = await client.create_collection(collection_config) print('---------create collection------------') print(status) print('\n') # write rows = [] iris_datas = [ ('[4.8,3.0,1.4,0.3]', 'Iris-setosa'), ('[5.1,3.8,1.6,0.2]', 'Iris-setosa'), ('[4.6,3.2,1.4,0.2]', 'Iris-setosa'), ('[5.3,3.7,1.5,0.2]', 'Iris-setosa'), ('[5.0,3.3,1.4,0.2]', 'Iris-setosa'), ('[7.0,3.2,4.7,1.4]', 'Iris-versicolor'), ('[6.4,3.2,4.5,1.5]', 'Iris-versicolor'), ('[6.9,3.1,4.9,1.5]', 'Iris-versicolor'), ('[5.5,2.3,4.0,1.3]', 'Iris-versicolor'), ('[6.5,2.8,4.6,1.5]', 'Iris-versicolor'), ('[6.7,3.0,5.2,2.3]', 'Iris-virginica'), ('[6.3,2.5,5.0,1.9]', 'Iris-virginica'), ('[6.5,3.0,5.2,2.0]', 'Iris-virginica'), ('[6.2,3.4,5.4,2.3]', 'Iris-virginica'), ('[5.9,3.0,5.1,1.8]', 'Iris-virginica'), ] row_meta = WriteRequest.RowMeta(index_column_metas=[WriteRequest.IndexColumnMeta(name='length', data_type='VECTOR_FP32', dimension=4)], forward_column_names=['iris_type'], forward_column_types=[DataType.STRING]) for i, data in enumerate(iris_datas): rows.append( WriteRequest.Row(primary_key=i, operation_type=WriteRequest.OperationType.INSERT, index_column_values=[data[0]], forward_column_values=[data[1]])) # create 3 requests requests = [ client.write( WriteRequest(collection_name=collection_name, rows=rows[0:5], row_meta=row_meta)), client.write( WriteRequest(collection_name=collection_name, rows=rows[5:10], row_meta=row_meta)), client.write( WriteRequest(collection_name=collection_name, rows=rows[10:], row_meta=row_meta)) ] print("-----------write-------------") responses = await asyncio.gather(*requests) for r in responses: print(r) print('\n') time.sleep(1) status = await client.delete_document_by_keys(collection_name, 2) print("-----------delete-------------") print(status) print('\n') # get document by key get_req = client.get_document_by_key(collection_name, primary_key=3) query_req = client.query(collection_name, column_name='length', features=[[5.1, 3.5, 1.4, 0.2], [5.5, 2.3, 4.0, 1.3]], data_type='VECTOR_FP32', topk=2) responses = await asyncio.gather(get_req, query_req) print('---------get document by key------------') status, get_rsp = responses[0] print(status) print(get_rsp) print('\n') # query print('---------query knn------------') status, knn_rsp = responses[1] print(status) print(knn_rsp) for i, result in enumerate(knn_rsp.results): print(f'Query: {i}') for doc in result: forward_values = ','.join( f'{k}={v}' for k, v in doc.forward_column_values.items()) print( f' primary_key={doc.primary_key}, score={doc.score}, forward_column_values=[{forward_values}]' ) print('\n') responses = await asyncio.gather( client.stats_collection(collection_name), client.describe_collection(collection_name), client.list_collections() ) # stats collection status, collection_stats = responses[0] print('----------------get collection stats----------------') print(status) print(collection_stats) print('\n') # describe status, collection_info = responses[1] print('----------------describe collection----------------') print(status) print(collection_info) print('\n') # list all collections status, collections_data = responses[2] print('----------------list collections----------------') print(status) print(collections_data) print('\n') # drop status = await client.drop_collection(collection_name) print('------------------drop-----------------') print(status) await client.close() loop = asyncio.get_event_loop() result = loop.run_until_complete(main()) ================================================ FILE: sdk/python/example/mysql_example.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import time import random import numpy as np import pymysql from pyproximabe import * HOST = '127.0.0.1' GRPC_PORT = 16000 HTTP_PORT = 16001 MYSQL_PORT = 3306 MYSQL_HOST = HOST TIMEOUT = 10 # mysql configuration mysql_table_name = 'iris_table' mysql_database_name = 'test_db' mysql_user='root' mysql_password='root' handler = random.choice(['grpc', 'http']) print('use', handler) if handler == 'grpc': client = Client(HOST, GRPC_PORT, handler='grpc', timeout=TIMEOUT) else: client = Client(HOST, HTTP_PORT, handler='http', timeout=TIMEOUT) collection_name = 'iris' # drop collection if exist _ = client.drop_collection(collection_name) # create collection index_column = IndexColumnParam(name='length', dimension=4, index_type=IndexType.PROXIMA_GRAPH_INDEX) database_repository = DatabaseRepository(repository_name='test_repository', connection_uri=f'mysql://{MYSQL_HOST}:{MYSQL_PORT}/{mysql_database_name}', table_name=mysql_table_name, user=mysql_user, password=mysql_password) collection_config = CollectionConfig(collection_name=collection_name, index_column_params=[index_column], max_docs_per_segment=10000, forward_column_names=['iris_type'], repository_config=database_repository) status = client.create_collection(collection_config) print('---------create collection------------') print(status) if not status.ok(): # error handling pass print('\n') # write data to mysql, create/update/delete operation will be auto synced to Proxima BE print('---------write data to mysql--------\n') conn = pymysql.connect(host=MYSQL_HOST, port=MYSQL_PORT, user=mysql_user, password=mysql_password) conn.cursor().execute(f'create database if not exists {mysql_database_name}') conn.select_db(mysql_database_name) conn.cursor().execute(f'create table if not exists {mysql_table_name}(id int primary key auto_increment, length varchar(256), iris_type varchar(256))') conn.cursor().execute(f'delete from {mysql_table_name}') sql = f'insert into {mysql_table_name}(length, iris_type) values(%s, %s)' iris_datas = [ ('[4.8,3.0,1.4,0.3]', 'Iris-setosa'), ('[5.1,3.8,1.6,0.2]', 'Iris-setosa'), ('[4.6,3.2,1.4,0.2]', 'Iris-setosa'), ('[5.3,3.7,1.5,0.2]', 'Iris-setosa'), ('[5.0,3.3,1.4,0.2]', 'Iris-setosa'), ('[7.0,3.2,4.7,1.4]', 'Iris-versicolor'), ('[6.4,3.2,4.5,1.5]', 'Iris-versicolor'), ('[6.9,3.1,4.9,1.5]', 'Iris-versicolor'), ('[5.5,2.3,4.0,1.3]', 'Iris-versicolor'), ('[6.5,2.8,4.6,1.5]', 'Iris-versicolor'), ('[6.7,3.0,5.2,2.3]', 'Iris-virginica'), ('[6.3,2.5,5.0,1.9]', 'Iris-virginica'), ('[6.5,3.0,5.2,2.0]', 'Iris-virginica'), ('[6.2,3.4,5.4,2.3]', 'Iris-virginica'), ('[5.9,3.0,5.1,1.8]', 'Iris-virginica'), ] with conn.cursor() as cursor: cursor.executemany(sql, iris_datas) conn.commit() time.sleep(1) # get document by key status, res = client.get_document_by_key(collection_name, primary_key=3) print('---------get document by key------------') print(status) print(res) print('\n') # query status, knn_res = client.query(collection_name, column_name='length', features=[[5.1, 3.5, 1.4, 0.2], [5.5, 2.3, 4.0, 1.3]], data_type='VECTOR_FP32', topk=2) print('---------query knn------------') print(status) print(knn_res) for i, result in enumerate(knn_res.results): print(f'Query: {i}') for doc in result: forward_values = ','.join( f'{k}={v}' for k, v in doc.forward_column_values.items()) print( f' primary_key={doc.primary_key}, score={doc.score}, forward_column_values=[{forward_values}]' ) print('\n') # query by numpy array array = np.array([[5.1, 3.5, 1.4, 0.2], [5.5, 2.3, 4.0, 1.3]], dtype=np.float32) _, _ = client.query(collection_name, column_name='length', features=array.tobytes(), batch_count=2, dimension=4, data_type='VECTOR_FP32', topk=2) # stats collection status, collection_stats = client.stats_collection(collection_name) print('----------------get collection stats----------------') print(status) print(collection_stats) print('\n') # describe status, collection_info = client.describe_collection(collection_name) print('----------------describe collection----------------') print(status) print(collection_info) print('\n') # list all collections status, collections_data = client.list_collections() print('----------------list collections----------------') print(status) print(collections_data) print('\n') # drop status = client.drop_collection(collection_name) print('------------------drop-----------------') print(status) client.close() ================================================ FILE: sdk/python/pyproximabe/__init__.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from .version import __version__ # import grpc before importing protobuf generated modules, to fix arm64 crashing problem # see https://github.com/grpc/grpc/issues/26279 import grpc # hack to import proto import sys import os.path sys.path.insert(0, os.path.dirname(__file__)) from .core.client import Client from .core.client import AsyncClient from .core.types import IndexColumnParam from .core.types import CollectionConfig from .core.types import CollectionInfo from .core.types import DataType from .core.types import IndexType from .core.types import DatabaseRepository from .core.types import WriteRequest from .core.types import QueryResponse from .core.types import Document from .core.types import LsnContext from .core.types import ProximaBeStatus from .core.types import CollectionStats sys.path.pop(0) del sys del os ================================================ FILE: sdk/python/pyproximabe/core/__init__.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ================================================ FILE: sdk/python/pyproximabe/core/client.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import abc from .types import ProximaBeException from .types import _build_get_document_request from .types import _build_knn_query from .types import _build_list_condition from .types import WriteRequest from .types import _check_version from .types import _Timer from .types import _TimerStage from .handlers import HttpHandler from .handlers import GrpcHandler from .handlers import AsyncGrpcHandler class BaseClient(abc.ABC): """ BaseClient. """ @abc.abstractmethod def __init__(self, handler): self._handler = handler self._check_version() def create_collection(self, collection_config): """ Create collection. Args: collection_config (CollectionConfig): collection config. Returns: ProximaBeStatus: status """ return self._handler.create_collection(collection_config.to_pb()) def describe_collection(self, collection_name): """ Describe collection. Args: collection_name (str): collection name Returns: tuple: 2-element tuple containing * :class:`ProximaBeStatus`: status * :class:`CollectionInfo`: collection information """ return self._handler.describe_collection(collection_name) def drop_collection(self, collection_name): """ Drop collection. Args: collection_name (str): collection name Returns: ProximaBeStatus: status """ return self._handler.drop_collection(collection_name) def stats_collection(self, collection_name): """ Stats collection. Args: collection_name (str): collection name Returns: tuple: 2-element tuple containing * :class:`ProximaBeStatus`: status * :class:`CollectionStats`: collection statistics """ return self._handler.stats_collection(collection_name) def list_collections(self, repository_name=None): """ List all collections. Args: repository_name (Optional[str]): repository name Returns: tuple: 2-element tuple containing * :class:`ProximaBeStatus`: status * List[:class:`CollectionInfo`]: list of collection info """ return self._handler.list_collections( _build_list_condition(repository_name)) # pylint: disable=too-many-arguments def query(self, collection_name, column_name, features, data_type=None, dimension=None, batch_count=None, topk=100, is_linear=False, radius=None, extra_params=None, **kwargs): """ Query documents using vector search. Args: collection_name (str): collection name column_name (str): index column name features (Union[bytes, str, List[List[Union[float, int, ...]]]]): vector features in the following formats: * bytes of little endian order. * json string in the following format * flatten json array, e.g. '[1.0,2.0,3.0,4.0]' with 2 batch of 2 dimensional vectors * json array of json array, e.g. '[[1.0,2.0],[3.0,4.0]]' with above case * list of vectors, e.g. [[1.0,2.0,3.0], [4.0, 5.0, 6.0]] data_type (Optional[Union[DataType, str, int]]): vector data type. * optional for bytes features. * required for list of vectors features. dimension (Optional[int]): vector dimension. * required for bytes features. * auto computed for list of vectors features. batch_count (Optional[int]): query batch. * required for bytes features. * auto computed for list of vectors features. topk (int): result number to be returned. is_linear (bool): whether to linear search. radius (Optional[float]): return only documents within `radius` distance from query. extra_params (Optional[dict]): extra parameters. Returns: tuple: 2-element tuple containing * :class:`ProximaBeStatus`: status * :class:`QueryResponse`: query response, with ``batch_count`` number of :class:`QueryResponse.Result` s, each with at most ``topk`` number of :class:`Document` s. Examples: >>> # query with binary feature,batch_count and dimension must be set, data_type is optional >>> client.query(collection_name='collection_xxx', column_name='index_xxx', features=b'xxx', ... dimension = 256, batch_count=10) >>> # query with lists of vectors feature, data_type must be set, >>> # batch_count and dimension can be auto inferred >>> client.query(collection_name='collection_xxx', column_name='index_xxx', features=[1.0, 2.0, ...], ... data_type = Datatype.VECTOR_FP32) """ debug = kwargs.get('debug', False) timer = None if debug: timer = _Timer() req = _build_knn_query(collection_name, column_name, features, data_type, batch_count, dimension, topk, is_linear, radius, extra_params, debug) _Timer.end_stage_helper(timer, _TimerStage.build_pb_obj.name) return self._handler.query(req, timer=timer, **kwargs) def get_document_by_key(self, collection_name, primary_key): """ Query document by primary key. Args: collection_name (str): collection name primary_key (long): primary key Returns: tuple: 2-element tuple containing * :class:`ProximaBeStatus`: status. status.ok() if server succeeds(including key not exists). * :class:`Document`: document. None if key not exists. """ req = _build_get_document_request(collection_name, primary_key) return self._handler.get_document_by_key(req) def write(self, write_request): """ Write batch documents to proxima be. Args: write_request (WriteRequest): write request. Returns: ProximaBeStatus: status """ return self._handler.write(write_request.to_pb()) def delete_document_by_keys(self, collection_name, primary_keys): """ Delete documents by key. Args: collection_name (str): collection name primary_keys (List[long]): primary keys Returns: ProximaBeStatus: status """ if not isinstance(primary_keys, list): primary_keys = [primary_keys] rows = [] for pk in primary_keys: row = WriteRequest.Row( primary_key=pk, operation_type=WriteRequest.OperationType.DELETE, ) rows.append(row) delete_request = WriteRequest( collection_name=collection_name, rows=rows ) return self.write(delete_request) def close(self): """ Close connection. Returns: None """ return self._handler.close() def _check_version(self): status, version = self._handler.get_version() _check_version(status, version) class Client(BaseClient): def __init__(self, host, port=16000, handler='grpc', timeout=10): """ Constructor. Args: host (str): hostname port (int): port handler (str): use grpc or http, defaults to grpc. timeout (Optional[float]): timeout in seconds, default to 10. Passing None means no timeout. """ if handler.lower() == 'http': handler = HttpHandler(host, port, timeout) elif handler.lower() == 'grpc': handler = GrpcHandler(host, port, timeout) else: raise ProximaBeException(f"Invalid handler type[{handler}]") super().__init__(handler) class AsyncClient(BaseClient): def __init__(self, host, port=16000, handler='grpc', timeout=10): """ Constructor. Args: host (str): hostname port (int): port handler (str): only grpc is supported for now. timeout (Optional[float]): timeout in seconds, default to 10. Passing None means no timeout. """ if handler.lower() != 'grpc': raise ProximaBeException("AsyncClient only support grpc") super().__init__(AsyncGrpcHandler(host, port, timeout)) ================================================ FILE: sdk/python/pyproximabe/core/handlers.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import requests import grpc import orjson as json from google.protobuf.json_format import MessageToJson from google.protobuf.json_format import Parse from google.protobuf.message import Message from .types import ProximaBeException from .types import ProximaBeStatus from .types import CollectionInfo from .types import CollectionStats from .types import QueryResponse from .types import Document from .types import _TimerStage from .types import _Timer from .types import common_pb2 from .types import proxima_be_pb2 from .types import proxima_be_pb2_grpc from .types import _build_collection_name class BaseHandler: @staticmethod def _parse_response(pb_or_txt, response_type=None, attr_name=None, message=None, **kwargs): timer = kwargs.get('timer') pb = pb_or_txt if message is not None: _Timer.begin_stage_helper(timer, _TimerStage.deserialization.name) pb = Parse(pb, message) _Timer.end_stage_helper(timer, _TimerStage.deserialization.name) if isinstance(pb, common_pb2.Status): _Timer.end_stage_helper(timer, _TimerStage.total.name) return ProximaBeStatus(pb.code, pb.reason) status = ProximaBeStatus(pb.status.code, pb.status.reason) status.update_timer_report(timer) if not status.ok(): return status, None rsp = pb if response_type is not None: _Timer.begin_stage_helper(timer, _TimerStage.build_py_obj.name) obj = pb if attr_name is not None: if not pb.HasField(attr_name): return status, None obj = getattr(pb, attr_name) rsp = response_type.from_pb(obj) _Timer.end_stage_helper(timer, _TimerStage.build_py_obj.name) _Timer.end_stage_helper(timer, _TimerStage.total.name) BaseHandler._merge_client_debug_info(rsp, timer) return status, rsp @staticmethod def _merge_client_debug_info(rsp, timer): if timer is not None and hasattr(rsp, 'debug_info'): debug_info = getattr(rsp, 'debug_info') try: debug_root = json.loads(debug_info) debug_root['client'] = timer.timer_report new_debug_info = json.dumps(debug_root).decode() setattr(rsp, 'debug_info', new_debug_info) except Exception: pass @staticmethod def _parse_collection_lists(status, list_response): if not status.ok(): return status, [] return status, [ CollectionInfo.from_pb(c) for c in list_response.collections ] def _parse_status(self, response): return self._parse_response(response) class HttpHandler(BaseHandler): _MANAGE_COLLECTION_URL = "/v1/collection/" _STATS_COLLECTION_URL = "/v1/collection/%s/stats" _LIST_COLLECTIONS_URL = "/v1/collections" _WRITE_URL = "/v1/collection/%s/index" _QUERY_URL = "/v1/collection/%s/query" _GET_DOCUMENT_BY_KEY_URL = "/v1/collection/%s/doc?key=%d" _VERSION_URL = "/service_version" def __init__(self, host, port, timeout): # hostname self._host = host # port self._port = port # base url self._base_url = f'http://{self._host}:{self._port}' # to use connection pool self._session = requests.Session() # timeout self._timeout = timeout def create_collection(self, config): rsp = self._send_request(self._MANAGE_COLLECTION_URL + config.collection_name, config) return self._parse_status(rsp) def drop_collection(self, collection_name): rsp = self._send_request(self._MANAGE_COLLECTION_URL + collection_name, method='DELETE') return self._parse_status(rsp) def describe_collection(self, collection_name): rsp = self._send_request(self._MANAGE_COLLECTION_URL + collection_name, method='GET') return self._parse_response( rsp, CollectionInfo, 'collection', proxima_be_pb2.DescribeCollectionResponse()) def list_collections(self, list_condition): query = "" if list_condition.repository_name is not None: query = f'?repository={list_condition.repository_name}' rsp = self._send_request(self._LIST_COLLECTIONS_URL + query, list_condition, method='GET') pb_rsp = self._parse_response( rsp, message=proxima_be_pb2.ListCollectionsResponse()) return self._parse_collection_lists(*pb_rsp) def stats_collection(self, collection): rsp = self._send_request(self._STATS_COLLECTION_URL % collection, method='GET') return self._parse_response(rsp, CollectionStats, 'collection_stats', proxima_be_pb2.StatsCollectionResponse()) def write(self, req): rsp = self._send_request(self._WRITE_URL % req.collection_name, req, method='POST') return self._parse_status(rsp) def query(self, req, **kwargs): timer = kwargs.get('timer') rsp = self._send_request(self._QUERY_URL % req.collection_name, req, method='POST', **kwargs) _Timer.begin_stage_helper(timer, _TimerStage.deserialization.name) root = json.loads(rsp) _Timer.end_stage_helper(timer, _TimerStage.deserialization.name, start_stage_name=_TimerStage.build_py_obj.name) status = root['status'] se_status = ProximaBeStatus(status['code'], status['reason']) se_status.update_timer_report(timer) if not se_status.ok(): return se_status, None rsp = QueryResponse.from_json(root) _Timer.end_stage_helper(timer, _TimerStage.build_py_obj.name, _TimerStage.total.name) self._merge_client_debug_info(rsp, timer) return se_status, rsp def get_document_by_key(self, req): rsp = self._send_request(self._GET_DOCUMENT_BY_KEY_URL % ( req.collection_name, req.primary_key), method='GET') return self._parse_response(rsp, Document, 'document', proxima_be_pb2.GetDocumentResponse()) def get_version(self): rsp = self._send_request(self._VERSION_URL, method='GET') status, pb = self._parse_response(rsp, message=proxima_be_pb2.GetVersionResponse()) return status, pb.version def close(self): self._session.close() def _parse_status(self, response): return self._parse_response(response, message=common_pb2.Status()) def _send_request(self, url, body=None, method='POST', **kwargs): """ Send http request. Args: url (str): url body (Optional[str,google.protobuf.Message]: http request body. Converted to json if it's google.protobuf.Message. method (str): http request method. Returns: response body. Raises: ProximaBeException on error. """ timer = kwargs.get('timer') try: full_url = f'{self._base_url}{url}' if isinstance(body, Message): _Timer.begin_stage_helper(timer, _TimerStage.serialization.name) body = MessageToJson(body) _Timer.end_stage_helper(timer, _TimerStage.serialization.name) _Timer.begin_stage_helper(timer, _TimerStage.rpc.name) r = self._session.request(method=method, url=full_url, data=body, timeout=self._timeout) _Timer.end_stage_helper(timer, _TimerStage.rpc.name) if r.status_code != 200: raise ProximaBeException( f'Unexpected return code[{r.status_code}] and text[{r.text}]' ) return r.text except ProximaBeException: raise except requests.RequestException as e: raise ProximaBeException( f'Unexpected network error, url=[{full_url}]') from e except Exception as e: raise ProximaBeException('Unexpected exception') from e class GrpcHandler(BaseHandler): def __init__(self, host, port, timeout): # hostname self._host = host # port self._port = port spec = f'{self._host}:{self._port}' self._channel = grpc.insecure_channel(spec) self._stub = proxima_be_pb2_grpc.ProximaServiceStub(self._channel) self._timeout = timeout def create_collection(self, collection_config): rsp = self._stub.create_collection(collection_config, timeout=self._timeout) return self._parse_status(rsp) def drop_collection(self, collection_name): rsp = self._stub.drop_collection( _build_collection_name(collection_name), timeout=self._timeout) return self._parse_status(rsp) def describe_collection(self, collection_name): rsp = self._stub.describe_collection( _build_collection_name(collection_name), timeout=self._timeout) return self._parse_response(rsp, CollectionInfo, 'collection') def list_collections(self, list_condition): rsp = self._stub.list_collections(list_condition, timeout=self._timeout) status, rsp = self._parse_response(rsp) return self._parse_collection_lists(status, rsp) def stats_collection(self, collection_name): rsp = self._stub.stats_collection( _build_collection_name(collection_name), timeout=self._timeout) return self._parse_response(rsp, CollectionStats, 'collection_stats') def write(self, write_request): rsp = self._stub.write(write_request, timeout=self._timeout) return self._parse_status(rsp) def query(self, query_request, **kwargs): timer = kwargs.get('timer') _Timer.begin_stage_helper(timer, _TimerStage.rpc.name) rsp = self._stub.query(query_request, timeout=self._timeout) _Timer.end_stage_helper(timer, _TimerStage.rpc.name) return self._parse_response(rsp, QueryResponse, **kwargs) def get_document_by_key(self, get_document_request): rsp = self._stub.get_document_by_key(get_document_request, timeout=self._timeout) return self._parse_response(rsp, Document, 'document') def get_version(self): rsp = self._stub.get_version(proxima_be_pb2.GetVersionRequest(), timeout=self._timeout) status, pb = self._parse_response(rsp) return status, pb.version def close(self): self._channel.close() class AsyncGrpcHandler(BaseHandler): def __init__(self, host, port, timeout): # hostname self._host = host # port self._port = port self._spec = f'{self._host}:{self._port}' self._channel = grpc.aio.insecure_channel(self._spec) self._stub = proxima_be_pb2_grpc.ProximaServiceStub(self._channel) self._timeout = timeout async def create_collection(self, collection_config): rsp = await self._stub.create_collection(collection_config, timeout=self._timeout) return self._parse_status(rsp) async def drop_collection(self, collection_name): rsp = await self._stub.drop_collection( _build_collection_name(collection_name), timeout=self._timeout) return self._parse_status(rsp) async def describe_collection(self, collection_name): rsp = await self._stub.describe_collection( _build_collection_name(collection_name), timeout=self._timeout) return self._parse_response(rsp, CollectionInfo, 'collection') async def list_collections(self, list_condition): rsp = await self._stub.list_collections(list_condition, timeout=self._timeout) status, rsp = self._parse_response(rsp) return self._parse_collection_lists(status, rsp) async def stats_collection(self, collection_name): rsp = await self._stub.stats_collection( _build_collection_name(collection_name), timeout=self._timeout) return self._parse_response(rsp, CollectionStats, 'collection_stats') async def write(self, write_request): rsp = await self._stub.write(write_request, timeout=self._timeout) return self._parse_status(rsp) async def query(self, query_request, **kwargs): timer = kwargs.get('timer') _Timer.begin_stage_helper(timer, _TimerStage.rpc.name) rsp = await self._stub.query(query_request, timeout=self._timeout) _Timer.end_stage_helper(timer, _TimerStage.rpc.name) return self._parse_response(rsp, QueryResponse, **kwargs) async def get_document_by_key(self, get_document_request): rsp = await self._stub.get_document_by_key(get_document_request, timeout=self._timeout) return self._parse_response(rsp, Document, 'document') def get_version(self): # use synchronous channel to get version # Another option is to use asynchronous channel like below comment. # But asyncio does not support nested event loop by design, # nest_asyncio is needed to patch event loop, which may lead to other issues. channel = grpc.insecure_channel(self._spec) stub = proxima_be_pb2_grpc.ProximaServiceStub(channel) rsp = stub.get_version(proxima_be_pb2.GetVersionRequest(), timeout=self._timeout) status, pb = self._parse_response(rsp) channel.close() return status, pb.version # loop = asyncio.get_event_loop() # nest_asyncio.apply(loop) # rsp = loop.run_until_complete(self._stub.get_version(proxima_be_pb2.GetVersionRequest())) # status, pb = self._parse_response(rsp) # return status, pb.version async def close(self): await self._channel.close() ================================================ FILE: sdk/python/pyproximabe/core/types.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import struct from enum import Enum from enum import IntEnum import base64 import time from proto import common_pb2 from proto import proxima_be_pb2 from proto import proxima_be_pb2_grpc # NOQA from ..version import __version__ class IndexType(IntEnum): UNDEFINED = 0 PROXIMA_GRAPH_INDEX = 1 class DataType(IntEnum): UNDEFINED = 0 BINARY = 1 STRING = 2 BOOL = 3 INT32 = 4 INT64 = 5 UINT32 = 6 UINT64 = 7 FLOAT = 8 DOUBLE = 9 VECTOR_BINARY32 = 20 VECTOR_BINARY64 = 21 VECTOR_FP16 = 22 VECTOR_FP32 = 23 VECTOR_FP64 = 24 VECTOR_INT4 = 25 VECTOR_INT8 = 26 VECTOR_INT16 = 27 class ProximaBeException(Exception): pass class ProximaBeStatus: """ ProximaBe Status Attributes: code (int): Status code, 0 for success, otherwise for failure. reason (str): Error details. """ def __init__(self, code, reason): """ Args: code (int): status code reason (str): error details """ self.code = code self.reason = reason self.timer_report = None def ok(self): """ Returns: bool: if ok. """ return self.code == 0 def update_timer_report(self, timer): if timer is not None: self.timer_report = timer.timer_report def __str__(self): if self.code == 0: return 'success' return f'{self.reason}({self.code})' class _Printable: def __str__(self): return _stringify(self) def __repr__(self): return _stringify(self) class IndexColumnParam(_Printable): """ Column index params. Attributes: name (str): Column name. dimension (int): Vector dimension. index_type (IndexType): IndexType enum value or string. data_type (DataType): DataType enum value or string. extra_params (dict): Extended parameters. """ # pylint: disable=too-many-arguments def __init__(self, name, dimension, index_type=IndexType.PROXIMA_GRAPH_INDEX, data_type=DataType.VECTOR_FP32, extra_params=None): """ Constructor Args: name (str): Column name. dimension (int): Vector dimension. index_type (int or str): IndexType enum value or string. data_type (int or str): DataType enum value or string. extra_params (Optional[dict]): Extended parameters. """ # column name self.name = name # vector dimension self.dimension = dimension # IndexType enum self.index_type = _parse_enum_value_or_string(IndexType, common_pb2.IndexType, index_type, 'IT_') # DataType enum self.data_type = _parse_enum_value_or_string(DataType, common_pb2.DataType, data_type, 'DT_') # Extra parameters. self.extra_params = _default_if_none(extra_params, {}) def to_pb(self): """Return corresponding protobuf message.""" param = proxima_be_pb2.CollectionConfig.IndexColumnParam() param.column_name = self.name param.index_type = self.index_type.value param.data_type = self.data_type.value param.dimension = self.dimension param.extra_params.extend( _key_value_pair(key, value) for key, value in self.extra_params.items()) return param @staticmethod def from_pb(pb_column): """Parse from corresponding protobuf type.""" extra_params = {} for extra_param in pb_column.extra_params: extra_params[extra_param.key] = extra_param.value return IndexColumnParam(pb_column.column_name, pb_column.dimension, pb_column.index_type, pb_column.data_type, extra_params) class DatabaseRepository(_Printable): """ Database Repository. Attributes: repository_name (str): repository name connection_uri (str): database connection uri table_name (str): table name user (str): database user name password (str): database password """ # pylint: disable=too-many-arguments def __init__(self, repository_name, connection_uri, table_name, user, password): """ Constructor. Args: repository_name (str): repository name connection_uri (str): database connection uri, e.g. mysql://localhost/database table_name (str): table name user (str): database user name password (str): database password """ self.repository_name = repository_name self.connection_uri = connection_uri self.table_name = table_name self.user = user self.password = password def to_pb(self): """Return corresponding protobuf message.""" repo = proxima_be_pb2.CollectionConfig.RepositoryConfig() repo.repository_type = proxima_be_pb2.CollectionConfig.RepositoryConfig.RepositoryType.RT_DATABASE repo.repository_name = self.repository_name db = repo.database db.connection_uri = self.connection_uri db.table_name = self.table_name db.user = self.user db.password = self.password return repo @staticmethod def from_pb(pb_repo): """Parse from corresponding protobuf type.""" assert pb_repo.repository_type == proxima_be_pb2.CollectionConfig.RepositoryConfig.RepositoryType.RT_DATABASE db = pb_repo.database return DatabaseRepository(pb_repo.repository_name, db.connection_uri, db.table_name, db.user, db.password) class CollectionConfig(_Printable): """ Collection configuration. Attributes: collection_name (str): collection name. index_column_params (List[IndexColumnParam]): index column params. forward_column_names (List[str]): forward columns. repository_config (Optional[DatabaseRepository]): repository config. max_docs_per_segment (long): max document number per segment. """ # pylint: disable=too-many-arguments def __init__(self, collection_name, index_column_params, forward_column_names=None, repository_config=None, max_docs_per_segment=0): """ Constructor. Args: collection_name (str): collection name. index_column_params (List[IndexColumnParam]): index column params. forward_column_names (Optional[List[str]]): forward columns. repository_config (Optional[DatabaseRepository]): repository config. max_docs_per_segment (Optional[long]): max document number per segment. 0 means infinity. """ # collection name. self.collection_name = collection_name # index column list. self.index_column_params = index_column_params # max document number per segment. self.max_docs_per_segment = max_docs_per_segment # forward column list self.forward_column_names = _default_if_none(forward_column_names, []) # repository_config self.repository_config = repository_config def to_pb(self): """Return corresponding protobuf message.""" collection = proxima_be_pb2.CollectionConfig() collection.collection_name = self.collection_name collection.max_docs_per_segment = self.max_docs_per_segment collection.forward_column_names.extend(self.forward_column_names) collection.index_column_params.extend( column.to_pb() for column in self.index_column_params) if self.repository_config is not None: collection.repository_config.CopyFrom(self.repository_config.to_pb()) return collection @staticmethod def from_pb(pb_collection_config): """Parse from corresponding protobuf type.""" repository_config = _parse_repository_from_pb(pb_collection_config) index_column_params = [ IndexColumnParam.from_pb(column) for column in pb_collection_config.index_column_params ] # pylint: disable=unnecessary-comprehension forward_column_names = [ f for f in pb_collection_config.forward_column_names ] return CollectionConfig(collection_name=pb_collection_config.collection_name, index_column_params=index_column_params, max_docs_per_segment=pb_collection_config.max_docs_per_segment, repository_config=repository_config, forward_column_names=forward_column_names) class CollectionInfo(_Printable): """ Collection information. Attributes: collection_config (CollectionConfig): collection config. status (CollectionInfo.Status): Status enum uuid (Optional[str]): collection uuid latest_lsn_context (Optional[LsnContext]): lsn context magic_number (Optional[long]): magic number """ class Status(IntEnum): """Collection Status""" INITIALIZED = 0 SERVING = 1 DROPPED = 2 # pylint: disable=too-many-arguments def __init__(self, collection_config, status, uuid=None, latest_lsn_context=None, magic_number=None): """ Constructor. Args: collection_config (CollectionConfig): collection config. status (Optional[CollectionInfo.Status, int, str]): Status enum int or str uuid (Optional[str]): collection uuid latest_lsn_context (Optional[LsnContext]): lsn context magic_number (Optional[long]): magic number """ self.collection_config = collection_config self.status = _parse_enum_value_or_string( CollectionInfo.Status, proxima_be_pb2.CollectionInfo.CollectionStatus, status, 'CS_') self.uuid = uuid self.latest_lsn_context = latest_lsn_context self.magic_number = magic_number @staticmethod def from_pb(pb_collection_info): """Parse from corresponding protobuf type.""" collection_config = CollectionConfig.from_pb(pb_collection_info.config) latest_lsn_context = LsnContext( pb_collection_info.latest_lsn_context.lsn, pb_collection_info.latest_lsn_context.context) return CollectionInfo(collection_config, pb_collection_info.status, pb_collection_info.uuid, latest_lsn_context, pb_collection_info.magic_number) class WriteRequest(_Printable): class IndexColumnMeta(_Printable): """ Index column meta. Attributes: name (str): column name data_type (DataType): DataType enum dimension (int): vector dimension """ def __init__(self, name, data_type, dimension): """ Constructor. Args: name (str): column name data_type (Union[DataType, int, str]): DataType enum, enum value or str dimension (int): vector dimension """ self.name = name self.data_type = _parse_enum_value_or_string(DataType, common_pb2.DataType, data_type, 'DT_') self.dimension = dimension class RowMeta(_Printable): """ Row meta data. Attributes: index_column_metas (List[IndexColumnMeta]): index column metas forward_column_names (List[str]): forward column names forward_column_types (List[DataType]): forward column types """ def __init__(self, index_column_metas, forward_column_names=None, forward_column_types=None): """ Constructor. Args: index_column_metas (List[IndexColumnMeta]): index column metas forward_column_names (Optional[List[str]]): forward column names forward_column_types (Optional[List[DataType]]): forward column types """ self.index_column_metas = index_column_metas self.forward_column_names = _default_if_none(forward_column_names, []) self.forward_column_types = [ _parse_enum_value_or_string(DataType, common_pb2.DataType, column_type, 'DT_') for column_type in _default_if_none(forward_column_types, []) ] self._valid_check() def to_pb(self): """Return corresponding protobuf message.""" row_meta = proxima_be_pb2.WriteRequest.RowMeta() row_meta.forward_column_names.extend(self.forward_column_names) for m in self.index_column_metas: index_meta = row_meta.index_column_metas.add() index_meta.data_type = m.data_type.value index_meta.dimension = m.dimension index_meta.column_name = m.name return row_meta def _valid_check(self): forward_names_len = len(self.forward_column_names) forward_types_len = len(self.forward_column_types) if forward_names_len != forward_types_len: raise ProximaBeException( f"Mismatched forward names with types, forward_names_len={forward_names_len}, " f"forward_types_len={forward_types_len}") if len(self.index_column_metas) < 1: raise ProximaBeException("Expect at least one index column, got zero") class OperationType(IntEnum): INSERT = 0 UPDATE = 1 DELETE = 2 class Row(_Printable): """ Row Attributes: primary_key (long): primary key operation_type (OperationType): OperationType enum index_column_values (List[Union[str, bytes, List[Union[float, int, ...]]]]): index column values. Should contain the same number as RowMeta. forward_column_values (Optional[List[Any]]): forward column values. Should contain the same number and type as RowMeta. lsn_context (Optional[LsnContext]): lsn context """ # pylint: disable=too-many-arguments def __init__(self, primary_key, operation_type, index_column_values=None, forward_column_values=None, lsn_context=None): """ Constructor. Args: primary_key (long): primary key operation_type (Union[OperationType, int, str]): OperationType enum, enum value or str index_column_values (Optional[List[Union[str, bytes, List[Union[float, int, ...]]]]]): index column values. Should contain the same number as RowMeta. Not required if operation_type is DELETE. forward_column_values (Optional[List[Any]]): forward column values. Should contain the same number and type as RowMeta. lsn_context (Optional[LsnContext]): lsn context Examples: >>> # only primary_key is required for delete request >>> row = WriteRequest.Row(primary_key=1, operation_type=WriteRequest.OperationType.DELETE) >>> # index column value can take bytes, str(in the format of json array) or vector list >>> # 1. vector list >>> row = WriteRequest.Row(primary_key=1, operation_type=WriteRequest.OperationType.INSERT, ... index_column_values=[[1.0, 2.0, 3.0]]) >>> # 2. bytes in the format of binary representation in little endian >>> row = WriteRequest.Row(primary_key=1, operation_type=WriteRequest.OperationType.INSERT, ... index_column_values=[struct.pack('<3f', 1.0, 2.0, 3.0)]) >>> # 3. str in the format of json array >>> row = WriteRequest.Row(primary_key=1, operation_type=WriteRequest.OperationType.INSERT, ... index_column_values=['[1.0, 2.0, 3.0]']) """ self.primary_key = primary_key self.operation_type = _parse_enum_value_or_string( WriteRequest.OperationType, common_pb2.OperationType, operation_type, 'OP_') self.index_column_values = _default_if_none(index_column_values, []) self.forward_column_values = _default_if_none(forward_column_values, []) self.lsn_context = lsn_context self._valid_check() def _valid_check(self): if self.operation_type != WriteRequest.OperationType.DELETE and not self.index_column_values: raise ProximaBeException("Insert/Update request require index_column_values set") # pylint: disable=too-many-arguments def __init__(self, collection_name, rows, row_meta=None, request_id=None, magic_number=None): """ Constructor Args: collection_name (str): collection name row_meta (Optional[RowMeta]): row meta Not required if all operation_type of rows is DELETE rows (List[Rows]): rows request_id (Optional[str]): request id magic_number (Optional[long]): magic number """ self._collection_name = collection_name self._request_id = request_id self._magic_number = magic_number self._row_meta = row_meta self._rows = rows self._valid_check() self._convert_vector_feature_to_bytes() def _valid_check(self): if not self._rows: raise ProximaBeException("Cannot write empty rows") for row in self._rows: row._valid_check() # NOQA # only allow empty row meta on delete requests if self._row_meta is None: all_delete = all(row.operation_type == WriteRequest.OperationType.DELETE for row in self._rows) if not all_delete: raise ProximaBeException("Insert/Update request require row_meta set") else: forward_names_len = len(self._row_meta.forward_column_names) forward_values_len = len(self._rows[0].forward_column_values) if forward_names_len != forward_values_len: raise ProximaBeException( f"Mismatched forward meta with value, forward_names_len={forward_names_len}, " f"forward_values_len={forward_values_len}" ) index_names_len = len(self._row_meta.index_column_metas) index_values_len = len(self._rows[0].index_column_values) if index_values_len != index_names_len: raise ProximaBeException( f"Mismatched index meta with value, index_names_len={index_names_len}, " f"index_values_len={index_values_len}") def _convert_vector_feature_to_bytes(self): for row in self._rows: for i, features in enumerate(row.index_column_values): if isinstance(features, list): index_meta = self._row_meta.index_column_metas[i] row.index_column_values[i] = _pack_feature(features, index_meta.data_type, index_meta.dimension) def to_pb(self): """Return corresponding protobuf message.""" pb = proxima_be_pb2.WriteRequest() pb.collection_name = self._collection_name if self._row_meta is not None: pb.row_meta.CopyFrom(self._row_meta.to_pb()) if self._request_id is not None: pb.request_id = self._request_id if self._magic_number is not None: pb.magic_number = self._magic_number for row in self._rows: pb_row = pb.rows.add() pb_row.primary_key = row.primary_key pb_row.operation_type = row.operation_type.value if self._row_meta is not None: pb_row.forward_column_values.values.extend( _generic_value(value, column_type) for value, column_type in zip( row.forward_column_values, self._row_meta.forward_column_types)) pb_row.index_column_values.values.extend( _index_value_to_generic_value(value) for value in row.index_column_values) if row.lsn_context is not None: pb_row.lsn_context.lsn = row.lsn_context.lsn pb_row.lsn_context.context = row.lsn_context.context return pb class Document(_Printable): """ Document Attributes: primary_key (long): primary key score (float): score, i.e. distance from query vector forward_column_values (dict): dict of forward column name and value """ def __init__(self, pb_doc=None, json_doc=None): """ Constructor. Args: pb_doc (proximase_pb2.Document): protobuf message json_doc (json): json message """ if pb_doc is not None: self.primary_key = pb_doc.primary_key self.score = pb_doc.score self.forward_column_values = { value.key: _parse_generic_value_from_pb(value.value) for value in pb_doc.forward_column_values } return self.primary_key = int(json_doc['primary_key']) self.score = json_doc['score'] self.forward_column_values = {} for forward in json_doc['forward_column_values']: key = forward['key'] pb_value = forward['value'] value = None if len(pb_value) == 1: type_key, value = next(iter(pb_value.items())) if type_key in ['int64_value', 'uint64_value']: value = int(value) elif type_key == 'bytes_value': value = base64.b64decode(value) self.forward_column_values[key] = value @staticmethod def from_pb(pb_doc): """Parse from corresponding protobuf type.""" return Document(pb_doc) @staticmethod def from_json(json_doc): """Parse from json.""" return Document(json_doc=json_doc) class QueryResponse(_Printable): """ Attributes: results (List[List[Document]]): query results. debug_info (str): debug information. latency_us (long): query latency. """ def __init__(self, pb_rsp=None, json_rsp=None): if pb_rsp is not None: self.results = [[Document(d) for d in r.documents] for r in pb_rsp.results] self.debug_info = pb_rsp.debug_info self.latency_us = pb_rsp.latency_us return self.debug_info = json_rsp['debug_info'] self.latency_us = int(json_rsp['latency_us']) self.results = [[Document.from_json(d) for d in r['documents']] for r in json_rsp['results']] @staticmethod def from_pb(pb_rsp): """Parse from corresponding protobuf type.""" return QueryResponse(pb_rsp) @staticmethod def from_json(json_rsp): """Parse from json.""" return QueryResponse(json_rsp=json_rsp) class CollectionStats(_Printable): """ Collection statistics. Attributes: collection_name(str) : collection name collection_path(str) : collection path total_doc_count(long) : total document count total_segment_count(long) : total segment count total_index_file_count(long) : total index file count total_index_file_size(long) : total index file size segment_stats(List[SegmentStats]) : segments statistics """ class SegmentState(IntEnum): CREATED = 0 WRITING = 1 DUMPING = 2 COMPACTING = 3 PERSIST = 4 class SegmentStats(_Printable): """ Segment statistics. Attributes: segment_id(int) : segment id state(SegmentState) : segment state doc_count(long) : document count index_file_count(long) : index file count index_file_size(long) : index file size min_doc_id(long) : minimum document id in current segment max_doc_id(long) : maximum document id in current segment min_primary_key(long) : minimum primary key in current segment max_primary_key(long) : maximum primary key in current segment min_timestamp(long) : minimum document timestamp in current segment max_timestamp(long) : maximum document timestamp in current segment min_lsn(long) : minimum log sequence number(lsn) in current segment max_lsn(long) : maximum log sequence number(lsn) in current segment segment_path(str) : segment path """ def __init__(self, pb): self.segment_id = pb.segment_id self.state = _parse_enum_value_or_string( CollectionStats.SegmentState, proxima_be_pb2.CollectionStats.SegmentStats.SegmentState, pb.state, 'SS_') self.doc_count = pb.doc_count self.index_file_count = pb.index_file_count self.index_file_size = pb.index_file_size self.min_doc_id = pb.min_doc_id self.max_doc_id = pb.max_doc_id self.min_primary_key = pb.min_primary_key self.max_primary_key = pb.max_primary_key self.min_timestamp = pb.min_timestamp self.max_timestamp = pb.max_timestamp self.min_lsn = pb.min_lsn self.max_lsn = pb.max_lsn self.segment_path = pb.segment_path @staticmethod def from_pb(pb): """Parse from corresponding protobuf type.""" return CollectionStats.SegmentStats(pb) def __init__(self, pb): self.collection_name = pb.collection_name self.collection_path = pb.collection_path self.total_doc_count = pb.total_doc_count self.total_segment_count = pb.total_segment_count self.total_index_file_count = pb.total_index_file_count self.total_index_file_size = pb.total_index_file_size self.segment_stats = [ CollectionStats.SegmentStats.from_pb(s) for s in pb.segment_stats ] @staticmethod def from_pb(pb): """Parse from corresponding protobuf type.""" return CollectionStats(pb) class LsnContext(_Printable): """ Log sequence number context. Usually optional. Currently used by database repository. Attributes: lsn (long): log sequence number context (str): context str. """ def __init__(self, lsn, context): """ Constructor Args: lsn (long): log sequence number context (str): context str. """ self.lsn = lsn self.context = context def _parse_enum_value_or_string(enum_type, pb_enum_type, value, pb_enum_prefix=''): """ Convert `value` to corresponding enum value. Args: enum_type: enum type. pb_enum_type: Protobuf enum type. value (int, str or enum_type): enum value Returns: enum type instance. Raises: ProximaBeException on invalid enum. """ try: if isinstance(value, str): assert pb_enum_type.Value(pb_enum_prefix + value) == enum_type[value].value return enum_type[value] if isinstance(value, enum_type): assert pb_enum_type.Name(value.value) == pb_enum_prefix + value.name return value assert pb_enum_type.Name(value) == pb_enum_prefix + enum_type(value).name return enum_type(value) except ValueError as e: raise ProximaBeException(str(e)) except AssertionError as e: raise ProximaBeException(f"Enum definition mismatch:{str(e)}") def _key_value_pair(key, value): """Return KeyValuePair""" pair = common_pb2.KeyValuePair() pair.key = key pair.value = value return pair def _build_get_document_request(collection_name, primary_key): req = proxima_be_pb2.GetDocumentRequest() req.collection_name = collection_name req.primary_key = primary_key return req _data_type_to_dimension = { DataType.VECTOR_BINARY32 : 32, DataType.VECTOR_BINARY64 : 64, } _data_type_to_format = { DataType.VECTOR_FP16: 'e', DataType.VECTOR_FP32: 'f', DataType.VECTOR_FP64: 'd', DataType.VECTOR_INT16: 'h', DataType.VECTOR_INT8: 'c', DataType.VECTOR_BINARY32: 'I', DataType.VECTOR_BINARY64: 'Q', } def _infer_dimension_and_batch_count(features, dimension, batch_count, data_type): inferred_dim = None inferred_batch = None if dimension is None or batch_count is None: if isinstance(features, list): inferred_dim = len(features[0]) * _data_type_to_dimension.get(data_type, 1) inferred_batch = len(features) if dimension is None: dimension = inferred_dim if batch_count is None: batch_count = inferred_batch if not dimension or not batch_count: raise ProximaBeException( f"Empty dimension[{dimension}] or batch_count[{batch_count}]") return dimension, batch_count def _pack_feature(feature, data_type, dimension): format_dimension = dimension // _data_type_to_dimension.get(data_type, 1) if data_type not in _data_type_to_format: raise ProximaBeException( f'not support auto pack feature type[{data_type}]') return struct.pack(f'<{format_dimension}{_data_type_to_format[data_type]}', *feature) def _build_features(features, data_type, dimension): if isinstance(features, bytes): return features if not isinstance(features, list): raise ProximaBeException( f"unsupported features type[{type(features)}]") bs = [] for feature in features: bs.append(_pack_feature(feature, data_type, dimension)) return b''.join(bs) # pylint: disable=too-many-arguments def _build_knn_query(collection_name, column_name, features, data_type=None, batch_count=None, dimension=None, topk=100, is_linear=False, radius=None, extra_params=None, debug=False): req = proxima_be_pb2.QueryRequest() req.query_type = proxima_be_pb2.QueryRequest.QueryType.QT_KNN req.collection_name = collection_name knn = req.knn_param knn.column_name = column_name knn.topk = topk if not features: raise ProximaBeException(f'Empty features:{features}') if isinstance(features, list) and not isinstance(features[0], list): # get list(list(...)) features = [features] # get data_type enum if data_type is None: if not isinstance(features, bytes): raise ProximaBeException(f'data_type should be set for non bytes features') else: data_type = _parse_enum_value_or_string(DataType, common_pb2.DataType, data_type, 'DT_') if not data_type.name.startswith('VECTOR'): raise ProximaBeException( f'Invalid data_type[{knn.data_type}], expect vector type') knn.data_type = data_type.value knn.dimension, knn.batch_count = _infer_dimension_and_batch_count( features, dimension, batch_count, knn.data_type) if isinstance(features, str): knn.matrix = features else: knn.features = _build_features(features, knn.data_type, knn.dimension) if radius is not None: knn.radius = radius knn.is_linear = is_linear if extra_params is not None: knn.extra_params.extend( _key_value_pair(key, value) for key, value in extra_params.items()) req.debug_mode = debug return req def _build_collection_name(collection_name): pb = proxima_be_pb2.CollectionName() pb.collection_name = collection_name return pb def _build_list_condition(repository_name): pb = proxima_be_pb2.ListCondition() if repository_name is not None: pb.repository_name = repository_name return pb def _generic_value(value, data_type): generic_value = common_pb2.GenericValue() type_to_attr = { DataType.BINARY: 'bytes_value', DataType.BOOL: 'bool_value', DataType.INT32: 'int32_value', DataType.INT64: 'int64_value', DataType.UINT32: 'uint32_value', DataType.UINT64: 'uint64_value', DataType.FLOAT: 'float_value', DataType.DOUBLE: 'double_value', DataType.STRING: 'string_value', } if data_type not in type_to_attr: raise ProximaBeException( f"Unsupported type[{type}], supported={type_to_attr.keys()}") setattr(generic_value, type_to_attr[data_type], value) return generic_value def _index_value_to_generic_value(value): if isinstance(value, str): return _generic_value(value, DataType.STRING) if isinstance(value, bytes): return _generic_value(value, DataType.BINARY) raise ProximaBeException( f'Index value only support str or bytes, got {type(value)}') def _parse_repository_from_pb(pb_collection): if not pb_collection.HasField('repository_config'): return None pb_repo = pb_collection.repository_config if pb_repo.repository_type == proxima_be_pb2.CollectionConfig.RepositoryConfig.RepositoryType.RT_DATABASE: return DatabaseRepository.from_pb(pb_repo) raise ProximaBeException( f'Unexpected repository type, repo=[{str(pb_repo)}]') def _parse_generic_value_from_pb(pb_generic_value): if not pb_generic_value.HasField('value_oneof'): return None field_name = pb_generic_value.WhichOneof('value_oneof') return getattr(pb_generic_value, field_name) def _default_if_none(value, default_value): return value if value is not None else default_value def _stringify(self): return f'{type(self).__name__}{vars(self)}' def _check_version(status, version): if not status.ok(): raise ProximaBeException(f'Get server version failed, status={status}') client_version = __version__.split('.', maxsplit=2)[:2] server_version = version.split('.', maxsplit=2)[:2] if client_version != server_version: raise ProximaBeException(f'Version mismatch, client_version={__version__}, server_version={version}') class _TimerStage(Enum): serialization = 1 rpc = 2 deserialization = 3 build_pb_obj = 4 build_py_obj = 5 total = 6 class _Timer(object): def __init__(self): self._start_time = time.perf_counter() self._starts_map = {} self.timer_report = {} def begin_stage(self, *names): now = time.perf_counter() for n in names: self._starts_map[n] = now def end_stage(self, *names, start_stage_name=None): now = time.perf_counter() for n in names: self.timer_report[n] = now - self._starts_map.get(n, self._start_time) if start_stage_name: self._starts_map[start_stage_name] = now @staticmethod def begin_stage_helper(timer, *names): if timer is not None: timer.begin_stage(*names) @staticmethod def end_stage_helper(timer, *names, start_stage_name=None): if timer is not None: timer.end_stage(*names, start_stage_name=start_stage_name) ================================================ FILE: sdk/python/pyproximabe/proto/__init__.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ================================================ FILE: sdk/python/requirements-dev.txt ================================================ -r requirements.txt sphinxcontrib-napoleon>=0.7 sphinx>=3.4 sphinx-rtd-theme yapf==0.30.0 ================================================ FILE: sdk/python/requirements.txt ================================================ requests>=2.4 grpcio>=1.22.0 grpcio-tools>=1.22.0 orjson>=3.4.0 ================================================ FILE: src/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Oct 2020 ## \brief Detail cmake build script ## include(../cmake/bazel.cmake) include(../cmake/option.cmake) cc_proto_library( NAME proxima_be_proto STATIC SRCS proto/*.proto PROTOROOT ./ ) # Retrieve version from git repository git_version(PROXIMA_BE_VERSION ${CMAKE_CURRENT_SOURCE_DIR}) # Add repository cc_directory(common) cc_directory(metrics) cc_directory(meta) cc_directory(index) cc_directory(query) cc_directory(agent) cc_directory(admin) cc_directory(server) cc_directory(repository) ================================================ FILE: src/admin/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Oct 2020 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) # proxima_be_admin library cc_library( NAME proxima_be_admin STATIC STRICT SRCS *.cc *.h LIBS proxima_be_agent proxima_be_query proxima_be_index proxima_be_meta proxima_be_common proxima_be_proto INCS . .. VERSION "${PROXIMA_BE_VERSION}" ) ================================================ FILE: src/admin/README.md ================================================ ================================================ FILE: src/admin/admin_agent.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #include "admin_agent.h" #include #include "admin/admin_proto_converter.h" #include "common/logger.h" namespace proxima { namespace be { namespace admin { /** * Proxima BE Admin module */ class AdminAgentImpl : public AdminAgent { public: //! Constructor explicit AdminAgentImpl(meta::MetaAgentPtr meta, agent::IndexAgentPtr index, query::QueryAgentPtr query) : meta_agent_(std::move(meta)), index_agent_(std::move(index)), query_agent_(std::move(query)) {} //! Destructor ~AdminAgentImpl() override = default; public: //! Init Meta Agent int init() override { LOG_INFO("AdminAgent initialize complete."); return 0; } //! Clean up object int cleanup() override { LOG_INFO("AdminAgent cleanup complete."); return 0; } //! Start background service int start() override { LOG_INFO("AdminAgent start complete."); return 0; } //! Stop background service int stop() override { LOG_INFO("AdminAgent stopped."); return 0; } //! Create collection int create_collection(const proto::CollectionConfig &request) override { meta::CollectionBase param; int code = AdminProtoConverter::PBToCollectionBase(request, ¶m); if (code != 0) { LOG_ERROR("Deserialize collection meta from pb failed."); return code; } meta::CollectionMetaPtr collection; code = meta_agent_->create_collection(param, &collection); if (code != 0) { LOG_ERROR("MetaAgent create collection failed. code[%d] what[%s]", code, ErrorCode::What(code)); return code; } code = index_agent_->create_collection(collection->name()); if (code == 0) { LOG_INFO("Create collection success. collection_config[%s]", request.ShortDebugString().c_str()); meta_agent_->enable_collection(collection->name(), collection->revision()); } else { meta_agent_->delete_collection(collection->name()); LOG_ERROR("IndexAgent create collection failed. code[%d] what[%s]", code, ErrorCode::What(code)); } return code; } //! Describe collection int describe_collection( const std::string &collection_name, proto::DescribeCollectionResponse *collection_info) override { auto collection = meta_agent_->get_collection(collection_name); if (!collection) { LOG_ERROR("Failed to describe collection. collection[%s]", collection_name.c_str()); return PROXIMA_BE_ERROR_CODE(InexistentCollection); } return fill_collection_info(collection, collection_info->mutable_collection()); } //! Delete collection int drop_collection(const std::string &collection_name) override { int code = index_agent_->drop_collection(collection_name); if (code != 0) { LOG_ERROR("IndexAgent delete collection failed. code[%d] what[%s]", code, ErrorCode::What(code)); return code; } // Continue to remove collection in meta code = meta_agent_->delete_collection(collection_name); if (code != 0) { LOG_ERROR("MetaAgent delete collection failed. code[%d] what[%s]", code, ErrorCode::What(code)); return code; } return code; } //! Retrieve collections int list_collections(const proto::ListCondition &condition, proto::ListCollectionsResponse *response) override { meta::CollectionMetaPtrList collections; int code = meta_agent_->list_collections(&collections); if (code != 0) { LOG_ERROR("Failed to list collections. code[%d] what[%s].", code, ErrorCode::What(code)); return code; } for (auto &collection : collections) { if (condition.repository_name().empty() || (condition.repository_name() == collection->repository_name())) { auto *pb_collection = response->add_collections(); int ret = fill_collection_info(collection, pb_collection); if (ret != 0) { return ret; } } } return 0; } int stats_collection(const std::string &collection_name, proto::StatsCollectionResponse *stats) override { index::CollectionStats collection_stats; int code = index_agent_->get_collection_stats(collection_name, &collection_stats); if (code != 0) { LOG_ERROR( "Failed to get collection stats, collection[%s] code[%d], " "what[%s].", collection_name.c_str(), code, ErrorCode::What(code)); return code; } AdminProtoConverter::CollectionStatsToPB(collection_stats, stats->mutable_collection_stats()); return 0; } int reload_meta() override { return meta_agent_->reload(); } int start_query_service() override { return query_agent_->start(); } int stop_query_service() override { return query_agent_->stop(); } int get_query_service_status() override { return query_agent_->is_running(); } private: //! only called in proxy write scenario int fill_lsn_context_and_magic_number( const std::string &collection_name, proto::CollectionInfo *collection_info) { collection_info->set_magic_number(index_agent_->get_magic_number()); std::string context; uint64_t lsn; int ret = index_agent_->get_latest_lsn(collection_name, &lsn, &context); if (ret != 0) { LOG_WARN("Get latest lsn failed. collection_name[%s] ret[%d]", collection_name.c_str(), ret); return ret; } auto *lsn_context = collection_info->mutable_latest_lsn_context(); lsn_context->set_lsn(lsn); lsn_context->set_context(std::move(context)); return 0; } //! fill protobuf collection info int fill_collection_info(const meta::CollectionMetaPtr &meta, proto::CollectionInfo *collection) { int ret = 0; AdminProtoConverter::CollectionMetaToPB(*meta, collection); if (meta->repository()) { ret = fill_lsn_context_and_magic_number(meta->name(), collection); } return ret; } private: //! Meta agent meta::MetaAgentPtr meta_agent_{nullptr}; //! Index Agent agent::IndexAgentPtr index_agent_{nullptr}; //! Query agent query::QueryAgentPtr query_agent_{nullptr}; }; AdminAgentPtr AdminAgent::Create(const meta::MetaAgentPtr &meta, const agent::IndexAgentPtr &agent, const query::QueryAgentPtr &query) { return std::make_shared(meta, agent, query); } } // namespace admin } // namespace be } // namespace proxima ================================================ FILE: src/admin/admin_agent.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #pragma once #include "agent/index_agent.h" #include "meta/meta_agent.h" #include "query/query_agent.h" namespace proxima { namespace be { namespace admin { class AdminAgent; //! Alias Pointer for AdminAgent using AdminAgentPtr = std::shared_ptr; /** * Proxima BE Admin module */ class AdminAgent { public: //! Create AdminAgent Object static AdminAgentPtr Create(const meta::MetaAgentPtr &meta, const agent::IndexAgentPtr &index, const query::QueryAgentPtr &query); public: //! Destructor virtual ~AdminAgent() = default; public: //! Init Meta Agent virtual int init() = 0; //! Clean up object virtual int cleanup() = 0; //! Start background service virtual int start() = 0; //! Stop background service virtual int stop() = 0; public: //! Create collection virtual int create_collection(const proto::CollectionConfig &request) = 0; //! Describe collection virtual int describe_collection( const std::string &collection_name, proto::DescribeCollectionResponse *collection_info) = 0; //! Drop collection virtual int drop_collection(const std::string &collection_name) = 0; //! Retrieve collections virtual int list_collections(const proto::ListCondition &condition, proto::ListCollectionsResponse *response) = 0; //! Retrieve collection stats virtual int stats_collection(const std::string &collection_name, proto::StatsCollectionResponse *stats) = 0; //! Reload meta from meta store virtual int reload_meta() = 0; //! Start query service virtual int start_query_service() = 0; //! Stop query service virtual int stop_query_service() = 0; //! Get query service status virtual int get_query_service_status() = 0; }; } // namespace admin } // namespace be } // namespace proxima ================================================ FILE: src/admin/admin_proto_converter.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Jiliang.ljl * \date Mar 2021 * \brief * \detail */ #include "admin_proto_converter.h" #include "common/types_helper.h" namespace proxima { namespace be { namespace admin { namespace { //! Status Code Book struct StatusCodeBook { //! Convert C++ CollectionStatus to protobuf CollectionStatus static proto::CollectionInfo::CollectionStatus Get( meta::CollectionStatus status) { switch (status) { case meta::CollectionStatus::INITIALIZED: return proto::CollectionInfo_CollectionStatus_CS_INITIALIZED; case meta::CollectionStatus::SERVING: return proto::CollectionInfo_CollectionStatus_CS_SERVING; case meta::CollectionStatus::DROPPED: return proto::CollectionInfo_CollectionStatus_CS_DROPPED; } return proto::CollectionInfo_CollectionStatus_CS_INITIALIZED; } }; //! Index Type Codebook struct IndexTypeCodeBook { //! convert protobuf IndexType to C++ IndexTypes static IndexTypes Get(be::proto::IndexType type) { switch (type) { case be::proto::IT_PROXIMA_GRAPH_INDEX: return IndexTypes::PROXIMA_GRAPH_INDEX; default: break; } return IndexTypes::UNDEFINED; } //! Convert C++ IndexTypes to protobuf IndexType static be::proto::IndexType Get(IndexTypes type) { switch (type) { case IndexTypes::PROXIMA_GRAPH_INDEX: return be::proto::IT_PROXIMA_GRAPH_INDEX; default: break; } return be::proto::IT_UNDEFINED; } }; } // namespace void AdminProtoConverter::PBToColumnMeta( const proto::CollectionConfig::IndexColumnParam *request, meta::ColumnMeta *column) { column->set_name(request->column_name()); column->set_index_type(IndexTypeCodeBook::Get(request->index_type())); column->set_data_type(DataTypeCodeBook::Get(request->data_type())); IndexParamsHelper::SerializeToParams(request->extra_params(), column->mutable_parameters()); column->set_dimension(request->dimension()); } int AdminProtoConverter::PBToCollectionBase( const proto::CollectionConfig &request, meta::CollectionBase *param) { param->mutable_name()->assign(request.collection_name()); if (request.has_repository_config()) { const auto &repo_config = request.repository_config(); switch (repo_config.repository_type()) { case proto:: CollectionConfig_RepositoryConfig_RepositoryType_RT_DATABASE: { auto &database = repo_config.database(); auto db_repo = std::make_shared(); db_repo->set_connection(database.connection_uri()); db_repo->set_table_name(database.table_name()); db_repo->set_password(database.password()); db_repo->set_user(database.user()); db_repo->set_name(repo_config.repository_name()); db_repo->set_type(meta::RepositoryTypes::DATABASE); param->set_repository(db_repo); break; } default: LOG_ERROR("Invalid repository type. repository_type[%d] collection[%s]", static_cast(repo_config.repository_type()), request.collection_name().c_str()); return PROXIMA_BE_ERROR_CODE(InvalidRepositoryType); } } // Should we recommend some of default value for users param->set_max_docs_per_segment(request.max_docs_per_segment()); // Serialize forward_columns param->mutable_forward_columns()->insert( param->forward_columns().begin(), request.forward_column_names().begin(), request.forward_column_names().end()); int columns = request.index_column_params_size(); while (columns--) { auto column = std::make_shared(); PBToColumnMeta(&request.index_column_params(columns), column.get()); param->append(std::move(column)); } return 0; } void AdminProtoConverter::ColumnMetaToPB( const meta::ColumnMetaPtr &column, proto::CollectionConfig::IndexColumnParam *param) { param->set_column_name(column->name()); param->set_index_type(IndexTypeCodeBook::Get(column->index_type())); param->set_data_type(DataTypeCodeBook::Get(column->data_type())); be::IndexParamsHelper::SerializeToPB(column->parameters(), param->mutable_extra_params()); param->set_dimension(column->dimension()); } void AdminProtoConverter::RepositoryToPB( std::shared_ptr repo, proto::CollectionConfig *config) { if (!repo) { return; } auto *repo_config = config->mutable_repository_config(); repo_config->set_repository_name(repo->name()); switch (repo->type()) { case meta::RepositoryTypes::DATABASE: { auto db_repo = std::dynamic_pointer_cast(repo); if (!db_repo) { LOG_ERROR("Mismatched repository. type[%d] name[%s]", static_cast(repo->type()), repo->name().c_str()); return; } repo_config->set_repository_type( proto::CollectionConfig_RepositoryConfig_RepositoryType_RT_DATABASE); auto *db = repo_config->mutable_database(); db->set_connection_uri(db_repo->connection()); db->set_table_name(db_repo->table_name()); db->set_user(db_repo->user()); db->set_password(db_repo->password()); break; } default: LOG_FATAL("Unexpected repository type. type[%d]", static_cast(repo->type())); } } void AdminProtoConverter::CollectionMetaToPB( const meta::CollectionMeta &collection, proto::CollectionInfo *info) { info->set_status(StatusCodeBook::Get(collection.status())); info->set_uuid(collection.uid()); auto *config = info->mutable_config(); config->set_collection_name(collection.name()); config->set_max_docs_per_segment(collection.max_docs_per_segment()); for (auto &forward : collection.forward_columns()) { config->add_forward_column_names(forward); } for (auto &column : collection.index_columns()) { auto *column_meta = config->add_index_column_params(); ColumnMetaToPB(column, column_meta); } RepositoryToPB(collection.repository(), config); } #define SET_STATS_FIELD(name) pb_stats->set_##name(stats.name) void AdminProtoConverter::SegmentStatsToPB( const index::SegmentStats &stats, proto::CollectionStats::SegmentStats *pb_stats) { SET_STATS_FIELD(segment_id); SET_STATS_FIELD(doc_count); SET_STATS_FIELD(index_file_count); SET_STATS_FIELD(index_file_size); SET_STATS_FIELD(min_doc_id); SET_STATS_FIELD(max_doc_id); SET_STATS_FIELD(min_primary_key); SET_STATS_FIELD(max_primary_key); SET_STATS_FIELD(min_timestamp); SET_STATS_FIELD(max_timestamp); SET_STATS_FIELD(min_lsn); SET_STATS_FIELD(max_lsn); pb_stats->set_state( static_cast( stats.state)); } void AdminProtoConverter::CollectionStatsToPB( const index::CollectionStats &stats, proto::CollectionStats *pb_stats) { SET_STATS_FIELD(collection_name); SET_STATS_FIELD(collection_path); SET_STATS_FIELD(total_doc_count); SET_STATS_FIELD(total_segment_count); SET_STATS_FIELD(total_index_file_count); SET_STATS_FIELD(total_index_file_size); for (const auto &segment : stats.segment_stats) { SegmentStatsToPB(segment, pb_stats->add_segment_stats()); } } #undef SET_STATS_FIELD } // namespace admin } // namespace be } // namespace proxima ================================================ FILE: src/admin/admin_proto_converter.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Jiliang.ljl * \date Mar 2021 * \brief * \detail */ #pragma once #include "index/collection_stats.h" #include "meta/meta.h" #include "proto/proxima_be.pb.h" namespace proxima { namespace be { namespace admin { class AdminProtoConverter { public: //! Helper function for serialize PB to CollectionMeta static int PBToCollectionBase(const proto::CollectionConfig &request, meta::CollectionBase *param); //! Convert CollectionMeta to PB static void CollectionMetaToPB(const meta::CollectionMeta &collection, proto::CollectionInfo *info); //! Convert CollectionStats to PB static void CollectionStatsToPB(const index::CollectionStats &stats, proto::CollectionStats *pb_stats); private: //! Convert SegmentStats to PB static void SegmentStatsToPB(const index::SegmentStats &stats, proto::CollectionStats::SegmentStats *pb_stats); //! Convert Repository to PB static void RepositoryToPB(std::shared_ptr repo, proto::CollectionConfig *config); //! Convert ColumnMeta to PB static void ColumnMetaToPB(const meta::ColumnMetaPtr &column, proto::CollectionConfig::IndexColumnParam *param); //! Helper function for serializing PB to IndexColumnParam static void PBToColumnMeta( const proto::CollectionConfig::IndexColumnParam *request, meta::ColumnMeta *column); }; } // namespace admin } // namespace be } // namespace proxima ================================================ FILE: src/agent/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Oct 2020 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) # proxima_be_agent library cc_library( NAME proxima_be_agent STATIC STRICT SRCS *.cc *.h LIBS proxima_be_index proxima_be_meta proxima_be_common INCS . .. VERSION "${PROXIMA_BE_VERSION}" ) ================================================ FILE: src/agent/collection_counter.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Dec 2020 * \brief Collection counter interface definition for proxima search engine */ #pragma once #include #include #include #include namespace proxima { namespace be { namespace agent { class CollectionCounter; class CollectionCounterMap; using CollectionCounterPtr = std::shared_ptr; using CollectionCounterMapPtr = std::shared_ptr; /*! CollectionCounter */ class CollectionCounter { public: //! Constructor CollectionCounter() = default; //! Destructor ~CollectionCounter() = default; //! Add active count void add_active_count(uint32_t count) { active_count_.fetch_add(count); } //! Sub active count void sub_active_count(uint32_t count) { active_count_.fetch_sub(count); } //! Sub one active count void dec_active_count() { --active_count_; } //! Get active count uint32_t active_count() const { return active_count_.load(); } private: //! Collection active record count std::atomic active_count_{0U}; }; /*! CollectionCounterMap */ class CollectionCounterMap { public: //! Constructor CollectionCounterMap() = default; //! Destructor ~CollectionCounterMap() = default; //! Add collection counter void add_counter(const std::string &name) { CollectionCounterPtr counter = std::make_shared(); std::lock_guard lock(mutex_); counter_map_[name] = counter; } //! Remove collection counter void remove_counter(const std::string &name) { std::lock_guard lock(mutex_); counter_map_.erase(name); } //! Get collection counter CollectionCounterPtr get_counter(const std::string &name) { std::lock_guard lock(mutex_); auto it = counter_map_.find(name); if (it != counter_map_.end()) { return it->second; } return nullptr; } private: //! Mutex std::mutex mutex_{}; //! Collection counter map std::unordered_map counter_map_{}; }; } // end namespace agent } // namespace be } // end namespace proxima ================================================ FILE: src/agent/column_order.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Feb 2021 * \brief Columns order implements for proxima search engine */ #include "column_order.h" namespace proxima { namespace be { namespace agent { void ColumnOrder::init_column_order(const meta::CollectionMeta &meta) { auto &forward_columns = meta.forward_columns(); for (size_t i = 0; i < forward_columns.size(); i++) { forward_order_[forward_columns[i]] = i; } auto index_columns = meta.index_columns(); for (size_t i = 0; i < index_columns.size(); i++) { index_order_[index_columns[i]->name()] = i; } } void ColumnOrderMap::add_column_order(const meta::CollectionMeta &meta) { ColumnOrderPtr column_order = std::make_shared(); column_order->init_column_order(meta); auto &name = meta.name(); std::lock_guard lock(mutex_); column_order_map_[name] = column_order; } void ColumnOrderMap::update_column_order(const meta::CollectionMeta &meta) { ColumnOrderPtr column_order = std::make_shared(); column_order->init_column_order(meta); auto &name = meta.name(); std::lock_guard lock(mutex_); column_order_map_[name] = column_order; } void ColumnOrderMap::remove_column_order(const std::string &name) { std::lock_guard lock(mutex_); column_order_map_.erase(name); } ColumnOrderPtr ColumnOrderMap::get_column_order(const std::string &name) { std::lock_guard lock(mutex_); auto it = column_order_map_.find(name); if (it != column_order_map_.end()) { return it->second; } return nullptr; } } // end namespace agent } // namespace be } // end namespace proxima ================================================ FILE: src/agent/column_order.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Feb 2021 * \brief Columns order interface definition for proxima search engine */ #pragma once #include #include #include "meta/meta.h" namespace proxima { namespace be { namespace agent { class ColumnOrder; class ColumnOrderMap; using ColumnOrderPtr = std::shared_ptr; using ColumnOrderMapPtr = std::shared_ptr; /*! Columns order */ class ColumnOrder { public: //! Constructor ColumnOrder() = default; //! Destructor ~ColumnOrder() = default; //! Init columns order void init_column_order(const meta::CollectionMeta &meta); //! Get forward order const std::map &get_forward_order() const { return forward_order_; } //! Get index order const std::map &get_index_order() const { return index_order_; } protected: //! Init columns order void init_column_order_impl(const meta::CollectionMeta &meta); private: std::map forward_order_; std::map index_order_; }; /*! Columns order Map */ class ColumnOrderMap { public: //! Constructor ColumnOrderMap() = default; //! Destructor ~ColumnOrderMap() = default; //! Add columns order void add_column_order(const meta::CollectionMeta &meta); //! Update columns order void update_column_order(const meta::CollectionMeta &meta); //! Remove columns order void remove_column_order(const std::string &name); //! Get collection columns order ColumnOrderPtr get_column_order(const std::string &name); private: //! Mutex std::mutex mutex_{}; //! Columns order map std::map column_order_map_{}; }; } // end namespace agent } // namespace be } // end namespace proxima ================================================ FILE: src/agent/index_agent.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Oct 2020 * \brief IndexAgent service implementation for proxima search engine */ #include "index_agent.h" #include "common/config.h" namespace proxima { namespace be { namespace agent { IndexAgentPtr IndexAgent::Create(meta::MetaServicePtr meta_service) { return std::make_shared(meta_service); } IndexAgent::IndexAgent(meta::MetaServicePtr meta_service) : meta_service_(std::move(meta_service)) {} IndexAgent::~IndexAgent() {} int IndexAgent::create_collection(const std::string &collection_name) { // Add counter counter_map_->add_counter(collection_name); // Add column order auto schema = meta_service_->get_current_collection(collection_name); if (!schema) { LOG_ERROR("Get latest collection for meta service failed. collection[%s]", collection_name.c_str()); return ErrorCode_InexistentCollection; } column_order_map_->add_column_order(*schema); // Create collection int ret = index_service_->create_collection(collection_name, schema); if (ret != 0) { LOG_ERROR("Index service create collection failed. collection[%s]", collection_name.c_str()); return ret; } return 0; } int IndexAgent::update_collection(const std::string &collection_name, uint32_t revision) { // get collection's counter CollectionCounterPtr counter = counter_map_->get_counter(collection_name); if (!counter) { LOG_ERROR("Get collection counter failed. collection[%s]", collection_name.c_str()); return ErrorCode_RuntimeError; } // wait collection's all records to be processed while (true) { if (counter->active_count() == 0) { break; } std::this_thread::sleep_for(std::chrono::seconds(1)); } // get specified revision's collection meta auto collection = meta_service_->get_collection(collection_name, revision); if (!collection) { LOG_ERROR("Meta service update collection failed. collection[%s]", collection_name.c_str()); return ErrorCode_InexistentCollection; } column_order_map_->update_column_order(*collection); // update collection int ret = index_service_->update_collection(collection_name, collection); if (ret != 0) { LOG_ERROR("Index service update collection failed. collection[%s]", collection_name.c_str()); return ret; } return 0; } int IndexAgent::drop_collection(const std::string &collection_name) { int ret = index_service_->drop_collection(collection_name); if (ret != 0) { LOG_ERROR("Index service drop collection failed. collection[%s]", collection_name.c_str()); return ret; } counter_map_->remove_counter(collection_name); column_order_map_->remove_column_order(collection_name); return 0; } int IndexAgent::get_collection_stats( const std::string &name, index::CollectionStats *collection_stats) const { int ret = index_service_->get_collection_stats(name, collection_stats); if (ret != 0) { LOG_ERROR("Index service get collection stats failed. collection[%s]", name.c_str()); return ret; } return 0; } bool IndexAgent::is_collection_suspend(const std::string &collection) { meta::CollectionMetaPtr meta = meta_service_->get_current_collection(collection); if (!meta) { LOG_ERROR("Meta service get latest collection failed. collection[%s]", collection.c_str()); return false; } return !meta->writable(); } int IndexAgent::write(const WriteRequest &request) { // check request empty int row_count = request.row_count(); if (!row_count) { return 0; } // check if suspend const std::string &collection = request.collection_name(); if (is_collection_suspend(collection)) { return ErrorCode_SuspendedCollection; } // check magic number bool proxy_request = request.is_proxy_request(); if (proxy_request && agent_timestamp_ != request.magic_number()) { LOG_ERROR("Write request magic number mismatched."); return ErrorCode_MismatchedMagicNumber; } // acquire permits if (!rate_limiter_->try_acquire(row_count, acquire_timeout_)) { LOG_WARN("Acquire permits failed. count[%d] collection[%s]", row_count, collection.c_str()); return ErrorCode_ExceedRateLimit; } CollectionCounterPtr counter = counter_map_->get_counter(collection); if (!counter) { LOG_ERROR("Get collection counter failed. collection[%s]", collection.c_str()); return ErrorCode_InexistentCollection; } counter->add_active_count(row_count); // double check collection is suspended if (is_collection_suspend(collection)) { counter->sub_active_count(row_count); return ErrorCode_SuspendedCollection; } if (proxy_request) { return proxy_write(request, counter.get()); } else { return direct_write(request, counter.get()); } } int IndexAgent::get_latest_lsn(const std::string &collection_name, uint64_t *lsn, std::string *lsn_context) { int ret = index_service_->get_latest_lsn(collection_name, lsn, lsn_context); if (ret != 0) { LOG_ERROR("Index service get collection latest lsn failed. collection[%s]", collection_name.c_str()); return ret; } return 0; } int IndexAgent::init() { if (!meta_service_) { LOG_ERROR("Meta service is nullptr."); return ErrorCode_RuntimeError; } // init index service index_service_ = std::make_shared(); int ret = index_service_->init(); if (ret != 0) { LOG_ERROR("Init index service failed."); return ret; } // init rate limiter const Config &config = Config::Instance(); rate_limiter_ = ailego::RateLimiter::Create(config.get_index_max_build_qps()); if (!rate_limiter_) { LOG_ERROR("Create rate limiter failed."); return ErrorCode_RuntimeError; } // Set to default value acquire_timeout_ = 500; // init agent stat timestamp agent_timestamp_ = ailego::Monotime::MicroSeconds(); // create counter map counter_map_ = std::make_shared(); // create columns order map column_order_map_ = std::make_shared(); LOG_INFO("IndexAgent initialzie complete."); return 0; } int IndexAgent::cleanup() { if (index_service_) { index_service_->cleanup(); } LOG_INFO("IndexAgent cleanup complete."); return 0; } int IndexAgent::start() { // Start index service int ret = index_service_->start(); if (ret != 0) { LOG_ERROR("Start index service failed."); return ret; } ret = load_index_service(); if (ret != 0) { LOG_ERROR("Load index service failed."); return ret; } thread_pool_ = std::make_shared( Config::Instance().get_index_build_thread_count()); LOG_INFO("IndexAgent start complete."); return 0; } int IndexAgent::stop() { if (thread_pool_) { thread_pool_->stop(); } if (index_service_) { index_service_->stop(); } LOG_INFO("IndexAgent stopped."); return 0; } int IndexAgent::proxy_write(const WriteRequest &request, CollectionCounter *counter) { auto &collection = request.collection_name(); int dataset_count = (int)request.collection_dataset_count(); for (int i = 0; i < dataset_count; ++i) { auto &dataset = request.get_collection_dataset(i); thread_pool_->execute(dataset->get(0).primary_key, this, &IndexAgent::write_dataset, collection, dataset, counter); } return 0; } int IndexAgent::direct_write(const WriteRequest &request, CollectionCounter *counter) { auto &collection = request.collection_name(); int row_count = request.row_count(); auto &dataset = request.get_collection_dataset(0); int ret = index_service_->write_records(collection, dataset); if (ret != 0) { counter->sub_active_count(row_count); LOG_ERROR("Index service write records failed. collection[%s]", collection.c_str()); return ret; } counter->sub_active_count(row_count); return 0; } void IndexAgent::write_dataset(const std::string &collection_name, const index::CollectionDatasetPtr &record, CollectionCounter *counter) { int ret = index_service_->write_records(collection_name, record); if (ret != 0) { LOG_ERROR( "Index service write record failed. " "code[%d] reason[%s] collection[%s]", ret, ErrorCode::What(ret), collection_name.c_str()); } counter->dec_active_count(); } int IndexAgent::load_index_service() { // 1.Get all valid collection schemas meta::CollectionMetaPtrList schemas; int ret = meta_service_->get_latest_collections(&schemas); if (ret != 0) { LOG_ERROR("Meta service get latest collections failed."); return ret; } // 2.Get all valid collection names, and create all collections columns order std::vector collection_names; for (auto &schema : schemas) { collection_names.emplace_back(schema->name()); column_order_map_->add_column_order(*schema); } // 3.Create all collections counter for (auto &collection_name : collection_names) { counter_map_->add_counter(collection_name); } // 4.Load index service ret = index_service_->load_collections(collection_names, schemas); if (ret != 0) { LOG_ERROR("Index service load collections failed."); return ret; } return 0; } } // end namespace agent } // namespace be } // end namespace proxima ================================================ FILE: src/agent/index_agent.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Oct 2020 * \brief Index agent interface definition for proxima search engine */ #pragma once #include #include #include "index/index_service.h" #include "meta/meta_service.h" #include "collection_counter.h" #include "column_order.h" #include "write_request.h" namespace proxima { namespace be { namespace agent { class IndexAgent; using IndexAgentPtr = std::shared_ptr; /*! Index Agent */ class IndexAgent { public: //! Create index agent static IndexAgentPtr Create(meta::MetaServicePtr meta_service); //! Constructor IndexAgent(meta::MetaServicePtr meta_service); //! Destructor ~IndexAgent(); //! Create collection with schema int create_collection(const std::string &collection_name); //! Update collection schema int update_collection(const std::string &collection_name, uint32_t revision); //! Drop collection by name int drop_collection(const std::string &collection_name); //! Get collection statstics int get_collection_stats(const std::string &collection_name, index::CollectionStats *collection_stats) const; //! Write records int write(const WriteRequest &request); // Get latest lsn int get_latest_lsn(const std::string &collection_name, uint64_t *lsn, std::string *lsn_context); //! Get Index Service const index::IndexServicePtr &get_service() const { return index_service_; } //! Get magic number uint64_t get_magic_number() const { return agent_timestamp_; } //! Get collection column order ColumnOrderPtr get_column_order(const std::string &collection_name) const { return column_order_map_->get_column_order(collection_name); } //! Get collection meta meta::CollectionMetaPtr get_collection_meta( const std::string &collection_name) const { return meta_service_->get_current_collection(collection_name); } public: //! Init index agent int init(); //! Cleanup index agent int cleanup(); //! Start index agent int start(); //! Stop index agent int stop(); private: //! Load index service int load_index_service(); //! Is Index Agent Suspended bool is_collection_suspend(const std::string &collection); //! Proxy write int proxy_write(const WriteRequest &request, CollectionCounter *counter); //! Direct write int direct_write(const WriteRequest &request, CollectionCounter *counter); //! Write the CollectionDataset to index service void write_dataset(const std::string &collection_name, const index::CollectionDatasetPtr &records, CollectionCounter *counter); private: IndexAgent(const IndexAgent &) = delete; IndexAgent &operator=(const IndexAgent &) = delete; private: //! Agent start timestamp uint64_t agent_timestamp_{0}; //! Request acquire timeout ms int32_t acquire_timeout_{0}; //! Meta service pointer meta::MetaServicePtr meta_service_{}; //! Index service pointer index::IndexServicePtr index_service_{}; //! Rate limiter ptr ailego::RateLimiter::Pointer rate_limiter_{}; //! Work thread queue std::shared_ptr thread_pool_{}; //! Collection counter map CollectionCounterMapPtr counter_map_{}; //! Collection columns order map ColumnOrderMapPtr column_order_map_{}; }; } // end namespace agent } // namespace be } // end namespace proxima ================================================ FILE: src/agent/write_request.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Feb 2021 * \brief Write request interface definition for proxima search engine */ #pragma once #include "index/collection_dataset.h" namespace proxima { namespace be { namespace agent { class WriteRequest; using WriteRequestPtr = std::shared_ptr; /*! Write Request */ class WriteRequest { public: //! Request type enum class RequestType : uint32_t { PROXY = 0, DIRECT = 1 }; //! Constructor WriteRequest() = default; //! Destructor ~WriteRequest() = default; public: //! Set request type void set_request_type(RequestType type) { request_type_ = type; } //! Get request type RequestType request_type() const { return request_type_; } // Is proxy request bool is_proxy_request() const { return request_type_ == RequestType::PROXY; } //! Set magic number void set_magic_number(uint64_t number) { magic_number_ = number; } //! Get magic number uint64_t magic_number() const { return magic_number_; } //! Set collection name void set_collection_name(const std::string &collection) { collection_name_ = collection; } //! Get collection name const std::string &collection_name() const { return collection_name_; } //! Add collection dataset void add_collection_dataset(index::CollectionDatasetPtr dataset) { row_count_ += dataset->size(); records_.emplace_back(std::move(dataset)); } //! Get collection dataset const index::CollectionDatasetPtr &get_collection_dataset( size_t index) const { return records_[index]; } //! Get all collection dataset const std::vector &get_collection_dataset() const { return records_; } //! Get collection dataset count size_t collection_dataset_count() const { return records_.size(); } //! Get rows count size_t row_count() const { return row_count_; } private: //! Members RequestType request_type_{RequestType::PROXY}; size_t row_count_{0}; uint64_t magic_number_{0}; std::string collection_name_{}; std::vector records_{}; }; } // end namespace agent } // namespace be } // end namespace proxima ================================================ FILE: src/common/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Oct 2020 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) # proxima_be_common library cc_library( NAME proxima_be_common STATIC STRICT ALWAYS_LINK SRCS *.cc LIBS proxima_be_proto proxima glog INCS . .. VERSION "${PROXIMA_BE_VERSION}" ) ================================================ FILE: src/common/auto_counter.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date March 2021 * \brief RAII type atomic counter */ #include namespace proxima { namespace be { /* * AutoCounter is a simple RAII type atomic counter */ struct AutoCounter { AutoCounter(std::atomic &ctr) : counter_(ctr) { counter_++; } ~AutoCounter() { counter_--; } std::atomic &counter_; }; } // namespace be } // end namespace proxima ================================================ FILE: src/common/config.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Implementation of Config */ #include "config.h" #include #include #include #include #include "common/logger.h" #include "error_code.h" namespace proxima { namespace be { int Config::load_config(const std::string &file_name) { ailego::File file; if (!file.open(file_name.c_str(), true, false)) { LOG_ERROR("Open file %s failed, maybe file not exist.", file_name.c_str()); return ErrorCode_LoadConfig; } std::string file_content; file_content.resize(file.size()); size_t read_size = file.read(&(file_content[0]), file.size()); if (read_size != file.size()) { LOG_ERROR("File %s read error, expected size: %zu, actual size: %zu.", file_name.c_str(), file.size(), read_size); return ErrorCode_LoadConfig; } bool ret = google::protobuf::TextFormat::ParseFromString(file_content, &config_); if (!ret) { LOG_ERROR("Parse file %s content %s failed.", file_name.c_str(), file_content.c_str()); return ErrorCode_LoadConfig; } config_file_ = file_name; LOG_INFO( "Load config complete. protocol[%s] grpc_listen_port[%u] " "http_listen_port[%u] log_directory[%s] log_file[%s] log_level[%u] " "build_thread_count[%u] dump_thread_count[%u] " "max_build_qps[%u] index_directory[%s] " "flush_internal[%u] optimize_internal[%u] meta_uri[%s] " "query_thread_count[%u]", this->get_protocol().c_str(), this->get_grpc_listen_port(), this->get_http_listen_port(), this->get_log_dir().c_str(), this->get_log_file().c_str(), this->get_log_level() + 1, this->get_index_build_thread_count(), this->get_index_dump_thread_count(), this->get_index_max_build_qps(), this->get_index_directory().c_str(), this->get_index_flush_internal(), this->get_index_optimize_internal(), this->get_meta_uri().c_str(), this->get_query_thread_count()); return 0; } int Config::cleanup() { config_.Clear(); return 0; } bool Config::validate_config() const { /** ========== valid Common Config========= **/ std::string protocol = this->get_protocol(); std::vector prots; ailego::StringHelper::Split(protocol, '|', &prots); auto it = std::find_if(prots.begin(), prots.end(), [](const std::string &str) { return (str == "grpc") || (str == "http"); }); if (it == prots.end()) { LOG_ERROR( "Config error, protocol must contains grpc or http at least. " "protocol[%s]", protocol.c_str()); return false; } if (this->get_grpc_listen_port() > 65535) { LOG_ERROR("Config error, grpc_listen_port must be [0, 65535]. port[%u]", this->get_grpc_listen_port()); return false; } if (this->get_http_listen_port() > 65535) { LOG_ERROR("Config error, http_listen_port must be [0, 65535]. port[%u]", this->get_http_listen_port()); return false; } if (this->get_logger_type() != "ConsoleLogger" && this->get_logger_type() != "AppendLogger" && this->get_logger_type() != "SysLogger") { LOG_ERROR("Config error, unknown logger type. logger[%s]", this->get_logger_type().c_str()); return false; } /** ========== valid Index Config========= **/ if (this->get_index_build_thread_count() > 500) { LOG_ERROR( "Config error, build_thread_count must be [1, 500]. thread_count[%u]", this->get_index_build_thread_count()); return false; } if (this->get_index_dump_thread_count() > 500) { LOG_ERROR( "Config error, dump_thread_count must be [2, 500]. thread_count[%u]", this->get_index_dump_thread_count()); return false; } /** ========== valid Query Config========= **/ if (this->get_query_thread_count() > 500) { LOG_ERROR( "Config error, query_thread_count must be [1, 500]. thread_count[%u]", this->get_query_thread_count()); return false; } /** ========== valid Meta Config========= **/ return true; } std::string Config::get_protocol() const { std::string protocol = "grpc|http"; if (config_.has_common_config() && !config_.common_config().protocol().empty()) { protocol = config_.common_config().protocol(); } return protocol; } uint32_t Config::get_grpc_listen_port() const { uint32_t listen_port = 16000; if (config_.has_common_config() && config_.common_config().grpc_listen_port() != 0U) { listen_port = config_.common_config().grpc_listen_port(); } return listen_port; } uint32_t Config::get_http_listen_port() const { uint32_t listen_port = 16001; if (config_.has_common_config() && config_.common_config().http_listen_port() != 0U) { listen_port = config_.common_config().http_listen_port(); } return listen_port; } std::string Config::get_log_dir() const { std::string log_dir; ailego::FileHelper::GetWorkingDirectory(&log_dir); log_dir.append("/log/"); if (config_.has_common_config() && !config_.common_config().log_directory().empty()) { log_dir = config_.common_config().log_directory(); } return log_dir; } std::string Config::get_log_file() const { std::string log_file = "proxima_be.log"; if (config_.has_common_config() && !config_.common_config().log_file().empty()) { log_file = config_.common_config().log_file(); } return log_file; } uint32_t Config::get_log_level() const { uint32_t actual_log_level = 2; if (config_.has_common_config()) { uint32_t input_log_level = config_.common_config().log_level(); if (input_log_level < 1 || input_log_level > 5) { actual_log_level = 1; } else { actual_log_level = input_log_level - 1; } } return actual_log_level; } std::string Config::get_logger_type() const { std::string logger_type = "AppendLogger"; if (!config_.common_config().logger_type().empty()) { logger_type = config_.common_config().logger_type(); } return logger_type; } uint32_t Config::get_index_build_thread_count(void) const { uint32_t thread_count = 10U; if (config_.has_index_config() && config_.index_config().build_thread_count() != 0) { thread_count = config_.index_config().build_thread_count(); } return thread_count; } uint32_t Config::get_index_dump_thread_count(void) const { uint32_t thread_count = 3U; if (config_.has_index_config() && config_.index_config().dump_thread_count() != 0) { thread_count = config_.index_config().dump_thread_count(); } return thread_count; } uint32_t Config::get_index_max_build_qps(void) const { uint32_t max_build_qps = 0; if (config_.has_index_config()) { max_build_qps = config_.index_config().max_build_qps(); } return max_build_qps; } std::string Config::get_index_directory(void) const { std::string index_directory; // Set default path to current binary path ailego::FileHelper::GetWorkingDirectory(&index_directory); if (config_.has_index_config() && !config_.index_config().index_directory().empty()) { index_directory = config_.index_config().index_directory(); } return index_directory; } uint32_t Config::get_index_flush_internal(void) const { uint32_t flush_internal = 300U; if (config_.has_index_config() && config_.index_config().flush_internal() != 0) { flush_internal = config_.index_config().flush_internal(); } return flush_internal; } uint32_t Config::get_index_optimize_internal(void) const { uint32_t optimize_internal = 0U; if (config_.has_index_config() && config_.index_config().optimize_internal() != 0) { optimize_internal = config_.index_config().optimize_internal(); } return optimize_internal; } std::string Config::get_meta_uri(void) const { if (config_.has_meta_config() && !config_.meta_config().meta_uri().empty()) { return config_.meta_config().meta_uri(); } std::string meta_uri = "sqlite://"; std::string work_directory; ailego::FileHelper::GetWorkingDirectory(&work_directory); meta_uri.append(work_directory); meta_uri.append("/proxima_be_meta.sqlite"); return meta_uri; } uint32_t Config::get_query_thread_count(void) const { /// Default set thread count to the number of cpu cores uint32_t thread_count = std::thread::hardware_concurrency(); if (config_.has_query_config() && config_.query_config().query_thread_count() != 0) { thread_count = config_.query_config().query_thread_count(); } return thread_count; } } // namespace be } // end namespace proxima ================================================ FILE: src/common/config.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Interface of Bilin Config */ #pragma once #include #include "proto/config.pb.h" #include "macro_define.h" namespace proxima { namespace be { /*! Config */ class Config : public ailego::Singleton { public: //! Load config from file int load_config(const std::string &file_name); //! Cleanup config options int cleanup(); //! Validate config bool validate_config() const; /** ============Common Config for ProximaSE============= **/ //! Get rpc protocol std::string get_protocol() const; //! Get grpc listen port uint32_t get_grpc_listen_port() const; //! Get http listen port uint32_t get_http_listen_port() const; //! Get log directory std::string get_log_dir() const; //! Get log file name std::string get_log_file() const; //! Get log print level [0~5] uint32_t get_log_level() const; //! Get logger type std::string get_logger_type() const; /** ============Index Config============= **/ //! Get index build thread count uint32_t get_index_build_thread_count(void) const; //! Get index dump thread count uint32_t get_index_dump_thread_count(void) const; //! Get index agent max build qps uint32_t get_index_max_build_qps(void) const; //! Get directory of index data std::string get_index_directory(void) const; //! Get flush internal seconds uint32_t get_index_flush_internal(void) const; //! Get optimize internal seconds uint32_t get_index_optimize_internal(void) const; /** ============Meta Config============= **/ std::string get_meta_uri(void) const; /** ============Query Config============= **/ //! Get query thread count uint32_t get_query_thread_count(void) const; //! Get metrics config const proto::MetricsConfig &metrics_config() const { return config_.common_config().metrics_config(); } private: //! Members std::string config_file_{}; proto::ProximaSEConfig config_{}; }; } // namespace be } // end namespace proxima ================================================ FILE: src/common/defer.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Nov 2020 * \brief Scope guard like golang defer */ #pragma once #include #include namespace proxima { namespace be { /* * RAII style scope guard to ensure release resource */ class Defer { public: using Func = std::function; Defer() = default; Defer(Func f) { funcs_.emplace_back(f); } Defer(const Defer &) = delete; Defer &operator=(const Defer &) = delete; ~Defer() { for (auto func : funcs_) { func(); } funcs_.clear(); } public: void operator()(Func f) { funcs_.emplace_back(f); } private: std::vector funcs_; }; } // namespace be } // end namespace proxima ================================================ FILE: src/common/error_code.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Implementation of Bilin Error */ #include "error_code.h" #include namespace proxima { namespace be { // 0~999 [Builtin] PROXIMA_BE_ERROR_CODE_DEFINE(Success, 0, "Success"); // 1000~1999 [Common Error] PROXIMA_BE_ERROR_CODE_DEFINE(RuntimeError, 1000, "Runtime Error"); PROXIMA_BE_ERROR_CODE_DEFINE(LogicError, 1001, "Logic Error"); PROXIMA_BE_ERROR_CODE_DEFINE(StatusError, 1002, "Status Error"); PROXIMA_BE_ERROR_CODE_DEFINE(LoadConfig, 1003, "Load Config Error"); PROXIMA_BE_ERROR_CODE_DEFINE(ConfigError, 1004, "Config Error"); PROXIMA_BE_ERROR_CODE_DEFINE(InvalidArgument, 1005, "Invalid Arugment"); PROXIMA_BE_ERROR_CODE_DEFINE(NotInitialized, 1006, "Not Initialized"); PROXIMA_BE_ERROR_CODE_DEFINE(OpenFile, 1007, "Open File Error"); PROXIMA_BE_ERROR_CODE_DEFINE(ReadData, 1008, "Read Data Error"); PROXIMA_BE_ERROR_CODE_DEFINE(WriteData, 1009, "Write Data Error"); PROXIMA_BE_ERROR_CODE_DEFINE(ExceedLimit, 1010, "Exceed Limit"); PROXIMA_BE_ERROR_CODE_DEFINE(SerializeError, 1011, "Serialize Error"); PROXIMA_BE_ERROR_CODE_DEFINE(DeserializeError, 1012, "Deserialize Error"); PROXIMA_BE_ERROR_CODE_DEFINE(StartServer, 1013, "Start Server Error"); PROXIMA_BE_ERROR_CODE_DEFINE(StoppedService, 1014, "Visit Stopped Service"); // 2000~2999 [Format Check] PROXIMA_BE_ERROR_CODE_DEFINE(EmptyCollectionName, 2000, "Empty Collection Name"); PROXIMA_BE_ERROR_CODE_DEFINE(EmptyColumnName, 2001, "Empty Column Name"); PROXIMA_BE_ERROR_CODE_DEFINE(EmptyColumns, 2002, "Empty Columns"); PROXIMA_BE_ERROR_CODE_DEFINE(EmptyRepositoryTable, 2003, "Empty Repository Table"); PROXIMA_BE_ERROR_CODE_DEFINE(EmptyRepositoryName, 2004, "Empty Repository Name"); PROXIMA_BE_ERROR_CODE_DEFINE(EmptyUserName, 2005, "Empty User Name"); PROXIMA_BE_ERROR_CODE_DEFINE(EmptyPassword, 2006, "Empty Password"); PROXIMA_BE_ERROR_CODE_DEFINE(InvalidURI, 2007, "Invalid URI"); PROXIMA_BE_ERROR_CODE_DEFINE(InvalidCollectionStatus, 2008, "Invalid Collection Status"); PROXIMA_BE_ERROR_CODE_DEFINE(InvalidRecord, 2009, "Invalid Record"); PROXIMA_BE_ERROR_CODE_DEFINE(InvalidQuery, 2010, "Invalid Query"); PROXIMA_BE_ERROR_CODE_DEFINE(InvalidIndexDataFormat, 2011, "Invalid Index Data Format"); PROXIMA_BE_ERROR_CODE_DEFINE(InvalidWriteRequest, 2012, "Invalid Write Request"); PROXIMA_BE_ERROR_CODE_DEFINE(InvalidVectorFormat, 2013, "Invalid Vector Format"); PROXIMA_BE_ERROR_CODE_DEFINE(InvalidRepositoryType, 2014, "Invalid Repository Type"); PROXIMA_BE_ERROR_CODE_DEFINE(InvalidDataType, 2015, "Invalid Data Type"); PROXIMA_BE_ERROR_CODE_DEFINE(InvalidIndexType, 2016, "Invalid Index Type"); PROXIMA_BE_ERROR_CODE_DEFINE(InvalidSegment, 2017, "Invalid Segment"); PROXIMA_BE_ERROR_CODE_DEFINE(InvalidRevision, 2018, "Invalid Revision"); PROXIMA_BE_ERROR_CODE_DEFINE(InvalidFeature, 2019, "Invalid Feature"); PROXIMA_BE_ERROR_CODE_DEFINE(MismatchedSchema, 2020, "Mismatched schema"); PROXIMA_BE_ERROR_CODE_DEFINE(MismatchedMagicNumber, 2021, "Mismatched Magic Number"); PROXIMA_BE_ERROR_CODE_DEFINE(MismatchedIndexColumn, 2022, "Mismatched Index Column"); PROXIMA_BE_ERROR_CODE_DEFINE(MismatchedDimension, 2023, "Mismatched Dimension"); PROXIMA_BE_ERROR_CODE_DEFINE(MismatchedDataType, 2024, "Mismatched Data Type"); // 3000~3999 [Meta] PROXIMA_BE_ERROR_CODE_DEFINE(UpdateStatusField, 3000, "Status Field Is Readonly"); PROXIMA_BE_ERROR_CODE_DEFINE(UpdateRevisionField, 3001, "Revision Field Is Readonly"); PROXIMA_BE_ERROR_CODE_DEFINE(UpdateCollectionUIDField, 3002, "CollectionUID Field Is Readonly"); PROXIMA_BE_ERROR_CODE_DEFINE(UpdateIndexTypeField, 3003, "IndexType Field Is Readonly"); PROXIMA_BE_ERROR_CODE_DEFINE(UpdateDataTypeField, 3004, "DataType Field Is Readonly"); PROXIMA_BE_ERROR_CODE_DEFINE(UpdateParametersField, 3005, "Parameters Filed Is Readonly"); PROXIMA_BE_ERROR_CODE_DEFINE(UpdateRepositoryTypeField, 3006, "RepositoryType Field Is Readonly"); PROXIMA_BE_ERROR_CODE_DEFINE(UpdateColumnNameField, 3007, "Update ColumnName Field Is Readonly"); PROXIMA_BE_ERROR_CODE_DEFINE(ZeroDocsPerSegment, 3008, "Zero Docs Per Segment"); PROXIMA_BE_ERROR_CODE_DEFINE(UnsupportedConnection, 3009, "Unsupported Connection"); // 4000~4999 [Index] PROXIMA_BE_ERROR_CODE_DEFINE(DuplicateCollection, 4000, "Duplicate Collection"); PROXIMA_BE_ERROR_CODE_DEFINE(DuplicateKey, 4001, "Duplicate Key"); PROXIMA_BE_ERROR_CODE_DEFINE(InexistentCollection, 4002, "Collection Not Exist"); PROXIMA_BE_ERROR_CODE_DEFINE(InexistentColumn, 4003, "Column Not Exist"); PROXIMA_BE_ERROR_CODE_DEFINE(InexistentKey, 4004, "Key Not Exist"); PROXIMA_BE_ERROR_CODE_DEFINE(SuspendedCollection, 4005, "Collection Is Suspended"); PROXIMA_BE_ERROR_CODE_DEFINE(LostSegment, 4006, "Lost Segment"); PROXIMA_BE_ERROR_CODE_DEFINE(EmptyLsnContext, 4007, "Empty Lsn Context"); PROXIMA_BE_ERROR_CODE_DEFINE(ExceedRateLimit, 4008, "Exceed Rate Limit"); // 5000~5999 [Query] PROXIMA_BE_ERROR_CODE_DEFINE(UnavailableSegment, 5000, "Segment Is " "unavailable"); PROXIMA_BE_ERROR_CODE_DEFINE(MismatchedForward, 5001, "Mismatched Forward"); PROXIMA_BE_ERROR_CODE_DEFINE(OutOfBoundsResult, 5002, "Results Out Of Bounds"); PROXIMA_BE_ERROR_CODE_DEFINE(UnreadyQueue, 5003, "Compute Queue Is Unready Yet"); PROXIMA_BE_ERROR_CODE_DEFINE(ScheduleError, 5004, "Schedule Task Error"); PROXIMA_BE_ERROR_CODE_DEFINE(UnreadableCollection, 5005, "Collection Is Unreadable"); PROXIMA_BE_ERROR_CODE_DEFINE(TaskIsRunning, 5006, "Task is running in other coroutine"); // NOTICE // 10000~19999 [SDK] // 20000~29999 [Repository] const char *ErrorCode::What(int val) { if (val >= -1000) { return aitheta2::IndexError::What(val); } else { return ErrorCode::Instance()->what(val); } } } // namespace be } // end namespace proxima ================================================ FILE: src/common/error_code.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Interface of Bilin Error */ #pragma once #include namespace proxima { namespace be { /*! Error */ class ErrorCode { public: /*! Error Code */ class Code { public: //! Constructor Code(int val, const char *str) : value_(-val), desc_(str) { ErrorCode::Instance()->emplace(this); } //! Retrieve the value of code operator int() const { return (this->value_); } //! Retrieve the value of code int value() const { return (this->value_); } //! Retrieve the description of code const char *desc() const { return (this->desc_); } private: int value_; const char *desc_; }; //! Retrieve the description of code static const char *What(int val); protected: //! Constructor ErrorCode(void) : map_() {} //! Inserts a new code into map void emplace(const ErrorCode::Code *code) { map_.emplace(code->value(), code); } //! Retrieve the description of code const char *what(int val) const { auto iter = map_.find(val); if (iter != map_.end()) { return iter->second->desc(); } return ""; } //! Retrieve the singleton static ErrorCode *Instance(void) { static ErrorCode error; return (&error); } private: //! Disable them ErrorCode(const ErrorCode &) = delete; ErrorCode(ErrorCode &&) = delete; ErrorCode &operator=(const ErrorCode &) = delete; //! Error code map std::map map_; }; //! Error Code Define #define PROXIMA_BE_ERROR_CODE_DEFINE(__NAME__, __VAL__, __DESC__) \ const proxima::be::ErrorCode::Code ErrorCode_##__NAME__((__VAL__), \ (__DESC__)); \ const proxima::be::ErrorCode::Code &_ErrorCode_##__VAL__##_Register( \ ErrorCode_##__NAME__) //! Proxima BE Error Code Declare #define PROXIMA_BE_ERROR_CODE_DECLARE(__NAME__) \ extern const proxima::be::ErrorCode::Code ErrorCode_##__NAME__ //! Error code helper #define PROXIMA_BE_ERROR_CODE(__NAME__) proxima::be::ErrorCode_##__NAME__ // 0~999 [Builtin] PROXIMA_BE_ERROR_CODE_DECLARE(Success); // 1000~1999 [Common Error] PROXIMA_BE_ERROR_CODE_DECLARE(RuntimeError); PROXIMA_BE_ERROR_CODE_DECLARE(LogicError); PROXIMA_BE_ERROR_CODE_DECLARE(StatusError); PROXIMA_BE_ERROR_CODE_DECLARE(LoadConfig); PROXIMA_BE_ERROR_CODE_DECLARE(ConfigError); PROXIMA_BE_ERROR_CODE_DECLARE(InvalidArgument); PROXIMA_BE_ERROR_CODE_DECLARE(NotInitialized); PROXIMA_BE_ERROR_CODE_DECLARE(OpenFile); PROXIMA_BE_ERROR_CODE_DECLARE(ReadData); PROXIMA_BE_ERROR_CODE_DECLARE(WriteData); PROXIMA_BE_ERROR_CODE_DECLARE(ExceedLimit); PROXIMA_BE_ERROR_CODE_DECLARE(SerializeError); PROXIMA_BE_ERROR_CODE_DECLARE(DerializeError); PROXIMA_BE_ERROR_CODE_DECLARE(StartServer); PROXIMA_BE_ERROR_CODE_DECLARE(StoppedService); // 2000~2999 [Format Check] PROXIMA_BE_ERROR_CODE_DECLARE(EmptyCollectionName); PROXIMA_BE_ERROR_CODE_DECLARE(EmptyColumnName); PROXIMA_BE_ERROR_CODE_DECLARE(EmptyColumns); PROXIMA_BE_ERROR_CODE_DECLARE(EmptyRepositoryTable); PROXIMA_BE_ERROR_CODE_DECLARE(EmptyRepositoryName); PROXIMA_BE_ERROR_CODE_DECLARE(EmptyUserName); PROXIMA_BE_ERROR_CODE_DECLARE(EmptyPassword); PROXIMA_BE_ERROR_CODE_DECLARE(InvalidURI); PROXIMA_BE_ERROR_CODE_DECLARE(InvalidCollectionStatus); PROXIMA_BE_ERROR_CODE_DECLARE(InvalidRecord); PROXIMA_BE_ERROR_CODE_DECLARE(InvalidQuery); PROXIMA_BE_ERROR_CODE_DECLARE(InvalidIndexDataFormat); PROXIMA_BE_ERROR_CODE_DECLARE(InvalidWriteRequest); PROXIMA_BE_ERROR_CODE_DECLARE(InvalidVectorFormat); PROXIMA_BE_ERROR_CODE_DECLARE(InvalidRepositoryType); PROXIMA_BE_ERROR_CODE_DECLARE(InvalidDataType); PROXIMA_BE_ERROR_CODE_DECLARE(InvalidIndexType); PROXIMA_BE_ERROR_CODE_DECLARE(InvalidSegment); PROXIMA_BE_ERROR_CODE_DECLARE(InvalidRevision); PROXIMA_BE_ERROR_CODE_DECLARE(InvalidFeature); PROXIMA_BE_ERROR_CODE_DECLARE(MismatchedSchema); PROXIMA_BE_ERROR_CODE_DECLARE(MismatchedMagicNumber); PROXIMA_BE_ERROR_CODE_DECLARE(MismatchedIndexColumn); PROXIMA_BE_ERROR_CODE_DECLARE(MismatchedForward); PROXIMA_BE_ERROR_CODE_DECLARE(MismatchedDimension); PROXIMA_BE_ERROR_CODE_DECLARE(MismatchedDataType); // 3000~3999 [Meta] PROXIMA_BE_ERROR_CODE_DECLARE(UpdateStatusField); PROXIMA_BE_ERROR_CODE_DECLARE(UpdateRevisionField); PROXIMA_BE_ERROR_CODE_DECLARE(UpdateCollectionUIDField); PROXIMA_BE_ERROR_CODE_DECLARE(UpdateIndexTypeField); PROXIMA_BE_ERROR_CODE_DECLARE(UpdateDataTypeField); PROXIMA_BE_ERROR_CODE_DECLARE(UpdateParametersField); PROXIMA_BE_ERROR_CODE_DECLARE(UpdateRepositoryTypeField); PROXIMA_BE_ERROR_CODE_DECLARE(UpdateColumnNameField); PROXIMA_BE_ERROR_CODE_DECLARE(ZeroDocsPerSegment); PROXIMA_BE_ERROR_CODE_DECLARE(UnsupportedConnection); // 4000~4999 [Index] PROXIMA_BE_ERROR_CODE_DECLARE(DuplicateCollection); PROXIMA_BE_ERROR_CODE_DECLARE(DuplicateKey); PROXIMA_BE_ERROR_CODE_DECLARE(InexistentCollection); PROXIMA_BE_ERROR_CODE_DECLARE(InexistentColumn); PROXIMA_BE_ERROR_CODE_DECLARE(InexistentKey); PROXIMA_BE_ERROR_CODE_DECLARE(SuspendedCollection); PROXIMA_BE_ERROR_CODE_DECLARE(LostSegment); PROXIMA_BE_ERROR_CODE_DECLARE(EmptyLsnContext); PROXIMA_BE_ERROR_CODE_DECLARE(ExceedRateLimit); // 5000~5999 [Query] PROXIMA_BE_ERROR_CODE_DECLARE(UnavailableSegment); PROXIMA_BE_ERROR_CODE_DECLARE(OutOfBoundsResult); PROXIMA_BE_ERROR_CODE_DECLARE(UnreadyQueue); PROXIMA_BE_ERROR_CODE_DECLARE(ScheduleError); PROXIMA_BE_ERROR_CODE_DECLARE(UnreadableCollection); PROXIMA_BE_ERROR_CODE_DECLARE(TaskIsRunning); // NOTICE // 10000~19999 [SDK] // 20000~29999 [Repository] } // end namespace be } // end namespace proxima ================================================ FILE: src/common/glogger.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of index logger, based on glog */ #include #include #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wunused-parameter" #endif #include #ifdef __GNUC__ #pragma GCC diagnostic pop #endif namespace google { namespace glog_internal_namespace_ { extern bool IsGoogleLoggingInitialized(void); extern bool ShutdownGoogleLoggingUtilities(void); } // namespace glog_internal_namespace_ } // namespace google namespace proxima { namespace be { class AppendLogger : public aitheta2::IndexLogger { public: AppendLogger() = default; ~AppendLogger() { this->cleanup(); } public: int init(const aitheta2::IndexParams ¶ms) override { if (!google::glog_internal_namespace_::IsGoogleLoggingInitialized()) { std::string log_dir = params.get_as_string("proxima.file.logger.log_dir"); std::string log_file = params.get_as_string("proxima.file.logger.log_file"); if (!ailego::File::IsExist(log_dir)) { ailego::File::MakePath(log_dir); } FLAGS_log_dir = log_dir; FLAGS_max_log_size = 2048; FLAGS_logbufsecs = 0; // it's really a bad feature for glog // logs <= LOG_FATAL will also output to stderr // and we can only set FATAL at most // and so we should avoid to use LOG_FATAL FLAGS_stderrthreshold = google::GLOG_FATAL; static std::string new_log_file = log_file; google::InitGoogleLogging(new_log_file.c_str()); } return 0; } int cleanup() override { if (google::glog_internal_namespace_::IsGoogleLoggingInitialized()) { google::ShutdownGoogleLogging(); } return 0; } void log(int level, const char *file, int line, const char *format, va_list args) override { static google::LogSeverity severities[] = { google::GLOG_INFO, google::GLOG_INFO, google::GLOG_WARNING, google::GLOG_ERROR, google::GLOG_FATAL}; char buf[2048]; vsnprintf(buf, sizeof(buf), format, args); google::LogMessage(file, line, severities[level]).stream() << buf; google::FlushLogFiles(severities[level]); } }; INDEX_FACTORY_REGISTER_LOGGER(AppendLogger); } // namespace be } // end namespace proxima ================================================ FILE: src/common/interface/service.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Abstract class of service which includes * init->start->stop->cleanup */ #pragma once #include #include "common/error_code.h" #include "common/logger.h" #include "common/macro_define.h" namespace proxima { namespace be { class Service { public: //! Destructor virtual ~Service() = default; public: int init() { if (status_ != CREATED) { LOG_ERROR("Service status error. status[%d] expect[%d]", status_, CREATED); return ErrorCode_StatusError; } int ret = this->init_impl(); if (ret == 0) { status_ = INITIALIZED; } return ret; } int cleanup() { if (status_ != INITIALIZED) { LOG_ERROR("Service status error. status[%d] expect[%d]", status_, INITIALIZED); return ErrorCode_StatusError; } int ret = this->cleanup_impl(); if (ret == 0) { status_ = CREATED; } return ret; } int start() { if (status_ != INITIALIZED) { LOG_ERROR("Service status error. status[%d] expect[%d]", status_, INITIALIZED); return ErrorCode_StatusError; } int ret = this->start_impl(); if (ret == 0) { status_ = STARTED; } return ret; } int stop() { if (status_ != STARTED) { LOG_ERROR("Service status error. status[%d] expect[%d]", status_, STARTED); return ErrorCode_StatusError; } int ret = this->stop_impl(); if (ret == 0) { status_ = INITIALIZED; } return ret; } int status() const { return status_; } protected: virtual int init_impl() = 0; virtual int cleanup_impl() = 0; virtual int start_impl() = 0; virtual int stop_impl() = 0; protected: enum Status { CREATED = 0, INITIALIZED = 1, STARTED = 2 }; Status status_{CREATED}; }; using ServicePtr = std::shared_ptr; } // namespace be } // end namespace proxima ================================================ FILE: src/common/logger.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Encapsulation of aitheta2 index logger */ #pragma once #include #include #include #include "common/error_code.h" namespace proxima { namespace be { class LogUtil { public: static int Init(const std::string &log_dir, const std::string &log_file, int log_level, const std::string &logger_type) { if (log_dir.empty() || log_file.empty()) { return ErrorCode_InvalidArgument; } if (!ailego::File::IsExist(log_dir)) { ailego::File::MakePath(log_dir); } auto logger = aitheta2::IndexFactory::CreateLogger(logger_type); if (!logger) { LOG_FATAL("Invalid logger_type[%s]", logger_type.c_str()); return ErrorCode_InvalidArgument; } aitheta2::IndexParams params; params.set("proxima.file.logger.log_dir", log_dir); params.set("proxima.file.logger.log_file", log_file); params.set("proxima.file.logger.path", log_dir + "/" + log_file); std::string program_name = ailego::File::BaseName(gflags::GetArgv0()); params.set("proxima.program.program_name", program_name); int ret = logger->init(params); if (ret != 0) { return ret; } aitheta2::IndexLoggerBroker::SetLevel(log_level); aitheta2::IndexLoggerBroker::Register(logger); return 0; } static void Shutdown() { aitheta2::IndexLoggerBroker::Unregister(); } }; } // namespace be } // end namespace proxima ================================================ FILE: src/common/macro_define.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Common macro defines that used by all the project */ #pragma once #define PROXIMA_DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName &) = delete; \ TypeName &operator=(const TypeName &) = delete; ================================================ FILE: src/common/profiler.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #pragma once #include #include #include #include #include "error_code.h" #include "logger.h" namespace proxima { namespace be { //! Predefined class class Profiler; //! Alias ProfilerPtr using ProfilerPtr = std::shared_ptr; //! Profiler collecting all the latency and other information during query class Profiler { private: //! Stage object struct Stage { //! Constructor explicit Stage(ailego::JsonObject *node) : node_(node) {} //! Stage node, which stored in JsonTree held by Profiler ailego::JsonObject *node_{nullptr}; //! Stage latency, started when creating Stage object ailego::ElapsedTime latency_; }; public: //! Constructor explicit Profiler(bool enable = false) : enable_(enable) { if (enabled()) { root_.assign(ailego::JsonObject()); } } //! Check enabled bool enabled() const { return enable_; } //! Start profiler void start() { if (enabled() && path_.empty()) { path_.emplace_back(Stage(&root_.as_object())); } } //! Stop profiler void stop() { if (enabled()) { if (path_.size() == 1) { // Root always held in path_[0] close_stage(); } else { LOG_WARN("There are stages have not been closed, stages[%zu]", path_.size()); // Manually set latency to root, which should not be normal way root_["latency"] = path_.begin()->latency_.micro_seconds(); } } } //! Open stage, start timer of stage int open_stage(const std::string &name) { if (enabled()) { if (path_.empty()) { LOG_ERROR("Profiler did not start yet"); return PROXIMA_BE_ERROR_CODE(RuntimeError); } if (name.empty()) { LOG_ERROR("Can't open stage with empty name"); return PROXIMA_BE_ERROR_CODE(RuntimeError); } ailego::JsonString key(name); ailego::JsonObject child; current_path()->set(key, child); // add child path_.emplace_back(Stage( &((*current_path())[name.c_str()].as_object()))); // move to child } return 0; } //! Close stage and stop timer of stage(represent by stage.latency) int close_stage() { if (enabled()) { if (path_.empty()) { LOG_ERROR("No available stage can be closed"); return PROXIMA_BE_ERROR_CODE(RuntimeError); } ailego::JsonValue latency(current()->latency_.micro_seconds()); current_path()->set("latency", latency); path_.pop_back(); } return 0; } //! add value to profiler template int add(const std::string &name, const VALUE_TYPE &v) { if (enabled()) { if (path_.empty()) { return PROXIMA_BE_ERROR_CODE(RuntimeError); } ailego::JsonString key(name); ailego::JsonValue value(v); current_path()->set(key, value); } return 0; } //! Serialize profiler to string(Json Format) std::string as_json_string() const { return enabled() ? root_.as_json_string().as_stl_string() : std::string("{}"); } private: Stage *current() { return path_.rbegin().operator->(); } ailego::JsonObject *current_path() { return current()->node_; } private: //! enable flag bool enable_{false}; //! root handler ailego::JsonValue root_; //! Depth-First paths std::vector path_; }; //! Helper for latency class ScopedLatency { public: //! Constructor explicit ScopedLatency(const char *name, ProfilerPtr profiler) : name_(name), profiler_(std::move(profiler)) {} //! Destructor ~ScopedLatency() { profiler_->add(name_, latency_.micro_seconds()); } private: //! Name of latency const char *name_{nullptr}; //! Timer handler ailego::ElapsedTime latency_; //! Profiler handler ProfilerPtr profiler_; }; } // namespace be } // namespace proxima ================================================ FILE: src/common/protobuf_helper.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author jiliang.ljl * \date Feb 2021 * \brief implementation of protobuf helper */ #include "protobuf_helper.h" #include #include #include "common/logger.h" using google::protobuf::Descriptor; using google::protobuf::EnumDescriptor; using google::protobuf::EnumValueDescriptor; using google::protobuf::FieldDescriptor; using google::protobuf::Message; using google::protobuf::Reflection; namespace proxima { namespace be { #define RETURN_ON_NULL(ptr, msg) \ if (!ptr) { \ LOG_ERROR(msg); \ return false; \ } static bool ParseMessage(const Message &msg, ailego::JsonValue *json, const ProtobufHelper::PrintOptions &options); static bool ParseJson(const ailego::JsonObject &json, const ProtobufHelper::JsonParseOptions &options, google::protobuf::Message *msg); static bool FieldToJson(const Message &msg, const FieldDescriptor *field, const ProtobufHelper::PrintOptions &options, ailego::JsonValue *json) { const Reflection *ref = msg.GetReflection(); bool repeated = field->is_repeated(); ailego::JsonArray json_array; size_t array_size = 0; if (repeated) { array_size = ref->FieldSize(msg, field); json_array.reserve(array_size); } switch (field->cpp_type()) { case FieldDescriptor::CPPTYPE_DOUBLE: if (repeated) { for (size_t i = 0; i != array_size; ++i) { double value = ref->GetRepeatedDouble(msg, field, i); ailego::JsonValue v(value); json_array.push(v); } } else { *json = ref->GetDouble(msg, field); } break; case FieldDescriptor::CPPTYPE_FLOAT: if (repeated) { for (size_t i = 0; i != array_size; ++i) { float value = ref->GetRepeatedFloat(msg, field, i); ailego::JsonValue v(value); json_array.push(v); } } else { *json = ref->GetFloat(msg, field); } break; case FieldDescriptor::CPPTYPE_INT64: if (repeated) { for (size_t i = 0; i != array_size; ++i) { int64_t value = ref->GetRepeatedInt64(msg, field, i); ailego::JsonValue v(std::to_string(value)); json_array.push(v); } } else { *json = std::to_string(ref->GetInt64(msg, field)); } break; case FieldDescriptor::CPPTYPE_UINT64: if (repeated) { for (size_t i = 0; i != array_size; ++i) { uint64_t value = ref->GetRepeatedUInt64(msg, field, i); ailego::JsonValue v(std::to_string(value)); json_array.push(v); } } else { *json = std::to_string(ref->GetUInt64(msg, field)); } break; case FieldDescriptor::CPPTYPE_INT32: if (repeated) { for (size_t i = 0; i != array_size; ++i) { int32_t value = ref->GetRepeatedInt32(msg, field, i); ailego::JsonValue v(value); json_array.push(v); } } else { *json = ref->GetInt32(msg, field); } break; case FieldDescriptor::CPPTYPE_UINT32: if (repeated) { for (size_t i = 0; i != array_size; ++i) { uint32_t value = ref->GetRepeatedUInt32(msg, field, i); ailego::JsonValue v(value); json_array.push(v); } } else { *json = ref->GetUInt32(msg, field); } break; case FieldDescriptor::CPPTYPE_BOOL: if (repeated) { for (size_t i = 0; i != array_size; ++i) { bool value = ref->GetRepeatedBool(msg, field, i); ailego::JsonValue v(value); json_array.push(v); } } else { *json = ref->GetBool(msg, field); } break; case FieldDescriptor::CPPTYPE_STRING: { bool is_binary = field->type() == FieldDescriptor::TYPE_BYTES; if (repeated) { for (size_t i = 0; i != array_size; ++i) { std::string value = ref->GetRepeatedString(msg, field, i); if (is_binary) { value = ailego::Base64::Encode(value); } ailego::JsonValue v(ailego::JsonString(value).encode()); json_array.push(v); } } else { std::string value = ref->GetString(msg, field); if (is_binary) { value = ailego::Base64::Encode(value); } *json = ailego::JsonString(value).encode(); } break; } case FieldDescriptor::CPPTYPE_MESSAGE: if (repeated) { for (size_t i = 0; i != array_size; ++i) { const Message &value = ref->GetRepeatedMessage(msg, field, i); ailego::JsonValue v; bool ret = ParseMessage(value, &v, options); if (!ret) { return ret; } json_array.push(v); } } else { const Message &value = ref->GetMessage(msg, field); return ParseMessage(value, json, options); } break; case FieldDescriptor::CPPTYPE_ENUM: if (repeated) { for (size_t i = 0; i != array_size; ++i) { const EnumValueDescriptor *value = ref->GetRepeatedEnum(msg, field, i); ailego::JsonValue v(value->name()); json_array.push(v); } } else { auto enum_desp = ref->GetEnum(msg, field); *json = enum_desp->name(); } break; default: LOG_ERROR("Unexpected type: %d", static_cast(field->cpp_type())); return false; } if (repeated) { *json = json_array; } return true; } #define RETURN_ON_INVALID_JSON(ERROR_MSG) \ LOG_ERROR("Json is " ERROR_MSG ". json[%s] field[%s]", \ json.as_json_string().as_stl_string().c_str(), \ field->full_name().c_str()); \ return false static bool JsonToField(const ailego::JsonValue &json, const ProtobufHelper::JsonParseOptions &options, google::protobuf::Message *msg, const FieldDescriptor *field) { const Reflection *ref = msg->GetReflection(); bool repeated = field->is_repeated(); switch (field->cpp_type()) { #define CONVERT(type, ctype, checkfun, asfun, sfunc, afunc, error) \ case FieldDescriptor::type: { \ if (!json.checkfun()) { \ RETURN_ON_INVALID_JSON(error); \ } \ if (repeated) { \ ref->afunc(msg, field, static_cast(json.asfun())); \ } else { \ ref->sfunc(msg, field, static_cast(json.asfun())); \ } \ break; \ } #define CONVERT_FLOAT(type, ctype, sfunc, afunc) \ case FieldDescriptor::type: { \ ctype val = 0.0; \ if (json.is_integer()) { \ val = static_cast(json.as_integer()); \ } else if (json.is_float()) { \ val = static_cast(json.as_float()); \ } else if (json.is_string()) { \ const char *value = json.as_c_string(); \ if (strncmp(value, "NaN", 3) == 0) { \ val = std::numeric_limits::quiet_NaN(); \ } else if (strncmp(value, "Infinity", 8) == 0) { \ val = std::numeric_limits::infinity(); \ } else if (strncmp(value, "-Infinity", 9) == 0) { \ val = -std::numeric_limits::infinity(); \ } else { \ RETURN_ON_INVALID_JSON( \ "float string only allow Nan, Infinity, -Infinity"); \ } \ } else { \ RETURN_ON_INVALID_JSON("not integer, float or string"); \ } \ if (repeated) { \ ref->afunc(msg, field, val); \ } else { \ ref->sfunc(msg, field, val); \ } \ break; \ } #define CONVERT_LONG(type, ctype, sfunc, afunc, strtofun) \ case FieldDescriptor::type: { \ ctype val = 0; \ if (json.is_integer()) { \ val = static_cast(json.as_integer()); \ } else if (json.is_string()) { \ val = static_cast(strtofun(json.as_c_string(), nullptr, 10)); \ } else { \ RETURN_ON_INVALID_JSON("not integer or string"); \ } \ if (repeated) { \ ref->afunc(msg, field, val); \ } else { \ ref->sfunc(msg, field, val); \ } \ break; \ } CONVERT(CPPTYPE_INT32, int32_t, is_integer, as_integer, SetInt32, AddInt32, "not number"); CONVERT(CPPTYPE_UINT32, uint32_t, is_integer, as_integer, SetUInt32, AddUInt32, "not number"); CONVERT_FLOAT(CPPTYPE_FLOAT, float, SetFloat, AddFloat); CONVERT_FLOAT(CPPTYPE_DOUBLE, double, SetDouble, AddDouble); CONVERT(CPPTYPE_BOOL, bool, is_boolean, as_bool, SetBool, AddBool, "not bool"); CONVERT_LONG(CPPTYPE_INT64, int64_t, SetInt64, AddInt64, strtoll); CONVERT_LONG(CPPTYPE_UINT64, uint64_t, SetUInt64, AddUInt64, strtoull); case FieldDescriptor::CPPTYPE_STRING: { if (!json.is_string()) { RETURN_ON_INVALID_JSON("not string"); } const char *value = json.as_c_string(); bool is_bytes = field->type() == FieldDescriptor::TYPE_BYTES; if (repeated) { ref->AddString( msg, field, is_bytes ? ailego::Base64::Decode(value) : json.as_stl_string()); } else { ref->SetString( msg, field, is_bytes ? ailego::Base64::Decode(value) : json.as_stl_string()); } break; } case FieldDescriptor::CPPTYPE_MESSAGE: { if (!json.is_object()) { RETURN_ON_INVALID_JSON("not object"); } Message *mf = (repeated) ? ref->AddMessage(msg, field) : ref->MutableMessage(msg, field); return ParseJson(json.as_object(), options, mf); } case FieldDescriptor::CPPTYPE_ENUM: { const EnumDescriptor *ed = field->enum_type(); const EnumValueDescriptor *ev = 0; if (json.is_integer()) { ev = ed->FindValueByNumber(json.as_integer()); } else if (json.is_string()) { ev = ed->FindValueByName(json.as_stl_string()); } else { RETURN_ON_INVALID_JSON("not integer or string"); } if (!ev) { RETURN_ON_INVALID_JSON("Enum value not found"); } if (repeated) { ref->AddEnum(msg, field, ev); } else { ref->SetEnum(msg, field, ev); } break; } default: LOG_ERROR("Unexpected type: %d", static_cast(field->cpp_type())); return false; } return true; } static bool ParseJson(const ailego::JsonObject &json, const ProtobufHelper::JsonParseOptions &options, google::protobuf::Message *msg) { const Descriptor *d = msg->GetDescriptor(); const Reflection *ref = msg->GetReflection(); RETURN_ON_NULL(d, "null descriptor"); RETURN_ON_NULL(ref, "null reflection"); for (auto it = json.cbegin(); it != json.cend(); ++it) { const char *name = it->key().c_str(); const FieldDescriptor *field = d->FindFieldByName(name); if (!field) { field = d->FindFieldByCamelcaseName(name); if (!field) { field = ref->FindKnownExtensionByName(name); } } if (!field) { if (options.ignore_unknown_fields) { continue; } LOG_ERROR("Unknown field in protobuf. json key[%s] message[%s]", name, d->full_name().c_str()); return false; } auto &value = it->value(); if (value.is_null()) { ref->ClearField(msg, field); // no need check required as protobuf3 is all optional continue; } if (field->is_repeated()) { if (!value.is_array()) { LOG_ERROR("Input json is not array. key[%s] value[%s] field[%s]", name, value.as_json_string().as_stl_string().c_str(), field->full_name().c_str()); return false; } ref->ClearField(msg, field); auto &array = value.as_array(); for (auto ait = array.cbegin(); ait != array.cend(); ++ait) { if (!JsonToField(*ait, options, msg, field)) { return false; } } } else { if (!JsonToField(value, options, msg, field)) { return false; } } } return true; } static bool ParseMessage(const Message &msg, ailego::JsonValue *json, const ProtobufHelper::PrintOptions &options) { const Descriptor *d = msg.GetDescriptor(); RETURN_ON_NULL(d, "null descriptor") const Reflection *ref = msg.GetReflection(); RETURN_ON_NULL(ref, "null reflection") size_t count = d->field_count(); ailego::JsonObject obj; for (size_t i = 0; i != count; ++i) { const FieldDescriptor *field = d->field(i); RETURN_ON_NULL(field, "null field descriptor") if (field->is_optional() && !ref->HasField(msg, field)) { // do not print empty message if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { continue; } if (!options.always_print_primitive_fields) { continue; } } auto oneof_des = field->containing_oneof(); if (oneof_des) { bool has_oneof = false; for (int fi = 0; fi < oneof_des->field_count(); fi++) { if (ref->HasField(msg, oneof_des->field(fi))) { has_oneof = true; break; } } if (!has_oneof || !ref->HasField(msg, field)) { continue; } } ailego::JsonValue field_json; bool ret = FieldToJson(msg, field, options, &field_json); if (!ret) { return ret; } ailego::JsonString field_name(field->name()); obj.set(field_name.encode(), field_json); } *json = obj; return true; } bool ProtobufHelper::MessageToJson(const google::protobuf::Message &message, const ProtobufHelper::PrintOptions &options, std::string *json) { ailego::JsonValue root; bool ret = ParseMessage(message, &root, options); if (!ret) { return ret; } *json = root.as_json_string().as_stl_string(); return true; } bool ProtobufHelper::JsonToMessage( const std::string &json, const ProtobufHelper::JsonParseOptions &options, google::protobuf::Message *message) { ailego::JsonValue node; if (!node.parse(json.c_str())) { LOG_ERROR("Parse json value failed. json[%s]", json.c_str()); return false; } if (!node.is_object()) { LOG_ERROR("Json is not object. json[%s]", json.c_str()); return false; } return ParseJson(node.as_object(), options, message); } #undef RETURN_ON_NULL #undef RETURN_ON_INVALID_JSON #undef CONVERT #undef CONVERT_FLOAT #undef CONVERT_LONG } // namespace be } // namespace proxima ================================================ FILE: src/common/protobuf_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author jiliang.ljl * \date Feb 2021 * \brief protobuf helper */ #pragma once #include #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wunused-parameter" #endif #include #ifdef __GNUC__ #pragma GCC diagnostic pop #endif namespace proxima { namespace be { //! See data type mapping: //! https://developers.google.com/protocol-buffers/docs/proto3#json class ProtobufHelper { public: struct PrintOptions { // Whether to always print primitive fields. bool always_print_primitive_fields{true}; }; struct JsonParseOptions { // Whether to ignore unknown JSON fields during parsing bool ignore_unknown_fields{false}; }; //! Perform json serialization. static bool MessageToJson(const google::protobuf::Message &message, std::string *json) { return MessageToJson(message, PrintOptions(), json); } //! Perform json serialization. static bool MessageToJson(const google::protobuf::Message &message, const PrintOptions &options, std::string *json); //! Perform json deserialization. static bool JsonToMessage(const std::string &json, google::protobuf::Message *message) { return JsonToMessage(json, JsonParseOptions{}, message); } //! Perform json deserialization. static bool JsonToMessage(const std::string &json, const JsonParseOptions &options, google::protobuf::Message *message); }; } // namespace be } // namespace proxima ================================================ FILE: src/common/sys_logger.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Jiliang.ljl * \date Mar 2021 * \brief Implementation of syslog */ #include #include #include namespace proxima { namespace be { class SysLogger : public aitheta2::IndexLogger { public: SysLogger() = default; ~SysLogger() { this->cleanup(); } public: int init(const aitheta2::IndexParams ¶ms) override { program_name_ = params.get_as_string("proxima.program.program_name"); // openlog require first argument to be accessible forever openlog(program_name_.c_str(), LOG_PID, LOG_DAEMON); return 0; } int cleanup() override { closelog(); program_name_.clear(); return 0; } void log(int level, const char *file, int line, const char *format, va_list args) override { static int log_level_mapping[] = {LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERR, LOG_CRIT}; char buf[2048]; vsnprintf(buf, sizeof(buf), format, args); syslog(log_level_mapping[level], "%s:%d %s", file, line, buf); } private: std::string program_name_; }; INDEX_FACTORY_REGISTER_LOGGER(SysLogger); } // namespace be } // end namespace proxima ================================================ FILE: src/common/transformer.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Mar 2021 * \brief */ #include "transformer.h" namespace proxima { namespace be { bool Transformer::NeedTransform(DataTypes in_type, DataTypes out_type) { return in_type != out_type; } int Transformer::SupportTransform(DataTypes in_type, DataTypes out_type) { if ((in_type == out_type) || (in_type == DataTypes::VECTOR_FP32 && out_type == DataTypes::VECTOR_FP16)) { return 0; } return PROXIMA_BE_ERROR_CODE(MismatchedDataType); } int Transformer::Transform(DataTypes in_type, const std::string &in, DataTypes out_type, std::string *out) { if (Transformer::NeedTransform(in_type, out_type)) { if (in_type == DataTypes::VECTOR_FP32 && out_type == DataTypes::VECTOR_FP16) { if (in.empty() || in.length() % sizeof(float) != 0) { return PROXIMA_BE_ERROR_CODE(InvalidFeature); } // counts the elements of query auto elements = in.length() / sizeof(float); // resize fp32(4 bytes) -> fp16(2 bytes) out->resize(elements << 1); ailego::FloatHelper::ToFP16( reinterpret_cast(in.c_str()), elements, reinterpret_cast(const_cast(out->c_str()))); return 0; } return PROXIMA_BE_ERROR_CODE(MismatchedDataType); } *out = in; return 0; } //! Transform double of JsonValue to float template <> float Json2Primary::Primary(const ailego::JsonValue &object) { return float(object.as_float()); } //! Transform double of JsonValue template <> double Json2Primary::Primary(const ailego::JsonValue &object) { return object.as_float(); } template <> void Primary2Bytes::Bytes( const std::vector &values, std::string *bytes) { bytes->resize(values.size() >> 1); uint8_t *out = reinterpret_cast(&(*bytes)[0]); for (size_t i = 0; i < values.size(); i += 2) { out[i >> 1] = (static_cast(values[i + 1]) << 4) | (static_cast(values[i]) & 0xF); } } template <> void Primary2Bytes::Bytes( const std::vector &values, std::string *bytes) { bytes->resize(values.size() * sizeof(float) >> 1); ailego::FloatHelper::ToFP16(reinterpret_cast(values.data()), values.size(), reinterpret_cast(&(*bytes)[0])); } } // namespace be } // namespace proxima ================================================ FILE: src/common/transformer.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Mar 2021 * \brief */ #pragma once #include #include #include "error_code.h" #include "logger.h" #include "types.h" namespace proxima { namespace be { /*! Transformer */ class Transformer { public: //! Check transform action static bool NeedTransform(DataTypes in, DataTypes out); //! Check support current transform static int SupportTransform(DataTypes in_type, DataTypes out_type); //! Transform input features to output features // return 0 for success otherwise failed static int Transform(DataTypes, const std::string &, DataTypes, std::string *); //! Transform json array to std::vector, return count of element has been // transformed template static size_t Transform(const ailego::JsonArray &array, std::vector *values); //! Interpret json value to vector, param matrix should contains valid // matrix or array object. template static size_t Transform(const ailego::JsonValue &matrix, std::vector *values); //! Interpret json string to vector, param json should contains valid // matrix or array object. template static size_t Transform( const std::string &json, std::function *validator, std::vector *values); //! transform vector to bytes template static size_t Transform(const std::vector &values, std::string *bytes); }; /*! * Transform json object to primary data */ struct Json2Primary { template static T Primary(const ailego::JsonValue &object) { return static_cast(object.as_integer()); } }; //! Transform double of JsonValue to float template <> float Json2Primary::Primary(const ailego::JsonValue &object); //! Transform double of JsonValue template <> double Json2Primary::Primary(const ailego::JsonValue &object); template size_t Transformer::Transform(const ailego::JsonArray &array, std::vector *values) { for (auto it = array.begin(); it != array.end(); ++it) { values->emplace_back(Json2Primary::Primary(*it)); } return size_t(array.size()); } template size_t Transformer::Transform(const ailego::JsonValue &matrix, std::vector *values) { try { auto &array = matrix.as_array(); size_t size = 0; if (!array.empty() && array.begin()->is_array()) { for (auto it = array.begin(); it != array.end(); ++it) { size_t temp = Transformer::Transform(it->as_array(), values); if (temp < 0) { return temp; } size += temp; } } else { size = Transformer::Transform(matrix.as_array(), values); } return size; } catch (const std::exception &e) { return PROXIMA_BE_ERROR_CODE(InvalidVectorFormat); } } template size_t Transformer::Transform( const std::string &json, std::function *validator, std::vector *values) { ailego::JsonValue node; if (!node.parse(json.c_str())) { LOG_ERROR("Parse index json value failed."); return PROXIMA_BE_ERROR_CODE(InvalidVectorFormat); } int error_code = !validator ? 0 : (*validator)(node); if (error_code != 0) { return size_t(error_code); } values->clear(); return Transformer::Transform(node, values); } /*! * Serialize primary array into bytes */ struct Primary2Bytes { template static void Bytes(const std::vector &values, std::string *bytes) { auto capacity = values.size() * sizeof(T); bytes->resize(capacity); std::memcpy(&((*bytes)[0]), values.data(), capacity); } }; template <> void Primary2Bytes::Bytes( const std::vector &values, std::string *bytes); template <> void Primary2Bytes::Bytes( const std::vector &values, std::string *bytes); template size_t Transformer::Transform(const std::vector &values, std::string *bytes) { Primary2Bytes::Bytes(values, bytes); return values.size(); } } // namespace be } // namespace proxima ================================================ FILE: src/common/types.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Common types that will be used by all the project */ #pragma once #include #include namespace proxima { namespace be { /* * Collection operation types */ enum class OperationTypes : uint32_t { UNDEFINED = 0, INSERT = 1, UPDATE = 2, DELETE = 3 }; /* * Column index types */ enum class IndexTypes : uint32_t { UNDEFINED = 0, PROXIMA_GRAPH_INDEX }; /* * Column data types */ enum class DataTypes : uint32_t { UNDEFINED = 0, BINARY = 1, STRING = 2, BOOL = 3, INT32 = 4, INT64 = 5, UINT32 = 6, UINT64 = 7, FLOAT = 8, DOUBLE = 9, VECTOR_BINARY32 = 20, VECTOR_BINARY64 = 21, VECTOR_FP16 = 22, VECTOR_FP32 = 23, VECTOR_FP64 = 24, VECTOR_INT4 = 25, VECTOR_INT8 = 26, VECTOR_INT16 = 27 }; /* * Collection query types */ enum class QueryTypes : uint32_t { UNDEFINED = 0, KNN_QUERY, EQUAL_QUERY }; } // namespace be } // end namespace proxima ================================================ FILE: src/common/types_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #pragma once #include "proto/common.pb.h" #include "error_code.h" #include "logger.h" #include "types.h" namespace proxima { namespace be { struct DataTypeCodeBook { static DataTypes Get(proto::DataType type) { DataTypes data_types = DataTypes::UNDEFINED; switch (type) { case proto::DataType::DT_BINARY: data_types = DataTypes::BINARY; break; case proto::DataType::DT_STRING: data_types = DataTypes::STRING; break; case proto::DataType::DT_BOOL: data_types = DataTypes::BOOL; break; case proto::DataType::DT_INT32: data_types = DataTypes::INT32; break; case proto::DataType::DT_INT64: data_types = DataTypes::INT64; break; case proto::DataType::DT_UINT32: data_types = DataTypes::UINT32; break; case proto::DataType::DT_UINT64: data_types = DataTypes::UINT64; break; case proto::DataType::DT_FLOAT: data_types = DataTypes::FLOAT; break; case proto::DataType::DT_DOUBLE: data_types = DataTypes::DOUBLE; break; case proto::DataType::DT_VECTOR_BINARY32: data_types = DataTypes::VECTOR_BINARY32; break; case proto::DataType::DT_VECTOR_BINARY64: data_types = DataTypes::VECTOR_BINARY64; break; case proto::DataType::DT_VECTOR_FP16: data_types = DataTypes::VECTOR_FP16; break; case proto::DataType::DT_VECTOR_FP32: data_types = DataTypes::VECTOR_FP32; break; case proto::DataType::DT_VECTOR_FP64: data_types = DataTypes::VECTOR_FP64; break; case proto::DataType::DT_VECTOR_INT4: data_types = DataTypes::VECTOR_INT4; break; case proto::DataType::DT_VECTOR_INT8: data_types = DataTypes::VECTOR_INT8; break; case proto::DataType::DT_VECTOR_INT16: data_types = DataTypes::VECTOR_INT16; default: break; } return data_types; } static proto::DataType Get(DataTypes type) { proto::DataType data_type = proto::DataType::DT_UNDEFINED; switch (type) { case DataTypes::BINARY: data_type = proto::DataType::DT_BINARY; break; case DataTypes::STRING: data_type = proto::DataType::DT_STRING; break; case DataTypes::BOOL: data_type = proto::DataType::DT_BOOL; break; case DataTypes::INT32: data_type = proto::DataType::DT_INT32; break; case DataTypes::INT64: data_type = proto::DataType::DT_INT64; break; case DataTypes::UINT32: data_type = proto::DataType::DT_UINT32; break; case DataTypes::UINT64: data_type = proto::DataType::DT_UINT64; break; case DataTypes::FLOAT: data_type = proto::DataType::DT_FLOAT; break; case DataTypes::DOUBLE: data_type = proto::DataType::DT_DOUBLE; break; case DataTypes::VECTOR_BINARY32: data_type = proto::DataType::DT_VECTOR_BINARY32; break; case DataTypes::VECTOR_BINARY64: data_type = proto::DataType::DT_VECTOR_BINARY64; break; case DataTypes::VECTOR_FP16: data_type = proto::DataType::DT_VECTOR_FP16; break; case DataTypes::VECTOR_FP32: data_type = proto::DataType::DT_VECTOR_FP32; break; case DataTypes::VECTOR_FP64: data_type = proto::DataType::DT_VECTOR_FP64; break; case DataTypes::VECTOR_INT4: data_type = proto::DataType::DT_VECTOR_INT4; break; case DataTypes::VECTOR_INT8: data_type = proto::DataType::DT_VECTOR_INT8; break; case DataTypes::VECTOR_INT16: data_type = proto::DataType::DT_VECTOR_INT16; default: break; } return data_type; } }; struct IndexParamsHelper { static int Append(const proto::GenericKeyValue &kv, aitheta2::IndexParams *params) { if (!kv.IsInitialized()) { return PROXIMA_BE_ERROR_CODE(InvalidArgument); } switch (kv.value().value_oneof_case()) { case proto::GenericValue::ValueOneofCase::kStringValue: params->insert( kv.key(), const_cast(kv.value().string_value().c_str())); break; case proto::GenericValue::ValueOneofCase::kBoolValue: params->insert(kv.key(), kv.value().bool_value()); break; case proto::GenericValue::ValueOneofCase::kInt32Value: params->insert(kv.key(), kv.value().int32_value()); break; case proto::GenericValue::ValueOneofCase::kInt64Value: params->insert(kv.key(), kv.value().int64_value()); break; case proto::GenericValue::ValueOneofCase::kUint32Value: params->insert(kv.key(), kv.value().uint32_value()); break; case proto::GenericValue::ValueOneofCase::kUint64Value: params->insert(kv.key(), kv.value().uint64_value()); break; case proto::GenericValue::ValueOneofCase::kFloatValue: params->insert(kv.key(), kv.value().float_value()); break; case proto::GenericValue::ValueOneofCase::kDoubleValue: params->insert(kv.key(), kv.value().double_value()); break; default: LOG_DEBUG("None value or kBytes has been set, skip this"); break; } return 0; } static int Append(const proto::KeyValuePair &kv, aitheta2::IndexParams *params) { if (!kv.IsInitialized()) { return PROXIMA_BE_ERROR_CODE(InvalidArgument); } params->set(kv.key(), kv.value()); return 0; } static int SerializeToParams( const google::protobuf::RepeatedPtrField &maps, aitheta2::IndexParams *params) { int count = maps.size(); while (count--) { Append(maps.at(count), params); } return 0; } static int SerializeToPB( const aitheta2::IndexParams ¶ms, google::protobuf::RepeatedPtrField *maps) { for (const auto &it : params.hypercube().cubes()) { auto *kv = maps->Add(); kv->set_key(it.first); kv->set_value(it.second.cast()); } return 0; } }; //! Code book for OperationTypes struct OperationTypesCodeBook { static OperationTypes Get(proto::OperationType type) { if (type == proto::OP_INSERT) { return OperationTypes::INSERT; } else if (type == proto::OP_UPDATE) { return OperationTypes::UPDATE; } else { return OperationTypes::DELETE; } } }; } // namespace be } // namespace proxima ================================================ FILE: src/common/uuid_helper.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "uuid_helper.h" #include #include #include #include namespace proxima { namespace be { static uint32_t random_char() { std::random_device rd; std::mt19937 gen(rd()); std::uniform_int_distribution<> dis(0, 255); return dis(gen); } std::string gen_uuid(const std::string &sep) { return ailego::StringHelper::Concat(generate_hex(4), sep, generate_hex(2), sep, generate_hex(2), sep, generate_hex(8)); } bool valid_uuid(const std::string &uuid) { return uuid.length() == 32; } std::string generate_hex(const uint32_t len) { std::stringstream ss; for (uint32_t i = 0; i < len; i++) { const auto rc = random_char(); std::stringstream stream; stream << std::hex << rc; auto hex = stream.str(); ss << (hex.length() < 2 ? '0' + hex : hex); } return ss.str(); } } // namespace be } // namespace proxima ================================================ FILE: src/common/uuid_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include namespace proxima { namespace be { //! Generate uuid(represent by 32 hex numbers) //! param sep: seperator between groups, 0 means do not split into groups std::string gen_uuid(const std::string &sep = ""); //! Check uuid bool valid_uuid(const std::string &uuid); //! Generate hex string, length indicated by param len std::string generate_hex(uint32_t len); } // namespace be } // namespace proxima ================================================ FILE: src/common/version.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Apr 2021 * \brief Proxima BE version information */ #include "version.h" #include #ifdef proxima_be_common_VERSION #define PROXIMA_BE_VERSION_STRING proxima_be_common_VERSION #else #define PROXIMA_BE_VERSION_STRING "unknown" #endif namespace proxima { namespace be { static const char PROXIMA_BE_VERSION_DETAILS[] = AILEGO_VERSION_COMPILE_DETAILS( "Proxima BE Version " PROXIMA_BE_VERSION_STRING ".\nCopyright (C) Alibaba, Inc. and its affiliate. All rights reserved.\n"); const char *Version::String() { return PROXIMA_BE_VERSION_STRING; } const char *Version::Details(void) { return PROXIMA_BE_VERSION_DETAILS; } } // namespace be } // end namespace proxima ================================================ FILE: src/common/version.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Apr 2021 * \brief Proxima BE version information */ #pragma once namespace proxima { namespace be { struct Version { static const char *String(void); static const char *Details(void); }; } // namespace be } // namespace proxima ================================================ FILE: src/common/wait_notifier.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of wait notifier */ #include "wait_notifier.h" namespace proxima { namespace be { void WaitNotifier::wait() { std::unique_lock lck(mutex_); if (!notified_) { cv_.wait(lck); } notified_ = false; } void WaitNotifier::wait_until( const std::chrono::system_clock::time_point &tm_point) { std::unique_lock lck(mutex_); if (!notified_) { cv_.wait_until(lck, tm_point); } notified_ = false; } void WaitNotifier::wait_for( const std::chrono::system_clock::duration &tm_duration) { std::unique_lock lck(mutex_); if (!notified_) { cv_.wait_for(lck, tm_duration); } notified_ = false; } void WaitNotifier::notify() { std::unique_lock lck(mutex_); notified_ = true; lck.unlock(); cv_.notify_one(); } } // namespace be } // end namespace proxima ================================================ FILE: src/common/wait_notifier.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Simple condition wait and notify class */ #pragma once #include #include #include namespace proxima { namespace be { /* * Simple wait notifier for multi-threads message sync */ class WaitNotifier { public: //! Constructor WaitNotifier() = default; //! Destructor ~WaitNotifier() = default; public: // Wait for condition var notify void wait(); // Wait for deserted time void wait_until(const std::chrono::system_clock::time_point &tm_point); // Wait for some duration time void wait_for(const std::chrono::system_clock::duration &tm_duration); // Notify once void notify(); private: bool notified_{false}; std::mutex mutex_; std::condition_variable cv_; }; } // namespace be } // end namespace proxima ================================================ FILE: src/index/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Oct 2020 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) # proxima_be_index library cc_library( NAME proxima_be_index STATIC STRICT ALWAYS_LINK SRCS *.cc column/*.cc segment/*.cc LIBS proxima_be_meta proxima_be_common proxima_be_proto INCS . .. VERSION "${PROXIMA_BE_VERSION}" ) ================================================ FILE: src/index/collection.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of collection class */ #include "collection.h" #include #include #include #include "common/defer.h" #include "common/error_code.h" #include "common/logger.h" #include "constants.h" #include "file_helper.h" #include "typedef.h" namespace proxima { namespace be { namespace index { CollectionPtr Collection::Create(const std::string &collection_name, const std::string &prefix_path, meta::CollectionMetaPtr schema, uint32_t concurrency, ThreadPool *thread_pool) { return std::make_shared(collection_name, prefix_path, schema, concurrency, thread_pool); } int Collection::CreateAndOpen(const std::string &collection_name, const std::string &prefix_path, meta::CollectionMetaPtr schema, uint32_t concurrency, ThreadPool *thread_pool, const ReadOptions &read_options, CollectionPtr *collection) { *collection = std::make_shared(collection_name, prefix_path, schema, concurrency, thread_pool); return (*collection)->open(read_options); } Collection::Collection(const std::string &coll_name, const std::string &path, meta::CollectionMetaPtr coll_meta, uint32_t concur, ThreadPool *pool) : collection_name_(coll_name), prefix_path_(path), schema_(std::move(coll_meta)), concurrency_(concur), thread_pool_(pool) {} Collection::~Collection() { if (opened_) { close(); } } int Collection::open(const ReadOptions &read_options) { CHECK_STATUS(opened_, false); dir_path_ = prefix_path_ + "/" + collection_name_; std::string manifest_file_path = FileHelper::MakeFilePath(dir_path_, FileID::MANIFEST_FILE); // check index data if (read_options.create_new) { if (FileHelper::DirectoryExists(dir_path_)) { CLOG_ERROR("Index directory already exist, create failed. dir_path[%s]", dir_path_.c_str()); return ErrorCode_DuplicateCollection; } } else { if (!FileHelper::DirectoryExists(dir_path_) || !FileHelper::FileExists(manifest_file_path)) { CLOG_ERROR( "Index directory or manifest not exist, open failed. dir_path[%s]", dir_path_.c_str()); return ErrorCode_InvalidIndexDataFormat; } } int ret = recover_from_snapshot(read_options); if (ret != 0) { CLOG_ERROR("Recover from snapshot failed."); // if create new collection failed // need to cleanup history files if (read_options.create_new) { this->remove_files(); } return ret; } opened_ = true; CollectionStats stats; this->get_stats(&stats); CLOG_INFO( "Open colletion success. doc_count[%zu] segment_count[%zu] " "max_docs_per_segment[%zu]", (size_t)stats.total_doc_count, (size_t)stats.total_segment_count, (size_t)schema_->max_docs_per_segment()); return 0; } int Collection::close() { CHECK_STATUS(opened_, true); // Wait until dump ended while (is_dumping_) { LOG_INFO("Collection is dumping segment, wait until dumped..."); std::this_thread::sleep_for(std::chrono::seconds(1)); } // Wait until flush ended while (is_flushing_) { LOG_INFO("Collection is flushing, wait until flushed..."); std::this_thread::sleep_for(std::chrono::seconds(1)); } // Wait until optimize ended while (is_optimizing_) { LOG_INFO("Collection is optimizing, wait until optimized..."); std::this_thread::sleep_for(std::chrono::seconds(1)); } // Close writing segment writing_segment_->close(); // maybe dumping segment process exist error // so we still close dumping segment safely if (dumping_segment_ != nullptr) { dumping_segment_->close(); } persist_segment_mgr_->unload_segments(); id_map_->close(); delete_store_->close(); lsn_store_->close(); version_manager_->close(); opened_ = false; CLOG_INFO("Close collection success."); return 0; } int Collection::close_and_cleanup() { CHECK_STATUS(opened_, true); this->close(); this->remove_files(); return 0; } int Collection::flush() { CHECK_STATUS(opened_, true); CLOG_INFO("Start flushing collection."); ailego::ElapsedTime timer; is_flushing_ = true; Defer defer([this] { is_flushing_ = false; }); int ret = 0; ret = writing_segment_->flush(); CHECK_RETURN_WITH_CLOG(ret, 0, "Flush writing segment failed."); ret = id_map_->flush(); CHECK_RETURN_WITH_CLOG(ret, 0, "Flush id map failed."); ret = delete_store_->flush(); CHECK_RETURN_WITH_CLOG(ret, 0, "Flush delete store failed."); ret = lsn_store_->flush(); CHECK_RETURN_WITH_CLOG(ret, 0, "Flush lsn store failed."); version_manager_->update_segment_meta(writing_segment_->segment_meta()); ret = version_manager_->flush(); CHECK_RETURN_WITH_CLOG(ret, 0, "Flush version manager failed."); CLOG_INFO("Ended flushing collection. cost[%zums]", (size_t)timer.milli_seconds()); return 0; } int Collection::dump() { CHECK_STATUS(opened_, true); return this->drive_dump_segment(); } int Collection::optimize(ThreadPoolPtr pool) { CHECK_STATUS(opened_, true); CLOG_INFO("Start optimizing collection."); ailego::ElapsedTime timer; is_optimizing_ = true; Defer defer([this] { is_optimizing_ = false; }); int ret = writing_segment_->optimize(pool); CHECK_RETURN_WITH_CLOG(ret, 0, "Optimize writing segment failed."); CLOG_INFO("Ended optimizing collection. cost[%zums]", (size_t)timer.milli_seconds()); return 0; } int Collection::remove_files() { return FileHelper::RemoveDirectory(dir_path_); } int Collection::write_records(const CollectionDataset &records) { CHECK_STATUS(opened_, true); ailego::ElapsedTime timer; int ret = 0; int error_code = 0; for (size_t i = 0; i < records.size(); i++) { auto &record = records.get(i); uint64_t primary_key = record.primary_key; uint64_t lsn = record.lsn; switch (record.operation_type) { case OperationTypes::INSERT: ret = insert_record(record); if (ret != 0) { error_code = ret; CLOG_ERROR("Insert record failed. key[%zu] lsn[%zu] rt[%zuus]", (size_t)primary_key, (size_t)lsn, (size_t)timer.micro_seconds()); } else { CLOG_INFO("Insert record success. key[%zu] lsn[%zu] rt[%zuus]", (size_t)primary_key, (size_t)lsn, (size_t)timer.micro_seconds()); } break; case OperationTypes::UPDATE: ret = update_record(record); if (ret != 0) { error_code = ret; CLOG_ERROR("Update record failed. key[%zu] lsn[%zu] rt[%zuus]", (size_t)primary_key, (size_t)lsn, (size_t)timer.micro_seconds()); } else { CLOG_INFO("Update record success. key[%zu] lsn[%zu] rt[%zuus]", (size_t)primary_key, (size_t)lsn, (size_t)timer.micro_seconds()); } break; case OperationTypes::DELETE: ret = delete_record(primary_key); if (ret != 0) { error_code = ret; CLOG_ERROR("Delete record failed. key[%zu] lsn[%zu] rt[%zuus]", (size_t)primary_key, (size_t)lsn, (size_t)timer.micro_seconds()); } else { CLOG_INFO("Delete record success. key[%zu] lsn[%zu] rt[%zuus]", (size_t)primary_key, (size_t)lsn, (size_t)timer.micro_seconds()); } break; default: CLOG_ERROR("Unknown operation type. type[%d]", record.operation_type); } } return error_code; } int Collection::insert_record(const Record &record) { // 1. check if record already exists if (this->has_record(record.primary_key)) { CLOG_ERROR("Insert duplicate record. key[%zu]", (size_t)record.primary_key); return ErrorCode_DuplicateKey; } // 2. insert into memory segment idx_t doc_id = INVALID_DOC_ID; int ret = writing_segment_->insert(record, &doc_id); CHECK_RETURN_WITH_CLOG(ret, 0, "Insert into memory segment failed. key[%zu]", (size_t)record.primary_key); // 3. record key/doc_id mapping in id map ret = id_map_->insert(record.primary_key, doc_id); CHECK_RETURN_WITH_CLOG(ret, 0, "Insert into id map failed. key[%zu]", (size_t)record.primary_key); // 4. record in lsn store ret = lsn_store_->append(record.lsn, record.lsn_context); if (ret != 0) { // do not need to terminate insert process CLOG_WARN("Lsn store append failed. key[%zu]", (size_t)record.primary_key); } // try to drive dump writing segment uint64_t max_docs_per_segment = schema_->max_docs_per_segment(); if (max_docs_per_segment > 0 && writing_segment_->doc_count() >= max_docs_per_segment) { drive_dump_segment(); } return 0; } int Collection::delete_record(uint64_t primary_key) { // 1. check if record exist if (!this->has_record(primary_key)) { CLOG_ERROR("Record not exist in colletion. key[%zu]", (size_t)primary_key); return ErrorCode_InexistentKey; } // 2. get key/doc_id mapping idx_t doc_id = id_map_->get_mapping_id(primary_key); if (doc_id == INVALID_DOC_ID) { CLOG_ERROR("Get mapping doc-id failed. key[%zu]", (size_t)primary_key); return ErrorCode_RuntimeError; } // 3. insert into delete map int ret = delete_store_->insert(doc_id); CHECK_RETURN_WITH_CLOG(ret, 0, "Insert into delete map failed."); // 4. remove mapping in id_map id_map_->remove(primary_key); // 5. try to inplace remove in writing segment if (writing_segment_->is_in_range(doc_id)) { ret = writing_segment_->remove(doc_id); CHECK_RETURN_WITH_CLOG(ret, 0, "Remove from writing segment failed."); } return 0; } int Collection::update_record(const Record &record) { // 1. check if record exist if (!this->has_record(record.primary_key)) { CLOG_ERROR("Record not exist in collection. key[%zu]", (size_t)record.primary_key); return ErrorCode_InexistentKey; } // 2. check record lsn int ret = 0; if (record.lsn_check) { Record old_record; ret = this->search_record(record.primary_key, &old_record); if (ret != 0 || old_record.primary_key == INVALID_KEY) { CLOG_ERROR("Search record failed. key[%zu]", (size_t)record.primary_key); return ret; } if (record.lsn <= old_record.lsn) { CLOG_ERROR("Invalid record lsn. key[%zu] lsn[%zu] last_lsn[%zu]", (size_t)record.primary_key, (size_t)record.lsn, (size_t)old_record.lsn); return ErrorCode_InvalidRecord; } } // 3. delete old record ret = this->delete_record(record.primary_key); CHECK_RETURN(ret, 0); // 4. insert new record ret = this->insert_record(record); return ret; } bool Collection::has_record(uint64_t primary_key) { return id_map_->has(primary_key); } int Collection::search_record(uint64_t primary_key, Record *record) { if (!this->has_record(primary_key)) { return 0; } idx_t doc_id = id_map_->get_mapping_id(primary_key); SegmentPtr found_segment = SegmentPtr(); auto &segment_metas = version_manager_->current_version(); // reverse search for newer segment match for (auto it = segment_metas.crbegin(); it != segment_metas.crend(); ++it) { if (doc_id >= it->min_doc_id && doc_id <= it->max_doc_id) { SegmentID segment_id = it->segment_id; found_segment = persist_segment_mgr_->get_segment(segment_id); break; } } if (!found_segment && dumping_segment_ != nullptr) { if (doc_id >= dumping_segment_->segment_meta().min_doc_id && doc_id <= dumping_segment_->segment_meta().max_doc_id) { found_segment = dumping_segment_; } } if (!found_segment && writing_segment_ != nullptr) { found_segment = writing_segment_; } QueryResult result; int ret = found_segment->kv_search(primary_key, &result); if (ret == 0 && result.primary_key != INVALID_KEY) { record->primary_key = result.primary_key; record->revision = result.revision; record->forward_data = std::move(result.forward_data); record->lsn = result.lsn; } return 0; } int Collection::get_latest_lsn(uint64_t *lsn, std::string *lsn_context) { CHECK_STATUS(opened_, true); return lsn_store_->get_latest_lsn(lsn, lsn_context); } int Collection::get_segments(std::vector *segments) { CHECK_STATUS(opened_, true); auto &segment_metas = version_manager_->current_version(); for (size_t i = 0; i < segment_metas.size(); i++) { SegmentID segment_id = segment_metas[i].segment_id; if (persist_segment_mgr_->has_segment(segment_id)) { segments->emplace_back(persist_segment_mgr_->get_segment(segment_id)); } else { // Maybe it's pre-loaded fail, and it will be loaded again. PersistSegmentPtr persist_segment; ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = false; int ret = this->load_persist_segment(segment_metas[i], read_options, &persist_segment); CHECK_RETURN(ret, 0); persist_segment_mgr_->add_segment(persist_segment); segments->emplace_back(persist_segment); } } if (writing_segment_ != nullptr) { segments->emplace_back(writing_segment_); } if (dumping_segment_ != nullptr && !persist_segment_mgr_->has_segment(dumping_segment_->segment_id())) { segments->emplace_back(dumping_segment_); } return 0; } int Collection::get_stats(CollectionStats *stats) { stats->collection_name = collection_name_; stats->collection_path = dir_path_; stats->delete_doc_count = delete_store_->count(); // collect stats of persist segment auto &segment_metas = version_manager_->current_version(); for (size_t i = 0; i < segment_metas.size(); i++) { stats->total_doc_count += segment_metas[i].doc_count; stats->total_index_file_count += segment_metas[i].index_file_count; stats->total_index_file_size += segment_metas[i].index_file_size; stats->total_segment_count++; stats->segment_stats.emplace_back(segment_metas[i]); } // collect stats of memory segment if (dumping_segment_ != nullptr && !persist_segment_mgr_->has_segment(dumping_segment_->segment_id())) { auto &segment_meta = dumping_segment_->segment_meta(); stats->total_doc_count += segment_meta.doc_count; stats->total_index_file_count += segment_meta.index_file_count; stats->total_index_file_size += segment_meta.index_file_size; stats->total_segment_count++; stats->segment_stats.emplace_back(segment_meta); } if (writing_segment_ != nullptr) { auto &segment_meta = writing_segment_->segment_meta(); stats->total_doc_count += segment_meta.doc_count; stats->total_index_file_count += segment_meta.index_file_count; stats->total_index_file_size += segment_meta.index_file_size; stats->total_segment_count++; stats->segment_stats.emplace_back(segment_meta); } stats->total_index_file_count += 4; stats->total_index_file_size += FileHelper::FileSize(id_map_->file_path()); stats->total_index_file_size += FileHelper::FileSize(delete_store_->file_path()); stats->total_index_file_size += FileHelper::FileSize(version_manager_->file_path()); stats->total_index_file_size += FileHelper::FileSize(lsn_store_->file_path()); return 0; } int Collection::update_schema(meta::CollectionMetaPtr new_schema) { CHECK_STATUS(opened_, true); std::lock_guard lock(schema_mutex_); if (is_dumping_) { CLOG_ERROR("Can't update schema while dumping segment."); return ErrorCode_StatusError; } uint32_t new_revision = new_schema->revision(); uint32_t current_revision = schema_->revision(); if (new_revision <= current_revision) { CLOG_ERROR( "New schema revision less than current schema, update failed. " "current_schema[%u] new_schema[%u]", current_revision, new_revision); return ErrorCode_MismatchedSchema; } std::vector add_columns; std::vector delete_columns; this->diff_schema(*new_schema, *schema_, &add_columns, &delete_columns); int ret = 0; std::vector all_segments; ret = this->get_segments(&all_segments); CHECK_RETURN_WITH_CLOG(ret, 0, "Get segments failed."); for (size_t i = 0; i < add_columns.size(); i++) { for (size_t j = 0; j < all_segments.size(); j++) { ret = all_segments[j]->add_column(add_columns[i]); CHECK_RETURN_WITH_CLOG( ret, 0, "Add new column failed. column[%s] segment_id[%zu]", add_columns[i]->name().c_str(), (size_t)all_segments[j]->segment_id()); } } for (size_t i = 0; i < delete_columns.size(); i++) { for (size_t j = 0; j < all_segments.size(); j++) { ret = all_segments[j]->remove_column(delete_columns[i]->name()); CHECK_RETURN_WITH_CLOG(ret, 0, "Remove column failed. column[%s] segment_id[%zu]", delete_columns[i]->name().c_str(), (size_t)all_segments[j]->segment_id()); } } schema_ = new_schema; CLOG_INFO("Update schema success. current_schema[%u] new_schema[%u]", current_revision, new_revision); return 0; } int Collection::drive_dump_segment() { if (is_dumping_.exchange(true)) { return 0; } // 1. create a new segment for writing SegmentMeta new_segment_meta; int ret = version_manager_->alloc_segment_meta(&new_segment_meta); if (ret != 0) { CLOG_ERROR("Alloc segment meta failed."); is_dumping_ = false; return ret; } new_segment_meta.min_doc_id = writing_segment_->segment_meta().max_doc_id + DOC_ID_INCREASE_COUNT; MemorySegmentPtr new_segment; ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; ret = open_memory_segment(new_segment_meta, read_options, &new_segment); if (ret != 0) { is_dumping_ = false; return ret; } // 2. swap writing segment -> flushing segment MemorySegmentPtr tmp_segment = writing_segment_; writing_segment_ = new_segment; dumping_segment_ = std::move(tmp_segment); // 3. record segment state change writing_segment_->update_state(SegmentState::WRITING); version_manager_->update_segment_meta(writing_segment_->segment_meta()); dumping_segment_->flush(); dumping_segment_->update_state(SegmentState::DUMPING); version_manager_->update_segment_meta(dumping_segment_->segment_meta()); // 4. dump memory segment thread_pool_->submit( ailego::Closure::New(this, &Collection::do_dump_segment)); return 0; } int Collection::open_memory_segment(const SegmentMeta &segment_meta, const ReadOptions &read_options, MemorySegmentPtr *new_segment) { int ret = MemorySegment::CreateAndOpen( collection_name_, dir_path_, segment_meta, schema_.get(), delete_store_.get(), id_map_.get(), concurrency_, read_options, new_segment); CHECK_RETURN_WITH_CLOG( ret, 0, "Create and open memory segment failed. segment_id[%zu]", (size_t)segment_meta.segment_id); return 0; } int Collection::load_persist_segment(const SegmentMeta &segment_meta, const ReadOptions &read_options, PersistSegmentPtr *new_segment) { int ret = PersistSegment::CreateAndLoad( collection_name_, dir_path_, segment_meta, schema_.get(), delete_store_.get(), id_map_.get(), concurrency_, read_options, new_segment); CHECK_RETURN_WITH_CLOG( ret, 0, "Create and load persist segment failed. segment_id[%zu]", (size_t)segment_meta.segment_id); return 0; } int Collection::do_dump_segment() { SegmentID segment_id = dumping_segment_->segment_id(); CLOG_INFO("Start dumping segment. segment_id[%zu]", (size_t)segment_id); // dump persist segment with retry int ret = 0; int retry = 0; do { ret = dumping_segment_->dump(); if (ret != 0) { CLOG_ERROR("Dumping segment failed. retry[%d] segment_id[%zu]", retry, (size_t)segment_id); } } while (ret != 0 && retry++ < 2); if (ret != 0) { CLOG_ERROR("Dumping segment failed. segment_id[%zu]", (size_t)segment_id); is_dumping_ = false; return ret; } dumping_segment_->update_state(SegmentState::PERSIST); version_manager_->update_segment_meta(dumping_segment_->segment_meta()); // record in version manager with retry VersionEdit edit; edit.add_segments.emplace_back(segment_id); retry = 0; do { ret = version_manager_->apply(edit); if (ret != 0) { CLOG_ERROR("Apply new version edit failed. retry[%d]", retry); } } while (ret != 0 && retry++ < 2); if (ret != 0) { CLOG_ERROR("Apply new version edit failed."); is_dumping_ = false; return ret; } // try to pre load new persist segment into memory PersistSegmentPtr persist_segment; ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = false; ret = this->load_persist_segment(dumping_segment_->segment_meta(), read_options, &persist_segment); if (ret == 0) { persist_segment_mgr_->add_segment(persist_segment); } // reduce dumping segment ref // if search thread release all the refs // it will trigger dumping segment auto destruct dumping_segment_.reset(); // shift lsn store ret = lsn_store_->shift(); if (ret != 0) { CLOG_WARN("Shift lsn store failed."); } is_dumping_ = false; CLOG_INFO("Ended dumping segment. segment_id[%zu]", (size_t)segment_id); return 0; } int Collection::recover_from_snapshot(const ReadOptions &read_options) { // init version manager int ret = VersionManager::CreateAndOpen(collection_name_, dir_path_, read_options, &version_manager_); CHECK_RETURN_WITH_CLOG(ret, 0, "Create and open version manager failed."); // init id map ret = IDMap::CreateAndOpen(collection_name_, dir_path_, read_options, &id_map_); CHECK_RETURN_WITH_CLOG(ret, 0, "Create and open id map failed."); // init delete store ret = DeleteStore::CreateAndOpen(collection_name_, dir_path_, read_options, &delete_store_); CHECK_RETURN_WITH_CLOG(ret, 0, "Create and open delete store failed."); // init lsn store ret = LsnStore::CreateAndOpen(collection_name_, dir_path_, read_options, &lsn_store_); CHECK_RETURN_WITH_CLOG(ret, 0, "Create and open lsn store failed."); // init writing segment std::vector writing_segment_metas; ret = version_manager_->get_segment_metas(SegmentState::WRITING, &writing_segment_metas); CHECK_RETURN_WITH_CLOG(ret, 0, "Get writing segment meta failed."); ret = this->open_memory_segment(writing_segment_metas[0], read_options, &writing_segment_); CHECK_RETURN(ret, 0); // init dumping segment std::vector dumping_segment_metas; ret = version_manager_->get_segment_metas(SegmentState::DUMPING, &dumping_segment_metas); CHECK_RETURN_WITH_CLOG(ret, 0, "Get dumping segment meta failed."); if (dumping_segment_metas.size() > 0) { ret = this->open_memory_segment(dumping_segment_metas[0], read_options, &dumping_segment_); CHECK_RETURN(ret, 0); // continue to drive dumping segment thread_pool_->submit( ailego::Closure::New(this, &Collection::do_dump_segment)); } // init persist segment manager persist_segment_mgr_ = PersistSegmentManager::Create(collection_name_, dir_path_); if (!persist_segment_mgr_) { CLOG_ERROR("Create persist segment manager failed."); return ErrorCode_RuntimeError; } // load persist segment & add into psm auto &segment_metas = version_manager_->current_version(); for (size_t i = 0; i < segment_metas.size(); i++) { PersistSegmentPtr persist_segment; ReadOptions load_options; load_options.use_mmap = true; load_options.create_new = false; ret = this->load_persist_segment(segment_metas[i], load_options, &persist_segment); CHECK_RETURN(ret, 0); persist_segment_mgr_->add_segment(persist_segment); } return 0; } void Collection::diff_schema(const meta::CollectionMeta &new_schema, const meta::CollectionMeta ¤t_schema, std::vector *add_columns, std::vector *delete_columns) { auto &new_columns = new_schema.index_columns(); auto ¤t_columns = current_schema.index_columns(); // search in new schema // if column not found in current schema // just add into new columns for (auto &new_column : new_columns) { auto it = std::find_if(current_columns.begin(), current_columns.end(), [new_column](const meta::ColumnMetaPtr &cur_column) { return new_column->name() == cur_column->name(); }); if (it == current_columns.end()) { add_columns->emplace_back(new_column); } } // search in current schema // if column not found in new schema // just mark it into delete columns for (auto &cur_column : current_columns) { auto it = std::find_if(new_columns.begin(), new_columns.end(), [cur_column](const meta::ColumnMetaPtr &new_column) { return cur_column->name() == new_column->name(); }); if (it == current_columns.end()) { delete_columns->emplace_back(cur_column); } } } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/collection.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Collection provides add/delete/modify operations of single * collection */ #pragma once #include "common/macro_define.h" #include "meta/meta.h" #include "segment/memory_segment.h" #include "segment/persist_segment_manager.h" #include "collection_dataset.h" #include "collection_stats.h" #include "delete_store.h" #include "id_map.h" #include "lsn_store.h" #include "version_manager.h" namespace proxima { namespace be { namespace index { class Collection; using CollectionPtr = std::shared_ptr; /* * Collection is responsible for data storage, building index, * and searching index. It use traditional LSM structure for * data processing and storing. Data will insert into a memory * segment, when full it will dump to a persist segment. */ class Collection { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(Collection); //! Constructor Collection(const std::string &collection_name, const std::string &prefix_path, meta::CollectionMetaPtr schema, uint32_t concurrency, ThreadPool *thread_pool); //! Destructor ~Collection(); //! Create an instance static CollectionPtr Create(const std::string &collection_name, const std::string &prefix_path, meta::CollectionMetaPtr schema, uint32_t concurrency, ThreadPool *thread_pool); //! Crate an instance and open static int CreateAndOpen(const std::string &collection_name, const std::string &prefix_path, meta::CollectionMetaPtr schema, uint32_t concurrency, ThreadPool *thread_pool, const ReadOptions &read_options, CollectionPtr *collection); public: //! Open and initialize collection int open(const ReadOptions &read_options); //! Close collection int close(); //! Close collection and cleanup files int close_and_cleanup(); //! Flush collection's memory to persist storage int flush(); //! Dump collection's memory segment to persist segment int dump(); //! Optimize collection memory usage int optimize(ThreadPoolPtr pool); public: //! Batch write records int write_records(const CollectionDataset &records); //! Get latest lsn context of record int get_latest_lsn(uint64_t *lsn, std::string *lsn_context); //! Get all segments int get_segments(std::vector *segments); //! Get statistics int get_stats(CollectionStats *stats); public: //! Update schema int update_schema(meta::CollectionMetaPtr new_schema); public: //! Get collection name const std::string &collection_name() const { return collection_name_; } //! Get collection disk path const std::string &dir_path() const { return dir_path_; } //! Get collection schema const meta::CollectionMetaPtr &schema() { return schema_; } private: int recover_from_snapshot(const ReadOptions &read_options); int remove_files(); int open_memory_segment(const SegmentMeta &segment_meta, const ReadOptions &read_options, MemorySegmentPtr *new_segment); int load_persist_segment(const SegmentMeta &segment_meta, const ReadOptions &read_options, PersistSegmentPtr *new_segment); int drive_dump_segment(); int do_dump_segment(); void diff_schema(const meta::CollectionMeta &new_schema, const meta::CollectionMeta ¤t_schema, std::vector *add_columns, std::vector *delete_columns); int insert_record(const Record &record); int delete_record(uint64_t primary_key); int update_record(const Record &record); bool has_record(uint64_t primary_key); int search_record(uint64_t primary_key, Record *record); private: static constexpr uint32_t DOC_ID_INCREASE_COUNT = 1000; private: std::string collection_name_{}; std::string prefix_path_{}; std::string dir_path_{}; meta::CollectionMetaPtr schema_{}; uint32_t concurrency_{0U}; ThreadPool *thread_pool_{nullptr}; IDMapPtr id_map_{}; DeleteStorePtr delete_store_{}; LsnStorePtr lsn_store_{}; MemorySegmentPtr writing_segment_{}; MemorySegmentPtr dumping_segment_{}; VersionManagerPtr version_manager_{}; PersistSegmentManagerPtr persist_segment_mgr_{}; std::mutex schema_mutex_{}; std::atomic is_dumping_{false}; std::atomic is_flushing_{false}; std::atomic is_optimizing_{false}; bool opened_{false}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/collection_dataset.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of collection dataset */ #include "collection_dataset.h" namespace proxima { namespace be { namespace index { CollectionDataset::RowData *CollectionDataset::add_row_data() { records_.resize(records_.size() + 1); return &records_[records_.size() - 1]; } const CollectionDataset::RowData &CollectionDataset::get(size_t i) const { return records_[i]; } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/collection_dataset.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Format of collection writing requests */ #pragma once #include #include #include "common/macro_define.h" #include "common/types.h" #include "constants.h" namespace proxima { namespace be { namespace index { class CollectionDataset; using CollectionDatasetPtr = std::shared_ptr; /* * CollectionDataset represents a batch of insert/update/delete requests. * A RowData represents a record, it consists of several ColumnData. * A ColumnData contains field name and field value. */ class CollectionDataset { public: //! ColumnData represents index column data struct ColumnData { std::string column_name{}; DataTypes data_type{DataTypes::UNDEFINED}; uint32_t dimension{0U}; std::string data{}; }; //! A RowData contains serveral index columns and forward data struct RowData { OperationTypes operation_type{OperationTypes::UNDEFINED}; uint64_t primary_key{0U}; uint32_t revision{0U}; uint64_t lsn{0U}; std::string lsn_context{}; bool lsn_check{false}; uint64_t timestamp{0U}; std::string forward_data{}; std::vector column_datas{}; RowData() { primary_key = INVALID_KEY; } }; public: //! Constructor CollectionDataset(uint32_t schema_rev) : schema_revision_(schema_rev) {} //! Destructor ~CollectionDataset() = default; public: //! Add a row data RowData *add_row_data(); //! Return a row const RowData &get(size_t i) const; //! Return row size size_t size() const { return records_.size(); } //! Return if empty bool empty() const { return records_.empty(); } //! Clear rows void clear() { records_.clear(); } //! Get schema revision uint32_t get_schema_revision() const { return schema_revision_; } private: uint32_t schema_revision_{0U}; std::vector records_{}; }; using Record = CollectionDataset::RowData; using ColumnData = CollectionDataset::ColumnData; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/collection_query.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Format of collection quries */ #pragma once #include #include #include "common/types.h" #include "constants.h" namespace proxima { namespace be { namespace index { struct QueryResult; using QueryResultList = std::vector; using QueryResultListConstIter = std::vector::const_iterator; /* * QueryParams represents knn query params. */ struct QueryParams { uint32_t topk{0U}; DataTypes data_type{DataTypes::UNDEFINED}; uint32_t dimension{0U}; float radius{0.0f}; uint64_t query_id{0U}; bool is_linear{false}; aitheta2::IndexParams extra_params{}; }; /* * QueryResult describes the format of knn query response */ struct QueryResult { uint64_t primary_key{0U}; float score{0.0f}; uint64_t revision{0U}; std::string forward_data{}; uint64_t lsn{0U}; bool reverse_sort{false}; QueryResult() { primary_key = INVALID_KEY; } bool operator<(const QueryResult &other) const { if (reverse_sort) { return score > other.score; } else { return score < other.score; } } }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/collection_stats.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Format of collection statistics */ #pragma once #include "segment/segment.h" namespace proxima { namespace be { namespace index { /* SegmentStats looks like SegmentMeta, but it will expand * many fields for statistics, so we just split it out. * And SegmentStats is allowed to store many not-POD type data, * and provide debug string interface. */ struct SegmentStats { uint32_t segment_id{0U}; uint32_t state{0U}; uint64_t doc_count{0U}; uint64_t index_file_count{0U}; uint64_t index_file_size{0U}; uint64_t min_doc_id{0U}; uint64_t max_doc_id{0U}; uint64_t min_primary_key{0U}; uint64_t max_primary_key{0U}; uint64_t min_timestamp{0U}; uint64_t max_timestamp{0U}; uint64_t min_lsn{0U}; uint64_t max_lsn{0U}; SegmentStats(const SegmentMeta &segment_meta) { segment_id = segment_meta.segment_id; state = segment_meta.state; doc_count = segment_meta.doc_count; index_file_count = segment_meta.index_file_count; index_file_size = segment_meta.index_file_size; min_doc_id = segment_meta.min_doc_id; max_doc_id = segment_meta.max_doc_id; min_primary_key = segment_meta.min_primary_key; max_primary_key = segment_meta.max_primary_key; min_timestamp = segment_meta.min_timestamp; max_timestamp = segment_meta.max_timestamp; min_lsn = segment_meta.min_lsn; max_lsn = segment_meta.max_lsn; } }; /* * CollectionStats contains some important metrics of collection. * It contains serveral segments, at least one. */ struct CollectionStats { std::string collection_name{}; std::string collection_path{}; uint64_t total_doc_count{0U}; uint64_t delete_doc_count{0U}; uint64_t total_segment_count{0U}; uint64_t total_index_file_count{0U}; uint64_t total_index_file_size{0U}; std::vector segment_stats{}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/column_indexer.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Jun 2021 * \brief ColumnIndexer can streamly process column * data, building index and dump to persist index. */ #include "column_indexer.h" #include "vector_column_indexer.h" namespace proxima { namespace be { namespace index { ColumnIndexerPtr ColumnIndexer::Create(const std::string &collection_name, const std::string &collection_path, SegmentID segment_id, const std::string &column_name, IndexTypes index_type) { switch (index_type) { case IndexTypes::PROXIMA_GRAPH_INDEX: return std::make_shared( collection_name, collection_path, segment_id, column_name); default: return ColumnIndexerPtr(); } } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/column_indexer.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Jun 2021 * \brief ColumnIndexer can streamly process column * data, building index and dump to persist index. */ #pragma once #include "column_reader.h" namespace proxima { namespace be { namespace index { class ColumnIndexer; using ColumnIndexerPtr = std::shared_ptr; /* * ColumnIndexer can process column data streamly. After * accumulating to a certain amount, it will dump to * a full index type. */ class ColumnIndexer : public ColumnReader { public: //! Destructor virtual ~ColumnIndexer() = default; //! Create instance and return a shared ptr static ColumnIndexerPtr Create(const std::string &collection_name, const std::string &collection_path, SegmentID segment_id, const std::string &column_name, IndexTypes index_type); public: //! Flush snapshot virtual int flush() = 0; //! Dump to another kind of index virtual int dump(IndexDumperPtr dumper) = 0; //! Insert column data virtual int insert(idx_t doc_id, const ColumnData &column_data) = 0; #if 0 //! Update column data by doc_id virtual int update(idx_t doc_id, const ColumnData &column_data) = 0; #endif //! Optimize index structure virtual int optimize(ThreadPoolPtr /*pool */) { return 0; } //! Remove column data by doc_id virtual int remove(idx_t /*doc_id */) { return 0; } }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/column_reader.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Jun 2021 * \brief ColumnReader load column index data and provides read ability */ #include "column_reader.h" #include "vector_column_reader.h" namespace proxima { namespace be { namespace index { ColumnReaderPtr ColumnReader::Create(const std::string &collection_name, const std::string &collection_path, SegmentID segment_id, const std::string &column_name, IndexTypes index_type) { switch (index_type) { case IndexTypes::PROXIMA_GRAPH_INDEX: return std::make_shared( collection_name, collection_path, segment_id, column_name); default: return ColumnReaderPtr(); } } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/column_reader.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Jun 2021 * \brief ColumnReader load column index data and provides read interfaces. */ #pragma once #include #include "index_provider.h" #include "../collection_dataset.h" #include "../collection_query.h" #include "../snapshot.h" namespace proxima { namespace be { namespace index { class ColumnReader; using ColumnReaderPtr = std::shared_ptr; using FilterFunction = std::function; /* * ColumnReader load persist column index, and provides search interfaces. */ class ColumnReader : public IndexProvider { public: //! Constructor ColumnReader() { concurrency_ = std::thread::hardware_concurrency(); } //! Destructor virtual ~ColumnReader() = default; //! Create an instance and return shared ptr static ColumnReaderPtr Create(const std::string &collection_name, const std::string &collection_path, SegmentID segment_id, const std::string &column_name, IndexTypes index_type); public: //! Open snapshot on persist storage virtual int open(const meta::ColumnMeta &column_meta, const ReadOptions &read_options) = 0; //! Close persist storage virtual int close() = 0; //! Search similar results with query virtual int search(const std::string &query, const QueryParams &query_params, FilterFunction filter, IndexDocumentList *result_list) = 0; //! Batch search similar results with query virtual int search(const std::string &query, const QueryParams &query_params, uint32_t batch_count, FilterFunction filter, std::vector *batch_result_list) = 0; public: //! Set concurrency void set_concurrency(uint32_t val) { concurrency_ = val; } //! Return concurrency uint32_t concurrency() { return concurrency_; } private: uint32_t concurrency_{0U}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/context_pool.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of context pool */ #include "context_pool.h" namespace proxima { namespace be { namespace index { void ContextPool::emplace(IndexContextPtr ctx) { std::lock_guard lock(mutex_); contexts_.push(std::move(ctx)); } IndexContextPtr ContextPool::acquire() { IndexContextPtr ctx; std::unique_lock lock(mutex_); not_empty_cond_.wait(lock, [this] { return !contexts_.empty(); }); ctx = std::move(contexts_.front()); contexts_.pop(); return ctx; } void ContextPool::release(IndexContextPtr ctx) { std::lock_guard lock(mutex_); contexts_.push(std::move(ctx)); not_empty_cond_.notify_one(); } void ContextPool::clear() { std::lock_guard lock(mutex_); std::queue empty_q; contexts_.swap(empty_q); } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/context_pool.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Reserving context of vector inserting/searching */ #pragma once #include #include #include #include "common/macro_define.h" #include "../typedef.h" namespace proxima { namespace be { namespace index { /* * Storage of proxima search context */ class ContextPool { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(ContextPool); //! Constructor ContextPool() = default; //! Destructor ~ContextPool() = default; //! Emplace a context from pool void emplace(IndexContextPtr ctx); //! Acauire a context from pool IndexContextPtr acquire(); //! Return a context to pool void release(IndexContextPtr ctx); //! Clear context pool void clear(); private: std::queue contexts_{}; std::mutex mutex_{}; std::condition_variable_any not_empty_cond_{}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/forward_data.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Jun 2021 * \brief ForwardData describes the format of forward data */ #pragma once #include #include "../constants.h" namespace proxima { namespace be { namespace index { /* * ForwardData packed some meta info with forward data. * It provides serialize and deserilize ability. */ struct ForwardData { public: /* * ForwardHeader contains some header fields. */ struct ForwardHeader { uint64_t primary_key{0U}; uint64_t timestamp{0U}; uint32_t revision{0U}; uint64_t lsn{0U}; ForwardHeader() { primary_key = INVALID_KEY; } }; //! Serialize to bytes string void serialize(std::string *buf) const { buf->clear(); buf->append((const char *)&header, sizeof(ForwardHeader)); buf->append(data); } //! Deserialize from bytes string void deserialize(const std::string &buf) { header = *((ForwardHeader *)buf.data()); data.assign(buf.data() + sizeof(ForwardHeader), buf.size() - sizeof(ForwardHeader)); } ForwardHeader header{}; std::string data{}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/forward_indexer.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Jun 2021 * \brief ForwardIndexer can streamly process multiple column * data, building forward index and dump to persist index. */ #include "forward_indexer.h" #include "simple_forward_indexer.h" namespace proxima { namespace be { namespace index { ForwardIndexerPtr ForwardIndexer::Create(const std::string &collection_name, const std::string &collection_path, SegmentID segment_id) { return std::make_shared(collection_name, collection_path, segment_id); } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/forward_indexer.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Jun 2021 * \brief ForwardIndexer can streamly process multiple column * data, building forward index and dump to persist index. */ #pragma once #include "forward_reader.h" namespace proxima { namespace be { namespace index { class ForwardIndexer; using ForwardIndexerPtr = std::shared_ptr; /* * ForwardIndexer process forward data streamly. After * accumulating to a certain amount, it will dump to * full index, which is persist on disk. * */ class ForwardIndexer : public ForwardReader { public: //! Destructor virtual ~ForwardIndexer() = default; //! Create an instance and return a shared ptr static ForwardIndexerPtr Create(const std::string &collection_name, const std::string &collection_path, SegmentID segment_id); public: //! Flush to persist storage virtual int flush() = 0; //! Dump to full index type virtual int dump(IndexDumperPtr dumper) = 0; //! Insert a forward data, and return its local index. virtual int insert(const ForwardData &forward_data, idx_t *doc_id) = 0; #if 0 //! Update forward data by doc_id virtual int update(idx_t doc_id, const ForwardData &forward_data) = 0; #endif //! Remove forward data by doc_id virtual int remove(idx_t doc_id) = 0; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/forward_reader.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Jun 2021 * \brief ForwardReader load forward index and provides read ability. */ #include "forward_reader.h" #include "simple_forward_reader.h" namespace proxima { namespace be { namespace index { ForwardReaderPtr ForwardReader::Create(const std::string &collection_name, const std::string &collection_path, SegmentID segment_id) { return std::make_shared(collection_name, collection_path, segment_id); } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/forward_reader.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Jun 2021 * \brief ForwardReader load forward index and provides read ability. */ #pragma once #include #include "forward_data.h" #include "index_provider.h" #include "../snapshot.h" #include "../typedef.h" namespace proxima { namespace be { namespace index { class ForwardReader; using ForwardReaderPtr = std::shared_ptr; /* * ForwardReader load persist forward index, and provides * seek ability. */ class ForwardReader : public IndexProvider { public: //! Destructor virtual ~ForwardReader() = default; public: //! Create an instance and return a shared ptr static ForwardReaderPtr Create(const std::string &collection_name, const std::string &collection_path, SegmentID segment_id); public: //! Open and load forward index file virtual int open(const ReadOptions &read_options) = 0; //! Close and release forward index file virtual int close() = 0; //! Seek a specific doc id virtual int seek(idx_t doc_id, ForwardData *forward_data) = 0; public: //! Set min doc id void set_start_doc_id(uint32_t val) { start_doc_id_ = val; } //! Get min doc id uint32_t start_doc_id() { return start_doc_id_; } private: uint32_t start_doc_id_{0U}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/index_helper.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Jun 2021 * \brief Helper class for transforming types */ #include "index_helper.h" namespace proxima { namespace be { namespace index { FeatureTypes IndexHelper::GetProximaFeatureType(DataTypes data_type) { switch (data_type) { case DataTypes::VECTOR_BINARY32: return FeatureTypes::FT_BINARY32; case DataTypes::VECTOR_BINARY64: return FeatureTypes::FT_BINARY64; case DataTypes::VECTOR_FP16: return FeatureTypes::FT_FP16; case DataTypes::VECTOR_FP32: return FeatureTypes::FT_FP32; case DataTypes::VECTOR_FP64: return FeatureTypes::FT_FP64; case DataTypes::VECTOR_INT4: return FeatureTypes::FT_INT4; case DataTypes::VECTOR_INT8: return FeatureTypes::FT_INT8; case DataTypes::VECTOR_INT16: return FeatureTypes::FT_INT16; default: return FeatureTypes::FT_UNDEFINED; } } QuantizeTypes IndexHelper::GetQuantizeType(const std::string &quantize_type) { if (quantize_type == "DT_VECTOR_FP16") { return QuantizeTypes::VECTOR_FP16; } else if (quantize_type == "DT_VECTOR_INT8") { return QuantizeTypes::VECTOR_INT8; } else if (quantize_type == "DT_VECTOR_INT4") { return QuantizeTypes::VECTOR_INT4; } else { return QuantizeTypes::UNDEFINED; } } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/index_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Jun 2021 * \brief Helper class for transforming types */ #include "../typedef.h" namespace proxima { namespace be { namespace index { /* * QuantizeTypes support FP16/INT8/INT4 */ enum class QuantizeTypes : uint32_t { UNDEFINED = 0, VECTOR_FP16 = 1, VECTOR_INT8 = 2, VECTOR_INT4 = 3 }; /* * Helper calss for transforming some inner types. */ class IndexHelper { public: //! Transform data type to proxima feature type static FeatureTypes GetProximaFeatureType(DataTypes data_type); //! Tranform str to quantize type static QuantizeTypes GetQuantizeType(const std::string &quantize_type); }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/index_provider.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Jun 2021 * \brief IndexProvider provides column index information */ #pragma once #include "meta/meta.h" #include "../constants.h" #include "../typedef.h" namespace proxima { namespace be { namespace index { /* * IndexProvider provides some detail info about the column or forward index. */ class IndexProvider { public: //! Destructor virtual ~IndexProvider() = default; public: //! Return collection name const std::string &collection_name() const { return collection_name_; } //! Return collection path const std::string &collection_path() const { return collection_path_; } //! Return segment id SegmentID segment_id() const { return segment_id_; } //! Return column name //! Forward will return "" const std::string &column_name() const { return column_name_; } //! Return document count virtual size_t doc_count() const = 0; //! Return index file path virtual std::string index_file_path() const = 0; protected: void set_collection_name(const std::string &val) { collection_name_ = val; } void set_collection_path(const std::string &val) { collection_path_ = val; } void set_segment_id(SegmentID val) { segment_id_ = val; } void set_column_name(const std::string &val) { column_name_ = val; } private: std::string collection_name_{}; std::string collection_path_{}; SegmentID segment_id_{INVALID_SEGMENT_ID}; std::string column_name_{}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/simple_forward_indexer.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of simple forward indexer */ #include "simple_forward_indexer.h" #include "common/error_code.h" #include "forward_indexer.h" #include "../file_helper.h" namespace proxima { namespace be { namespace index { SimpleForwardIndexer::~SimpleForwardIndexer() { if (opened_) { this->close(); } } int SimpleForwardIndexer::open(const ReadOptions &read_options) { CHECK_STATUS(opened_, false); int ret = Snapshot::CreateAndOpen(this->collection_path(), FileID::FORWARD_FILE, this->segment_id(), read_options, &snapshot_); CHECK_RETURN_WITH_SLOG(ret, 0, "Create snapshot failed."); ret = open_proxima_forward(); CHECK_RETURN_WITH_SLOG(ret, 0, "Open proxima forward failed."); opened_ = true; return 0; } int SimpleForwardIndexer::close() { CHECK_STATUS(opened_, true); proxima_forward_->close(); int ret = snapshot_->close(); if (ret != 0) { SLOG_WARN("Close snapshot failed."); } opened_ = false; return ret; } int SimpleForwardIndexer::flush() { CHECK_STATUS(opened_, true); return proxima_forward_->flush(0); } int SimpleForwardIndexer::dump(IndexDumperPtr dumper) { CHECK_STATUS(opened_, true); return proxima_forward_->dump(dumper); } int SimpleForwardIndexer::insert(const ForwardData &forward_data, idx_t *doc_id) { CHECK_STATUS(opened_, true); uint64_t index = 0U; std::string buffer; forward_data.serialize(&buffer); uint64_t key = forward_data.header.primary_key; int ret = proxima_forward_->append(buffer.data(), buffer.size(), &index); CHECK_RETURN_WITH_SLOG(ret, 0, "Append forward failed. key[%zu] ret[%d]", (size_t)key, ret); *doc_id = this->start_doc_id() + index; return 0; } #if 0 int SimpleForwardIndexer::update(idx_t doc_id, const ForwardData &forward_data) { CHECK_STATUS(opened_, true); uint64_t key = forward_data.header.primary_key; uint64_t index = doc_id - this->start_doc_id(); std::string buffer; forward_data.serialize(&buffer); int ret = proxima_forward_->update(index, buffer.data(), buffer.size()); CHECK_RETURN_WITH_SLOG( ret, 0, "Update forward data failed. key[%zu] doc_id[%zu] index[%zu] ret[%d]", (size_t)key, (size_t)doc_id, (size_t)index, ret); return 0; } #endif int SimpleForwardIndexer::remove(idx_t doc_id) { CHECK_STATUS(opened_, true); uint64_t index = doc_id - this->start_doc_id(); int ret = proxima_forward_->erase(index); CHECK_RETURN_WITH_SLOG( ret, 0, "Remove forward data failed. doc_id[%zu] index[%zu] ret[%d]", (size_t)doc_id, (size_t)index, ret); return 0; } int SimpleForwardIndexer::seek(idx_t doc_id, ForwardData *forward_data) { CHECK_STATUS(opened_, true); uint64_t index = doc_id - this->start_doc_id(); std::string buffer; int ret = proxima_forward_->fetch(index, &buffer); CHECK_RETURN_WITH_SLOG( ret, 0, "Forward store fetch failed. doc_id[%zu] index[%zu] ret[%d]", (size_t)doc_id, (size_t)index, ret); forward_data->deserialize(buffer); return 0; } int SimpleForwardIndexer::open_proxima_forward() { proxima_forward_ = aitheta2::IndexFactory::CreateCloset("ChainCloset"); if (!proxima_forward_) { SLOG_ERROR("Create proxima forward failed."); return ErrorCode_RuntimeError; } aitheta2::IndexParams params; params.set("proxima.chain.closet.slot_size", 128); int ret = proxima_forward_->init(params); CHECK_RETURN_WITH_SLOG(ret, 0, "Init proxima forward failed."); ret = proxima_forward_->open(snapshot_->data()); CHECK_RETURN_WITH_SLOG(ret, 0, "Open proxima forward failed. ret[%d]", ret); return 0; } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/simple_forward_indexer.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief SimpleForwardIndexer is simple implementation of ForwardIndexer. */ #pragma once #include #include #include "common/macro_define.h" #include "common/types.h" #include "forward_indexer.h" #include "../snapshot.h" #include "../typedef.h" namespace proxima { namespace be { namespace index { class SimpleForwardIndexer; using SimpleForwardIndexerPtr = std::shared_ptr; /* * SimpleForwardIndexer implement ForwardIndexer with proxima simple forward * module. */ class SimpleForwardIndexer : public ForwardIndexer { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(SimpleForwardIndexer); //! Constructor SimpleForwardIndexer(const std::string &coll_name, const std::string &coll_path, SegmentID seg_id) { this->set_collection_name(coll_name); this->set_collection_path(coll_path); this->set_segment_id(seg_id); } //! Destructor ~SimpleForwardIndexer(); public: //! Open persist storage int open(const ReadOptions &read_options) override; //! Close persist storage int close() override; //! Flush memory to persist storage int flush() override; //! Dump forward index int dump(IndexDumperPtr dumper) override; public: //! Insert forward data int insert(const ForwardData &fwd_data, idx_t *doc_id) override; #if 0 //! Update forward data int update(idx_t doc_id, const ForwardData &forward_data) override; #endif //! Remove forward data int remove(idx_t doc_id) override; //! Seek forward data by doc id int seek(idx_t doc_id, ForwardData *fwd_data) override; public: //! Return index path std::string index_file_path() const override { if (snapshot_) { return snapshot_->file_path(); } else { return ""; } } //! Return doc count size_t doc_count() const override { if (proxima_forward_) { return proxima_forward_->count(); } else { return 0U; } } private: int open_proxima_forward(); private: SnapshotPtr snapshot_{}; IndexClosetPtr proxima_forward_{}; bool opened_{false}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/simple_forward_reader.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of forward searcher */ #include "simple_forward_reader.h" #include "common/error_code.h" namespace proxima { namespace be { namespace index { SimpleForwardReader::~SimpleForwardReader() { // TODO can't call virtual function if (opened_) { close(); } } int SimpleForwardReader::open(const ReadOptions &read_options) { CHECK_STATUS(opened_, false); int ret = open_proxima_container(read_options); CHECK_RETURN(ret, 0); ret = open_forward_searcher(); CHECK_RETURN(ret, 0); opened_ = true; return 0; } int SimpleForwardReader::close() { CHECK_STATUS(opened_, true); forward_searcher_->unload(); opened_ = false; return 0; } int SimpleForwardReader::seek(idx_t doc_id, ForwardData *forward) { CHECK_STATUS(opened_, true); uint64_t index = doc_id - this->start_doc_id(); std::string buffer; int ret = forward_searcher_->fetch(index, &buffer); CHECK_RETURN_WITH_SLOG(ret, 0, "Forward searcher fetch failed."); forward->deserialize(buffer); return 0; } int SimpleForwardReader::open_proxima_container( const ReadOptions &read_options) { index_file_path_ = FileHelper::MakeFilePath( this->collection_path(), FileID::SEGMENT_FILE, this->segment_id()); if (read_options.use_mmap) { container_ = aitheta2::IndexFactory::CreateContainer("MMapFileContainer"); } else { container_ = aitheta2::IndexFactory::CreateContainer("MemoryContainer"); } // Default set warmup flag IndexParams container_params; container_params.set("proxima.mmap_file.container.memory_warmup", true); int ret = container_->init(container_params); CHECK_RETURN_WITH_LLOG(ret, 0, "Container init failed. ret[%d]", ret); ret = container_->load(index_file_path_); CHECK_RETURN_WITH_LLOG(ret, 0, "Container load failed. ret[%d] file[%s]", ret, index_file_path_.c_str()); return 0; } int SimpleForwardReader::open_forward_searcher() { forward_searcher_ = aitheta2::IndexFactory::CreateImmutableCloset("ChainImmutableCloset"); if (!forward_searcher_) { SLOG_ERROR("Create proxima forward searcher failed."); return ErrorCode_RuntimeError; } auto forward_block = container_->get(FORWARD_DUMP_BLOCK); if (!forward_block) { LLOG_ERROR("Can't find forward block in index file"); return ErrorCode_InvalidSegment; } auto block_container = std::make_shared(forward_block); int ret = block_container->load(); CHECK_RETURN_WITH_SLOG(ret, 0, "Load forward container failed."); ret = forward_searcher_->load(block_container); CHECK_RETURN_WITH_SLOG(ret, 0, "Load proxima forward searcher failed. ret[%d]", ret); return 0; } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/simple_forward_reader.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief SimpleForwardReader can open a persist forward index, and * provides search ability. */ #pragma once #include #include "common/macro_define.h" #include "common/types.h" #include "forward_reader.h" #include "../collection_dataset.h" #include "../typedef.h" namespace proxima { namespace be { namespace index { class SimpleForwardReader; using SimpleForwardReaderPtr = std::shared_ptr; /* * SimpleForwardReader can open persist forward index, load into memory, * and provides search ability. */ class SimpleForwardReader : public ForwardReader { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(SimpleForwardReader); //! Constructor SimpleForwardReader(const std::string &coll_name, const std::string &coll_path, SegmentID seg_id) { this->set_collection_name(coll_name); this->set_collection_path(coll_path); this->set_segment_id(seg_id); } //! Destructor ~SimpleForwardReader(); public: //! Open persist storage int open(const ReadOptions &read_options) override; //! Close persist storage int close() override; //! Get forward by doc id int seek(idx_t doc_id, ForwardData *forward) override; public: //! Return index path std::string index_file_path() const override { return index_file_path_; } //! Return doc count size_t doc_count() const override { if (forward_searcher_) { return forward_searcher_->count(); } else { return 0U; } } private: int open_proxima_container(const ReadOptions &read_options); int open_forward_searcher(); private: IndexContainerPtr container_{}; IndexImmutableClosetPtr forward_searcher_{}; std::string index_file_path_{}; bool opened_{false}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/vector_column_indexer.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of column indexer */ #include "vector_column_indexer.h" #include "common/defer.h" #include "common/logger.h" #include "../file_helper.h" namespace proxima { namespace be { namespace index { VectorColumnIndexer::~VectorColumnIndexer() { // TODO can't call virtual function if (opened_) { this->close(); } } int VectorColumnIndexer::open(const meta::ColumnMeta &column_meta, const ReadOptions &read_options) { CHECK_STATUS(opened_, false); if (!check_column_meta(column_meta)) { LLOG_ERROR("Check column meta failed."); return ErrorCode_ConfigError; } // open snapshot int ret = Snapshot::CreateAndOpen( this->collection_path(), FileID::PROXIMA_FILE, this->segment_id(), this->column_name(), read_options, &snapshot_); CHECK_RETURN_WITH_LLOG(ret, 0, "Create and open snapshot failed. ret[%d]", ret); // open proxima streamer ret = open_proxima_streamer(); CHECK_RETURN_WITH_LLOG(ret, 0, "Open proxima streamer failed."); opened_ = true; return 0; } int VectorColumnIndexer::close() { CHECK_STATUS(opened_, true); context_pool_.clear(); proxima_streamer_->cleanup(); int ret = snapshot_->close(); if (ret != 0) { LLOG_WARN("Close snapshot failed."); } opened_ = false; return ret; } int VectorColumnIndexer::flush() { CHECK_STATUS(opened_, true); return proxima_streamer_->flush(0); } int VectorColumnIndexer::dump(IndexDumperPtr dumper) { CHECK_STATUS(opened_, true); return proxima_streamer_->dump(dumper); } int VectorColumnIndexer::insert(idx_t doc_id, const ColumnData &column_data) { CHECK_STATUS(opened_, true); // Check column data if legal IndexQueryMeta query_meta; auto feature_type = IndexHelper::GetProximaFeatureType(column_data.data_type); auto dimension = column_data.dimension; if (feature_type != FeatureTypes::FT_UNDEFINED && dimension != 0) { query_meta.set_meta(feature_type, dimension); } else { query_meta.set_meta(proxima_meta_.type(), proxima_meta_.dimension()); } if (query_meta.type() != proxima_meta_.type() || query_meta.dimension() != proxima_meta_.dimension()) { LLOG_ERROR( "Invalid record, input query feature type or dimension not matched. " "query_feature_type[%d] query_dimension[%u] feature_type[%d] " "dimension[%u]", query_meta.type(), query_meta.dimension(), proxima_meta_.type(), proxima_meta_.dimension()); return ErrorCode_InvalidRecord; } const std::string &vector = column_data.data; uint32_t expect_size = proxima_meta_.element_size(); if (vector.size() != expect_size) { LLOG_ERROR( "Invalid record, vector size mismatch. expect_size[%u] " "actual_size[%zu]", expect_size, vector.size()); return ErrorCode_InvalidRecord; } // Get context and set properties. // Notice we must return back to pool in the end. auto ctx = context_pool_.acquire(); Defer defer([&ctx, this] { context_pool_.release(std::move(ctx)); }); int ret = 0; // Check if need to use quantizer if (quantize_type_ != QuantizeTypes::UNDEFINED && reformer_ != nullptr) { std::string new_vector; IndexQueryMeta new_meta; ret = reformer_->convert(vector.data(), query_meta, &new_vector, &new_meta); CHECK_RETURN_WITH_LLOG(ret, 0, "Reformer transform data failed. ret[%d]", ret); ret = proxima_streamer_->add_impl(doc_id, new_vector.data(), new_meta, ctx); } else { ret = proxima_streamer_->add_impl(doc_id, vector.data(), query_meta, ctx); } CHECK_RETURN_WITH_LLOG(ret, 0, "Insert proxima streamer failed. ret[%d] reason[%s]", ret, aitheta2::IndexError::What(ret)); return 0; } #if 0 int VectorColumnIndexer::update(idx_t doc_id, const ColumnData &column_data) { CHECK_STATUS(opened_, true); // Check column data if legal IndexQueryMeta query_meta; auto feature_type = IndexHelper::GetProximaFeatureType(column_data.data_type); auto dimension = column_data.dimension; if (feature_type != FeatureTypes::FT_UNDEFINED && dimension != 0) { query_meta.set_meta(feature_type, dimension); } else { query_meta.set_meta(proxima_meta_.type(), proxima_meta_.dimension()); } if (query_meta.type() != proxima_meta_.type() || query_meta.dimension() != proxima_meta_.dimension()) { LLOG_ERROR( "Invalid record, input query feature type or dimension not matched. " "query_feature_type[%d] query_dimension[%u] feature_type[%d] " "dimension[%u]", query_meta.type(), query_meta.dimension(), proxima_meta_.type(), proxima_meta_.dimension()); return ErrorCode_InvalidRecord; } const std::string &vector = column_data.data; uint32_t expect_size = proxima_meta_.element_size(); if (vector.size() != expect_size) { LLOG_ERROR( "Invalid record, vector size mismatch. expect_size[%u] " "actual_size[%zu]", expect_size, vector.size()); return ErrorCode_InvalidRecord; } // Get context and set properties. // Notice we must return back to pool in the end. auto ctx = context_pool_.acquire(); Defer defer([&ctx, this] { context_pool_.release(std::move(ctx)); }); int ret = 0; // Check if need to use quantizer if (quantize_type_ != QuantizeTypes::UNDEFINED && reformer_ != nullptr) { std::string new_vector; IndexQueryMeta new_meta; ret = reformer_->convert(vector.data(), query_meta, &new_vector, &new_meta); CHECK_RETURN_WITH_LLOG(ret, 0, "Reformer transform data failed. ret[%d]", ret); ret = proxima_streamer_->update_impl(doc_id, new_vector.data(), new_meta, ctx); } else { ret = proxima_streamer_->update_impl(doc_id, vector.data(), query_meta, ctx); } CHECK_RETURN_WITH_LLOG(ret, 0, "Update proxima streamer failed. ret[%d] reason[%s]", ret, aitheta2::IndexError::What(ret)); return 0; } #endif int VectorColumnIndexer::remove(idx_t doc_id) { CHECK_STATUS(opened_, true); // HNSW do not need to do remove if (engine_type_ == EngineTypes::PROXIMA_OSWG_STREAMER) { auto ctx = context_pool_.acquire(); Defer defer([&ctx, this] { context_pool_.release(std::move(ctx)); }); int ret = proxima_streamer_->remove_impl(doc_id, ctx); CHECK_RETURN_WITH_LLOG( ret, 0, "Remove from proxima streamer failed. doc_id[%zu] ret[%d]", (size_t)doc_id, ret) } return 0; } int VectorColumnIndexer::optimize(ThreadPoolPtr pool) { CHECK_STATUS(opened_, true); // HNSW do not need to do optimize if (engine_type_ == EngineTypes::PROXIMA_OSWG_STREAMER) { ailego::ElapsedTime timer; int ret = proxima_streamer_->optimize_impl(ThreadPoolPtr(pool)); CHECK_RETURN_WITH_LLOG(ret, 0, "Optimize column indexer failed. ret[%d]", ret); LLOG_DEBUG("Optmize column indexer complete. cost[%zuus]", (size_t)timer.micro_seconds()); } return 0; } int VectorColumnIndexer::search(const std::string &query, const QueryParams &query_params, FilterFunction filter, IndexDocumentList *result_list) { CHECK_STATUS(opened_, true); std::vector batch_result_list; int ret = this->search(query, query_params, 1, filter, &batch_result_list); (*result_list) = batch_result_list[0]; return ret; } int VectorColumnIndexer::search( const std::string &query, const QueryParams &query_params, uint32_t batch_count, FilterFunction filter, std::vector *batch_result_list) { CHECK_STATUS(opened_, true); // Check if query legal IndexQueryMeta query_meta; auto feature_type = IndexHelper::GetProximaFeatureType(query_params.data_type); auto dimension = query_params.dimension; if (feature_type != FeatureTypes::FT_UNDEFINED && dimension != 0) { query_meta.set_meta(feature_type, dimension); } else { query_meta.set_meta(proxima_meta_.type(), proxima_meta_.dimension()); } if (query_meta.type() != proxima_meta_.type() || query_meta.dimension() != proxima_meta_.dimension()) { LLOG_ERROR( "Invalid query, input query feature type or dimension not matched. " "query_feature_type[%d] query_dimension[%u] feature_type[%d] " "dimension[%u]", query_meta.type(), query_meta.type(), proxima_meta_.type(), proxima_meta_.dimension()); return ErrorCode_InvalidQuery; } uint32_t expect_size = query_meta.element_size() * batch_count; if (query.size() != expect_size) { LLOG_ERROR( "Invalid query, query size mismatch. expect_size[%u] " "actual_size[%zu]", expect_size, query.size()); return ErrorCode_InvalidQuery; } // Get context and set properties. // Notice that, we must reset the context // when return back into pool. auto ctx = context_pool_.acquire(); ctx->set_topk(query_params.topk); if (filter != nullptr) { ctx->set_filter(filter); } // Notice oswg graph do not need to pass filter if (engine_type_ == EngineTypes::PROXIMA_OSWG_STREAMER) { ctx->set_filter(nullptr); } if (query_params.radius > 0.0f) { ctx->set_threshold(query_params.radius); } Defer defer([&ctx, this] { ctx->set_filter(nullptr); ctx->set_threshold(std::numeric_limits::max()); context_pool_.release(std::move(ctx)); }); int ret = 0; // Check if need to use quantizer if (quantize_type_ != QuantizeTypes::UNDEFINED && reformer_ != nullptr) { std::string new_query; IndexQueryMeta new_meta; ret = reformer_->transform(query.data(), query_meta, &new_query, &new_meta); CHECK_RETURN_WITH_LLOG(ret, 0, "Reformer transform data failed. ret[%d]", ret); if (query_params.is_linear) { ret = proxima_streamer_->search_bf_impl(new_query.data(), new_meta, batch_count, ctx); } else { ret = proxima_streamer_->search_impl(new_query.data(), new_meta, batch_count, ctx); } } else { if (query_params.is_linear) { ret = proxima_streamer_->search_bf_impl(query.data(), query_meta, batch_count, ctx); } else { ret = proxima_streamer_->search_impl(query.data(), query_meta, batch_count, ctx); } } CHECK_RETURN_WITH_LLOG(ret, 0, "Search proxima streamer failed. ret[%d] reason[%s]", ret, aitheta2::IndexError::What(ret)); for (uint32_t i = 0; i < batch_count; i++) { auto &result_list = ctx->result(i); if (measure_->support_normalize()) { for (auto &it : const_cast(result_list)) { measure_->normalize(it.mutable_score()); } } if (reformer_) { reformer_->normalize(query.data(), query_meta, const_cast(result_list)); } batch_result_list->emplace_back(result_list); } return 0; } bool VectorColumnIndexer::check_column_meta( const meta::ColumnMeta &column_meta) { auto index_type = column_meta.index_type(); if (index_type != IndexTypes::PROXIMA_GRAPH_INDEX) { LOG_ERROR("Column meta config error, only support PROXIMA_GRAPH_INDEX now"); return false; } auto data_type = column_meta.data_type(); auto feature_type = IndexHelper::GetProximaFeatureType(data_type); if (feature_type == FeatureTypes::FT_UNDEFINED) { LLOG_ERROR("Column meta config error, unknown data type."); return false; } auto dimension = column_meta.dimension(); if (dimension == 0U) { LLOG_ERROR("Column meta config error, dimension can't be 0."); return false; } auto metric_type = column_meta.parameters().get_as_string("metric_type"); if (metric_type.empty()) { metric_type = "SquaredEuclidean"; } else if (metric_type == "InnerProduct") { metric_type = "MipsSquaredEuclidean"; } auto max_neighbor_count = column_meta.parameters().get_as_uint32("max_neighbor_count"); if (max_neighbor_count > 0U) { proxima_params_.set("proxima.hnsw.streamer.max_neighbor_count", max_neighbor_count); proxima_params_.set("proxima.oswg.streamer.max_neighbor_count", max_neighbor_count); } auto ef_construction = column_meta.parameters().get_as_uint32("ef_construction"); if (ef_construction > 0U) { proxima_params_.set("proxima.hnsw.streamer.ef_construction", ef_construction); proxima_params_.set("proxima.oswg.streamer.ef_construction", ef_construction); } auto ef_search = column_meta.parameters().get_as_uint32("ef_search"); if (ef_search > 0U) { proxima_params_.set("proxima.hnsw.streamer.ef", ef_search); proxima_params_.set("proxima.oswg.streamer.ef", ef_search); } else { proxima_params_.set("proxima.hnsw.streamer.ef", 200U); proxima_params_.set("proxima.oswg.streamer.ef", 200U); } auto chunk_size = column_meta.parameters().get_as_uint32("chunk_size"); if (chunk_size > 0U) { proxima_params_.set("proxima.hnsw.streamer.chunk_size", chunk_size); proxima_params_.set("proxima.oswg.streamer.segment_size", chunk_size); } else { proxima_params_.set("proxima.hnsw.streamer.chunk_size", 64UL * 1024UL * 1024UL); proxima_params_.set("proxima.oswg.streamer.segment_size", 64UL * 1024UL * 1024UL); } auto max_scan_ratio = column_meta.parameters().get_as_float("max_scan_ratio"); if (max_scan_ratio > 0.0f) { proxima_params_.set("proxima.hnsw.streamer.max_scan_ratio", max_scan_ratio); proxima_params_.set("proxima.oswg.streamer.max_scan_ratio", max_scan_ratio); } auto visit_bf = column_meta.parameters().get_as_bool("visit_bloomfilter_enable"); if (visit_bf) { proxima_params_.set("proxima.hnsw.streamer.visit_bloomfilter_enable", visit_bf); proxima_params_.set("proxima.oswg.streamer.visit_bloomfilter_enable", visit_bf); } // Check quantize type auto quantize_type = column_meta.parameters().get_as_string("quantize_type"); if (!quantize_type.empty()) { if (IndexHelper::GetQuantizeType(quantize_type) == QuantizeTypes::UNDEFINED) { LLOG_ERROR( "Column meta config error, unknown quantize type. quantize_type[%s]", quantize_type.c_str()); return false; } if (data_type != DataTypes::VECTOR_FP32) { LLOG_ERROR( "Column meta config error, only FP32 data type can open quantizer"); return false; } quantize_type_ = IndexHelper::GetQuantizeType(quantize_type); } // Default filter duplicate records proxima_params_.set("proxima.hnsw.streamer.filter_same_key", true); // Set proxima index meta proxima_meta_.set_meta(feature_type, dimension); proxima_meta_.set_measure(metric_type, 0, IndexParams()); // Decide which engine to use std::string engine = column_meta.parameters().get_as_string("engine"); if (engine == "OSWG") { engine_type_ = EngineTypes::PROXIMA_OSWG_STREAMER; } else if (engine == "HNSW") { engine_type_ = EngineTypes::PROXIMA_HNSW_STREAMER; } LLOG_INFO( "Show vector column indexer options. index_type[%u] data_type[%u] " "dimension[%u] " "measure[%s] context_count[%u] max_neighbor_count[%u] " "ef_construction[%u] chunk_size[%u] ef_search[%u] max_scan_ratio[%f] " "visit_bf[%d] quantize_type[%s] engine_type[%d]", index_type, data_type, dimension, metric_type.c_str(), this->concurrency(), max_neighbor_count, ef_construction, chunk_size, ef_search, max_scan_ratio, visit_bf, quantize_type.c_str(), engine_type_); return true; } int VectorColumnIndexer::open_proxima_streamer() { int ret = 0; auto index_meta = proxima_meta_; // Check if need to open quantizer if (quantize_type_ != QuantizeTypes::UNDEFINED) { IndexConverterPtr converter; switch (quantize_type_) { case QuantizeTypes::VECTOR_INT4: converter = aitheta2::IndexFactory::CreateConverter("Int4StreamingConverter"); break; case QuantizeTypes::VECTOR_INT8: converter = aitheta2::IndexFactory::CreateConverter("Int8StreamingConverter"); break; case QuantizeTypes::VECTOR_FP16: converter = aitheta2::IndexFactory::CreateConverter("HalfFloatConverter"); break; default: return ErrorCode_RuntimeError; } if (!converter) { LLOG_ERROR("Create converter failed."); return ErrorCode_RuntimeError; } ret = converter->init(proxima_meta_, IndexParams()); CHECK_RETURN_WITH_LLOG(ret, 0, "Converter init failed. ret[%d]", ret); index_meta = converter->meta(); reformer_ = aitheta2::IndexFactory::CreateReformer(index_meta.reformer_name()); ret = reformer_->init(IndexParams()); CHECK_RETURN_WITH_LLOG(ret, 0, "Reformer init failed. ret[%d]", ret); } // Init measure measure_ = aitheta2::IndexFactory::CreateMeasure(proxima_meta_.measure_name()); if (!measure_) { LLOG_ERROR("Create measure %s failed", proxima_meta_.measure_name().c_str()); return aitheta2::IndexError_Runtime; } ret = measure_->init(proxima_meta_, IndexParams()); CHECK_RETURN_WITH_LLOG(ret, 0, "Reformer init failed. ret[%d]", ret); auto query_measure = measure_->query_measure(); if (query_measure) { measure_ = query_measure; } // Get actual engine name and initialize it with factory std::string engine_name = this->get_engine_name(); proxima_streamer_ = aitheta2::IndexFactory::CreateStreamer(engine_name); if (!proxima_streamer_) { LLOG_ERROR("Create proxima streamer failed. name[%s]", engine_name.c_str()); return ErrorCode_RuntimeError; } //! Notice use new index meta as initialize params //! When user config quantize type, it may change its value. ret = proxima_streamer_->init(index_meta, proxima_params_); CHECK_RETURN_WITH_LLOG(ret, 0, "Init proxima streamer failed. ret[%d]", ret); ret = proxima_streamer_->open(snapshot_->data()); CHECK_RETURN_WITH_LLOG(ret, 0, "Open proxima streamer failed. ret[%d]", ret); // Initialize context pool for (uint32_t i = 0; i < this->concurrency(); i++) { auto ctx = proxima_streamer_->create_context(); if (!ctx) { LLOG_ERROR("Create proxima streamer context failed."); return ErrorCode_RuntimeError; } context_pool_.emplace(std::move(ctx)); } return 0; } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/vector_column_indexer.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief VectorColumnIndexer process vector column data streamly, it's * a kind of implementation of ColumnIndexer. */ #pragma once #include #include #include #include "common/error_code.h" #include "common/macro_define.h" #include "common/types.h" #include "meta/meta.h" #include "column_indexer.h" #include "context_pool.h" #include "index_helper.h" #include "../snapshot.h" #include "../typedef.h" namespace proxima { namespace be { namespace index { /* * VectorColumnIndexer process vector column data streamly, and provides * vector search interfaces. */ class VectorColumnIndexer : public ColumnIndexer { public: enum class EngineTypes : uint32_t { PROXIMA_HNSW_STREAMER = 0, PROXIMA_OSWG_STREAMER = 1 }; public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(VectorColumnIndexer); //! Constructor VectorColumnIndexer(const std::string &coll_name, const std::string &coll_path, SegmentID seg_id, const std::string &col_name) { this->set_collection_name(coll_name); this->set_collection_path(coll_path); this->set_segment_id(seg_id); this->set_column_name(col_name); } //! Destructor ~VectorColumnIndexer(); public: //! Open persist storage int open(const meta::ColumnMeta &column_meta, const ReadOptions &read_options) override; //! Flush memory to persist storage int flush() override; //! Close persist storage int close() override; //! Dump index to persist storage int dump(IndexDumperPtr dumper) override; public: //! Insert vector int insert(idx_t doc_id, const ColumnData &column_data) override; #if 0 //! Update column data by doc_id int update(idx_t doc_id, const ColumnData &column_data) override; #endif //! Remove column data by doc_id int remove(idx_t doc_id) override; //! Optimize index structure int optimize(ThreadPoolPtr pool) override; //! Search similar results with query int search(const std::string &query, const QueryParams &query_params, FilterFunction filter, IndexDocumentList *result_list) override; //! Batch search similar results with query int search(const std::string &query, const QueryParams &query_params, uint32_t batch_count, FilterFunction filter, std::vector *batch_result_list) override; public: //! Return index path std::string index_file_path() const override { if (snapshot_) { return snapshot_->file_path(); } else { return ""; } } //! Return doc count size_t doc_count() const override { if (proxima_streamer_) { return proxima_streamer_->stats().added_count(); } else { return 0U; } } private: bool check_column_meta(const meta::ColumnMeta &column_meta); int open_proxima_streamer(); std::string get_engine_name() { if (engine_type_ == EngineTypes::PROXIMA_OSWG_STREAMER) { return "OswgStreamer"; } else { return "HnswStreamer"; } } private: SnapshotPtr snapshot_{}; IndexParams proxima_params_{}; IndexStreamerPtr proxima_streamer_{}; IndexMeta proxima_meta_{}; ContextPool context_pool_{}; EngineTypes engine_type_{EngineTypes::PROXIMA_OSWG_STREAMER}; QuantizeTypes quantize_type_{QuantizeTypes::UNDEFINED}; IndexReformerPtr reformer_{}; IndexMeasurePtr measure_{}; bool opened_{false}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/vector_column_reader.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of vector column reader. */ #include "vector_column_reader.h" #include "common/defer.h" #include "common/error_code.h" #include "constants.h" #include "typedef.h" namespace proxima { namespace be { namespace index { VectorColumnReader::~VectorColumnReader() { // TODO can't call virtual function if (opened_) { close(); } } int VectorColumnReader::open(const meta::ColumnMeta &column_meta, const ReadOptions &read_options) { CHECK_STATUS(opened_, false); if (!check_column_meta(column_meta)) { LLOG_ERROR("Check column meta failed."); return ErrorCode_ConfigError; } int ret = open_proxima_container(read_options); CHECK_RETURN_WITH_LOG(ret, 0, "Open proxima container failed."); ret = open_proxima_searcher(); CHECK_RETURN_WITH_LOG(ret, 0, "Open proxima searcher failed."); opened_ = true; LLOG_DEBUG("Opened column searcher."); return 0; } int VectorColumnReader::close() { context_pool_.clear(); proxima_searcher_->unload(); proxima_searcher_->cleanup(); opened_ = false; LLOG_DEBUG("Unloaded column searcher"); return 0; } int VectorColumnReader::search(const std::string &query, const QueryParams &query_params, FilterFunction filter, IndexDocumentList *results) { CHECK_STATUS(opened_, true); std::vector batch_results; int ret = this->search(query, query_params, 1, filter, &batch_results); (*results) = batch_results[0]; return ret; } int VectorColumnReader::search( const std::string &query, const QueryParams &query_params, uint32_t batch_count, FilterFunction filter, std::vector *batch_result_list) { CHECK_STATUS(opened_, true); // Check if query legal IndexQueryMeta query_meta; auto feature_type = IndexHelper::GetProximaFeatureType(query_params.data_type); auto dimension = query_params.dimension; if (feature_type != FeatureTypes::FT_UNDEFINED && dimension != 0) { query_meta.set_meta(feature_type, dimension); } else { query_meta.set_meta(proxima_meta_.type(), proxima_meta_.dimension()); } if (query_meta.type() != proxima_meta_.type() || query_meta.dimension() != proxima_meta_.dimension()) { LLOG_ERROR( "Invalid query, input query feature type or dimension not matched. " "query_feature_type[%d] query_dimension[%u] feature_type[%d] " "dimension[%u]", query_meta.type(), query_meta.type(), proxima_meta_.type(), proxima_meta_.dimension()); return ErrorCode_InvalidQuery; } uint32_t expect_size = query_meta.element_size() * batch_count; if (query.size() != expect_size) { LLOG_ERROR( "Invalid query, query size mismatch. expect_size[%u] " "actual_size[%zu]", expect_size, query.size()); return ErrorCode_InvalidQuery; } // Get context and set properties. // Notice that, we must reset the context // when return back into pool. auto ctx = context_pool_.acquire(); ctx->set_topk(query_params.topk); if (filter != nullptr) { ctx->set_filter(filter); } if (query_params.radius > 0.0f) { ctx->set_threshold(query_params.radius); } Defer defer([&ctx, this] { ctx->set_filter(nullptr); ctx->set_threshold(std::numeric_limits::max()); context_pool_.release(std::move(ctx)); }); int ret = 0; // Check if need to use quantizer if (quantize_type_ != QuantizeTypes::UNDEFINED && reformer_ != nullptr) { std::string new_query; IndexQueryMeta new_meta; ret = reformer_->transform(query.data(), query_meta, &new_query, &new_meta); CHECK_RETURN_WITH_LLOG(ret, 0, "Reformer transform data failed. ret[%d]", ret); if (query_params.is_linear) { ret = proxima_searcher_->search_bf_impl(new_query.data(), new_meta, batch_count, ctx); } else { ret = proxima_searcher_->search_impl(new_query.data(), new_meta, batch_count, ctx); } } else { if (query_params.is_linear) { ret = proxima_searcher_->search_bf_impl(query.data(), query_meta, batch_count, ctx); } else { ret = proxima_searcher_->search_impl(query.data(), query_meta, batch_count, ctx); } } CHECK_RETURN_WITH_LLOG(ret, 0, "Search proxima searcher failed. ret[%d] reason[%s]", ret, aitheta2::IndexError::What(ret)); for (uint32_t i = 0; i < batch_count; i++) { auto &result_list = ctx->result(i); if (measure_->support_normalize()) { for (auto &it : const_cast(result_list)) { measure_->normalize(it.mutable_score()); } } if (reformer_) { reformer_->normalize(query.data(), query_meta, const_cast(result_list)); } batch_result_list->emplace_back(result_list); } return 0; } bool VectorColumnReader::check_column_meta( const meta::ColumnMeta &column_meta) { auto index_type = column_meta.index_type(); if (index_type != IndexTypes::PROXIMA_GRAPH_INDEX) { LOG_ERROR("Column meta config error, only support PROXIMA_GRAPH_INDEX now"); return false; } auto data_type = column_meta.data_type(); auto feature_type = IndexHelper::GetProximaFeatureType(data_type); if (feature_type == FeatureTypes::FT_UNDEFINED) { LLOG_ERROR("Column meta config error, unknown data type."); return false; } auto dimension = column_meta.dimension(); if (dimension == 0U) { LLOG_ERROR("Column meta config error, dimension can't be 0."); return false; } auto metric_type = column_meta.parameters().get_as_string("metric_type"); if (metric_type.empty()) { metric_type = "SquaredEuclidean"; } auto ef_search = column_meta.parameters().get_as_uint32("ef_search"); if (ef_search > 0U) { proxima_params_.set("proxima.hnsw.searcher.ef", ef_search); } else { proxima_params_.set("proxima.hnsw.searcher.ef", 200U); } auto max_scan_ratio = column_meta.parameters().get_as_float("max_scan_ratio"); if (max_scan_ratio > 0.0f) { proxima_params_.set("proxima.hnsw.searcher.max_scan_ratio", max_scan_ratio); } auto visit_bf = column_meta.parameters().get_as_bool("visit_bloomfilter_enable"); if (visit_bf) { proxima_params_.set("proxima.hnsw.searcher.visit_bloomfilter_enable", visit_bf); } // Check quantize type auto quantize_type = column_meta.parameters().get_as_string("quantize_type"); if (!quantize_type.empty()) { if (IndexHelper::GetQuantizeType(quantize_type) == QuantizeTypes::UNDEFINED) { LLOG_ERROR( "Column meta config error, unknown quantize type. quantize_type[%s]", quantize_type.c_str()); return false; } if (data_type != DataTypes::VECTOR_FP32) { LLOG_ERROR( "Column meta config error, only FP32 data type can open quantizer"); return false; } quantize_type_ = IndexHelper::GetQuantizeType(quantize_type); } // Set proxima index meta proxima_meta_.set_meta(feature_type, dimension); proxima_meta_.set_measure(metric_type, 0, IndexParams()); LLOG_INFO( "Show vector column searcher options. index_type[%u] data_type[%u] " "dimension[%u] measure[%s] context_count[%u] ef_search[%u] " "max_scan_ratio[%f] visit_bf[%d] quantize_type[%s] ", index_type, data_type, dimension, metric_type.c_str(), this->concurrency(), ef_search, max_scan_ratio, visit_bf, quantize_type.c_str()); return true; } int VectorColumnReader::open_proxima_container( const ReadOptions &read_options) { index_file_path_ = FileHelper::MakeFilePath( this->collection_path(), FileID::SEGMENT_FILE, this->segment_id()); if (read_options.use_mmap) { container_ = aitheta2::IndexFactory::CreateContainer("MMapFileContainer"); } else { container_ = aitheta2::IndexFactory::CreateContainer("MemoryContainer"); } // Default set warmup flag IndexParams container_params; container_params.set("proxima.mmap_file.container.memory_warmup", true); int ret = container_->init(container_params); CHECK_RETURN_WITH_LLOG(ret, 0, "Container init failed. ret[%d]", ret); ret = container_->load(index_file_path_); CHECK_RETURN_WITH_LLOG(ret, 0, "Container load failed. ret[%d] file[%s]", ret, index_file_path_.c_str()); return 0; } int VectorColumnReader::open_proxima_searcher() { int ret = 0; auto index_meta = proxima_meta_; // Check if need to open quantizer if (quantize_type_ != QuantizeTypes::UNDEFINED) { IndexConverterPtr converter; switch (quantize_type_) { case QuantizeTypes::VECTOR_INT4: converter = aitheta2::IndexFactory::CreateConverter("Int4StreamingConverter"); break; case QuantizeTypes::VECTOR_INT8: converter = aitheta2::IndexFactory::CreateConverter("Int8StreamingConverter"); break; case QuantizeTypes::VECTOR_FP16: converter = aitheta2::IndexFactory::CreateConverter("HalfFloatConverter"); break; default: return ErrorCode_RuntimeError; } if (!converter) { LLOG_ERROR("Create converter failed."); return ErrorCode_RuntimeError; } ret = converter->init(proxima_meta_, IndexParams()); CHECK_RETURN_WITH_LLOG(ret, 0, "Converter init failed. ret[%d]", ret); index_meta = converter->meta(); reformer_ = aitheta2::IndexFactory::CreateReformer(index_meta.reformer_name()); ret = reformer_->init(IndexParams()); CHECK_RETURN_WITH_LLOG(ret, 0, "Reformer init failed. ret[%d]", ret); } // Init measure measure_ = aitheta2::IndexFactory::CreateMeasure(proxima_meta_.measure_name()); if (!measure_) { LLOG_ERROR("Create measure %s failed", proxima_meta_.measure_name().c_str()); return aitheta2::IndexError_Runtime; } ret = measure_->init(proxima_meta_, IndexParams()); CHECK_RETURN_WITH_LLOG(ret, 0, "Reformer init failed. ret[%d]", ret); auto query_measure = measure_->query_measure(); if (query_measure) { measure_ = query_measure; } // Init proxima searcher proxima_searcher_ = aitheta2::IndexFactory::CreateSearcher("HnswSearcher"); if (!proxima_searcher_) { LLOG_ERROR("Create proxima searcher failed. name[HnswSearcher]"); return ErrorCode_RuntimeError; } ret = proxima_searcher_->init(proxima_params_); CHECK_RETURN_WITH_LOG(ret, 0, "Init proxima searcher failed."); auto column_block = container_->get(COLUMN_DUMP_BLOCK + this->column_name()); if (!column_block) { LLOG_INFO("Can't find column block in index file."); return ErrorCode_InvalidSegment; } auto block_container = std::make_shared(column_block); ret = block_container->load(); CHECK_RETURN_WITH_LLOG(ret, 0, "Column block load failed."); ret = proxima_searcher_->load(block_container, nullptr); CHECK_RETURN_WITH_LLOG(ret, 0, "Load container failed."); // Init context pool for (uint32_t i = 0; i < this->concurrency(); i++) { auto ctx = proxima_searcher_->create_context(); if (!ctx) { LLOG_ERROR("Create context for proxima searcher failed."); return ErrorCode_RuntimeError; } context_pool_.emplace(std::move(ctx)); } return 0; } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/column/vector_column_reader.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief VectorColumnReader provides search ability for column * vector data */ #pragma once #include "common/macro_define.h" #include "common/types.h" #include "column_reader.h" #include "context_pool.h" #include "index_helper.h" #include "../typedef.h" namespace proxima { namespace be { namespace index { /* * VectorColumnReader is an implementation of ColumnReader, mainly * for persist column index. */ class VectorColumnReader : public ColumnReader { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(VectorColumnReader); //! Constructor VectorColumnReader(const std::string &coll_name, const std::string &coll_path, SegmentID seg_id, const std::string &col_name) { this->set_collection_name(coll_name); this->set_collection_path(coll_path); this->set_segment_id(seg_id); this->set_column_name(col_name); } //! Destructor ~VectorColumnReader(); public: //! Open index int open(const meta::ColumnMeta &column_meta, const ReadOptions &read_options) override; //! Close index int close() override; //! Search similar results with query int search(const std::string &query, const QueryParams &query_params, FilterFunction filter, IndexDocumentList *results) override; //! Batch search similar results with query int search(const std::string &query, const QueryParams &query_params, uint32_t batch_count, FilterFunction filter, std::vector *batch_result_list) override; public: //! Return index file path std::string index_file_path() const override { return index_file_path_; } //! Return document count size_t doc_count() const override { if (proxima_searcher_) { return proxima_searcher_->stats().loaded_count(); } else { return 0U; } } private: bool check_column_meta(const meta::ColumnMeta &column_meta); int open_proxima_container(const ReadOptions &read_options); int open_proxima_searcher(); private: IndexContainerPtr container_{}; IndexParams proxima_params_{}; IndexSearcherPtr proxima_searcher_{}; IndexMeta proxima_meta_{}; ContextPool context_pool_{}; QuantizeTypes quantize_type_{QuantizeTypes::UNDEFINED}; IndexReformerPtr reformer_{}; IndexMeasurePtr measure_{}; std::string index_file_path_{}; bool opened_{false}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/concurrent_bitmap.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Concurrent bitmap which is thread-safe for add/del operations */ #pragma once #include #include namespace proxima { namespace be { namespace index { /* * Concurrent bitmap, support test/set in multi-threads */ class ConcurrentBitmap { public: //! Construtor ConcurrentBitmap() = default; //! Destructor ~ConcurrentBitmap() = default; public: //! Test if num pos bit exist bool test(size_t num) const { bool found = false; // Remove shared lock here!! // It will slow down search performance significantly found = bitmap_.test(num); return found; } //! Set num pos bit void set(size_t num) { rw_lock_.lock(); bitmap_.set(num); rw_lock_.unlock(); } //! Reset num pos bit void reset(size_t num) { rw_lock_.lock(); bitmap_.reset(num); rw_lock_.unlock(); } //! Cleanup all bits void clear() { rw_lock_.lock(); bitmap_.clear(); rw_lock_.unlock(); } private: mutable ailego::SharedMutex rw_lock_{}; ailego::Bitmap bitmap_{}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/concurrent_hash_map.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Concurrent hashmap which is thread-safe for add/del operations */ #pragma once #include #include namespace proxima { namespace be { namespace index { /* * Concurrent hash map for synchronously get/set item. */ template class ConcurrentHashMap { public: //! Constructor ConcurrentHashMap() = default; //! Destructor ~ConcurrentHashMap() = default; public: //! Emplace a key-value pair void emplace(TKey key, TValue val) { rw_lock_.lock(); map_.emplace(key, val); rw_lock_.unlock(); } //! Get value by key const TValue &get(TKey key) const { rw_lock_.lock_shared(); const TValue &val = map_.at(key); rw_lock_.unlock_shared(); return val; } //! If has key bool has(TKey key) const { bool found = false; rw_lock_.lock_shared(); if (map_.find(key) != map_.end()) { found = true; } rw_lock_.unlock_shared(); return found; } //! Return key-value pair count size_t size() const { size_t val; rw_lock_.lock_shared(); val = map_.size(); rw_lock_.unlock_shared(); return val; } //! Erase a pair by key void erase(TKey key) { rw_lock_.lock(); map_.erase(key); rw_lock_.unlock(); } //! Clear all pairs void clear() { rw_lock_.lock(); map_.clear(); rw_lock_.unlock(); } typedef typename std::unordered_map::iterator iterator; typedef typename std::unordered_map::const_iterator const_iterator; // NOTICE: iterator interface is only called when // uppper class destruct, and ensure in single thread // // Return begin iterator iterator begin() { rw_lock_.lock_shared(); iterator it = map_.begin(); rw_lock_.unlock_shared(); return it; } //! Return const begin iterator const_iterator begin() const { rw_lock_.lock_shared(); const_iterator it = map_.begin(); rw_lock_.unlock_shared(); return it; } //! Return reverse begin iterator const_iterator cbegin() const { rw_lock_.lock_shared(); const_iterator it = map_.cbegin(); rw_lock_.unlock_shared(); return it; } //! Return end iterator iterator end() { rw_lock_.lock_shared(); iterator it = map_.end(); rw_lock_.unlock_shared(); return it; } //! Return const end iterator const_iterator end() const { rw_lock_.lock_shared(); const_iterator it = map_.end(); rw_lock_.unlock_shared(); return it; } //! Return cend iterator const_iterator cend() const { rw_lock_.lock_shared(); const_iterator it = map_.cend(); rw_lock_.unlock_shared(); return it; } private: mutable ailego::SharedMutex rw_lock_{}; std::unordered_map map_{}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/constants.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Definitions of some constants */ #pragma once #include namespace proxima { namespace be { namespace index { const std::string HEADER_BLOCK("HeaderBlock"); const std::string DATA_BLOCK("DataBlock"); const std::string SUMMARY_BLOCK("SummaryBlock"); const std::string VERSION_BLOCK("VersionBlock"); const std::string SEGMENT_BLOCK("SegmentBlock"); const std::string FORWARD_DUMP_BLOCK("ForwardIndex"); const std::string COLUMN_DUMP_BLOCK("ColumnIndex"); const uint64_t INVALID_KEY = -1UL; const uint64_t INVALID_DOC_ID = -1UL; const uint32_t INVALID_SEGMENT_ID = -1U; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/delete_store.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of delete store */ #include "delete_store.h" #include #include "common/error_code.h" #include "file_helper.h" #include "typedef.h" namespace proxima { namespace be { namespace index { DeleteStorePtr DeleteStore::Create(const std::string &collection_name, const std::string &collection_path) { return std::make_shared(collection_name, collection_path); } int DeleteStore::CreateAndOpen(const std::string &collection_name, const std::string &collection_path, const ReadOptions &options, DeleteStorePtr *delete_store) { (*delete_store) = Create(collection_name, collection_path); return (*delete_store)->open(options); } DeleteStore::~DeleteStore() { if (opened_) { this->close(); } } int DeleteStore::open(const ReadOptions &read_options) { CHECK_STATUS(opened_, false); int ret = Snapshot::CreateAndOpen(collection_path_, FileID::DELETE_FILE, read_options, &snapshot_); CHECK_RETURN_WITH_CLOG(ret, 0, "Create and open snapshot failed."); ret = delta_store_.mount(snapshot_->data()); CHECK_RETURN_WITH_CLOG(ret, 0, "Mount snapshot failed."); for (size_t i = 0; i < delta_store_.count(); i++) { bitmap_.set(*(delta_store_.at(i))); } // To avoid bitmap resize bitmap_.set(std::numeric_limits::max()); opened_ = true; CLOG_DEBUG("Opened delete store."); return 0; } int DeleteStore::flush() { CHECK_STATUS(opened_, true); return snapshot_->flush(); } int DeleteStore::close() { CHECK_STATUS(opened_, true); delta_store_.unmount(); bitmap_.clear(); int ret = snapshot_->close(); if (ret != 0) { LOG_WARN("Close snapshot failed."); } opened_ = false; CLOG_DEBUG("Closed delete store."); return ret; } int DeleteStore::insert(idx_t doc_id) { CHECK_STATUS(opened_, true); bitmap_.set(doc_id); return delta_store_.append(doc_id); } bool DeleteStore::has(idx_t doc_id) const { return bitmap_.test(doc_id); } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/delete_store.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Reserving delete records of collection */ #pragma once #include #include #include "common/macro_define.h" #include "common/types.h" #include "concurrent_bitmap.h" #include "delta_store.h" #include "snapshot.h" #include "typedef.h" namespace proxima { namespace be { namespace index { class DeleteStore; using DeleteStorePtr = std::shared_ptr; /* * DeleteStore is responsible for storage of delete docs. * It will store in memory and disk at the same time, and * also provides quick search whether one doc exists ability. */ class DeleteStore { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(DeleteStore); //! Constructor DeleteStore(const std::string &coll_name, const std::string &coll_path) : collection_name_(coll_name), collection_path_(coll_path) {} //! Destructor ~DeleteStore(); //! Create an instance static DeleteStorePtr Create(const std::string &collection_name, const std::string &collection_path); //! Create an instance and open static int CreateAndOpen(const std::string &collection_name, const std::string &collection_path, const ReadOptions &options, DeleteStorePtr *delete_store); public: //! Open persist storage and initialize int open(const ReadOptions &options); //! Flush memory to persist storage int flush(); //! Close persist storage and cleanup int close(); public: //! Insert a doc id int insert(idx_t doc_id); //! Check if exist a doc id bool has(idx_t doc_id) const; public: //! Return belonged collection name const std::string &collection_name() const { return collection_name_; } //! Return persist storage file path const std::string &file_path() const { return snapshot_->file_path(); } //! Return delete count size_t count() const { return delta_store_.count(); } private: std::string collection_name_{}; std::string collection_path_{}; SnapshotPtr snapshot_{}; DeltaStore delta_store_{}; ConcurrentBitmap bitmap_{}; bool opened_{false}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/delta_store.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Reserving append data and mmap to persist storage, thread-safe */ #pragma once #include #include #include "common/error_code.h" #include "common/macro_define.h" #include "constants.h" #include "typedef.h" namespace proxima { namespace be { namespace index { /* * DeltaStore is a kind of linear storage in memory, and * it can snapshot to disk at the same time with mmap. * It can only increase at the tail part. */ template class DeltaStore { public: /* * Header segment struct */ struct Header { uint64_t block_count{0U}; uint64_t total_size{0U}; uint64_t reserved_[6]; }; static_assert(sizeof(Header) % 64 == 0, "Header must be aligned with 64 bytes"); public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(DeltaStore); //! Constructor DeltaStore() = default; //! Destructor ~DeltaStore() = default; //! Mount persist storage int mount(const IndexStoragePtr &stg) { if (!stg) { LOG_ERROR("Mount null storage"); return ErrorCode_RuntimeError; } storage_ = stg; header_block_ = storage_->get(HEADER_BLOCK); int ret = 0; if (!header_block_) { ret = init_storage(); } else { ret = load_storage(); } CHECK_RETURN(ret, 0); return 0; } //! Unmount persist storage void unmount() { storage_ = nullptr; header_block_.reset(); data_blocks_.clear(); memset(&header_, 0, sizeof(header_)); node_count_ = 0U; } //! Append an element int append(const T &element) { std::lock_guard lock(mutex_); size_t block_offset = 0U; IndexBlockPtr data_block; uint32_t block_index = data_blocks_.size() - 1; size_t block_size = kNodeCountPerBlock * sizeof(T); if (block_index == -1U || data_blocks_[block_index]->data_size() >= block_size) { block_index++; std::string new_block_name = ailego::StringHelper::Concat(DATA_BLOCK, block_index); int ret = storage_->append(new_block_name, block_size); CHECK_RETURN(ret, 0); header_.block_count++; header_.total_size += block_size; ret = update_header(); CHECK_RETURN(ret, 0); block_offset = 0U; data_block = storage_->get(new_block_name); data_blocks_.emplace_back(data_block); } else { data_block = data_blocks_[block_index]; block_offset = data_block->data_size(); } size_t write_len = data_block->write(block_offset, &element, sizeof(T)); if (write_len != sizeof(T)) { return ErrorCode_WriteData; } node_count_++; return 0; } //! Update an element by position int update(size_t pos, const T &element) { std::lock_guard lock(mutex_); if (pos >= node_count_) { return ErrorCode_RuntimeError; } size_t block_index = pos / kNodeCountPerBlock; size_t block_offset = (pos % kNodeCountPerBlock) * sizeof(T); std::string block_name = ailego::StringHelper::Concat(DATA_BLOCK, block_index); IndexBlockPtr data_block = storage_->get(block_name); if (!data_block) { return ErrorCode_InvalidIndexDataFormat; } size_t write_len = data_block->write(block_offset, &element, sizeof(T)); if (write_len != sizeof(T)) { return ErrorCode_WriteData; } return 0; } //! Get an element by position const T *at(size_t pos) const { if (pos >= node_count_) { return nullptr; } size_t block_index = pos / kNodeCountPerBlock; size_t block_offset = (pos % kNodeCountPerBlock) * sizeof(T); std::string block_name = ailego::StringHelper::Concat(DATA_BLOCK, block_index); IndexBlockPtr data_block = storage_->get(block_name); if (!data_block) { return nullptr; } T *element; size_t read_len = data_block->read(block_offset, (const void **)&element, sizeof(T)); if (read_len != sizeof(T)) { return nullptr; } return element; } //! Return node count size_t count() const { return node_count_; } private: int init_storage() { int ret = storage_->append(HEADER_BLOCK, sizeof(Header)); CHECK_RETURN(ret, 0); header_block_ = storage_->get(HEADER_BLOCK); header_.block_count = 0U; header_.total_size = 0U; ret = update_header(); node_count_ = 0UL; return ret; } int load_storage() { header_block_ = storage_->get(HEADER_BLOCK); Header *header; size_t read_len = header_block_->read(0, (const void **)&header, sizeof(Header)); if (read_len != sizeof(Header)) { return ErrorCode_ReadData; } header_ = *header; for (uint32_t i = 0; i < header_.block_count; i++) { std::string block_name = ailego::StringHelper::Concat(DATA_BLOCK, i); auto data_block = storage_->get(block_name); if (!data_block) { return ErrorCode_ReadData; } data_blocks_.emplace_back(data_block); } if (header_.block_count > 0) { node_count_ = (header_.block_count - 1) * kNodeCountPerBlock + data_blocks_[header_.block_count - 1]->data_size() / sizeof(T); } else { node_count_ = 0U; } return 0; } int update_header() { size_t write_len = header_block_->write(0, &header_, sizeof(Header)); if (write_len != sizeof(Header)) { return ErrorCode_WriteData; } return 0; } private: static constexpr uint32_t kNodeCountPerBlock = 1UL * 1024UL * 1024UL; private: IndexStoragePtr storage_{}; IndexBlockPtr header_block_{}; std::vector data_blocks_{}; Header header_; std::mutex mutex_{}; std::atomic node_count_{0UL}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/file_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Helper class for index file or directory operations */ #pragma once #include #include #include #include #include namespace proxima { namespace be { namespace index { /* * File type and id */ enum class FileID : uint32_t { UNDEFINED = 0, ID_FILE, DELETE_FILE, FORWARD_FILE, PROXIMA_FILE, SEGMENT_FILE, LSN_FILE, MANIFEST_FILE }; /* * File name coresponding to file id */ static const char *GetFileName(FileID t) { switch (t) { case FileID::ID_FILE: return "data.id"; case FileID::DELETE_FILE: return "data.del"; case FileID::FORWARD_FILE: return "data.fwd"; case FileID::PROXIMA_FILE: return "data.pxa"; case FileID::SEGMENT_FILE: return "data.seg"; case FileID::LSN_FILE: return "data.lsn"; case FileID::MANIFEST_FILE: return "data.manifest"; default: return "UnknownFile"; }; } /* * This helper class is mainly to wrapper filesystem operations. */ class FileHelper { public: //! Make file path with ${prefix_path}/${file_name} static std::string MakeFilePath(const std::string &prefix_path, FileID file_id) { return ailego::StringHelper::Concat(prefix_path, "/", GetFileName(file_id)); } //! Make file path with ${prefix_path}/${file_name}.${number} static std::string MakeFilePath(const std::string &prefix_path, FileID file_id, uint32_t number) { return ailego::StringHelper::Concat(prefix_path, "/", GetFileName(file_id), ".", number); } //! Make file path with ${prefix_path}/${file_name}.${suffix_name}.${number} static std::string MakeFilePath(const std::string &prefix_path, FileID file_id, uint32_t number, const std::string &suffix_name) { return ailego::StringHelper::Concat(prefix_path, "/", GetFileName(file_id), ".", suffix_name, ".", number); } //! Create directory static bool CreateDirectory(const std::string &dir_path) { return ailego::File::MakePath(dir_path); } //! Remove directory static bool RemoveDirectory(const std::string &dir_path) { return ailego::File::RemoveDirectory(dir_path); } //! Remove file static bool RemoveFile(const std::string &file_path) { return ailego::File::Delete(file_path); } //! Check if file exists static bool FileExists(const std::string &file_path) { return ailego::File::IsExist(file_path); } //! Check if directory exists static bool DirectoryExists(const std::string &dir_path) { return ailego::File::IsExist(dir_path); } //! Return file size static size_t FileSize(const std::string &file_path) { return ailego::FileHelper::FileSize(file_path.c_str()); } }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/id_map.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of id map */ #include "id_map.h" #include "common/error_code.h" #include "constants.h" #include "file_helper.h" #include "typedef.h" namespace proxima { namespace be { namespace index { IDMapPtr IDMap::Create(const std::string &collection_name, const std::string &collection_path) { return std::make_shared(collection_name, collection_path); } int IDMap::CreateAndOpen(const std::string &collection_name, const std::string &collection_path, const ReadOptions &read_options, IDMapPtr *id_map) { (*id_map) = Create(collection_name, collection_path); return (*id_map)->open(read_options); } IDMap::~IDMap() { if (opened_) { this->close(); } } int IDMap::open(const ReadOptions &read_options) { CHECK_STATUS(opened_, false); int ret = Snapshot::CreateAndOpen(collection_path_, FileID::ID_FILE, read_options, &snapshot_); CHECK_RETURN_WITH_CLOG(ret, 0, "Create and open snapshot failed."); ret = key_map_.mount(snapshot_->data()); CHECK_RETURN_WITH_CLOG(ret, 0, "Mount snapshot failed."); opened_ = true; CLOG_DEBUG("Opened id map."); return 0; } int IDMap::flush() { CHECK_STATUS(opened_, true); return snapshot_->flush(); } int IDMap::close() { CHECK_STATUS(opened_, true); key_map_.unmount(); // Do not break close logic int ret = snapshot_->close(); if (ret != 0) { LOG_WARN("Close snapshot failed."); } opened_ = false; CLOG_DEBUG("Closed id map."); return ret; } int IDMap::insert(uint64_t key, idx_t doc_id) { CHECK_STATUS(opened_, true); int ret = key_map_.emplace(key, doc_id); CHECK_RETURN(ret, 0); return 0; } bool IDMap::has(uint64_t key) const { return key_map_.has(key); } idx_t IDMap::get_mapping_id(uint64_t key) const { idx_t doc_id = INVALID_DOC_ID; if (key_map_.has(key)) { key_map_.get(key, &doc_id); } return doc_id; } void IDMap::remove(uint64_t key) { if (key_map_.has(key)) { key_map_.erase(key); } } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/id_map.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Storage of key->doc_id mappings */ #pragma once #include #include "common/macro_define.h" #include "common/types.h" #include "persist_hash_map.h" #include "snapshot.h" namespace proxima { namespace be { namespace index { class IDMap; using IDMapPtr = std::shared_ptr; /* * IDMap is responsible for recording pk->doc_id pair in the collection. */ class IDMap { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(IDMap); //! Constructor IDMap(const std::string &coll_name, const std::string &coll_path) : collection_name_(coll_name), collection_path_(coll_path) {} //! Destructor ~IDMap(); //! Create an instance static IDMapPtr Create(const std::string &collection_name, const std::string &collection_path); //! Create an instance and initialize static int CreateAndOpen(const std::string &collection_name, const std::string &collection_path, const ReadOptions &read_options, IDMapPtr *id_map); public: //! Open persist storage and initialize int open(const ReadOptions &read_options); //! Flush memory to persist storage int flush(); //! Close persist storage int close(); public: //! Insert pair int insert(uint64_t key, idx_t doc_id); //! Remove pair void remove(uint64_t key); //! Check doc primary key exist bool has(uint64_t key) const; //! Get doc id by primary key idx_t get_mapping_id(uint64_t key) const; public: //! Return belonged collection name const std::string &collection_name() const { return collection_name_; } //! Return persist storage file path const std::string &file_path() const { return snapshot_->file_path(); } //! Return key-id mapping pair count size_t count() const { return key_map_.size(); } private: std::string collection_name_{}; std::string collection_path_{}; SnapshotPtr snapshot_{}; PersistHashMap key_map_{}; bool opened_{false}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/index_service.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implemention of index service */ #include "index_service.h" #include "common/error_code.h" namespace proxima { namespace be { namespace index { IndexService::~IndexService() { if (status_ == STARTED) { this->stop_impl(); } this->cleanup_impl(); } int IndexService::create_collection(const std::string &collection_name, const meta::CollectionMetaPtr &schema) { CHECK_STATUS(status_, STARTED); if (this->has_collection(collection_name)) { LOG_ERROR("Collection already exists, create failed. collection[%s]", collection_name.c_str()); return ErrorCode_DuplicateCollection; } ReadOptions read_options; read_options.use_mmap = use_mmap_read_; /// Notice we add a check action here: /// a. the collection index file exists, then we just load it. /// b. the collection index not exist, then we just create new one. std::string collection_path = index_directory_ + "/" + collection_name; std::string manifest_file_path = FileHelper::MakeFilePath(collection_path, FileID::MANIFEST_FILE); if (FileHelper::FileExists(manifest_file_path)) { read_options.create_new = false; } else { read_options.create_new = true; } CollectionPtr collection; int ret = Collection::CreateAndOpen(collection_name, index_directory_, schema, concurrency_, thread_pool_.get(), read_options, &collection); CHECK_RETURN_WITH_LOG(ret, 0, "Create and open new collection failed. collection[%s]", collection_name.c_str()); collections_.emplace(collection_name, collection); LOG_INFO("Create new collection success. collection[%s]", collection_name.c_str()); return 0; } int IndexService::update_collection(const std::string &collection_name, const meta::CollectionMetaPtr &new_schema) { CHECK_STATUS(status_, STARTED); if (!this->has_collection(collection_name)) { LOG_ERROR("Collection not exist, update failed. collection[%s]", collection_name.c_str()); return ErrorCode_InexistentCollection; } return collections_.get(collection_name)->update_schema(new_schema); } bool IndexService::has_collection(const std::string &collection_name) { CHECK_STATUS(status_, STARTED); return collections_.has(collection_name); } int IndexService::load_collections( const std::vector &collection_names, const std::vector &schemas) { CHECK_STATUS(status_, STARTED); ReadOptions read_options; read_options.use_mmap = use_mmap_read_; read_options.create_new = false; int ret = 0; for (size_t i = 0; i < collection_names.size() && i < schemas.size(); i++) { CollectionPtr collection; ret = Collection::CreateAndOpen( collection_names[i], index_directory_, schemas[i], concurrency_, thread_pool_.get(), read_options, &collection); CHECK_RETURN_WITH_LOG(ret, 0, "Load collection failed. collection[%s]", collection_names[i].c_str()); collections_.emplace(collection_names[i], collection); LOG_INFO("Load collection success. collectoin[%s]", collection_names[i].c_str()); } return 0; } int IndexService::drop_collection(const std::string &collection_name) { CHECK_STATUS(status_, STARTED); if (!this->has_collection(collection_name)) { LOG_ERROR("Collection not exist, drop failed. collection[%s]", collection_name.c_str()); return ErrorCode_InexistentCollection; } collections_.get(collection_name)->close_and_cleanup(); collections_.erase(collection_name); LOG_INFO("Drop collection success. collection[%s]", collection_name.c_str()); return 0; } int IndexService::list_collections(std::vector *collection_names) { CHECK_STATUS(status_, STARTED); for (auto &it : collections_) { collection_names->emplace_back(it.first); } return 0; } int IndexService::get_collection_stats(const std::string &collection_name, CollectionStats *collection_stats) { CHECK_STATUS(status_, STARTED); if (!this->has_collection(collection_name)) { LOG_ERROR("Collection not exist, get statistics failed. collection[%s]", collection_name.c_str()); return ErrorCode_InexistentCollection; } return collections_.get(collection_name)->get_stats(collection_stats); } int IndexService::list_segments(const std::string &collection_name, std::vector *segments) { CHECK_STATUS(status_, STARTED); if (!this->has_collection(collection_name)) { LOG_ERROR("Collection not exist, list segments failed. collection[%s]", collection_name.c_str()); return ErrorCode_InexistentCollection; } return collections_.get(collection_name)->get_segments(segments); } int IndexService::get_latest_lsn(const std::string &collection_name, uint64_t *lsn, std::string *lsn_context) { CHECK_STATUS(status_, STARTED); if (!this->has_collection(collection_name)) { LOG_ERROR("Collection not exist, get latest lsn failed. collection[%s]", collection_name.c_str()); return ErrorCode_InexistentCollection; } return collections_.get(collection_name)->get_latest_lsn(lsn, lsn_context); } int IndexService::write_records(const std::string &collection_name, const CollectionDatasetPtr &records) { CHECK_STATUS(status_, STARTED); if (!this->has_collection(collection_name)) { LOG_ERROR("Collection not exist, write records failed. collection[%s]", collection_name.c_str()); return ErrorCode_InexistentCollection; } return collections_.get(collection_name)->write_records(*records); } int IndexService::init_impl() { if (!load_config()) { LOG_ERROR("Load config failed."); return ErrorCode_LoadConfig; } thread_pool_ = std::make_shared(thread_count_, false); if (!thread_pool_) { LOG_ERROR("Create thread pool failed."); return ErrorCode_RuntimeError; } LOG_INFO("IndexService initialize complete."); return 0; } int IndexService::cleanup_impl() { thread_count_ = 0U; index_directory_ = ""; flush_internal_ = 0U; concurrency_ = 0U; use_mmap_read_ = false; LOG_INFO("IndexService cleanup complete."); return 0; } int IndexService::start_impl() { if (flush_internal_ > 0U) { thread_pool_->submit( ailego::Closure::New(this, &IndexService::do_routine_flush)); } if (optimize_internal_ > 0U) { thread_pool_->submit( ailego::Closure::New(this, &IndexService::do_routine_optimize)); } LOG_INFO("IndexService start complete."); return 0; } int IndexService::stop_impl() { std::this_thread::sleep_for(std::chrono::milliseconds(100)); flush_flag_ = false; flush_notifier_.notify(); optimize_flag_ = false; optimize_notifier_.notify(); thread_pool_->stop(); for (auto &it : collections_) { it.second->close(); } collections_.clear(); LOG_INFO("IndexService stopped."); return 0; } bool IndexService::load_config() { auto &config = Config::Instance(); thread_count_ = config.get_index_dump_thread_count(); index_directory_ = config.get_index_directory(); flush_internal_ = config.get_index_flush_internal(); optimize_internal_ = config.get_index_optimize_internal(); concurrency_ = config.get_index_build_thread_count() + config.get_query_thread_count(); use_mmap_read_ = true; return true; } void IndexService::do_routine_flush() { flush_flag_ = true; while (true) { if (!flush_flag_) { LOG_INFO("Exited flush thread"); break; } for (auto it : collections_) { it.second->flush(); } flush_notifier_.wait_for(std::chrono::seconds(flush_internal_)); } } void IndexService::do_routine_optimize() { optimize_flag_ = true; while (true) { if (!optimize_flag_) { LOG_INFO("Exited optimize thread"); break; } for (auto it : collections_) { it.second->optimize(thread_pool_); } optimize_notifier_.wait_for(std::chrono::seconds(optimize_internal_)); } } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/index_service.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief IndexService mainly provides collection management and writing * records */ #pragma once #include #include "common/config.h" #include "common/interface/service.h" #include "common/wait_notifier.h" #include "collection.h" #include "concurrent_hash_map.h" #include "typedef.h" namespace proxima { namespace be { namespace index { class IndexService; using IndexServicePtr = std::shared_ptr; /* * IndexService is mainly responsible for collection management * and record indexing. * Collection operations includes create/drop/update .etc * Record operations includes insert/delete/query/update .etc * And it regularly do snapshot from collection to persist storage. */ class IndexService : public Service { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(IndexService); //! Constructor IndexService() = default; //! Destructor virtual ~IndexService(); public: //! Create collection with schema virtual int create_collection(const std::string &collection_name, const meta::CollectionMetaPtr &schema); //! Drop collection by name virtual int drop_collection(const std::string &collection_name); //! Update collection schema virtual int update_collection(const std::string &collection_name, const meta::CollectionMetaPtr &new_schema); //! Check if collection exist virtual bool has_collection(const std::string &collection_name); //! Load collections from storage virtual int load_collections( const std::vector &collection_names, const std::vector &schemas); //! List all collection names virtual int list_collections(std::vector *collection_names); //! Get collection statistics virtual int get_collection_stats(const std::string &collection_name, CollectionStats *collection_stats); //! List all collection segments virtual int list_segments(const std::string &collection_name, std::vector *segments); //! Get collection latest lsn and context virtual int get_latest_lsn(const std::string &collection_name, uint64_t *lsn, std::string *lsn_context); //! Write records to some collection virtual int write_records(const std::string &collection_name, const CollectionDatasetPtr &records); protected: //! Initialize inner members int init_impl() override; //! Cleanup and destroy objects int cleanup_impl() override; //! Start worker thread int start_impl() override; //! Stop worker thread int stop_impl() override; private: bool load_config(); void do_routine_flush(); void do_routine_optimize(); private: ThreadPoolPtr thread_pool_{}; ConcurrentHashMap collections_{}; std::string index_directory_{}; uint32_t thread_count_{0U}; uint32_t flush_internal_{0U}; uint32_t optimize_internal_{0U}; uint32_t concurrency_{0U}; bool use_mmap_read_{false}; WaitNotifier flush_notifier_{}; std::atomic flush_flag_{false}; WaitNotifier optimize_notifier_{}; std::atomic optimize_flag_{false}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/lsn_store.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of lsn store */ #include "lsn_store.h" #include "common/error_code.h" #include "constants.h" #include "file_helper.h" namespace proxima { namespace be { namespace index { LsnStorePtr LsnStore::Create(const std::string &collection_name, const std::string &collection_path) { return std::make_shared(collection_name, collection_path); } int LsnStore::CreateAndOpen(const std::string &collection_name, const std::string &collection_path, const ReadOptions &read_options, LsnStorePtr *lsn_store) { (*lsn_store) = Create(collection_name, collection_path); return (*lsn_store)->open(read_options); } LsnStore::~LsnStore() { if (opened_) { this->close(); } } int LsnStore::open(const ReadOptions &read_options) { CHECK_STATUS(opened_, false); int ret = Snapshot::CreateAndOpen(collection_path_, FileID::LSN_FILE, read_options, &snapshot_); CHECK_RETURN_WITH_CLOG(ret, 0, "Create snapshot failed."); ret = this->mount(); CHECK_RETURN_WITH_CLOG(ret, 0, "Mount storage failed."); opened_ = true; CLOG_DEBUG("Opened lsn store."); return 0; } int LsnStore::flush() { CHECK_STATUS(opened_, true); return snapshot_->flush(); } int LsnStore::close() { CHECK_STATUS(opened_, true); this->unmount(); int ret = snapshot_->close(); if (ret != 0) { LOG_WARN("LsnStore close snapshot failed."); } opened_ = false; CLOG_DEBUG("Closed lsn store"); return 0; } int LsnStore::append(uint64_t lsn, const std::string &lsn_context) { CHECK_STATUS(opened_, true); ailego::WriteLock wlock(mutex_); std::lock_guard lock(wlock); uint64_t expect_write_len = sizeof(uint64_t) + sizeof(uint64_t) + lsn_context.size(); if (expect_write_len > kDataBlockSize) { return ErrorCode_ExceedLimit; } uint32_t block_index = header_.tail_block_index; auto data_block = data_blocks_[block_index]; if (data_block->padding_size() < expect_write_len) { block_index = (block_index + 1) % 2; data_block = data_blocks_[block_index]; data_block->resize(0); header_.tail_block_index = block_index; update_header(); } size_t write_len = data_block->write(data_block->data_size(), &lsn, sizeof(uint64_t)); if (write_len != sizeof(uint64_t)) { return ErrorCode_WriteData; } uint64_t lsn_context_len = lsn_context.size(); write_len = data_block->write(data_block->data_size(), &lsn_context_len, sizeof(uint64_t)); if (write_len != sizeof(uint64_t)) { return ErrorCode_WriteData; } write_len = data_block->write(data_block->data_size(), lsn_context.data(), lsn_context.size()); if (write_len != lsn_context.size()) { return ErrorCode_WriteData; } header_.lsn_count++; update_header(); return 0; } int LsnStore::shift() { CHECK_STATUS(opened_, true); ailego::ReadLock rlock(mutex_); std::lock_guard lock(rlock); // find the writing data block uint32_t block_index = header_.tail_block_index; if (data_blocks_[block_index]->data_size() == 0U) { block_index = (block_index + 1) % 2; } uint64_t expect_shift_len = data_blocks_[block_index]->data_size(); if (expect_shift_len == 0U) { return ErrorCode_ReadData; } auto src_data_block = data_blocks_[block_index]; // copy and shift data block const void *lsn_data; size_t read_len = data_blocks_[block_index]->read( 0, &lsn_data, data_blocks_[block_index]->data_size()); if (read_len != data_blocks_[block_index]->data_size()) { return ErrorCode_ReadData; } data_blocks_[2]->resize(0); size_t write_len = data_blocks_[2]->write(0, lsn_data, read_len); if (write_len != read_len) { return ErrorCode_WriteData; } return 0; } int LsnStore::get_latest_lsn(uint64_t *lsn, std::string *lsn_context) { CHECK_STATUS(opened_, true); ailego::ReadLock rlock(mutex_); std::lock_guard lock(rlock); ailego::Heap> lsn_heap(kWindowSize); // scan lsn data blocks for (size_t i = 0; i < data_blocks_.size(); i++) { auto data_block = data_blocks_[i]; uint64_t offset = 0; while (offset < data_block->data_size()) { uint64_t lsn_val = 0U; size_t read_len = data_block->fetch(offset, &lsn_val, sizeof(uint64_t)); if (read_len != sizeof(uint64_t)) { return ErrorCode_ReadData; } offset += sizeof(uint64_t); uint64_t lsn_context_len; read_len = data_block->fetch(offset, &lsn_context_len, sizeof(uint64_t)); if (read_len != sizeof(uint64_t)) { return ErrorCode_ReadData; } offset += sizeof(uint64_t); std::string lsn_context_val; lsn_context_val.resize(lsn_context_len); read_len = data_block->fetch(offset, (void *)lsn_context_val.data(), lsn_context_len); offset += lsn_context_len; lsn_heap.emplace(LSN(lsn_val, lsn_context_val)); } } // from small to large std::sort(lsn_heap.begin(), lsn_heap.end()); // find last not continues lsn LSN max_lsn; bool found = false; for (size_t i = 0; i + 1 < lsn_heap.size(); i++) { if (lsn_heap[i + 1].lsn > lsn_heap[i].lsn + 1) { max_lsn = lsn_heap[i]; found = true; break; } } // if not find, just pick up last lsn if (!found && lsn_heap.size() > 0) { max_lsn = *(lsn_heap.rbegin()); } *lsn = max_lsn.lsn; *lsn_context = max_lsn.lsn_context; return 0; } int LsnStore::mount() { auto &storage = snapshot_->data(); header_block_ = storage->get(HEADER_BLOCK); int ret = 0; if (!header_block_) { ret = storage->append(HEADER_BLOCK, sizeof(Header)); CHECK_RETURN(ret, 0); header_block_ = storage->get(HEADER_BLOCK); ret = update_header(); CHECK_RETURN(ret, 0); for (uint32_t i = 0; i < kDataBlockCount; i++) { auto block_id = ailego::StringHelper::Concat(DATA_BLOCK, i); ret = storage->append(block_id, kDataBlockSize); CHECK_RETURN(ret, 0); auto data_block = storage->get(block_id); data_blocks_.emplace_back(data_block); } } else { size_t read_len = header_block_->fetch(0, &header_, sizeof(Header)); if (read_len != sizeof(Header)) { return ErrorCode_ReadData; } for (uint32_t i = 0; i < kDataBlockCount; i++) { auto data_block = storage->get(ailego::StringHelper::Concat(DATA_BLOCK, i)); if (!data_block) { return ErrorCode_InvalidIndexDataFormat; } data_blocks_.emplace_back(data_block); } } return 0; } void LsnStore::unmount() { header_block_.reset(); data_blocks_.clear(); memset(&header_, 0, sizeof(header_)); } int LsnStore::update_header() { size_t write_len = header_block_->write(0, &header_, sizeof(Header)); if (write_len != sizeof(Header)) { return ErrorCode_WriteData; } return 0; } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/lsn_store.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Provides storage & search ability of lsn context information */ #pragma once #include #include #include "common/macro_define.h" #include "snapshot.h" #include "typedef.h" namespace proxima { namespace be { namespace index { class LsnStore; using LsnStorePtr = std::shared_ptr; /* * LsnStore is mainly for storage of mysql log sequence number and context. */ class LsnStore { public: /* * Header info */ struct Header { uint64_t tail_block_index{0U}; uint64_t lsn_count{0U}; uint64_t reserved_[6]; }; static_assert(sizeof(Header) % 64 == 0, "Header must be aligned with 64 bytes"); /* * LSN struct, includes lsn and context */ struct LSN { uint64_t lsn{0U}; std::string lsn_context; LSN() = default; LSN(uint64_t lsn_val, const std::string &lsn_context_val) { lsn = lsn_val; lsn_context = lsn_context_val; } bool operator<(const LSN &other) const { return lsn < other.lsn; } bool operator>(const LSN &other) const { return lsn > other.lsn; } }; public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(LsnStore); //! Constructor LsnStore(const std::string &coll_name, const std::string &coll_path) : collection_name_(coll_name), collection_path_(coll_path) {} //! Destructor ~LsnStore(); //! Create instance static LsnStorePtr Create(const std::string &collection_name, const std::string &collection_path); //! Create instance and open static int CreateAndOpen(const std::string &collection_name, const std::string &collection_path, const ReadOptions &read_options, LsnStorePtr *lsn_store); public: //! Open persist storage and initialize int open(const ReadOptions &read_options); //! Flush memory to persist storage int flush(); //! Close persist storage int close(); public: //! Append pair int append(uint64_t lsn, const std::string &lsn_context); //! Shift inner segment int shift(); //! Get latest lsn and context int get_latest_lsn(uint64_t *lsn, std::string *lsn_context); public: //! Return collection name const std::string &collection_name() const { return collection_name_; } //! Return index file path const std::string &file_path() const { return file_path_; } //! Return stored lsn count size_t count() const { return header_.lsn_count; } private: int mount(); void unmount(); int update_header(); private: static constexpr uint64_t kWindowSize = 2000; static constexpr uint64_t kDataBlockCount = 3; static constexpr uint64_t kDataBlockSize = 1UL * 1024UL * 1024UL; private: std::string collection_name_{}; std::string collection_path_{}; std::string file_path_{}; SnapshotPtr snapshot_{}; IndexBlockPtr header_block_{}; std::vector data_blocks_{}; Header header_; ailego::SharedMutex mutex_{}; bool opened_{false}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/persist_hash_map.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author zhongyou.dlx * \date Jun 2021 * \brief Persist hashmap which is thread-safe for add/del operations */ #pragma once #include #include #include "common/error_code.h" #include "common/macro_define.h" #include "constants.h" #include "typedef.h" namespace proxima { namespace be { namespace index { static constexpr uint32_t INVALID_NODE_ID{-1U}; /* * A PersistHashMap represents block of hash data in persist storage. */ template > class PersistHashMap { struct BlockHeader { uint32_t bucket_count; uint32_t node_count; uint32_t free_header; uint32_t reserved[13]; }; static_assert(sizeof(BlockHeader) % 64 == 0, "BlockHeader must be aligned with 64 bytes"); struct NodeType { NodeType(TKey key, TValue value) : first(key), second(value), next(INVALID_NODE_ID) {} TKey first; TValue second; uint32_t next; }; public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(PersistHashMap); //! Constructor PersistHashMap() = default; //! Destructor ~PersistHashMap() = default; public: //! Mount persist storage int mount(const IndexStoragePtr &stg) { if (!stg) { LOG_ERROR("Mount null storage"); return ErrorCode_RuntimeError; } storage_ = stg; for (int i = 0; /* No Limit */; ++i) { std::string block_name = ailego::StringHelper::Concat(DATA_BLOCK, i); auto block = storage_->get(block_name); if (!block) break; const void *data = nullptr; if (ailego_unlikely(block->read(0, &data, sizeof(BlockHeader)) != sizeof(BlockHeader))) { LOG_ERROR("Failed to read block header from block idx %d", i); return ErrorCode_ReadData; } BlockHeader block_header = *static_cast(data); size_t bucket_count = block_header.bucket_count; size_t node_count = bucket_count * kLoadFactor; size_t block_size = sizeof(BlockHeader) + bucket_count * sizeof(uint32_t) + node_count * sizeof(NodeType); if (ailego_unlikely(block->capacity() < block_size)) { return ErrorCode_ReadData; } if (ailego_unlikely(block->data_size() != block_size)) { LOG_DEBUG("Block need reinit"); int ret = init_block(block.get(), bucket_count); if (ret < 0) { return ret; } } blocks_.emplace_back(block); blocks_header_.emplace_back(block_header); } return ErrorCode_Success; } //! Unmount persist storage void unmount() { storage_ = nullptr; blocks_.clear(); blocks_header_.clear(); } //! Reserve int reserve(size_t bucket_count) { ailego::WriteLock wlock(mutex_); std::lock_guard signal_lock(wlock); int ret = ErrorCode_Success; if (blocks_.empty()) { ret = add_block(bucket_count); } return ret; } //! Emplace a key-value pair int emplace(const TKey &key, const TValue &val) { ailego::WriteLock wlock(mutex_); std::lock_guard signal_lock(wlock); size_t block_idx = -1UL; for (int idx = blocks_.size() - 1; idx >= 0; --idx) { if (blocks_header_[idx].free_header != INVALID_NODE_ID) { block_idx = idx; break; } } if (ailego_unlikely(block_idx == -1UL)) { int ret = add_block(); if (ret < 0) { return ret; } block_idx = ret; } int ret = emplace_in_block(block_idx, key, val); return ret; } int emplace_or_assign(const TKey &key, const TValue &val) { ailego::WriteLock wlock(mutex_); std::lock_guard signal_lock(wlock); int ret = find_key(key, [this, &val](const NodeType *node, uint32_t node_idx, const NodeType *, uint32_t, size_t, size_t block_idx) { NodeType writable_node = *node; writable_node.second = val; size_t offset = sizeof(BlockHeader) + blocks_header_[block_idx].bucket_count * sizeof(uint32_t) + node_idx * sizeof(NodeType); if (ailego_unlikely(blocks_[block_idx]->write(offset, &writable_node, sizeof(NodeType)) != sizeof(NodeType))) { LOG_ERROR("Failed to write node content for block idx %zu", block_idx); return ErrorCode_WriteData; } return ErrorCode_Success; }); if (ret == ErrorCode_InexistentKey) { ret = emplace(key, val); } return ret; } //! Get value by key int get(const TKey &key, TValue *value) const { ailego::ReadLock rlock(mutex_); std::lock_guard signal_lock(rlock); int ret = find_key(key, [&value](const NodeType *node, uint32_t, const NodeType *, uint32_t, size_t, size_t) { *value = node->second; return ErrorCode_Success; }); return ret; } //! If has key bool has(const TKey &key) const { ailego::ReadLock rlock(mutex_); std::lock_guard signal_lock(rlock); int ret = find_key(key, [](const NodeType *, uint32_t, const NodeType *, uint32_t, size_t, size_t) { return ErrorCode_Success; }); return (ret == ErrorCode_Success); } //! Return key-value pair count size_t size() const { ailego::ReadLock rlock(mutex_); std::lock_guard signal_lock(rlock); size_t val = 0; for (int i = 0; i < (int)blocks_header_.size(); ++i) { val += blocks_header_[i].node_count; } return val; } //! Erase a pair by key int erase(const TKey &key) { ailego::WriteLock wlock(mutex_); std::lock_guard signal_lock(wlock); int ret = find_key(key, [this](const NodeType *node, uint32_t node_idx, const NodeType *pre_node, uint32_t pre_node_idx, size_t bucket_offset, size_t block_idx) { auto &block = blocks_[block_idx]; // free node if (pre_node == nullptr) { if (ailego_unlikely( block->write(bucket_offset, &(node->next), sizeof(uint32_t)) != sizeof(uint32_t))) { LOG_ERROR("Failed to write bucket content for block idx %zu", block_idx); return ErrorCode_WriteData; } } else { NodeType writable_node = *pre_node; writable_node.next = node->next; size_t offset = sizeof(BlockHeader) + blocks_header_[block_idx].bucket_count * sizeof(uint32_t) + pre_node_idx * sizeof(NodeType); if (ailego_unlikely( block->write(offset, &writable_node, sizeof(NodeType)) != sizeof(NodeType))) { LOG_ERROR("Failed to write node content for block idx %zu", block_idx); return ErrorCode_WriteData; } } // recycle node NodeType writable_node = *node; writable_node.next = blocks_header_[block_idx].free_header; size_t offset = sizeof(BlockHeader) + blocks_header_[block_idx].bucket_count * sizeof(uint32_t) + node_idx * sizeof(NodeType); if (ailego_unlikely(block->write(offset, &writable_node, sizeof(NodeType)) != sizeof(NodeType))) { LOG_ERROR("Failed to write node content for block idx %zu", block_idx); return ErrorCode_WriteData; } blocks_header_[block_idx].free_header = node_idx; blocks_header_[block_idx].node_count -= 1; if (ailego_unlikely(block->write(0, &blocks_header_[block_idx], sizeof(BlockHeader)) != sizeof(BlockHeader))) { LOG_ERROR("Failed to write block header for block idx %zu", block_idx); return ErrorCode_WriteData; } return ErrorCode_Success; }); return ret; } private: size_t constrain_hash(size_t hash, size_t block_capacity) const { size_t slot = hash % block_capacity; return sizeof(BlockHeader) + slot * sizeof(uint32_t); } int find_key(const TKey &key, std::function fun) const { const uint64_t hash = hasher_(key); for (int idx = blocks_.size() - 1; idx >= 0; --idx) { auto &block = blocks_[idx]; size_t bucket_offset = constrain_hash(hash, blocks_header_[idx].bucket_count); ailego_assert_with(bucket_offset < block->data_size(), "Invalid Offset"); const NodeType *pre_node = nullptr; uint32_t pre_node_idx = INVALID_NODE_ID; const void *data = nullptr; if (ailego_unlikely(block->read(bucket_offset, &data, sizeof(uint32_t)) != sizeof(uint32_t))) { LOG_ERROR("Failed to read bucket content from block idx %d", idx); return ErrorCode_ReadData; } uint32_t bucket_idx = *static_cast(data); uint32_t next = bucket_idx; while (next != INVALID_NODE_ID) { size_t offset = sizeof(BlockHeader) + blocks_header_[idx].bucket_count * sizeof(uint32_t) + next * sizeof(NodeType); if (ailego_unlikely(block->read(offset, &data, sizeof(NodeType)) != sizeof(NodeType))) { LOG_ERROR("Failed to read node content from block idx %d", idx); return ErrorCode_ReadData; } const NodeType *node = static_cast(data); if (node->first == key) { int ret = fun(node, next, pre_node, pre_node_idx, bucket_offset, idx); if (ailego_unlikely(ret < 0)) { return ret; } return ErrorCode_Success; } else { pre_node_idx = next; pre_node = node; next = node->next; } } } return ErrorCode_InexistentKey; } int emplace_in_block(size_t block_idx, const TKey &key, const TValue &value) { auto &block = blocks_[block_idx]; uint32_t free_idx = blocks_header_[block_idx].free_header; uint32_t bucket_count = blocks_header_[block_idx].bucket_count; // alloc Node const void *data = nullptr; size_t free_offset = sizeof(BlockHeader) + bucket_count * sizeof(uint32_t) + free_idx * sizeof(NodeType); if (ailego_unlikely(block->read(free_offset, &data, sizeof(NodeType)) != sizeof(NodeType))) { LOG_ERROR("Failed to read node content from block idx %zu", block_idx); return ErrorCode_ReadData; } const NodeType *free_node = static_cast(data); blocks_header_[block_idx].free_header = free_node->next; blocks_header_[block_idx].node_count += 1; // write node const uint64_t hash = hasher_(key); size_t bucket_offset = constrain_hash(hash, blocks_header_[block_idx].bucket_count); if (ailego_unlikely(block->read(bucket_offset, &data, sizeof(uint32_t)) != sizeof(uint32_t))) { LOG_ERROR("Failed to read bucket content from block idx %zu", block_idx); return ErrorCode_ReadData; } NodeType node(key, value); node.next = *static_cast(data); if (ailego_unlikely(block->write(free_offset, &node, sizeof(NodeType)) != sizeof(NodeType))) { LOG_ERROR("Failed to write node content for block idx %zu", block_idx); return ErrorCode_WriteData; } // update bucket hash link if (ailego_unlikely(block->write(bucket_offset, &free_idx, sizeof(uint32_t)) != sizeof(uint32_t))) { LOG_ERROR("Failed to write bucket content for block idx %zu", block_idx); return ErrorCode_WriteData; } // update block header if (ailego_unlikely( block->write(0, &blocks_header_[block_idx], sizeof(BlockHeader)) != sizeof(BlockHeader))) { LOG_ERROR("Failed to write block header for block idx %zu", block_idx); return ErrorCode_WriteData; } return ErrorCode_Success; } int add_block(size_t bucket_count = 0) { uint32_t block_idx = blocks_.size(); std::string block_name = ailego::StringHelper::Concat(DATA_BLOCK, block_idx); if (bucket_count == 0) { bucket_count = (block_idx == 0) ? kInitBucketCount : blocks_header_[block_idx - 1].bucket_count * 2; } else { bucket_count = pow(2, ceil(log2(bucket_count))); } size_t node_count = bucket_count * kLoadFactor; if (node_count >= INVALID_NODE_ID) { bucket_count = pow(2, floor(log2(INVALID_NODE_ID / kLoadFactor))); node_count = bucket_count * kLoadFactor; } size_t block_size = sizeof(BlockHeader) + bucket_count * sizeof(uint32_t) + node_count * sizeof(NodeType); int ret = storage_->append(block_name, block_size); if (ret != 0) { LOG_ERROR("Failed to append block %s for %s, size %zu", block_name.c_str(), aitheta2::IndexError::What(ret), block_size); return ret; } IndexBlockPtr block = storage_->get(block_name); ret = init_block(block.get(), bucket_count); if (ret != 0) { LOG_ERROR("Failed to init new block"); return ret; } blocks_.emplace_back(block); BlockHeader block_header; block_header.bucket_count = bucket_count; block_header.node_count = 0; block_header.free_header = 0; blocks_header_.emplace_back(block_header); LOG_DEBUG("Add new block with bucket count[%zu]", bucket_count); return block_idx; } int init_block(IndexBlock *block, uint32_t bucket_count) { if (block == nullptr) { return ErrorCode_WriteData; } LOG_DEBUG("Init block with bucket count[%u]", bucket_count); BlockHeader block_header; block_header.bucket_count = bucket_count; block_header.node_count = 0; block_header.free_header = 0; if (ailego_unlikely(block->write(0, &block_header, sizeof(BlockHeader)) != sizeof(BlockHeader))) { LOG_ERROR("Failed to fill block header"); return ErrorCode_WriteData; } std::vector buckets(bucket_count, INVALID_NODE_ID); size_t buckets_size = buckets.size() * sizeof(uint32_t); if (ailego_unlikely(block->write(sizeof(BlockHeader), buckets.data(), buckets_size) != buckets_size)) { LOG_ERROR("Failed to fill block buckets"); return ErrorCode_WriteData; } size_t offset = sizeof(BlockHeader) + buckets_size; NodeType empty(0, TValue()); size_t empty_size = sizeof(NodeType); size_t node_count = bucket_count * kLoadFactor; for (size_t i = 0; i < node_count; ++i) { empty.next = i == (node_count - 1) ? INVALID_NODE_ID : i + 1; if (ailego_unlikely(block->write(offset, &empty, empty_size) != empty_size)) { LOG_ERROR("Failed to fill block nodes"); return ErrorCode_WriteData; }; offset += empty_size; } return ErrorCode_Success; } private: static constexpr uint32_t kInitBucketCount{1U * 1024U}; static constexpr double kLoadFactor{1.0}; private: mutable ailego::SharedMutex mutex_{}; Hash hasher_{}; IndexStoragePtr storage_{}; std::vector blocks_{}; std::vector blocks_header_{}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/segment/memory_segment.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of memory segment */ #include "memory_segment.h" #include #include #include "common/error_code.h" #include "../file_helper.h" #include "../typedef.h" namespace proxima { namespace be { namespace index { MemorySegmentPtr MemorySegment::Create(const std::string &collection_name, const std::string &collection_path, const SegmentMeta &segment_meta, const meta::CollectionMeta *schema, const DeleteStore *delete_store, const IDMap *id_map, uint32_t concurrency) { return std::make_shared(collection_name, collection_path, segment_meta, schema, delete_store, id_map, concurrency); } int MemorySegment::CreateAndOpen( const std::string &collection_name, const std::string &collection_path, const SegmentMeta &segment_meta, const meta::CollectionMeta *schema, const DeleteStore *delete_store, const IDMap *id_map, uint32_t concurrency, const ReadOptions &read_options, MemorySegmentPtr *memory_segment) { *memory_segment = Create(collection_name, collection_path, segment_meta, schema, delete_store, id_map, concurrency); return (*memory_segment)->open(read_options); } MemorySegment::~MemorySegment() { if (opened_) { if (segment_meta_.state == SegmentState::PERSIST) { close_and_remove_files(); } else { close(); } } } int MemorySegment::open(const ReadOptions &read_options) { CHECK_STATUS(opened_, false); int ret = open_forward_indexer(read_options); CHECK_RETURN(ret, 0); ret = open_column_indexers(read_options); CHECK_RETURN(ret, 0); segment_meta_.index_file_count = this->get_index_file_count(); segment_meta_.index_file_size = this->get_index_file_size(); opened_ = true; SLOG_INFO("Opened memory segment."); return 0; } int MemorySegment::close() { CHECK_STATUS(opened_, true); // try to ensure active insert requests finished uint32_t retry = 0; while (retry < MAX_WAIT_RETRY_COUNT && (active_insert_count_ > 0 || active_search_count_ > 0)) { LOG_INFO( "Try to wait active request finished. active_insert_count[%zu] " "active_search_count[%zu] retry[%d]", (size_t)active_insert_count_.load(), (size_t)active_search_count_.load(), retry); std::this_thread::sleep_for(std::chrono::seconds(1)); retry++; } forward_indexer_->close(); for (auto &it : column_indexers_) { it.second->close(); } column_indexers_.clear(); opened_ = false; SLOG_DEBUG("Closed memory segment."); return 0; } int MemorySegment::flush() { CHECK_STATUS(opened_, true); forward_indexer_->flush(); for (auto &it : column_indexers_) { it.second->flush(); } segment_meta_.index_file_count = this->get_index_file_count(); segment_meta_.index_file_size = this->get_index_file_size(); return 0; } int MemorySegment::dump() { CHECK_STATUS(opened_, true); // try to ensure active insert requests finished uint32_t retry = 0; while (retry < MAX_WAIT_RETRY_COUNT && active_insert_count_ > 0) { LOG_INFO( "Try to wait active request finished. active_insert_count[%zu] " "retry[%d]", (size_t)active_insert_count_.load(), retry); std::this_thread::sleep_for(std::chrono::seconds(1)); retry++; } auto dumper = aitheta2::IndexFactory::CreateDumper("FileDumper"); if (!dumper) { SLOG_ERROR("Create dumper failed."); return ErrorCode_RuntimeError; } std::string segment_file_path = FileHelper::MakeFilePath( collection_path_, FileID::SEGMENT_FILE, segment_meta_.segment_id); int ret = dumper->create(segment_file_path); CHECK_RETURN_WITH_CLOG(ret, 0, "Create dumper file failed."); ret = dump_forward_indexer(dumper); CHECK_RETURN(ret, 0); ret = dump_column_indexers(dumper); CHECK_RETURN(ret, 0); dumper->close(); segment_meta_.index_file_count = 1U; segment_meta_.index_file_size = FileHelper::FileSize(segment_file_path); return 0; } int MemorySegment::close_and_remove_files() { CHECK_STATUS(opened_, true); forward_indexer_->close(); FileHelper::RemoveFile(forward_indexer_->index_file_path()); for (auto &it : column_indexers_) { it.second->close(); FileHelper::RemoveFile(it.second->index_file_path()); } column_indexers_.clear(); opened_ = false; SLOG_DEBUG("Closed memory segment and remove index files."); return 0; } int MemorySegment::insert(const Record &record, idx_t *doc_id) { CHECK_STATUS(opened_, true); AutoCounter ac(active_insert_count_); // 1. insert into forward indexer first ForwardData fwd_data; fwd_data.header.primary_key = record.primary_key; fwd_data.header.timestamp = record.timestamp; fwd_data.header.lsn = record.lsn; fwd_data.header.revision = record.revision; fwd_data.data = std::move(record.forward_data); int ret = forward_indexer_->insert(fwd_data, doc_id); CHECK_RETURN_WITH_SLOG(ret, 0, "Insert into forward indexer failed. key[%zu]", (size_t)record.primary_key); // 2. insert into column indexers for (size_t i = 0; i < record.column_datas.size(); i++) { auto &column_data = record.column_datas[i]; std::string column_name = column_data.column_name; // Skip not-exist column if (!column_indexers_.has(column_name)) { SLOG_ERROR("Not find column indexer. column[%s]", column_name.c_str()); continue; } auto &column_indexer = column_indexers_.get(column_name); ret = column_indexer->insert(*doc_id, column_data); CHECK_RETURN_WITH_SLOG( ret, 0, "Insert into column indexer failed. key[%zu] column[%s]", (size_t)record.primary_key, column_name.c_str()); } // 3. update segment stats update_stats(record, *doc_id); return 0; } int MemorySegment::remove(idx_t doc_id) { CHECK_STATUS(opened_, true); ailego::ElapsedTime timer; int ret = 0; // No need to remove forward data. #if 0 ret = forward_indexer_->remove(doc_id); CHECK_RETURN_WITH_SLOG(ret, 0, "Remove from forward indexer failed. doc_id[%zu]", (size_t)doc_id); #endif for (auto &column_meta : schema_->index_columns()) { std::string column_name = column_meta->name(); if (column_indexers_.has(column_name)) { ret = column_indexers_.get(column_name)->remove(doc_id); if (ret != 0) { SLOG_WARN( "Remove from column indexer failed. column_name[%s] doc_id[%zu]", column_name.c_str(), (size_t)doc_id); continue; } } } SLOG_DEBUG("Remove from memory segment success. doc_id[%lu] cost[%zuus]", (size_t)doc_id, timer.micro_seconds()); return 0; } int MemorySegment::optimize(ThreadPoolPtr pool) { CHECK_STATUS(opened_, true); int ret = 0; for (auto &column_meta : schema_->index_columns()) { std::string column_name = column_meta->name(); if (column_indexers_.has(column_name)) { ret = column_indexers_.get(column_name)->optimize(pool); if (ret != 0) { SLOG_WARN("Optimize column indexer failed. column_name[%s]", column_name.c_str()); continue; } } } return 0; } #if 0 int MemorySegment::update(idx_t doc_id, const Record &record) { CHECK_STATUS(opened_, true); AutoCounter ac(active_insert_count_); // 1. insert into forward indexer first ForwardData fwd_data; fwd_data.header.primary_key = record.primary_key; fwd_data.header.timestamp = record.timestamp; fwd_data.header.lsn = record.lsn; fwd_data.header.revision = record.revision; fwd_data.data = std::move(record.forward_data); int ret = forward_indexer_->update(doc_id, fwd_data); CHECK_RETURN_WITH_SLOG(ret, 0, "Update forward indexer failed. key[%zu]", (size_t)record.primary_key); // 2. insert into column indexers for (size_t i = 0; i < record.column_datas.size(); i++) { auto &column_data = record.column_datas[i]; auto &column_name = column_data.column_name; // Skip not-exist column if (!column_indexers_.has(column_name)) { SLOG_ERROR("Not find column indexer. column[%s]", column_name.c_str()); continue; } auto &column_indexer = column_indexers_.get(column_name); ret = column_indexer->update(doc_id, column_data); CHECK_RETURN_WITH_SLOG( ret, 0, "Update column indexer failed. key[%zu] column[%s]", (size_t)record.primary_key, column_name.c_str()); } return 0; } #endif int MemorySegment::knn_search(const std::string &column_name, const std::string &query, const QueryParams &query_params, QueryResultList *result) { CHECK_STATUS(opened_, true); std::vector batch_results; int ret = this->knn_search(column_name, query, query_params, 1, &batch_results); CHECK_RETURN(ret, 0); (*result) = batch_results[0]; return 0; } int MemorySegment::knn_search(const std::string &column_name, const std::string &query, const QueryParams &query_params, uint32_t batch_count, std::vector *batch_results) { CHECK_STATUS(opened_, true); AutoCounter as(active_search_count_); ailego::ElapsedTime timer; uint64_t query_id = query_params.query_id; if (!column_indexers_.has(column_name)) { SLOG_ERROR("Column not exist. query_id[%zu] column[%s]", (size_t)query_id, column_name.c_str()); return ErrorCode_InexistentColumn; } // check query format auto &column_indexer = column_indexers_.get(column_name); // search columns std::vector batch_search_results; FilterFunction filter = nullptr; // If user choose to use deep delete, then we don't need to pass filter // to column indexer. if (delete_store_ && delete_store_->count() > 0) { filter = [this](idx_t doc_id) { return delete_store_->has(doc_id); }; } int ret = column_indexer->search(query, query_params, batch_count, filter, &batch_search_results); CHECK_RETURN_WITH_SLOG( ret, 0, "Column indexer search failed. query_id[%zu] column[%s]", (size_t)query_id, column_name.c_str()); // fill results uint32_t res_num = 0U; for (size_t i = 0; i < batch_search_results.size(); i++) { auto &search_results = batch_search_results[i]; QueryResultList output_result_list; for (size_t j = 0; j < search_results.size(); j++) { idx_t doc_id = search_results[j].key(); ForwardData fwd_data; ret = forward_indexer_->seek(doc_id, &fwd_data); if (ret != 0) { SLOG_WARN( "Forward data not exist. query_id[%zu] doc_id[%zu] column[%s]", (size_t)query_id, (size_t)doc_id, column_name.c_str()); continue; } QueryResult res; res.primary_key = fwd_data.header.primary_key; res.score = search_results[j].score(); res.revision = fwd_data.header.revision; res.forward_data = std::move(fwd_data.data); res.lsn = fwd_data.header.lsn; output_result_list.emplace_back(res); } res_num += search_results.size(); batch_results->emplace_back(output_result_list); } SLOG_DEBUG( "Knn search query success. query_id[%zu] " "batch_count[%u] topk[%u] res_num[%u] cost[%zuus] column[%s]", (size_t)query_id, batch_count, query_params.topk, res_num, (size_t)timer.micro_seconds(), column_name.c_str()); return 0; } int MemorySegment::kv_search(uint64_t primary_key, QueryResult *result) { CHECK_STATUS(opened_, true); idx_t doc_id = id_map_->get_mapping_id(primary_key); bool found = false; result->primary_key = INVALID_KEY; if (!delete_store_->has(doc_id)) { if (doc_id >= segment_meta_.min_doc_id && doc_id <= segment_meta_.max_doc_id) { ForwardData fwd_data; int ret = forward_indexer_->seek(doc_id, &fwd_data); if (ret == 0 && fwd_data.header.primary_key != INVALID_KEY) { result->primary_key = fwd_data.header.primary_key; result->revision = fwd_data.header.revision; result->forward_data = std::move(fwd_data.data); result->lsn = fwd_data.header.lsn; found = true; } } } SLOG_DEBUG("Kv search query success. key[%zu] found[%d]", (size_t)primary_key, found); return 0; } int MemorySegment::remove_column(const std::string &column_name) { CHECK_STATUS(opened_, true); if (!column_indexers_.has(column_name)) { SLOG_WARN("Column not exist, remove failed. column[%s]", column_name.c_str()); return 0; } column_indexers_.get(column_name)->close(); column_indexers_.erase(column_name); SLOG_INFO("Remove column done. column[%s]", column_name.c_str()); return 0; } int MemorySegment::add_column(const meta::ColumnMetaPtr &column_meta) { CHECK_STATUS(opened_, true); std::string column_name = column_meta->name(); if (column_indexers_.has(column_name)) { SLOG_WARN("Column already exist, add failed. column[%s]", column_name.c_str()); return 0; } ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; ColumnIndexerPtr column_indexer = ColumnIndexer::Create( collection_name_, collection_path_, segment_meta_.segment_id, column_name, column_meta->index_type()); if (!column_indexer) { SLOG_ERROR("Create column indexer failed. index_type[%d] column[%s]", column_meta->index_type(), column_name.c_str()); return ErrorCode_RuntimeError; } column_indexer->set_concurrency(concurrency_); int ret = column_indexer->open(*column_meta.get(), read_options); CHECK_RETURN_WITH_SLOG( ret, 0, "Create and open column indexer failed. ret[%d] column[%s]", ret, column_name.c_str()); column_indexers_.emplace(column_name, column_indexer); SLOG_INFO("Add column success.column[%s]", column_name.c_str()); return 0; } int MemorySegment::open_forward_indexer(const ReadOptions &read_options) { forward_indexer_ = ForwardIndexer::Create(collection_name_, collection_path_, segment_meta_.segment_id); if (!forward_indexer_) { SLOG_ERROR("Create forward indexer failed."); return ErrorCode_RuntimeError; } forward_indexer_->set_start_doc_id(segment_meta_.min_doc_id); int ret = forward_indexer_->open(read_options); CHECK_RETURN_WITH_SLOG(ret, 0, "Open forward indexer failed."); SLOG_DEBUG("Opened forward indexer. min_doc_id[%zu] forward_count[%zu]", (size_t)segment_meta_.min_doc_id, (size_t)forward_indexer_->doc_count()); return 0; } int MemorySegment::open_column_indexers(const ReadOptions &read_options) { for (auto &column_meta : schema_->index_columns()) { std::string column_name = column_meta->name(); ColumnIndexerPtr column_indexer = ColumnIndexer::Create( collection_name_, collection_path_, segment_meta_.segment_id, column_name, column_meta->index_type()); if (!column_indexer) { SLOG_ERROR("Create column indexer failed. index_type[%d] column[%s]", column_meta->index_type(), column_name.c_str()); return ErrorCode_RuntimeError; } int ret = column_indexer->open(*column_meta.get(), read_options); CHECK_RETURN_WITH_SLOG( ret, 0, "Create and open column indexer failed. ret[%d] column[%s]", ret, column_name.c_str()); column_indexers_.emplace(column_name, column_indexer); SLOG_DEBUG("Opened column indexer. column[%s]", column_name.c_str()); } return 0; } int MemorySegment::dump_forward_indexer(const IndexDumperPtr &dumper) { IndexDumperPtr fwd_dumper = std::make_shared(dumper, FORWARD_DUMP_BLOCK); int ret = forward_indexer_->dump(fwd_dumper); CHECK_RETURN_WITH_SLOG(ret, 0, "Dump forward indexer failed."); fwd_dumper->close(); return 0; } int MemorySegment::dump_column_indexers(const IndexDumperPtr &dumper) { for (auto &it : column_indexers_) { std::string column_name = it.first; auto &column_indexer = it.second; IndexDumperPtr index_dumper = std::make_shared( dumper, COLUMN_DUMP_BLOCK + column_name); int ret = column_indexer->dump(index_dumper); CHECK_RETURN_WITH_SLOG(ret, 0, "Dump column indexer failed. column[%s]", column_name.c_str()); index_dumper->close(); } return 0; } void MemorySegment::update_stats(const Record &record, idx_t doc_id) { std::lock_guard lock(mutex_); segment_meta_.doc_count++; if (doc_id > segment_meta_.max_doc_id) { segment_meta_.max_doc_id = doc_id; } if (record.primary_key < segment_meta_.min_primary_key) { segment_meta_.min_primary_key = record.primary_key; } if (record.primary_key > segment_meta_.max_primary_key) { segment_meta_.max_primary_key = record.primary_key; } if (record.timestamp < segment_meta_.min_timestamp) { segment_meta_.min_timestamp = record.timestamp; } if (record.timestamp > segment_meta_.max_timestamp) { segment_meta_.max_timestamp = record.timestamp; } if (record.lsn > segment_meta_.max_lsn) { segment_meta_.max_lsn = record.lsn; } if (record.lsn < segment_meta_.min_lsn) { segment_meta_.min_lsn = record.lsn; } } size_t MemorySegment::get_index_file_count() { return column_indexers_.size() + 1; } size_t MemorySegment::get_index_file_size() { size_t file_size = 0U; for (auto &it : column_indexers_) { file_size += FileHelper::FileSize(it.second->index_file_path()); } file_size += FileHelper::FileSize(forward_indexer_->index_file_path()); return file_size; } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/segment/memory_segment.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Writing requests will insert into memory segment firstly. * Then it will dump to persist segment when it's full */ #pragma once #include #include "common/auto_counter.h" #include "meta/meta.h" #include "segment.h" #include "../collection_dataset.h" #include "../column/column_indexer.h" #include "../column/forward_indexer.h" #include "../concurrent_hash_map.h" #include "../delete_store.h" #include "../id_map.h" namespace proxima { namespace be { namespace index { class MemorySegment; using MemorySegmentPtr = std::shared_ptr; /* * A MemorySegment represents block of index data in memory, with * streaming insert and search ability at the same time. You can * set a docs limit to it, and it will dump to persit storage when * full. */ class MemorySegment : public Segment { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(MemorySegment); //! Constructor MemorySegment(const std::string &coll_name, const std::string &coll_path, const SegmentMeta &seg_meta, const meta::CollectionMeta *schema_ptr, const DeleteStore *delete_store_ptr, const IDMap *id_map_ptr, uint32_t concurrency_val) : schema_(schema_ptr), delete_store_(delete_store_ptr), id_map_(id_map_ptr), concurrency_(concurrency_val) { this->set_collection_name(coll_name); this->set_collection_path(coll_path); this->set_segment_meta(seg_meta); } //! Destructor ~MemorySegment() override; //! Create an instance and return shared ptr static MemorySegmentPtr Create(const std::string &collection_name, const std::string &collection_path, const SegmentMeta &segment_meta, const meta::CollectionMeta *schema, const DeleteStore *delete_store, const IDMap *id_map, uint32_t concurrency); //! Create and open an instance static int CreateAndOpen(const std::string &collection_name, const std::string &collection_path, const SegmentMeta &segment_meta, const meta::CollectionMeta *schema, const DeleteStore *delete_store, const IDMap *id_map, uint32_t concurrency, const ReadOptions &read_options, MemorySegmentPtr *memory_segment); public: //! Open and initialize memory segment int open(const ReadOptions &read_options); //! Close and cleanup memory segment int close(); //! Flush memory to persist storage int flush(); //! Dump to another index type to persist storage int dump(); //! Close and remove internal files int close_and_remove_files(); public: //! Insert a record & alloc a doc_id int insert(const Record &record, idx_t *doc_id); //! Remove a record int remove(idx_t doc_id); //! Optimize memory usage int optimize(ThreadPoolPtr pool); #if 0 //! Update a record int update(idx_t doc_id, const Record &record); #endif //! Knn similar search int knn_search(const std::string &column_name, const std::string &query, const QueryParams &query_params, QueryResultList *results) override; //! Knn similar search with batch mode int knn_search(const std::string &column_name, const std::string &query, const QueryParams &query_params, uint32_t batch_count, std::vector *results) override; //! Just search forward by doc primary key int kv_search(uint64_t primary_key, QueryResult *result) override; public: //! Remove a column int remove_column(const std::string &column_name) override; //! Add a column int add_column(const meta::ColumnMetaPtr &column_meta) override; public: //! Set segment state void update_state(SegmentState new_state) { segment_meta_.state = new_state; } //! Return forward count size_t doc_count() const override { return segment_meta_.doc_count; } public: //! Get forward reader ForwardReaderPtr get_forward_reader() const override { return forward_indexer_; } //! Get column reader ColumnReaderPtr get_column_reader( const std::string &column_name) const override { if (!column_indexers_.has(column_name)) { return ColumnReaderPtr(); } return column_indexers_.get(column_name); } private: int open_forward_indexer(const ReadOptions &read_options); int open_column_indexers(const ReadOptions &read_options); int dump_forward_indexer(const IndexDumperPtr &dumper); int dump_column_indexers(const IndexDumperPtr &dumper); void update_stats(const Record &record, idx_t doc_id); size_t get_index_file_count(); size_t get_index_file_size(); private: static constexpr uint32_t MAX_WAIT_RETRY_COUNT = 60U; private: const meta::CollectionMeta *schema_{nullptr}; const DeleteStore *delete_store_{nullptr}; const IDMap *id_map_{nullptr}; uint32_t concurrency_{0U}; ForwardIndexerPtr forward_indexer_{}; ConcurrentHashMap column_indexers_{}; std::mutex mutex_{}; std::atomic active_insert_count_{0U}; std::atomic active_search_count_{0U}; bool opened_{false}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/segment/persist_segment.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of persist segment */ #include "persist_segment.h" #include #include "common/auto_counter.h" #include "common/error_code.h" #include "../file_helper.h" namespace proxima { namespace be { namespace index { PersistSegmentPtr PersistSegment::Create(const std::string &collection_name, const std::string &collection_path, const SegmentMeta &segment_meta, const meta::CollectionMeta *schema, const DeleteStore *delete_store, const IDMap *id_map, uint32_t concurrency) { return std::make_shared(collection_name, collection_path, segment_meta, schema, delete_store, id_map, concurrency); } int PersistSegment::CreateAndLoad( const std::string &collection_name, const std::string &collection_path, const SegmentMeta &segment_meta, const meta::CollectionMeta *schema, const DeleteStore *delete_store, const IDMap *id_map, uint32_t concurrency, const ReadOptions &read_options, PersistSegmentPtr *persist_segment) { (*persist_segment) = Create(collection_name, collection_path, segment_meta, schema, delete_store, id_map, concurrency); return (*persist_segment)->load(read_options); } PersistSegment::~PersistSegment() { if (loaded_) { unload(); } } int PersistSegment::load(const ReadOptions &read_options) { CHECK_STATUS(loaded_, false); // Load forward searcher int ret = load_forward_reader(read_options); CHECK_RETURN_WITH_SLOG(ret, 0, "Load forward searcher failed."); // Load column searchers ret = load_column_readers(read_options); CHECK_RETURN_WITH_SLOG(ret, 0, "Load column searchers failed."); SLOG_DEBUG("Load persist segment success."); loaded_ = true; return 0; } int PersistSegment::unload() { CHECK_STATUS(loaded_, true); // try to ensure active search requests finished uint32_t retry = 0; while (retry < MAX_WAIT_RETRY_COUNT && active_search_count_ > 0) { LOG_INFO( "Try to wait active request finished. active_search_count[%zu] " "retry[%d]", (size_t)active_search_count_.load(), retry); std::this_thread::sleep_for(std::chrono::seconds(1)); retry++; } forward_reader_->close(); for (auto &it : column_readers_) { // Check if column searcher is empty searcher // because sometimes will add empty column in // persist segment. if (it.second != nullptr) { it.second->close(); } } column_readers_.clear(); loaded_ = false; SLOG_DEBUG("Unloaded persist segment."); return 0; } int PersistSegment::knn_search(const std::string &column_name, const std::string &query, const QueryParams &query_params, QueryResultList *results) { CHECK_STATUS(loaded_, true); std::vector batch_results; int ret = this->knn_search(column_name, query, query_params, 1, &batch_results); CHECK_RETURN(ret, 0); (*results) = batch_results[0]; return 0; } int PersistSegment::knn_search(const std::string &column_name, const std::string &query, const QueryParams &query_params, uint32_t batch_count, std::vector *batch_results) { CHECK_STATUS(loaded_, true); AutoCounter as(active_search_count_); ailego::ElapsedTime timer; uint64_t query_id = query_params.query_id; if (!column_readers_.has(column_name)) { SLOG_ERROR("Column not exist. query_id[%zu] column_name[%s]", (size_t)query_id, column_name.c_str()); return ErrorCode_InexistentColumn; } auto &column_reader = column_readers_.get(column_name); // check if column searcher is empty searcher // it means this column added later by update schema // so we just return empty results if (!column_reader) { SLOG_INFO( "Empty column searcher return empty results. query_id[%zu] " "batch_count[%u] topk[%u] " "res_num[0] cost[%zums] column[%s]", (size_t)query_id, batch_count, query_params.topk, (size_t)timer.milli_seconds(), column_name.c_str()); return 0; } // search columns std::vector batch_search_results; FilterFunction filter = nullptr; if (delete_store_ && delete_store_->count() > 0) { filter = [this](idx_t doc_id) { return delete_store_->has(doc_id); }; } int ret = column_reader->search(query, query_params, batch_count, filter, &batch_search_results); CHECK_RETURN_WITH_SLOG( ret, 0, "Column searcher search failed. query_id[%zu] column[%s]", (size_t)query_id, column_name.c_str()); // fill results uint32_t res_num = 0U; for (size_t i = 0; i < batch_search_results.size(); i++) { auto &search_results = batch_search_results[i]; QueryResultList output_result_list; for (size_t j = 0; j < search_results.size(); j++) { idx_t doc_id = search_results[j].key(); ForwardData fwd_data; ret = forward_reader_->seek(doc_id, &fwd_data); if (ret != 0) { SLOG_WARN("Forward not exist. query_id[%zu] doc_id[%zu] column[%s] ", (size_t)query_id, (size_t)doc_id, column_name.c_str()); continue; } QueryResult res; res.primary_key = fwd_data.header.primary_key; res.score = search_results[j].score(); res.revision = fwd_data.header.revision; res.forward_data = std::move(fwd_data.data); res.lsn = fwd_data.header.lsn; output_result_list.emplace_back(res); } res_num += search_results.size(); batch_results->emplace_back(output_result_list); } SLOG_DEBUG( "Knn search query success. query_id[%zu] " "batch_count[%u] topk[%u] res_num[%u] cost[%zuus] column[%s]", (size_t)query_id, batch_count, query_params.topk, res_num, (size_t)timer.micro_seconds(), column_name.c_str()); return 0; } int PersistSegment::kv_search(uint64_t primary_key, QueryResult *result) { CHECK_STATUS(loaded_, true); idx_t doc_id = id_map_->get_mapping_id(primary_key); bool found = false; result->primary_key = INVALID_KEY; if (!delete_store_->has(doc_id)) { if (doc_id >= segment_meta_.min_doc_id && doc_id <= segment_meta_.max_doc_id) { ForwardData fwd_data; int ret = forward_reader_->seek(doc_id, &fwd_data); if (ret == 0 && fwd_data.header.primary_key != INVALID_KEY) { result->primary_key = fwd_data.header.primary_key; result->revision = fwd_data.header.revision; result->forward_data = std::move(fwd_data.data); result->lsn = fwd_data.header.lsn; found = true; } } } SLOG_DEBUG("Kv search query success. key[%zu] found[%d]", (size_t)primary_key, found); return 0; } int PersistSegment::remove_column(const std::string &column_name) { CHECK_STATUS(loaded_, true); if (!column_readers_.has(column_name)) { SLOG_WARN("Column not exist, remove failed. column[%s]", column_name.c_str()); return 0; } column_readers_.get(column_name)->close(); column_readers_.erase(column_name); SLOG_INFO("Remove column done. column[%s]", column_name.c_str()); return 0; } int PersistSegment::add_column(const meta::ColumnMetaPtr &column_meta) { CHECK_STATUS(loaded_, true); std::string column_name = column_meta->name(); if (column_readers_.has(column_meta->name())) { SLOG_WARN("Column already exist, remove failed. column[%s]", column_name.c_str()); return 0; } // occupy a empty column, it will skip in query process column_readers_.emplace(column_name, ColumnReaderPtr()); SLOG_INFO("Add column success. column[%s]", column_name.c_str()); return 0; } int PersistSegment::load_forward_reader(const ReadOptions &read_options) { forward_reader_ = ForwardReader::Create(collection_name_, collection_path_, segment_meta_.segment_id); if (!forward_reader_) { SLOG_ERROR("Forward reader create failed."); return ErrorCode_RuntimeError; } forward_reader_->set_start_doc_id(segment_meta_.min_doc_id); int ret = forward_reader_->open(read_options); CHECK_RETURN_WITH_SLOG(ret, 0, "Open forward reader failed."); SLOG_DEBUG("Opened forward reader."); return 0; } int PersistSegment::load_column_readers(const ReadOptions &read_options) { for (auto &column_meta : schema_->index_columns()) { std::string column_name = column_meta->name(); ColumnReaderPtr new_column_reader = ColumnReader::Create( collection_name_, collection_path_, segment_meta_.segment_id, column_name, column_meta->index_type()); if (!new_column_reader) { SLOG_ERROR("Create column reader failed. index_type[%d] column[%s]", column_meta->index_type(), column_name.c_str()); return ErrorCode_RuntimeError; } new_column_reader->set_concurrency(concurrency_); int ret = new_column_reader->open(*column_meta.get(), read_options); CHECK_RETURN_WITH_SLOG( ret, 0, "Open column reader failed. index_type[%d] column[%s]", column_meta->index_type(), column_name.c_str()); column_readers_.emplace(column_name, new_column_reader); } return 0; } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/segment/persist_segment.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Provides search ability for persist segment */ #pragma once #include #include #include "common/macro_define.h" #include "meta/meta.h" #include "segment.h" #include "../column/column_reader.h" #include "../column/forward_reader.h" #include "../concurrent_hash_map.h" #include "../delete_store.h" #include "../id_map.h" #include "../typedef.h" namespace proxima { namespace be { namespace index { class PersistSegment; using PersistSegmentPtr = std::shared_ptr; /* * A PersistSegment represents block of index data in persist storage. * It transform from MemorySegment which will dump to PersistSegment * at some condition. * It also provides search abilify, but readonly */ class PersistSegment : public Segment { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(PersistSegment); //! Constructor PersistSegment(const std::string &coll_name, const std::string &coll_path, const SegmentMeta &seg_meta, const meta::CollectionMeta *schema_ptr, const DeleteStore *delete_store_ptr, const IDMap *id_map_ptr, uint32_t concurrency_val) : schema_(schema_ptr), delete_store_(delete_store_ptr), id_map_(id_map_ptr), concurrency_(concurrency_val) { this->set_collection_name(coll_name); this->set_collection_path(coll_path); this->set_segment_meta(seg_meta); } //! Destructor ~PersistSegment() override; //! Create an instance static PersistSegmentPtr Create(const std::string &coll_name, const std::string &coll_path, const SegmentMeta &seg_meta, const meta::CollectionMeta *schema_ptr, const DeleteStore *delete_store_ptr, const IDMap *id_map_ptr, uint32_t concurrency_val); //! Create and load an instance static int CreateAndLoad(const std::string &collection_name, const std::string &collection_path, const SegmentMeta &segment_meta, const meta::CollectionMeta *schema, const DeleteStore *delete_store, const IDMap *id_map, uint32_t concurrency, const ReadOptions &read_options, PersistSegmentPtr *persist_segment); public: //! Load index from persist storage int load(const ReadOptions &read_options); //! Unload index int unload(); public: //! Knn similar search int knn_search(const std::string &column_name, const std::string &query, const QueryParams &query_params, QueryResultList *results) override; //! Knn similar search with batch mode int knn_search(const std::string &column_name, const std::string &query, const QueryParams &query_params, uint32_t batch_count, std::vector *results) override; //! Just search forward by doc primary key int kv_search(uint64_t primary_key, QueryResult *result) override; public: //! Remove a index column int remove_column(const std::string &column_name) override; //! Add a index column int add_column(const meta::ColumnMetaPtr &column_meta) override; public: //! Return forward count size_t doc_count() const override { return forward_reader_->doc_count(); } public: //! Get forward reader ForwardReaderPtr get_forward_reader() const override { return forward_reader_; } //! Get column reader ColumnReaderPtr get_column_reader( const std::string &column_name) const override { if (!column_readers_.has(column_name)) { return ColumnReaderPtr(); } return column_readers_.get(column_name); } private: int load_forward_reader(const ReadOptions &read_options); int load_column_readers(const ReadOptions &read_options); private: static constexpr uint32_t MAX_WAIT_RETRY_COUNT = 60U; private: const meta::CollectionMeta *schema_{nullptr}; const DeleteStore *delete_store_{nullptr}; const IDMap *id_map_{nullptr}; uint32_t concurrency_{0U}; ForwardReaderPtr forward_reader_{}; ConcurrentHashMap column_readers_{}; std::atomic active_search_count_{0U}; bool loaded_{false}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/segment/persist_segment_manager.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of persist segment manager */ #include "persist_segment_manager.h" #include "common/error_code.h" #include "common/logger.h" #include "typedef.h" namespace proxima { namespace be { namespace index { PersistSegmentManagerPtr PersistSegmentManager::Create( const std::string &collection_name, const std::string &collection_path) { PersistSegmentManagerPtr new_mgr = std::make_shared(collection_name, collection_path); return new_mgr; } PersistSegmentManager::~PersistSegmentManager() { if (segments_.size() > 0) { unload_segments(); } } void PersistSegmentManager::add_segment(PersistSegmentPtr persist_segment) { segments_.emplace(persist_segment->segment_id(), persist_segment); } const PersistSegmentPtr &PersistSegmentManager::get_segment( SegmentID segment_id) { return segments_.get(segment_id); } const PersistSegmentPtr &PersistSegmentManager::get_latest_segment() { SegmentID max_segment_id = 0U; for (auto &it : segments_) { if (it.first > max_segment_id) { max_segment_id = it.first; } } return segments_.get(max_segment_id); } int PersistSegmentManager::unload_segments() { for (auto iter = segments_.begin(); iter != segments_.end(); iter++) { iter->second->unload(); } segments_.clear(); return 0; } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/segment/persist_segment_manager.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Provides ability for management of persist segments */ #pragma once #include "common/macro_define.h" #include "persist_segment.h" #include "../concurrent_hash_map.h" namespace proxima { namespace be { namespace index { class PersistSegmentManager; using PersistSegmentManagerPtr = std::shared_ptr; /* * PersistSegmentManager is mainly for managing persist segments. */ class PersistSegmentManager { public: //! Constructor PersistSegmentManager(const std::string &coll_name, const std::string &coll_path) : collection_name_(coll_name), collection_path_(coll_path) {} //! Destructor ~PersistSegmentManager(); //! Create an instance static PersistSegmentManagerPtr Create(const std::string &collection_name, const std::string &collection_path); public: //! Add persist segment void add_segment(PersistSegmentPtr persist_segment); //! Get a specific segment const PersistSegmentPtr &get_segment(SegmentID segment_id); //! Get latest put-in segment const PersistSegmentPtr &get_latest_segment(); //! Upload all segments int unload_segments(); //! Return whether has some segment bool has_segment(SegmentID segment_id) { return segments_.has(segment_id); } //! Return loaded persist segment count size_t segment_count() { return segments_.size(); } private: std::string collection_name_{}; std::string collection_path_{}; ConcurrentHashMap segments_{}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/segment/segment.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Segment represents piece of collection data. * This class describes the data struct and meta info */ #pragma once #include #include "common/macro_define.h" #include "common/types.h" #include "meta/meta.h" #include "../collection_dataset.h" #include "../collection_query.h" #include "../column/column_reader.h" #include "../column/forward_reader.h" #include "../constants.h" #include "../typedef.h" namespace proxima { namespace be { namespace index { class Segment; using SegmentPtr = std::shared_ptr; using SegmentPtrList = std::vector; /* * Segment state */ enum SegmentState : uint32_t { CREATED = 0, WRITING, DUMPING, COMPACTING, PERSIST }; /* * Segment meta info, records basic stats of a segment. */ struct SegmentMeta { uint32_t segment_id{0U}; uint32_t state{0U}; uint64_t doc_count{0U}; uint64_t index_file_count{0U}; uint64_t index_file_size{0U}; uint64_t min_doc_id{0U}; uint64_t max_doc_id{0U}; uint64_t min_primary_key{0U}; uint64_t max_primary_key{0U}; uint64_t min_timestamp{0U}; uint64_t max_timestamp{0U}; uint64_t min_lsn{0U}; uint64_t max_lsn{0U}; uint32_t reserved_[8]; SegmentMeta() { min_primary_key = INVALID_KEY; min_timestamp = -1UL; min_lsn = -1UL; } }; static_assert(sizeof(SegmentMeta) % 64 == 0, "SegmentMeta must be aligned with 64 bytes"); /* * SegmentProvider provides interfaces which can get/set property */ class SegmentProvider { public: //! Destructor virtual ~SegmentProvider() = default; public: //! Return collection name const std::string &collection_name() const { return collection_name_; } //! Return collection path const std::string &collection_path() const { return collection_path_; } //! Return segment id SegmentID segment_id() const { return segment_meta_.segment_id; } //! Return segment state SegmentState state() const { return (SegmentState)segment_meta_.state; } //! Return segment min doc id idx_t min_doc_id() const { return segment_meta_.min_doc_id; } //! Return segment meta const SegmentMeta &segment_meta() const { return segment_meta_; } bool is_in_range(idx_t doc_id) const { if (doc_id >= segment_meta_.min_doc_id && doc_id <= segment_meta_.max_doc_id) { return true; } return false; } //! Return document count virtual size_t doc_count() const = 0; protected: void set_collection_name(const std::string &val) { collection_name_ = val; } void set_collection_path(const std::string &val) { collection_path_ = val; } void set_segment_meta(const SegmentMeta &val) { segment_meta_ = val; } protected: std::string collection_name_{}; std::string collection_path_{}; SegmentMeta segment_meta_{}; }; /* * Segment can search records in the segment, it also * provides much information about the segment. */ class Segment : public SegmentProvider { public: //! Destructor virtual ~Segment() = default; public: //! Return forward reader virtual ForwardReaderPtr get_forward_reader() const = 0; //! Return column reader virtual ColumnReaderPtr get_column_reader( const std::string &column_name) const = 0; public: //! Knn search virtual int knn_search(const std::string &column_name, const std::string &query, const QueryParams &query_params, QueryResultList *results) = 0; //! Knn search with batch mode virtual int knn_search(const std::string &column_name, const std::string &query, const QueryParams &query_params, uint32_t batch_count, std::vector *results) = 0; //! Kv search some document virtual int kv_search(uint64_t primary_key, QueryResult *result) = 0; public: //! Add a column virtual int add_column(const meta::ColumnMetaPtr &column_meta) = 0; //! Remove a column virtual int remove_column(const std::string &column_name) = 0; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/snapshot.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of Snapshot */ #include "snapshot.h" #include namespace proxima { namespace be { namespace index { Snapshot::~Snapshot() { if (opened_) { this->close(); } } SnapshotPtr Snapshot::Create(const std::string &dir_path, FileID file_id, uint32_t suffix_id, const std::string &suffix_name) { return std::make_shared(dir_path, file_id, suffix_id, suffix_name); } int Snapshot::CreateAndOpen(const std::string &dir_path, FileID file_id, const ReadOptions &options, SnapshotPtr *snapshot) { *snapshot = Create(dir_path, file_id, INVALID_SEGMENT_ID, ""); return (*snapshot)->open(options); } int Snapshot::CreateAndOpen(const std::string &dir_path, FileID file_id, uint32_t suffix_id, const ReadOptions &options, SnapshotPtr *snapshot) { *snapshot = Create(dir_path, file_id, suffix_id, ""); return (*snapshot)->open(options); } int Snapshot::CreateAndOpen(const std::string &dir_path, FileID file_id, uint32_t suffix_id, const std::string &suffix_name, const ReadOptions &options, SnapshotPtr *snapshot) { *snapshot = Create(dir_path, file_id, suffix_id, suffix_name); return (*snapshot)->open(options); } int Snapshot::open(const ReadOptions &read_options) { CHECK_STATUS(opened_, false); if (read_options.use_mmap) { storage_ = IndexFactory::CreateStorage("MMapFileStorage"); } else { storage_ = IndexFactory::CreateStorage("MemoryStorage"); } if (!storage_) { LOG_ERROR("Create storage failed."); return ErrorCode_RuntimeError; } if (suffix_id_ != INVALID_SEGMENT_ID) { if (suffix_name_.empty()) { file_path_ = FileHelper::MakeFilePath(dir_path_, file_id_, suffix_id_); } else { file_path_ = FileHelper::MakeFilePath(dir_path_, file_id_, suffix_id_, suffix_name_); } } else { file_path_ = FileHelper::MakeFilePath(dir_path_, file_id_); } // Default open warmup flag IndexParams stg_params; stg_params.set("proxima.mmap_file.storage.memory_warmup", true); storage_->init(stg_params); int ret = storage_->open(file_path_, read_options.create_new); CHECK_RETURN_WITH_LOG(ret, 0, "Open storage failed. file_path[%s] ret[%d]", file_path_.c_str(), ret); opened_ = true; return 0; } int Snapshot::flush() { CHECK_STATUS(opened_, true); return storage_->flush(); } int Snapshot::close() { CHECK_STATUS(opened_, true); int ret = storage_->close(); CHECK_RETURN(ret, 0); opened_ = false; return 0; } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/snapshot.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Abstract class for module which needs storage snapshot */ #pragma once #include #include "common/macro_define.h" #include "constants.h" #include "file_helper.h" #include "typedef.h" namespace proxima { namespace be { namespace index { /* * Snapshot read options: * use_mmap: whether use mmap storage * create_new: whether force create new file */ struct ReadOptions { bool use_mmap{false}; bool create_new{false}; }; class Snapshot; using SnapshotPtr = std::shared_ptr; /* * Snapshot represents a kind of storage which * will sync data to disk automatically or routinely. */ class Snapshot { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(Snapshot); //! Constructor Snapshot(const std::string &dir_path_val, FileID file_id_val, uint32_t suffix_id_val, const std::string &suffix_name_val) : dir_path_(dir_path_val), file_id_(file_id_val), suffix_id_(suffix_id_val), suffix_name_(suffix_name_val) {} //! Destructor ~Snapshot(); //! Constructor static SnapshotPtr Create(const std::string &dir_path, FileID file_id, uint32_t suffix_id, const std::string &suffix_name); //! Create and open an instance static int CreateAndOpen(const std::string &dir_path, FileID file_id, const ReadOptions &options, SnapshotPtr *snapshot); //! Create and open an instance static int CreateAndOpen(const std::string &dir_path, FileID file_id, uint32_t suffix_id, const ReadOptions &options, SnapshotPtr *snapshot); //! Create and open an instance static int CreateAndOpen(const std::string &dir_path, FileID file_id, uint32_t suffix_id, const std::string &suffix_name, const ReadOptions &options, SnapshotPtr *snapshot); public: //! Open persist storage int open(const ReadOptions &read_options); //! Flush memory data to persist storage int flush(); //! Close persist storage int close(); public: //! Return if opened bool is_open() const { return opened_; } //! Return directory path const std::string &dir_path() const { return dir_path_; } //! Return file id FileID file_id() const { return file_id_; } //! Return suffix id uint32_t suffix_id() const { return suffix_id_; } //! Return suffix name const std::string &suffix_name() const { return suffix_name_; } //! Return file path const std::string &file_path() const { return file_path_; } //! Return storage data ptr const IndexStoragePtr &data() const { return storage_; } private: std::string dir_path_{}; FileID file_id_{FileID::UNDEFINED}; uint32_t suffix_id_{0U}; std::string suffix_name_{}; std::string file_path_{}; IndexStoragePtr storage_{}; bool opened_{false}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/typedef.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Includes some micro definitions and alias using names */ #pragma once #include #include #include #include "common/error_code.h" #include "common/logger.h" #include "common/types.h" namespace proxima { namespace be { namespace index { using idx_t = uint64_t; using SegmentID = uint32_t; using IndexStoragePtr = aitheta2::IndexStorage::Pointer; using IndexBlockPtr = aitheta2::IndexStorage::Segment::Pointer; using IndexDumperPtr = aitheta2::IndexDumper::Pointer; using IndexContainerPtr = aitheta2::IndexContainer::Pointer; using IndexContextPtr = aitheta2::IndexContext::Pointer; using IndexSearcherPtr = aitheta2::IndexSearcher::Pointer; using IndexContainerBlockPtr = aitheta2::IndexContainer::Segment::Pointer; using IndexStreamerPtr = aitheta2::IndexStreamer::Pointer; using ThreadPoolPtr = std::shared_ptr; using IndexReformerPtr = std::shared_ptr; using IndexMeasurePtr = std::shared_ptr; using IndexConverterPtr = std::shared_ptr; using IndexClosetPtr = std::shared_ptr; using IndexImmutableClosetPtr = std::shared_ptr; using FeatureTypes = aitheta2::IndexMeta::FeatureTypes; using IndexBlock = aitheta2::IndexStorage::Segment; using IndexMeta = aitheta2::IndexMeta; using IndexQueryMeta = aitheta2::IndexQueryMeta; using IndexParams = aitheta2::IndexParams; using IndexDocumentList = aitheta2::IndexDocumentList; using IndexSegmentDumper = aitheta2::IndexSegmentDumper; using IndexFactory = aitheta2::IndexFactory; using ThreadPool = aitheta2::SingleQueueIndexThreads; using IndexStorage = aitheta2::IndexStorage; } // end namespace index } // namespace be } // end namespace proxima #define COLLECTION_FORMAT " collection[%s] " #define CLOG_DEBUG(format, ...) \ LOG_DEBUG(format COLLECTION_FORMAT, ##__VA_ARGS__, collection_name().c_str()) #define CLOG_INFO(format, ...) \ LOG_INFO(format COLLECTION_FORMAT, ##__VA_ARGS__, collection_name().c_str()) #define CLOG_WARN(format, ...) \ LOG_WARN(format COLLECTION_FORMAT, ##__VA_ARGS__, collection_name().c_str()) #define CLOG_ERROR(format, ...) \ LOG_ERROR(format COLLECTION_FORMAT, ##__VA_ARGS__, collection_name().c_str()) #define CLOG_FATAL(format, ...) \ LOG_FATAL(format COLLECTION_FORMAT, ##__VA_ARGS__, collection_name().c_str()) #define SEGMENT_FORMAT " segment[%zu] collection[%s] " #define SLOG_DEBUG(format, ...) \ LOG_DEBUG(format SEGMENT_FORMAT, ##__VA_ARGS__, (size_t)segment_id(), \ collection_name().c_str()) #define SLOG_INFO(format, ...) \ LOG_INFO(format SEGMENT_FORMAT, ##__VA_ARGS__, (size_t)segment_id(), \ collection_name().c_str()) #define SLOG_WARN(format, ...) \ LOG_WARN(format SEGMENT_FORMAT, ##__VA_ARGS__, (size_t)segment_id(), \ collection_name().c_str()) #define SLOG_ERROR(format, ...) \ LOG_ERROR(format SEGMENT_FORMAT, ##__VA_ARGS__, (size_t)segment_id(), \ collection_name().c_str()) #define SLOG_FATAL(format, ...) \ LOG_FATAL(format SEGMENT_FORMAT, ##__VA_ARGS__, (size_t)segment_id(), \ collection_name().c_str()) #define COLUMN_FORMAT " column[%s] segment[%zu] collection[%s] " #define LLOG_DEBUG(format, ...) \ LOG_DEBUG(format COLUMN_FORMAT, ##__VA_ARGS__, column_name().c_str(), \ (size_t)segment_id(), collection_name().c_str()) #define LLOG_INFO(format, ...) \ LOG_INFO(format COLUMN_FORMAT, ##__VA_ARGS__, column_name().c_str(), \ (size_t)segment_id(), collection_name().c_str()) #define LLOG_WARN(format, ...) \ LOG_WARN(format COLUMN_FORMAT, ##__VA_ARGS__, column_name().c_str(), \ (size_t)segment_id(), collection_name().c_str()) #define LLOG_ERROR(format, ...) \ LOG_ERROR(format COLUMN_FORMAT, ##__VA_ARGS__, column_name().c_str(), \ (size_t)segment_id(), collection_name().c_str()) #define LLOG_FATAL(format, ...) \ LOG_FATAL(format COLUMN_FORMAT, ##__VA_ARGS__, column_name().c_str(), \ (size_t)segment_id(), collection_name().c_str()) #define CHECK_STATUS(status, expect) \ if (status != expect) { \ LOG_ERROR("Check status failed. status[%d] expect[%d]", status, expect); \ return ErrorCode_StatusError; \ } #define CHECK_RETURN(ret, expect_ret) \ if (ret != expect_ret) { \ return ret; \ } #define CHECK_RETURN_WITH_LOG(ret, expect_ret, format, ...) \ if (ret != expect_ret) { \ LOG_ERROR(format, ##__VA_ARGS__); \ return ret; \ } #define CHECK_RETURN_WITH_CLOG(ret, expect_ret, format, ...) \ if (ret != expect_ret) { \ CLOG_ERROR(format, ##__VA_ARGS__); \ return ret; \ } #define CHECK_RETURN_WITH_SLOG(ret, expect_ret, format, ...) \ if (ret != expect_ret) { \ SLOG_ERROR(format, ##__VA_ARGS__); \ return ret; \ } #define CHECK_RETURN_WITH_LLOG(ret, expect_ret, format, ...) \ if (ret != expect_ret) { \ LLOG_ERROR(format, ##__VA_ARGS__); \ return ret; \ } ================================================ FILE: src/index/version_manager.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of version manager */ #include "version_manager.h" #include "common/error_code.h" #include "file_helper.h" namespace proxima { namespace be { namespace index { VersionManagerPtr VersionManager::Create(const std::string &collection_name, const std::string &collection_path) { return std::make_shared(collection_name, collection_path); } int VersionManager::CreateAndOpen(const std::string &collection_name, const std::string &collection_path, const ReadOptions &read_options, VersionManagerPtr *version_manager) { (*version_manager) = Create(collection_name, collection_path); return (*version_manager)->open(read_options); } VersionManager::~VersionManager() { if (opened_) { this->close(); } } int VersionManager::open(const ReadOptions &read_options) { CHECK_STATUS(opened_, false); int ret = Snapshot::CreateAndOpen(collection_path_, FileID::MANIFEST_FILE, read_options, &snapshot_); CHECK_RETURN_WITH_CLOG(ret, 0, "Create and open snapshot failed."); ret = version_store_.mount(snapshot_->data()); CHECK_RETURN_WITH_CLOG(ret, 0, "Mount snapshot failed."); // Load current version, segments if (version_store_.total_version_count() > 0) { VersionSet version_set; ret = version_store_.get_version_set(&version_set); CHECK_RETURN(ret, 0); for (uint32_t i = 0; i < version_set.segment_count; i++) { SegmentID segment_id = version_set.segment_ids[i]; SegmentMeta segment_meta; ret = version_store_.get_segment_meta(segment_id, &segment_meta); CHECK_RETURN(ret, 0); current_version_.emplace_back(segment_meta); } } opened_ = true; CLOG_DEBUG("Opened version manager."); return 0; } int VersionManager::flush() { CHECK_STATUS(opened_, true); return snapshot_->flush(); } int VersionManager::close() { CHECK_STATUS(opened_, true); current_version_.clear(); version_store_.unmount(); int ret = snapshot_->close(); if (ret != 0) { CLOG_WARN("Close snapshot failed."); } opened_ = false; CLOG_DEBUG("Closed version manager."); return ret; } int VersionManager::apply(const VersionEdit &edit) { CHECK_STATUS(opened_, true); std::lock_guard lock(mutex_); int ret = 0; for (size_t i = 0; i < edit.add_segments.size(); i++) { SegmentID segment_id = edit.add_segments[i]; SegmentMeta segment_meta; ret = version_store_.get_segment_meta(segment_id, &segment_meta); CHECK_RETURN(ret, 0); current_version_.emplace_back(segment_meta); } for (size_t i = 0; i < edit.delete_segments.size(); i++) { for (size_t j = 0; j < current_version_.size(); j++) { if (edit.delete_segments[i] == current_version_[j].segment_id) { current_version_.erase(current_version_.begin() + j); } } } VersionSet version_set; version_set.segment_count = current_version_.size(); for (size_t i = 0; i < current_version_.size(); i++) { version_set.segment_ids[i] = current_version_[i].segment_id; } return version_store_.update_version_set(version_set); } } // end namespace index } // namespace be } // namespace proxima ================================================ FILE: src/index/version_manager.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Provides management of collection version meta info */ #pragma once #include #include "common/macro_define.h" #include "common/types.h" #include "snapshot.h" #include "typedef.h" #include "version_store.h" namespace proxima { namespace be { namespace index { class VersionManager; using VersionManagerPtr = std::shared_ptr; /* * Version edit of one segment change */ struct VersionEdit { std::vector add_segments; std::vector delete_segments; }; /* * VersionManager is reponsible for recording the stats the segments of * collection. The meta info of collection will snapshot to persist * storage at the same time. */ class VersionManager { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(VersionManager); //! Constructor VersionManager(const std::string &coll_name, const std::string &coll_path) : collection_name_(coll_name), collection_path_(coll_path) {} //! Destructor ~VersionManager(); //! Create an instance static VersionManagerPtr Create(const std::string &collection_name, const std::string &collection_path); //! Create an instance and open static int CreateAndOpen(const std::string &collection_name, const std::string &collection_path, const ReadOptions &options, VersionManagerPtr *version_manager); public: //! Open persist storage and open int open(const ReadOptions &options); //! Flush memory to persist storage int flush(); //! Close persist storage and cleanup int close(); public: //! Apply a version edit int apply(const VersionEdit &edit); //! Return current version segment metas const std::vector ¤t_version() const { return current_version_; } //! Allocate new segment meta int alloc_segment_meta(SegmentMeta *segment_meta) { CHECK_STATUS(opened_, true); return version_store_.alloc_segment_meta(segment_meta); } //! Get segment meta int get_segment_meta(SegmentID segment_id, SegmentMeta *segment_meta) const { CHECK_STATUS(opened_, true); return version_store_.get_segment_meta(segment_id, segment_meta); } //! Get all segment metas int get_segment_metas(SegmentState state, std::vector *segment_metas) const { CHECK_STATUS(opened_, true); for (uint32_t i = 0; i < version_store_.total_segment_count(); i++) { SegmentMeta segment_meta; int ret = version_store_.get_segment_meta(i, &segment_meta); CHECK_RETURN(ret, 0); if (segment_meta.state == state) { segment_metas->emplace_back(segment_meta); } } return 0; } //! Update segment meta int update_segment_meta(const SegmentMeta &segment_meta) { CHECK_STATUS(opened_, true); return version_store_.update_segment_meta(segment_meta); } //! Get summary int get_collection_summary(CollectionSummary *summary) const { CHECK_STATUS(opened_, true); return version_store_.get_collection_summary(summary); } //! Update summary int update_collection_summary(const CollectionSummary &summary) { CHECK_STATUS(opened_, true); return version_store_.update_collection_summary(summary); } public: //! Return belonged collection name const std::string &collection_name() const { return collection_name_; } //! Return index file path const std::string &file_path() const { return snapshot_->file_path(); } //! Return total segment count uint32_t total_segment_count() const { return version_store_.total_segment_count(); } private: std::string collection_name_{}; std::string collection_path_{}; SnapshotPtr snapshot_{}; VersionStore version_store_{}; std::vector current_version_{}; std::mutex mutex_{}; bool opened_{false}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/version_store.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of version store */ #include "version_store.h" #include "common/error_code.h" #include "constants.h" namespace proxima { namespace be { namespace index { int VersionStore::mount(const IndexStoragePtr &stg) { if (!stg) { LOG_ERROR("Mount null storage"); return ErrorCode_RuntimeError; } storage_ = stg; IndexBlockPtr summary_block = storage_->get(SUMMARY_BLOCK); int ret = 0; if (!summary_block) { ret = init_storage(); } else { ret = load_storage(); } return ret; } void VersionStore::unmount() { summary_block_.reset(); version_block_.reset(); segment_block_.reset(); memset(&header_, 0, sizeof(header_)); } int VersionStore::alloc_segment_meta(SegmentMeta *segment_meta) { std::lock_guard lock(mutex_); if (header_.total_segment_count >= kMaxSegmentCount) { LOG_ERROR("Exceed max segment meta count limit. total_segment_count[%zu]", (size_t)header_.total_segment_count); return ErrorCode_ExceedLimit; } // check if exists unused segment meta // just return it to reuse if (header_.total_segment_count > 0) { SegmentID last_segment_id = header_.total_segment_count - 1; SegmentMeta last_segment_meta; int ret = this->get_segment_meta_impl(last_segment_id, &last_segment_meta); CHECK_RETURN(ret, 0); if (last_segment_meta.state == SegmentState::CREATED) { *segment_meta = last_segment_meta; return 0; } } SegmentMeta new_segment_meta; new_segment_meta.segment_id = header_.total_segment_count; // update segment meta int ret = this->update_segment_meta_impl(new_segment_meta.segment_id, new_segment_meta); CHECK_RETURN_WITH_LOG(ret, 0, "Write segment meta failed."); // update version header header_.total_segment_count++; ret = this->update_header_impl(header_); CHECK_RETURN_WITH_LOG(ret, 0, "Write header failed."); // copy out *segment_meta = new_segment_meta; return 0; } int VersionStore::get_segment_meta(SegmentID segment_id, SegmentMeta *segment_meta) const { if (segment_id >= header_.total_segment_count) { LOG_ERROR("Illegal segment id. segment_id[%zu]", (size_t)segment_id); return ErrorCode_ExceedLimit; } return this->get_segment_meta_impl(segment_id, segment_meta); } int VersionStore::update_segment_meta(const SegmentMeta &segment_meta) { std::lock_guard lock(mutex_); SegmentID segment_id = segment_meta.segment_id; if (segment_id >= header_.total_segment_count) { LOG_ERROR("Illegal segment id. segment_id[%zu]", (size_t)segment_id); return ErrorCode_ExceedLimit; } return this->update_segment_meta_impl(segment_id, segment_meta); } int VersionStore::get_version_set(VersionSet *version_set) const { size_t offset = header_.current_version_offset; size_t read_len = version_block_->fetch(offset, (void *)version_set, sizeof(VersionSet)); if (read_len != sizeof(VersionSet)) { LOG_ERROR("Read version block failed."); return ErrorCode_WriteData; } return 0; } int VersionStore::update_version_set(const VersionSet &version_set) { std::lock_guard lock(mutex_); size_t offset = sizeof(VersionHeader); size_t write_len = 0U; // write version set write_len = version_block_->write(offset, &version_set, sizeof(VersionSet)); if (write_len != sizeof(VersionSet)) { LOG_ERROR("Write version block failed. "); return ErrorCode_WriteData; } // update version header header_.total_version_count++; header_.current_version_offset = offset; return this->update_header_impl(header_); } int VersionStore::get_collection_summary(CollectionSummary *summary) const { size_t read_len = summary_block_->fetch(0U, (void *)summary, sizeof(CollectionSummary)); if (read_len != sizeof(CollectionSummary)) { LOG_ERROR("Read summary block failed."); return ErrorCode_ReadData; } return 0; } int VersionStore::update_collection_summary(const CollectionSummary &summary) { std::lock_guard lock(mutex_); size_t write_len = summary_block_->write(0U, &summary, sizeof(CollectionSummary)); if (write_len != sizeof(CollectionSummary)) { LOG_ERROR("Write summary block failed."); return ErrorCode_WriteData; } return 0; } int VersionStore::init_storage() { int ret = 0; size_t alloc_len = 0U; alloc_len = sizeof(CollectionSummary); ret = storage_->append(SUMMARY_BLOCK, alloc_len); CHECK_RETURN_WITH_LOG(ret, 0, "Append summary block failed."); summary_block_ = storage_->get(SUMMARY_BLOCK); alloc_len = sizeof(VersionHeader) + sizeof(VersionSet); ret = storage_->append(VERSION_BLOCK, alloc_len); CHECK_RETURN_WITH_LOG(ret, 0, "Append version block failed."); version_block_ = storage_->get(VERSION_BLOCK); alloc_len = sizeof(SegmentMeta) * kMaxSegmentCount; ret = storage_->append(SEGMENT_BLOCK, alloc_len); CHECK_RETURN_WITH_LOG(ret, 0, "Append segment block failed."); segment_block_ = storage_->get(SEGMENT_BLOCK); // init summary block CollectionSummary summary; ret = update_collection_summary(summary); CHECK_RETURN(ret, 0); // init writing segment SegmentMeta segment_meta; ret = this->alloc_segment_meta(&segment_meta); CHECK_RETURN(ret, 0); segment_meta.state = SegmentState::WRITING; segment_meta.min_doc_id = 0U; ret = this->update_segment_meta(segment_meta); CHECK_RETURN(ret, 0); return 0; } int VersionStore::load_storage() { summary_block_ = storage_->get(SUMMARY_BLOCK); if (!summary_block_) { LOG_ERROR("Get summary block failed."); return ErrorCode_InvalidIndexDataFormat; } version_block_ = storage_->get(VERSION_BLOCK); if (!version_block_) { LOG_ERROR("Get version block failed."); return ErrorCode_InvalidIndexDataFormat; } segment_block_ = storage_->get(SEGMENT_BLOCK); if (!segment_block_) { LOG_ERROR("Get segment block failed."); return ErrorCode_InvalidIndexDataFormat; } size_t read_len = version_block_->fetch(0, (void *)&header_, sizeof(VersionHeader)); if (read_len != sizeof(VersionHeader)) { LOG_ERROR("Read header block failed."); return ErrorCode_ReadData; } return 0; } } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/index/version_store.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Format of collection version meta info */ #pragma once #include #include #include "common/macro_define.h" #include "common/types.h" #include "segment/segment.h" #include "typedef.h" namespace proxima { namespace be { namespace index { /** * | SummaryBlock | VersionBlock | SegmentBlock | * |----------------------|----------------------------|------------------| * | CollectionSummary | VersionHeader + VersionSet | SegmentMeta... | * |----------------------|----------------------------|------------------| **/ struct CollectionSummary { uint64_t schema_revision{0U}; uint64_t total_doc_count{0U}; uint64_t delete_doc_count{0U}; uint64_t reserved_[5]; }; static_assert(sizeof(CollectionSummary) % 64 == 0, "CollectionSummary must be aligned with 64 bytes"); /* * Version info header */ struct VersionHeader { uint64_t total_version_count{0U}; uint64_t current_version_offset{0U}; uint64_t total_segment_count{0U}; uint64_t reserved_[5]; }; static_assert(sizeof(VersionHeader) % 64 == 0, "VersionHeader must be aligned with 64 bytes"); /* * A VersionSet includes serveral segment metas */ struct VersionSet { uint64_t segment_count{0}; uint64_t reserved_[7]; uint32_t segment_ids[1024]; VersionSet() { memset(this->segment_ids, 0, sizeof(this->segment_ids)); } }; static_assert(sizeof(VersionSet) % 64 == 0, "VersionSet must be aligned with 64 bytes"); /* * VersionStore describes the struct of version info storage */ class VersionStore { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(VersionStore); //! Constructor VersionStore() = default; //! Destructor ~VersionStore() = default; public: //! Mount persist storage int mount(const IndexStoragePtr &storage); //! Unmount persist storage void unmount(); //! Alloc new segment meta int alloc_segment_meta(SegmentMeta *segment_meta); //! Get segment meta int get_segment_meta(SegmentID segment_id, SegmentMeta *segment_meta) const; //! Update segment meta int update_segment_meta(const SegmentMeta &segment_meta); //! Get specified version set int get_version_set(VersionSet *version_set) const; //! Update new version set int update_version_set(const VersionSet &version_set); //! Get summary int get_collection_summary(CollectionSummary *summary) const; //! Update summary int update_collection_summary(const CollectionSummary &summary); public: //! Return total version count uint32_t total_version_count() const { return header_.total_version_count; } //! Return total segment count uint32_t total_segment_count() const { return header_.total_segment_count; } private: int init_storage(); int load_storage(); private: int get_segment_meta_impl(SegmentID segment_id, SegmentMeta *segment_meta) const { size_t offset = segment_id * sizeof(SegmentMeta); size_t read_len = segment_block_->fetch(offset, (void *)segment_meta, sizeof(SegmentMeta)); if (read_len != sizeof(SegmentMeta)) { return ErrorCode_ReadData; } return 0; } int update_segment_meta_impl(SegmentID segment_id, const SegmentMeta &segment_meta) { size_t offset = segment_id * sizeof(SegmentMeta); size_t write_len = segment_block_->write(offset, &segment_meta, sizeof(SegmentMeta)); if (write_len != sizeof(SegmentMeta)) { return ErrorCode_WriteData; } return 0; } int update_header_impl(const VersionHeader &header) { size_t write_len = version_block_->write(0U, &header, sizeof(VersionHeader)); if (write_len != sizeof(VersionHeader)) { return ErrorCode_WriteData; } return 0; } private: constexpr static uint32_t kMaxVersionCount = 5; constexpr static uint32_t kMaxSegmentCount = 1024; private: IndexStoragePtr storage_{}; IndexBlockPtr summary_block_{}; IndexBlockPtr version_block_{}; IndexBlockPtr segment_block_{}; VersionHeader header_; std::mutex mutex_{}; }; } // end namespace index } // namespace be } // end namespace proxima ================================================ FILE: src/meta/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Oct 2020 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) # proxima_be_meta library cc_library( NAME proxima_be_meta STATIC STRICT ALWAYS_LINK SRCS *.cc sqlite/*.cc LIBS proxima_be_common sqlite INCS . .. VERSION "${PROXIMA_BE_VERSION}" ) ================================================ FILE: src/meta/README.md ================================================ Meta Module: Only export three interfaces for other module, listed below: 1. meta_service.h: for meta functional 2. meta_agent.h: for meta management from admin 3. meta.h: types ================================================ FILE: src/meta/meta.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Oct 2020 * \brief */ #pragma once #include #include #include #include #include "common/error_code.h" #include "common/logger.h" #include "common/types.h" #include "common/uuid_helper.h" namespace proxima { namespace be { namespace meta { // Predefine classes class RepositoryBase; class DatabaseRepositoryMeta; class ColumnMeta; class CollectionBase; class CollectionMeta; // Alias for meta types using RepositoryBasePtr = std::shared_ptr; using DatabaseRepositoryMetaPtr = std::shared_ptr; using ColumnMetaPtr = std::shared_ptr; using ColumnMetaPtrList = std::vector; using CollectionMetaPtr = std::shared_ptr; using CollectionMetaPtrList = std::vector; //! Alias using IndexParams = aitheta2::IndexParams; #define META_VERIFY_ARGUMENTS(COND, CODE, MSG) \ if ((COND)) { \ LOG_ERROR(MSG); \ return CODE; \ } /*! * ColumnMeta illustrate Column in Collection */ class ColumnMeta { public: //! Constructors ColumnMeta() = default; explicit ColumnMeta(std::string &&column_name) : name_(std::move(column_name)), uid_(gen_uuid()), index_type_(IndexTypes::PROXIMA_GRAPH_INDEX), data_type_(DataTypes::UNDEFINED), dimension_(0) {} explicit ColumnMeta(const ColumnMeta ¶m) : name_(param.name_), uid_(param.uid_), index_type_(param.index_type_), data_type_(param.data_type_), dimension_(param.dimension_), parameters_(param.parameters_) {} //! Destructor ~ColumnMeta() = default; public: int validate() const { META_VERIFY_ARGUMENTS( name_.empty(), PROXIMA_BE_ERROR_CODE(EmptyColumnName), "Invalid arguments for create collection, Name of collection " "can't be empty") META_VERIFY_ARGUMENTS(data_type_ == DataTypes::UNDEFINED, PROXIMA_BE_ERROR_CODE(InvalidDataType), "Invalid data types") return 0; } //! Retrieve name field const std::string &name() const { return name_; } //! Set name void set_name(const std::string &new_name) { name_ = new_name; } //! Retrieve mutable name field std::string *mutable_name() { return &name_; } //! Retrieve column uid const std::string &uid() const { return uid_; } //! Retrieve mutable column uid std::string *mutable_uid() { return &uid_; } //! Set column uid void set_uid(const std::string &new_uid) { uid_ = new_uid; } //! Retrieve index type IndexTypes index_type() const { return index_type_; } //! Set index type void set_index_type(IndexTypes type) { index_type_ = type; } //! Retrieve data type DataTypes data_type() const { return data_type_; } //! Set data type void set_data_type(DataTypes type) { data_type_ = type; } //! Retrieve index type uint32_t dimension() const { return dimension_; } //! Set index type void set_dimension(uint32_t new_dimension) { dimension_ = new_dimension; } //! Retrieve params const IndexParams ¶meters() const { return parameters_; } //! Get mutable params IndexParams *mutable_parameters() { return ¶meters_; } int check_updated_field(const ColumnMeta ¶m) const { if (name_ != param.name()) { return PROXIMA_BE_ERROR_CODE(UpdateColumnNameField); } else if (index_type_ != param.index_type()) { return PROXIMA_BE_ERROR_CODE(UpdateIndexTypeField); } else if (data_type_ != param.data_type()) { return PROXIMA_BE_ERROR_CODE(UpdateDataTypeField); } else if (dimension_ != param.dimension()) { } else { std::string meta_params, params; IndexParams::SerializeToBuffer(param.parameters(), &meta_params); IndexParams::SerializeToBuffer(parameters_, ¶ms); if (params != meta_params) { return PROXIMA_BE_ERROR_CODE(UpdateParametersField); } } LOG_INFO("Input column was check_updated_field"); return 0; } private: //! Column name std::string name_{}; //! Unique ID of column std::string uid_{}; //! The type of column, possible value listed bellow: //! 1. PROXIMA_GRAPH_INDEX: vector index, default value //! 2. ... IndexTypes index_type_{IndexTypes::PROXIMA_GRAPH_INDEX}; //! Data Types DataTypes data_type_{DataTypes::UNDEFINED}; //! Dimension of data uint32_t dimension_{0u}; //! Dictionary of params IndexParams parameters_{}; }; /*! * Collection Status */ enum class CollectionStatus : uint32_t { INITIALIZED = 0, // Collection has been initialized, ready to serving SERVING, // Collection is serving DROPPED, // Collection has been dropped }; //! Alias ForwardColumn using ForwardColumn = std::string; //! Alias ForwardColumns using ForwardColumns = std::vector; /*! * Types of Repository */ enum class RepositoryTypes : int { //! Undefined repo type UNDEFINED, //! DATABASE DATABASE }; /*! * Repository Base Object */ class RepositoryBase { public: //! Constructors RepositoryBase() = default; explicit RepositoryBase(RepositoryTypes repo_type) : type_(repo_type) {} explicit RepositoryBase(const RepositoryBase &repo) : name_(repo.name_), type_(repo.type_) {} //! Destructor virtual ~RepositoryBase() = default; public: //! Validate repository object virtual int validate() const { META_VERIFY_ARGUMENTS( name_.empty(), PROXIMA_BE_ERROR_CODE(EmptyRepositoryName), "Invalid arguments for create collection, empty repository name.") return 0; } //! Retrieve repository name const std::string &name() const { return name_; } //! Retrieve mutable repository name std::string *mutable_name() { return &name_; } //! Set repository name void set_name(const std::string &new_name) { name_ = new_name; } RepositoryTypes type() const { return type_; } void set_type(RepositoryTypes new_type) { type_ = new_type; } private: //! Name of repository std::string name_{}; //! Type of repository RepositoryTypes type_{RepositoryTypes::UNDEFINED}; }; /*! * Repository Meta */ class DatabaseRepositoryMeta : public RepositoryBase { public: //! Constructors DatabaseRepositoryMeta() : RepositoryBase(RepositoryTypes::DATABASE) {} explicit DatabaseRepositoryMeta(const DatabaseRepositoryMeta ¶m) : RepositoryBase(param), connection_(param.connection_), user_(param.user_), password_(param.password_), table_name_(param.table_name_) {} //! Destructor ~DatabaseRepositoryMeta() override = default; public: //! Validate repository object int validate() const override { int code = RepositoryBase::validate(); if (code != 0) { return code; } ailego::Uri uri(connection_); META_VERIFY_ARGUMENTS(!uri.is_valid(), PROXIMA_BE_ERROR_CODE(InvalidURI), "Invalid arguments for create collection, URI is " "invalid.") META_VERIFY_ARGUMENTS( user_.empty(), PROXIMA_BE_ERROR_CODE(EmptyUserName), "Invalid arguments for create collection, empty user name.") META_VERIFY_ARGUMENTS( password_.empty(), PROXIMA_BE_ERROR_CODE(EmptyPassword), "Invalid arguments for create collection, empty password.") META_VERIFY_ARGUMENTS(table_name_.empty(), PROXIMA_BE_ERROR_CODE(EmptyRepositoryTable), "Invalid arguments for create collection, " "repository_table can't be empty") return 0; } //! merge repository int merge_repository(DatabaseRepositoryMetaPtr repo) { set_name(repo->name()); connection_.assign(repo->connection()); user_.assign(repo->user()); password_.assign(repo->password()); table_name_.assign(repo->table_name()); return 0; } //! Retrieve connection uri const std::string &connection() const { return connection_; } //! Retrieve mutable connection uris std::string *mutable_connection() { return &connection_; } //! Set connection uri void set_connection(const std::string &uri) { connection_ = uri; } //! Retrieve user of repository const std::string &user() const { return user_; } //! Retrieve mutable user of repository std::string *mutable_user() { return &user_; } //! Set user of repository void set_user(const std::string &user_name) { user_ = user_name; } //! Retrieve password of user const std::string &password() const { return password_; } //! Retrieve mutable password of user std::string *mutable_password() { return &password_; } //! Set password void set_password(const std::string &pass) { password_ = pass; } //! Retrieve the table of repository const std::string &table_name() const { return table_name_; } //! Retrieve the mutable table of repository std::string *mutable_table_name() { return &table_name_; } //! Set repository_table void set_table_name(const std::string &new_table_name) { table_name_ = new_table_name; } private: //! JDBC Connection URI std::string connection_{}; //! User name std::string user_{}; //! User password std::string password_{}; //! Source table of repository std::string table_name_{}; }; //! Repository type helper struct RepositoryHelper { //! Get child pointer from base pointer template ::value>::type> static std::shared_ptr::type> Child( RepositoryBasePtr repo) { typedef typename std::remove_cv::type CHILD; return std::dynamic_pointer_cast(repo); } //! Construct one child from base pointer template ::value>::type> static std::shared_ptr::type> NewChild( RepositoryBasePtr repo) { typedef typename std::remove_cv::type CHILD; auto child = RepositoryHelper::Child(repo); return std::make_shared(*child); } //! Copy child repository from base pointer static RepositoryBasePtr CopyRepository(RepositoryBasePtr base) { if (base) { switch (base->type()) { case RepositoryTypes::DATABASE: return RepositoryHelper::NewChild(base); case RepositoryTypes::UNDEFINED: LOG_WARN("Ignore undefined repository type"); } } return nullptr; } }; /*! * CollectionBase object */ class CollectionBase { public: constexpr static uint64_t UNLIMITED_DOCS_PER_SEGMENT = std::numeric_limits::max(); public: //! Constructors CollectionBase() = default; explicit CollectionBase(const CollectionBase ¶m) : name_(param.name_), max_docs_per_segment_(param.max_docs_per_segment_), forward_columns_(param.forward_columns_) { for (auto column : param.index_columns_) { index_columns_.emplace_back(std::make_shared(*column)); } if (param.repository_) { repository_ = RepositoryHelper::CopyRepository(param.repository_); } } //! Destructor virtual ~CollectionBase() = default; public: //! Validate params, 0 for valid, otherwise invalid virtual int validate() const { META_VERIFY_ARGUMENTS(name_.empty(), PROXIMA_BE_ERROR_CODE(EmptyCollectionName), "Invalid name of collection") META_VERIFY_ARGUMENTS(max_docs_per_segment_ == 0, PROXIMA_BE_ERROR_CODE(ZeroDocsPerSegment), "Max doc per segment can't be 0") META_VERIFY_ARGUMENTS(index_columns_.empty(), PROXIMA_BE_ERROR_CODE(EmptyColumns), "Empty Columns") int code = 0; for (auto &index : index_columns_) { code = index->validate(); if (code != 0) { break; } } if (code == 0 && repository_) { code = repository_->validate(); } return code; } //! Retrieve name const std::string &name() const { return name_; } //! Retrieve mutable name std::string *mutable_name() { return &name_; } //! Set name void set_name(const std::string &new_name) { name_ = new_name; } //! Retrieve split index size uint64_t max_docs_per_segment() const { return max_docs_per_segment_; } //! Set split index size, 0 means unlimited segment size void set_max_docs_per_segment(uint64_t count) { if (count == 0) { count = UNLIMITED_DOCS_PER_SEGMENT; } max_docs_per_segment_ = count; } //! Retrieve forward columns const ForwardColumns &forward_columns() const { return forward_columns_; } //! Retrieve mutable forward columns ForwardColumns *mutable_forward_columns() { return &forward_columns_; } //! Retrieve index columns const ColumnMetaPtrList &index_columns() const { return index_columns_; } //! Retrieve mutable index columns ColumnMetaPtrList *mutable_index_columns() { return &index_columns_; } //! Append column void append(ColumnMetaPtr param) { index_columns_.emplace_back(param); } //! Append column void append(const ColumnMeta ¶m) { index_columns_.emplace_back(std::make_shared(param)); } //! Retrieve repository member const RepositoryBasePtr repository() const { return repository_; } //! Set repository void set_repository(RepositoryBasePtr repo) { repository_ = repo; } const std::string &repository_name() const { static const std::string kEmpty = ""; if (repository_) { return repository_->name(); } return kEmpty; } public: //! Update columns int update_columns(const ColumnMetaPtrList &columns) { ColumnMetaPtrList merged_columns; for (auto column : columns) { auto ptr = column_by_name(column->name()); if (ptr) { // Does not support update any of fields of column yet, so copy column // to newer collection. int code = ptr->check_updated_field(*column); if (code != 0) { return code; } merged_columns.emplace_back(std::make_shared(*ptr)); } else { auto new_column = std::make_shared(*column); new_column->set_uid(gen_uuid()); merged_columns.emplace_back(new_column); } } index_columns_ = merged_columns; return 0; } //! Find column which named by name ColumnMetaPtr column_by_name(const std::string &column_name) const { return find_column_by_filter( [&column_name](ColumnMetaPtr column_ptr) -> bool { return column_ptr->name() == column_name; }); } private: //! Find column by filter ColumnMetaPtr find_column_by_filter( std::function filter) const { for (auto &c : index_columns_) { if (filter(c)) { return c; } } return nullptr; } private: //! The name of collection, unique name std::string name_{}; //! The max document count of segments, optional field, default is Max // value of system. uint64_t max_docs_per_segment_{0}; //! Forward columns ForwardColumns forward_columns_{}; //! Indices ColumnMetaPtrList index_columns_{}; //! Repository of collection, Optional field RepositoryBasePtr repository_{nullptr}; }; /*! * CollectionMeta */ class CollectionMeta : public CollectionBase { public: //! InvalidRevision constexpr static uint32_t INVALID_REVISION = std::numeric_limits::max(); public: //! Constructors CollectionMeta() : CollectionBase(), uid_(gen_uuid()), readable_(true), writable_(true), current_(true) {} explicit CollectionMeta(const CollectionMeta &meta) : CollectionBase(meta), uid_(meta.uid_), readable_(meta.readable_), writable_(meta.writable_), revision_(meta.revision_), status_(meta.status_), current_(meta.current_) {} explicit CollectionMeta(const CollectionBase ¶m) : CollectionBase(param), uid_(gen_uuid()), readable_(true), writable_(true), current_(true) {} //! Destructor ~CollectionMeta() override = default; public: //! Retrieve collection uid, indicate a group of collections const std::string &uid() const { return uid_; } //! Retrieve mutable collection uid, indicate a group of collections std::string *mutable_uid() { return &uid_; } //! Set collection uid void set_uid(const std::string &new_uid) { uid_ = new_uid; } //! Check readable bool readable() const { return readable_; } //! Set readable void set_readable(bool flag) { readable_ = flag; } //! Check writable bool writable() const { return writable_; } //! Set writable void set_writable(bool flag) { writable_ = flag; } //! Retrieve revision uint32_t revision() const { return revision_; } //! Set revision void set_revision(uint32_t new_revision) { revision_ = new_revision; } //! Invalid revision bool invalid_revision() const { return revision_ == INVALID_REVISION; } //! Increase revision number void increase_revision(uint32_t step = 1) { revision_ += step; } //! Retrieve status CollectionStatus status() const { return status_; } //! Check is INITIALIZED bool initialized() const { return status_ == CollectionStatus::INITIALIZED; } //! Check is serving bool serving() const { return status_ == CollectionStatus::SERVING; } //! Set status void set_status(CollectionStatus new_status) { status_ = new_status; } //! Check current flag bool is_current() const { return current_; } //! Set current flag void set_current(bool flag = true) { current_ = flag; } //! Merge update param int merge_update_param(const CollectionBase ¶m) { set_max_docs_per_segment(param.max_docs_per_segment()); mutable_forward_columns()->assign(param.forward_columns().begin(), param.forward_columns().end()); if (repository() && param.repository()) { auto repo = RepositoryHelper::Child(repository()); repo->merge_repository( RepositoryHelper::Child(param.repository())); } else if (!repository() && !param.repository()) { } else { return PROXIMA_BE_ERROR_CODE(UpdateRepositoryTypeField); } return update_columns(param.index_columns()); } private: //! Unique id of collection std::string uid_{}; //! Readable flag, default is true bool readable_{false}; //! Writable flag, default is true bool writable_{false}; //! Revision number uint32_t revision_{0}; //! One of values: initialized, serving ... CollectionStatus status_{CollectionStatus::INITIALIZED}; //! True for indicated current used version, otherwise false bool current_{false}; }; #undef META_VERIFY_ARGUMENTS } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/meta_agent.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #include "meta_agent.h" #include "common/config.h" #include "common/error_code.h" #include "common/logger.h" #include "meta_service_builder.h" namespace proxima { namespace be { namespace meta { /*! MetaAgent implementation */ class MetaAgentImpl : public MetaAgent { public: //! Constructor explicit MetaAgentImpl(MetaServicePtr meta_service) : meta_service_(std::move(meta_service)) {} //! Destructor ~MetaAgentImpl() override = default; public: //! Get Meta Service Instance MetaServicePtr get_service() const override { return meta_service_; } public: //! Init Meta Agent int init() override { int error_code = meta_service_->init(); if (error_code == 0) { LOG_INFO("MetaAgent initialize complete."); } else { LOG_ERROR("MetaAgent initialize failed. code[%d] what[%s]", error_code, ErrorCode::What(error_code)); } return error_code; } //! Clean up object int cleanup() override { int error_code = meta_service_->cleanup(); if (error_code == 0) { LOG_INFO("MetaAgent cleanup complete. "); } else { LOG_ERROR("MetaAgent cleanup failed. code[%d] what[%s]", error_code, ErrorCode::What(error_code)); } return error_code; } //! Start background service int start() override { int error_code = meta_service_->start(); if (error_code == 0) { LOG_INFO("MetaAgent start complete."); } else { LOG_ERROR("MetaAgent start failed. code[%d] what[%s]", error_code, ErrorCode::What(error_code)); } return error_code; } //! Stop background service int stop() override { int error_code = meta_service_->stop(); if (error_code == 0) { LOG_INFO("MetaAgent stopped."); } else { LOG_ERROR("MetaAgent stop failed. code[%d] what[%s]", error_code, ErrorCode::What(error_code)); } return error_code; } public: //! Reload meta service int reload() override { int error_code = meta_service_->reload(); if (error_code == 0) { LOG_INFO("MetaAgent reloaded."); } else { LOG_ERROR("MetaAgent reload failed. code[%d] what[%s]", error_code, ErrorCode::What(error_code)); } return error_code; } //! Create collection int create_collection(const CollectionBase ¶m, CollectionMetaPtr *meta) override { int code = meta_service_->create_collection(param, meta); if (code != 0) { LOG_ERROR("Failed to create collection: code[%d], what[%s],", code, ErrorCode::What(code)); } return code; } //! Update collection int update_collection(const CollectionBase ¶m, CollectionMetaPtr *meta) override { int code = meta_service_->update_collection(param, meta); if (code != 0) { LOG_ERROR("Failed to update collection: code[%d], what[%s],", code, ErrorCode::What(code)); } return code; } //! Update the status of current used collection int update_status(const std::string &collection_name, CollectionStatus status) override { int code = meta_service_->update_status(collection_name, status); if (code != 0) { LOG_ERROR("Failed to update collection: code[%d], what[%s],", code, ErrorCode::What(code)); } return code; } //! Enable collection int enable_collection(const std::string &collection, uint32_t revision) override { int code = meta_service_->enable_collection(collection, revision, true); if (code != 0) { LOG_ERROR("Failed to enable collection. code[%d] what[%s]", code, ErrorCode::What(code)); } return code; } //! Suspend reading requests of collection int suspend_collection_read(const std::string &collection_name) override { return meta_service_->suspend_collection_read(collection_name); } //! Resume reading requests of collection int resume_collection_read(const std::string &collection_name) override { return meta_service_->resume_collection_read(collection_name); } //! Suspend writing requests of collection int suspend_collection_write(const std::string &collection_name) override { return meta_service_->suspend_collection_write(collection_name); } //! Resume writing requests of collection int resume_collection_write(const std::string &collection_name) override { return meta_service_->resume_collection_write(collection_name); } //! Delete collection int delete_collection(const std::string &collection) override { if (collection.empty()) { LOG_ERROR("Collection name can't be empty"); return PROXIMA_BE_ERROR_CODE(InvalidArgument); } int code = meta_service_->drop_collection(collection); if (code != 0) { LOG_ERROR("Drop collection failed: code[%d], what[%s],", code, ErrorCode::What(code)); } return code; } //! Retrieve collections int list_collections(CollectionMetaPtrList *collections) const override { if (!collections) { return PROXIMA_BE_ERROR_CODE(InvalidArgument); } int code = meta_service_->get_latest_collections(collections); if (code != 0) { LOG_ERROR("Failed to list collections, code[%d], what[%s].", code, ErrorCode::What(code)); } return code; } //! Retrieve collections int get_collection_history( const std::string &name, CollectionMetaPtrList *collections) const override { if (name.empty()) { LOG_ERROR("Collection name can't be empty"); return PROXIMA_BE_ERROR_CODE(InvalidArgument); } int code = meta_service_->get_collections(name, collections); if (code != 0) { LOG_ERROR("Failed to list collections, code[%d], what[%s].", code, ErrorCode::What(code)); } return code; } //! Check collection exists CollectionMetaPtr get_collection(const std::string &name) const override { if (name.empty()) { LOG_ERROR("Collection name can't be empty"); return nullptr; } return meta_service_->get_current_collection(name); } //! Check collection exists bool exist_collection(const std::string &name) const override { if (name.empty()) { LOG_ERROR("Collection name can't be empty"); return false; } return meta_service_->exist_collection(name); } private: MetaServicePtr meta_service_{nullptr}; }; //! Create one MetaAgent instance MetaAgentPtr MetaAgent::Create(const std::string &uri) { return MetaAgent::Create(MetaServiceBuilder::Create(uri)); } MetaAgentPtr MetaAgent::Create(const MetaServicePtr &meta_service) { if (meta_service) { return std::make_shared(meta_service); } LOG_ERROR("Failed to create MetaService, invalid arguments of meta_service"); return nullptr; } } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/meta_agent.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #pragma once #include "meta_service.h" namespace proxima { namespace be { namespace meta { //! Predefined class class MetaAgent; //! Alias Pointer for MetaAgent using MetaAgentPtr = std::shared_ptr; /*! * MetaAgent for meta management */ class MetaAgent { public: //! Create one MetaAgent instance static MetaAgentPtr Create(const std::string &uri); //! Create MetaAgent from MetaService instance static MetaAgentPtr Create(const MetaServicePtr &); public: //! Destructor virtual ~MetaAgent() = default; public: //! Get Meta Service Instance virtual MetaServicePtr get_service() const = 0; public: //! Init Meta Agent virtual int init() = 0; //! Clean up object virtual int cleanup() = 0; //! Start background service virtual int start() = 0; //! Stop background service virtual int stop() = 0; public: //! Reload meta service virtual int reload() = 0; //! Create collection, 0 for success, otherwise failed, write the details // of collection to @param meta if meta not nullptr. //! @param, input parameter //! @meta, output parameter virtual int create_collection(const CollectionBase ¶m, CollectionMetaPtr *meta) = 0; //! Update collection, 0 for success, otherwise failed, write the details // of collection to @param meta if meta not nullptr. //! @param, input parameter //! @meta, output parameter virtual int update_collection(const CollectionBase ¶m, CollectionMetaPtr *meta) = 0; //! Update the status of current used collection virtual int update_status(const std::string &collection_name, CollectionStatus status) = 0; //! Enable collection virtual int enable_collection(const std::string &collection, uint32_t revision) = 0; //! Suspend reading requests of collection virtual int suspend_collection_read(const std::string &collection_name) = 0; //! Resume reading requests of collection virtual int resume_collection_read(const std::string &collection_name) = 0; //! Suspend writing requests of collection virtual int suspend_collection_write(const std::string &collection_name) = 0; //! Resume writing requests of collection virtual int resume_collection_write(const std::string &collection_name) = 0; //! Delete collection virtual int delete_collection(const std::string &collection) = 0; //! Retrieve collections virtual int list_collections(CollectionMetaPtrList *collections) const = 0; //! Retrieve collection history by name virtual int get_collection_history( const std::string &name, CollectionMetaPtrList *collections) const = 0; //! Retrieve collection by name virtual CollectionMetaPtr get_collection(const std::string &name) const = 0; //! Check collection exists virtual bool exist_collection(const std::string &name) const = 0; }; } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/meta_cache.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "meta_cache.h" #include "common/error_code.h" #include "common/logger.h" namespace proxima { namespace be { namespace meta { //! Select all filter CollectionFilter MetaCache::PassAllFilter = [](const CollectionImplPtr &) -> bool { return true; }; //! Current Collection filter CollectionFilter MetaCache::IsCurrentFilter = [](const CollectionImplPtr &collection) -> bool { return collection->meta()->is_current(); }; namespace { // Static empty pointer static const CollectionImplPtr EmptyCollectionPtr; static const CollectionImplPtr &FindCollectionIf( const CollectionImplPtrList &collections, CollectionFilter filter) { static CollectionImplPtr NotFound{nullptr}; auto collection = std::find_if_not(collections.begin(), collections.end(), [&filter](const CollectionImplPtr &c) -> bool { return filter ? !filter(c) : true; }); return collection != collections.end() ? *collection : NotFound; } } // namespace void MetaCache::clear() { cache_.clear(); mapping_.clear(); } void MetaCache::delete_collection(const std::string &name) { auto iter = cache_.find(name); if (iter != cache_.end()) { for (auto &collection : iter->second) { mapping_.erase(collection->uuid()); } cache_.erase(iter); } } bool MetaCache::exist_collection(const std::string &name) const { return cache_.find(name) != cache_.end(); } const CollectionImplPtr &MetaCache::get_collection( const std::string &name) const { return get_collection(name, IsCurrentFilter); } //! Retrieve collection by name const CollectionImplPtr &MetaCache::get_latest_collection( const std::string &name) const { auto iter = cache_.find(name); if (iter != cache_.end()) { return *iter->second.begin(); } return EmptyCollectionPtr; } //! Retrieve collection const CollectionImplPtr &MetaCache::get_collection( const std::string &name, const CollectionFilter &filter) const { auto iter = cache_.find(name); if (iter != cache_.end()) { return FindCollectionIf(iter->second, filter); } return EmptyCollectionPtr; } void MetaCache::get_collections(CollectionMetaPtrList *collections) const { for (auto &iter : cache_) { auto &collection = FindCollectionIf(iter.second, IsCurrentFilter); if (collection) { collections->push_back(collection->meta()); } else { LOG_WARN("There is collection, which not enabled yet"); } } } //! Retrieve collections with specific collection name void MetaCache::get_collections(const std::string &collection, CollectionMetaPtrList *collections) const { auto iter = cache_.find(collection); if (iter != cache_.end()) { for (auto &collection_ptr : iter->second) { collections->push_back(collection_ptr->meta()); } } } //! Retrieve all the collections void MetaCache::get_collections(const CollectionFilter &filter, CollectionMetaPtrList *collections) const { for (auto &iter : mapping_) { if (!filter || filter(iter.second)) { collections->push_back(iter.second->meta()); } } } //! Retrieve collections with specific repository void MetaCache::get_collections_by_repo( const std::string &repo, CollectionMetaPtrList *collections) const { for (auto &iter : cache_) { auto &collection = FindCollectionIf( iter.second, [&repo](const CollectionImplPtr &c) -> bool { return c->repository() && c->repository()->name() == repo && c->meta()->is_current() && c->serving(); }); if (collection) { collections->push_back(collection->meta()); } } } int MetaCache::append_collection(const CollectionImplPtr &collection) { if (!collection) { return PROXIMA_BE_ERROR_CODE(InvalidArgument); } auto &collections = cache_[collection->name()]; // Append collection collections.push_back(collection); // Sort collection collections.sort([](const CollectionImplPtr &left, const CollectionImplPtr &right) -> bool { return left->revision() > right->revision(); }); // Append to uuid -> collection mapping mapping_[collection->uuid()] = collection; return 0; } int MetaCache::append_column(ColumnImplPtr column) { if (!column) { return PROXIMA_BE_ERROR_CODE(InvalidArgument); } auto iter = mapping_.find(column->collection_uuid()); if (iter == mapping_.end()) { LOG_WARN("Can't find collection"); return PROXIMA_BE_ERROR_CODE(InvalidArgument); } return iter->second->append(column); } int MetaCache::append_repository(DatabaseRepositoryImplPtr repository) { if (!repository) { return PROXIMA_BE_ERROR_CODE(InvalidArgument); } auto iter = mapping_.find(repository->collection_uuid()); if (iter == mapping_.end()) { LOG_WARN("Can't find collection"); return PROXIMA_BE_ERROR_CODE(InvalidArgument); } return iter->second->set_repository(repository); } } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/meta_cache.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include #include #include "meta.h" #include "meta_impl.h" namespace proxima { namespace be { namespace meta { //! Predefined class class MetaCache; //! Alias for MetaCache using MetaCachePtr = std::shared_ptr; //! Alias for CollectionMetaMap using CollectionMetaMap = std::unordered_map; using CollectionImplMap = std::unordered_map; //! Alias CollectionFilter using CollectionFilter = std::function; /*! * MetaCache implementation */ class MetaCache { public: //! Default Filters static CollectionFilter PassAllFilter; static CollectionFilter IsCurrentFilter; public: //! Constructor MetaCache() = default; //! Destructor ~MetaCache() = default; public: //! Clear cache void clear(); //! Delete collections void delete_collection(const std::string &name); //! Has collection bool exist_collection(const std::string &name) const; //! Retrieve collection by name const CollectionImplPtr &get_collection(const std::string &name) const; //! Retrieve collection by name, with max revision id const CollectionImplPtr &get_latest_collection(const std::string &name) const; //! Retrieve collection const CollectionImplPtr &get_collection(const std::string &name, const CollectionFilter &filter) const; //! Retrieve all the latest collections void get_collections(CollectionMetaPtrList *collections) const; //! Retrieve collections with specific collection name void get_collections(const std::string &collection, CollectionMetaPtrList *collections) const; //! Retrieve all the collections void get_collections(const CollectionFilter &filter, CollectionMetaPtrList *collections) const; //! Retrieve collections with specific repository void get_collections_by_repo(const std::string &repo, CollectionMetaPtrList *collections) const; //! Append collection to the cache int append_collection(const CollectionImplPtr &collection); //! Append column to the cache int append_column(ColumnImplPtr column); //! Append repository to collection int append_repository(DatabaseRepositoryImplPtr repository); private: //! Collection Cache CollectionMetaMap cache_{}; //! Collection mapping, which help to allocate column with collection CollectionImplMap mapping_{}; }; } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/meta_impl.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "meta_impl.h" #include #include "common/error_code.h" #include "common/uuid_helper.h" namespace proxima { namespace be { namespace meta { ColumnImpl::ColumnImpl() { meta_ = std::make_shared(); } ColumnImpl::ColumnImpl(const ColumnMeta &column_meta) { meta_ = std::make_shared(column_meta); // Serialize index params to json string IndexParams::SerializeToBuffer(column_meta.parameters(), ¶meters_); } ColumnImpl::ColumnImpl(std::string new_uid, std::string new_uuid, const ColumnMeta &column_meta) : collection_uid_(std::move(new_uid)), collection_uuid_(std::move(new_uuid)) { meta_ = std::make_shared(column_meta); // Serialize index params to json string IndexParams::SerializeToBuffer(column_meta.parameters(), ¶meters_); } void ColumnImpl::transform() { IndexParams::ParseFromBuffer(parameters_, meta_->mutable_parameters()); } CollectionImpl::CollectionImpl() { // Allocate new memory for meta meta_ = std::make_shared(); meta_->set_revision(0); meta_->set_current(true); uuid_ = gen_uuid(); } CollectionImpl::CollectionImpl(const char *collection_name) { // Allocate new memory for meta meta_ = std::make_shared(); meta_->set_name(collection_name); uuid_ = gen_uuid(); } CollectionImpl::CollectionImpl(const CollectionMeta &collection) { meta_ = std::make_shared(collection); uuid_ = gen_uuid(); init_from_meta(); } CollectionImpl::CollectionImpl(CollectionMetaPtr collection) : meta_(std::move(collection)) { uuid_ = gen_uuid(); init_from_meta(); } int CollectionImpl::append(ColumnImplPtr &column_ptr, bool force) { if (!force && (column_ptr->collection_uuid() != uuid() || column_ptr->collection_uid() != uid())) { return PROXIMA_BE_ERROR_CODE(InvalidArgument); } // Reset uuid and uid column_ptr->set_collection_uuid(uuid()); column_ptr->set_collection_uid(uid()); // Link to columns columns_.push_back(column_ptr); // Collect meta meta_->append(column_ptr->meta()); return 0; } int CollectionImpl::set_repository(DatabaseRepositoryImplPtr &repo) { if (repo) { repository_ = repo; meta_->set_repository(repository_->meta()); } return 0; } void CollectionImpl::transform() { if (!forward_columns_.empty()) { ailego::StringHelper::Split(forward_columns_, ",", meta_->mutable_forward_columns()); } for (auto &column : columns()) { column->set_collection_uid(uid()); column->set_collection_uuid(uuid()); } } void CollectionImpl::init_from_meta() { // merge forward columns for (auto &c : meta_->forward_columns()) { forward_columns_.append(c); forward_columns_.append(","); } if (!forward_columns_.empty()) { forward_columns_.pop_back(); } // parse columns for (auto &c : meta_->index_columns()) { columns_.emplace_back( std::make_shared(meta_->uid(), uuid_, *c)); } if (meta_->repository()) { auto repo = RepositoryHelper::Child(meta_->repository()); repository_ = std::make_shared(meta_->uid(), uuid_, *repo); } } DatabaseRepositoryImpl::DatabaseRepositoryImpl() { repository_ = std::make_shared(); } DatabaseRepositoryImpl::DatabaseRepositoryImpl( const DatabaseRepositoryMeta &repo) : collection_uid_(gen_uuid()), collection_uuid_(gen_uuid()) { repository_ = std::make_shared(repo); } DatabaseRepositoryImpl::DatabaseRepositoryImpl( const std::string &uid, const std::string &uuid, const DatabaseRepositoryMeta &repo) : collection_uid_(uid), collection_uuid_(uuid) { repository_ = std::make_shared(repo); } } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/meta_impl.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include "meta.h" #include "meta_types.h" namespace proxima { namespace be { namespace meta { //! Predefine class class ColumnImpl; class CollectionImpl; class DatabaseRepositoryImpl; //! Alias Pointers using ColumnImplPtr = std::shared_ptr; using ColumnImplPtrList = std::list; using CollectionImplPtr = std::shared_ptr; using CollectionImplPtrList = std::list; using DatabaseRepositoryImplPtr = std::shared_ptr; /*! * Column Implementation */ class ColumnImpl : public ColumnObject { public: //! Constructors ColumnImpl(); explicit ColumnImpl(const ColumnMeta &column_meta); ColumnImpl(std::string uid, std::string uuid, const ColumnMeta &meta); //! Destructor ~ColumnImpl() override = default; public: //! Retrieve id uint64_t id() const override { return id_; } //! Set id void set_id(uint64_t new_id) override { id_ = new_id; } //! Retrieve collection uid const std::string &collection_uid() const override { return collection_uid_; } //! Retrieve mutable collection uid std::string *mutable_collection_uid() override { return &collection_uid_; } //! Set collection uid void set_collection_uid(const std::string &new_collection_uid) override { collection_uid_ = new_collection_uid; } //! Retrieve collection uuid const std::string &collection_uuid() const override { return collection_uuid_; } //! Retrieve mutable collection uuid std::string *mutable_collection_uuid() override { return &collection_uuid_; } //! Set collection uuid void set_collection_uuid(const std::string &new_collection_uuid) override { collection_uuid_ = new_collection_uuid; } //! Retrieve column name const std::string &name() const override { return meta_->name(); } //! Retrieve mutable column name std::string *mutable_name() override { return meta_->mutable_name(); } //! Set column name void set_name(const std::string &new_name) override { meta_->set_name(new_name); } //! Retrieve column uid const std::string &uid() const override { return meta_->uid(); } //! Retrieve mutable column uid std::string *mutable_uid() override { return meta_->mutable_uid(); } //! Set column uid void set_uid(const std::string &new_uid) override { meta_->set_uid(new_uid); } //! Retrieve dimension of column uint32_t dimension() const override { return meta_->dimension(); } //! Set dimension of column void set_dimension(uint32_t new_dimension) override { return meta_->set_dimension(new_dimension); } //! Retrieve column index type uint32_t index_type() const override { return static_cast(meta_->index_type()); } //! Set column index type void set_index_type(uint32_t type) override { meta_->set_index_type(static_cast(type)); } //! Retrieve column data type uint32_t data_type() const override { return static_cast(meta_->data_type()); } //! Set column index type void set_data_type(uint32_t type) override { meta_->set_data_type(static_cast(type)); } //! Retrieve column parameters const std::string ¶meters() const override { return parameters_; } //! Retrieve mutable column parameters std::string *mutable_parameters() override { return ¶meters_; } //! Set column parameters void set_parameters(const std::string ¶ms) override { parameters_ = params; } //! Retrieve mutable meta const ColumnMetaPtr &meta() const { return meta_; } ////! Retrieve mutable meta // ColumnMetaPtr *mutable_meta() { // return &meta_; //} //! Transform void transform(); private: //! Meta ColumnMetaPtr meta_{nullptr}; //! Primary key in database uint64_t id_{0}; //! Uid of column std::string uid_{}; //! Collection uid, indicate which collection group belong to std::string collection_uid_{}; //! Collection uuid, indicate which specific collection belong to std::string collection_uuid_{}; //! Index params, Json string, which parsed to meta_.parameters field std::string parameters_{}; }; /*! * Collection implementation */ class CollectionImpl : public CollectionObject { public: //! Constructors CollectionImpl(); CollectionImpl(const char *coll_name); CollectionImpl(const CollectionMeta &coll_meta); CollectionImpl(CollectionMetaPtr meta_ptr); //! Destructor ~CollectionImpl() override = default; public: //! Retrieve id uint64_t id() const override { return id_; } //! Set collection id void set_id(uint64_t new_id) override { id_ = new_id; } //! Retrieve collection name const std::string &name() const override { return meta_->name(); } //! Retrieve mutable collection name std::string *mutable_name() override { return meta_->mutable_name(); } //! Set collection name void set_name(const std::string &new_name) override { meta_->set_name(new_name); } //! Retrieve collection uid, indicate a group of collections const std::string &uid() const override { return meta_->uid(); } //! Retrieve mutable collection uid, indicate a group of collections std::string *mutable_uid() override { return meta_->mutable_uid(); } //! Set collection uid void set_uid(const std::string &new_uid) override { meta_->set_uid(new_uid); } //! Retrieve collection uuid, unique field const std::string &uuid() const override { return uuid_; } //! Retrieve mutable collection uuid, unique field std::string *mutable_uuid() override { return &uuid_; } //! Set collection uuid void set_uuid(const std::string &new_uuid) override { uuid_ = new_uuid; } //! Retrieve forward columns, separated by character ',' const std::string &forward_columns() const override { return forward_columns_; } //! Retrieve mutable forward columns, separated by character ',' std::string *mutable_forward_columns() override { return &forward_columns_; } //! Set forward columns void set_forward_columns(const std::string &new_forward_columns) override { forward_columns_ = new_forward_columns; } //! Retrieve split index size uint64_t max_docs_per_segment() const override { return meta_->max_docs_per_segment(); } //! Set split index size void set_max_docs_per_segment(uint64_t count) override { meta_->set_max_docs_per_segment(count); } //! Retrieve collection revision uint32_t revision() const override { return meta_->revision(); } //! Set collection revision void set_revision(uint32_t next_revision) override { meta_->set_revision(next_revision); } //! Retrieve collection status uint32_t status() const override { return static_cast(meta_->status()); } //! Check is serving bool serving() const { return meta_->serving(); } //! Set collection status void set_status(uint32_t new_status) override { meta_->set_status(static_cast(new_status)); } //! Retrieve collection current flag uint32_t current() const override { return meta_->is_current() ? 1 : 0; } //! Set collection current flag void set_current(uint32_t flag) override { meta_->set_current(flag != 0); } //! Retrieve io_mode of collection uint32_t io_mode() const override { uint32_t mode = 0; if (meta_->readable()) { mode |= 0x1; } if (meta_->writable()) { mode |= 0x2; } return mode; } //! Set io_mode of collection void set_io_mode(uint32_t mode) override { meta_->set_readable(mode & 0x1); meta_->set_writable(mode & 0x2); } //! Retrieve meta CollectionMetaPtr meta() const { return meta_; } //! Retrieve columns const ColumnImplPtrList &columns() const { return columns_; } //! Retrieve column with name const ColumnImplPtr &get_column(const std::string &column_name) const { return get_column([&column_name](const ColumnImplPtr &c) -> bool { return column_name == c->name(); }); } ////! Check valid column // bool has_column(const std::string &column_name) const { // return get_column(column_name).operator bool(); //} //! Append column, 0 for success, otherwise failed //! @param do not check uuid and uid if force equals true, int append(ColumnImplPtr &, bool force = true); //! Retrieve repository DatabaseRepositoryImplPtr repository() const { return repository_; } //! Attach to repository int set_repository(DatabaseRepositoryImplPtr &); //! Transform void transform(); private: //! Init member void init_from_meta(); //! Retrieve column with filter const ColumnImplPtr &get_column( std::function filter) const { static ColumnImplPtr DefaultColumn; auto iter = std::find_if_not( columns_.begin(), columns_.end(), [&filter](const ColumnImplPtr &c) -> bool { return !filter(c); }); return iter != columns_.end() ? *iter : DefaultColumn; } private: //! Meta CollectionMetaPtr meta_{nullptr}; //! ID uint64_t id_{0}; //! Uniq id std::string uuid_{}; //! Forward columns, separated by character ',' std::string forward_columns_{}; //! Columns ColumnImplPtrList columns_{}; DatabaseRepositoryImplPtr repository_{}; }; /*! Repository implementation */ class DatabaseRepositoryImpl : public DatabaseRepositoryObject { public: //! Constructor DatabaseRepositoryImpl(); explicit DatabaseRepositoryImpl(const DatabaseRepositoryMeta &); DatabaseRepositoryImpl(const std::string &, const std::string &, const DatabaseRepositoryMeta &); //! Destructor ~DatabaseRepositoryImpl() override = default; public: //! Retrieve id uint64_t id() const override { return id_; } //! Set repository id void set_id(uint64_t repo_id) override { id_ = repo_id; } //! Retrieve repository name const std::string &name() const override { return repository_->name(); } //! Retrieve mutable repository name std::string *mutable_name() override { return repository_->mutable_name(); } //! Set repository name void set_name(const std::string &repo_name) override { repository_->set_name(repo_name); } //! Retrieve collection uid const std::string &collection_uid() const override { return collection_uid_; } //! Retrieve mutable collection uid std::string *mutable_collection_uid() override { return &collection_uid_; } //! Set collection uid void set_collection_uid(const std::string &new_connection_uid) override { collection_uid_ = new_connection_uid; } //! Retrieve collection uuid const std::string &collection_uuid() const override { return collection_uuid_; } //! Retrieve mutable collection uuid std::string *mutable_collection_uuid() override { return &collection_uuid_; } //! Set collection uuid void set_collection_uuid(const std::string &new_collection_uuid) override { collection_uuid_ = new_collection_uuid; } //! Retrieve connection uri const std::string &connection() const override { return repository_->connection(); } //! Retrieve mutable connection uri std::string *mutable_connection() override { return repository_->mutable_connection(); } //! Set connection uri void set_connection(const std::string &uri) override { repository_->set_connection(uri); } //! Retrieve user name of connection const std::string &user() const override { return repository_->user(); } //! Retrieve mutable user name of connection std::string *mutable_user() override { return repository_->mutable_user(); } //! Set user name of connection void set_user(const std::string &user_name) override { repository_->set_user(user_name); } //! Retrieve password of user const std::string &password() const override { return repository_->password(); } //! Retrieve mutable password of user std::string *mutable_password() override { return repository_->mutable_password(); } //! Set password of user void set_password(const std::string &new_password) override { repository_->set_password(new_password); } //! Retrieve repository table name const std::string &table() const override { return repository_->table_name(); } //! Retrieve mutable repository table name std::string *mutable_table() override { return repository_->mutable_table_name(); } //! Set repository table name void set_table(const std::string &table_name) override { repository_->set_table_name(table_name); } const DatabaseRepositoryMetaPtr meta() const { return repository_; } private: //! ID uint64_t id_{0u}; //! Collection uid std::string collection_uid_{}; //! Collection uuid std::string collection_uuid_{}; //! Repository handler DatabaseRepositoryMetaPtr repository_{nullptr}; }; } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/meta_service.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "meta_service.h" #include #include #include #include "common/error_code.h" #include "meta_cache.h" #include "meta_impl.h" #include "meta_service_builder.h" #include "meta_store_factory.h" namespace proxima { namespace be { namespace meta { /*! MetaServiceImpl */ class MetaServiceImpl : public MetaService { public: //! Constructor //! @param uri: Identifier with database explicit MetaServiceImpl(MetaStorePtr store, MetaCachePtr cache); //! Disable default constructor and copy constructor MetaServiceImpl() = delete; MetaServiceImpl(const MetaServiceImpl &) = delete; // Destructor ~MetaServiceImpl() override; public: // Interface inherent from Service int init_impl() override; int cleanup_impl() override; int start_impl() override; int stop_impl() override; public: //! Reload meta service int reload() override; //! Create collection and columns int create_collection(const CollectionBase ¶m, CollectionMetaPtr *meta) override; //! Update collection and columns, increase revision and copy a new collection int update_collection(const CollectionBase ¶m, CollectionMetaPtr *meta) override; //! Enable collection int enable_collection(const std::string &collection, uint32_t revision, bool enable) override; //! Update the status of current used collection int update_status(const std::string &collection_name, CollectionStatus status) override; //! Suspend reading requests of collection int suspend_collection_read(const std::string &collection_name) override; //! Resume reading requests of collection int resume_collection_read(const std::string &collection_name) override; //! Suspend writing requests of collection int suspend_collection_write(const std::string &collection_name) override; //! Resume writing requests of collection int resume_collection_write(const std::string &collection_name) override; //! Drop collection int drop_collection(const std::string &name) override; //! Retrieve latest version of collection CollectionMetaPtr get_current_collection( const std::string &name) const override; //! Retrieve latest version of collections int get_latest_collections(CollectionMetaPtrList *collections) const override; //! Retrieve all of collections int get_collections(CollectionMetaPtrList *collections) const override; //! Retrieve collections with specific repository int get_collections_by_repo( const std::string &repository, CollectionMetaPtrList *collections) const override; //! Retrieve collections with specific collection name int get_collections(const std::string &name, CollectionMetaPtrList *collections) const override; //! Retrieve collection CollectionMetaPtr get_collection(const std::string &name, uint64_t revision) const override; //! Check collection exists bool exist_collection(const std::string &collection) const override; private: //! Retrieve collection const CollectionImplPtr &inner_get_collection(const std::string &name, uint64_t revision) const; //! Update current collection int update_current_used_collection( const std::string collection_name, std::function handler); //! Cleanup cache without lock inline void cleanup_cache() { cache_->clear(); } //! Load meta store to cache with out lock int load_meta_cache(); //! load collections from meta store int load_collections(); //! load columns from meta store int load_columns(); //! load repositories from meta store int load_repositories(); //! load meta from meta store int load_meta_store(); //! store collection fo meta store int store_collection(const CollectionImplPtr &collection); private: //! Mutex for cache access mutable ailego::SharedMutex mutex_{}; //! Meta Store MetaStorePtr store_{nullptr}; //! Meta Cache MetaCachePtr cache_{nullptr}; }; // end of MetaServiceImpl MetaServicePtr MetaServiceBuilder::Create(const std::string &uri_str) { ailego::Uri uri(uri_str); if (!uri.is_valid()) { LOG_ERROR("Failed to parse uri, initialize MetaServiceImpl failed. uri[%s]", uri_str.c_str()); return nullptr; } MetaStorePtr store = MetaStoreFactory::Instance().create(uri.scheme().c_str(), &uri); if (!store) { LOG_ERROR( "MetaServiceImpl init failed. reason[can't get meta store instance]"); return nullptr; } return std::make_shared(store, std::make_shared()); } int MetaServiceImpl::load_collections() { CollectionImplPtr collection{nullptr}; // Load collection to cache int code = store_->list_collections([this, &collection]() -> CollectionObject * { if (collection) { // Append collection to cache collection->transform(); cache_->append_collection(collection); collection.reset(); } collection = std::make_shared(); return collection.get(); }); if (code == 0 && collection) { // Append last collection collection->transform(); cache_->append_collection(collection); } if (code != 0) { // Failed LOG_ERROR("Failed to load collection from meta store. code[%d]", code); return PROXIMA_BE_ERROR_CODE(RuntimeError); } return code; } int MetaServiceImpl::load_columns() { ColumnImplPtr column{nullptr}; // Load columns into cache int code = store_->list_columns([this, &column]() -> ColumnObject * { if (column) { // Append column to cache column->transform(); cache_->append_column(column); column.reset(); } column = std::make_shared(); return column.get(); }); if (code == 0 && column) { // Append last column to cache column->transform(); cache_->append_column(column); } if (code != 0) { LOG_ERROR("Failed to load columns from meta store. code[%d]", code); return PROXIMA_BE_ERROR_CODE(RuntimeError); } return code; } int MetaServiceImpl::load_repositories() { DatabaseRepositoryImplPtr repository{nullptr}; // Load columns into cache int code = store_->list_repositories( [this, &repository]() -> DatabaseRepositoryObject * { if (repository) { // Attach to collection cache_->append_repository(repository); } repository = std::make_shared(); return repository.get(); }); if (code == 0 && repository) { // Append last repository to cache cache_->append_repository(repository); } if (code != 0) { LOG_ERROR("Failed to load repository from meta store. code[%d]", code); return PROXIMA_BE_ERROR_CODE(RuntimeError); } return code; } int MetaServiceImpl::load_meta_store() { int code = load_collections(); if (code == 0) { code = load_columns(); if (code == 0) { code = load_repositories(); } } if (code != 0) { cache_->clear(); } return code; } int MetaServiceImpl::store_collection(const CollectionImplPtr &collection) { int code = store_->create_collection(*collection); if (code != 0) { return code; } if (collection->repository()) { code = store_->create_repository(*collection->repository()); if (code != 0) { store_->delete_repositories_by_uuid(collection->uuid()); store_->delete_collection_by_uuid(collection->uuid()); return code; } } for (auto &column : collection->columns()) { code = store_->create_column(*column); if (code != 0) { store_->delete_columns_by_uuid(collection->uuid()); store_->delete_repositories_by_uuid(collection->uuid()); store_->delete_collection_by_uuid(collection->uuid()); break; } } return code; } #define META_WRITE_LOCK_GUARD(MUTEX, GUARD) \ ailego::WriteLock write_lock(MUTEX); \ std::lock_guard GUARD(write_lock) #define META_READ_LOCK_GUARD(MUTEX, GUARD) \ ailego::ReadLock read_lock(MUTEX); \ std::lock_guard GUARD(read_lock) MetaServiceImpl::MetaServiceImpl(MetaStorePtr store, MetaCachePtr cache) : store_(std::move(store)), cache_(std::move(cache)) {} MetaServiceImpl::~MetaServiceImpl() = default; // Interface inherent from Service int MetaServiceImpl::init_impl() { META_WRITE_LOCK_GUARD(mutex_, guard); return load_meta_cache(); } int MetaServiceImpl::cleanup_impl() { META_WRITE_LOCK_GUARD(mutex_, guard); cleanup_cache(); return 0; } int MetaServiceImpl::start_impl() { return 0; } int MetaServiceImpl::stop_impl() { return 0; } int MetaServiceImpl::reload() { LOG_INFO("Reload meta service."); META_WRITE_LOCK_GUARD(mutex_, guard); LOG_DEBUG("Cleanup meta cache."); cleanup_cache(); LOG_DEBUG("Reload meta cache."); int code = load_meta_cache(); if (code == 0) { LOG_INFO("Reload meta service successes."); } else { LOG_INFO("Reload meta service failed. code[%d] what[%s]", code, ErrorCode::What(code)); } return code; } int MetaServiceImpl::create_collection(const CollectionBase ¶m, CollectionMetaPtr *out) { META_WRITE_LOCK_GUARD(mutex_, guard); if (cache_->exist_collection(param.name())) { return PROXIMA_BE_ERROR_CODE(DuplicateCollection); } CollectionMetaPtr meta = std::make_shared(param); int code = meta->validate(); if (code != 0) { LOG_ERROR("Meta was invalid. code[%d] what[%s]", code, ErrorCode::What(code)); return code; } CollectionImplPtr collection = std::make_shared(meta); collection->transform(); code = store_collection(collection); if (code == 0) { cache_->append_collection(collection); } else { LOG_ERROR("Failed to store collection. code[%d]", code); } if (code == 0 && out != nullptr) { *out = meta; } return code; } //! Update collection and columns, increase revision and copy a new collection int MetaServiceImpl::update_collection(const CollectionBase ¶m, CollectionMetaPtr *out) { META_WRITE_LOCK_GUARD(mutex_, guard); CollectionImplPtr latest = cache_->get_latest_collection(param.name()); if (!latest) { return PROXIMA_BE_ERROR_CODE(InexistentCollection); } // Create new meta from latest revision CollectionMetaPtr meta = std::make_shared(*latest->meta()); int code = meta->merge_update_param(param); if (code != 0) { LOG_ERROR("Readonly field updated. code[%d] what[%s]", code, ErrorCode::What(code)); return code; } code = meta->validate(); if (code != 0) { LOG_ERROR("Update collection failed. code[%d] what[%s]", code, ErrorCode::What(code)); return code; } // Increase revision of collection meta->increase_revision(); meta->set_current(false); // Copy to Collection Impl CollectionImplPtr next = std::make_shared(meta); next->transform(); // Store collection and append to cache code = store_collection(next); if (code != 0) { LOG_ERROR("Failed to update collection. code[%d]", code); } else { cache_->append_collection(next); } // Write back of results if (code == 0 && out != nullptr) { *out = meta; } return code; } //! Enable collection int MetaServiceImpl::enable_collection(const std::string &name, uint32_t revision, bool) { META_WRITE_LOCK_GUARD(mutex_, guard); int code = PROXIMA_BE_ERROR_CODE(InexistentCollection); CollectionImplPtr current = cache_->get_collection(name); auto &next = inner_get_collection(name, revision); if (!current || !next) { LOG_ERROR("Can't get collection by name or by revision."); } else { if (current != next) { // Not same current->meta()->set_readable(false); current->meta()->set_writable(false); current->meta()->set_current(false); store_->update_collection(*current); } next->meta()->set_status(CollectionStatus::SERVING); next->meta()->set_current(true); code = store_->update_collection(*next); } return code; } //! Update the status of current used collection int MetaServiceImpl::update_status(const std::string &name, CollectionStatus stat) { META_WRITE_LOCK_GUARD(mutex_, guard); return update_current_used_collection( name, [&stat](CollectionImplPtr current) -> int { current->meta()->set_status(stat); return 0; }); } //! Suspend reading requests of collection int MetaServiceImpl::suspend_collection_read( const std::string &collection_name) { META_WRITE_LOCK_GUARD(mutex_, guard); return update_current_used_collection(collection_name, [](CollectionImplPtr current) -> int { current->meta()->set_readable(false); return 0; }); } //! Resume reading requests of collection int MetaServiceImpl::resume_collection_read( const std::string &collection_name) { META_WRITE_LOCK_GUARD(mutex_, guard); return update_current_used_collection(collection_name, [](CollectionImplPtr current) -> int { current->meta()->set_readable(true); return 0; }); } //! Suspend writing requests of collection int MetaServiceImpl::suspend_collection_write( const std::string &collection_name) { META_WRITE_LOCK_GUARD(mutex_, guard); return update_current_used_collection(collection_name, [](CollectionImplPtr current) -> int { current->meta()->set_writable(false); return 0; }); } //! Resume writing requests of collection int MetaServiceImpl::resume_collection_write( const std::string &collection_name) { META_WRITE_LOCK_GUARD(mutex_, guard); return update_current_used_collection(collection_name, [](CollectionImplPtr current) -> int { current->meta()->set_writable(true); return 0; }); } //! Drop collection int MetaServiceImpl::drop_collection(const std::string &name) { META_WRITE_LOCK_GUARD(mutex_, guard); CollectionImplPtr current = cache_->get_collection(name); if (current) { cache_->delete_collection(name); int code = store_->delete_collection(name); if (code == 0) { code = store_->delete_columns_by_uid(current->uid()); if (code == 0) { code = store_->delete_repositories_by_uid(current->uid()); } } return code; } return 0; } //! Retrieve latest version of collection CollectionMetaPtr MetaServiceImpl::get_current_collection( const std::string &name) const { META_READ_LOCK_GUARD(mutex_, guard); auto current = cache_->get_collection(name); return current ? current->meta() : nullptr; } //! Retrieve latest version of collections int MetaServiceImpl::get_latest_collections( CollectionMetaPtrList *collections) const { if (!collections) { return PROXIMA_BE_ERROR_CODE(InvalidArgument); } META_READ_LOCK_GUARD(mutex_, guard); cache_->get_collections(collections); return 0; } //! Retrieve all of collections int MetaServiceImpl::get_collections(CollectionMetaPtrList *collections) const { META_READ_LOCK_GUARD(mutex_, guard); cache_->get_collections(MetaCache::PassAllFilter, collections); return 0; } //! Retrieve collections with specific repository int MetaServiceImpl::get_collections_by_repo( const std::string &repo, CollectionMetaPtrList *collections) const { META_READ_LOCK_GUARD(mutex_, guard); cache_->get_collections_by_repo(repo, collections); return 0; } //! Retrieve collections with specific collection name int MetaServiceImpl::get_collections(const std::string &name, CollectionMetaPtrList *collections) const { META_READ_LOCK_GUARD(mutex_, guard); cache_->get_collections(name, collections); return collections->empty() ? PROXIMA_BE_ERROR_CODE(InexistentCollection) : 0; } //! Retrieve collection CollectionMetaPtr MetaServiceImpl::get_collection(const std::string &name, uint64_t revision) const { META_READ_LOCK_GUARD(mutex_, guard); auto &impl = inner_get_collection(name, revision); return impl ? impl->meta() : nullptr; } //! Check collection exists bool MetaServiceImpl::exist_collection(const std::string &collection) const { META_READ_LOCK_GUARD(mutex_, guard); return cache_->exist_collection(collection); } const CollectionImplPtr &MetaServiceImpl::inner_get_collection( const std::string &name, uint64_t revision) const { return cache_->get_collection( name, [&revision](const CollectionImplPtr &collection) -> bool { return collection->revision() == revision; }); } int MetaServiceImpl::update_current_used_collection( const std::string collection_name, std::function handler) { int code = PROXIMA_BE_ERROR_CODE(InexistentCollection); CollectionImplPtr current = cache_->get_collection(collection_name); if (current) { code = handler(current); if (code == 0) { store_->update_collection(*current); } else { LOG_ERROR("Update collection failed. collection[%s]", current->name().c_str()); } } return code; } int MetaServiceImpl::load_meta_cache() { // Load all the collections from meta store int code = load_meta_store(); if (code != 0) { cleanup_impl(); LOG_ERROR("Failed to load collection into cache."); code = PROXIMA_BE_ERROR_CODE(RuntimeError); } return code; } #undef META_WRITE_LOCK_GUARD #undef META_READ_LOCK_GUARD } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/meta_service.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Oct 2020 * \brief */ #pragma once #include "common/interface/service.h" #include "meta.h" namespace proxima { namespace be { namespace meta { //! Predefined class class MetaService; //! MetaStore Alias using MetaServicePtr = std::shared_ptr; /*! * MetaService implementation */ class MetaService : public Service { public: // Destructor ~MetaService() override = default; public: //! Reload meta service virtual int reload() = 0; //! Create collection and columns virtual int create_collection(const CollectionBase ¶m, CollectionMetaPtr *collection) = 0; //! Update collection and columns, increase revision and copy a new collection virtual int update_collection(const CollectionBase ¶m, CollectionMetaPtr *collection) = 0; //! Enable collection virtual int enable_collection(const std::string &collection, uint32_t revision, bool enable) = 0; //! Update the status of current used collection virtual int update_status(const std::string &collection_name, CollectionStatus status) = 0; //! Suspend reading requests of collection virtual int suspend_collection_read(const std::string &collection_name) = 0; //! Resume reading requests of collection virtual int resume_collection_read(const std::string &collection_name) = 0; //! Suspend writing requests of collection virtual int suspend_collection_write(const std::string &collection_name) = 0; //! Resume writing requests of collection virtual int resume_collection_write(const std::string &collection_name) = 0; //! Drop collection virtual int drop_collection(const std::string &name) = 0; //! Retrieve latest version of collection virtual CollectionMetaPtr get_current_collection( const std::string &name) const = 0; //! Retrieve latest version of collections virtual int get_latest_collections( CollectionMetaPtrList *collections) const = 0; //! Retrieve all of collections virtual int get_collections(CollectionMetaPtrList *collections) const = 0; //! Retrieve collections with specific repository virtual int get_collections_by_repo( const std::string &repository, CollectionMetaPtrList *collections) const = 0; //! Retrieve collections with specific collection name virtual int get_collections(const std::string &collection, CollectionMetaPtrList *collections) const = 0; //! Retrieve collection virtual CollectionMetaPtr get_collection(const std::string &collection, uint64_t revision) const = 0; //! Check collection exists virtual bool exist_collection(const std::string &collection) const = 0; }; // end of MetaService } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/meta_service_builder.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #pragma once #include "meta_service.h" namespace proxima { namespace be { namespace meta { /*! * Build MetaService Object */ class MetaServiceBuilder { public: //! Create MetaService instance static MetaServicePtr Create(const std::string &); }; } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/meta_store.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Oct 2020 * \brief */ #pragma once #include #include #include "meta_types.h" namespace proxima { namespace be { namespace meta { //! Predefine class class MetaStore; //! Alias for MetaStore using MetaStorePtr = std::shared_ptr; //! Alias for object allocator using CollectionAllocator = std::function; using ColumnAllocator = std::function; using DatabaseRepositoryAllocator = std::function; /*! * Meta store */ class MetaStore { public: //! Destructor virtual ~MetaStore() = default; public: //! initialize metastore virtual int initialize(const ailego::Uri *uri) = 0; //! cleanup virtual int cleanup() = 0; /** CRUD of CollectionObject **/ //! Create the collection virtual int create_collection(const CollectionObject &collection) = 0; //! Update collection by id, all field should be updated except id(most of // them was identical) virtual int update_collection(const CollectionObject &collection) = 0; //! Delete collection virtual int delete_collection(const std::string &name) = 0; //! Delete collection virtual int delete_collection_by_uuid(const std::string &name) = 0; //! Retrieve all collections virtual int list_collections(CollectionAllocator allocator) const = 0; /** CRUD of ColumnObject **/ //! Create column virtual int create_column(const ColumnObject &column) = 0; //! Delete columns virtual int delete_columns_by_uid(const std::string &uid) = 0; //! Delete columns virtual int delete_columns_by_uuid(const std::string &uuid) = 0; //! Retrieve all collections virtual int list_columns(ColumnAllocator allocator) const = 0; /** CRUD of RepositoryObject **/ //! Create repository virtual int create_repository(const DatabaseRepositoryObject &repository) = 0; //! Delete repositories virtual int delete_repositories_by_uid(const std::string &uid) = 0; //! Delete repositories virtual int delete_repositories_by_uuid(const std::string &uuid) = 0; //! Retrieve all repositories virtual int list_repositories( DatabaseRepositoryAllocator allocator) const = 0; //! Flush all changes to storage virtual int flush() const = 0; }; } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/meta_store_factory.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Oct 2020 * \brief */ #include "meta_store_factory.h" #include "common/logger.h" namespace proxima { namespace be { namespace meta { MetaStorePtr MetaStoreFactory::create(const char *name, const ailego::Uri *uri) { auto iter = store_cache_.find(name); if (iter != store_cache_.end()) { return iter->second; } if (ailego::Factory::Has(name)) { auto meta = ailego::Factory::MakeShared(name); if (meta->initialize(uri) == 0) { store_cache_[name] = meta; return meta; } else { LOG_ERROR("Failed to init meta store"); } } return nullptr; } } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/meta_store_factory.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Oct 2020 * \brief */ #pragma once #include #include #include "meta_store.h" namespace proxima { namespace be { namespace meta { /*! * MetaStoreFactory in charging create meta store object */ class MetaStoreFactory : public ailego::Singleton { public: //! Alias for Cache & CacheIter using Cache = std::map; using CacheIter = Cache::iterator; public: //! Return singleton MateStore instance MetaStorePtr create(const char *name, const ailego::Uri *uri); private: //! Meta store cache Cache store_cache_{}; }; //! Register MetaStore #define META_FACTORY_REGISTER_INSTANCE_ALIAS(__NAME__, __IMPL__, ...) \ AILEGO_FACTORY_REGISTER(__NAME__, MetaStore, __IMPL__, ##__VA_ARGS__) } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/meta_types.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include #include "meta.h" namespace proxima { namespace be { namespace meta { //! Predefine class class ColumnObject; class CollectionObject; class DatabaseRepositoryObject; //! Alias pointer using ColumnObjectPtr = std::shared_ptr; using CollectionObjectPtr = std::shared_ptr; using CollectionObjectList = std::list; using CollectionListConstIter = CollectionObjectList::const_iterator; using DatabaseRepositoryObjectPtr = std::shared_ptr; /*! * Column interface, transform meta between meta_store and meta_service */ class ColumnObject { public: //! Destructor virtual ~ColumnObject() = default; public: //! Retrieve id virtual uint64_t id() const = 0; //! Set id virtual void set_id(uint64_t) = 0; //! Retrieve collection uid virtual const std::string &collection_uid() const = 0; //! Retrieve mutable collection uid virtual std::string *mutable_collection_uid() = 0; //! Set collection uid virtual void set_collection_uid(const std::string &) = 0; //! Retrieve collection uuid virtual const std::string &collection_uuid() const = 0; //! Retrieve mutable collection uuid virtual std::string *mutable_collection_uuid() = 0; //! Set collection uuid virtual void set_collection_uuid(const std::string &) = 0; //! Retrieve column name virtual const std::string &name() const = 0; //! Retrieve mutable column name virtual std::string *mutable_name() = 0; //! Set column name virtual void set_name(const std::string &) = 0; //! Retrieve column uid virtual const std::string &uid() const = 0; //! Retrieve mutable column uid virtual std::string *mutable_uid() = 0; //! Set column uid virtual void set_uid(const std::string &) = 0; //! Retrieve dimension of column virtual uint32_t dimension() const = 0; //! Set dimension of column virtual void set_dimension(uint32_t) = 0; //! Retrieve column index type virtual uint32_t index_type() const = 0; //! Set column index type virtual void set_index_type(uint32_t) = 0; //! Retrieve column data type virtual uint32_t data_type() const = 0; //! Set column index type virtual void set_data_type(uint32_t) = 0; //! Retrieve column parameters virtual const std::string ¶meters() const = 0; //! Retrieve mutable column parameters virtual std::string *mutable_parameters() = 0; //! Set column parameters virtual void set_parameters(const std::string &) = 0; }; /*! * Collection interface, transform meta between meta_store and * meta_service */ class CollectionObject { public: //! Destructor virtual ~CollectionObject() = default; public: //! Retrieve id virtual uint64_t id() const = 0; //! Set collection id virtual void set_id(uint64_t) = 0; //! Retrieve collection name virtual const std::string &name() const = 0; //! Retrieve mutable collection name virtual std::string *mutable_name() = 0; //! Set collection name virtual void set_name(const std::string &) = 0; //! Retrieve collection uid, indicate a group of collections virtual const std::string &uid() const = 0; //! Retrieve mutable collection uid, indicate a group of collections virtual std::string *mutable_uid() = 0; //! Set collection uid virtual void set_uid(const std::string &) = 0; //! Retrieve collection uuid, unique field virtual const std::string &uuid() const = 0; //! Retrieve mutable collection uuid, unique field virtual std::string *mutable_uuid() = 0; //! Set collection uuid virtual void set_uuid(const std::string &) = 0; //! Retrieve forward columns, separated by character ',' virtual const std::string &forward_columns() const = 0; //! Retrieve mutable forward columns, separated by character ',' virtual std::string *mutable_forward_columns() = 0; //! Set forward columns virtual void set_forward_columns(const std::string &) = 0; //! Retrieve split document count virtual uint64_t max_docs_per_segment() const = 0; //! Set split document count virtual void set_max_docs_per_segment(uint64_t) = 0; //! Retrieve collection revision virtual uint32_t revision() const = 0; //! Set collection revision virtual void set_revision(uint32_t) = 0; //! Retrieve collection status virtual uint32_t status() const = 0; //! Set collection status virtual void set_status(uint32_t) = 0; //! Retrieve collection current flag virtual uint32_t current() const = 0; //! Set collection current flag virtual void set_current(uint32_t) = 0; //! Retrieve io_mode of collection virtual uint32_t io_mode() const = 0; //! Set io_mode of collection virtual void set_io_mode(uint32_t mode) = 0; }; /*! * Repository Object */ class DatabaseRepositoryObject { public: //! Destructor virtual ~DatabaseRepositoryObject() = default; public: //! Retrieve id virtual uint64_t id() const = 0; //! Set repository id virtual void set_id(uint64_t) = 0; //! Retrieve repository name virtual const std::string &name() const = 0; //! Retrieve mutable repository name virtual std::string *mutable_name() = 0; //! Set repository name virtual void set_name(const std::string &) = 0; //! Retrieve collection uid virtual const std::string &collection_uid() const = 0; //! Retrieve mutable collection uid virtual std::string *mutable_collection_uid() = 0; //! Set collection uid virtual void set_collection_uid(const std::string &) = 0; //! Retrieve collection uuid virtual const std::string &collection_uuid() const = 0; //! Retrieve mutable collection uuid virtual std::string *mutable_collection_uuid() = 0; //! Set collection uuid virtual void set_collection_uuid(const std::string &) = 0; //! Retrieve connection uri virtual const std::string &connection() const = 0; //! Retrieve mutable connection uri virtual std::string *mutable_connection() = 0; //! Set connection uri virtual void set_connection(const std::string &) = 0; //! Retrieve user name of connection virtual const std::string &user() const = 0; //! Retrieve mutable user name of connection virtual std::string *mutable_user() = 0; //! Set user name of connection virtual void set_user(const std::string &) = 0; //! Retrieve password of user virtual const std::string &password() const = 0; //! Retrieve mutable password of user virtual std::string *mutable_password() = 0; //! Set password of user virtual void set_password(const std::string &) = 0; //! Retrieve repository table name virtual const std::string &table() const = 0; //! Retrieve mutable repository table name virtual std::string *mutable_table() = 0; //! Set repository table name virtual void set_table(const std::string &) = 0; }; } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/sqlite/sqlite_meta_store.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Oct 2020 * \brief */ #include "sqlite_meta_store.h" #include #include #include "common/error_code.h" #include "common/logger.h" #include "meta/meta_store_factory.h" namespace proxima { namespace be { namespace meta { namespace sqlite { #define SQLITE_SQL_CODE(__VALUE__) SQLITE_SQL_HASH_##__VALUE__ #define SQLITE_SQL_STR(__VALUE__) SQLITE_SQL##__VALUE__ #define DEFINE_SQLITE_SQL(__VALUE__, __SQL__) \ constexpr const char *SQLITE_SQL##__VALUE__ = __SQL__; \ constexpr uint32_t SQLITE_SQL_HASH_##__VALUE__ = ailego::Fnv1::Hash32(__SQL__) // Global Sql Statements // Create Collection SQL DEFINE_SQLITE_SQL(kCreateCollection, "INSERT INTO " "collections(name, uid, uuid, forward_columns, " "max_docs_per_segment, revision, status, " "current, io_mode) " "VALUES(?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9);"); // Update Collection SQL DEFINE_SQLITE_SQL( kUpdateCollection, "UPDATE collections set name=?1, uid=?2, " "forward_columns=?3, max_docs_per_segment=?4, revision=?5, status=?6, " "current=?7, io_mode=?8 WHERE uuid=?9;"); // Delete Collection SQL DEFINE_SQLITE_SQL(kDeleteCollection, "DELETE FROM collections WHERE name=?1;"); // Delete Collection by uuid SQL DEFINE_SQLITE_SQL(kDeleteCollectionByUUID, "DELETE FROM collections WHERE uuid=?1;"); // List All Collection SQL DEFINE_SQLITE_SQL(kListAllCollections, "SELECT * from collections;"); // Create Column SQL DEFINE_SQLITE_SQL(kCreateColumn, "INSERT INTO " "columns(collection_uid, collection_uuid, name, uid, " "dimension, index_type, " "data_type, parameters) " "VALUES(?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8);"); // Delete Column SQL DEFINE_SQLITE_SQL(kDeleteColumn, "DELETE FROM columns WHERE collection_uid=?1;"); // Delete Column by uuid SQL DEFINE_SQLITE_SQL(kDeleteColumnByUUID, "DELETE FROM columns WHERE collection_uuid=?1;"); // List Column SQL DEFINE_SQLITE_SQL(kListColumn, "SELECT * from columns;"); // Create Repository SQL DEFINE_SQLITE_SQL(kCreateRepository, "INSERT INTO " "database_repositories (name, collection_uid, " "collection_uuid, table_name, connection, user, password) " "VALUES(?1, ?2, ?3, ?4, ?5, ?6, ?7);"); // Delete Repositories SQL DEFINE_SQLITE_SQL(kDeleteRepositoriesByUID, "DELETE FROM database_repositories WHERE collection_uid=?1;"); // Delete Repositories SQL DEFINE_SQLITE_SQL( kDeleteRepositoriesByUUID, "DELETE FROM database_repositories WHERE collection_uuid=?1;"); // List All Repositories SQL DEFINE_SQLITE_SQL(kListAllRepositories, "SELECT * from database_repositories;"); //! Constructor SQLiteMetaStore::SQLiteMetaStore() = default; //! Destructor SQLiteMetaStore::~SQLiteMetaStore() { do_cleanup(); } //! initialize metastore int SQLiteMetaStore::initialize(const ailego::Uri *uri) { ailego_assert_with(uri != nullptr, "Invalid uri param passed"); if (initialized_) { return 0; } if (!uri || !uri->is_valid()) { return PROXIMA_BE_ERROR_CODE(RuntimeError); } // check sqlite3 macro MULTITHREAD or SERIALIZED if (sqlite3_threadsafe() == 0) { LOG_ERROR( "Sqlite should be compiled with macro SQLITE_THREADSAFE = 1 or 2"); return PROXIMA_BE_ERROR_CODE(RuntimeError); } sqlite3 *handle = nullptr; database_ = uri->path(); int code = sqlite3_open_v2(database_.c_str(), &handle, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, nullptr); if (code != SQLITE_OK) { LOG_ERROR("Failed to open sqlite db. msg[%s]", sqlite3_errstr(code)); return PROXIMA_BE_ERROR_CODE(RuntimeError); } //! Synchronize Schema code = sync(handle); if (code == 0) { // init statements code = init_statements(database_); } if (code == 0) { initialized_ = true; } sqlite3_close(handle); return code; } int SQLiteMetaStore::cleanup() { return do_cleanup(); } #define SQLITE_METASTORE_INITIALIZE_CHECK() \ if (!initialized_) return PROXIMA_BE_ERROR_CODE(RuntimeError) //! Create the collection int SQLiteMetaStore::create_collection(const CollectionObject &collection) { SQLITE_METASTORE_INITIALIZE_CHECK(); StatementPtr &stmt = statement(SQLITE_SQL_CODE(kCreateCollection)); int code = stmt->exec( [&collection](sqlite3_stmt *s) -> int { sqlite3_bind_text(s, 1, collection.name().c_str(), collection.name().length(), nullptr); sqlite3_bind_text(s, 2, collection.uid().c_str(), collection.uid().length(), nullptr); sqlite3_bind_text(s, 3, collection.uuid().c_str(), collection.uuid().length(), nullptr); sqlite3_bind_text(s, 4, collection.forward_columns().c_str(), collection.forward_columns().length(), nullptr); sqlite3_bind_int64( s, 5, static_cast(collection.max_docs_per_segment())); sqlite3_bind_int(s, 6, collection.revision()); sqlite3_bind_int(s, 7, collection.status()); sqlite3_bind_int(s, 8, collection.current()); sqlite3_bind_int(s, 9, collection.io_mode()); return 0; }, nullptr); if (code != 0) { LOG_ERROR("Failed to create collection. code[%d]", code); } return code; } //! Update collection declaration int SQLiteMetaStore::update_collection(const CollectionObject &collection) { SQLITE_METASTORE_INITIALIZE_CHECK(); StatementPtr &stmt = statement(SQLITE_SQL_CODE(kUpdateCollection)); int code = stmt->exec( [&collection](sqlite3_stmt *s) -> int { sqlite3_bind_text(s, 1, collection.name().c_str(), collection.name().length(), nullptr); sqlite3_bind_text(s, 2, collection.uid().c_str(), collection.uid().length(), nullptr); sqlite3_bind_text(s, 3, collection.forward_columns().c_str(), collection.forward_columns().length(), nullptr); sqlite3_bind_int64( s, 4, static_cast(collection.max_docs_per_segment())); sqlite3_bind_int(s, 5, collection.revision()); sqlite3_bind_int(s, 6, collection.status()); sqlite3_bind_int(s, 7, collection.current()); sqlite3_bind_int(s, 8, collection.io_mode()); sqlite3_bind_text(s, 9, collection.uuid().c_str(), collection.uuid().length(), nullptr); return 0; }, nullptr); if (code != 0) { LOG_ERROR("Failed to update collection. code[%d]", code); } return code; } //! Delete collection int SQLiteMetaStore::delete_collection(const std::string &name) { SQLITE_METASTORE_INITIALIZE_CHECK(); StatementPtr &stmt = statement(SQLITE_SQL_CODE(kDeleteCollection)); int code = stmt->exec( [&name](sqlite3_stmt *s) -> int { sqlite3_bind_text(s, 1, name.c_str(), name.length(), nullptr); return 0; }, nullptr); if (code != 0) { LOG_ERROR("Failed to delete collection. code[%d]", code); } return code; } int SQLiteMetaStore::delete_collection_by_uuid(const std::string &uuid) { SQLITE_METASTORE_INITIALIZE_CHECK(); StatementPtr &stmt = statement(SQLITE_SQL_CODE(kDeleteCollectionByUUID)); int code = stmt->exec( [&uuid](sqlite3_stmt *s) -> int { sqlite3_bind_text(s, 1, uuid.c_str(), uuid.length(), nullptr); return 0; }, nullptr); if (code != 0) { LOG_ERROR("Failed to delete collection. code[%d]", code); } return code; } namespace { static std::function BuildFetcher( CollectionObject *collection_ptr) { return [=](sqlite3_stmt *s) -> int { collection_ptr->set_id(sqlite3_column_int64(s, 0)); collection_ptr->mutable_name()->assign( reinterpret_cast(sqlite3_column_text(s, 1))); collection_ptr->mutable_uid()->assign( reinterpret_cast(sqlite3_column_text(s, 2))); collection_ptr->mutable_uuid()->assign( reinterpret_cast(sqlite3_column_text(s, 3))); collection_ptr->mutable_forward_columns()->assign( reinterpret_cast(sqlite3_column_text(s, 4))); collection_ptr->set_max_docs_per_segment(sqlite3_column_int64(s, 5)); collection_ptr->set_revision(sqlite3_column_int(s, 6)); collection_ptr->set_status(sqlite3_column_int(s, 7)); collection_ptr->set_current(sqlite3_column_int(s, 8)); collection_ptr->set_io_mode(sqlite3_column_int(s, 9)); return 0; }; } static std::function BuildFetcher(ColumnObject *column) { return [=](sqlite3_stmt *s) -> int { column->set_id(sqlite3_column_int64(s, 0)); column->mutable_collection_uid()->assign( reinterpret_cast(sqlite3_column_text(s, 1))); column->mutable_collection_uuid()->assign( reinterpret_cast(sqlite3_column_text(s, 2))); column->mutable_name()->assign( reinterpret_cast(sqlite3_column_text(s, 3))); column->mutable_uid()->assign( reinterpret_cast(sqlite3_column_text(s, 4))); column->set_dimension(sqlite3_column_int(s, 5)); column->set_index_type(sqlite3_column_int(s, 6)); column->set_data_type(sqlite3_column_int(s, 7)); column->mutable_parameters()->assign( reinterpret_cast(sqlite3_column_text(s, 8))); return 0; }; } static std::function BuildFetcher( DatabaseRepositoryObject *repository) { return [=](sqlite3_stmt *s) -> int { repository->set_id(sqlite3_column_int64(s, 0)); repository->mutable_name()->assign( reinterpret_cast(sqlite3_column_text(s, 1))); repository->mutable_collection_uid()->assign( reinterpret_cast(sqlite3_column_text(s, 2))); repository->mutable_collection_uuid()->assign( reinterpret_cast(sqlite3_column_text(s, 3))); repository->mutable_table()->assign( reinterpret_cast(sqlite3_column_text(s, 4))); repository->mutable_connection()->assign( reinterpret_cast(sqlite3_column_text(s, 5))); repository->mutable_user()->assign( reinterpret_cast(sqlite3_column_text(s, 6))); repository->mutable_password()->assign( reinterpret_cast(sqlite3_column_text(s, 7))); return 0; }; } } // namespace //! Retrieve all collections int SQLiteMetaStore::list_collections(CollectionAllocator allocator) const { SQLITE_METASTORE_INITIALIZE_CHECK(); StatementPtr &stmt = statement(SQLITE_SQL_CODE(kListAllCollections)); int code = stmt->exec(nullptr, [&allocator](sqlite3_stmt *s) -> int { int fetch_code = BuildFetcher(allocator())(s); if (fetch_code != 0) { LOG_ERROR("Failed to fetch collection from sqlite statement"); } return fetch_code; }); return code; } //! Create column int SQLiteMetaStore::create_column(const ColumnObject &column) { SQLITE_METASTORE_INITIALIZE_CHECK(); StatementPtr &stmt = statement(SQLITE_SQL_CODE(kCreateColumn)); int code = stmt->exec( [&column](sqlite3_stmt *s) -> int { sqlite3_bind_text(s, 1, column.collection_uid().c_str(), column.collection_uid().length(), nullptr); sqlite3_bind_text(s, 2, column.collection_uuid().c_str(), column.collection_uuid().length(), nullptr); sqlite3_bind_text(s, 3, column.name().c_str(), column.name().length(), nullptr); sqlite3_bind_text(s, 4, column.uid().c_str(), column.uid().length(), nullptr); sqlite3_bind_int(s, 5, column.dimension()); sqlite3_bind_int(s, 6, column.index_type()); sqlite3_bind_int(s, 7, column.data_type()); sqlite3_bind_text(s, 8, column.parameters().c_str(), column.parameters().length(), nullptr); return 0; }, nullptr); if (code != 0) { LOG_ERROR("Failed to create column. code[%d]", code); } return code; } //! Delete column int SQLiteMetaStore::delete_columns_by_uid(const std::string &uid) { SQLITE_METASTORE_INITIALIZE_CHECK(); StatementPtr &stmt = statement(SQLITE_SQL_CODE(kDeleteColumn)); int code = stmt->exec( [&uid](sqlite3_stmt *s) -> int { sqlite3_bind_text(s, 1, uid.c_str(), uid.length(), nullptr); return 0; }, nullptr); if (code != 0) { LOG_ERROR("Failed to delete column. code[%d]", code); } return code; } //! Delete column int SQLiteMetaStore::delete_columns_by_uuid(const std::string &uuid) { SQLITE_METASTORE_INITIALIZE_CHECK(); StatementPtr &stmt = statement(SQLITE_SQL_CODE(kDeleteColumnByUUID)); int code = stmt->exec( [&uuid](sqlite3_stmt *s) -> int { sqlite3_bind_text(s, 1, uuid.c_str(), uuid.length(), nullptr); return 0; }, nullptr); if (code != 0) { LOG_ERROR("Failed to delete column. code[%d]", code); } return code; } //! Retrieve columns int SQLiteMetaStore::list_columns(ColumnAllocator allocator) const { SQLITE_METASTORE_INITIALIZE_CHECK(); StatementPtr &stmt = statement(SQLITE_SQL_CODE(kListColumn)); int code = stmt->exec(nullptr, [&allocator](sqlite3_stmt *s) -> int { int fetch_code = BuildFetcher(allocator())(s); if (fetch_code != 0) { LOG_ERROR("Failed to fetch column from sqlite statement"); } return fetch_code; }); return code; } //! Create repository int SQLiteMetaStore::create_repository( const DatabaseRepositoryObject &repository) { SQLITE_METASTORE_INITIALIZE_CHECK(); StatementPtr &stmt = statement(SQLITE_SQL_CODE(kCreateRepository)); int code = stmt->exec( [&repository](sqlite3_stmt *s) -> int { sqlite3_bind_text(s, 1, repository.name().c_str(), repository.name().length(), nullptr); sqlite3_bind_text(s, 2, repository.collection_uid().c_str(), repository.collection_uid().length(), nullptr); sqlite3_bind_text(s, 3, repository.collection_uuid().c_str(), repository.collection_uuid().length(), nullptr); sqlite3_bind_text(s, 4, repository.table().c_str(), repository.table().length(), nullptr); sqlite3_bind_text(s, 5, repository.connection().c_str(), repository.connection().length(), nullptr); sqlite3_bind_text(s, 6, repository.user().c_str(), repository.user().length(), nullptr); sqlite3_bind_text(s, 7, repository.password().c_str(), repository.password().length(), nullptr); return 0; }, nullptr); if (code != 0) { LOG_ERROR("Failed to create repository. code[%d]", code); } return code; } //! Delete repositories int SQLiteMetaStore::delete_repositories_by_uid(const std::string &uid) { SQLITE_METASTORE_INITIALIZE_CHECK(); StatementPtr &stmt = statement(SQLITE_SQL_CODE(kDeleteRepositoriesByUID)); int code = stmt->exec( [&uid](sqlite3_stmt *s) -> int { sqlite3_bind_text(s, 1, uid.c_str(), uid.length(), nullptr); return 0; }, nullptr); if (code != 0) { LOG_ERROR("Failed to delete repository. code[%d]", code); } return code; } //! Delete repositories int SQLiteMetaStore::delete_repositories_by_uuid(const std::string &uuid) { SQLITE_METASTORE_INITIALIZE_CHECK(); StatementPtr &stmt = statement(SQLITE_SQL_CODE(kDeleteRepositoriesByUUID)); int code = stmt->exec( [&uuid](sqlite3_stmt *s) -> int { sqlite3_bind_text(s, 1, uuid.c_str(), uuid.length(), nullptr); return 0; }, nullptr); if (code != 0) { LOG_ERROR("Failed to delete repository. code[%d]", code); } return code; } //! Retrieve all repositories int SQLiteMetaStore::list_repositories( DatabaseRepositoryAllocator allocator) const { SQLITE_METASTORE_INITIALIZE_CHECK(); StatementPtr &stmt = statement(SQLITE_SQL_CODE(kListAllRepositories)); int code = stmt->exec(nullptr, [&allocator](sqlite3_stmt *s) -> int { int fetch_code = BuildFetcher(allocator())(s); if (fetch_code != 0) { LOG_ERROR("Failed to fetch repository from sqlite statement"); } return fetch_code; }); return code; } //! Flush all changes to storage int SQLiteMetaStore::flush() const { return 0; } int SQLiteMetaStore::do_cleanup() { for (auto &stmt : statements_) { stmt.second->cleanup(); } statements_.clear(); initialized_ = false; return 0; } int SQLiteMetaStore::sync(sqlite3 *handle) { static const char *kMetaTable = "CREATE TABLE IF NOT EXISTS columns ( \n" " id INTEGER PRIMARY KEY AUTOINCREMENT, \n" " collection_uid TEXT NOT NULL, \n" " collection_uuid TEXT NOT NULL, \n" " name TEXT NOT NULL, \n" " uid TEXT NOT NULL, \n" " dimension INTEGER, \n" " index_type INTEGER, \n" " data_type INTEGER, \n" " parameters TEXT DEFAULT '' \n" ");" "CREATE TABLE IF NOT EXISTS collections (" " id INTEGER PRIMARY KEY AUTOINCREMENT, \n" " name TEXT NOT NULL, \n" " uid TEXT NOT NULL, \n" " uuid TEXT NOT NULL UNIQUE, \n" " forward_columns TEXT NOT NULL, \n" " max_docs_per_segment INTEGER, \n" " revision INTEGER, \n" " status INTEGER, \n" " current INTEGER, \n" " io_mode INTEGER\n" ");" "CREATE TABLE IF NOT EXISTS database_repositories (" " id INTEGER PRIMARY KEY AUTOINCREMENT, \n" " name TEXT NOT NULL, \n" " collection_uid TEXT NOT NULL, \n" " collection_uuid TEXT NOT NULL, \n" " table_name TEXT NOT NULL, \n" " connection TEXT NOT NULL, \n" " user TEXT NOT NULL, \n" " password TEXT NOT NULL \n" ");"; int code = sqlite3_exec(handle, kMetaTable, nullptr, nullptr, nullptr); if (code != SQLITE_OK) { LOG_ERROR("Failed to create table. msg[%s]", sqlite3_errstr(code)); return PROXIMA_BE_ERROR_CODE(RuntimeError); } return 0; } #define PREPARE_AND_CACHE_SQL(K, DB) \ { \ int code = put(SQLITE_SQL_CODE(K), \ std::make_shared(DB, SQLITE_SQL_STR(K))); \ if (code != 0) { \ code = PROXIMA_BE_ERROR_CODE(RuntimeError); \ LOG_ERROR("Failed to prepare sql."); \ return code; \ } \ } int SQLiteMetaStore::init_statements(const std::string &database) { PREPARE_AND_CACHE_SQL(kCreateCollection, database) PREPARE_AND_CACHE_SQL(kUpdateCollection, database) PREPARE_AND_CACHE_SQL(kDeleteCollection, database) PREPARE_AND_CACHE_SQL(kDeleteCollectionByUUID, database) PREPARE_AND_CACHE_SQL(kListAllCollections, database) PREPARE_AND_CACHE_SQL(kCreateColumn, database) PREPARE_AND_CACHE_SQL(kDeleteColumn, database) PREPARE_AND_CACHE_SQL(kDeleteColumnByUUID, database) PREPARE_AND_CACHE_SQL(kListColumn, database) PREPARE_AND_CACHE_SQL(kCreateRepository, database) PREPARE_AND_CACHE_SQL(kDeleteRepositoriesByUID, database) PREPARE_AND_CACHE_SQL(kDeleteRepositoriesByUUID, database) PREPARE_AND_CACHE_SQL(kListAllRepositories, database) return 0; } #undef PREPARE_AND_CACHE_SQL StatementPtr &SQLiteMetaStore::statement(uint32_t index) const { return statements_[index]; } int SQLiteMetaStore::put(uint32_t hash, const StatementPtr &stmt) { if (stmt->initialize() == 0) { statements_[hash] = stmt; return 0; } LOG_ERROR("Failed to initialize Statement"); return PROXIMA_BE_ERROR_CODE(RuntimeError); } #undef SQLITE_METASTORE_INITIALIZE_CHECK #undef DEFINE_SQLITE_SQL #undef SQLITE_SQL_STR #undef SQLITE_SQL_CODE META_FACTORY_REGISTER_INSTANCE_ALIAS(sqlite, SQLiteMetaStore); } // namespace sqlite } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/sqlite/sqlite_meta_store.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Oct 2020 * \brief */ #pragma once #include #include #include "meta/meta_store.h" #include "sqlite_statement.h" namespace proxima { namespace be { namespace meta { namespace sqlite { /*! * SQLiteMateStore */ class SQLiteMetaStore : public MetaStore { public: //! Constructor SQLiteMetaStore(); //! Destructor ~SQLiteMetaStore() override; public: //! initialize metastore int initialize(const ailego::Uri *uri) override; //! cleanup int cleanup() override; //! Create the collection int create_collection(const CollectionObject &collection) override; //! Update collection declaration int update_collection(const CollectionObject &collection) override; //! Delete collection int delete_collection(const std::string &name) override; //! Delete collection by uuid int delete_collection_by_uuid(const std::string &uuid) override; //! Retrieve all collections int list_collections(CollectionAllocator allocator) const override; //! Create column int create_column(const ColumnObject &column) override; //! Delete columns int delete_columns_by_uid(const std::string &uid) override; //! Delete columns int delete_columns_by_uuid(const std::string &uuid) override; //! Retrieve all collections int list_columns(ColumnAllocator allocator) const override; //! Create repository int create_repository(const DatabaseRepositoryObject &repository) override; //! Delete repositories int delete_repositories_by_uid(const std::string &uid) override; //! Delete repositories int delete_repositories_by_uuid(const std::string &uuid) override; //! Retrieve all repositories int list_repositories(DatabaseRepositoryAllocator allocator) const override; //! Flush all changes to storage int flush() const override; private: //! Cleanup int do_cleanup(); //! Sync tables to database int sync(sqlite3 *handle); //! Initialize all the statements int init_statements(const std::string &database); //! Get statement StatementPtr &statement(uint32_t index) const; //! Put statement into map int put(uint32_t hash, const StatementPtr &stmt); private: //! Initialized flag std::atomic_bool initialized_{false}; //! DB storage path std::string database_{}; //! Statements mutable std::unordered_map statements_{}; }; } // namespace sqlite } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/sqlite/sqlite_statement.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "sqlite_statement.h" #include "common/error_code.h" #include "common/logger.h" namespace proxima { namespace be { namespace meta { namespace sqlite { Statement::Statement() = default; Statement::Statement(std::string database, const char *sql) : database_(std::move(database)), sql_(sql) {} Statement::Statement(std::string database, std::string sql) : database_(std::move(database)), sql_(std::move(sql)) {} Statement::Statement(Statement &&stmt) noexcept : database_(std::move(stmt.database_)), connection_(stmt.connection_), sql_(std::move(stmt.sql_)), statement_(stmt.statement_) { stmt.connection_ = nullptr; stmt.statement_ = nullptr; } Statement::~Statement() { cleanup(); } int Statement::initialize() { if (connection_ != nullptr && statement_ != nullptr) { return 0; } if (connection_ != nullptr || statement_ != nullptr) { LOG_ERROR( "Statement have been initialized partially, invoke cleanup, before " "initialize"); return PROXIMA_BE_ERROR_CODE(RuntimeError); } int code = sqlite3_open_v2( database_.c_str(), &connection_, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_NOMUTEX, nullptr); if (code == SQLITE_OK) { code = compile_sql(); } else { LOG_ERROR("Failed to open sqlite db, msg[%s]", sqlite3_errstr(code)); } if (code != SQLITE_OK) { do_cleanup(); } return code; } int Statement::cleanup() { return do_cleanup(); } int Statement::exec(const std::function &binder, const std::function &fetcher, uint32_t retry) { if (!statement_ || reset() != SQLITE_OK) { return PROXIMA_BE_ERROR_CODE(RuntimeError); } // Bind values int code = binder ? binder(statement_) : 0; if (code != 0) { LOG_ERROR("Failed to bind values to statement, code[%d]", code); } else { do { code = sqlite3_step(statement_); switch (code) { case SQLITE_ROW: // have result if (fetcher && fetcher(statement_) != 0) { // Can't fetch the result, break loop code = PROXIMA_BE_ERROR_CODE(RuntimeError); } break; case SQLITE_BUSY: // try again if (retry-- == 0) { code = PROXIMA_BE_ERROR_CODE(RuntimeError); } break; case SQLITE_DONE: // finished case SQLITE_ERROR: case SQLITE_MISUSE: default: break; } } while (code == SQLITE_ROW || code == SQLITE_BUSY); if (code == SQLITE_DONE) { // return 0 if and only if code == SQLITE_DONE code = 0; } } if (reset() != SQLITE_OK) { // Do not return error code if reset failed, block following write requests // to sqlite, keep proxima be alive for QueryService and IndexAgent. LOG_ERROR( "Unexpected reset statements failed, contact administrator for " "help."); } return code; } int Statement::prepare_sql(const std::string &sql) { if (statement_ != nullptr) { int code = sqlite3_finalize(statement_); if (code != SQLITE_OK) { LOG_ERROR("Failed to finalize statement. msg[%s]", sqlite3_errstr(code)); } // Ignore return code of sqlite3_finalize, just reset statement_ to nullptr statement_ = nullptr; } sql_ = sql; return compile_sql(); } int Statement::reset() { int code = sqlite3_reset(statement_); // There are nothing we can do when reset failed. all write requests to // sqlite will be failed if (code != SQLITE_OK) { code = sqlite3_clear_bindings(statement_); if (code != SQLITE_OK) { const char *sql = sqlite3_expanded_sql(statement_); LOG_ERROR("Can't reset statement. sql[%s] code[%d] what[%s]", sql, code, sqlite3_errstr(code)); sqlite3_free(const_cast(sql)); } } return code; } int Statement::do_cleanup() { int code = 0; if (statement_ != nullptr) { code = sqlite3_finalize(statement_); if (code != SQLITE_OK) { LOG_ERROR("Failed to finalize statement. msg[%s]", sqlite3_errstr(code)); } // Ignore error code, just reset statement_ to nullptr (Memory Leak?) statement_ = nullptr; } if (connection_ != nullptr) { code = sqlite3_close_v2(connection_); if (code != SQLITE_OK) { // Fatal Error, can't ignore this error, // once we set connection to nullptr, // cause to another unknown issue. LOG_ERROR( "Failed to close connection with sqlite database. code[%d], what[%s]", code, sqlite3_errstr(code)); } else { connection_ = nullptr; } } return code; } int Statement::compile_sql() { int code = sqlite3_prepare_v2(connection_, sql_.c_str(), sql_.length(), &statement_, nullptr); if (code == SQLITE_OK) { LOG_DEBUG("Prepare statement succeeded"); } else { LOG_ERROR("Failed to prepare statement. sql[%s], msg[%s]", sql_.c_str(), sqlite3_errstr(code)); code = PROXIMA_BE_ERROR_CODE(RuntimeError); } return code; } } // namespace sqlite } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/meta/sqlite/sqlite_statement.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include #include #include #include namespace proxima { namespace be { namespace meta { namespace sqlite { //! Predefine class class Statement; //! Alias for StatementPtr using StatementPtr = std::shared_ptr; /*! * Statement object */ class Statement { public: //! Constructors Statement(); Statement(std::string database, const char *sql); Statement(std::string database, std::string sql); Statement(Statement &&stmt) noexcept; Statement(const Statement &stmt) = delete; //! Destructor ~Statement(); public: //! Initialize Statement, 0 for success, otherwise failed int initialize(); //! Cleanup statement, 0 for success, otherwise failed int cleanup(); //! Execute statement, 0 for success, otherwise failed //! @param binder: bind the params to statements //! @param fetcher: fetch the records returned from sqlite_step //! @param retry: the times retry exec sql int exec(const std::function &binder = nullptr, const std::function &fetcher = nullptr, uint32_t retry = 1); //! Prepare sql int prepare_sql(const std::string &sql); private: //! Reset the values banded to statement, 0 for success, otherwise failed int reset(); //! cleanup int do_cleanup(); //! compile sql int compile_sql(); private: //! the path of databases std::string database_{}; //! database connection sqlite3 *connection_{nullptr}; //! sql std::string sql_{}; //! statement of sqlite sqlite3_stmt *statement_{nullptr}; }; } // namespace sqlite } // namespace meta } // namespace be } // namespace proxima ================================================ FILE: src/metrics/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author dianzhang.cdz ## \date Dec 2020 ## \brief Detail cmake build script for repository ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) # proxima_be_metrics library cc_library( NAME proxima_be_metrics STATIC STRICT ALWAYS_LINK SRCS *.cc LIBS proxima_be_proto proxima brpc INCS . .. VERSION "${PROXIMA_BE_VERSION}" ) ================================================ FILE: src/metrics/bvar_metrics_collector.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author jiliang.ljl * \date Feb 2021 * \brief bvar metrics header */ #include "metrics/bvar_metrics_collector.h" #include namespace proxima { namespace be { namespace metrics { int BvarMetricsCollector::init( const ::proxima::be::proto::MetricsConfig & /*config*/) { auto query_type_enum_descriptor = proto::QueryRequest_QueryType_descriptor(); query_type_counter_.resize(proto::QueryRequest_QueryType_QueryType_ARRAYSIZE); query_type_counter_second_.resize( proto::QueryRequest_QueryType_QueryType_ARRAYSIZE); for (int i = proto::QueryRequest_QueryType_QueryType_MIN; i <= proto::QueryRequest_QueryType_QueryType_MAX; i++) { if (proto::QueryRequest_QueryType_IsValid(i)) { query_type_counter_[i].reset(new LongAdder{}); query_type_counter_second_[i].reset(new WindowedLongAdder{ MODULE_QUERY, ailego::StringHelper::Concat( "type", query_type_enum_descriptor->FindValueByNumber(i)->name(), "_count_second"), query_type_counter_[i].get(), 1}); } } query_latency_by_protocol_.resize(kProtocolTypeSize); get_document_latency_by_protocol_.resize(kProtocolTypeSize); write_latency_by_protocol_.resize(kProtocolTypeSize); for (size_t i = 0; i < kProtocolTypeSize; i++) { query_latency_by_protocol_[i].reset(new LatencyRecorder{ MODULE_QUERY, ailego::StringHelper::Concat(kProtocolName[i], "_request")}); get_document_latency_by_protocol_[i].reset(new LatencyRecorder{ MODULE_GET_DOCUMENT, ailego::StringHelper::Concat(kProtocolName[i], "_request")}); write_latency_by_protocol_[i].reset(new LatencyRecorder{ MODULE_WRITE, ailego::StringHelper::Concat(kProtocolName[i], "_request")}); } auto operation_type_enum_descriptor = proto::OperationType_descriptor(); write_doc_count_by_operation_type_.resize(proto::OperationType_ARRAYSIZE); write_doc_count_by_operation_type_second_.resize( proto::OperationType_ARRAYSIZE); for (int i = proto::OperationType_MIN; i <= proto::OperationType_MAX; i++) { if (proto::OperationType_IsValid(i)) { write_doc_count_by_operation_type_[i].reset(new LongAdder{}); write_doc_count_by_operation_type_second_[i].reset(new WindowedLongAdder{ MODULE_WRITE, ailego::StringHelper::Concat( operation_type_enum_descriptor->FindValueByNumber(i)->name(), "_count_second"), write_doc_count_by_operation_type_[i].get(), 1}); } } return 0; } void BvarMetricsCollector::report_query_count_by_type( proto::QueryRequest::QueryType query_type, uint32_t batch) { if (query_type < 0 || query_type >= static_cast(query_type_counter_.size()) || !query_type_counter_[query_type]) { return; } (*query_type_counter_[query_type]) << batch; } void BvarMetricsCollector::report_write_doc_count_by_operation_type( proto::OperationType type, size_t doc_count) { if (type < 0 || type >= static_cast(write_doc_count_by_operation_type_.size()) || !write_doc_count_by_operation_type_[type]) { return; } (*write_doc_count_by_operation_type_[type]) << doc_count; } METRICS_REGISTER(bvar, BvarMetricsCollector); } // namespace metrics } // namespace be } // namespace proxima ================================================ FILE: src/metrics/bvar_metrics_collector.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author jiliang.ljl * \date Feb 2021 * \brief bvar metrics header */ #pragma once #include #include #include #include "metrics/metrics_collector.h" namespace proxima { namespace be { namespace metrics { //! Brpc bvar base Metrics class BvarMetricsCollector : public MetricsCollector { public: int init(const proxima::be::proto::MetricsConfig &config) override; ~BvarMetricsCollector() override = default; void report_query_rt(ProtocolType type, uint32_t batch, uint64_t us) override { for (size_t i = 0; i < batch; i++) { *(query_latency_by_protocol_[static_cast(type)]) << us; } } void report_query_success_count(uint32_t batch) override { query_success_count_ << batch; } void report_query_failure_count(uint32_t batch) override { query_failure_count_ << batch; } void report_query_batch(uint32_t batch) override { query_batch_ << batch; } void report_query_count_by_type(proto::QueryRequest::QueryType query_type, uint32_t batch) override; void report_get_document_rt(ProtocolType type, uint64_t us) override { *get_document_latency_by_protocol_[static_cast(type)] << us; } void report_get_document_success_count() override { get_document_success_count_ << 1; } void report_get_document_failure_count() override { get_document_failure_count_ << 1; } void report_write_rt(ProtocolType type, uint32_t batch, uint64_t us) override { for (uint32_t i = 0; i < batch; i++) { *write_latency_by_protocol_[static_cast(type)] << us; } } void report_write_success_count(uint32_t batch) override { write_success_count_ << batch; } void report_write_failure_count(uint32_t batch) override { write_failure_count_ << batch; } void report_write_doc_count_by_operation_type(proto::OperationType type, size_t doc_count) override; void report_write_batch(uint32_t batch) override { write_batch_ << batch; } private: using IntRecorder = bvar::IntRecorder; using LatencyRecorder = bvar::LatencyRecorder; using LatencyRecorderUPtr = std::unique_ptr; using LongAdder = bvar::Adder; using LongAdderUPtr = std::unique_ptr; using WindowedLongAdder = bvar::Window; using WindowedLongAdderUPtr = std::unique_ptr; using WindowedIntRecorder = bvar::Window; static constexpr const char *MODULE_QUERY = "se_query"; static constexpr const char *MODULE_GET_DOCUMENT = "se_get_document"; static constexpr const char *MODULE_WRITE = "se_write"; //! query metrics // query single vector request and rt std::vector query_latency_by_protocol_; // query success request count LongAdder query_success_count_; WindowedLongAdder query_success_count_second_{ MODULE_QUERY, "success_count_second", &query_success_count_, 1}; // query failure request count LongAdder query_failure_count_; WindowedLongAdder query_failure_count_second_{ MODULE_QUERY, "failure_count_second", &query_failure_count_, 1}; // average query batch per seconds IntRecorder query_batch_; WindowedIntRecorder query_batch_second_{MODULE_QUERY, "batch_second", &query_batch_, 1}; // query count per query_type std::vector> query_type_counter_; std::vector> query_type_counter_second_; //! get document metrics // get document request and rt std::vector get_document_latency_by_protocol_; // get document success request count LongAdder get_document_success_count_; WindowedLongAdder get_document_success_count_second_{ MODULE_GET_DOCUMENT, "success_count_second", &get_document_success_count_, 1}; // get_document failure request count LongAdder get_document_failure_count_; WindowedLongAdder get_document_failure_count_second_{ MODULE_GET_DOCUMENT, "failure_count_second", &get_document_failure_count_, 1}; //! write metrics // write request and rt std::vector write_latency_by_protocol_; // write success request count LongAdder write_success_count_; WindowedLongAdder write_success_count_second_{ MODULE_WRITE, "success_count_second", &write_success_count_, 1}; // write failure request count LongAdder write_failure_count_; WindowedLongAdder write_failure_count_second_{ MODULE_WRITE, "failure_count_second", &write_failure_count_, 1}; // write document count by operation type std::vector write_doc_count_by_operation_type_; std::vector write_doc_count_by_operation_type_second_; // average write batch per seconds IntRecorder write_batch_; WindowedIntRecorder write_batch_second_{MODULE_WRITE, "batch_second", &write_batch_, 1}; }; } // namespace metrics } // namespace be } // namespace proxima ================================================ FILE: src/metrics/metrics.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Jiliang.ljl * \date Mar 2021 * \brief Metrics interface. */ #include "proto/proxima_be.pb.h" #include "metrics_collector.h" namespace proxima { namespace be { namespace metrics { //! QueryMetrics RAII-style reporter class QueryMetrics { public: /** * Constructor * * @param type * @param ret REQUIRED to be accessible when QueryMetrics destructs. */ QueryMetrics(ProtocolType type, const int *ret) : type_(type), ret_(ret) {} //! Update metrics count with request. //! request is not saved and can destruct early than QueryMetrics void update_with_query_request(const proto::QueryRequest &request) { batch_ = GetBatch(request); query_type_ = request.query_type(); } ~QueryMetrics() { if (batch_ <= 0) { return; } auto rt_us = timer_.micro_seconds(); auto single_rt_us = rt_us / batch_; auto &metrics_obj = MetricsCollector::GetInstance(); metrics_obj.report_query_rt(type_, batch_, single_rt_us); metrics_obj.report_query_count_by_type(query_type_, batch_); metrics_obj.report_query_batch(batch_); if (*ret_ == 0) { metrics_obj.report_query_success_count(batch_); } else { metrics_obj.report_query_failure_count(batch_); } } private: static size_t GetBatch(const proto::QueryRequest &request) { switch (request.query_type()) { case proto::QueryRequest_QueryType_QT_KNN: return request.knn_param().batch_count(); default: // to fix warning enum not handled in switch {} } LOG_ERROR("Unexpected query type:%d", static_cast(request.query_type())); return 0; }; private: ProtocolType type_{ProtocolType::kGrpc}; const int *ret_{nullptr}; size_t batch_{0}; proto::QueryRequest_QueryType query_type_{ proto::QueryRequest_QueryType_QT_KNN}; ailego::ElapsedTime timer_; }; //! GetDocumentMetrics RAII-style reporter class GetDocumentMetrics { public: /** * Constructor * * @param type * @param ret REQUIRED to be accessible when QueryMetrics destructs. */ GetDocumentMetrics(ProtocolType type, const int *ret) : type_(type), ret_(ret) {} ~GetDocumentMetrics() { auto rt_us = timer_.micro_seconds(); auto &metrics_obj = MetricsCollector::GetInstance(); metrics_obj.report_get_document_rt(type_, rt_us); if (*ret_ == 0) { metrics_obj.report_get_document_success_count(); } else { metrics_obj.report_get_document_failure_count(); } } private: ProtocolType type_{ProtocolType::kGrpc}; const int *ret_{nullptr}; ailego::ElapsedTime timer_; }; //! WriteMetrics RAII-style reporter class WriteMetrics { public: /** * Constructor * * @param type * @param ret REQUIRED to be accessible when QueryMetrics destructs. */ WriteMetrics(ProtocolType type, const int *ret) : type_(type), ret_(ret) {} ~WriteMetrics() { if (!batch_) { return; } auto rt_us = timer_.micro_seconds() / batch_; auto &metrics_obj = MetricsCollector::GetInstance(); metrics_obj.report_write_rt(type_, batch_, rt_us); if (insert_doc_count_ > 0) { metrics_obj.report_write_doc_count_by_operation_type(proto::OP_INSERT, insert_doc_count_); } if (update_doc_count_ > 0) { metrics_obj.report_write_doc_count_by_operation_type(proto::OP_UPDATE, update_doc_count_); } if (delete_doc_count_ > 0) { metrics_obj.report_write_doc_count_by_operation_type(proto::OP_DELETE, delete_doc_count_); } metrics_obj.report_write_batch(batch_); if (*ret_ == 0) { metrics_obj.report_write_success_count(batch_); } else { metrics_obj.report_write_failure_count(batch_); } } void update_with_write_request(const proto::WriteRequest &req) { size_t insert_count = 0; size_t update_count = 0; size_t delete_count = 0; for (const auto &row : req.rows()) { switch (row.operation_type()) { case proto::OP_INSERT: insert_count++; break; case proto::OP_UPDATE: update_count++; break; case proto::OP_DELETE: delete_count++; break; default: LOG_ERROR("Unknown operation type:%d", static_cast(row.operation_type())); } } insert_doc_count_ = insert_count; update_doc_count_ = update_count; delete_doc_count_ = delete_count; batch_ = req.rows_size(); } private: ProtocolType type_{ProtocolType::kGrpc}; const int *ret_{nullptr}; ailego::ElapsedTime timer_; size_t insert_doc_count_{0}; size_t update_doc_count_{0}; size_t delete_doc_count_{0}; size_t batch_{0}; }; } // namespace metrics } // namespace be } // namespace proxima ================================================ FILE: src/metrics/metrics_collector.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author jiliang.ljl * \date Feb 2021 * \brief implementation of metrics collector */ #include "metrics/metrics_collector.h" #include "common/logger.h" namespace proxima { namespace be { namespace metrics { std::string MetricsCollector::metrics_name_; static MetricsCollector &CreateMetrics(const std::string &name) { if (name.empty()) { static MetricsCollector empty_metrics; return empty_metrics; } static auto obj = ailego::Factory::MakeShared(name.c_str()); if (obj) { LOG_INFO("Create Metrics with name:%s", name.c_str()); return *obj; } else { std::string registered; for (const auto &s : ailego::Factory::Classes()) { registered += s; registered += ", "; } LOG_FATAL("Cannot create Metrics with name=%s, registered names=%s", name.c_str(), registered.c_str()); // In case LOG(FATAL) only print log and do not abort process static MetricsCollector empty_metrics; return empty_metrics; } } MetricsCollector &MetricsCollector::GetInstance() { static MetricsCollector &obj = CreateMetrics(metrics_name_); return obj; } int MetricsCollector::CreateAndInitMetrics( const proxima::be::proto::MetricsConfig &config) { metrics_name_ = config.name(); auto &obj = GetInstance(); int ret = 0; ret = obj.init(config); if (ret != 0) { LOG_FATAL("init metrics failed, config=%s", config.DebugString().c_str()); return ret; } return ret; } METRICS_REGISTER(default, MetricsCollector); } // namespace metrics } // namespace be } // namespace proxima ================================================ FILE: src/metrics/metrics_collector.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author jiliang.ljl * \date Feb 2021 * \brief interface of metrics collector */ #pragma once #include #include #include #include "proto/config.pb.h" #include "proto/proxima_be.pb.h" namespace proxima { namespace be { namespace metrics { enum class ProtocolType { kHttp = 0, kGrpc, kProtocolSize }; constexpr const size_t kProtocolTypeSize = static_cast(ProtocolType::kProtocolSize); constexpr const char *kProtocolName[] = {"http", "grpc"}; //! Metrics Collector interface class MetricsCollector { public: static int CreateAndInitMetrics( const proxima::be::proto::MetricsConfig &config); static MetricsCollector &GetInstance(); virtual int init(const proxima::be::proto::MetricsConfig & /*config*/) { return 0; } virtual ~MetricsCollector() = default; //! report rt per vector virtual void report_query_rt(ProtocolType /*type*/, uint32_t /*batch*/, uint64_t /*us*/) {} virtual void report_query_success_count(uint32_t /*batch*/) {} virtual void report_query_failure_count(uint32_t /*batch*/) {} virtual void report_query_batch(uint32_t /*batch*/) {} virtual void report_query_count_by_type( proto::QueryRequest::QueryType /*query_type*/, uint32_t /*batch*/) {} virtual void report_get_document_rt(ProtocolType /*type*/, uint64_t /*us*/) {} virtual void report_get_document_success_count() {} virtual void report_get_document_failure_count() {} virtual void report_write_rt(ProtocolType /*type*/, uint32_t /*batch*/, uint64_t /*us*/) {} virtual void report_write_success_count(uint32_t /*batch*/) {} virtual void report_write_failure_count(uint32_t /*batch*/) {} virtual void report_write_doc_count_by_operation_type( proto::OperationType /*type*/, size_t /*doc_count*/) {} virtual void report_write_batch(uint32_t /*batch*/) {} private: static std::string metrics_name_; }; #define METRICS_REGISTER(__NAME__, __IMPL__, ...) \ AILEGO_FACTORY_REGISTER(__NAME__, MetricsCollector, __IMPL__, ##__VA_ARGS__) } // namespace metrics } // namespace be } // namespace proxima ================================================ FILE: src/proto/common.proto ================================================ /** * Copyright (C) The Software Authors. All rights reserved. * \file common.proto * \author Hechong.xyf * \date Oct 2020 * \version 1.0.0 * \brief Common definition for bilin engine */ syntax = "proto3"; package proxima.be.proto; // The Go package name, refers to https://developers.google.com/protocol-buffers/docs/reference/go-generated#package option go_package = "proxima/be/proto"; /*! Union of Generic Value */ message GenericValue { oneof value_oneof { bytes bytes_value = 1; string string_value = 2; bool bool_value = 3; int32 int32_value = 4; int64 int64_value = 5; uint32 uint32_value = 6; uint64 uint64_value = 7; float float_value = 8; double double_value = 9; }; }; /*! Message of Generic Value List */ message GenericValueList { repeated GenericValue values = 1; }; /*! Message of Generic Value Meta */ message GenericValueMeta { /*! Types of Field */ enum FieldType { FT_BYTES = 0; // bytes FT_STRING = 1; // string FT_BOOL = 2; // bool FT_INT32 = 3; // int32 FT_INT64 = 4; // int64 FT_UINT32 = 5; // uint32 FT_UINT64 = 6; // uint64 FT_FLOAT = 7; // float FT_DOUBLE = 8; // double float }; string field_name = 1; FieldType field_type = 2; }; /*! Message of Generic Key-Value Pair */ message GenericKeyValue { string key = 1; GenericValue value = 2; }; /*! Message of IndexParameter, which used to customize index, and query */ message KeyValuePair { string key = 1; string value = 2; } /*! Types of Operation */ enum OperationType { OP_INSERT = 0; // Insert Operation OP_UPDATE = 1; // Update Operation OP_DELETE = 2; // Delete Operation }; /*! Types of Feature (same as Proxima) */ enum FeatureType { FT_UNDEFINED = 0; // Undefined FT_BINARY32 = 1; // 32-bits Binary FT_BINARY64 = 2; // 64-bits Binary FT_FP16 = 3; // 16-bits Float Number FT_FP32 = 4; // 32-bits Float Number FT_FP64 = 5; // 64-bits Float Number FT_INT8 = 6; // 8-bits Integer FT_INT16 = 7; // 16-bits Integer FT_INT4 = 8; // 4-bits Integer }; /*! Types of Index */ enum IndexType { IT_UNDEFINED = 0; // Undefined IT_PROXIMA_GRAPH_INDEX = 1; // Proxima Graph Index }; enum DataType { DT_UNDEFINED = 0; DT_BINARY = 1; DT_STRING = 2; DT_BOOL = 3; DT_INT32 = 4; DT_INT64 = 5; DT_UINT32 = 6; DT_UINT64 = 7; DT_FLOAT = 8; DT_DOUBLE = 9; DT_VECTOR_BINARY32 = 20; DT_VECTOR_BINARY64 = 21; DT_VECTOR_FP16 = 22; DT_VECTOR_FP32 = 23; DT_VECTOR_FP64 = 24; DT_VECTOR_INT4 = 25; DT_VECTOR_INT8 = 26; DT_VECTOR_INT16 = 27; } //! Common Response message CommonResponse { int32 code = 1; string reason = 2; }; message Status { int32 code = 1; string reason = 2; } //! Common Http Request for admin message HttpRequest {}; //! Common Http Response for admin message HttpResponse {}; ================================================ FILE: src/proto/config.proto ================================================ /** * Copyright (C) The Software Authors. All rights reserved. * \file config.proto * \author Hongqing.hu * \date Nov 2020 * \version 1.0.0 * \brief Config definition for proxima_be */ syntax = "proto3"; package proxima.be.proto; // The Go package name, refers to https://developers.google.com/protocol-buffers/docs/reference/go-generated#package option go_package = "proxima/be/proto"; message MetricsConfig { string name = 1; } /*! Message of Common Config */ message CommonConfig { string protocol = 1; uint32 grpc_listen_port = 2; uint32 http_listen_port = 3; string logger_type = 4; string log_directory = 5; string log_file = 6; int32 log_level = 7; MetricsConfig metrics_config = 8; }; /*! Message of Query Config */ message QueryConfig { uint32 query_thread_count = 1; }; /*! Message of Index Config */ message IndexConfig { uint32 build_thread_count = 1; uint32 dump_thread_count = 2; uint32 max_build_qps = 3; string index_directory = 5; uint32 flush_internal = 6; uint32 optimize_internal = 7; }; /*! Meta configuration */ message MetaConfig { string meta_uri = 1; // meta database config, default sqlite://meta.sqlite }; /*! Message of Proxima BE Config */ message ProximaSEConfig { CommonConfig common_config = 1; QueryConfig query_config = 2; IndexConfig index_config = 3; MetaConfig meta_config = 4; }; ================================================ FILE: src/proto/proxima_be.proto ================================================ syntax = "proto3"; import "proto/common.proto"; package proxima.be.proto; // CC options option cc_generic_services = true; // The Go package name, refers to https://developers.google.com/protocol-buffers/docs/reference/go-generated#package option go_package = "proxima/be/proto"; message CollectionConfig { message IndexColumnParam { string column_name = 1; IndexType index_type = 2; DataType data_type = 3; uint32 dimension = 4; repeated KeyValuePair extra_params = 5; //optional } message RepositoryConfig { enum RepositoryType { RT_DATABASE = 0; } message Database { string connection_uri = 1; string table_name = 2; string user = 3; string password = 4; } RepositoryType repository_type = 1; string repository_name = 2; oneof entity{ Database database = 3; } } string collection_name = 1; uint64 max_docs_per_segment = 2; repeated string forward_column_names = 3; repeated IndexColumnParam index_column_params = 4; RepositoryConfig repository_config = 5; //optional } message CollectionName { string collection_name = 1; } message LsnContext { uint64 lsn = 1; string context = 2; } message CollectionInfo { enum CollectionStatus { CS_INITIALIZED = 0; CS_SERVING = 1; CS_DROPPED = 2; } // static collection config CollectionConfig config = 1; // variable collection status CollectionStatus status = 2; string uuid = 3; LsnContext latest_lsn_context = 4; uint64 magic_number = 5; } message DescribeCollectionResponse { Status status = 1; CollectionInfo collection = 2; }; message ListCondition { string repository_name = 1; // optional } message ListCollectionsResponse { Status status = 1; repeated CollectionInfo collections = 2; }; message CollectionStats { message SegmentStats { enum SegmentState { SS_CREATED = 0; SS_WRITING = 1; SS_DUMPING = 2; SS_COMPACTING = 3; SS_PERSIST = 4; } uint32 segment_id = 1; SegmentState state = 2; uint64 doc_count = 3; uint64 index_file_count = 4; uint64 index_file_size = 5; uint64 min_doc_id = 6; uint64 max_doc_id = 7; uint64 min_primary_key = 8; uint64 max_primary_key = 9; uint64 min_timestamp = 10; uint64 max_timestamp = 11; uint64 min_lsn = 12; uint64 max_lsn = 13; string segment_path = 14; } string collection_name = 1; string collection_path = 2; uint64 total_doc_count = 3; uint64 total_segment_count = 4; uint64 total_index_file_count = 5; uint64 total_index_file_size = 6; repeated SegmentStats segment_stats = 7; } message StatsCollectionResponse { Status status = 1; CollectionStats collection_stats = 2; }; message WriteRequest { message Row { uint64 primary_key = 1; OperationType operation_type = 2; GenericValueList forward_column_values = 3; GenericValueList index_column_values = 4; LsnContext lsn_context = 5; // optional } message IndexColumnMeta { string column_name = 1; DataType data_type = 2; uint32 dimension = 3; } message RowMeta { repeated string forward_column_names = 1; repeated IndexColumnMeta index_column_metas = 2; } string collection_name = 1; RowMeta row_meta = 2; repeated Row rows = 3; string request_id = 4; // optional uint64 magic_number = 5; // optional } message Document { uint64 primary_key = 1; float score = 2; repeated GenericKeyValue forward_column_values = 3; }; message QueryRequest { enum QueryType { QT_KNN = 0; } message KnnQueryParam { string column_name = 1; uint32 topk = 2; oneof features_value { bytes features = 3; string matrix = 4; } uint32 batch_count = 5; uint32 dimension = 6; DataType data_type = 7; float radius = 8; // optional bool is_linear = 9; // optional repeated KeyValuePair extra_params = 10; // optional } string collection_name = 1; QueryType query_type = 2; bool debug_mode = 3; oneof query_param { KnnQueryParam knn_param = 4; }; } message QueryResponse { message Result{ repeated Document documents = 1; }; Status status = 1; string debug_info = 2; uint64 latency_us = 3; repeated Result results = 4; } message GetDocumentRequest { string collection_name = 1; uint64 primary_key = 2; bool debug_mode = 3; } message GetDocumentResponse { Status status = 1; string debug_info = 2; Document document = 3; } message GetVersionRequest { } message GetVersionResponse { Status status = 1; string version = 2; } //! GRPC service service ProximaService { // Create a collection rpc create_collection(CollectionConfig) returns (Status); // Drop a collection rpc drop_collection(CollectionName) returns (Status); // Get information of a collection rpc describe_collection(CollectionName) returns (DescribeCollectionResponse); // Get all collection information rpc list_collections(ListCondition) returns (ListCollectionsResponse); // Get collection statstics rpc stats_collection(CollectionName) returns (StatsCollectionResponse); // Write records rpc write(WriteRequest) returns (Status); // Knn query records rpc query(QueryRequest) returns (QueryResponse); // Get document information by primary key rpc get_document_by_key(GetDocumentRequest) returns (GetDocumentResponse); // Get server version rpc get_version(GetVersionRequest) returns (GetVersionResponse); } //! Restful APIs of ProximaService for management of proxima be service HttpProximaService { //! Collection management APIS // 1. Create Collection // Http: POST /v1/collection/{collection} // You can use the create collection API to add a new collection to an Proxima BE server. When creating an // index, you need specify the CollectionConfig as json string attached to the body // 2. Get Collection // HTTP: GET /{collection} // Returns information about one collection named by Path Param ${collection}. // 3. Delete Collection // HTTP: DEL /{collection} // Deletes an existing collection named by Path Param ${collection} // 4. Update Collection // HTTP: PUT /{collection}, supported later // rpc collection(HttpRequest) returns (HttpResponse); //! Retrieve Stat of Collection // HTTP: GET /v1/collection/{collection}/stat // rpc stats_collection(HttpRequest) returns (HttpResponse); //! Write records to collection // HTTP: POST /v1/collection/{collection}/index // rpc write(HttpRequest) returns (HttpResponse); //! Query documents on collection // HTTP: POST /v1/collection/{collection}/query // rpc query(HttpRequest) returns (HttpResponse); //! Write records to collection // HTTP: GET /v1/collection/{collection}/doc?key={primary_key} // rpc get_document_by_key(HttpRequest) returns (HttpResponse); //! List Collections // HTTP: GET /v1/collections?repository={repo} // Returns information about collections. Query param ${repo} specified collection should have been attached // repository named by ${repo} // rpc list_collections(HttpRequest) returns (HttpResponse); //! Get server version // HTTP: GET /version // Returns version string rpc get_version(HttpRequest) returns (HttpResponse); } ================================================ FILE: src/query/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Oct 2020 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) # proxima_be_query library cc_library( NAME proxima_be_query STATIC STRICT SRCS *.cc executor/*.cc LIBS proxima_be_index proxima_be_meta proxima_be_common proxima_be_proto proxima brpc INCS . .. VERSION "${PROXIMA_BE_VERSION}" ) ================================================ FILE: src/query/README.md ================================================ Query Module: exports three interfaces for other module, listed below: 1. query_service.h: for query functional 2. query_agent.h: for admin module to management query module 3. proto/query_service.ph.h: which produced by proto/query_service.proto ================================================ FILE: src/query/collection_query.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "collection_query.h" #include "common/error_code.h" #include "common/logger.h" #include "forward_serializer.h" namespace proxima { namespace be { namespace query { ContextImpl::ContextImpl(uint64_t traceID, index::IndexServicePtr index_service, MetaWrapperPtr meta_wrapper, ProfilerPtr profiler_ptr, ExecutorPtr executor_ptr) : trace_id_(traceID), index_service_(std::move(index_service)), meta_(std::move(meta_wrapper)), executor_(std::move(executor_ptr)), profiler_(std::move(profiler_ptr)) {} //! Unique request id, using trace all relevant information uint64_t ContextImpl::id() const { return trace_id_; } //! Validate query object, 0 for valid, otherwise non zero returned int ContextImpl::validate() const { // Not Every query should have response if (!index_service_ || !meta_ || !profiler_) { return PROXIMA_BE_ERROR_CODE(RuntimeError); } return 0; } ProfilerPtr ContextImpl::profiler() const { return profiler_; } MetaWrapperPtr ContextImpl::meta() const { return meta_; } ExecutorPtr ContextImpl::executor() const { return executor_; } int ContextImpl::list_segments(index::SegmentPtrList *segments) { int code = index_service_->list_segments(collection(), segments); if (code != 0) { LOG_ERROR("Can't get the segments. collection[%s] code[%d]", collection().c_str(), code); return code; } return segments->empty() ? PROXIMA_BE_ERROR_CODE(UnavailableSegment) : 0; } ColumnNameList *ContextImpl::get_forward_columns( const index::QueryResult &forward) { auto it = revision_to_forward_columns_.find(forward.revision); if (it != revision_to_forward_columns_.end()) { return &it->second; } ColumnNameList columns; int code = meta_->list_columns(collection(), forward.revision, &columns); if (code != 0) { LOG_ERROR("Can't get the collection meta with specified revision[%zu]", (size_t)forward.revision); return nullptr; } LOG_DEBUG("Get the collection meta with specified revision[%zu]", (size_t)forward.revision); auto iit = revision_to_forward_columns_.emplace(forward.revision, std::move(columns)); return &iit.first->second; } int ContextImpl::fill_forward(const index::QueryResult &forward, proto::Document *doc) { auto *columns = get_forward_columns(forward); int code = PROXIMA_BE_ERROR_CODE(InvalidRevision); if (columns) { code = ForwardSerializer::FillForward(forward, *columns, doc); } return code; } //! Constructor CollectionQuery::CollectionQuery(uint64_t traceID, const proto::QueryRequest *pb_request, index::IndexServicePtr index_service_ptr, MetaWrapperPtr meta_wrapper, ExecutorPtr executor_ptr, ProfilerPtr profiler_ptr, proto::QueryResponse *pb_response) : ContextImpl(traceID, std::move(index_service_ptr), std::move(meta_wrapper), std::move(profiler_ptr), std::move(executor_ptr)), request_(pb_request), response_(pb_response) {} //! Destructor CollectionQuery::~CollectionQuery() = default; //! Validate query object, 0 for valid, otherwise non zero returned int CollectionQuery::validate() const { // Not Every query should have response int code = ContextImpl::validate(); if (code != 0) { return code; } return !request_ || !response_ ? PROXIMA_BE_ERROR_CODE(RuntimeError) : 0; } //! Retrieve the PB request of query const proto::QueryRequest *CollectionQuery::request() const { return request_; } //! Retrieve the PB response of query const proto::QueryResponse *CollectionQuery::response() const { return response_; } //! Retrieve the mutable PB response of query proto::QueryResponse *CollectionQuery::mutable_response() { return response_; } //! Retrieve collection name const std::string &CollectionQuery::collection() const { return request_->collection_name(); } } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/collection_query.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include "executor/executor.h" #include "context.h" #include "forward_serializer.h" #include "meta_wrapper.h" #include "query.h" namespace proxima { namespace be { namespace query { /*! * Implementation of Context */ class ContextImpl : public Query, public CollectionQueryContext { public: //! Constructor ContextImpl(uint64_t traceID, index::IndexServicePtr index_service, MetaWrapperPtr meta, ProfilerPtr profiler, ExecutorPtr executor); //! Destructor ~ContextImpl() override = default; public: //! Unique request id, using trace all relevant information uint64_t id() const override; //! Validate query object, 0 for valid, otherwise non zero returned int validate() const override; //! Get Profiler ProfilerPtr profiler() const override; protected: //! Retrieve meta handler MetaWrapperPtr meta() const; //! Retrieve executor ExecutorPtr executor() const; //! List segment under current collection int list_segments(index::SegmentPtrList *segments); //! Fill forward field int fill_forward(const index::QueryResult &forward, proto::Document *doc); //! Get forward columns ColumnNameList *get_forward_columns(const index::QueryResult &forward); //! Check valid executor bool valid_executor() const { return executor_ != nullptr; } private: //! Trace ID uint64_t trace_id_{0}; //! Index Service Handler index::IndexServicePtr index_service_{nullptr}; //! Schema Validator Handler MetaWrapperPtr meta_{nullptr}; //! Executor ExecutorPtr executor_{nullptr}; //! Profiler handler ProfilerPtr profiler_{nullptr}; //! revision map std::unordered_map revision_to_forward_columns_; }; /*! * Implementation of CollectionQuery */ class CollectionQuery : public ContextImpl, public QueryContext { public: //! Constructor CollectionQuery(uint64_t traceID, const proto::QueryRequest *request, index::IndexServicePtr index_service, MetaWrapperPtr meta, ExecutorPtr executor, ProfilerPtr profiler, proto::QueryResponse *response); //! Destructor ~CollectionQuery() override; public: //! Validate query object, 0 for valid, otherwise non zero returned int validate() const override; //! Retrieve the PB request of query const proto::QueryRequest *request() const override; //! Retrieve the PB response of query const proto::QueryResponse *response() const override; //! Retrieve the mutable PB response of query proto::QueryResponse *mutable_response() override; //! Retrieve collection name const std::string &collection() const override; protected: //! Check valid response bool valid_response() const { return response_; } private: //! Readonly QueryRequest Handler const proto::QueryRequest *request_{nullptr}; //! Response handler proto::QueryResponse *response_{nullptr}; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/context.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include "index/collection_query.h" #include "index/index_service.h" #include "proto/proxima_be.pb.h" namespace proxima { namespace be { namespace query { /*! * QueryContext which store request and response */ class QueryContext { public: //! Destructor virtual ~QueryContext() = default; public: //! Retrieve the PB request of query virtual const proto::QueryRequest *request() const = 0; //! Retrieve the PB response of query virtual const proto::QueryResponse *response() const = 0; //! Retrieve the PB response of query virtual proto::QueryResponse *mutable_response() = 0; }; /*! * CollectionQueryContext provide the collection of query */ class CollectionQueryContext { public: //! Destructor virtual ~CollectionQueryContext() = default; public: //! Retrieve collection name virtual const std::string &collection() const = 0; }; /*! * KNNQueryContext: Provide all the params needed for invoke * segment.knn_search */ class KNNQueryContext { public: //! Destructor virtual ~KNNQueryContext() = default; public: //! Retrieve column name virtual const std::string &column() const = 0; //! Retrieve features field virtual const std::string &features() const = 0; //! Retrieve batch_count field virtual uint32_t batch_count() const = 0; //! Retrieve QueryParams virtual const index::QueryParams &query_params() const = 0; }; /*! * QueryKeyContext */ class QueryKeyContext { public: //! Destructor virtual ~QueryKeyContext() = default; public: //! Retrieve primary_key virtual uint64_t primary_key() const = 0; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/equal_query.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "equal_query.h" #include "common/error_code.h" #include "common/logger.h" namespace proxima { namespace be { namespace query { //! Constructor EqualQuery::EqualQuery(uint64_t traceID, const proto::GetDocumentRequest *req, index::IndexServicePtr index, MetaWrapperPtr meta_wrapper, ExecutorPtr executor_ptr, ProfilerPtr profiler_ptr, proto::GetDocumentResponse *resp) : ContextImpl(traceID, index, meta_wrapper, profiler_ptr, executor_ptr), request_(req), response_(resp) {} //! Destructor EqualQuery::~EqualQuery() = default; //! Validate query object, 0 for valid, otherwise non zero returned int EqualQuery::validate() const { // Avoid core dump resulted by nullptr request if (!request_) { return PROXIMA_BE_ERROR_CODE(InvalidArgument); } int code = ContextImpl::validate(); if (code == 0) { if (valid_executor()) { code = meta()->validate_collection(collection()); } else { LOG_WARN("Invalid response or executor passed to EqualQuery"); code = PROXIMA_BE_ERROR_CODE(InvalidArgument); } } return code; } //! Retrieve IOMode of query IOMode EqualQuery::mode() const { return IOMode::READONLY; } //! Retrieve the type of query, Readonly QueryType EqualQuery::type() const { return QueryType::EQUAL; } //! Prepare resources, 0 for success, otherwise failed int EqualQuery::prepare() { index::SegmentPtrList segments; int code = list_segments(&segments); if (code == 0) { for (auto &segment : segments) { tasks_.emplace_back(std::make_shared(segment, this)); } } else { LOG_ERROR("Failed to build query param from request"); } return code; } //! Evaluate query, and collection feedback int EqualQuery::evaluate() { TaskPtrList tasks(tasks_.begin(), tasks_.end()); int code = executor()->execute_tasks(tasks); if (code == 0) { // one result or nothing for (auto &task : tasks_) { if (task->hit()) { // Pick first hit document, drop others proto::Document *doc = response_->mutable_document(); doc->set_primary_key(primary_key()); code = fill_forward(task->forward(), doc); if (code != 0) { LOG_WARN("Fill forward failed. code[%d] what[%s]", code, ErrorCode::What(code)); } break; } } } return code; } int EqualQuery::finalize() { return 0; } //! Retrieve collection name const std::string &EqualQuery::collection() const { return request_->collection_name(); } //! Retrieve primary_key uint64_t EqualQuery::primary_key() const { return request_->primary_key(); } } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/equal_query.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include "collection_query.h" #include "equal_task.h" namespace proxima { namespace be { namespace query { /*! * EqualQuery */ class EqualQuery : public ContextImpl, public QueryKeyContext { public: //! Constructor EqualQuery(uint64_t traceID, const proto::GetDocumentRequest *req, index::IndexServicePtr index, MetaWrapperPtr meta_wrapper, ExecutorPtr executor_ptr, ProfilerPtr profiler_ptr, proto::GetDocumentResponse *resp); //! Destructor ~EqualQuery() override; public: //! Validate query object, 0 for valid, otherwise non zero returned int validate() const override; //! Retrieve IOMode of query IOMode mode() const override; //! Retrieve the type of query, Readonly QueryType type() const override; //! Prepare resources, 0 for success, otherwise failed int prepare() override; //! Evaluate query, and collection feedback int evaluate() override; //! Finalize query object int finalize() override; //! Retrieve collection name const std::string &collection() const override; //! Retrieve primary_key uint64_t primary_key() const override; private: //! Equal tasks EqualTaskPtrList tasks_{}; // Request pointer readonly field const proto::GetDocumentRequest *request_{nullptr}; // Response pointer proto::GetDocumentResponse *response_{nullptr}; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/equal_task.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "equal_task.h" #include "common/error_code.h" namespace proxima { namespace be { namespace query { EqualTask::EqualTask(index::SegmentPtr segment, QueryKeyContext *context) : BthreadTask("EqualTask"), hit_count_(0), segment_(std::move(segment)), context_(context) {} EqualTask::~EqualTask() = default; uint32_t EqualTask::hit() const { return hit_count_; } const index::QueryResult &EqualTask::forward() const { return forward_; } int EqualTask::do_run() { if (!segment_ || !context_) { return PROXIMA_BE_ERROR_CODE(InvalidSegment); } // Invoke kv_search with segment int code = segment_->kv_search(context_->primary_key(), &forward_); if (code == 0 && forward_.primary_key != index::INVALID_KEY) { hit_count_ = 1; } return code; } } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/equal_task.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include "executor/bthread_task.h" #include "context.h" namespace proxima { namespace be { namespace query { //! Predefine class class EqualTask; //! Alias for EqualTask using EqualTaskPtr = std::shared_ptr; using EqualTaskPtrList = std::list; /*! * EqualTask */ class EqualTask : public BthreadTask { public: //! Constructor EqualTask(index::SegmentPtr segment, QueryKeyContext *context); //! Destructor ~EqualTask() override; public: //! Retrieve hit count uint32_t hit() const; //! Get the forward const index::QueryResult &forward() const; private: // Do search int do_run() override; private: //! Hit count uint32_t hit_count_{0}; //! Segment handler index::SegmentPtr segment_{nullptr}; //! Query Param QueryKeyContext *context_{nullptr}; //! Forward index::QueryResult forward_{}; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/executor/bthread_queue.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "bthread_queue.h" #include #include "common/error_code.h" #include "common/logger.h" namespace proxima { namespace be { namespace query { BThreadQueue::BThreadQueue() : status_(TaskQueue::Status::INITIALIZED) {} BThreadQueue::~BThreadQueue() = default; namespace { //! Runner routine with execution_queue_start, first arguments not used static int Execute(void *meta, bthread::TaskIterator &iter) { auto queue = static_cast(meta); if (iter.is_queue_stopped()) { LOG_INFO("Bthread Queue has been stopped."); return 0; } auto queue_id = iter ? queue->id() : 0; LOG_DEBUG("Bthread Queue [%zu] start run tasks", (size_t)queue_id); // invoke task run interface for (; iter; ++iter) { LOG_DEBUG("Task [%s] is ready to run on queue[%zu]", (*iter)->name().c_str(), (size_t)queue->id()); (*iter)->run(); LOG_DEBUG("Task [%s] has been finished on queue[%zu]", (*iter)->name().c_str(), (size_t)queue->id()); } LOG_DEBUG("Bthread Queue [%zu] finished to run tasks", (size_t)queue_id); return 0; } } // namespace uint64_t BThreadQueue::id() const { return queue_id_.value; } int BThreadQueue::start() { if (status_ == Status::INITIALIZED) { if (bthread::execution_queue_start(&queue_id_, &options_, Execute, this) == 0) { status_ = Status::STARTED; LOG_DEBUG("BThreadQueue success to start, queue_id_[%zu]", (size_t)queue_id_.value); return 0; } LOG_ERROR("Failed to start BThreadQueue, queue_id_[%zu]", (size_t)queue_id_.value); clear_context(); } else { LOG_ERROR("Failed to start BThreadQueue, which has not been initialized"); } return PROXIMA_BE_ERROR_CODE(RuntimeError); } int BThreadQueue::stop() { if (status_ != Status::STARTED) { LOG_DEBUG("Can't stop an queue, which does not started yet. queue_id_[%zu]", (size_t)queue_id_.value); return PROXIMA_BE_ERROR_CODE(RuntimeError); } int code = bthread::execution_queue_stop(queue_id_); if (code == 0) { LOG_INFO("BThreadQueue stopped, queue_id_[%zu]", (size_t)queue_id_.value); status_ = Status::STOPPED; return 0; } LOG_ERROR("Failed to stop Bthread, ret code[%d]", code); return PROXIMA_BE_ERROR_CODE(RuntimeError); } int BThreadQueue::join() { if (status_ != Status::STOPPED) { LOG_ERROR("Can't join an queue, which did not stop yet, queue_id_[%zu]", (size_t)queue_id_.value); return PROXIMA_BE_ERROR_CODE(RuntimeError); } int code = bthread::execution_queue_join(queue_id_); if (code == 0) { status_ = Status::JOINED; return 0; } LOG_ERROR("Bthread join failed, ret code[%d]", code); return PROXIMA_BE_ERROR_CODE(RuntimeError); } int BThreadQueue::put(const TaskPtr &task) { if (task && started()) { task->status(Task::Status::SCHEDULED); if (bthread::execution_queue_execute(queue_id_, task) == 0) { LOG_DEBUG("Scheduled task[%s]", task->name().c_str()); return 0; } else { task->status(Task::Status::INITIALIZED); LOG_ERROR("Scheduled task[%s] failed", task->name().c_str()); } } LOG_ERROR("Failed to schedule task"); return PROXIMA_BE_ERROR_CODE(RuntimeError); } bool BThreadQueue::started() const { return status_ == Status::STARTED; } void BThreadQueue::clear_context() { status_ = Status::INITIALIZED; std::memset(static_cast(&queue_id_), 0, sizeof(queue_id_)); std::memset(static_cast(&options_), 0, sizeof(options_)); } } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/executor/bthread_queue.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include #include "task_queue.h" namespace proxima { namespace be { namespace query { /*! * Implementation of TaskQueue interface, which based on Execution * Queue in brpc */ class BThreadQueue : public TaskQueue { public: //! Disable copy and assigment operator on BThreadQueue instance // DISALLOW_COPY_AND_ASSIGN(BThreadQueue); //! Constructor BThreadQueue(); //! Destructor ~BThreadQueue() override; public: //! Retrieve id of queue uint64_t id() const; //! Start task queue, return value 0 for success, otherwise failed int start() override; //! Stop task queue, return value 0 for success, otherwise failed int stop() override; //! Join task queue, return value 0 for success, otherwise failed int join() override; //! Put the task in queue //! @return, 0: succeed, mark status of task as Scheduled //! other: failed int put(const TaskPtr &task) override; //! Retrieve start flags bool started() const override; private: //! Release all resourced void clear_context(); private: //! Identifier of execution queue bthread::ExecutionQueueId queue_id_ = {0}; //! Default options for execution queue bthread::ExecutionQueueOptions options_{}; //! Queue status TaskQueue::Status status_{TaskQueue::Status::INITIALIZED}; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/executor/bthread_task.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Jan 2021 * \brief */ #include "bthread_task.h" #include "common/error_code.h" namespace proxima { namespace be { namespace query { BthreadTask::BthreadTask(std::string name_str) : name_(std::move(name_str)), status_(Task::Status::INITIALIZED), exit_code_(0) { bthread_mutex_init(&mutex_, nullptr); bthread_cond_init(&cond_, nullptr); } BthreadTask::~BthreadTask() { bthread_mutex_destroy(&mutex_); bthread_cond_destroy(&cond_); } const std::string &BthreadTask::name() const { return name_; } int BthreadTask::exit_code() const { return exit_code_; } //! Invoke do_run interface int BthreadTask::run() { return run_once(); } Task::Status BthreadTask::status() const { return status_.load(); } //! Update task status, and notify listener if task have been finished void BthreadTask::status(Task::Status stat) { if (stat == Status::FINISHED) { bthread_mutex_lock(&mutex_); status_.exchange(stat); bthread_cond_signal(&cond_); bthread_mutex_unlock(&mutex_); } else { status_.exchange(stat); } } bool BthreadTask::running() const { return status() == Task::Status::RUNNING; } bool BthreadTask::finished() const { return status() == Task::Status::FINISHED; } int BthreadTask::run_once() { Status stat = Status::SCHEDULED; if (status_.compare_exchange_strong(stat, Status::RUNNING)) { exit_code_ = do_run(); status(Task::Status::FINISHED); return exit_code_; } else if (stat == Status::RUNNING) { return PROXIMA_BE_ERROR_CODE(TaskIsRunning); } else if (stat == Status::FINISHED) { return exit_code_; } return PROXIMA_BE_ERROR_CODE(RuntimeError); } //! Wait task until have been finished bool BthreadTask::wait_finish() { bthread_mutex_lock(&mutex_); if (!finished()) { bthread_cond_wait(&cond_, &mutex_); } bthread_mutex_unlock(&mutex_); return true; } } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/executor/bthread_task.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Jan 2021 * \brief */ #pragma once #include #include "task.h" namespace proxima { namespace be { namespace query { /*! * Bthread Task interface */ class BthreadTask : public Task { public: //! Constructor explicit BthreadTask(std::string name); //! Destructor ~BthreadTask() override; public: //! Retrieve task name const std::string &name() const override; int exit_code() const override; //! Run task, 0 for success otherwise failed int run() override; //! Retrieve the status of task, readonly Status status() const override; //! Update status void status(Status status) override; //! true for task in running stage, otherwise return false bool running() const override; //! true for task has been finished, otherwise return false bool finished() const override; //! Executes the task object exactly once, even if called concurrently, from // several threads. return immediately if invoke run method after run_once. int run_once() override; //! Wait until task has been finished, return value same with finished() bool wait_finish() override; private: //! Run interface, all derived class should implement this function virtual int do_run() = 0; private: //! task name std::string name_{}; //! task status std::atomic status_{Status::INITIALIZED}; //! Return code of run interface int exit_code_{0}; //! Status mutex bthread_mutex_t mutex_; //! Finished event condition bthread_cond_t cond_; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/executor/executor.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include "task.h" namespace proxima { namespace be { namespace query { //! Predefine class class Executor; //! Alias for Executor using ExecutorPtr = std::shared_ptr; /*! * Task executor */ class Executor { public: //! Destructor virtual ~Executor() = default; public: //! Execute one task virtual int execute_task(const TaskPtr &task) = 0; //! Execute tasks virtual int execute_tasks(const TaskPtrList &tasks) = 0; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/executor/parallel_executor.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "parallel_executor.h" #include "common/error_code.h" #include "common/logger.h" namespace proxima { namespace be { namespace query { ParallelExecutor::ParallelExecutor(SchedulerPtr scheduler) : scheduler_(std::move(scheduler)) {} ParallelExecutor::~ParallelExecutor() = default; int ParallelExecutor::execute_task(const TaskPtr &task) { if (task) { task->status(Task::Status::SCHEDULED); return task->run_once(); } return PROXIMA_BE_ERROR_CODE(InvalidArgument); } int ParallelExecutor::execute_tasks(const TaskPtrList &tasks) { int code = 0; if (tasks.empty()) { return code; } auto iter = tasks.begin(); // Keep the head task, schedule others to other coroutines while (++iter != tasks.end()) { code = scheduler_->schedule(*iter); // Break loop, if schedule task failed,handle schedule error in // wait_finish function if (code != 0) { LOG_ERROR("Can't schedule task to run. code[%d]", code); break; } } // Execute first task in queue, if all others have been scheduled if (code == 0) { execute_task(*tasks.begin()); } // Ignore return code of first task, wait finished event for all tasks. return wait_finish(tasks); } int ParallelExecutor::wait_finish(const TaskPtrList &tasks) { int error_code = 0; // Wait task finished, if has been scheduled before for (auto &task : tasks) { if (task->status() == Task::Status::INITIALIZED) { // Task has not been scheduled, set error code to Schedule Error, // and continue to reclaim the resources of others error_code = PROXIMA_BE_ERROR_CODE(ScheduleError); continue; } // Try run task in current coroutine if possible before waiting it has // been done with other coroutine. // Optimizing performance of query, The worst case of latency with // multi-segments query is equal to sequence-execution, which more // helpful when Proxima BE is under extreme high load. task->run_once(); task->wait_finish(); if (error_code == 0 && task->exit_code() != 0) { // Only save the error code of first task which failed error_code = task->exit_code(); } } return error_code; } } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/executor/parallel_executor.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include "executor.h" #include "scheduler.h" namespace proxima { namespace be { namespace query { /*! * Parallel Executor */ class ParallelExecutor : public Executor { public: //! Constructor explicit ParallelExecutor(SchedulerPtr scheduler); //! Destructor ~ParallelExecutor() override; public: //! Execute one task int execute_task(const TaskPtr &task) override; //! Execute tasks int execute_tasks(const TaskPtrList &tasks) override; private: //! Wait all task finish and collect execution status, //! return value 0 for success, otherwise failed int wait_finish(const TaskPtrList &tasks); private: //! Scheduler handle SchedulerPtr scheduler_{nullptr}; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/executor/scheduler.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "scheduler.h" #include #include #include "common/error_code.h" #include "common/logger.h" #include "bthread_queue.h" namespace proxima { namespace be { namespace query { //! Alias for TaskQueueVector using TaskQueueVector = std::vector; /*! * Selector */ struct Selector { //! Pick a number between [0:limit] static uint32_t pick(uint32_t /* limit */) { return 0; } }; //! Round Robin Selector struct RoundRobinSelector { //! Pick a number between [0:limit] uint32_t pick(uint32_t limit) { return count++ % limit; } private: std::atomic count{0}; }; template class SchedulerImpl : public Scheduler { public: //! Constructor SchedulerImpl() : concurrency_(0) {} //! Destructor ~SchedulerImpl() override = default; public: //! Dispatch task to execution queue int schedule(TaskPtr task) override { if (!queues_.empty()) { uint32_t pos = selector_.pick(concurrency_); LOG_DEBUG("Selector return[%u], task[%s]", pos, task->name().c_str()); return queues_[pos]->put(task); } return PROXIMA_BE_ERROR_CODE(UnreadyQueue); } //! Retrieve concurrency field uint32_t concurrency() const override { return concurrency_; } //! Set concurrency field uint32_t concurrency(uint32_t concurrent) override { recycle_queue(); concurrency_ = resize(concurrent); return concurrency_; } private: //! Resize queue buckets uint32_t resize(uint32_t size) { while (size--) { TaskQueuePtr queue = TaskQueuePtr(new BThreadQueue()); if (queue->start() == 0) { LOG_DEBUG("Success to start task execution queue"); queues_.emplace_back(queue); } } return static_cast(queues_.size()); } void recycle_queue() { for (auto &queue : queues_) { queue->stop(); queue->join(); } queues_.clear(); } private: //! Concurrency uint32_t concurrency_{0}; //! Execution queue buckets TaskQueueVector queues_{}; //! Selector, Load balance role Selector selector_{}; }; //! Retrieve default scheduler reference SchedulerPtr Scheduler::Default() { static SchedulerPtr kScheduler = SchedulerPtr(new SchedulerImpl()); return kScheduler; } //! Retrieve hardware concurrency uint32_t Scheduler::HostConcurrency() { return std::thread::hardware_concurrency(); } } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/executor/scheduler.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Oct 2020 * \brief */ #pragma once #include "task.h" namespace proxima { namespace be { namespace query { //! Predefine class class Scheduler; //! Alias SchedulerPtr using SchedulerPtr = std::shared_ptr; /*! * Schedule task to execution queue */ class Scheduler { public: //! Static helper function, get default scheduler static SchedulerPtr Default(); //! Default system concurrency static uint32_t HostConcurrency(); public: //! Destructor virtual ~Scheduler() = default; public: //! Dispatch task to execution queue, return 0 for success, otherwise failed virtual int schedule(TaskPtr task) = 0; //! Retrieve concurrency of scheduler virtual uint32_t concurrency() const = 0; //! Set concurrency virtual uint32_t concurrency(uint32_t concurrency) = 0; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/executor/task.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Oct 2020 * \brief */ #pragma once #include #include #include #include namespace proxima { namespace be { namespace query { //! Predefined class class Task; //! Alias for TaskPtr using TaskPtr = std::shared_ptr; using TaskPtrList = std::list; /** * Task interface, most of API's should be readonly, except execute & * wait_finish the priority of updating status grant to TaskController, which * derived by Schedule] */ class Task { public: /*! * Status indicated the stage of task */ enum Status { //! Initialized, wait to schedule. INITIALIZED, //! Has been scheduled, not running yet. SCHEDULED, //! Running, not finished yet. RUNNING, //! Finished, FINISHED, }; public: //! Destructor virtual ~Task() = default; public: //! Retrieve task name virtual const std::string &name() const = 0; //! Retrieve exit code off task virtual int exit_code() const = 0; //! Run task, 0 for success otherwise failed virtual int run() = 0; //! Retrieve the status of task, readonly virtual Status status() const = 0; //! Update status virtual void status(Status status) = 0; //! true for task in running stage, otherwise return false virtual bool running() const = 0; //! true for task has been finished, otherwise return false virtual bool finished() const = 0; //! Executes the task object exactly once, even if called concurrently, from // several threads. return immediately if invoke run method after run_once. virtual int run_once() = 0; //! Wait until task has been finished, return value same with finished() virtual bool wait_finish() = 0; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/executor/task_queue.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Oct 2020 * \brief */ #pragma once #include "task.h" namespace proxima { namespace be { namespace query { //! Predefine class class TaskQueue; //! Alias for TaskQueue using TaskQueuePtr = std::shared_ptr; /*! * TaskQueue Interface, */ class TaskQueue { public: /*! * Queue status flag */ enum Status { INITIALIZED, STARTED, STOPPED, JOINED, }; public: //! Destructor virtual ~TaskQueue() = default; public: //! Start task queue, return value 0 for success, otherwise failed virtual int start() = 0; //! Stop task queue, return value 0 for success, otherwise failed virtual int stop() = 0; //! Join task queue, return value 0 for success, otherwise failed virtual int join() = 0; //! Put the task in queue //! @return, 0: succeed, mark status of task as Scheduled //! other: failed virtual int put(const TaskPtr &task) = 0; //! Retrieve start flags virtual bool started() const = 0; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/forward_serializer.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "forward_serializer.h" #include "common/error_code.h" #include "common/logger.h" namespace proxima { namespace be { namespace query { bool ForwardSerializer::Deserialize(const std::string &buf, proto::GenericValueList *values) { return values->ParseFromString(buf); } int ForwardSerializer::FillForward(const index::QueryResult &forward, const ColumnNameList &columns, proto::Document *doc) { proto::GenericValueList values; ForwardSerializer::Deserialize(forward.forward_data, &values); if (static_cast(values.values_size()) != columns.size()) { LOG_DEBUG("Mismatch forwards. buf_size[%lu], values[%d], forwards[%lu]", forward.forward_data.size(), values.values_size(), columns.size()); return PROXIMA_BE_ERROR_CODE(MismatchedForward); } for (size_t pos = 0; pos < columns.size(); pos++) { proto::GenericKeyValue *kv = doc->add_forward_column_values(); kv->set_key(columns[pos]); kv->mutable_value()->Swap(values.mutable_values(pos)); } return 0; } } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/forward_serializer.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include "index/index_service.h" #include "proto/proxima_be.pb.h" #include "meta_wrapper.h" namespace proxima { namespace be { namespace query { /*! * Helper object for forward serialization */ class ForwardSerializer { public: //! Deserialized forward buf static bool Deserialize(const std::string &buf, proto::GenericValueList *values); //! Fill forward field static int FillForward(const index::QueryResult &forward, const ColumnNameList &columns, proto::Document *doc); }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/knn_query.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "knn_query.h" #include "common/error_code.h" #include "common/logger.h" #include "common/transformer.h" #include "common/types_helper.h" namespace proxima { namespace be { namespace query { //! Constructor KNNQuery::KNNQuery(uint64_t traceID, const proto::QueryRequest *req, index::IndexServicePtr index, MetaWrapperPtr meta_wrapper, ExecutorPtr executor_ptr, ProfilerPtr profiler_ptr, proto::QueryResponse *resp) : CollectionQuery(traceID, req, std::move(index), std::move(meta_wrapper), std::move(executor_ptr), std::move(profiler_ptr), resp) {} //! Destructor KNNQuery::~KNNQuery() = default; //! Validate query object, 0 for valid, otherwise non zero returned int KNNQuery::validate() const { ScopedLatency latency("validate", profiler()); int code = CollectionQuery::validate(); if (code == 0) { if (valid_response() && valid_executor()) { code = meta()->validate_column(collection(), column()); } else { LOG_WARN("Invalid response or executor passed to KNNQuery"); code = PROXIMA_BE_ERROR_CODE(InvalidArgument); } } return code; } //! Retrieve IOMode of query IOMode KNNQuery::mode() const { return IOMode::READONLY; } //! Retrieve the type of query, Readonly QueryType KNNQuery::type() const { return QueryType::KNN; } //! Prepare resources, 0 for success, otherwise failed int KNNQuery::prepare() { ScopedLatency latency("prepare", profiler()); index::SegmentPtrList segments; int code = list_segments(&segments); if (code != 0) { return code; } for (auto &segment : segments) { std::string knn_name("knn_task_"); knn_name.append(std::to_string(segment->segment_id())); knn_name.append("_"); knn_name.append(std::to_string(id())); tasks_.emplace_back(std::make_shared(knn_name, segment, this)); } code = build_query_param(request()->knn_param()); if (code != 0) { LOG_ERROR("Failed build query param from request"); return code; } code = transform_feature(request()->knn_param()); if (code != 0) { LOG_ERROR("Failed transform features. code[%d] what[%s]", code, ErrorCode::What(code)); } return code; } //! Evaluate query, and collection feedback int KNNQuery::evaluate() { profiler()->open_stage("evaluate"); TaskPtrList tasks(tasks_.begin(), tasks_.end()); int code; { ScopedLatency execute_latency("execute", profiler()); code = executor()->execute_tasks(tasks); } if (code == 0) { ScopedLatency merge_and_sort_latency("merge_and_sort", profiler()); // Merge Result code = collect_result(); } profiler()->close_stage(); return code; } //! Finalize query object int KNNQuery::finalize() { return 0; } namespace { static int CollectBatchResult(const KNNTaskPtrList &tasks, uint32_t batch, KNNQuery::ResultRefHeap *results) { for (auto &task : tasks) { if (static_cast(batch) < task->result().size()) { for (const auto &iter : task->result()[batch]) { results->push(iter); // Optimization: skip remained result, which more lower than last one // in target heap if (results->begin()->get() < iter) { break; } } } else { return PROXIMA_BE_ERROR_CODE(OutOfBoundsResult); } } return 0; } } // namespace int KNNQuery::collect_result() { if (tasks_.empty()) { return 0; } int code = 0; for (uint32_t batch = 0; batch < batch_count(); batch++) { ResultRefHeap results; results.limit(query_param_.topk); // Gather all the reference into list code = CollectBatchResult(tasks_, batch, &results); if (code == 0) { // Transform heap to sorted vector results.sort(); // Feed entity field if (feed_entity(results, mutable_response()->add_results()) != query_param_.topk) { LOG_DEBUG("No enough results to fill response"); } } else { LOG_ERROR("Collect result failed"); break; } } return code; } //! Retrieve column name const std::string &KNNQuery::column() const { return request()->knn_param().column_name(); } const std::string &KNNQuery::features() const { return features_; } uint32_t KNNQuery::batch_count() const { return request()->knn_param().batch_count(); } const index::QueryParams &KNNQuery::query_params() const { return query_param_; } int KNNQuery::build_query_param( const proto::QueryRequest::KnnQueryParam ¶m) { query_param_.query_id = id(); query_param_.topk = param.topk(); query_param_.data_type = be::DataTypeCodeBook::Get(param.data_type()); query_param_.dimension = param.dimension(); query_param_.radius = param.radius(); query_param_.is_linear = param.is_linear(); be::IndexParamsHelper::SerializeToParams(param.extra_params(), &query_param_.extra_params); return 0; } uint32_t KNNQuery::feed_entity(const ResultRefList &results, proto::QueryResponse::Result *result) { for (const auto &iter : results) { proto::Document *doc = result->add_documents(); doc->set_primary_key(iter.get().primary_key); doc->set_score(iter.get().score); // Fill forward for document fill_forward(iter.get(), doc); } return results.size(); } int KNNQuery::transform_feature( const proto::QueryRequest::KnnQueryParam ¶m) { int code = PROXIMA_BE_ERROR_CODE(InvalidQuery); auto data_type = meta()->get_data_type(collection(), column()); auto value_case = param.features_value_case(); if (value_case == proto::QueryRequest_KnnQueryParam::kFeatures) { code = Transformer::Transform(query_param_.data_type, param.features(), data_type, &features_); } else if (value_case == proto::QueryRequest_KnnQueryParam::kMatrix) { std::function validator = [this](const ailego::JsonValue &node) -> int { int ret = PROXIMA_BE_ERROR_CODE(InvalidVectorFormat); if (node.is_array()) { auto &array = node.as_array(); if (!array.empty()) { if (array.begin()->is_array()) { ret = 0; for (auto it = array.begin(); it != array.end(); ++it) { if (!it->is_array() || it->as_array().size() != query_param_.dimension) { ret |= PROXIMA_BE_ERROR_CODE(InvalidVectorFormat); break; } } } else if (array.size() == query_param_.dimension) { ret = 0; } } } return ret; }; switch (data_type) { case DataTypes::VECTOR_FP32: { std::vector values; Transformer::Transform(param.matrix(), &validator, &values); Primary2Bytes::Bytes(values, &features_); code = 0; break; } case DataTypes::VECTOR_FP16: { std::vector values; Transformer::Transform(param.matrix(), &validator, &values); Primary2Bytes::Bytes(values, &features_); code = 0; break; } case DataTypes::VECTOR_INT16: { std::vector values; Transformer::Transform(param.matrix(), &validator, &values); Primary2Bytes::Bytes(values, &features_); code = 0; break; } case DataTypes::VECTOR_INT8: { std::vector values; Transformer::Transform(param.matrix(), &validator, &values); Primary2Bytes::Bytes(values, &features_); code = 0; break; } case DataTypes::VECTOR_INT4: { std::vector values; Transformer::Transform(param.matrix(), &validator, &values); Primary2Bytes::Bytes(values, &features_); code = 0; break; } case DataTypes::VECTOR_BINARY32: { std::vector values; Transformer::Transform(param.matrix(), &validator, &values); Primary2Bytes::Bytes(values, &features_); code = 0; break; } case DataTypes::VECTOR_BINARY64: { std::vector values; Transformer::Transform(param.matrix(), &validator, &values); Primary2Bytes::Bytes(values, &features_); code = 0; break; } default: LOG_ERROR("Unsupported data type %u.", (uint32_t)data_type); code = PROXIMA_BE_ERROR_CODE(InvalidDataType); } } return code; } } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/knn_query.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include // for std::reference_wrapper #include "collection_query.h" #include "knn_task.h" namespace proxima { namespace be { namespace query { /*! * KNNQuery: handler of knn query */ class KNNQuery : public CollectionQuery, public KNNQueryContext { public: // Alias for reference to Result using ResultRef = std::reference_wrapper; // Alias for result reference list, which used to merge result and sort using ResultRefList = std::vector; // Comparator for ResultReference struct ResultRefCompare { bool operator()(const ResultRef &__x, const ResultRef &__y) const { return __x.get() < __y.get(); } }; // Heap of ResultReference using ResultRefHeap = ailego::Heap; public: //! Constructor KNNQuery(uint64_t traceID, const proto::QueryRequest *req, index::IndexServicePtr index, MetaWrapperPtr meta_wrapper, ExecutorPtr executor_ptr, ProfilerPtr profiler_ptr, proto::QueryResponse *resp); //! Destructor ~KNNQuery() override; public: //! Validate query object, 0 for valid, otherwise non zero returned int validate() const override; //! Retrieve IOMode of query IOMode mode() const override; //! Retrieve the type of query, Readonly QueryType type() const override; //! Prepare resources, 0 for success, otherwise failed int prepare() override; //! Evaluate query, and collection feedback int evaluate() override; //! Finalize query object int finalize() override; //! Retrieve column name const std::string &column() const override; //! Retrieve features field const std::string &features() const override; //! Retrieve batch_count field uint32_t batch_count() const override; //! Retrieve QueryParams const index::QueryParams &query_params() const override; private: //! Build query param from PB proto int build_query_param(const proto::QueryRequest::KnnQueryParam &); //! Collect result int collect_result(); //! Feed entity field uint32_t feed_entity(const ResultRefList &, proto::QueryResponse::Result *); //! transform query features if necessary int transform_feature(const proto::QueryRequest::KnnQueryParam &); private: //! QueryParams handler index::QueryParams query_param_{}; //! KNNTasks, which scheduled by executor KNNTaskPtrList tasks_{}; //! Query features std::string features_{}; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/knn_task.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "knn_task.h" #include "common/error_code.h" namespace proxima { namespace be { namespace query { KNNTask::KNNTask(index::SegmentPtr segment, KNNQueryContext *context) : BthreadTask("KNNTask"), segment_(std::move(segment)), context_(context) {} KNNTask::KNNTask(const std::string &name_val, index::SegmentPtr segment, KNNQueryContext *context) : BthreadTask(name_val), segment_(std::move(segment)), context_(context) {} KNNTask::~KNNTask() = default; const std::vector &KNNTask::result() const { return result_; } int KNNTask::do_run() { if (!segment_ || !context_) { return PROXIMA_BE_ERROR_CODE(InvalidSegment); } LOG_DEBUG("KNNTask start to run, query_id[%zu], segment_id[%zu]", (size_t)context_->query_params().query_id, (size_t)segment_->segment_id()); return segment_->knn_search(context_->column(), context_->features(), context_->query_params(), context_->batch_count(), &result_); } } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/knn_task.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include "executor/bthread_task.h" #include "context.h" namespace proxima { namespace be { namespace query { //! Predefine class class KNNTask; // Alias knn task pointer using KNNTaskPtr = std::shared_ptr; using KNNTaskPtrList = std::list; /*! * KNNTask */ class KNNTask : public BthreadTask { public: //! Constructor KNNTask(index::SegmentPtr segment, KNNQueryContext *context); //! Constructor KNNTask(const std::string &name, index::SegmentPtr segment, KNNQueryContext *context); //! Destructor ~KNNTask() override; public: //! Retrieve result of knn_search const std::vector &result() const; private: //! Run search task int do_run() override; private: //! Segment handle index::SegmentPtr segment_{nullptr}; //! KnnQueryContext handler KNNQueryContext *context_{nullptr}; //! Query Result, corresponding to the field of proto::QueryResponse std::vector result_{}; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/meta_wrapper.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "meta_wrapper.h" #include "common/error_code.h" #include "common/logger.h" namespace proxima { namespace be { namespace query { namespace { static bool FindIf(const std::string &name, const meta::ColumnMetaPtrList &columns) { return std::any_of(columns.begin(), columns.end(), [&name](const meta::ColumnMetaPtr &meta) { return meta->name() == name; }); } static int CheckCollection(meta::CollectionMetaPtr meta) { if (!meta) { return PROXIMA_BE_ERROR_CODE(InexistentCollection); } else if (!meta->readable()) { return PROXIMA_BE_ERROR_CODE(UnreadableCollection); } return 0; } } // namespace MetaWrapper::MetaWrapper(meta::MetaServicePtr meta_service) : meta_service_(std::move(meta_service)) {} int MetaWrapper::validate(const std::string &collection, const ColumnNameList &columns) const { auto meta = meta_service_->get_current_collection(collection); int code = CheckCollection(meta); if (code == 0) { for (auto &column : columns) { if (!FindIf(column, meta->index_columns())) { return PROXIMA_BE_ERROR_CODE(InexistentColumn); } } } return code; } int MetaWrapper::validate_collection(const std::string &collection) const { auto meta = meta_service_->get_current_collection(collection); return CheckCollection(meta); } int MetaWrapper::validate_column(const std::string &collection, const std::string &column) const { auto meta = meta_service_->get_current_collection(collection); int code = CheckCollection(meta); if (code == 0) { if (!FindIf(column, meta->index_columns())) { code = PROXIMA_BE_ERROR_CODE(InexistentColumn); } } return code; } int MetaWrapper::list_columns(const std::string &collection, uint64_t revision, ColumnNameList *columns) const { meta::CollectionMetaPtr meta = meta_service_->get_collection(collection, revision); if (!meta) { LOG_ERROR("Can't get the collection meta with specified revision[%zu]", (size_t)revision); return PROXIMA_BE_ERROR_CODE(InvalidRevision); } columns->insert(columns->end(), meta->forward_columns().begin(), meta->forward_columns().end()); return 0; } DataTypes MetaWrapper::get_data_type(const std::string &collection, const std::string &column_name) { auto meta = meta_service_->get_current_collection(collection); if (!meta) { LOG_ERROR("Can't get the collection meta. collection[%s]", collection.c_str()); return DataTypes::UNDEFINED; } auto column = meta->column_by_name(column_name); if (column) { return column->data_type(); } else { LOG_ERROR("Collection has not column. collection[%s] column[%s]", collection.c_str(), column_name.c_str()); } return DataTypes::UNDEFINED; } } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/meta_wrapper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include "meta/meta_service.h" namespace proxima { namespace be { namespace query { //! Predefine class class MetaWrapper; //! Alias for ColumnNameList using ColumnNameList = std::vector; using MetaWrapperPtr = std::shared_ptr; /*! * MetaWrapper */ class MetaWrapper { public: //! Constructor explicit MetaWrapper(meta::MetaServicePtr meta_service); public: //! validate collection and columns int validate(const std::string &collection, const ColumnNameList &columns) const; //! validate collection int validate_collection(const std::string &collection) const; //! validate collection and column int validate_column(const std::string &collection, const std::string &column) const; //! list all the columns int list_columns(const std::string &collection, uint64_t revision, ColumnNameList *columns) const; //! get data type by column DataTypes get_data_type(const std::string &collection, const std::string &column); private: //! Meta service handler meta::MetaServicePtr meta_service_{nullptr}; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/query.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Oct 2020 * \brief */ #pragma once #include #include "common/profiler.h" #include "query_types.h" namespace proxima { namespace be { namespace query { //! Predefine class class Query; //! Alias for QueryPtr using QueryPtr = std::shared_ptr; /*! * Query Interface */ class Query { public: //! Destructor virtual ~Query() = default; public: //! Unique request id, using trace all relevant information virtual uint64_t id() const = 0; //! Validate query object, 0 for valid, otherwise non zero returned virtual int validate() const = 0; //! Retrieve IOMode of query virtual IOMode mode() const = 0; //! Retrieve the type of query, Readonly virtual QueryType type() const = 0; //! Prepare resources, 0 for success, otherwise failed virtual int prepare() = 0; //! Evaluate query, and collection feedback virtual int evaluate() = 0; //! Finalize query object virtual int finalize() = 0; /* Common usage of query * 1. get query object * 2. invoke invalidate * 3. invoke prepare * 4. invoke evaluate * 5. collect all the feedback from query * 6. Handle query finished */ //! Get Profiler virtual ProfilerPtr profiler() const = 0; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/query_agent.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #include "query_agent.h" #include "common/config.h" #include "common/profiler.h" #include "query_service_builder.h" namespace proxima { namespace be { namespace query { /*! * QueryAgent implementation */ class QueryAgentImpl : public QueryAgent { public: //! Constructor explicit QueryAgentImpl(QueryServicePtr query_service) : query_service_(std::move(query_service)), stopped_(false) {} //! Destructor ~QueryAgentImpl() override = default; public: //! Get Query Service Instance QueryServicePtr get_service() const override { return query_service_; } public: //! Query Service int search(const proto::QueryRequest *query, proto::QueryResponse *response) override { int error_code = PROXIMA_BE_ERROR_CODE(StoppedService); if (!is_running()) { LOG_WARN("QueryAgent stopped, invoke start and try again."); return error_code; } ProfilerPtr profiler = std::make_shared(query->debug_mode()); profiler->start(); error_code = query_service_->search(query, response, profiler); profiler->stop(); if (profiler->enabled()) { response->set_debug_info(profiler->as_json_string()); } return error_code; } //! Query Service int search_by_key(const proto::GetDocumentRequest *query, proto::GetDocumentResponse *response) override { if (!is_running()) { LOG_WARN("QueryAgent stopped, invoke start and try again."); return PROXIMA_BE_ERROR_CODE(StoppedService); } ProfilerPtr profiler = std::make_shared(query->debug_mode()); profiler->start(); int error_code = query_service_->search_by_key(query, response, profiler); profiler->stop(); if (profiler->enabled()) { response->set_debug_info(profiler->as_json_string()); } return error_code; } public: //! Init Query Agent int init() override { LOG_INFO("QueryAgent initialize complete."); return 0; } //! Cleanup Query Agent int cleanup() override { int error_code = query_service_->cleanup(); if (error_code == 0) { LOG_INFO("QueryAgent cleanup complete."); } else { LOG_ERROR("QueryAgent cleanup failed. code[%d], what[%s]", error_code, ErrorCode::What(error_code)); } return error_code; } //! Start background service int start() override { stopped_.store(false); LOG_INFO("QueryAgent start complete."); return 0; } //! Stop background service int stop() override { LOG_INFO("QueryAgent stopped."); stopped_.store(true); return 0; } //! Check QueryAgent is running int is_running() override { return !stopped_; } private: //! Handler for query service QueryServicePtr query_service_{nullptr}; //! Stopped flag std::atomic_bool stopped_{false}; }; //! Create one QueryAgent instance //! @param: concurrency: the buckets of execution queue, equal 0, means // using hardware concurrency QueryAgentPtr QueryAgent::Create(index::IndexServicePtr index_service, meta::MetaServicePtr meta_service, uint32_t concurrency) { return std::make_shared(QueryServiceBuilder::Create( std::move(index_service), std::move(meta_service), concurrency)); } } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/query_agent.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #pragma once #include "query_service.h" namespace proxima { namespace be { namespace query { //! Predefine class class QueryAgent; //! Alias Pointer for QueryAgent using QueryAgentPtr = std::shared_ptr; /*! * QueryAgent interface */ class QueryAgent { public: //! Create one QueryAgent instance //! @param: concurrency: the buckets of execution queue, equal 0, means // using hardware concurrency static QueryAgentPtr Create(index::IndexServicePtr index_service, meta::MetaServicePtr meta_service, uint32_t concurrency); public: //! Destructor virtual ~QueryAgent() = default; //! Get Query Service Instance virtual QueryServicePtr get_service() const = 0; public: //! Query Service virtual int search(const proto::QueryRequest *query, proto::QueryResponse *response) = 0; //! Query document by key virtual int search_by_key(const proto::GetDocumentRequest *query, proto::GetDocumentResponse *response) = 0; public: //! Init Query Agent virtual int init() = 0; //! Cleanup Query Agent virtual int cleanup() = 0; //! Start background service virtual int start() = 0; //! Stop background service virtual int stop() = 0; //! Return running status virtual int is_running() = 0; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/query_factory.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "query_factory.h" #include #include "common/error_code.h" #include "common/logger.h" #include "equal_query.h" #include "knn_query.h" #include "meta_wrapper.h" namespace proxima { namespace be { namespace query { namespace { static uint64_t SequenceTraceId() { static std::atomic kTraceID(0); return kTraceID++; } /*! * DummyQuery implementation */ class DummyQuery : public Query { public: //! Destructor ~DummyQuery() override = default; public: //! Unique request id, using trace all relevant information uint64_t id() const override { return 0; } //! Validate query object, 0 for valid, otherwise non zero returned int validate() const override { return PROXIMA_BE_ERROR_CODE(RuntimeError); } //! Retrieve IOMode of query IOMode mode() const override { return IOMode::READONLY; } //! Retrieve the type of query, Readonly QueryType type() const override { return QueryType::UNDEFINED; } //! Prepare resources, 0 for success, otherwise failed int prepare() override { return PROXIMA_BE_ERROR_CODE(RuntimeError); } //! Evaluate query, and collection feedback int evaluate() override { return PROXIMA_BE_ERROR_CODE(RuntimeError); } int finalize() override { return PROXIMA_BE_ERROR_CODE(RuntimeError); } ProfilerPtr profiler() const override { return nullptr; } }; } // namespace QueryPtr QueryFactory::Create(const proto::QueryRequest *request, index::IndexServicePtr index_service, MetaWrapperPtr meta_service, ExecutorPtr executor, ProfilerPtr profiler, proto::QueryResponse *response) { static QueryPtr kDummyQuery = std::make_shared(); uint64_t trace_id = SequenceTraceId(); QueryPtr query = kDummyQuery; proto::QueryRequest::QueryType type = request->query_type(); LOG_DEBUG("Received request, trace_id[%zu], type[%d]", (size_t)trace_id, type); switch (type) { case proto::QueryRequest_QueryType_QT_KNN: query.reset(new (std::nothrow) KNNQuery(trace_id, request, index_service, meta_service, executor, profiler, response)); break; default: LOG_ERROR("Ignore unknown query."); break; } return query; } //! Factory method, build one Query Object QueryPtr QueryFactory::Create(const proto::GetDocumentRequest *request, index::IndexServicePtr index_service, MetaWrapperPtr meta_service, ExecutorPtr executor, ProfilerPtr profiler, proto::GetDocumentResponse *response) { uint64_t trace_id = SequenceTraceId(); auto query = std::make_shared(trace_id, request, index_service, meta_service, executor, profiler, response); return query; } } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/query_factory.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include "executor/executor.h" #include "context.h" #include "meta_wrapper.h" #include "query.h" namespace proxima { namespace be { namespace query { /*! * Create query object from pb.request */ class QueryFactory { public: //! Factory method, build one Query Object from PB Request // Valid Query Object returned on success, otherwise return DUMMY OBJECT static QueryPtr Create(const proto::QueryRequest *request, index::IndexServicePtr index_service, MetaWrapperPtr meta_service, ExecutorPtr executor, ProfilerPtr profiler, proto::QueryResponse *response); //! Factory method, build one Query Object static QueryPtr Create(const proto::GetDocumentRequest *request, index::IndexServicePtr index_service, MetaWrapperPtr meta_service, ExecutorPtr executor, ProfilerPtr profiler, proto::GetDocumentResponse *response); }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/query_service.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "query_service.h" #include #include "common/error_code.h" #include "common/logger.h" #include "executor/parallel_executor.h" #include "meta_wrapper.h" #include "query_factory.h" #include "query_service_builder.h" namespace proxima { namespace be { namespace query { /*! * QueryService Implementation */ class QueryServiceImpl : public QueryService { public: //! Destructor QueryServiceImpl(index::IndexServicePtr index_service, MetaWrapperPtr meta_service, ExecutorPtr executor) : index_service_(std::move(index_service)), meta_service_(std::move(meta_service)), executor_(std::move(executor)) {} //! Destructor ~QueryServiceImpl() override = default; public: //! Initialized flag bool initialized() const override { return index_service_ && meta_service_ && executor_; } //! Query Service int search(const proto::QueryRequest *request, proto::QueryResponse *response, ProfilerPtr profiler) override { if (!initialized() || !request || !response || !profiler) { return PROXIMA_BE_ERROR_CODE(RuntimeError); } // Do not change the sequence of following statements, we need more // specific profiling data with debug mode enabled. // Step1: Create Query profiler->open_stage("before_process_query"); ailego::ElapsedTime timer; auto query = QueryFactory::Create(request, index_service_, meta_service_, executor_, profiler, response); profiler->close_stage(); // Step2: Process Query int code = process_query(query, profiler); if (code != 0) { LOG_ERROR("Process query failed. code[%d] what[%s]", code, ErrorCode::What(code)); return code; } // Stage3: After Process Query profiler->open_stage("after_process_query"); uint32_t result_counts = 0; for (int i = 0; i < response->results_size(); i++) { result_counts += response->results(i).documents_size(); } LOG_INFO( "Knn search success. query_id[%zu] batch_count[%u] topk[%u] " "is_linear[%d] " "resnum[%u] rt[%zuus] collection[%s]", (size_t)query->id(), request->knn_param().batch_count(), request->knn_param().topk(), request->knn_param().is_linear(), result_counts, (size_t)timer.micro_seconds(), request->collection_name().c_str()); profiler->close_stage(); return code; } //! Query Service int search_by_key(const proto::GetDocumentRequest *request, proto::GetDocumentResponse *response, ProfilerPtr profiler) override { if (!initialized() || !request || !response || !profiler) { return PROXIMA_BE_ERROR_CODE(RuntimeError); } ailego::ElapsedTime timer; auto query = QueryFactory::Create(request, index_service_, meta_service_, executor_, profiler, response); int code = process_query(query, profiler); if (code != 0) { LOG_ERROR("Process query failed. code[%d] what[%s]", code, ErrorCode::What(code)); return code; } uint32_t result_counts = response->has_document() ? 1 : 0; LOG_INFO( "Kv search success. query_id[%zu] pk[%zu] resnum[%u] rt[%zuus] " "collection[%s]", (size_t)query->id(), (size_t)request->primary_key(), result_counts, (size_t)timer.micro_seconds(), request->collection_name().c_str()); return code; } //! Cleanup QueryService int cleanup() override { index_service_.reset(); meta_service_.reset(); executor_.reset(); return 0; } private: // Process query int process_query(QueryPtr query, ProfilerPtr profiler) { profiler->add("query_id", query->id()); profiler->open_stage("query"); int code = query->validate(); if (code == 0) { code = query->prepare(); if (code == 0) { code = query->evaluate(); } else { LOG_ERROR( "Failed to prepare resource for query. trace_id[%zu], code[%d]", (size_t)query->id(), code); } } else { LOG_ERROR("Can't validate query, skip it and continue"); } query->finalize(); LOG_DEBUG("Query [%zu] have been finished", (size_t)query->id()); profiler->close_stage(); return code; } private: //! IndexService Handler index::IndexServicePtr index_service_{nullptr}; //! MetaService Handler MetaWrapperPtr meta_service_{nullptr}; //! Executor ExecutorPtr executor_{nullptr}; }; QueryServicePtr QueryServiceBuilder::Create( index::IndexServicePtr index_service, meta::MetaServicePtr meta_service, uint32_t concurrency) { if (!index_service || !meta_service) { LOG_ERROR( "Create QueryService failed, invalid arguments index_service " "or meta_service"); return nullptr; } if (concurrency == 0) { // Default host concurrency concurrency = Scheduler::HostConcurrency(); } // Share one scheduler between multiple instance of QueryService auto scheduler = Scheduler::Default(); if (scheduler->concurrency() == 0) { LOG_INFO("Set concurrency of query service [%u]", concurrency); scheduler->concurrency(concurrency); } auto meta_wrapper = std::make_shared(meta_service); auto executor = std::make_shared(scheduler); LOG_INFO("QueryService created with parallel executor"); return std::make_shared(index_service, meta_wrapper, executor); } } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/query_service.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include "common/profiler.h" #include "index/index_service.h" #include "meta/meta_service.h" #include "proto/proxima_be.pb.h" namespace proxima { namespace be { namespace query { //! Predefine class class QueryService; //! Alias for QueryService using QueryServicePtr = std::shared_ptr; /*! * QueryService interface */ class QueryService { public: //! Destructor virtual ~QueryService() = default; public: //! Initialized flag virtual bool initialized() const = 0; //! Query Service virtual int search(const proto::QueryRequest *query, proto::QueryResponse *response, ProfilerPtr profiler) = 0; //! Query document by key virtual int search_by_key(const proto::GetDocumentRequest *query, proto::GetDocumentResponse *response, ProfilerPtr profiler) = 0; //! Cleanup QueryService virtual int cleanup() = 0; }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/query_service_builder.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #pragma once #include "query_service.h" namespace proxima { namespace be { namespace query { /*! * Query Service Builder */ class QueryServiceBuilder { public: //! Create one QueryService object //! @param index_service: index_service handler //! @param meta_service: meta_service handler, which used to validate schema //! of collection //! @param concurrency: The max concurrency of execution queue //! @return valid pointer for success, otherwise failed static QueryServicePtr Create(index::IndexServicePtr index_service, meta::MetaServicePtr meta_service, uint32_t concurrency); }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/query/query_types.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Oct 2020 * \brief */ #pragma once namespace proxima { namespace be { namespace query { /** * Operator class listed all supported operation in DSL or query */ enum QueryType { // Undefined query type UNDEFINED, // K-NearestNeighbor KNN, // Equal operator, EQUAL }; /*! * IOMode of query */ enum class IOMode { READONLY, READWRITE, }; } // namespace query } // namespace be } // namespace proxima ================================================ FILE: src/repository/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author Dianzhang.Chen ## \date Dec 2020 ## \brief Detail cmake build script for repository ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) # Retrieve version from git repository git_version(MYSQL_REPOSITORY_VERSION ${CMAKE_CURRENT_SOURCE_DIR}) cc_directory(binlog) cc_directory(repository_common) if(APPLE) set(APPLE_FRAMEWORK_LIBS -framework CoreFoundation -framework CoreGraphics -framework CoreData -framework CoreText -framework Security -framework Foundation -Wl,-U,_MallocExtension_ReleaseFreeMemory -Wl,-U,_ProfilerStart -Wl,-U,_ProfilerStop -Wl,-U,_RegisterThriftProtocol ) endif() cc_proto_library( NAME mysql_repository_proto STATIC SRCS proto/*.proto PROTOROOT ./ ) # proxima_be_repo library cc_library( NAME mysql_repository_lib STATIC STRICT SRCS collection*.cc mysql_collection*.cc lsn_context_*.cc LIBS mysql_binlog proxima_be_proto mysql_repository_common brpc ${CMAKE_DL_LIBS} INCS . .. VERSION "${MYSQL_REPOSITORY_VERSION}" ) # mysql repository binary cc_binary( NAME mysql_repository PACKED SRCS main.cc mysql_repository.cc LIBS OpenSSL.SSL OpenSSL.Crypto mysql_repository_lib mysql_repository_common proxima_be_proto ${CMAKE_THREAD_LIBS_INIT} INCS . .. LDFLAGS ${APPLE_FRAMEWORK_LIBS} ) set_target_properties(mysql_repository PROPERTIES INSTALL_RPATH ${LIB_PATH}) ================================================ FILE: src/repository/binlog/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author dianzhang.cdz ## \date Dec 2020 ## \brief Detail cmake build script for mysql binlog ## include(../../../cmake/bazel.cmake) # mysql_binlog library cc_library( NAME mysql_binlog STATIC STRICT SRCS *.cc LIBS mysql_repository_common proxima_be_proto MySQL.mysqlclient MySQL.strings INCS . .. ../.. VERSION "${PROXIMA_BE_VERSION}" ) ================================================ FILE: src/repository/binlog/binlog_common.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Bin log common definition for proxima search engine */ #pragma once #include "repository/common_types.h" ================================================ FILE: src/repository/binlog/binlog_event.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Bin log event implementation for proxima search engine */ //!!! undef VERSION must be after include my_global.h #include "binlog_event.h" #include #include #include "repository_common/logger.h" #include "log_context.h" namespace proxima { namespace be { namespace repository { static unsigned long GetFieldLength(const char **packet) { static constexpr int ONE_BYTE_THRESHOLD = 251; static constexpr int TWO_BYTE_THRESHOLD = 252; static constexpr int THREE_BYTE_THRESHOLD = 253; const unsigned char *pos = reinterpret_cast(*packet); if (*pos < ONE_BYTE_THRESHOLD) { (*packet)++; return *pos; } if (*pos == ONE_BYTE_THRESHOLD) { (*packet)++; return ((unsigned long)~0); // NULL_LENGTH; } if (*pos == TWO_BYTE_THRESHOLD) { (*packet) += 3; return (unsigned long)uint2korr(pos + 1); } if (*pos == THREE_BYTE_THRESHOLD) { (*packet) += 4; return (unsigned long)uint3korr(pos + 1); } (*packet) += 9; /* Must be 254 when here */ return (unsigned long)uint4korr(pos + 1); } static uint8_t GetUint8(const void *buf) { const uint8_t *ptr = static_cast(buf); return *ptr; } /** * BasicEvent Description * 4 timestamp * 1 event type * 4 server-id * 4 event-size * if binlog-version > 1: * 4 log pos * 2 flags */ BasicEvent::BasicEvent(const char *event_buf, unsigned int length) { data_.assign(event_buf, length); buffer_ = const_cast(data_.data()); buffer_len_ = length; if (buffer_len_ < LOG_EVENT_HEADER_LEN) { LOG_ERROR("Event length check failed. len[%u]", length); is_valid_ = false; } else { type_ = (EventType)buffer_[EVENT_TYPE_OFFSET]; timestamp_ = uint4korr(buffer_); server_id_ = uint4korr(buffer_ + SERVER_ID_OFFSET); log_pos_ = uint4korr(buffer_ + LOG_POS_OFFSET); is_valid_ = true; } } /** * QueryEvent Description * 4 slave_proxy_id * 4 execution time * 1 schema length * 2 error-code * if binlog-version ≥ 4: * 2 status-vars length * string[$len] status-vars * string[$len] schema * 1 [00] * string[EOF] query */ QueryEvent::QueryEvent(const char *buf, unsigned int length) : BasicEvent(buf, length) { if (length < LOG_EVENT_HEADER_LEN + QE_POST_HEADER_SCHEMA_LEN_OFFSET + 1) { LOG_ERROR("Query event length check failed. len[%u]", length); is_valid_ = false; return; } unsigned int offset = LOG_EVENT_HEADER_LEN + QE_POST_HEADER_SCHEMA_LEN_OFFSET; unsigned int db_len = (unsigned int)buf[offset]; unsigned short status_var_len; offset = LOG_EVENT_HEADER_LEN + QE_POST_HEADER_STATUS_LEN_OFFSET; status_var_len = (unsigned short)uint2korr(buf + offset); offset = LOG_EVENT_HEADER_LEN + QE_POST_HEADER_LEN + status_var_len; db_name_.assign(buf + offset, db_len); offset = offset + db_len + 1; query_.assign(buf + offset, length - offset - CRC_LEN); is_valid_ = true; } /** RotateEvent Description if binlog-version > 1 { 8 position } string[p] name of the next binlog */ RotateEvent::RotateEvent(const char *buf, unsigned int length, bool has_crc) : BasicEvent(buf, length) { if (length < LOG_EVENT_HEADER_LEN + RE_POST_HEADER_LEN) { LOG_ERROR("Rotate event length check failed. len[%u]", length); is_valid_ = false; return; } const char *ptr = buf + LOG_EVENT_HEADER_LEN; position_ = (uint64_t)uint8korr(ptr); unsigned int file_len = length - LOG_EVENT_HEADER_LEN - RE_POST_HEADER_LEN; if (has_crc) { file_len -= CRC_LEN; } ptr += sizeof(uint64_t); next_binlog_name_.assign(ptr, file_len); is_valid_ = true; } /** * TableMapEvent Description * post-header: * if post_header_len == 6 { * 4 table id * } else { * 6 table id * } * 2 flags * * payload: * 1 schema name length * string schema name * 1 [00] * 1 table name length * string table name * 1 [00] * lenenc-int column-count * string.var_len [length=$column-count] column-def * lenenc-str column-meta-def * n NULL-bitmask, length: (column-count + 8) / 7 */ TableMapEvent::TableMapEvent(const char *buf, unsigned int length) : BasicEvent(buf, length) { if (length < LOG_EVENT_HEADER_LEN + TME_POST_HEADER_LEN) { LOG_ERROR("TableMap event length check failed. len[%u]", length); is_valid_ = false; return; } const char *ptr = buffer_ + LOG_EVENT_HEADER_LEN; // table id table_id_ = (unsigned long)uint6korr(ptr); ptr += 6; // flags ptr += 2; // schema size_t db_len = *ptr; ptr += 1; database_name_.assign(ptr, db_len); ptr += db_len + 1; // table size_t table_len = *ptr; ptr += 1; table_name_.assign(ptr, table_len); ptr += table_len + 1; // column column_count_ = GetFieldLength(&ptr); column_info_.resize(column_count_); for (unsigned long i = 0; i < column_count_; ++i) { column_info_[i].type = (int32_t)GetUint8(ptr + i); } ptr += column_count_; unsigned int bytes_read = ptr - buffer_; if (bytes_read < length) { field_metadata_size_ = GetFieldLength(&ptr); if (field_metadata_size_ > column_count_ * 2) { return; } decode_meta_data(ptr); ptr += field_metadata_size_; uint8_t *null_bits = (uint8_t *)ptr; for (unsigned long i = 0; i < column_count_; ++i) { if (*(null_bits + i / 8) & (0x01 << (i % 8))) { column_info_[i].nullable = true; } else { column_info_[i].nullable = false; } } } is_valid_ = true; } /** * RowsEvent Description * header: * if post_header_len == 6 { * 4 table id * } else { * 6 table id * } * 2 flags * if version == 2 { * 2 extra-data-length * string.var_len extra-data * } * * body: * lenenc_int number of columns * string.var_len columns-present-bitmap1, length: (num of columns+7)/8 * if UPDATE_ROWS_EVENTv1 or v2 { * string.var_len columns-present-bitmap2, length: (num of columns+7)/8 * } * * rows: * string.var_len nul-bitmap, length (bits set in * 'columns-present-bitmap1'+7)/8 string.var_len value of each field as * defined in table-map if UPDATE_ROWS_EVENTv1 or v2 { string.var_len * nul-bitmap, length (bits set in 'columns-present-bitmap2'+7)/8 string.var_len * value of each field as defined in table-map * } * ... repeat rows until event-end */ RowsEvent::RowsEvent(const char *buf, unsigned int length) : BasicEvent(buf, length) { if (length < LOG_EVENT_HEADER_LEN + ROWS_EVENT_POST_HEADER_LEN) { LOG_ERROR("Row event length check failed. len[%u]", length); is_valid_ = false; return; } const char *ptr = buffer_ + LOG_EVENT_HEADER_LEN; // post header table_id_ = (unsigned long)uint6korr(ptr); ptr += ROWS_EVENT_POST_HEADER_LEN; uint16_t var_header_len = (uint16_t)uint2korr(ptr); if (var_header_len < 2) { LOG_ERROR("RowsEvent var_header_len check failed. len[%u]", var_header_len); is_valid_ = false; } ptr += var_header_len; // body column_count_ = GetFieldLength(&ptr); bits_length_ = (column_count_ + 7) / 8; present_columns_ = (uint8_t *)ptr; ptr += bits_length_; if (type_ == UPDATE_ROWS_EVENT || type_ == UPDATE_ROWS_EVENT_V1) { present_columns_update_ = (uint8_t *)ptr; ptr += bits_length_; } unsigned int bytes_read = ptr - buffer_; if (bytes_read > length) { LOG_ERROR("RowsEvent read bytes check failed. bytes[%u]", bytes_read); is_valid_ = false; } rows_buf_ = ptr; rows_end_ = buffer_ + length - CRC_LEN; cur_buf_ = rows_buf_; is_valid_ = true; } void TableMapEvent::decode_meta_data(const char *ptr) { for (unsigned long i = 0; i < column_count_; ++i) { ColumnInfo &info = column_info_[i]; switch (info.type) { case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_BLOB: case MYSQL_TYPE_MEDIUM_BLOB: case MYSQL_TYPE_LONG_BLOB: case MYSQL_TYPE_DOUBLE: case MYSQL_TYPE_FLOAT: case MYSQL_TYPE_GEOMETRY: case MYSQL_TYPE_JSON: info.meta = (int32_t)GetUint8(ptr); ++ptr; break; case MYSQL_TYPE_SET: case MYSQL_TYPE_ENUM: LOG_WARN("This type cannot exist in binlog."); break; case MYSQL_TYPE_STRING: info.meta = ((int32_t)GetUint8(ptr)) << 8; // real type info.meta += (int32_t)GetUint8(ptr + 1); // field length ptr += 2; break; case MYSQL_TYPE_BIT: info.meta = (int32_t)uint2korr(ptr); ptr += 2; break; case MYSQL_TYPE_VARCHAR: info.meta = (int32_t)uint2korr(ptr); ptr += 2; break; case MYSQL_TYPE_NEWDECIMAL: info.meta = ((int32_t)GetUint8(ptr)) << 8; // precision info.meta += (int32_t)GetUint8(ptr + 1); // decimals ptr += 2; break; case MYSQL_TYPE_TIME2: case MYSQL_TYPE_DATETIME2: case MYSQL_TYPE_TIMESTAMP2: { info.meta = (int32_t)GetUint8(ptr); ++ptr; break; } default: info.meta = 0; break; } } } void RowsEvent::fill_table_map(const LogContext &context) { table_map_ = context.table_map(); start_position_ = table_map_->log_pos() - table_map_->buffer_length(); } } // end namespace repository } // namespace be } // namespace proxima ================================================ FILE: src/repository/binlog/binlog_event.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Bin log event */ #pragma once #include #include #include namespace proxima { namespace be { namespace repository { class LogContext; /*! Event Type */ enum EventType { UNKNOWN_EVENT = 0, START_EVENT_V3 = 1, QUERY_EVENT = 2, // describe alter table statement STOP_EVENT = 3, ROTATE_EVENT = 4, // describe the end of binlog file INTVAR_EVENT = 5, LOAD_EVENT = 6, SLAVE_EVENT = 7, CREATE_FILE_EVENT = 8, APPEND_BLOCK_EVENT = 9, EXEC_LOAD_EVENT = 10, DELETE_FILE_EVENT = 11, NEW_LOAD_EVENT = 12, RAND_EVENT = 13, USER_VAR_EVENT = 14, FORMAT_DESCRIPTION_EVENT = 15, // the first event in binlog file describe event version XID_EVENT = 16, BEGIN_LOAD_QUERY_EVENT = 17, EXECUTE_LOAD_QUERY_EVENT = 18, TABLE_MAP_EVENT = 19, // describe the rows event's meta PRE_GA_WRITE_ROWS_EVENT = 20, PRE_GA_UPDATE_ROWS_EVENT = 21, PRE_GA_DELETE_ROWS_EVENT = 22, WRITE_ROWS_EVENT_V1 = 23, // describe insert statement UPDATE_ROWS_EVENT_V1 = 24, // describe update statement DELETE_ROWS_EVENT_V1 = 25, // describe delete statement INCIDENT_EVENT = 26, HEARTBEAT_LOG_EVENT = 27, // 5.6 new events IGNORABLE_LOG_EVENT = 28, ROWS_QUERY_LOG_EVENT = 29, WRITE_ROWS_EVENT = 30, // describe insert statement UPDATE_ROWS_EVENT = 31, // describe update statement DELETE_ROWS_EVENT = 32, // describe delete statement GTID_LOG_EVENT = 33, ANONYMOUS_GTID_LOG_EVENT = 34, PREVIOUS_GTIDS_LOG_EVENT = 35, // 5.7 new events TRANSACTION_CONTEXT_EVENT = 36, VIEW_CHANGE_EVENT = 37, XA_PREPARE_LOG_EVENT = 38, ENUM_END_EVENT }; class BasicEvent; class QueryEvent; struct RotateEvent; struct TableMapEvent; struct RowsEvent; using BasicEventPtr = std::shared_ptr; using QueryEventPtr = std::shared_ptr; using RotateEventPtr = std::shared_ptr; using TableMapEventPtr = std::shared_ptr; using RowsEventPtr = std::shared_ptr; /* Basic Event */ class BasicEvent { public: //! Constructor BasicEvent(const char *buf, unsigned int length); //! Destructor virtual ~BasicEvent() = default; //! Get is valid bool is_valid() const { return is_valid_; } //! Get event type EventType type() const { return type_; } //! Get log pos size_t log_pos() const { return log_pos_; } //! Get timestamp time_t timestamp() const { return timestamp_; } //! Get server id unsigned int server_id() const { return server_id_; } //! Get buffer const char *buffer() const { return buffer_; } //! Get event length unsigned int buffer_length() const { return buffer_len_; } //! Get event type offset static int EventTypeOffset() { return EVENT_TYPE_OFFSET; } protected: // Bin log event header, detail // see: https://dev.mysql.com/doc/internals/en/binlog-event-header.html // 4 timestamp // 1 event type // 4 server-id // 4 event-size // 4 log pos // 2 flags static constexpr uint32_t EVENT_TYPE_OFFSET = 4; static constexpr uint32_t SERVER_ID_OFFSET = 5; static constexpr uint32_t EVENT_LEN_OFFSET = 9; static constexpr uint32_t LOG_POS_OFFSET = 13; static constexpr uint32_t LOG_EVENT_HEADER_LEN = 19; static constexpr uint32_t CRC_LEN = 4; protected: //! Members bool is_valid_{false}; EventType type_{UNKNOWN_EVENT}; size_t log_pos_{0}; time_t timestamp_{0}; unsigned int server_id_{0}; char *buffer_{nullptr}; unsigned int buffer_len_{0}; std::string data_{}; }; /* Query event */ class QueryEvent : public BasicEvent { public: //! Constructor QueryEvent(const char *buf, unsigned int length); //! Destructor ~QueryEvent() = default; //! Get database const std::string &db_name() const { return db_name_; } //! Get query string const std::string &query() const { return query_; } private: // Query event Post-header, detail see: // https://dev.mysql.com/doc/internals/en/query-event.html // 4 slave_proxy_id // 4 execution time // 1 schema length // 2 error-code // 2 status-vars length static constexpr uint32_t QE_POST_HEADER_SCHEMA_LEN_OFFSET = 8; static constexpr uint32_t QE_POST_HEADER_STATUS_LEN_OFFSET = 11; static constexpr uint32_t QE_POST_HEADER_LEN = 13; private: //! Members std::string db_name_{}; std::string query_{}; }; /* Rotate event */ struct RotateEvent : public BasicEvent { public: //! Constructor RotateEvent(const char *buf, unsigned int length, bool has_crc); //! Destructor ~RotateEvent() = default; //! Get next binlog file name const std::string &next_binlog_name() const { return next_binlog_name_; } //! Get binlog position uint64_t position() const { return position_; } private: // Rotate event Post-header, detail see: // https://dev.mysql.com/doc/internals/en/rotate-event.html // 8 position static constexpr uint32_t RE_POST_HEADER_LEN = 8; private: //! Members std::string next_binlog_name_{}; uint64_t position_{0}; }; /* Column Info */ struct ColumnInfo { int32_t type; int32_t meta; bool nullable; }; /* Table Map Event */ struct TableMapEvent : public BasicEvent { public: //! Constructor TableMapEvent(const char *buf, unsigned int length); //! Destructor ~TableMapEvent() = default; //! Get table id unsigned long table_id() const { return table_id_; } //! Get Table name const std::string &table_name() const { return table_name_; } //! Get database name const std::string &database_name() const { return database_name_; } //! Get Column info const ColumnInfo &column_info(size_t id) { return column_info_[id]; } private: //! Decode meta data void decode_meta_data(const char *ptr); private: // Table map event post-header, see detail: // https://dev.mysql.com/doc/internals/en/table-map-event.html // post-header: // 6 table id // 2 flags static constexpr uint32_t TME_POST_HEADER_LEN = 8; private: //! Members unsigned long table_id_{0}; std::string table_name_{}; std::string database_name_{}; unsigned long column_count_{0}; unsigned long field_metadata_size_{0}; std::vector column_info_{}; }; /* Rows event */ struct RowsEvent : public BasicEvent { public: //! Constructor RowsEvent(const char *buf, unsigned int length); //! Destructor ~RowsEvent() = default; //! Fill table map void fill_table_map(const LogContext &context); //! Get table map TableMapEventPtr table_map() const { return table_map_; } //! Get table id unsigned long table_id() const { return table_id_; } //! Get column count unsigned long column_count() const { return column_count_; } //! Get bits length unsigned long bits_length() const { return bits_length_; } //! Get present columns uint8_t *present_columns() const { return present_columns_; } //! Get present columns update uint8_t *present_columns_update() const { return present_columns_update_; } //! Get rows buf const void *rows_buf() const { return rows_buf_; } //! Get rows end const void *rows_end() const { return rows_end_; } //! Get current buf const void *cur_buf() const { return cur_buf_; } //! Set current buf void set_cur_buf(const void *buf) { cur_buf_ = buf; } //! Is finished bool is_finished() const { return cur_buf_ == rows_end_; } //! Get start position uint64_t start_position() const { return start_position_; } private: // Rows event post-header, see detail: // https://dev.mysql.com/doc/internals/en/rows-event.html // header: // 6 table id // 2 flags // 2 extra-data-length // string.var_len extra-data static constexpr uint32_t ROWS_EVENT_POST_HEADER_LEN = 8; private: //! Members unsigned long table_id_{0}; unsigned long column_count_{0}; unsigned long bits_length_{0}; uint64_t start_position_{0}; uint8_t *present_columns_{nullptr}; uint8_t *present_columns_update_{nullptr}; const void *rows_buf_{nullptr}; const void *rows_end_{nullptr}; const void *cur_buf_{nullptr}; TableMapEventPtr table_map_{}; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/binlog_reader.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Binlog reader interface implementation for proxima search * engine */ #include "binlog_reader.h" #include #include #include "repository/repository_common/error_code.h" #include "repository_common/logger.h" #include "binlog_common.h" namespace proxima { namespace be { namespace repository { BinlogReader::BinlogReader(const std::string &table_name, InfoFetcherPtr info_fetcher, MysqlConnectorManagerPtr mgr) : table_name_(table_name), info_fetcher_(std::move(info_fetcher)), connector_mgr_(std::move(mgr)) {} int BinlogReader::init() { RLOG_INFO("Begin init Binlog reader."); // get table schema int ret = info_fetcher_->get_table_schema(table_name_, &table_schema_); if (ret != 0) { RLOG_ERROR("Info fetcher get table schema failed."); return ret; } // create parser parser_ = std::make_shared(table_schema_); // create event fetcher event_fetcher_ = std::make_shared(connector_mgr_); suspended_ = false; RLOG_INFO("Binlog reader init success."); return 0; } int BinlogReader::start(const LsnContext &context) { RLOG_INFO("Begin start binlog reader. file[%s] position[%zu]", context.file_name.c_str(), (size_t)context.position); int ret = event_fetcher_->init(context.file_name, context.position); if (ret != 0) { RLOG_ERROR("Init event fetcher failed."); return ret; } log_context_.update_lsn(context.file_name, context.position); RLOG_INFO("End start binlog reader."); return 0; } int BinlogReader::get_next_row_data(WriteRequest::Row *row_data, LsnContext *context) { if (suspended_) { return ErrorCode_Suspended; } stop_fetch_ = false; context->status = RowDataStatus::NORMAL; int ret = process_remain_events(row_data, context); if (ret != 0) { RLOG_ERROR("Process remain events failed."); return ret; } while (!stop_fetch_) { // process alter table schema if (schema_changed_) { context->status = RowDataStatus::SCHEMA_CHANGED; schema_changed_ = false; break; } BasicEventPtr event; ret = event_fetcher_->fetch(&event); if (ret == 0) { if (!event->is_valid()) { continue; } switch (event->type()) { case QUERY_EVENT: ret = process_query_event(event); break; case TABLE_MAP_EVENT: process_table_map_event(event); break; case WRITE_ROWS_EVENT: case UPDATE_ROWS_EVENT: case DELETE_ROWS_EVENT: case WRITE_ROWS_EVENT_V1: case UPDATE_ROWS_EVENT_V1: case DELETE_ROWS_EVENT_V1: ret = process_rows_event(event, row_data, context); break; case ROTATE_EVENT: process_rotate_event(event); default: break; } } else if (ret == ErrorCode_BinlogNoMoreData) { context->status = RowDataStatus::NO_MORE_DATA; break; } if (ret != 0) { RLOG_ERROR("Fetch next event failed."); return ret; } } context->file_name = log_context_.file_name(); // Debug if (context->status != RowDataStatus::NO_MORE_DATA) { RLOG_DEBUG("primary_key[%zu] status[%d]", (size_t)row_data->primary_key(), context->status); } return 0; } int BinlogReader::process_query_event(BasicEventPtr event) { QueryEventPtr query_event = std::dynamic_pointer_cast(event); if (!query_event) { RLOG_ERROR("Dynamic cast to query event failed."); return ErrorCode_LogicError; } if (!is_alter_table_statement(query_event->query())) { return 0; } // TODO need parse the alter statement next version int ret = info_fetcher_->get_table_schema(table_name_, &table_schema_); if (ret == ErrorCode_InvalidCollectionConfig) { suspended_ = true; RLOG_ERROR( "Table schema and collection config mismatched, " "reader enter suspended status."); return ret; } else if (ret != 0) { query_event_ = std::move(query_event); RLOG_ERROR("Info fetcher get table schema failed."); return ret; } parser_->update_schema(table_schema_); schema_changed_ = true; return 0; } void BinlogReader::process_rotate_event(BasicEventPtr event) { RotateEventPtr rotate_event = std::dynamic_pointer_cast(event); if (!rotate_event) { RLOG_ERROR("Dynamic pointer cast to RotateEvent failed."); return; } log_context_.update_lsn(rotate_event->next_binlog_name(), rotate_event->position()); RLOG_DEBUG("Rotate event info. file[%s] position[%zu]", rotate_event->next_binlog_name().c_str(), (size_t)rotate_event->position()); } void BinlogReader::process_table_map_event(BasicEventPtr event) { TableMapEventPtr map_event = std::dynamic_pointer_cast(event); if (!map_event) { RLOG_ERROR("Dynamic pointer cast to TableMapEvent failed."); skipped_event_ = true; return; } // Is current table's table_map bool is_current_table = (ailego::StringHelper::CompareIgnoreCase(map_event->database_name(), info_fetcher_->database())) && (ailego::StringHelper::CompareIgnoreCase(map_event->table_name(), table_name_)); if (is_current_table) { log_context_.update_table_map(map_event); skipped_event_ = false; } else { skipped_event_ = true; } } int BinlogReader::process_rows_event(BasicEventPtr event, WriteRequest::Row *row_data, LsnContext *context) { if (skipped_event_) { return 0; } rows_event_ = std::dynamic_pointer_cast(event); if (!rows_event_) { RLOG_ERROR("Dynamic pointer cast to RowsEvent failed."); return ErrorCode_RuntimeError; } rows_event_->fill_table_map(log_context_); int ret = parser_->parse(rows_event_.get(), row_data, context); if (ret != 0) { rows_event_.reset(); return ret; } if (rows_event_->is_finished()) { rows_event_.reset(); } stop_fetch_ = true; return 0; } int BinlogReader::process_remain_rows(WriteRequest::Row *row_data, LsnContext *context) { if (rows_event_ && rows_event_->is_finished()) { return 0; } int ret = parser_->parse(rows_event_.get(), row_data, context); if (ret != 0) { rows_event_.reset(); RLOG_ERROR("Parse rows event failed."); return ret; } if (rows_event_->is_finished()) { rows_event_.reset(); } stop_fetch_ = true; return 0; } int BinlogReader::process_remain_query_event() { int ret = info_fetcher_->get_table_schema(table_name_, &table_schema_); if (ret != 0) { RLOG_ERROR("Info fetcher get table schema failed."); return ret; } parser_->update_schema(table_schema_); schema_changed_ = true; query_event_.reset(); return 0; } int BinlogReader::process_remain_events(WriteRequest::Row *row_data, LsnContext *context) { // process multiply rows in a rows event if (rows_event_) { int ret = process_remain_rows(row_data, context); if (ret != 0) { RLOG_ERROR("Process remain rows event failed."); } stop_fetch_ = true; return ret; } // repeated process query event if (query_event_) { int ret = process_remain_query_event(); if (ret != 0) { stop_fetch_ = true; RLOG_ERROR("Process remain query event failed."); } return ret; } return 0; } bool BinlogReader::is_alter_table_statement(const std::string &query) { enum State { SP0, A0, L0, T0, E0, R, SP1, T1, A1, B, L1, E1 }; State state = SP0; for (auto i = query.begin(); i != query.end(); ++i) { if (state == SP0 && (*i == ' ' || *i == '\t' || *i == '\r' || *i == '\n')) { } else if (state == SP0 && (*i == 'a' || *i == 'A')) { state = A0; } else if (state == A0 && (*i == 'l' || *i == 'L')) { state = L0; } else if (state == L0 && (*i == 't' || *i == 'T')) { state = T0; } else if (state == T0 && (*i == 'e' || *i == 'E')) { state = E0; } else if (state == E0 && (*i == 'r' || *i == 'R')) { state = R; } else if (state == R && (*i == ' ' || *i == '\t' || *i == '\r' || *i == '\n')) { state = SP1; } else if (state == SP1 && (*i == ' ' || *i == '\t' || *i == '\r' || *i == '\n')) { } else if (state == SP1 && (*i == 't' || *i == 'T')) { state = T1; } else if (state == T1 && (*i == 'a' || *i == 'A')) { state = A1; } else if (state == A1 && (*i == 'b' || *i == 'B')) { state = B; } else if (state == B && (*i == 'l' || *i == 'L')) { state = L1; } else if (state == L1 && (*i == 'e' || *i == 'E')) { state = E1; } else if (state == E1) { return true; } else { return false; } } return false; } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/binlog_reader.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Binlog reader interface definition for proxima search engine */ #pragma once #include "event_fetcher.h" #include "log_context.h" #include "mysql_reader.h" #include "rows_event_parser.h" namespace proxima { namespace be { namespace repository { /*! Bin Log Handler */ class BinlogReader : public MysqlReader { public: //! Constructor BinlogReader(const std::string &table_name, InfoFetcherPtr info_fetcher, MysqlConnectorManagerPtr mgr); //! Destructor ~BinlogReader() = default; //! Init Binlog reader int init() override; // Start Binlog reader int start(const LsnContext &context) override; //! Get row data from binlog int get_next_row_data(WriteRequest::Row *row_data, LsnContext *context) override; //! Get Table Schema TableSchemaPtr get_table_schema() const override { return table_schema_; } //! Get Info Fetcher InfoFetcherPtr get_info_fetcher() const override { return info_fetcher_; } private: //! Process query event int process_query_event(BasicEventPtr event); //! Process rotate event void process_rotate_event(BasicEventPtr event); //! Process table map event void process_table_map_event(BasicEventPtr event); //! Process rows event int process_rows_event(BasicEventPtr event, WriteRequest::Row *row_data, LsnContext *context); //! Process remain rows event int process_remain_rows(WriteRequest::Row *row_data, LsnContext *context); //! Process remain query event int process_remain_query_event(); //! Process remain events int process_remain_events(WriteRequest::Row *row_data, LsnContext *context); //! Judge query is alter table statement bool is_alter_table_statement(const std::string &query); private: //! Table name std::string table_name_{}; //! Skipped event bool skipped_event_{false}; //! Stop fetch next event bool stop_fetch_{false}; //! Current schema changed bool schema_changed_{false}; //! Binlog reader suspended bool suspended_{false}; //! Table schema TableSchemaPtr table_schema_{}; //! Info fetcher InfoFetcherPtr info_fetcher_{}; //! Mysql connector manager MysqlConnectorManagerPtr connector_mgr_{}; //! Event fetcher EventFetcherPtr event_fetcher_{}; //! Rows Event RowsEventPtr rows_event_{}; //! Query Event QueryEventPtr query_event_{}; //! Rows event parser RowsEventParserPtr parser_{}; //! Log context LogContext log_context_{}; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/event_fetcher.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Event fetcher interface implementation for proxima search engine */ #include //!!! undef VERSION must be after include my_global.h #include #include #include #include "repository_common/error_code.h" #include "repository_common/logger.h" #include "event_fetcher.h" #include "sql_builder.h" namespace proxima { namespace be { namespace repository { EventFetcher::EventFetcher(MysqlConnectorManagerPtr mgr) : MysqlConnectorProxy(mgr) {} int EventFetcher::init(const std::string &file_name, uint64_t position) { int ret = init_connector(); if (ret != 0) { LOG_ERROR("Mysql connector proxy init failed."); return ret; } ret = turnoff_checksum(); if (ret != 0) { LOG_ERROR("Turnoff checksum failed."); return ret; } ret = update_lsn_info(file_name, position); if (ret != 0) { LOG_ERROR("Update lsn info failed."); return ret; } ret = request_dump(file_name_, position_); if (ret != 0) { LOG_ERROR("Send dump request to master failed. file[%s] position[%zu]", file_name_.c_str(), (size_t)position_); return ret; } return 0; } int EventFetcher::turnoff_checksum() { std::string sql = SqlBuilder::BuildTurnoffCheckSumSql(); int ret = connector_->execute_query(sql, nullptr, true); if (ret != 0) { LOG_ERROR("Connector xecute query failed. sql[%s]", sql.c_str()); return ret; } return 0; } int EventFetcher::update_lsn_info(const std::string &file_name, uint64_t position) { // check file_name+position is valid lsn std::string sql = SqlBuilder::BuildSelectEventsSql(file_name, position); MysqlResultWrapperPtr events_result; int ret = connector_->execute_query(sql, &events_result, true); if (ret == 0) { file_name_ = file_name; position_ = position; return 0; } LOG_ERROR("Current lsn info is invalid, skipped. file_name[%s] position[%zu]", file_name.c_str(), (size_t)position); // get latest file_name+position sql = SqlBuilder::BuildShowBinaryLogsSql(); MysqlResultWrapperPtr result; ret = connector_->execute_query(sql, &result, true); if (ret != 0) { LOG_ERROR("Show binary logs failed. sql[%s]", sql.c_str()); return ret; } if (!result) { LOG_ERROR("Mysql result wrapper is nullptr."); return ErrorCode_ExecuteMysql; } ret = get_latest_lsn(file_name, *result); if (ret != 0) { return ret; } return 0; } int EventFetcher::get_latest_lsn(const std::string &file_name, MysqlResultWrapper &result) { if (result.fields_num() != 2) { LOG_ERROR("Mysql result's fields num mismatched. fields[%u]", result.fields_num()); return ErrorCode_InvalidMysqlResult; } MysqlRow *row = result.next(); std::vector files; while (row) { std::string key(row->field_value(0), row->field_length(0)); if (file_name.compare(key) < 0) { file_name_ = key; position_ = 4; // binlog file start position LOG_INFO("Bin log lsn updated. file_name[%s] position[%zu]", file_name_.c_str(), (size_t)position_); break; } row = result.next(); } if (row != nullptr) { return 0; } else { return ErrorCode_RuntimeError; } } /* dump request format * binlog-pos(4)|flags(2)|server_id(4)|binlog-filename(EOF)| */ int EventFetcher::request_dump(const std::string &file_name, uint64_t position) { unsigned char buf[512]; unsigned char *ptr_buf = buf; int4store(ptr_buf, (uint32)position); ptr_buf += 4; int2store(ptr_buf, BINLOG_DUMP_NON_BLOCK); ptr_buf += 2; if (server_id_ == 0) { server_id_ = generate_server_id(); } int4store(ptr_buf, server_id_); ptr_buf += 4; memcpy(ptr_buf, file_name.c_str(), file_name.size()); ptr_buf += file_name.size(); size_t command_size = ptr_buf - buf; int ret = connector_->execute_simple_command(COM_BINLOG_DUMP, buf, command_size); if (ret != 0) { LOG_ERROR("Execute COM_BINLOG_DUMP command failed. code[%d]", ret); return ret; } return 0; } uint32_t EventFetcher::generate_server_id() { uint32_t server_id = (uint32_t)ailego::Monotime::MicroSeconds(); // protect server id not match the real slave id while (server_id <= 10000) { server_id = (uint32_t)ailego::Monotime::MicroSeconds(); } return server_id; } int EventFetcher::read_data(unsigned long *len) { int ret = 0; // reconnect mysql if (need_reconnect_) { std::this_thread::sleep_for(std::chrono::seconds(1)); if (!connector_->reconnect()) { return ErrorCode_ConnectMysql; } ret = turnoff_checksum(); if (ret != 0) { return ret; } ret = request_dump(file_name_, position_); if (ret != 0) { return ret; } need_reconnect_ = false; event_idx_ = 0; } // read data return connector_->client_safe_read(len); } int EventFetcher::fetch(BasicEventPtr *next_event) { unsigned long len; int ret = read_data(&len); if (ret != 0) { need_reconnect_ = true; LOG_ERROR("Read event failed. code[%d]", ret); return ret; } // check end of data const void *data = connector_->data(); uint8_t flag = (static_cast(data))[0]; if (len < 8 && flag == 254) { need_reconnect_ = true; return ErrorCode_BinlogNoMoreData; } ++event_idx_; const char *buf = static_cast(data) + 1; EventType event_type = (EventType)buf[BasicEvent::EventTypeOffset()]; BasicEventPtr event; switch (event_type) { case QUERY_EVENT: event = std::make_shared(buf, len - 1); break; case ROTATE_EVENT: { bool has_crc = (event_idx_ != 1); event = std::make_shared(buf, len - 1, has_crc); } break; case TABLE_MAP_EVENT: event = std::make_shared(buf, len - 1); break; case WRITE_ROWS_EVENT: case UPDATE_ROWS_EVENT: case DELETE_ROWS_EVENT: case WRITE_ROWS_EVENT_V1: case UPDATE_ROWS_EVENT_V1: case DELETE_ROWS_EVENT_V1: event = std::make_shared(buf, len - 1); break; default: event = std::make_shared(buf, len - 1); break; } if (event->log_pos() != 0) { position_ = (uint64_t)event->log_pos(); } if (event_type == ROTATE_EVENT) { update_rotate_info(event); } *next_event = event; return 0; } void EventFetcher::update_rotate_info(BasicEventPtr event) { RotateEventPtr rotate_event = std::dynamic_pointer_cast(event); if (!rotate_event) { LOG_ERROR("Dynamic pointer cast to RotateEvent failed."); return; } file_name_ = rotate_event->next_binlog_name(); position_ = rotate_event->position(); } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/event_fetcher.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Event fetcher interface definition for proxima search engine */ #pragma once #include "binlog_event.h" #include "mysql_connector.h" namespace proxima { namespace be { namespace repository { class EventFetcher; using EventFetcherPtr = std::shared_ptr; /*! Event Fetcher */ class EventFetcher : public MysqlConnectorProxy { public: //! Constructor EventFetcher(MysqlConnectorManagerPtr mgr); //! Destructor ~EventFetcher() = default; //! Init event fetcher int init(const std::string &file_name, uint64_t position); //! Fetch next event int fetch(BasicEventPtr *next_event); private: //! Set Check Sum int turnoff_checksum(); //! Send dump request to master int request_dump(const std::string &file_name, uint64_t position); //! Update lsn info int update_lsn_info(const std::string &file_name, uint64_t position); //! Get latest lsn int get_latest_lsn(const std::string &file_name, MysqlResultWrapper &result); //! Generate Server id uint32_t generate_server_id(); //! Read data int read_data(unsigned long *len); //! Update rotate info void update_rotate_info(BasicEventPtr event); private: //! Binlog event idx uint64_t event_idx_{0}; //! Binlog file name std::string file_name_{}; //! Binlog position uint64_t position_{0}; //! Connector need reconnect bool need_reconnect_{false}; //! Server id uint32_t server_id_{0}; //! Uri ailego::Uri uri_{}; static const size_t MAX_PASSWORD_LENGTH = 32; static const int BINLOG_DUMP_NON_BLOCK = (1 << 0); }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/field.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Field interface implementation for proxima search engine */ #include "field.h" #include //!!! undef VERSION must be after include my_global.h #include #include extern "C" { #include } #include #include "common/logger.h" namespace proxima { namespace be { namespace repository { static std::string UsecondsToStr(int32_t frac, uint32_t decimals) { std::string sec = std::to_string(frac); if (sec.size() < 6) { std::string tmp = std::string(6 - sec.size(), '0'); tmp.append(sec); sec = tmp; } return sec.substr(0, decimals); } static void FormatNumber(std::ostringstream &oss, int32_t value, uint32_t precision) { if (precision == 2) { value %= 100; } else if (precision == 4) { value %= 10000; } oss << std::setw(precision) << std::setfill('0') << value; } static uint8_t HexToValue(char ch) { if (ch >= '0' && ch <= '9') { return ch - '0'; } else if (ch >= 'a' && ch <= 'f') { return ch - 'a' + 10; } else if (ch >= 'A' && ch <= 'F') { return ch - 'A' + 10; } else { return 0; } } static void HexToBinary(const char *data, unsigned long length, std::string *mutable_bytes) { mutable_bytes->resize(length / 2); uint8_t *ptr = (uint8_t *)(&((*mutable_bytes)[0])); for (size_t i = 0; i + 1 < length; i += 2) { ptr[i >> 1] = (HexToValue(data[i]) << 4) + HexToValue(data[i + 1]); } } FieldPtr FieldFactory::Create(const std::string &field_name, const FieldAttr &attr) { FieldPtr field; const FieldMetaPtr &meta = attr.meta(); switch (meta->type()) { case MYSQL_TYPE_TINY: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_SHORT: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_LONG: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_FLOAT: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_DOUBLE: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_TIMESTAMP: case MYSQL_TYPE_TIMESTAMP2: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_LONGLONG: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_INT24: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_DATE: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_TIME: case MYSQL_TYPE_TIME2: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_DATETIME2: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_YEAR: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_BIT: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_JSON: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_NEWDECIMAL: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_BLOB: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_VARCHAR: case MYSQL_TYPE_VAR_STRING: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_STRING: field = std::make_shared(field_name, attr); break; case MYSQL_TYPE_GEOMETRY: field = std::make_shared(field_name, attr); break; default: LOG_ERROR("Unsupported field type %d.", meta->type()); break; } return field; } const std::string Field::UTF8_CHARSET_NAME = "utf8_general_ci"; Field::Field(const std::string &name, const FieldAttr &attr) : field_name_(name) { auto &meta = attr.meta(); field_type_ = meta->type(); dst_field_type_ = convert_field_type(field_type_); field_length_ = meta->length(); field_decimals_ = meta->decimals(); flags_ = meta->flags(); is_index_ = attr.is_index(); is_forward_ = attr.is_forward(); is_selected_ = attr.is_selected(); select_field_ = name; collation_ = attr.collation(); if (!collation_.empty()) { dst_cs_ = get_charset_by_name(UTF8_CHARSET_NAME.c_str(), myf(0)); src_cs_ = get_charset_by_name(collation_.c_str(), myf(0)); } } FieldType Field::convert_field_type(enum_field_types types) { switch (types) { case MYSQL_TYPE_TINY: case MYSQL_TYPE_SHORT: case MYSQL_TYPE_INT24: case MYSQL_TYPE_LONG: return GenericValueMeta::FT_INT32; case MYSQL_TYPE_FLOAT: return GenericValueMeta::FT_FLOAT; case MYSQL_TYPE_DOUBLE: return GenericValueMeta::FT_DOUBLE; case MYSQL_TYPE_LONGLONG: return GenericValueMeta::FT_INT64; case MYSQL_TYPE_TIMESTAMP: case MYSQL_TYPE_TIMESTAMP2: case MYSQL_TYPE_DATE: case MYSQL_TYPE_TIME: case MYSQL_TYPE_TIME2: case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_DATETIME2: case MYSQL_TYPE_YEAR: return GenericValueMeta::FT_STRING; case MYSQL_TYPE_BIT: return GenericValueMeta::FT_UINT64; case MYSQL_TYPE_JSON: return GenericValueMeta::FT_STRING; case MYSQL_TYPE_NEWDECIMAL: return GenericValueMeta::FT_STRING; case MYSQL_TYPE_BLOB: return GenericValueMeta::FT_BYTES; case MYSQL_TYPE_VARCHAR: case MYSQL_TYPE_VAR_STRING: return GenericValueMeta::FT_BYTES; case MYSQL_TYPE_STRING: return GenericValueMeta::FT_STRING; case MYSQL_TYPE_GEOMETRY: return GenericValueMeta::FT_BYTES; default: return GenericValueMeta::FT_BYTES; } } bool FieldInteger::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data || !length) { return false; } if (!is_unsigned()) { value->set_int32_value(static_cast( std::strtol(static_cast(data), nullptr, 0))); } else { value->set_uint32_value(static_cast( std::strtoul(static_cast(data), nullptr, 0))); } return true; } const void *FieldTiny::unpack_binary(const void *data, const void *data_end, const ColumnInfo & /*info*/, GenericValue *value) { const int8_t *ptr = static_cast(data); uint32_t data_len = sizeof(int8_t); if (ptr + data_len > data_end) { return nullptr; } if (!is_unsigned()) { int32_t tmp = (int32_t)ptr[0]; value->set_int32_value(tmp); } else { uint32_t tmp = (uint32_t)(uint8_t)ptr[0]; value->set_uint32_value(tmp); } return ptr + data_len; } const void *FieldShort::unpack_binary(const void *data, const void *data_end, const ColumnInfo & /*info*/, GenericValue *value) { const uint8_t *ptr = static_cast(data); uint32_t data_len = sizeof(int16_t); if (ptr + data_len > data_end) { return nullptr; } if (!is_unsigned()) { int32_t tmp = (int32_t)sint2korr(ptr); value->set_int32_value(tmp); } else { uint32_t tmp = (uint32_t)uint2korr(ptr); value->set_uint32_value(tmp); } return ptr + data_len; } const void *FieldInt24::unpack_binary(const void *data, const void *data_end, const ColumnInfo & /*info*/, GenericValue *value) { const uint8_t *ptr = static_cast(data); uint32_t data_len = 3; // sizeof(int24) if (ptr + data_len > data_end) { return nullptr; } if (!is_unsigned()) { int32_t tmp = (int32_t)sint3korr(ptr); value->set_int32_value(tmp); } else { uint32_t tmp = (uint32_t)uint3korr(ptr); value->set_uint32_value(tmp); } return ptr + data_len; } const void *FieldLong::unpack_binary(const void *data, const void *data_end, const ColumnInfo & /*info*/, GenericValue *value) { const uint8_t *ptr = static_cast(data); uint32_t data_len = sizeof(int32_t); if (ptr + data_len > data_end) { return nullptr; } if (!is_unsigned()) { int32_t tmp = (int32_t)sint4korr(ptr); value->set_int32_value(tmp); } else { uint32_t tmp = (uint32_t)uint4korr(ptr); value->set_uint32_value(tmp); } return ptr + data_len; } const void *FieldLongLong::unpack_binary(const void *data, const void *data_end, const ColumnInfo & /*info*/, GenericValue *value) { const uint8_t *ptr = static_cast(data); uint32_t data_len = sizeof(int64_t); if (ptr + data_len > data_end) { return nullptr; } if (!is_unsigned()) { int64_t tmp = (int64_t)sint8korr(ptr); value->set_int64_value(tmp); } else { uint64_t tmp = (uint64_t)uint8korr(ptr); value->set_uint64_value(tmp); } return ptr + data_len; } bool FieldLongLong::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data || !length) { return false; } if (!is_unsigned()) { value->set_int64_value(static_cast( std::strtoll(static_cast(data), nullptr, 0))); } else { value->set_uint64_value(static_cast( std::strtoull(static_cast(data), nullptr, 0))); } return true; } const void *FieldFloat::unpack_binary(const void *data, const void *data_end, const ColumnInfo & /*info*/, GenericValue *value) { const uint8_t *ptr = static_cast(data); uint32_t data_len = sizeof(float); if (ptr + data_len > data_end) { return nullptr; } value->set_float_value(*(static_cast(data))); return ptr + data_len; } bool FieldFloat::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data || !length) { return false; } value->set_float_value(std::strtof(static_cast(data), nullptr)); return true; } const void *FieldDouble::unpack_binary(const void *data, const void *data_end, const ColumnInfo & /*info*/, GenericValue *value) { const uint8_t *ptr = static_cast(data); uint32_t data_len = sizeof(double); if (ptr + data_len > data_end) { return nullptr; } double tmp = *(static_cast(data)); value->set_double_value(tmp); return ptr + data_len; } bool FieldDouble::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data || !length) { return false; } value->set_double_value( std::strtod(static_cast(data), nullptr)); return true; } const void *FieldDecimal::unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) { uint32_t precision = (info.meta >> 8); uint32_t decimals = (info.meta & 0xff); int data_len = decimal_bin_size(precision, decimals); const uint8_t *ptr = static_cast(data); if (ptr + data_len > data_end) { return nullptr; } int32_t decimal_count = decimal_size(precision, decimals); std::vector decimal_buf(decimal_count, 0); decimal_t decimal; decimal.buf = &(decimal_buf[0]); decimal.len = decimal_count; int ret = bin2decimal(ptr, &decimal, precision, decimals); if (ret != 0) { LOG_ERROR("Execute bin2decimal failed. ret[%d]", ret); return nullptr; } int result_size = decimal_string_size(&decimal); std::string decimal_str; decimal_str.resize(result_size); ret = decimal2string(&decimal, &decimal_str[0], &result_size, 0, decimals, '0'); if (ret != 0) { LOG_ERROR("Execute decimal2string failed. ret[%d]", ret); return nullptr; } decimal_str.resize(result_size); std::string *mutable_value = value->mutable_string_value(); mutable_value->swap(decimal_str); return ptr + data_len; } bool FieldDecimal::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data || !length) { return false; } value->set_string_value(static_cast(data), length); return true; } const void *FieldBit::unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) { uint32_t bits = ((info.meta >> 8) * 8) + (info.meta & 0xff); uint32_t data_len = (bits + 7) / 8; const uint8_t *ptr = static_cast(data); if (ptr + data_len > data_end) { return nullptr; } uint64_t bit_value = 0; switch (data_len) { case 1: bit_value = (uint64_t)mi_uint1korr(ptr); break; case 2: bit_value = (uint64_t)mi_uint2korr(ptr); break; case 3: bit_value = (uint64_t)mi_uint3korr(ptr); break; case 4: bit_value = (uint64_t)mi_uint4korr(ptr); break; case 5: bit_value = (uint64_t)mi_uint5korr(ptr); break; case 6: bit_value = (uint64_t)mi_uint6korr(ptr); break; case 7: bit_value = (uint64_t)mi_uint7korr(ptr); break; case 8: bit_value = (uint64_t)mi_uint8korr(ptr); break; default: return nullptr; } value->set_uint64_value(bit_value); return ptr + data_len; } bool FieldBit::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data || !length) { return false; } const char *ptr = static_cast(data); value->set_uint64_value((uint64_t)std::strtoul(ptr, nullptr, 0)); return true; } const void *FieldDatetime::unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) { const uint8_t *ptr = static_cast(data); unsigned fixed_len = 5; unsigned int total_length = fixed_len + (info.meta + 1) / 2; if (ptr + total_length > data_end) { return nullptr; } // big endian int64_t int_part = (int64_t)mi_uint5korr(ptr) - DATETIMEF_INT_OFS; int32_t frac = 0; switch (info.meta) { case 1: case 2: frac = (int32_t)(*(ptr + fixed_len)) * 10000; break; case 3: case 4: frac = (int32_t)mi_uint2korr(ptr + fixed_len) * 100; break; case 5: case 6: frac = (int32_t)mi_uint3korr(ptr + fixed_len); break; default: frac = 0; break; } std::ostringstream oss; if (int_part == 0) { oss << "0000-00-00 00:00:00"; } else { int64_t ymd = int_part >> 17; int64_t ym = ymd >> 5; int64_t hms = int_part % (1 << 17); FormatNumber(oss, ym / 13, 4); oss << "-"; FormatNumber(oss, ym % 13, 2); oss << "-"; FormatNumber(oss, (ymd % (1 << 5)), 2); oss << " "; FormatNumber(oss, hms >> 12, 2); oss << ":"; FormatNumber(oss, ((hms >> 6) % (1 << 6)), 2); oss << ":"; FormatNumber(oss, (hms % (1 << 6)), 2); } if (frac >= 1) { oss << "." << UsecondsToStr(frac, info.meta); } value->set_string_value(oss.str()); return ptr + total_length; } bool FieldDatetime::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data || !length) { return false; } const char *ptr = static_cast(data); value->set_string_value(ptr, length); return true; } const void *FieldTimestamp::unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) { const uint8_t *ptr = static_cast(data); unsigned int seconds_len = 4; unsigned int total_len = seconds_len + (info.meta + 1) / 2; if (ptr + total_len > data_end) { return nullptr; } uint64_t tv_seconds = (uint64_t)mi_uint4korr(ptr); int32_t tv_usec = 0; switch (info.meta) { case 1: case 2: tv_usec = (int32_t)(*(ptr + seconds_len)) * 10000; break; case 3: case 4: tv_usec = (int32_t)mi_uint2korr(ptr + seconds_len) * 100; break; case 5: case 6: tv_usec = (int32_t)mi_uint3korr(ptr + seconds_len); break; default: tv_usec = 0; break; } std::ostringstream oss; if (tv_seconds == 0) { oss << "0000-00-00 00:00:00"; } else { time_t time = (time_t)tv_seconds; tm *local = std::localtime(&time); char buf[32]; strftime(buf, 32, "%Y-%m-%d %H:%M:%S", local); oss << buf; } if (info.meta >= 1) { oss << "." << UsecondsToStr(tv_usec, info.meta); } value->set_string_value(oss.str()); return ptr + total_len; } bool FieldTimestamp::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data || !length) { return false; } const char *ptr = static_cast(data); value->set_string_value(ptr, length); return true; } const void *FieldTime::unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) { const uint8_t *ptr = static_cast(data); unsigned int total_len = 3 + (info.meta + 1) / 2; if (ptr + total_len > data_end) { return nullptr; } int64_t int_part = 0; int32_t frac = 0; int64_t ltime = 0; switch (info.meta) { case 1: case 2: int_part = (int64_t)mi_uint3korr(ptr) - TIME_INT_OFS; frac = (int32_t)(*(ptr + 3)); if (int_part < 0 && frac > 0) { int_part++; frac -= 0x100; } frac = frac * 10000; ltime = int_part << 24; break; case 3: case 4: int_part = (int64_t)mi_uint3korr(ptr) - TIME_INT_OFS; frac = (int32_t)mi_uint2korr(ptr + 3); if (int_part < 0 && frac > 0) { int_part++; frac -= 0x10000; } frac = frac * 100; ltime = int_part << 24; break; case 5: case 6: int_part = (int64_t)mi_uint6korr(ptr) - TIME_OFS; ltime = int_part; frac = (int32_t)(int_part % (1L << 24)); break; default: int_part = (int64_t)mi_uint3korr(ptr) - TIME_INT_OFS; ltime = int_part << 24; break; } std::ostringstream oss; if (int_part == 0) { oss << "00:00:00"; } else { int64_t ultime = labs(ltime); int_part = ultime >> 24; if (ltime < 0) { oss << "-"; } int32_t d = (int32_t)((int_part >> 12) % (1 << 10)); if (d >= 100) { oss << d; } else { FormatNumber(oss, d, 2); } oss << ":"; FormatNumber(oss, (int32_t)((int_part >> 6) % (1 << 6)), 2); oss << ":"; FormatNumber(oss, (int32_t)(int_part % (1 << 6)), 2); } if (info.meta >= 1) { oss << "."; oss << UsecondsToStr(abs(frac), info.meta); } value->set_string_value(oss.str()); return ptr + total_len; } bool FieldTime::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data || !length) { return false; } const char *ptr = static_cast(data); value->set_string_value(ptr, length); return true; } const void *FieldDate::unpack_binary(const void *data, const void *data_end, const ColumnInfo & /*info*/, GenericValue *value) { const uint8_t *ptr = static_cast(data); uint32_t data_len = 3; if (ptr + data_len > data_end) { return nullptr; } uint32_t tmp = (uint32_t)uint3korr(ptr); std::ostringstream oss; if (tmp == 0) { oss << "0000-00-00"; } else { FormatNumber(oss, tmp / (16 * 32), 4); oss << "-"; FormatNumber(oss, tmp / 32 % 16, 2); oss << "-"; FormatNumber(oss, tmp % 32, 2); } value->set_string_value(oss.str()); return ptr + data_len; } bool FieldDate::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data || !length) { return false; } const char *ptr = static_cast(data); value->set_string_value(ptr, length); return true; } const void *FieldYear::unpack_binary(const void *data, const void *data_end, const ColumnInfo & /*info*/, GenericValue *value) { const uint8_t *ptr = static_cast(data); uint32_t data_len = sizeof(uint8_t); if (ptr + data_len > data_end) { return nullptr; } int32_t tmp = (int32_t)(*ptr); std::ostringstream oss; if (tmp == 0) { oss << "0000"; } else { oss << tmp + 1900; } value->set_string_value(oss.str()); return ptr + data_len; } bool FieldYear::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data || !length) { return false; } const char *ptr = static_cast(data); value->set_string_value(ptr, length); return true; } FieldBlob::FieldBlob(const std::string &name, const FieldAttr &attr) : Field(name, attr) { is_binary_ = flags_ & BINARY_FLAG; if (!is_binary_ && dst_cs_ && src_cs_) { need_convert_ = !my_charset_same(src_cs_, dst_cs_); } else { select_field_ = "HEX(" + name + ")"; } } const void *FieldBlob::unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) { uint32_t length = 0; uint32_t meta = info.meta; const uint8_t *ptr = static_cast(data); if (ptr + meta > data_end) { return nullptr; } switch (meta) { case 1: length = (uint32_t)(*ptr); break; case 2: length = (uint32_t)uint2korr(ptr); break; case 3: length = (uint32_t)uint3korr(ptr); break; case 4: length = (uint32_t)uint4korr(ptr); break; default: return nullptr; } ptr += meta; if (ptr + length > data_end) { return nullptr; } if (!is_binary_) { if (!need_convert_) { value->set_string_value((const char *)ptr, length); } else { std::string buffer; size_t buffer_len = length * dst_cs_->mbmaxlen + 1; buffer.resize(buffer_len); uint errors = 0; size_t actual_length = my_convert(&(buffer[0]), buffer_len, dst_cs_, (const char *)ptr, length, src_cs_, &errors); if (errors != 0) { LOG_ERROR("Convert charset failed. error_no[%u]", errors); return nullptr; } value->set_string_value(buffer.data(), actual_length); } } else { value->set_bytes_value(ptr, length); } return ptr + length; } bool FieldBlob::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data) { return false; } const char *ptr = static_cast(data); if (is_binary_) { std::string *mutable_bytes = value->mutable_bytes_value(); HexToBinary(ptr, length, mutable_bytes); } else { value->set_string_value((const char *)data, length); } return true; } FieldVarString::FieldVarString(const std::string &name, const FieldAttr &attr) : Field(name, attr) { is_binary_ = (flags_ & BINARY_FLAG); length_bytes_ = (field_length_ < 256) ? 1 : 2; if (!is_binary_ && dst_cs_ && src_cs_) { need_convert_ = !my_charset_same(src_cs_, dst_cs_); } else { select_field_ = "HEX(" + name + ")"; } } const void *FieldVarString::unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) { uint32_t bytes_count; const uint8_t *ptr = static_cast(data); int32_t len = info.meta; if (len < 256) { if (ptr + 1 > data_end) { return nullptr; } bytes_count = *ptr; ptr += 1; } else { if (ptr + 2 > data_end) { return nullptr; } bytes_count = (uint32_t)uint2korr(ptr); ptr += 2; } if (ptr + bytes_count > data_end) { return nullptr; } if (!is_binary_) { if (!need_convert_) { value->set_string_value((const char *)ptr, bytes_count); } else { std::string buffer; size_t buffer_len = field_length_ * dst_cs_->mbmaxlen + 1; buffer.resize(buffer_len); uint errors = 0; size_t actual_length = my_convert(&(buffer[0]), buffer_len, dst_cs_, (const char *)ptr, bytes_count, src_cs_, &errors); if (errors != 0) { LOG_ERROR("Convert charset failed. error_no[%u]", errors); return nullptr; } value->set_string_value(buffer.data(), actual_length); } } else { value->set_bytes_value(ptr, bytes_count); } return ptr + bytes_count; } bool FieldVarString::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data) { return false; } const char *ptr = static_cast(data); if (is_binary_) { std::string *mutable_bytes = value->mutable_bytes_value(); HexToBinary(ptr, length, mutable_bytes); } else { value->set_string_value(ptr, length); } return true; } FieldString::FieldString(const std::string &name, const FieldAttr &attr) : Field(name, attr) { is_binary_ = flags_ & BINARY_FLAG; is_enum_ = flags_ & ENUM_FLAG; is_set_ = flags_ & SET_FLAG; if (!is_binary_ && !is_enum_ && !is_set_ && dst_cs_ && src_cs_) { need_convert_ = !my_charset_same(src_cs_, dst_cs_); } else if (is_enum_ || is_set_) { select_field_ = name + "+0"; } else { select_field_ = "HEX(" + name + ")"; } } const void *FieldString::unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) { int32_t len = 0; int32_t meta = info.meta; enum_field_types parsed_type; if (meta < 256) { len = meta; parsed_type = MYSQL_TYPE_STRING; } else { int32_t byte0 = meta >> 8; int32_t byte1 = meta & 0xFF; if ((byte0 & 0x30) != 0x30) { len = byte1 | (((byte0 & 0x30) ^ 0x30) << 4); parsed_type = (enum_field_types)(byte0 | 0x30); } else { if (byte0 == MYSQL_TYPE_STRING || byte0 == MYSQL_TYPE_SET || byte0 == MYSQL_TYPE_ENUM) { parsed_type = (enum_field_types)byte0; len = byte1; } else { return nullptr; } } } if (parsed_type == MYSQL_TYPE_STRING) { return parse_string_value(data, data_end, len, value); } else if (parsed_type == MYSQL_TYPE_SET) { return parse_set_value(data, data_end, meta, value); } else if (parsed_type == MYSQL_TYPE_ENUM) { return parse_enum_value(data, data_end, len, value); } else { return nullptr; } } bool FieldString::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data) { return false; } const char *ptr = static_cast(data); if (is_enum_) { value->set_int32_value((int32_t)std::strtol(ptr, nullptr, 0)); } else if (is_set_) { value->set_uint64_value((uint64_t)std::strtoul(ptr, nullptr, 0)); } else { if (!is_binary_) { value->set_string_value((const char *)data, length); } else { std::string *mutable_bytes = value->mutable_bytes_value(); HexToBinary(ptr, length, mutable_bytes); } } return true; } const void *FieldString::parse_string_value(const void *data, const void *data_end, int32_t len, GenericValue *value) { const uint8_t *ptr = static_cast(data); uint32_t bytes_count; if (len < 256) { if (ptr + 1 > data_end) { return nullptr; } bytes_count = (uint32_t)(*ptr); ptr++; } else { bytes_count = (uint32_t)uint2korr(ptr); if (ptr + 2 > data_end) { return nullptr; } ptr += 2; } if (ptr + bytes_count > data_end) { return nullptr; } if (!is_binary_) { if (!need_convert_) { value->set_string_value((const char *)ptr, bytes_count); } else { std::string buffer; size_t buffer_len = field_length_ * dst_cs_->mbmaxlen + 1; buffer.resize(buffer_len); uint errors = 0; size_t actual_length = my_convert(&(buffer[0]), buffer_len, dst_cs_, (const char *)ptr, bytes_count, src_cs_, &errors); if (errors != 0) { LOG_ERROR("Convert charset failed. error_no[%u]", errors); return nullptr; } value->set_string_value(buffer.data(), actual_length); } } else { value->set_bytes_value(ptr, bytes_count); std::string *mutable_bytes = value->mutable_bytes_value(); mutable_bytes->append(field_length_ - bytes_count, (char)0); } return ptr + bytes_count; } const void *FieldString::parse_set_value(const void *data, const void *data_end, int32_t meta, GenericValue *value) { const uint8_t *ptr = static_cast(data); int32_t bits = (meta & 0xFF) * 8; int32_t len = (bits + 7) / 8; if (ptr + len > data_end) { return nullptr; } uint64_t bit_value; switch (len) { case 1: bit_value = (uint64_t)(*ptr); break; case 2: bit_value = (uint64_t)uint2korr(ptr); break; case 3: bit_value = (uint64_t)uint3korr(ptr); break; case 4: bit_value = (uint64_t)uint4korr(ptr); break; case 5: bit_value = (uint64_t)uint5korr(ptr); break; case 6: bit_value = (uint64_t)uint6korr(ptr); break; case 7: bit_value = (uint64_t)(uint4korr(ptr) + (((uint64_t)uint3korr(ptr + 4)) << 32)); break; case 8: bit_value = (uint64_t)uint8korr(ptr); break; default: return nullptr; } value->set_uint64_value(bit_value); return ptr + len; } const void *FieldString::parse_enum_value(const void *data, const void *data_end, int32_t len, GenericValue *value) { const uint8_t *ptr = static_cast(data); if (ptr + len > data_end) { return nullptr; } int32_t enum_value; switch (len) { case 1: enum_value = (int32_t)(*ptr); break; case 2: enum_value = (int32_t)uint2korr(ptr); break; default: return nullptr; } value->set_int32_value(enum_value); return ptr + len; } const void *FieldJson::unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) { uint32_t length = 0; uint32_t meta = info.meta; const uint8_t *ptr = static_cast(data); if (ptr + meta > data_end) { return nullptr; } switch (meta) { case 1: length = (uint32_t)(*ptr); break; case 2: length = (uint32_t)uint2korr(ptr); break; case 3: length = (uint32_t)uint3korr(ptr); break; case 4: length = (uint32_t)uint4korr(ptr); break; default: return nullptr; } ptr += meta; if (ptr + length > data_end) { return nullptr; } // TODO parse json value->set_bytes_value((const char *)ptr, length); return ptr + length; } bool FieldJson::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data || !length) { return false; } value->set_bytes_value(static_cast(data), length); return true; } const void *FieldGeometry::unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) { uint32_t length = 0; uint32_t meta = info.meta; const uint8_t *ptr = static_cast(data); if (ptr + meta > data_end) { return nullptr; } switch (meta) { case 1: length = (uint32_t)(*ptr); break; case 2: length = (uint32_t)uint2korr(ptr); break; case 3: length = (uint32_t)uint3korr(ptr); break; case 4: length = (uint32_t)uint4korr(ptr); break; default: return nullptr; } ptr += meta; if (ptr + length > data_end) { return nullptr; } value->set_bytes_value(ptr, length); return ptr + length; } bool FieldGeometry::unpack_text(const void *data, unsigned long length, GenericValue *value) { if (!data || !length) { return false; } value->set_bytes_value(data, length); return true; } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/field.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Field interface definition for proxima search engine */ #pragma once #include #include #include #include "binlog_common.h" #include "binlog_event.h" #include "mysql_connector.h" namespace proxima { namespace be { namespace repository { class Field; using FieldPtr = std::shared_ptr; /*! Field Attribute */ class FieldAttr { public: //! Constructor FieldAttr(bool index, bool forward, const std::string &collat, FieldMetaPtr field_meta) : is_index_(index), is_forward_(forward), is_selected_(index || forward), collation_(collat), meta_(std::move(field_meta)) {} //! Destructor ~FieldAttr() = default; //! Is index field bool is_index() const { return is_index_; } //! Is forward field bool is_forward() const { return is_forward_; } //! Is selected field bool is_selected() const { return is_selected_; } //! Get field meta const FieldMetaPtr &meta() const { return meta_; } //! Get collation const std::string &collation() const { return collation_; } private: //! is index field bool is_index_; //! is forward field bool is_forward_; //! is selected field bool is_selected_; // collation std::string collation_; //! Field Meta FieldMetaPtr meta_; }; /*! Field Factory */ class FieldFactory { public: //! Create Field static FieldPtr Create(const std::string &field_name, const FieldAttr &attr); }; /*! Field */ class Field { public: //! Constructor Field(const std::string &name, const FieldAttr &attr); //! Destructor virtual ~Field() = default; //! Unpack binary virtual const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) = 0; //! Unpack text virtual bool unpack_text(const void *data, unsigned long length, GenericValue *value) = 0; //! Get field name const std::string &field_name() const { return field_name_; } //! Get select field name const std::string &select_field() const { return select_field_; } //! Get field type enum_field_types field_type() const { return field_type_; } //! Get dst field type FieldType dst_field_type() const { return dst_field_type_; } //! Get field decimals uint32_t field_decimals() const { return field_decimals_; } //! Is index field bool is_index() const { return is_index_; } //! Is forward field bool is_forward() const { return is_forward_; } //! Is selected field bool is_selected() const { return is_selected_; } //! Is auto increment field bool is_auto_increment() const { return flags_ & AUTO_INCREMENT_FLAG; } //! Is unsigned type bool is_unsigned() const { return flags_ & UNSIGNED_FLAG; } private: //! Convert field type FieldType convert_field_type(enum_field_types types); protected: //! Field name std::string field_name_{}; //! Select field name for full scan std::string select_field_{}; //! Field collation std::string collation_{}; //! Field type enum_field_types field_type_{}; //! Dst field type FieldType dst_field_type_{}; //! Field length uint32_t field_length_{0}; //! Field decimals uint32_t field_decimals_{0}; //! Field flags uint32_t flags_{0}; //! Is index field bool is_index_{false}; //! Is forward field bool is_forward_{false}; //! Is selected field bool is_selected_{false}; //! Field src collation CHARSET_INFO *src_cs_{nullptr}; //! Field dst collation CHARSET_INFO *dst_cs_{nullptr}; //! UTF8 charset name const static std::string UTF8_CHARSET_NAME; }; /*! Field Tiny */ class FieldInteger : public Field { public: //! Constructor FieldInteger(const std::string &name, const FieldAttr &attr) : Field(name, attr) {} //! Destructor virtual ~FieldInteger() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override = 0; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; }; /*! Field Tiny */ class FieldTiny : public FieldInteger { public: //! Constructor FieldTiny(const std::string &name, const FieldAttr &attr) : FieldInteger(name, attr) {} //! Destructor virtual ~FieldTiny() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; }; /*! Field Short */ class FieldShort : public FieldInteger { public: //! Constructor FieldShort(const std::string &name, const FieldAttr &attr) : FieldInteger(name, attr) {} //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; }; /*! Field Int24 */ class FieldInt24 : public FieldInteger { public: //! Constructor FieldInt24(const std::string &name, const FieldAttr &attr) : FieldInteger(name, attr) {} //! Destructor virtual ~FieldInt24() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; }; /*! Field Long */ class FieldLong : public FieldInteger { public: //! Constructor FieldLong(const std::string &name, const FieldAttr &attr) : FieldInteger(name, attr) {} //! Destructor virtual ~FieldLong() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; }; /*! Field Long Long */ class FieldLongLong : public FieldInteger { public: //! Constructor FieldLongLong(const std::string &name, const FieldAttr &attr) : FieldInteger(name, attr) {} //! Destructor virtual ~FieldLongLong() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; }; /*! Field Float */ class FieldFloat : public Field { public: //! Constructor FieldFloat(const std::string &name, const FieldAttr &attr) : Field(name, attr) {} //! Destructor virtual ~FieldFloat() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; }; /*! Field Double */ class FieldDouble : public Field { public: //! Constructor FieldDouble(const std::string &name, const FieldAttr &attr) : Field(name, attr) {} //! Destructor virtual ~FieldDouble() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; }; /*! Field Decimal */ class FieldDecimal : public Field { public: //! Constructor FieldDecimal(const std::string &name, const FieldAttr &attr) : Field(name, attr) {} //! Destructor virtual ~FieldDecimal() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; }; /*! Field Bit */ class FieldBit : public Field { public: //! Constructor FieldBit(const std::string &name, const FieldAttr &attr) : Field(name, attr) { select_field_ = name + "+0"; } //! Destructor virtual ~FieldBit() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; }; /*! Field Datetime */ class FieldDatetime : public Field { public: //! Constructor FieldDatetime(const std::string &name, const FieldAttr &attr) : Field(name, attr) {} //! Destructor virtual ~FieldDatetime() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; private: const static uint64_t DATETIMEF_INT_OFS = 0x8000000000; }; /*! Field Timestamp */ class FieldTimestamp : public Field { public: //! Constructor FieldTimestamp(const std::string &name, const FieldAttr &attr) : Field(name, attr) {} //! Destructor virtual ~FieldTimestamp() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; }; /*! Field Time */ class FieldTime : public Field { public: //! Constructor FieldTime(const std::string &name, const FieldAttr &attr) : Field(name, attr) {} //! Destructor virtual ~FieldTime() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; private: const static int64_t TIME_INT_OFS = 0x800000; const static int64_t TIME_OFS = 0x800000000000; }; /*! Field Date */ class FieldDate : public Field { public: //! Constructor FieldDate(const std::string &name, const FieldAttr &attr) : Field(name, attr) {} //! Destructor virtual ~FieldDate() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; }; /*! Field Year */ class FieldYear : public Field { public: //! Constructor FieldYear(const std::string &name, const FieldAttr &attr) : Field(name, attr) {} //! Destructor virtual ~FieldYear() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; }; /*! Field Blob */ class FieldBlob : public Field { public: //! Constructor FieldBlob(const std::string &name, const FieldAttr &attr); //! Destructor virtual ~FieldBlob() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; private: //! Is binary bool is_binary_{false}; //! Need convert charset bool need_convert_{false}; }; /*! Field Var String */ class FieldVarString : public Field { public: //! Constructor FieldVarString(const std::string &name, const FieldAttr &attr); //! Destructor virtual ~FieldVarString() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; private: //! Need convert charset bool need_convert_{false}; //! Is binary bool is_binary_{false}; //! Length bytes uint32_t length_bytes_{0}; }; /*! Field String */ class FieldString : public Field { public: //! Constructor FieldString(const std::string &name, const FieldAttr &attr); //! Destructor virtual ~FieldString() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; private: //! Parse string type value const void *parse_string_value(const void *data, const void *data_end, int32_t len, GenericValue *value); //! Parse set type value const void *parse_set_value(const void *data, const void *data_end, int32_t meta, GenericValue *value); //! Parse enum type value const void *parse_enum_value(const void *data, const void *data_end, int32_t len, GenericValue *value); private: // Need convert charset bool need_convert_{false}; //! Is binary bool is_binary_{false}; //! Is enum bool is_enum_{false}; //! Is set bool is_set_{false}; }; /*! Field Json */ class FieldJson : public Field { public: //! Constructor FieldJson(const std::string &name, const FieldAttr &attr) : Field(name, attr) {} //! Destructor virtual ~FieldJson() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; }; /*! Field Geometry */ class FieldGeometry : public Field { public: //! Constructor FieldGeometry(const std::string &name, const FieldAttr &attr) : Field(name, attr) {} //! Destructor virtual ~FieldGeometry() = default; //! Unpack binary const void *unpack_binary(const void *data, const void *data_end, const ColumnInfo &info, GenericValue *value) override; //! Unpack text bool unpack_text(const void *data, unsigned long length, GenericValue *value) override; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/info_fetcher.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Table info fetcher interface implementation for proxima search * engine */ #include "info_fetcher.h" #include #include "repository_common/error_code.h" #include "repository_common/logger.h" #include "sql_builder.h" namespace proxima { namespace be { namespace repository { InfoFetcher::InfoFetcher(const CollectionConfig &config, MysqlConnectorManagerPtr mgr) : MysqlConnectorProxy(mgr), collection_config_(config) {} int InfoFetcher::init() { int ret = init_connector(); if (ret != 0) { LOG_ERROR("Mysql connector proxy init failed."); return ret; } const std::string &path = connector_->uri().path(); if (path.size() <= 1) { LOG_ERROR("Invalid uri path. path[%s]", path.c_str()); return ErrorCode_InvalidCollectionConfig; } database_ = path.substr(1); ret = build_selected_fields(collection_config_); if (ret != 0) { LOG_ERROR("Build selected fields failed."); return ret; } return 0; } int InfoFetcher::get_table_schema(const std::string &table_name, TableSchemaPtr *schema) { // get collation info std::map field_collation; int ret = get_collation_info(table_name, field_collation); if (ret != 0) { LOG_ERROR("Fill collation info failed. code[%d]", ret); return ret; } std::string select_sql = SqlBuilder::BuildGetSchemaSql(database_, table_name); MysqlResultWrapperPtr result; ret = connector_->execute_query(select_sql, &result, true); if (ret != 0) { LOG_ERROR("Execute get schema sql failed. sql[%s].", select_sql.c_str()); return ret; } ret = parse_table_schema(result, field_collation, schema); if (ret != 0) { LOG_ERROR("Parse table schema failed."); return ret; } return 0; } int InfoFetcher::get_table_snapshot(const std::string &table_name, std::string *file_name, uint64_t *position) { int ret = lock_table(table_name); if (ret != 0) { LOG_ERROR("Lock table failed. table[%s]", table_name.c_str()); return ret; } ret = get_table_snapshot_internal(file_name, position); if (ret != 0) { LOG_ERROR("Get table snapshot internal failed. table[%s]", table_name.c_str()); } unlock_table(); return ret; } int InfoFetcher::build_selected_fields(const CollectionConfig &config) { selected_fields_ = std::make_shared(); for (int i = 0; i < config.index_column_params_size(); ++i) { selected_fields_->add_field(config.index_column_params(i).column_name()); selected_fields_->add_index_field( config.index_column_params(i).column_name()); } for (int i = 0; i < config.forward_column_names_size(); ++i) { selected_fields_->add_field(config.forward_column_names(i)); selected_fields_->add_forward_field(config.forward_column_names(i)); } return 0; } int InfoFetcher::get_table_snapshot_internal(std::string *file_name, uint64_t *position) { std::string sql = SqlBuilder::BuildShowMasterStatus(); MysqlResultWrapperPtr result; int ret = connector_->execute_query(sql, &result, true); if (ret != 0) { LOG_ERROR("Connector execute show master status sql failed. sql[%s]", sql.c_str()); return ErrorCode_ExecuteMysql; } unsigned int rows_num = result->rows_num(); if (rows_num != 1) { LOG_ERROR("Master status result rows mismatched. rows[%u]", rows_num); return ErrorCode_InvalidMysqlResult; } MysqlRow *row = result->next(); if (!row) { LOG_ERROR("Fetch next result failed."); return ErrorCode_InvalidMysqlResult; } unsigned int fields_num = result->fields_num(); if (fields_num != 5) { LOG_ERROR("Mysql result fields num mismatched. num[%u]", fields_num); return ErrorCode_InvalidMysqlResult; } std::map kv; for (unsigned int i = 0; i < fields_num; ++i) { kv[result->field_meta(i)->name()] = std::string(row->field_value(i), row->field_length(i)); } auto file_it = kv.find("File"); auto pos_it = kv.find("Position"); if (file_it == kv.end() || pos_it == kv.end()) { LOG_ERROR("Find position or file field in result failed."); return ErrorCode_InvalidMysqlResult; } *file_name = file_it->second; ailego::StringHelper::ToUint64(pos_it->second, position); return 0; } int InfoFetcher::lock_table(const std::string &table_name) { std::string sql = SqlBuilder::BuildLockTableSql(database_, table_name); int ret = connector_->execute_query(sql, nullptr, true); if (ret != 0) { LOG_ERROR("Execute lock table sql failed. code[%d] sql[%s]", ret, sql.c_str()); return ErrorCode_ExecuteMysql; } return 0; } int InfoFetcher::unlock_table() { std::string sql = SqlBuilder::BuildUnlockTablesSql(); int ret = connector_->execute_query(sql, nullptr, true); if (ret != 0) { LOG_ERROR("Unlock tables failed. sql[%s] code[%d]", sql.c_str(), ret); return ErrorCode_ExecuteMysql; } return 0; } int InfoFetcher::parse_table_schema( const MysqlResultWrapperPtr &result, const std::map &collation, TableSchemaPtr *result_schema) { TableSchemaPtr table_schema = std::make_shared(); uint32_t fields_num = result->fields_num(); for (uint32_t i = 0; i < fields_num; ++i) { auto &field_meta = result->field_meta(i); const std::string &field_name = field_meta->name(); auto it = collation.find(field_name); if (it == collation.end()) { LOG_ERROR("Find field collation failed. field[%s]", field_name.c_str()); return ErrorCode_InvalidMysqlResult; } FieldAttr attr(selected_fields_->is_index(field_name), selected_fields_->is_forward(field_name), it->second, field_meta); FieldPtr field = FieldFactory::Create(field_name, attr); if (!field) { LOG_ERROR("Create field failed. field_name[%s]", field_name.c_str()); return ErrorCode_RuntimeError; } if (field->is_auto_increment()) { table_schema->set_auto_increment_id(table_schema->fields().size()); } table_schema->add_field(field); } // fill index select fields int ret = fill_selected_fields(&table_schema); if (ret != 0) { LOG_ERROR("Fill selected fields failed. code[%d] reason[%s]", ret, ErrorCode::What(ret)); return ret; } *result_schema = table_schema; return 0; } int InfoFetcher::get_collation_info( const std::string &table_name, std::map &field_collation) { std::string sql = SqlBuilder::BuildShowFullColumnsSql(database_, table_name); MysqlResultWrapperPtr result; int ret = connector_->execute_query(sql, &result, true); if (ret != 0) { LOG_ERROR("Execute show full columns sql failed. code[%d] sql[%s]", ret, sql.c_str()); return ErrorCode_ExecuteMysql; } auto &name_meta = result->field_meta(0); auto &collation_meta = result->field_meta(2); if (name_meta->name() != "Field" || collation_meta->name() != "Collation") { LOG_ERROR("Invalid full columns result. field1[%s] field2[%s]", name_meta->name().c_str(), collation_meta->name().c_str()); return ErrorCode_InvalidMysqlResult; } // get collation kv map MysqlRow *row = result->next(); while (row) { std::string key = std::string(row->field_value(0), row->field_length(0)); std::string value = std::string(row->field_value(2), row->field_length(2)); field_collation[key] = value; row = result->next(); } return 0; } int InfoFetcher::fill_selected_fields(TableSchemaPtr *table_schema) { auto &index_fields = selected_fields_->index_fields(); int ret = fill_index_fields(index_fields, table_schema); if (ret != 0) { LOG_ERROR("Fill index fields failed."); return ret; } (*table_schema)->set_max_index_id(index_fields.size()); ret = fill_forward_fields(selected_fields_->forward_fields(), table_schema); if (ret != 0) { LOG_ERROR("Fill forward fields failed."); return ret; } return 0; } int InfoFetcher::fill_index_fields( const std::vector &selected_fields, TableSchemaPtr *table_schema) { auto &all_fields = (*table_schema)->fields(); for (auto &field_name : selected_fields) { auto it = all_fields.begin(); for (; it != all_fields.end(); ++it) { if (ailego::StringHelper::CompareIgnoreCase(field_name, (*it)->field_name())) { break; } } if (it == all_fields.end()) { LOG_ERROR("Invalid table field. field_name:[%s]", field_name.c_str()); return ErrorCode_InvalidCollectionConfig; } (*table_schema)->add_selected_field(*it); size_t idx = it - all_fields.begin(); (*table_schema)->add_selected_index_id(idx); } return 0; } int InfoFetcher::fill_forward_fields( const std::vector &selected_fields, TableSchemaPtr *table_schema) { auto &all_fields = (*table_schema)->fields(); for (auto &field_name : selected_fields) { auto it = all_fields.begin(); for (; it != all_fields.end(); ++it) { if (ailego::StringHelper::CompareIgnoreCase(field_name, (*it)->field_name())) { break; } } if (it == all_fields.end()) { LOG_ERROR("Invalid table field. field_name:[%s]", field_name.c_str()); return ErrorCode_InvalidCollectionConfig; } (*table_schema)->add_selected_field(*it); size_t idx = it - all_fields.begin(); (*table_schema)->add_selected_forward_id(idx); } return 0; } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/info_fetcher.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Table info fetcher interface definition for proxima search engine */ #pragma once #include "mysql_connector.h" #include "table_schema.h" namespace proxima { namespace be { namespace repository { class SelectedFields; class InfoFetcher; using SelectedFieldsPtr = std::shared_ptr; using InfoFetcherPtr = std::shared_ptr; /*! Selected Fields */ class SelectedFields { public: //! Constructor SelectedFields() = default; //! Destructor ~SelectedFields() = default; //! Get selected fields const std::vector &fields() const { return fields_; } //! Get index fields const std::vector &index_fields() const { return index_fields_; } //! Get forward fields const std::vector &forward_fields() const { return forward_fields_; } //! Add selected field void add_field(const std::string &field) { fields_.emplace_back(field); } //! Add selected index field void add_index_field(const std::string &field) { index_fields_.emplace_back(field); } //! Add selected forward field void add_forward_field(const std::string &field) { forward_fields_.emplace_back(field); } //! Is index field bool is_index(const std::string &field_name) { auto it = std::find(index_fields_.begin(), index_fields_.end(), field_name); return it != index_fields_.end(); } //! Is forward field bool is_forward(const std::string &field_name) { auto it = std::find(forward_fields_.begin(), forward_fields_.end(), field_name); return it != forward_fields_.end(); } //! Is selected field bool is_selected(const std::string &field_name) { auto it = std::find(fields_.begin(), fields_.end(), field_name); return it != fields_.end(); } private: //! All selected fields std::vector fields_; //! Selected index fields std::vector index_fields_; //! Selected forward fields std::vector forward_fields_; }; /*! Info Fetcher */ class InfoFetcher : public MysqlConnectorProxy { public: //! Constructor InfoFetcher(const CollectionConfig &config, MysqlConnectorManagerPtr mgr); //! Destructor ~InfoFetcher() = default; //! Init info fetcher int init(); //! Get table schema int get_table_schema(const std::string &table_name, TableSchemaPtr *schema); //! Get table Snapshot int get_table_snapshot(const std::string &table_name, std::string *file_name, uint64_t *position); //! Get database name const std::string &database() const { return database_; } private: //! Build selected fields int build_selected_fields(const CollectionConfig &config); //! Get table snapshot internal int get_table_snapshot_internal(std::string *file_name, uint64_t *position); //! Lock read table int lock_table(const std::string &table_name); //! Unlock read table int unlock_table(); //! Parse mysql table schema result int parse_table_schema(const MysqlResultWrapperPtr &result, const std::map &collation, TableSchemaPtr *result_schema); //! Get collation info for fields int get_collation_info(const std::string &table_name, std::map &collation); //! Fill selected fields int fill_selected_fields(TableSchemaPtr *table_schema); //! Fill index fields int fill_index_fields(const std::vector &selected_fields, TableSchemaPtr *table_schema); //! Fill forward fields int fill_forward_fields(const std::vector &selected_fields, TableSchemaPtr *table_schema); private: //! Database std::string database_{}; //! Collection config CollectionConfig collection_config_{}; //! Selected fields SelectedFieldsPtr selected_fields_{}; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/log_context.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Log context interface definition for proxima search engine */ #pragma once #include #include "binlog_event.h" namespace proxima { namespace be { namespace repository { class LogContext; using LogContextPtr = std::shared_ptr; /*! Log Context */ class LogContext { public: //! Constructor LogContext() = default; //! Constructor ~LogContext() = default; //! Get table map event TableMapEventPtr table_map() const { return table_map_; } //! Get Position uint64_t position() { return position_; } //! Get file name const std::string &file_name() { return file_name_; } //! Update table map event void update_table_map(TableMapEventPtr event) { table_map_ = std::move(event); } //! Update lsn void update_lsn(const std::string &name, uint64_t pos) { position_ = pos; file_name_ = name; } private: //! Table map event TableMapEventPtr table_map_{}; //! Bin log position uint64_t position_{0}; //! Bin log file name std::string file_name_{}; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/mysql_connector.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Mysql connector interface implementation for proxima search * engine */ #include "mysql_connector.h" #include #include #include "repository_common/error_code.h" #include "repository_common/logger.h" namespace proxima { namespace be { namespace repository { MysqlResultWrapper::MysqlResultWrapper(MYSQL *mysql, MYSQL_RES *res) : mysql_(mysql), result_(res) {} MysqlResultWrapper::~MysqlResultWrapper() { if (result_) { mysql_free_result(result_); result_ = nullptr; } } int MysqlResultWrapper::init() { fields_num_ = mysql_num_fields(result_); mysql_row_.reset(new (std::nothrow) MysqlRow(fields_num_)); if (!mysql_row_) { LOG_ERROR("New MysqlRow failed."); return ErrorCode_RuntimeError; } MYSQL_FIELD *mysql_fields = mysql_fetch_fields(result_); if (!mysql_fields) { LOG_ERROR("Fetch mysql fields failed. errno[%d] reason[%s]", mysql_errno(mysql_), mysql_error(mysql_)); return ErrorCode_ExecuteMysql; } fields_.clear(); for (unsigned int i = 0; i < fields_num_; ++i) { fields_.emplace_back(std::make_shared( mysql_fields[i].name, mysql_fields[i].type, mysql_fields[i].length, mysql_fields[i].decimals, mysql_fields[i].flags)); } return 0; } MysqlRow *MysqlResultWrapper::next() { MYSQL_ROW row = mysql_fetch_row(result_); if (row) { unsigned long *lengths = mysql_fetch_lengths(result_); if (lengths) { mysql_row_->reset(row, lengths); return mysql_row_.get(); } } return nullptr; } bool MysqlResultWrapper::has_error() { if (mysql_errno(mysql_)) { LOG_ERROR("Mysql error. code[%d] reason[%s]", mysql_errno(mysql_), mysql_error(mysql_)); return true; } return false; } std::mutex MysqlConnector::global_mutex_; MysqlConnector::MysqlConnector() {} MysqlConnector::~MysqlConnector() { if (mysql_) { mysql_close(mysql_); mysql_ = nullptr; } } int MysqlConnector::init(const ailego::Uri &connection_uri, const std::string &user, const std::string &password) { uri_ = connection_uri; user_ = user; password_ = password; if (!reconnect()) { LOG_ERROR("Mysql reconnect failed."); return ErrorCode_ConnectMysql; } return 0; } bool MysqlConnector::reconnect(void) { if (mysql_) { mysql_close(mysql_); mysql_ = nullptr; } { std::lock_guard lock(global_mutex_); mysql_ = mysql_init(nullptr); } if (!mysql_) { LOG_ERROR("Mysql init failed code[%u] reason[%s]", mysql_errno(mysql_), mysql_error(mysql_)); return false; } my_bool reconnect_opt = 1; mysql_options(mysql_, MYSQL_OPT_RECONNECT, &reconnect_opt); unsigned int connect_timeout = 3; mysql_options(mysql_, MYSQL_OPT_CONNECT_TIMEOUT, &connect_timeout); mysql_options(mysql_, MYSQL_SET_CHARSET_NAME, "utf8"); if (!mysql_real_connect(mysql_, uri_.host().c_str(), user_.c_str(), password_.c_str(), 0, uri_.port(), nullptr, 0)) { LOG_ERROR( "Mysql real connect failed. host[%s] port[%d] code[%d] reason[%s]", uri_.host().c_str(), uri_.port(), mysql_errno(mysql_), mysql_error(mysql_)); return false; } return true; } int MysqlConnector::execute_query(const std::string &sql, MysqlResultWrapperPtr *result, bool sync_fetch) { if (need_reconnect_) { if (reconnect()) { need_reconnect_ = false; } else { return ErrorCode_ConnectMysql; } } if (mysql_query(mysql_, sql.c_str())) { need_reconnect_ = need_reconnect(); LOG_ERROR("Execute mysql query failed. code[%d] reason[%s] sql[%s]", mysql_errno(mysql_), mysql_error(mysql_), sql.c_str()); return ErrorCode_ExecuteMysql; } if (!result) { return 0; } MYSQL_RES *res; if (sync_fetch) { res = mysql_store_result(mysql_); } else { res = mysql_use_result(mysql_); } if (!res) { if (mysql_errno(mysql_)) { need_reconnect_ = need_reconnect(); LOG_ERROR("Get mysql result failed. code[%d], reason[%s]", mysql_errno(mysql_), mysql_error(mysql_)); return ErrorCode_ExecuteMysql; } else { return 0; } } *result = std::make_shared(mysql_, res); int ret = (*result)->init(); if (ret != 0) { need_reconnect_ = need_reconnect(); LOG_ERROR("Init MysqlResultWrapper failed."); return ret; } return 0; } int MysqlConnector::execute_simple_command(enum enum_server_command command, const unsigned char *arg, size_t arg_length) { if (simple_command(mysql_, command, arg, arg_length, 1)) { need_reconnect_ = need_reconnect(); LOG_ERROR("Execute simple command failed. command[%d] code[%d] reason[%s]", command, mysql_errno(mysql_), mysql_error(mysql_)); return ErrorCode_ExecuteSimpleCommand; } return 0; } int MysqlConnector::client_safe_read(unsigned long *len) { // TODO judge mysql_ closed *len = cli_safe_read(mysql_, NULL); if (*len == packet_error) { need_reconnect_ = need_reconnect(); LOG_ERROR("Reading packet from server failed. code[%d] reason[%s]", mysql_errno(mysql_), mysql_error(mysql_)); return ErrorCode_FetchMysqlResult; } return 0; } bool MysqlConnector::need_reconnect() { return (mysql_errno(mysql_) == CR_SERVER_GONE_ERROR || mysql_errno(mysql_) == CR_SERVER_LOST); } int MysqlConnectorManager::init(const std::string &connection_uri, const std::string &user, const std::string &password) { if (!ailego::Uri::Parse(connection_uri.c_str(), &uri_)) { LOG_ERROR("Parse uri failed. uri[%s]", connection_uri.c_str()); return ErrorCode_InvalidArgument; } if (!validate_paramters(uri_)) { LOG_ERROR("Validate mysql parameters failed. uri[%s]", connection_uri.c_str()); return ErrorCode_InvalidArgument; } if (user.empty() || password.empty()) { LOG_ERROR("User name for password is empty. uri[%s]", connection_uri.c_str()); return ErrorCode_InvalidArgument; } user_ = user; password_ = password; return 0; } MysqlConnectorPtr MysqlConnectorManager::get() { if (!connectors_.empty()) { MysqlConnectorPtr connector = connectors_.front(); connectors_.pop(); return connector; } else { MysqlConnectorPtr connector = std::make_shared(); int ret = connector->init(uri_, user_, password_); if (ret != 0) { LOG_ERROR("Init MysqlConnector failed. code[%d]", ret); return nullptr; } return connector; } } void MysqlConnectorManager::put(const MysqlConnectorPtr connector) { connectors_.push(std::move(connector)); } bool MysqlConnectorManager::validate_paramters(const ailego::Uri &cur_uri) { if (cur_uri.host().empty() || cur_uri.port() <= 0 || cur_uri.path().size() <= 1) { return false; } return true; } MysqlConnectorProxy::MysqlConnectorProxy(MysqlConnectorManagerPtr mgr) : connector_mgr_(std::move(mgr)) {} MysqlConnectorProxy::~MysqlConnectorProxy() { if (connector_) { connector_mgr_->put(connector_); connector_.reset(); } } int MysqlConnectorProxy::init_connector() { if (connector_mgr_) { connector_ = connector_mgr_->get(); if (!connector_) { LOG_ERROR("Connector manager get connector failed."); return ErrorCode_RuntimeError; } return 0; } return ErrorCode_RuntimeError; } } // namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/mysql_connector.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Mysql connector interface definition for proxima search engine */ #pragma once //!!! notice: my_global.h must before mysql.h #include //!!! notice: my_global.h must before mysql.h #include #include #include #include #include #include #include namespace proxima { namespace be { namespace repository { class FieldMeta; class MysqlConnector; class MysqlResultWrapper; class MysqlConnectorManager; using FieldMetaPtr = std::shared_ptr; using MysqlResultWrapperPtr = std::shared_ptr; using MysqlConnectorPtr = std::shared_ptr; using MysqlConnectorManagerPtr = std::shared_ptr; /*! Field Meta */ class FieldMeta { public: //! Constructor FieldMeta(const char *field_name, enum_field_types field_type, unsigned int field_length, unsigned int field_decimals, unsigned int field_flags) : name_(field_name), type_(field_type), length_(field_length), decimals_(field_decimals), flags_(field_flags) {} //! Destructor ~FieldMeta() {} //! Get Field name const std::string &name() const { return name_; } //! Get Field type enum_field_types type() const { return type_; } //! Get Field length unsigned int length() const { return length_; } //! Get Field decimals unsigned int decimals() const { return decimals_; } //! Get Field flags unsigned int flags() const { return flags_; } private: //! Members std::string name_{}; enum_field_types type_{}; unsigned int length_{0}; unsigned int decimals_{0}; unsigned int flags_{0}; }; /*! Mysql Row */ class MysqlRow { public: //! Constructor MysqlRow(unsigned int fields_num) : row_(nullptr), lengths_(nullptr), fields_num_(fields_num) {} //! Reset mysql row void reset(MYSQL_ROW row, unsigned long *lengths) { row_ = row; lengths_ = lengths; } //! Get field value char *field_value(unsigned int idx) const { if (idx < fields_num_) { return row_[idx]; } return nullptr; } //! Get field length unsigned int field_length(unsigned int idx) const { if (idx < fields_num_) { return lengths_[idx]; } return (unsigned int)-1; } private: //! Members MYSQL_ROW row_{nullptr}; unsigned long *lengths_{nullptr}; unsigned int fields_num_{0}; }; /*! Mysql Result Wrapper */ class MysqlResultWrapper { public: //! Constructor MysqlResultWrapper(MYSQL *mysql, MYSQL_RES *res); //! Destructor virtual ~MysqlResultWrapper(); //! Init mysql result wrapper virtual int init(); //! Get next mysql row virtual MysqlRow *next(); //! If current has error virtual bool has_error(); //! Get fields num virtual uint32_t fields_num() const { return fields_num_; } //! Get result rows num virtual uint32_t rows_num() const { return (uint32_t)mysql_num_rows(result_); } //! Get result field meta virtual const FieldMetaPtr &field_meta(uint32_t i) const { return fields_[i]; } private: //! Members uint32_t fields_num_{0}; MYSQL *mysql_{nullptr}; MYSQL_RES *result_{nullptr}; std::unique_ptr mysql_row_{}; std::vector fields_{}; }; /*! Mysql Handler */ class MysqlConnector { public: //! Constructor MysqlConnector(); //! Destructor virtual ~MysqlConnector(); //! Init mysql connector virtual int init(const ailego::Uri &uri, const std::string &user, const std::string &password); //! Reconnect mysql virtual bool reconnect(void); //! Execute query virtual int execute_query(const std::string &sql, MysqlResultWrapperPtr *result, bool sync_fetch = false); //! Execute Simple Command virtual int execute_simple_command(enum enum_server_command command, const unsigned char *arg, size_t arg_length); //! Client safe read virtual int client_safe_read(unsigned long *len); //! Get Uri virtual const ailego::Uri &uri() const { return uri_; } //! Get mysql read data virtual const void *data() const { return (const void *)mysql_->net.read_pos; } private: //! Need reconnect bool need_reconnect(); private: //! MYSQL pointer MYSQL *mysql_{nullptr}; //! Need reconnect bool need_reconnect_{false}; //! Uri ailego::Uri uri_{}; //! user name std::string user_{}; //! password std::string password_{}; //! Ensure mysql thread safe static std::mutex global_mutex_; }; /* Mysql Connector Manager */ class MysqlConnectorManager { public: //! Constructor MysqlConnectorManager() = default; //! Destructor ~MysqlConnectorManager() = default; //! Init manager int init(const std::string &connection_uri, const std::string &user, const std::string &password); //! get mysql connector MysqlConnectorPtr get(); //! put mysql connector void put(MysqlConnectorPtr connector); protected: //! Validate mysql parameters bool validate_paramters(const ailego::Uri &uri); private: //! Members ailego::Uri uri_{}; std::string user_{}; std::string password_{}; std::queue connectors_{}; }; /* MysqlConnectorProxy */ class MysqlConnectorProxy { public: //! Constructor MysqlConnectorProxy(MysqlConnectorManagerPtr connector_mgr); //! Destructor virtual ~MysqlConnectorProxy(); protected: //! Init connector virtual int init_connector(); protected: //! Mysql connector manager MysqlConnectorManagerPtr connector_mgr_{}; //! Mysql connector MysqlConnectorPtr connector_{}; }; } // namespace repository } // namespace be } // namespace proxima ================================================ FILE: src/repository/binlog/mysql_handler.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Mysql handler interface implementation for proxima search engine */ #include "mysql_handler.h" #include "repository/repository_common/error_code.h" #include "repository_common/logger.h" #include "binlog_reader.h" #include "mysql_validator.h" #include "table_reader.h" namespace proxima { namespace be { namespace repository { #define MYSQL_FORMAT " collection[%s] table[%s] " #define MLOG_INFO(format, ...) \ LOG_INFO(format MYSQL_FORMAT, ##__VA_ARGS__, collection_name_.c_str(), \ table_name_.c_str()) #define MLOG_ERROR(format, ...) \ LOG_ERROR(format MYSQL_FORMAT, ##__VA_ARGS__, collection_name_.c_str(), \ table_name_.c_str()) MysqlHandler::MysqlHandler(const CollectionConfig &config) : table_name_(config.repository_config().database().table_name()), collection_name_(config.collection_name()), collection_config_(config) {} MysqlHandler::MysqlHandler(const CollectionConfig &config, MysqlConnectorManagerPtr mgr) : table_name_(config.repository_config().database().table_name()), collection_name_(config.collection_name()), collection_config_(config), connector_mgr_(std::move(mgr)) {} MysqlHandler::~MysqlHandler() {} int MysqlHandler::init(ScanMode mode) { if (inited_) { return ErrorCode_RepeatedInitialized; } MLOG_INFO("Begin init mysql handler."); int ret = 0; if (!connector_mgr_) { connector_mgr_ = std::make_shared(); auto &database = collection_config_.repository_config().database(); ret = connector_mgr_->init(database.connection_uri(), database.user(), database.password()); if (ret != 0) { MLOG_ERROR("Init connector manager failed."); return ret; } } ret = validate_mysql(); if (ret != 0) { return ret; } InfoFetcherPtr info_fetcher = std::make_shared(collection_config_, connector_mgr_); ret = info_fetcher->init(); if (ret != 0) { MLOG_ERROR("Init info fetcher failed."); return ret; } if (mode == ScanMode::FULL) { mysql_reader_ = std::make_shared(table_name_, info_fetcher, connector_mgr_); } else { mysql_reader_ = std::make_shared(table_name_, info_fetcher, connector_mgr_); } ret = mysql_reader_->init(); if (ret != 0) { MLOG_ERROR("Init mysql reader failed."); return ret; } inited_ = true; MLOG_INFO("End init mysql handler."); return 0; } int MysqlHandler::start(const LsnContext &context) { if (!inited_) { return ErrorCode_NoInitialized; } int ret = mysql_reader_->start(context); if (ret != 0) { MLOG_ERROR("Start mysql reader failed."); return ret; } return 0; } int MysqlHandler::get_next_row_data(WriteRequest::Row *row_data, LsnContext *context) { if (!inited_) { return ErrorCode_NoInitialized; } return mysql_reader_->get_next_row_data(row_data, context); } int MysqlHandler::reset_status(ScanMode mode, const CollectionConfig &config, const LsnContext &context) { if (!inited_) { return ErrorCode_NoInitialized; } MLOG_INFO("Begin reset mysql handler."); mysql_reader_.reset(); collection_config_ = config; InfoFetcherPtr info_fetcher = std::make_shared(config, connector_mgr_); int ret = info_fetcher->init(); if (ret != 0) { MLOG_ERROR("Init info fetcher failed."); return ret; } if (mode == ScanMode::FULL) { mysql_reader_ = std::make_shared(table_name_, info_fetcher, connector_mgr_); } else { mysql_reader_ = std::make_shared(table_name_, info_fetcher, connector_mgr_); } ret = mysql_reader_->init(); if (ret != 0) { MLOG_ERROR("Init mysql reader failed."); return ret; } ret = mysql_reader_->start(context); if (ret != 0) { MLOG_ERROR("Start mysql reader failed."); return ret; } MLOG_INFO("End reset mysql handler."); return 0; } int MysqlHandler::get_fields_meta(WriteRequest::RowMeta *meta) { TableSchemaPtr schema = mysql_reader_->get_table_schema(); if (!schema) { MLOG_ERROR("Get table schema failed."); return ErrorCode_RuntimeError; } schema->fill_fields_meta(meta); auto &index_column_params = collection_config_.index_column_params(); int index_column_size = meta->index_column_metas_size(); for (int i = 0; i < index_column_size; ++i) { auto *column_meta = meta->mutable_index_column_metas(i); int j = 0; for (; j < index_column_params.size(); ++j) { if (column_meta->column_name() == index_column_params[j].column_name()) { column_meta->set_data_type(index_column_params[i].data_type()); column_meta->set_dimension(index_column_params[i].dimension()); break; } } if (j == index_column_params.size()) { LOG_ERROR("Index column not found in collection config. column[%s]", column_meta->column_name().c_str()); return ErrorCode_RuntimeError; } } return 0; } int MysqlHandler::validate_mysql() { MysqlValidator validator(connector_mgr_); int ret = validator.init(); if (ret != 0) { MLOG_ERROR("Init mysql validator failed."); return ret; } if (!validator.validate_version()) { MLOG_ERROR("Validate mysql version failed."); return ErrorCode_UnsupportedMysqlVersion; } if (!validator.validate_binlog_format()) { MLOG_ERROR("Validate binlog format failed."); return ErrorCode_UnsupportedBinlogFormat; } if (!validator.validate_database_exist()) { MLOG_ERROR("Validate database failed."); return ErrorCode_InvalidCollectionConfig; } return 0; } int MysqlHandler::get_table_snapshot(std::string *binlog_file, uint64_t *position) { if (!inited_) { return ErrorCode_NoInitialized; } InfoFetcherPtr fetcher = mysql_reader_->get_info_fetcher(); if (!fetcher) { MLOG_ERROR("Get info fetcher failed."); return ErrorCode_RuntimeError; } return fetcher->get_table_snapshot(table_name_, binlog_file, position); } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/mysql_handler.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Oct 2020 * \brief Mysql Mysql interface definition for bilin engine */ #pragma once #include "binlog_common.h" #include "mysql_connector.h" #include "mysql_reader.h" #include "table_schema.h" namespace proxima { namespace be { namespace repository { class MysqlHandler; using MysqlHandlerPtr = std::shared_ptr; /*! MysqlHandler */ class MysqlHandler { public: //! Constructor MysqlHandler(const CollectionConfig &config); //! Constructor MysqlHandler(const CollectionConfig &config, MysqlConnectorManagerPtr mgr); //! Destructor virtual ~MysqlHandler(); //! Init Mysql Handler virtual int init(ScanMode mode); //! Init Mysql Handler virtual int start(const LsnContext &context); //! Get row data from binlog virtual int get_next_row_data(WriteRequest::Row *row_data, LsnContext *context); //! Reset binlog reader status virtual int reset_status(ScanMode mode, const CollectionConfig &config, const LsnContext &context); //! Get table snapshot virtual int get_table_snapshot(std::string *binlog_file, uint64_t *position); //! Get table snapshot virtual int get_fields_meta(WriteRequest::RowMeta *meta); private: //! Validate mysql information int validate_mysql(); private: //! Table name std::string table_name_{}; //! Collection name std::string collection_name_{}; //! Collection config CollectionConfig collection_config_{}; //! Mysql reader MysqlReaderPtr mysql_reader_{}; //! Is already inited bool inited_{false}; //! Mysql connector manager MysqlConnectorManagerPtr connector_mgr_{}; }; } // namespace repository } // namespace be } // namespace proxima ================================================ FILE: src/repository/binlog/mysql_reader.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Mysql reader interface definition for proxima search engine */ #pragma once #include "info_fetcher.h" #include "table_schema.h" namespace proxima { namespace be { namespace repository { class MysqlReader; using MysqlReaderPtr = std::shared_ptr; #define READER_FORMAT " table[%s] " #define RLOG_DEBUG(format, ...) \ LOG_DEBUG(format READER_FORMAT, ##__VA_ARGS__, table_name_.c_str()) #define RLOG_INFO(format, ...) \ LOG_INFO(format READER_FORMAT, ##__VA_ARGS__, table_name_.c_str()) #define RLOG_ERROR(format, ...) \ LOG_ERROR(format READER_FORMAT, ##__VA_ARGS__, table_name_.c_str()) /*! Mysql Reader */ class MysqlReader { public: //! Destructor virtual ~MysqlReader() {} //! Init reader virtual int init() = 0; //! Start reader virtual int start(const LsnContext &context) = 0; //! Get row data from table virtual int get_next_row_data(WriteRequest::Row *row_data, LsnContext *context) = 0; //! Get Table Schema virtual TableSchemaPtr get_table_schema() const = 0; //! Get Info Fetcher virtual InfoFetcherPtr get_info_fetcher() const = 0; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/mysql_validator.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Mysql validator interface implementation for proxima search * engine */ #include "mysql_validator.h" #include #include "repository_common/error_code.h" #include "repository_common/logger.h" #include "sql_builder.h" namespace proxima { namespace be { namespace repository { const std::string MysqlValidator::MYSQL_VERSION_SEPARATOR = "."; const std::string MysqlValidator::MYSQL_MAJOR_VERSION = "5"; const std::string MysqlValidator::MYSQL_MINOR_VERSION = "7"; int MysqlValidator::init() { int ret = init_connector(); if (ret != 0) { LOG_ERROR("Mysql connector proxy init failed."); return ret; } return 0; } bool MysqlValidator::validate_version() { std::string sql = SqlBuilder::BuildSelectVersionSql(); MysqlResultWrapperPtr result; int ret = connector_->execute_query(sql, &result, true); if (ret != 0) { LOG_ERROR("Execute select version sql failed. sql[%s]", sql.c_str()); return false; } uint32_t rows_num = result->rows_num(); if (rows_num != 1) { LOG_ERROR("Mysql result rows num mismatched. rows[%u]", rows_num); return false; } unsigned int fields_num = result->fields_num(); if (fields_num != 1) { LOG_ERROR("Result fields num mismatched. fields[%u]", fields_num); return false; } MysqlRow *row = result->next(); if (!row) { LOG_ERROR("Get next version result failed."); return false; } std::string version(row->field_value(0)); std::vector array; ailego::StringHelper::Split(version, MYSQL_VERSION_SEPARATOR, &array); if (array.size() < 2) { LOG_ERROR("Invalid mysql version. version[%s]", version.c_str()); return false; } // Current only support mysql version 5.7 if (array[0] == MYSQL_MAJOR_VERSION && array[1] == MYSQL_MINOR_VERSION) { return true; } else { LOG_ERROR("Current only support Mysql 5.7. version[%s]", version.c_str()); return false; } } bool MysqlValidator::validate_binlog_format() { std::string sql = SqlBuilder::BuildShowBinlogFormat(); MysqlResultWrapperPtr result; int ret = connector_->execute_query(sql, &result, true); if (ret != 0) { LOG_ERROR("Execute show binlog format sql failed. sql[%s]", sql.c_str()); return false; } uint32_t rows_num = result->rows_num(); if (rows_num != 1) { LOG_ERROR("Show binlog format result rows mismatched. rows[%u]", rows_num); return false; } unsigned int fields_num = result->fields_num(); if (fields_num != 2) { LOG_ERROR("Binlog format result fields num mismatched. num[%u]", fields_num); return false; } MysqlRow *row = result->next(); if (!row) { LOG_ERROR("Get next show binlog format result failed."); return false; } std::string value(row->field_value(1)); if (value == "ROW") { return true; } else { LOG_ERROR("Only support ROW mysql binlog format. format[%s]", value.c_str()); return false; } } bool MysqlValidator::validate_database_exist() { auto &uri = connector_->uri(); if (uri.path().empty()) { return false; } std::string db = uri.path().substr(1); std::string sql = SqlBuilder::BuildSelectDbSql(db); MysqlResultWrapperPtr result; int ret = connector_->execute_query(sql, &result, true); if (ret != 0) { LOG_ERROR("Execute select db sql failed. sql[%s]", sql.c_str()); return false; } uint32_t rows_num = result->rows_num(); if (rows_num != 1) { LOG_ERROR("Select db sql rows num mismatched. sql[%s] rows[%u]", sql.c_str(), rows_num); return false; } return true; } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/mysql_validator.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Mysql validator interface definition for proxima search engine */ #pragma once #include "mysql_connector.h" namespace proxima { namespace be { namespace repository { /*! Mysql Validator */ class MysqlValidator : public MysqlConnectorProxy { public: //! Constructor MysqlValidator(MysqlConnectorManagerPtr mgr) : MysqlConnectorProxy(mgr) {} //! Destructor ~MysqlValidator() = default; //! Init Mysql validator int init(); //! Validate mysql version bool validate_version(); //! Validate mysql row_mode bool validate_binlog_format(); //! Validate database exist bool validate_database_exist(); private: //! Mysql version separator static const std::string MYSQL_VERSION_SEPARATOR; //! Mysql major version static const std::string MYSQL_MAJOR_VERSION; //! Mysql minor version static const std::string MYSQL_MINOR_VERSION; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/rows_event_parser.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Rows event parser interface implementation for proxima search * engine */ #include "rows_event_parser.h" #include "repository/repository_common/error_code.h" #include "repository_common/config.h" #include "repository_common/logger.h" namespace proxima { namespace be { namespace repository { RowsEventParser::RowsEventParser(TableSchemaPtr schema) : schema_(std::move(schema)) {} int RowsEventParser::parse(RowsEvent *event, WriteRequest::Row *row_data, LsnContext *context) { if (!event) { LOG_ERROR("Rows event is nullptr."); return ErrorCode_RuntimeError; } if (schema_->fields().size() != event->column_count()) { LOG_ERROR("Bin log row column count mismatched. actual[%lu] expected[%zu]", event->column_count(), schema_->fields().size()); return ErrorCode_InvalidRowData; } std::vector values; const void *buf = parse_row_data(event->cur_buf(), event->present_columns(), *event, values); if (event->type() == UPDATE_ROWS_EVENT_V1 || event->type() == UPDATE_ROWS_EVENT) { buf = parse_row_data(buf, event->present_columns_update(), *event, values); } if (!buf) { LOG_ERROR("Parse row data failed."); return ErrorCode_InvalidRowData; } int ret = fill_row_data(values, event->type(), row_data); if (ret != 0) { LOG_ERROR("Fill row data failed."); return ret; } // previous table map event position context->position = event->start_position(); event->set_cur_buf(buf); return 0; } int RowsEventParser::fill_row_data(const std::vector &values, EventType type, WriteRequest::Row *row_data) { uint64_t seq_id = get_auto_increment_id(values[schema_->auto_increment_id()]); if (seq_id == INVALID_PRIMARY_KEY) { LOG_ERROR("Get auto increment id failed."); return ErrorCode_RuntimeError; } row_data->set_primary_key(seq_id); switch (type) { case WRITE_ROWS_EVENT: case WRITE_ROWS_EVENT_V1: { fill_selected_columns(values, row_data); row_data->set_operation_type(proto::OP_INSERT); break; } case UPDATE_ROWS_EVENT: case UPDATE_ROWS_EVENT_V1: { fill_selected_columns(values, row_data); row_data->set_operation_type(proto::OP_UPDATE); break; } case DELETE_ROWS_EVENT: case DELETE_ROWS_EVENT_V1: { row_data->set_operation_type(proto::OP_DELETE); break; } default: LOG_ERROR("Unsupported event type %d.", (int32_t)type); return ErrorCode_RuntimeError; } return 0; } void RowsEventParser::fill_selected_columns( const std::vector &values, WriteRequest::Row *row_data) { auto &index_ids = schema_->selected_index_ids(); for (size_t i = 0; i < index_ids.size(); ++i) { auto *index_column = row_data->mutable_index_column_values()->add_values(); *index_column = values[index_ids[i]]; } auto &forward_ids = schema_->selected_forward_ids(); for (size_t i = 0; i < forward_ids.size(); ++i) { auto *forward_column = row_data->mutable_forward_column_values()->add_values(); *forward_column = values[forward_ids[i]]; } } const void *RowsEventParser::parse_row_data(const void *buf, const uint8_t *present_columns, const RowsEvent &event, std::vector &values) { if (!buf) { return nullptr; } unsigned long column_count = event.column_count(); values.resize(column_count); const uint8_t *null_bits = static_cast(buf); const void *row_data = null_bits + event.bits_length(); TableMapEventPtr table_map = event.table_map(); if (!table_map) { LOG_ERROR("Table map event is nullptr."); return nullptr; } const std::vector &fields = schema_->fields(); for (unsigned long c = 0; c < column_count; ++c) { // Can ignore, row mode always present if (!(present_columns[c / 8] & (0x1 << (c % 8)))) { continue; } if (null_bits[c / 8] & (0x1 << (c % 8))) { continue; } row_data = fields[c]->unpack_binary(row_data, event.rows_end(), table_map->column_info(c), &values[c]); if (!row_data) { LOG_ERROR("Unpack column data failed. id[%lu] field_name[%s]", c, fields[c]->field_name().c_str()); return nullptr; } } return row_data; } uint64_t RowsEventParser::get_auto_increment_id(const GenericValue &value) { switch (value.value_oneof_case()) { case GenericValue::kInt32Value: return (uint64_t)value.int32_value(); case GenericValue::kInt64Value: return (uint64_t)value.int64_value(); case GenericValue::kUint32Value: return (uint64_t)value.uint32_value(); case GenericValue::kUint64Value: return (uint64_t)value.uint64_value(); default: LOG_ERROR("Unsupported auto_increment data type %d.", value.value_oneof_case()); return INVALID_PRIMARY_KEY; } } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/rows_event_parser.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Rows event parser interface definition for proxima search engine */ #pragma once #include "binlog_event.h" #include "table_schema.h" namespace proxima { namespace be { namespace repository { class RowsEventParser; using RowsEventParserPtr = std::shared_ptr; /*! Rows Event Parser */ class RowsEventParser { public: //! Constructor RowsEventParser(TableSchemaPtr schema); //! Destructor ~RowsEventParser() = default; //! Parse event int parse(RowsEvent *event, WriteRequest::Row *row_data, LsnContext *context); //! Update table schema void update_schema(TableSchemaPtr schema) { schema_ = std::move(schema); } private: //! Fill proto row data int fill_row_data(const std::vector &values, EventType type, WriteRequest::Row *row_data); //! Fill selected columns void fill_selected_columns(const std::vector &values, WriteRequest::Row *row_data); //! Parse row data const void *parse_row_data(const void *buf, const uint8_t *present_columns, const RowsEvent &event, std::vector &values); //! Get sequence id uint64_t get_auto_increment_id(const GenericValue &value); private: //! Table Schema TableSchemaPtr schema_{}; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/sql_builder.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Sql builder interface implementation for proxima search engine */ #include "sql_builder.h" namespace proxima { namespace be { namespace repository { const std::string SqlBuilder::SHOW_BINARY_LOGS_SQL("SHOW BINARY LOGS"); const std::string SqlBuilder::UNLOCK_TABLE_SQL("UNLOCK TABLES"); const std::string SqlBuilder::SELECT_VERSION_SQL("SELECT VERSION()"); const std::string SqlBuilder::SHOW_BINLOG_FORMAT_SQL( "SHOW GLOBAL VARIABLES LIKE 'binlog_format'"); const std::string SqlBuilder::SHOW_MASTER_STATUS_SQL("SHOW MASTER STATUS"); const std::string SqlBuilder::TURN_OFF_CHECKSUM_SQL( "SET @master_binlog_checksum='NONE'"); std::string SqlBuilder::BuildScanTableSql( const std::string &database, const std::string &table, const std::string &auto_inc_field, const std::vector &select_fields, uint64_t seq_id) { std::stringstream sql_format; sql_format << "SELECT " << auto_inc_field; for (size_t i = 0; i < select_fields.size(); ++i) { sql_format << ", " << select_fields[i]; } sql_format << " FROM " << database << "." << table << " WHERE " << auto_inc_field << " > " << seq_id; return sql_format.str(); } std::string SqlBuilder::BuildGetSchemaSql(const std::string &database, const std::string &table) { std::stringstream sql_format; sql_format << "SELECT * FROM " << database << "." << table << " LIMIT 0"; return sql_format.str(); } std::string SqlBuilder::BuildLockTableSql(const std::string &database, const std::string &table) { std::stringstream sql_format; sql_format << "LOCK TABLE " << database << "." << table << " READ"; return sql_format.str(); } std::string SqlBuilder::BuildSelectEventsSql(const std::string &file_name, uint64_t position) { std::stringstream sql_format; sql_format << "SHOW BINLOG EVENTS IN '" << file_name << "' from " << position << " LIMIT 1"; return sql_format.str(); } std::string SqlBuilder::BuildShowFullColumnsSql(const std::string &database, const std::string &table) { std::stringstream sql_format; sql_format << "SHOW FULL COLUMNS FROM " << table << " IN " << database; return sql_format.str(); } const std::string &SqlBuilder::BuildShowBinaryLogsSql() { return SHOW_BINARY_LOGS_SQL; } const std::string &SqlBuilder::BuildUnlockTablesSql() { return UNLOCK_TABLE_SQL; } const std::string &SqlBuilder::BuildSelectVersionSql() { return SELECT_VERSION_SQL; } const std::string &SqlBuilder::BuildShowBinlogFormat() { return SHOW_BINLOG_FORMAT_SQL; } const std::string &SqlBuilder::BuildShowMasterStatus() { return SHOW_MASTER_STATUS_SQL; } const std::string &SqlBuilder::BuildTurnoffCheckSumSql() { return TURN_OFF_CHECKSUM_SQL; } std::string SqlBuilder::BuildSelectDbSql(const std::string &db) { std::stringstream sql_format; sql_format << "SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME='" << db << "'"; return sql_format.str(); } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/sql_builder.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Sql builder interface definition for proxima search engine */ #pragma once #include #include #include namespace proxima { namespace be { namespace repository { /*! Sql Builder */ class SqlBuilder { public: //! Build scan table sql static std::string BuildScanTableSql( const std::string &database, const std::string &table, const std::string &auto_inc_field, const std::vector &select_fields, uint64_t seq_id); //! Build get table schema sql static std::string BuildGetSchemaSql(const std::string &database, const std::string &table); //! Build lock table sql static std::string BuildLockTableSql(const std::string &database, const std::string &table); //! Build select events sql static std::string BuildSelectEventsSql(const std::string &file_name, uint64_t position); //! Build show full columns sql static std::string BuildShowFullColumnsSql(const std::string &database, const std::string &table); //! Build show binary logs static const std::string &BuildShowBinaryLogsSql(); //! Build select database sql static std::string BuildSelectDbSql(const std::string &db); //! Build unlock tables sql static const std::string &BuildUnlockTablesSql(); //! Build unlock tables sql static const std::string &BuildSelectVersionSql(); //! Build unlock tables sql static const std::string &BuildShowBinlogFormat(); //! Build show master status sql static const std::string &BuildShowMasterStatus(); //! Build set checksum sql static const std::string &BuildTurnoffCheckSumSql(); private: static const std::string SHOW_BINARY_LOGS_SQL; static const std::string UNLOCK_TABLE_SQL; static const std::string SELECT_VERSION_SQL; static const std::string SHOW_BINLOG_FORMAT_SQL; static const std::string SHOW_MASTER_STATUS_SQL; static const std::string TURN_OFF_CHECKSUM_SQL; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/table_reader.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Table reader interface implementation for proxima search engine */ #include "table_reader.h" #include "repository_common/error_code.h" #include "repository_common/logger.h" #include "binlog_common.h" #include "sql_builder.h" namespace proxima { namespace be { namespace repository { TableReader::TableReader(const std::string &table_name, InfoFetcherPtr info_fetcher, MysqlConnectorManagerPtr mgr) : MysqlConnectorProxy(std::move(mgr)), table_name_(table_name), info_fetcher_(std::move(info_fetcher)) {} int TableReader::init() { RLOG_INFO("Begin init TableReader."); int ret = init_connector(); if (ret != 0) { LOG_ERROR("Mysql connector proxy init failed."); return ret; } ret = info_fetcher_->get_table_schema(table_name_, &table_schema_); if (ret != 0) { RLOG_ERROR("Info fetcher get table schema failed."); return ret; } RLOG_INFO("Table reader init success."); return 0; } int TableReader::start(const LsnContext &context) { RLOG_INFO("Begin start TableReader. seq_id[%zu]", (size_t)context.seq_id); int ret = prepare_reader(context.seq_id); if (ret != 0) { RLOG_ERROR("Prepare table reader failed."); return ret; } sequence_id_ = context.seq_id; RLOG_INFO("End start TableReader success."); return 0; } int TableReader::get_next_row_data(WriteRequest::Row *row_data, LsnContext *context) { if (need_reconnect_) { if (connector_->reconnect() && prepare_reader(sequence_id_) == 0) { need_reconnect_ = false; } else { return ErrorCode_ConnectMysql; } } MysqlRow *row = result_wrappeer_->next(); if (!row) { if (!result_wrappeer_->has_error()) { context->status = RowDataStatus::NO_MORE_DATA; return 0; } else { need_reconnect_ = true; return ErrorCode_FetchMysqlResult; } } build_row_data(row, row_data, context); context->status = RowDataStatus::NORMAL; sequence_id_ = context->seq_id; // Debug RLOG_INFO("primary_key: %zu", (size_t)row_data->primary_key()); return 0; } int TableReader::build_row_data(MysqlRow *row, WriteRequest::Row *row_data, LsnContext *context) { // set operation type row_data->set_operation_type(proto::OP_INSERT); const std::vector &fields = table_schema_->selected_fields(); uint32_t max_index_id = table_schema_->max_index_id(); unsigned int fields_num = result_wrappeer_->fields_num(); for (unsigned int i = 1; i < fields_num; ++i) { GenericValue *forward_value = nullptr; if (i - 1 >= max_index_id && fields[i - 1]->is_forward()) { forward_value = row_data->mutable_forward_column_values()->add_values(); fields[i - 1]->unpack_text(row->field_value(i), row->field_length(i), forward_value); } if (i - 1 < max_index_id && fields[i - 1]->is_index()) { GenericValue *index_value = row_data->mutable_index_column_values()->add_values(); fields[i - 1]->unpack_text(row->field_value(i), row->field_length(i), index_value); } } // process primary key GenericValue value; const FieldPtr &auto_increment_field = table_schema_->auto_increment_field(); auto_increment_field->unpack_text(row->field_value(0), row->field_length(0), &value); uint64_t auto_increment_id = get_auto_increment_id(value); if (auto_increment_id == INVALID_PRIMARY_KEY) { RLOG_ERROR("Get auto increment id failed."); return ErrorCode_RuntimeError; } row_data->set_primary_key(auto_increment_id); // process auto increment field context->seq_id = auto_increment_id; return 0; } int TableReader::prepare_reader(uint64_t seq_id) { // Get select fields std::vector selected_fields; const std::vector &fields = table_schema_->selected_fields(); for (auto it = fields.begin(); it != fields.end(); ++it) { selected_fields.emplace_back((*it)->select_field()); } // Build scan table sql const std::string &auto_inc_field = table_schema_->auto_increment_field()->field_name(); const std::string &db = info_fetcher_->database(); std::string select_sql = SqlBuilder::BuildScanTableSql( db, table_name_, auto_inc_field, selected_fields, seq_id); // Execute select sql int ret = connector_->execute_query(select_sql, &result_wrappeer_, false); if (ret != 0) { RLOG_ERROR("Connector execute query failed. sql[%s]", select_sql.c_str()); return ret; } return 0; } uint64_t TableReader::get_auto_increment_id(const GenericValue &value) { switch (value.value_oneof_case()) { case GenericValue::kInt32Value: return (uint64_t)value.int32_value(); case GenericValue::kInt64Value: return (uint64_t)value.int64_value(); case GenericValue::kUint32Value: return (uint64_t)value.uint32_value(); case GenericValue::kUint64Value: return (uint64_t)value.uint64_value(); default: RLOG_ERROR("Unsupported auto_increment data type %d.", value.value_oneof_case()); return INVALID_PRIMARY_KEY; } } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/table_reader.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Table reader interface definition for proxima search engine */ #pragma once #include "mysql_connector.h" #include "mysql_reader.h" namespace proxima { namespace be { namespace repository { /*! Table Handler */ class TableReader : public MysqlReader, MysqlConnectorProxy { public: //! Constructor TableReader(const std::string &table_name, InfoFetcherPtr info_fetcher, MysqlConnectorManagerPtr mgr); //! Destructor ~TableReader() = default; //! Init reader int init() override; // Start reader int start(const LsnContext &context) override; //! Get row data from table int get_next_row_data(WriteRequest::Row *row_data, LsnContext *context) override; //! Get Table Schema TableSchemaPtr get_table_schema() const override { return table_schema_; } //! Get Info Fetcher InfoFetcherPtr get_info_fetcher() const override { return info_fetcher_; } private: //! Prepare table reader int prepare_reader(uint64_t seq_id); //! Build row data int build_row_data(MysqlRow *row, WriteRequest::Row *row_data, LsnContext *context); //! Get sequence id uint64_t get_auto_increment_id(const GenericValue &value); private: //! Table name std::string table_name_{}; //! Current seq id uint64_t sequence_id_{0}; //! Connector need reconnect bool need_reconnect_{false}; //! Table schema TableSchemaPtr table_schema_{}; //! Info fetcher InfoFetcherPtr info_fetcher_{}; //! Mysql result MysqlResultWrapperPtr result_wrappeer_{}; //! Selected fields SelectedFieldsPtr selected_fields_{}; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/table_schema.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Table schema interface implementation for proxima search engine */ #include "table_schema.h" namespace proxima { namespace be { namespace repository { void TableSchema::fill_fields_meta(proto::WriteRequest::RowMeta *meta) { // fill index tuples for (auto id : selected_index_ids_) { auto *index_meta = meta->add_index_column_metas(); index_meta->set_column_name(fields_[id]->field_name()); } // fill forward tuples for (auto id : selected_forward_ids_) { auto *forward_name = meta->add_forward_column_names(); *forward_name = fields_[id]->field_name(); } } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/binlog/table_schema.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Nov 2020 * \brief Table schema interface definition for proxima search engine */ #pragma once #include #include "proto/common.pb.h" #include "binlog_common.h" #include "field.h" namespace proxima { namespace be { namespace repository { class TableSchema; using TableSchemaPtr = std::shared_ptr; /*! Table Schema */ class TableSchema { public: //! Constructor TableSchema() = default; //! Destructor ~TableSchema() = default; //! Get fields const std::vector &fields() const { return fields_; } //! Get field const FieldPtr &fields(size_t id) const { return fields_[id]; } //! Get selected fields const std::vector &selected_fields() const { return selected_fields_; } //! Get selected forward ids const std::vector &selected_forward_ids() const { return selected_forward_ids_; } //! Get selected index ids const std::vector &selected_index_ids() const { return selected_index_ids_; } //! Get auto increment id size_t auto_increment_id() const { return auto_increment_id_; } //! Get auto increment field const FieldPtr auto_increment_field() const { return fields_[auto_increment_id_]; } //! Add field void add_field(FieldPtr field) { fields_.emplace_back(std::move(field)); } //! Add selected field void add_selected_field(FieldPtr field) { selected_fields_.emplace_back(std::move(field)); } //! Add selected forward id void add_selected_forward_id(size_t id) { selected_forward_ids_.emplace_back(id); } //! Add selected index ids void add_selected_index_id(size_t id) { selected_index_ids_.emplace_back(id); } //! Set auto increment id void set_auto_increment_id(size_t id) { auto_increment_id_ = id; } //! Get selected fields meta void fill_fields_meta(proto::WriteRequest::RowMeta *meta); //! Set max index id void set_max_index_id(uint32_t max_id) { max_index_id_ = max_id; } //! Get max index id uint32_t max_index_id() { return max_index_id_; } private: //! Max index id uint32_t max_index_id_{0}; //! Table all fields std::vector fields_{}; //! Selected fields std::vector selected_fields_{}; //! Selected forward ids std::vector selected_forward_ids_{}; //! Selected index ids std::vector selected_index_ids_{}; //! Auto increment field id size_t auto_increment_id_{0}; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/collection.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author Dianzhang.Chen * \date Oct 2020 * \brief Interface of collection */ #pragma once #include "common/macro_define.h" #include "common_types.h" namespace proxima { namespace be { namespace repository { class Collection; using CollectionPtr = std::shared_ptr; /*! Collection Interface */ class Collection { public: virtual ~Collection() = default; public: //! Initialize Collection virtual int init() = 0; //! Start collection virtual void run() = 0; //! Stop collection virtual void stop() = 0; //! Update Collection virtual void update() = 0; //! Drop Collection virtual void drop() = 0; //! If collection is finished virtual bool finished() const = 0; //! Get collection state virtual CollectionStatus state() const = 0; //! Get collection schema revision virtual uint32_t schema_revision() const = 0; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/collection_creator.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Oct 2020 * \brief Implementation of collection creator */ #include "collection_creator.h" #include "binlog/mysql_handler.h" #include "mysql_collection.h" namespace proxima { namespace be { namespace repository { CollectionPtr CollectionCreatorImpl::create(const CollectionInfo &info) const { MysqlHandlerPtr mysql_handler = std::make_shared(info.config()); return std::make_shared(info.config(), mysql_handler); } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/collection_creator.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Oct 2020 * \brief Interface of collection creator */ #pragma once #include #include "common/macro_define.h" #include "collection.h" namespace proxima { namespace be { namespace repository { class CollectionCreator; using CollectionCreatorPtr = std::shared_ptr; /*! Collection Creator */ class CollectionCreator { public: //! Destructor virtual ~CollectionCreator() = default; //! Create collection virtual CollectionPtr create(const CollectionInfo &info) const = 0; }; /*! Collection Creator Implication */ class CollectionCreatorImpl : public CollectionCreator { public: //! Constructor CollectionCreatorImpl() = default; //! Destructor ~CollectionCreatorImpl() = default; //! Create collection CollectionPtr create(const CollectionInfo &info) const override; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/collection_manager.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Oct 2020 * \brief Implementation of collection manager */ #include "collection_manager.h" #include #include #include #include #include "binlog/mysql_handler.h" #include "repository/repository_common/config.h" #include "repository/repository_common/error_code.h" #include "repository/repository_common/version.h" namespace proxima { namespace be { namespace repository { //! Create collection int CollectionManager::create_collection(const CollectionInfo &info) { const std::string &collection_name = info.config().collection_name(); const std::string &uuid = info.uuid(); if (collections_.find(uuid) != collections_.end()) { LOG_ERROR("Create collection failed. uuid[%s]", uuid.c_str()); return ErrorCode_DuplicateCollection; } LOG_INFO("Start to create a new collection. name[%s], uuid[%s]", collection_name.c_str(), uuid.c_str()); CollectionPtr current_collection = collection_creator_->create(info); if (!current_collection) { LOG_ERROR("Create Mysql collection object failed"); return ErrorCode_RuntimeError; } int ret = current_collection->init(); if (ret != 0) { LOG_ERROR("Init collection failed. name[%s]", collection_name.c_str()); return ret; } collections_[uuid] = current_collection; uuid_name_map_[uuid] = collection_name; current_collection->run(); LOG_INFO("Create a new collection successfully. name[%s], uuid[%s]", collection_name.c_str(), uuid.c_str()); return 0; } //! Update collection int CollectionManager::update_collection(const std::string &uuid) { auto it = collections_.find(uuid); if (it == collections_.end()) { LOG_ERROR("Can't update not exist collection. uuid[%s]", uuid.c_str()); return ErrorCode_CollectionNotExist; } it->second->update(); return 0; } //! Drop collection int CollectionManager::drop_collection(const std::string &uuid) { auto it = collections_.find(uuid); if (it == collections_.end()) { LOG_ERROR("Can't drop not exist collection. uuid[%s]", uuid.c_str()); return ErrorCode_CollectionNotExist; } it->second->drop(); return 0; } void CollectionManager::clean_invalid_collections() { std::vector finished_collections; for (auto &collection : collections_) { if (collection.second->finished()) { collection.second->stop(); finished_collections.emplace_back(collection.first); } } for (auto &finished_collection : finished_collections) { LOG_INFO("Clean invalid collection. uuid[%s], name[%s]", finished_collection.c_str(), uuid_name_map_[finished_collection].c_str()); collections_.erase(finished_collection); uuid_name_map_.erase(finished_collection); } } void CollectionManager::stop_collections() { for (auto &collection : collections_) { LOG_INFO("Stopping Collection. uuid[%s], name[%s]", collection.first.c_str(), uuid_name_map_[collection.first].c_str()); collection.second->stop(); } } void CollectionManager::load_config() { index_server_uri_ = repository::Config::Instance().get_index_agent_uri(); max_retry_ = repository::Config::Instance().get_max_retry(); timeout_ms_ = repository::Config::Instance().get_timeout_ms(); repository_name_ = repository::Config::Instance().get_repository_name(); load_balance_ = repository::Config::Instance().get_load_balance(); } int CollectionManager::cleanup() { std::unique_lock ul(mutex_); stop_collections(); collections_.clear(); return 0; } int CollectionManager::stop() { LOG_INFO("Stopping Collection Manager."); stop_.store(true); cleanup(); return 0; } int CollectionManager::get_all_collections( std::vector *collections) { proto::ListCondition request; proto::ListCollectionsResponse response; proto::ProximaService_Stub stub(&channel_); brpc::Controller cntl; request.set_repository_name(repository_name_); stub.list_collections(&cntl, &request, &response, NULL); if (cntl.Failed()) { LOG_ERROR("list_collections rpc failed. reason[%s]", cntl.ErrorText().c_str()); return ErrorCode_RPCFailed; } // Check status if (response.status().code() != 0) { LOG_ERROR("Failed to get all collections. reason[%s]", response.status().reason().c_str()); return response.status().code(); } // auto &entity = response.entity(); collections->insert(collections->end(), response.collections().begin(), response.collections().end()); return 0; } void CollectionManager::create_collections( const std::vector &infos) { for (auto &info : infos) { int ret = create_collection(info); if (ret != 0) { // one collection error, just print error message and continue LOG_ERROR( "Failed to create collection: name[%s], uuid[%s], code[%d], msg[%s]", info.config().collection_name().c_str(), info.uuid().c_str(), ret, ErrorCode::What(ret)); } } } void CollectionManager::update_collections( const std::vector &uuids) { for (auto &uuid : uuids) { int ret = update_collection(uuid); if (ret != 0) { // one collection error, just print error message and continue LOG_ERROR("Failed to update collection: uuid[%s], code[%d], msg[%s]", uuid.c_str(), ret, ErrorCode::What(ret)); } } } void CollectionManager::drop_collections( const std::vector &uuids) { for (auto &uuid : uuids) { int ret = drop_collection(uuid); if (ret != 0) { // one collection error, just print error message and continue LOG_ERROR("Failed to drop collection: uuid[%s], code[%d], msg[%s]", uuid.c_str(), ret, ErrorCode::What(ret)); } } } bool CollectionManager::is_old_collection(const std::string &uuid, uint32_t new_schema_revision) const { auto it = collections_.find(uuid); if (it == collections_.end()) { return false; } CollectionPtr current_collection = it->second; uint32_t schema_revision = current_collection->schema_revision(); return schema_revision < new_schema_revision; } void CollectionManager::classify_collections( const std::vector &infos, std::vector *new_collection_infos, std::vector *old_collection_uuids, std::vector *expired_collection_uuids) const { for (auto &info : infos) { const std::string &uuid = info.uuid(); // todo: Read schema revision from collection info when support update. // current just send 0; // uint32_t schema_revision = collection.schema_revision(); uint32_t schema_revision = 0; if (collections_.find(uuid) == collections_.end()) { new_collection_infos->emplace_back(info); } else if (is_old_collection(uuid, schema_revision)) { old_collection_uuids->emplace_back(uuid); } } for (auto &exist_collection : collections_) { const std::string &uuid = exist_collection.first; if (std::none_of( infos.begin(), infos.end(), [&](const CollectionInfo &info) { return info.uuid() == uuid; })) { expired_collection_uuids->emplace_back(uuid); } } } uint64_t CollectionManager::get_sleep_time() const { std::mt19937 gen((std::random_device())()); return (std::uniform_int_distribution(0, 1000))(gen); } void CollectionManager::filter_collections( const std::vector &collections, std::vector *valid_collections) const { for (auto &collection : collections) { if (collection.status() == proto::CollectionInfo::CS_SERVING) { valid_collections->push_back(collection); } } } //! Deal collections periodicity void CollectionManager::start() { LOG_INFO("Start Collection Manager."); std::vector collection_infos; std::vector valid_collection_infos; std::vector new_collection_infos; std::vector old_collection_uuids; std::vector expired_collection_uuids; while (true) { collection_infos.clear(); valid_collection_infos.clear(); new_collection_infos.clear(); old_collection_uuids.clear(); expired_collection_uuids.clear(); int ret = get_all_collections(&collection_infos); if (ret != 0) { // Retry uint64_t sleep_time = get_sleep_time(); std::this_thread::sleep_for(std::chrono::milliseconds(sleep_time)); if (stop_.load()) { return; } continue; } filter_collections(collection_infos, &valid_collection_infos); classify_collections(valid_collection_infos, &new_collection_infos, &old_collection_uuids, &expired_collection_uuids); std::unique_lock ul(mutex_); if (stop_.load()) { return; } create_collections(new_collection_infos); update_collections(old_collection_uuids); drop_collections(expired_collection_uuids); clean_invalid_collections(); ul.unlock(); std::this_thread::sleep_for(std::chrono::seconds(UPDATE_INTERVAL)); } } //! Init Collection Manager int CollectionManager::init() { // Load configurations load_config(); options_ = brpc::ChannelOptions(); options_.max_retry = max_retry_; options_.timeout_ms = timeout_ms_; repository_name_ = Config::Instance().get_repository_name(); if (repository_name_.empty()) { LOG_ERROR("Repository name is empty."); return ErrorCode_ConfigError; } int ret = channel_.Init(index_server_uri_.c_str(), load_balance_.c_str(), &options_); if (ret != 0) { LOG_ERROR("Failed to initialize channel. uri[%s]", index_server_uri_.c_str()); return ErrorCode_InitChannel; } // Check Proxima BE version ret = check_server_version(); if (ret != 0) { LOG_ERROR("Check Proxima BE server version failed."); return ret; } return 0; } int CollectionManager::check_server_version() { proto::ProximaService_Stub stub(&channel_); brpc::Controller cntl; proto::GetVersionRequest request; proto::GetVersionResponse response; stub.get_version(&cntl, &request, &response, nullptr); if (cntl.Failed()) { LOG_ERROR("Get Proxima BE version rpc failed. reason[%s]", cntl.ErrorText().c_str()); return ErrorCode_RPCFailed; } if (response.status().code() != 0) { LOG_ERROR("Get Proxima BE version failed. reason[%s]", response.status().reason().c_str()); return response.status().code(); } std::string server_version = response.version(); std::string client_version = Version::String(); LOG_INFO("server_version: %s", server_version.c_str()); LOG_INFO("mysql_repository_version: %s", Version::String()); if (server_version == client_version) { return 0; } // TODO @Dianzhang.Chen // Temporarily we just use first two seq number of version string to compare // For exp: version[0.1.2] match version[0.1.3] with "0.1" std::vector server_sub_seqs; ailego::StringHelper::Split(server_version, '.', &server_sub_seqs); std::vector client_sub_seqs; ailego::StringHelper::Split(client_version, '.', &client_sub_seqs); int compare_count = 2; for (int i = 0; i < compare_count; i++) { if (client_sub_seqs[i] != server_sub_seqs[i]) { LOG_ERROR("Mysql repository version: %s not match server version: %s", Version::String(), server_version.c_str()); return ErrorCode_MismatchedVersion; } } return 0; } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/collection_manager.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Oct 2020 * \brief Interface of collection manager */ #pragma once #include #include #include "collection_creator.h" #include "mysql_collection.h" namespace proxima { namespace be { namespace repository { class CollectionManager; using CollectionManagerPtr = std::shared_ptr; /*! Collection Manager */ // class CollectionManager { class CollectionManager { public: //! Constructor explicit CollectionManager(CollectionCreatorPtr collection_creator) : collection_creator_(std::move(collection_creator)) {} //! Destructor ~CollectionManager() = default; public: //! Init Collection Manager int init(); //! Start repository void start(); //! Stop repository int stop(); //!Cleanup repository int cleanup(); private: //! Create Collection int create_collection(const CollectionInfo &info); //! Update Collection int update_collection(const std::string &uuid); //! Drop Collection int drop_collection(const std::string &uuid); //! Create Collections void create_collections(const std::vector &infos); //! Update Collections void update_collections(const std::vector &uuids); //! Drop Collections void drop_collections(const std::vector &uuids); //! Classify Collections void classify_collections( const std::vector &infos, std::vector *new_collection_infos, std::vector *old_collection_uuids, std::vector *expired_collection_uuids) const; //! Load configs void load_config(); //! Clean invalid collections void clean_invalid_collections(); //! Stop all collections void stop_collections(); //! Get all collections from index agent int get_all_collections(std::vector *infos); //! Get sleep time uint64_t get_sleep_time() const; //! Check if collection is old bool is_old_collection(const std::string &uuid, uint32_t new_schema_revision) const; //! Filter collections by collection status void filter_collections(const std::vector &infos, std::vector *valid_infos) const; //! Check server version int check_server_version(); private: //! Disable copy constructor CollectionManager(const CollectionManager &) = delete; //! Disable assignment operator CollectionManager &operator=(const CollectionManager &) = delete; private: //! Members of Collections std::unordered_map collections_{}; std::unordered_map uuid_name_map_{}; std::atomic stop_{false}; //! Mutex std::mutex mutex_{}; //! Members of brpc brpc::Channel channel_{}; brpc::ChannelOptions options_{}; std::string index_server_uri_{}; int max_retry_{0}; int timeout_ms_{0}; std::string load_balance_{}; std::string index_agent_addr_{}; std::string repository_name_{}; CollectionCreatorPtr collection_creator_{}; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/common_types.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Jan 2021 * \brief This file includes some baic & common functions */ #pragma once #include #include #include "proto/common.pb.h" #include "proto/proxima_be.pb.h" namespace proxima { namespace be { namespace repository { const uint64_t UPDATE_INTERVAL{1}; enum class CollectionStateFlag : uint32_t { NORMAL = 0, UPDATE, DROP }; enum class CollectionStatus : uint32_t { INIT = 0, RUNNING, UPDATING, FINISHED }; enum class ScanMode : uint32_t { FULL = 0, INCREMENTAL }; enum RowDataStatus : uint32_t { NORMAL = 0, NO_MORE_DATA, SCHEMA_CHANGED }; #define INVALID_PRIMARY_KEY std::numeric_limits::max() using CollectionConfig = proto::CollectionConfig; using WriteRequest = proto::WriteRequest; using GenericValue = proto::GenericValue; using FieldType = proto::GenericValueMeta::FieldType; using GenericValueMeta = proxima::be::proto::GenericValueMeta; using GenericValueMetaList = google::protobuf::RepeatedPtrField; // new using CollectionInfo = proto::CollectionInfo; struct LsnContext { //! binlog file name std::string file_name; //! binlog position uint64_t position; //! table sequence id uint64_t seq_id; //! row data status RowDataStatus status; LsnContext() : file_name(""), position(4), seq_id(0), status(RowDataStatus::NORMAL) {} }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/lsn_context_format.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Mar 2021 * \brief Implementation of lsn context format */ #include "lsn_context_format.h" #include #include "repository/repository_common/error_code.h" namespace proxima { namespace be { namespace repository { LsnContextFormat::LsnContextFormat(const LsnContextFormat &other) { file_name_ = other.file_name_; position_ = other.position_; seq_id_ = other.seq_id_; mode_ = other.mode_; } LsnContextFormat &LsnContextFormat::operator=(const LsnContextFormat &other) { file_name_ = other.file_name_; position_ = other.position_; seq_id_ = other.seq_id_; mode_ = other.mode_; return *this; } int LsnContextFormat::parse_from_string(const std::string &lsn_context) { if (lsn_context.empty()) { return ErrorCode_InvalidLSNContext; } std::size_t start = 0; std::size_t pos = lsn_context.find(";", start); if (pos != std::string::npos) { file_name_ = lsn_context.substr(start, pos - start); start = pos + 1; } else { return ErrorCode_InvalidLSNContext; } pos = lsn_context.find(";", start); if (pos != std::string::npos) { try { position_ = std::stoull(lsn_context.substr(start, pos - start)); } catch (...) { return ErrorCode_InvalidLSNContext; } start = pos + 1; } else { return ErrorCode_InvalidLSNContext; } pos = lsn_context.find(";", start); if (pos != std::string::npos) { try { seq_id_ = std::stoull(lsn_context.substr(start, pos - start)); } catch (...) { return ErrorCode_InvalidLSNContext; } start = pos + 1; } else { return ErrorCode_InvalidLSNContext; } unsigned long scan_mode = (unsigned long)ScanMode::FULL; try { scan_mode = std::stoul(lsn_context.substr(start)); } catch (...) { return ErrorCode_InvalidLSNContext; } mode_ = static_cast(scan_mode); return 0; } std::string LsnContextFormat::convert_to_string() const { std::stringstream ss; ss << file_name_ << ";" << position_ << ";" << seq_id_ << ";" << (uint32_t)mode_; return ss.str(); } const std::string &LsnContextFormat::file_name() const { return file_name_; } uint64_t LsnContextFormat::position() const { return position_; } uint64_t LsnContextFormat::seq_id() const { return seq_id_; } const ScanMode &LsnContextFormat::mode() const { return mode_; } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/lsn_context_format.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Mar 2021 * \brief Interface of lsn context format */ #pragma once #include "common_types.h" namespace proxima { namespace be { namespace repository { /*! Lsn Context Format */ class LsnContextFormat { public: //! Constructor LsnContextFormat() = default; //! Constructor LsnContextFormat(const std::string &name, uint64_t pos, uint64_t id, const ScanMode &scan_mode) : file_name_(name), position_(pos), seq_id_(id), mode_(scan_mode) {} //! Destructor ~LsnContextFormat() = default; //! Copy constructor LsnContextFormat(const LsnContextFormat &); //! Assignment constructor LsnContextFormat &operator=(const LsnContextFormat &); //! Parse lsn context from string int parse_from_string(const std::string &lsn_context); //! Convert lsn context store to string std::string convert_to_string() const; //! Get binlog file name const std::string &file_name() const; //! Get binlog position uint64_t position() const; //! Get sequence id uint64_t seq_id() const; //! Get scan mode const ScanMode &mode() const; private: std::string file_name_{}; uint64_t position_{0}; uint64_t seq_id_{0}; ScanMode mode_{ScanMode::FULL}; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/main.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Dec 2020 * \brief Main function */ #include #include #include #include #include #include #include "repository/repository_common/config.h" #include "repository/repository_common/version.h" #include "mysql_repository.h" DEFINE_string(config, "", "Read configuration from this file"); DEFINE_string(pidfile, "", "Write the pid into this file"); DEFINE_bool(daemon, false, "Run this app in daemon mode"); static bool ValidateConfig(const char *flagname, const std::string &config) { return !config.empty(); } DEFINE_validator(config, ValidateConfig); static inline std::string GetVersion() { return std::string("Version: 0.0.1"); } static inline std::string PrintUsage() { std::string usage = "Usage: \n" " mysql_repository [options] \n\n" "Options: \n" " --config Read configuration from this file.\n" " --daemon Run this app in daemon mode.\n" " --pidfile Write the pid into this file.\n"; return usage; } void ShutdownHandler(int sig) { LOG_INFO("Receive stop signal: %d", sig); auto &module = proxima::be::repository::MysqlRepository::Instance(); module.stop(); module.cleanup(); } static inline void SetupSignals() { ailego::ProcessHelper::IgnoreSignal(SIGHUP); ailego::ProcessHelper::IgnoreSignal(SIGPIPE); ailego::ProcessHelper::RegisterSignal(SIGINT, ShutdownHandler); ailego::ProcessHelper::RegisterSignal(SIGTERM, ShutdownHandler); ailego::ProcessHelper::RegisterSignal(SIGUSR1, ShutdownHandler); ailego::ProcessHelper::RegisterSignal(SIGUSR2, ShutdownHandler); } int main(int argc, char *argv[]) { // Parse arguments for (int i = 1; i < argc; ++i) { const char *arg = argv[i]; if (!strcmp(arg, "-help") || !strcmp(arg, "--help") || !strcmp(arg, "-h")) { std::cout << PrintUsage() << std::endl; exit(0); } else if (!strcmp(arg, "-version") || !strcmp(arg, "--version") || !strcmp(arg, "-v")) { std::cout << proxima::be::repository::Version::Details() << std::endl; exit(0); } } gflags::SetVersionString(GetVersion()); gflags::ParseCommandLineNonHelpFlags(&argc, &argv, false); // Load config proxima::be::repository::Config &config = proxima::be::repository::Config::Instance(); int ret = config.load_repository_config(FLAGS_config); if (ret != 0) { std::cerr << "Mysql repository load config failed." << std::endl; exit(1); } if (!config.validate_repository_config()) { std::cerr << "Mysql repository valid config error." << std::endl; exit(1); } // Initialize bug report ailego::BugReport::Bootstrap(argc, argv, config.get_log_dir().c_str()); // Start module auto &module = proxima::be::repository::MysqlRepository::Instance(); ret = module.init(FLAGS_daemon, FLAGS_pidfile); if (ret != 0) { std::cerr << "Mysql repository init failed." << std::endl; exit(1); } ret = module.start(); if (ret != 0) { std::cerr << "Mysql repository start failed." << std::endl; module.stop(); module.cleanup(); exit(1); } else { std::cout << "Mysql repository start successfully." << std::endl; } // Handle signals SetupSignals(); // Wait for signals pause(); // Stop and cleanup module module.stop(); module.cleanup(); return 0; } ================================================ FILE: src/repository/mysql_collection.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Nov 2020 * \brief Implementation of mysql collection */ #include "mysql_collection.h" #include #include #include "repository/repository_common/config.h" #include "repository/repository_common/error_code.h" #include "lsn_context_format.h" namespace proxima { namespace be { namespace repository { //! Start process void MysqlCollection::run() { fetch_thread_ = std::thread(&MysqlCollection::fetch_impl, this); send_thread_ = std::thread(&MysqlCollection::send_impl, this); LOG_INFO("Collection is running. name[%s]", config_.collection_name().c_str()); } //! Update Collection // todo: Current version do not support update collection. void MysqlCollection::update() { collection_state_flag_.store(CollectionStateFlag::UPDATE); } //! Drop Collection void MysqlCollection::drop() { collection_state_flag_.store(CollectionStateFlag::DROP); } //! Reset Collection back to CONTINUE int MysqlCollection::reset_collection() { // Get lsn information int ret = load_lsn_info(); if (ret != 0) { LOG_ERROR("Failed to update lsn information."); return ret; } // LOG_INFO("Init mysql handler successed"); if (lsn_ == 0) { ret = mysql_handler_->get_table_snapshot(&context_.file_name, &context_.position); if (ret != 0) { LOG_ERROR("Failed to get full table snapshot."); return ret; } LOG_INFO("Get table snapshot, file_name: %s position: %zu", context_.file_name.c_str(), (size_t)context_.position); } // Reset binlog pull state ret = mysql_handler_->reset_status(pull_state_flag_, config_, context_); if (ret != 0) { LOG_ERROR("Failed to reset mysql handler."); return ret; } // Reset collection state clear_fetch_data(); reset_send_status(); reset_fetch_status(); return 0; } uint32_t MysqlCollection::schema_revision() const { // todo: Read from collection info when add update support. // return config_.schema_revision(); return 0; } bool MysqlCollection::finished() const { return state() == CollectionStatus::FINISHED; } CollectionStateFlag MysqlCollection::get_collection_flag() { CollectionStateFlag status = CollectionStateFlag::UPDATE; // In case update twice bool is_update = collection_state_flag_.compare_exchange_strong( status, CollectionStateFlag::NORMAL); if (is_update) { return CollectionStateFlag::UPDATE; } else { return status; } } void MysqlCollection::clear_fetch_data() { fetch_request_->Clear(); } void MysqlCollection::reset_fetch_status() { prepared_data_size_.store(0); reset_.store(true); } void MysqlCollection::reset_send_status() { ready_.store(false); } void MysqlCollection::stop() { const std::string &collection_name = config_.collection_name(); state_.store(CollectionStatus::FINISHED); if (fetch_thread_.joinable()) { fetch_thread_.join(); } if (send_thread_.joinable()) { send_thread_.join(); } LOG_INFO("Stop collection successed. name[%s]", collection_name.c_str()); } void MysqlCollection::update_action() { const std::string &collection_name = config_.collection_name(); LOG_INFO("Updating collection. name[%s]", collection_name.c_str()); std::unique_lock lg(update_mutex_); while (is_valid()) { int ret = reset_collection(); if (ret != 0) { LOG_ERROR("Failed to reset collection. retry ..."); std::this_thread::sleep_for(std::chrono::milliseconds(10)); continue; } state_.store(CollectionStatus::RUNNING); break; } } void MysqlCollection::process_update() { switch (state_.load()) { case CollectionStatus::INIT: case CollectionStatus::RUNNING: case CollectionStatus::UPDATING: update_action(); break; case CollectionStatus::FINISHED: break; } } void MysqlCollection::process_drop() { state_.store(CollectionStatus::FINISHED); LOG_INFO("Drop collection. name[%s]", config_.collection_name().c_str()); } void MysqlCollection::wait_update_command() { while (is_valid()) { CollectionStateFlag flag = get_collection_flag(); switch (flag) { case CollectionStateFlag::UPDATE: return; case CollectionStateFlag::DROP: process_drop(); break; case CollectionStateFlag::NORMAL: std::this_thread::sleep_for(std::chrono::microseconds(10)); } } } void MysqlCollection::process_normal() { auto current_state = state_.load(); switch (current_state) { case CollectionStatus::INIT: state_.store(CollectionStatus::RUNNING); break; case CollectionStatus::RUNNING: case CollectionStatus::FINISHED: // If is running, or finished. do nothing break; case CollectionStatus::UPDATING: // If current state is updating. wait until get update command and update wait_update_command(); process_update(); } return; } void MysqlCollection::process_event(const CollectionStateFlag &flag) { switch (flag) { case CollectionStateFlag::UPDATE: process_update(); break; case CollectionStateFlag::DROP: process_drop(); break; case CollectionStateFlag::NORMAL: process_normal(); break; } } CollectionStatus MysqlCollection::state() const { return state_.load(); } int MysqlCollection::init_brpc() { brpc::ChannelOptions options; options.max_retry = max_retry_; options.timeout_ms = brpc_timeout_ms_; int ret = channel_.Init(index_server_uri_.c_str(), load_balance_.c_str(), &options); if (ret != 0) { LOG_ERROR("Failed to initialize channel. uri[%s]", index_server_uri_.c_str()); return ErrorCode_InitChannel; } stub_.reset(new (std::nothrow) proto::ProximaService_Stub(&channel_)); fetch_request_.reset(new (std::nothrow) proto::WriteRequest()); send_request_.reset(new (std::nothrow) proto::WriteRequest()); reset_.store(true); return 0; } int MysqlCollection::init_mysql_module() { if (mysql_handler_ == nullptr) { LOG_ERROR("Invalid mysql handler"); return ErrorCode_InvalidMysqlHandler; } int ret = load_lsn_info(false); if (ret != 0) { LOG_ERROR("Failed to load lsn map information"); return ret; } LOG_INFO("Load lsn info successed"); ret = mysql_handler_->init(pull_state_flag_); if (ret != 0) { LOG_ERROR("Failed to init mysql handler"); return ret; } LOG_INFO("Init mysql handler successed"); if (lsn_ == 0) { ret = mysql_handler_->get_table_snapshot(&context_.file_name, &context_.position); if (ret != 0) { LOG_ERROR("Failed to get full table snapshot."); return ret; } LOG_INFO("Get table snapshot successed, file_name: %s position: %zu", context_.file_name.c_str(), (size_t)context_.position); } ret = mysql_handler_->start(context_); if (ret != 0) { LOG_ERROR("Failed to start mysql handler."); return ret; } return 0; } //! Initialize MySQL Collection int MysqlCollection::init() { load_config(); //! Init brpc components int ret = init_brpc(); if (ret != 0) { LOG_ERROR("Failed to init brpc components"); return ret; } LOG_INFO("Init brpc successed"); //! Init mysql module ret = init_mysql_module(); if (ret != 0) { LOG_ERROR("Failed to init mysql module"); return ret; } LOG_INFO("Init mysql module successed"); LOG_INFO("Init mysql collection successed"); return 0; } void MysqlCollection::load_config() { batch_size_ = repository::Config::Instance().get_batch_size(); batch_interval_ = repository::Config::Instance().get_batch_interval(); index_server_uri_ = repository::Config::Instance().get_index_agent_uri(); load_balance_ = repository::Config::Instance().get_load_balance(); max_retry_ = repository::Config::Instance().get_max_retry(); brpc_timeout_ms_ = repository::Config::Instance().get_timeout_ms(); } int MysqlCollection::load_lsn_info(bool is_retry) { proto::CollectionName request; proto::DescribeCollectionResponse response; brpc::Controller cntl; request.set_collection_name(config_.collection_name()); while (true) { if (!is_valid()) { return ErrorCode_Terminate; } stub_->describe_collection(&cntl, &request, &response, NULL); if (cntl.Failed()) { LOG_ERROR("Failed to get collection from index agent. msg[%s]", cntl.ErrorText().c_str()); if (is_retry) { uint64_t sleep_time = get_sleep_time(); std::this_thread::sleep_for(std::chrono::milliseconds(sleep_time)); cntl.Reset(); continue; } else { return ErrorCode_RPCFailed; } } break; } // Debug LOG_INFO("get_collection response : %s", response.ShortDebugString().c_str()); // Get lsn auto &info = response.collection(); config_ = info.config(); agent_timestamp_ = info.magic_number(); auto &lsn_context = info.latest_lsn_context(); lsn_ = lsn_context.lsn(); if (lsn_ == 0) { LOG_INFO("LSN is zero, use initial value."); pull_state_flag_ = ScanMode::FULL; return 0; } LsnContextFormat lsn_context_format; int ret = lsn_context_format.parse_from_string(lsn_context.context()); // int ret = string_to_context(lsn_context.context(), &lsn_context_format); if (ret != 0) { LOG_ERROR("Parse lsn context from string failed."); return ret; } context_.file_name = lsn_context_format.file_name(); context_.position = lsn_context_format.position(); context_.seq_id = lsn_context_format.seq_id(); pull_state_flag_ = lsn_context_format.mode(); return 0; } bool MysqlCollection::is_valid() const { if (state_.load() == CollectionStatus::FINISHED || collection_state_flag_.load() == CollectionStateFlag::DROP) { return false; } return true; } int MysqlCollection::update_request_meta() { if (reset_.load() == true) { start_time_ = ailego::Monotime::MilliSeconds(); int ret = reset_request(); if (ret != 0) { LOG_ERROR("Reset fetch request failed"); return ret; } reset_.store(false); } return 0; } int MysqlCollection::get_request_row() { int ret = 0; LsnContext current_context; auto *next_row = fetch_request_->add_rows(); ret = mysql_handler_->get_next_row_data(next_row, ¤t_context); if (ret != 0) { // Not fatal error, continue LOG_ERROR("Get next row data failed. code[%d], msg[%s]", ret, ErrorCode::What(ret)); // Remove the last row fetch_request_->mutable_rows()->RemoveLast(); std::this_thread::sleep_for(std::chrono::microseconds(10)); return ret; } ret = verify_and_handle(current_context); if (ret != 0) { return ret; } update_lsn_map_info(next_row); return 0; } bool MysqlCollection::must_send(uint64_t start_time) { if (ready_.load() == true) { return true; } uint64_t current_time = ailego::Monotime::MicroSeconds(); if ((current_time - start_time) >= (uint64_t)batch_interval_ && prepared_data_size_.load() != 0) { ready_.store(true); return true; } return false; } //! Start process void MysqlCollection::fetch_impl() { LOG_INFO("Start fetch thread"); uint64_t start_time = ailego::Monotime::MicroSeconds(); start_time_ = start_time; // start_time_ just use to print info while (is_valid()) { std::this_thread::sleep_for(std::chrono::microseconds(2)); std::unique_lock ul(update_mutex_); if (must_send(start_time)) { start_time = ailego::Monotime::MicroSeconds(); continue; } int ret = update_request_meta(); if (ret != 0) { LOG_ERROR("Update request meta failed. code[%d], msg[%s]", ret, ErrorCode::What(ret)); // If failed, continue continue; } ret = get_request_row(); if (ret != 0) { // Get row data failed, just continue continue; } prepared_data_size_++; if (prepared_data_size_ >= batch_size_) { ready_.store(true); } } } void MysqlCollection::update_lsn_map_info( proto::WriteRequest::Row *row_data) const { auto lsn_context = row_data->mutable_lsn_context(); lsn_context->set_lsn(lsn_); LsnContextFormat current_context(context_.file_name, context_.position, context_.seq_id, pull_state_flag_); lsn_context->set_context(current_context.convert_to_string()); } int MysqlCollection::verify_and_handle(const LsnContext &context) { auto current_state = context.status; switch (current_state) { case RowDataStatus::NO_MORE_DATA: handle_no_data(); return ErrorCode_NoMoreData; case RowDataStatus::SCHEMA_CHANGED: handle_schema_changed(); return ErrorCode_SchemaChanged; default: update_context(context); lsn_++; return 0; } } void MysqlCollection::handle_no_data() { fetch_request_->mutable_rows()->RemoveLast(); if (pull_state_flag_ == ScanMode::FULL) { LOG_INFO("Scan mode need change"); pull_state_flag_ = ScanMode::INCREMENTAL; context_.seq_id = 0; // seq_id set to invalid value mysql_handler_->reset_status(ScanMode::INCREMENTAL, config_, context_); ready_.store(true); } } void MysqlCollection::update_context(const LsnContext &context) { if (pull_state_flag_ == ScanMode::FULL) { context_.seq_id = context.seq_id; } else { context_.file_name = context.file_name; context_.position = context.position; } context_.status = context.status; } void MysqlCollection::handle_schema_changed() { LOG_INFO("Schema changed"); fetch_request_->mutable_rows()->RemoveLast(); ready_.store(true); } //! Start process void MysqlCollection::send_impl() { LOG_INFO("Start send thread"); // Actual work here while (!finished()) { update_state(); bool is_ready = wait_prepared_data(); if (is_ready == false) { std::this_thread::sleep_for(std::chrono::milliseconds(1)); continue; } int ret = send_data(); if (ret != 0) { LOG_ERROR("Failed to send data. code[%d], msg[%s]", ret, ErrorCode::What(ret)); continue; } } } void MysqlCollection::update_state() { CollectionStateFlag flag = get_collection_flag(); process_event(flag); } uint64_t MysqlCollection::get_sleep_time() const { std::mt19937 gen((std::random_device())()); return (std::uniform_int_distribution(500, 1000))(gen); } void MysqlCollection::print_send_data_info() const { uint64_t current_time = ailego::Monotime::MilliSeconds(); uint64_t cost = current_time - start_time_; auto row_size = send_request_->rows_size(); auto lsn_min = send_request_->rows(0).lsn_context().lsn(); auto lsn_max = send_request_->rows(row_size - 1).lsn_context().lsn(); LOG_INFO("Send request. size[%d], cost[%zums], lsn_min[%zu], lsn_max[%zu]", row_size, (size_t)cost, (size_t)lsn_min, (size_t)lsn_max); } int MysqlCollection::send_data() { int ret = 0; proto::Status response; brpc::Controller cntl; while (is_valid()) { print_send_data_info(); stub_->write(&cntl, send_request_.get(), &response, NULL); if (cntl.Failed()) { ret = ErrorCode_RPCFailed; LOG_ERROR("Failed RPC. msg[%s].", cntl.ErrorText().c_str()); uint64_t sleep_time = get_sleep_time(); std::this_thread::sleep_for(std::chrono::milliseconds(sleep_time)); cntl.Reset(); continue; } ret = (int)response.code(); if (ret == ErrorCode_Success.value()) { // If successed return 0; } else if (ret == ErrorCode_ExceedRateLimit.value()) { // If exceed ratelimited, retry LOG_INFO("Exceed rate limite. Retry ..."); std::this_thread::sleep_for(std::chrono::milliseconds(10)); cntl.Reset(); continue; } else if (ret == ErrorCode_MismatchedSchema.value()) { // If schema revision mismatched, change state to updating, and wait // update command later LOG_INFO("Schema revision mismatch"); state_.store(CollectionStatus::UPDATING); return 0; } else if (ret == ErrorCode_MismatchedMagicNumber.value()) { // If agent timestamp mismatch, update now LOG_INFO("Agent timestamp mismatch"); state_.store(CollectionStatus::UPDATING); process_update(); return 0; } else if (ret == ErrorCode_CollectionNotExist.value()) { // If collection not exit LOG_INFO("Collection not exist"); return ret; } else { // Other unknown response, just retry LOG_ERROR("Send data failed, unknown response. response_code[%d]", ret); std::this_thread::sleep_for(std::chrono::milliseconds(10)); cntl.Reset(); continue; } } return ret; } std::string MysqlCollection::generate_request_id() const { std::random_device rd; std::mt19937 gen(rd()); std::uniform_int_distribution distrib(0, UINT64_MAX); return std::to_string(distrib(gen)); } int MysqlCollection::reset_request() { clear_fetch_data(); // make sure fetch request is clean fetch_request_->set_request_id(generate_request_id()); // todo: Set schema revision when support update // fetch_request_->set_schema_revision(config_.schema_revision()); fetch_request_->set_magic_number(agent_timestamp_); fetch_request_->set_collection_name(config_.collection_name()); auto meta = fetch_request_->mutable_row_meta(); int ret = mysql_handler_->get_fields_meta(meta); if (ret != 0) { LOG_ERROR("Failed to get fields meta. code[%d] msg[%s]", ret, ErrorCode::What(ret)); return ret; } return 0; } void MysqlCollection::get_sending_request() { send_request_.swap(fetch_request_); clear_fetch_data(); reset_fetch_status(); // inform fetch thread reset request reset_send_status(); // mark send thread get ready data } bool MysqlCollection::ready() const { return ready_.load() == true; } bool MysqlCollection::wait_prepared_data() { if (!ready()) { return false; } get_sending_request(); if (is_send_request_empty()) { return false; } return true; } bool MysqlCollection::is_send_request_empty() const { auto row_size = send_request_->rows_size(); return (row_size == 0); } } // namespace repository } // namespace be } // namespace proxima ================================================ FILE: src/repository/mysql_collection.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author Dianzhang.Chen * \date Nov 2020 * \brief Interface of mysql collection */ #pragma once #include #include #include "binlog/mysql_handler.h" #include "common/macro_define.h" #include "collection.h" namespace proxima { namespace be { namespace repository { class MysqlCollection; using MysqlCollectionPtr = std::shared_ptr; /*! Mysql Collection */ class MysqlCollection : public Collection { public: //! Constructor MysqlCollection(const proto::CollectionConfig &config, MysqlHandlerPtr mysql_handler) : config_(config), mysql_handler_(std::move(mysql_handler)) {} //! Destructor ~MysqlCollection() = default; public: //! Initialize MySQL collection int init() override; //! Stop collection void stop() override; //! Start Collection void run() override; //! Update collection void update() override; //! Drop collection void drop() override; //! If collection is finished bool finished() const override; //! Get collection state CollectionStatus state() const override; //! Get schema revision uint32_t schema_revision() const override; private: //! Implementation of fetch data void fetch_impl(); //! Implementation of send data void send_impl(); //! Check if collection should terminate bool is_valid() const; //! Clear data queue void clear_fetch_data(); //! Send data to index agent int send_data(); // Load lsn information int load_lsn_info(bool is_retry = true); //! Reset collection int reset_collection(); //! Get collection state CollectionStateFlag get_collection_flag(); //! Process event acording current collection state flag void process_event(const CollectionStateFlag &flag); //! Update collection void process_update(); //! Drop collection void process_drop(); //! Action when state flag is normal void process_normal(); //! Load configs void load_config(); //! Check if data is illegal and handle illegal data int verify_and_handle(const LsnContext &context); //! Get sending request void get_sending_request(); //! Wait until prepared data is ready to send bool wait_prepared_data(); //! Init brpc int init_brpc(); //! Init mysql module int init_mysql_module(); //! Handle no data case void handle_no_data(); //! Handle schema changed case void handle_schema_changed(); //! Update context void update_context(const LsnContext &context); //! Reset brpc request int reset_request(); //! Update request meta information int update_request_meta(); //! Check and update state void update_state(); //! Check if is ready to send data bool ready() const; //! Get sleep time uint64_t get_sleep_time() const; //! Update action void update_action(); //! Wait update command from manager void wait_update_command(); //! Generate request id std::string generate_request_id() const; //! Update lsn map information of row data void update_lsn_map_info(proto::WriteRequest::Row *row_data) const; //! Check whether send request is empty bool is_send_request_empty() const; //! Reset fetch status void reset_fetch_status(); //! Reset send status void reset_send_status(); //! Check if need to wait until send thread finish send data bool must_send(uint64_t start_time); //! Get rod data from binlog handler int get_request_row(); //! Print information of send data void print_send_data_info() const; private: //! Disable copy constructor MysqlCollection(const MysqlCollection &) = delete; //! Disable assignment operator MysqlCollection &operator=(const MysqlCollection &) = delete; private: uint32_t batch_size_{0}; uint32_t batch_interval_{0}; proto::CollectionConfig config_{}; uint64_t agent_timestamp_{0}; //! Members for state std::thread fetch_thread_{}; std::thread send_thread_{}; std::atomic state_{CollectionStatus::INIT}; std::atomic prepared_data_size_{0}; std::atomic ready_{false}; std::atomic reset_{false}; std::mutex update_mutex_{}; // use for update collection std::unique_ptr fetch_request_{}; std::unique_ptr send_request_{}; ScanMode pull_state_flag_{ScanMode::FULL}; std::atomic collection_state_flag_{ CollectionStateFlag::NORMAL}; //! Members for brpc int max_retry_{0}; int brpc_timeout_ms_{0}; std::string index_server_uri_{}; std::string load_balance_{}; brpc::Channel channel_{}; std::shared_ptr stub_{}; //! Members for lsn uint64_t lsn_{0}; LsnContext context_{}; uint64_t start_time_{0}; MysqlHandlerPtr mysql_handler_{}; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/mysql_repository.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Dec 2020 * \brief Implementation of MysqlRepository */ #include "mysql_repository.h" #include #include "repository/collection_creator.h" #include "repository/repository_common/config.h" #include "repository/repository_common/error_code.h" #include "repository_common/logger.h" namespace proxima { namespace be { namespace repository { int MysqlRepository::init(bool daemonized, const std::string &pid_file) { if (!pid_file.empty() && !pid_file_.open(pid_file)) { LOG_ERROR("ProximaSE open the pid file failed, pid_file=[%s].", pid_file.c_str()); return ErrorCode_OpenFile; } LOG_INFO("Start to init repository"); daemonized_ = daemonized; // init logger int ret = init_logger(); if (ret != 0) { LOG_ERROR("Mysql repository init logger error"); return ret; } // init meta agent CollectionCreatorPtr collection_creator = std::make_shared(); collection_manager_ = std::make_shared(collection_creator); ret = collection_manager_->init(); if (ret != 0) { LOG_ERROR("Init collection manager failed."); return ret; } return 0; } int MysqlRepository::cleanup() { // add lock protection // cleanup maybe be called in multithread std::lock_guard lock(mutex_); if (collection_manager_ != nullptr) { collection_manager_->cleanup(); collection_manager_.reset(); } LogUtil::Shutdown(); Config::Instance().cleanup(); daemonized_ = false; return 0; } int MysqlRepository::start() { if (daemonized_) { daemonize(); } // start collection manager // todo: will not return, unless finished(because of while loop), so can i use // another thread to start? to review collection_manager_->start(); is_running_ = true; LOG_INFO("Mysql repository start successfully."); return 0; } int MysqlRepository::stop() { // add lock protection // stop maybe be called in multithread std::lock_guard lock(mutex_); if (!is_running_) { return 0; } if (collection_manager_ != nullptr) { collection_manager_->stop(); } pid_file_.close(); is_running_ = false; return 0; } int MysqlRepository::init_logger() { // get logger config std::string log_dir = repository::Config::Instance().get_log_dir(); std::string log_file = repository::Config::Instance().get_log_file(); uint32_t log_level = repository::Config::Instance().get_log_level(); auto logger_name = repository::Config::Instance().get_logger_name(); // int logger return LogUtil::Init(log_dir, log_file, log_level, logger_name); } void MysqlRepository::daemonize() { std::string log_dir = Config::Instance().get_log_dir(); std::string stdout_path = log_dir + "./stdout.log"; std::string stderr_path = log_dir + "./stderr.log"; ailego::ProcessHelper::Daemon(stdout_path.c_str(), stderr_path.c_str()); } } // namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/mysql_repository.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Dec 2020 * \brief Interface of MysqlRepository */ #pragma once #include #include #include #include "repository/collection_manager.h" namespace proxima { namespace be { namespace repository { class MysqlRepository : public ailego::Singleton { public: //! Initialize int init(bool daemonized, const std::string &pid_file); //! Cleanup memory int cleanup(); //! Start server int start(); //! Stop server int stop(); private: //! Initilize logger int init_logger(); //! Start as daemon void daemonize(); private: bool daemonized_{false}; ailego::PidFile pid_file_{}; CollectionManagerPtr collection_manager_{}; bool is_running_{false}; std::mutex mutex_{}; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/proto/repository_config.proto ================================================ /** * Copyright (C) The Software Authors. All rights reserved. * \file config.proto * \author Hongqing.hu * \date Nov 2020 * \version 1.0.0 * \brief Config definition for proxima_be */ syntax = "proto3"; package proxima.be.proto; /*! Message of Common Config */ message RepositoryCommonConfig { string log_directory = 1; string log_file = 2; int32 log_level = 3; string logger_name = 4; }; message MysqlRepositoryConfig { string index_agent_addr = 1; string load_balance = 2; uint32 batch_size = 3; uint32 batch_interval = 4; uint32 max_retry = 5; string repository_name = 6; uint32 timeout_ms = 7; }; /*! Message of Repository Config */ message RepositoryConfig { RepositoryCommonConfig common_config = 1; MysqlRepositoryConfig repository_config = 2; }; ================================================ FILE: src/repository/repository_common/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Oct 2020 ## \brief Detail cmake build script ## include(../../../cmake/bazel.cmake) # mysql_repository_common library cc_library( NAME mysql_repository_common STATIC STRICT ALWAYS_LINK SRCS *.cc LIBS mysql_repository_proto glog proxima INCS . .. ../.. VERSION "${MYSQL_REPOSITORY_VERSION}" ) ================================================ FILE: src/repository/repository_common/config.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Mar 2021 * \brief Implementation of Config */ #include "config.h" #include #include #include #include "error_code.h" #include "logger.h" namespace proxima { namespace be { namespace repository { int Config::load_repository_config(const std::string &file_name) { ailego::File file; if (!file.open(file_name.c_str(), true, false)) { LOG_ERROR("Open file %s failed, maybe file not exist.", file_name.c_str()); return ErrorCode_LoadConfig; } std::string file_content; file_content.resize(file.size()); size_t read_size = file.read(&(file_content[0]), file.size()); if (read_size != file.size()) { LOG_ERROR("File %s read error, expected size: %zu, actual size: %zu.", file_name.c_str(), file.size(), read_size); return ErrorCode_LoadConfig; } bool ret = google::protobuf::TextFormat::ParseFromString(file_content, &repository_config_); if (!ret) { LOG_ERROR("Parse file %s content %s failed.", file_name.c_str(), file_content.c_str()); return ErrorCode_LoadConfig; } config_file_ = file_name; // repository_config_file_ = file_name; // todo : maybe use seprate // file return 0; } int Config::cleanup() { return 0; } bool Config::validate_repository_config() const { /** ========== valid Common Config========= **/ // todo return true; } /** ============Common Config for Repository============= **/ std::string Config::get_log_dir() const { std::string log_dir = "./log/"; if (repository_config_.has_common_config() && !repository_config_.common_config().log_directory().empty()) { log_dir = repository_config_.common_config().log_directory(); } return log_dir; } std::string Config::get_log_file() const { std::string log_file = "mysql_repository.log"; if (repository_config_.has_common_config() && !repository_config_.common_config().log_file().empty()) { log_file = repository_config_.common_config().log_file(); } return log_file; } uint32_t Config::get_log_level() const { uint32_t actual_log_level = 1; if (repository_config_.has_common_config()) { uint32_t input_log_level = repository_config_.common_config().log_level(); if (input_log_level < 1 || input_log_level > 5) { actual_log_level = 1; } else { actual_log_level = input_log_level - 1; } } return actual_log_level; } std::string Config::get_logger_name() const { std::string logger_name = "RepositoryAppendLogger"; if (!repository_config_.common_config().logger_name().empty()) { logger_name = repository_config_.common_config().logger_name(); } return logger_name; } std::string Config::get_index_agent_uri(void) const { std::string index_agent_addr("0.0.0.0:16000"); if (repository_config_.has_repository_config() && !repository_config_.repository_config().index_agent_addr().empty()) { return repository_config_.repository_config().index_agent_addr(); } return index_agent_addr; } const std::string &Config::get_repository_name(void) const { static std::string name = "mysql_repository"; if (repository_config_.has_repository_config() && !repository_config_.repository_config().repository_name().empty()) { return repository_config_.repository_config().repository_name(); } return name; } const std::string &Config::get_load_balance(void) const { static std::string load_balance(""); if (repository_config_.has_repository_config() && !repository_config_.repository_config().load_balance().empty()) { return repository_config_.repository_config().load_balance(); } return load_balance; } uint32_t Config::get_batch_size(void) const { uint32_t batch_size = 64; if (repository_config_.has_repository_config() && repository_config_.repository_config().batch_size() != 0) { return repository_config_.repository_config().batch_size(); } return batch_size; } uint32_t Config::get_batch_interval(void) const { uint32_t batch_interval = 5000; if (repository_config_.has_repository_config() && repository_config_.repository_config().batch_interval() != 0) { return repository_config_.repository_config().batch_interval(); } return batch_interval; } int Config::get_max_retry(void) const { int max_retry = 3; if (repository_config_.has_repository_config() && repository_config_.repository_config().max_retry() != 0) { return repository_config_.repository_config().max_retry(); } return max_retry; } int Config::get_timeout_ms(void) const { int timeout_ms = 500; if (repository_config_.has_repository_config() && repository_config_.repository_config().timeout_ms() != 0) { return repository_config_.repository_config().timeout_ms(); } return timeout_ms; } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/repository_common/config.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Mar 2021 * \brief Interface of Mysql Repository Config */ #pragma once #include #include "proto/repository_config.pb.h" namespace proxima { namespace be { namespace repository { /*! Config */ class Config : public ailego::Singleton { public: //! Load config from file int load_repository_config(const std::string &file_name); //! Cleanup config options int cleanup(); //! Validate config bool validate_config() const; //! Validate repository config bool validate_repository_config() const; /** ============Common Config for Repository============= **/ //! Get log directory std::string get_log_dir() const; //! Get log file name std::string get_log_file() const; //! Get log print level [0~5] uint32_t get_log_level() const; //! Get logger name std::string get_logger_name() const; /** ============Repository Config=========== **/ //! Get index agent server address std::string get_index_agent_uri(void) const; //! Get repository name const std::string &get_repository_name(void) const; //! Get brpc load balance const std::string &get_load_balance(void) const; //! Get index agent server address uint32_t get_batch_size(void) const; //! Get batch interval uint32_t get_batch_interval(void) const; //! Get brpc max_retry int get_max_retry(void) const; //! Get brpc max_retry int get_timeout_ms(void) const; private: //! Members std::string config_file_{}; proto::RepositoryConfig repository_config_{}; }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/repository_common/error_code.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Mar 2021 * \brief Implementation of error code */ #include "error_code.h" #include namespace proxima { namespace be { namespace repository { // 0~999 [Builtin] PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(Success, 0, "Success"); // 1000~1999 [Common Error] PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(RuntimeError, 1000, "Runtime Error"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(LogicError, 1001, "Logic Error"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(LoadConfig, 1003, "Load Config Error"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(ConfigError, 1004, "Config Error"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(InvalidArgument, 1005, "Invalid Arugment"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(NotInitialized, 1006, "Not Initialized"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(OpenFile, 1007, "Open File Error"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(ExceedLimit, 1010, "Exceed Limit"); // 2000~2999 [Format Check] PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(MismatchedSchema, 2020, "Mismatched Schema"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(MismatchedMagicNumber, 2021, "Mismatched Magic Number"); // 4000~4999 [Index] PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(DuplicateCollection, 4000, "Duplicate Collection"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(ExceedRateLimit, 4008, "Exceed Rate Limit"); // 20000~29999 [Repository] // 20000~21000 [Mysql repository] PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(ConnectMysql, 20000, "Connect mysql error"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(InvalidMysqlTable, 20001, "Invalid mysql table"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(ExecuteMysql, 20002, "Execute mysql error"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(TableNoMoreData, 20003, "Table no more data"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(InvalidRowData, 20004, "Invalid row data"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(UnsupportedMysqlVersion, 20005, "Unsupported mysql version"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(ExecuteSimpleCommand, 20006, "Execute simple command error"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(BinlogDump, 20007, "Binlog dump error"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(BinlogNoMoreData, 20008, "Binlog no more data."); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(InvalidMysqlResult, 20009, "Invalid mysql result."); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(UnsupportedBinlogFormat, 20010, "Unsupported bin log format."); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(FetchMysqlResult, 20011, "Fetch mysql result error."); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(Suspended, 20012, "Bin log suspended status."); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(NoInitialized, 20013, "No initialized"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(RepeatedInitialized, 20014, "Repeated initialized"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(InvalidCollectionConfig, 20015, "Invalid collection config"); //! Error for collection PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(CollectionNotExist, 20016, "Collection not exist"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(RPCFailed, 20017, "RPC Failed"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(Terminate, 20018, "Collection should terminate"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(InvalidUri, 20019, "Invalid uri"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(InitChannel, 20020, "Init brpc channel failed"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(InvalidMysqlHandler, 20021, "Invalid mysql handler"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(InvalidLSNContext, 20022, "LSN context is invalid"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(NoMoreData, 20023, "There is no more row data"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(SchemaChanged, 20024, "Schema changed"); PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE( MismatchedVersion, 20025, "Server version mismatch with repository version"); const char *ErrorCode::What(int val) { if (val >= -1000) { return aitheta2::IndexError::What(val); } else { return ErrorCode::Instance()->what(val); } } } // namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/repository_common/error_code.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Mar 2021 * \brief Interface of error code */ #pragma once #include namespace proxima { namespace be { namespace repository { /*! Error */ class ErrorCode { public: /*! Error Code */ class Code { public: //! Constructor Code(int val, const char *str) : value_(-val), desc_(str) { ErrorCode::Instance()->emplace(this); } //! Retrieve the value of code operator int() const { return (this->value_); } //! Retrieve the value of code int value() const { return (this->value_); } //! Retrieve the description of code const char *desc() const { return (this->desc_); } private: int value_; const char *desc_; }; //! Retrieve the description of code static const char *What(int val); protected: //! Constructor ErrorCode(void) : map_() {} //! Inserts a new code into map void emplace(const ErrorCode::Code *code) { map_.emplace(code->value(), code); } //! Retrieve the description of code const char *what(int val) const { auto iter = map_.find(val); if (iter != map_.end()) { return iter->second->desc(); } return ""; } //! Retrieve the singleton static ErrorCode *Instance(void) { static ErrorCode error; return (&error); } private: //! Disable them ErrorCode(const ErrorCode &) = delete; ErrorCode(ErrorCode &&) = delete; ErrorCode &operator=(const ErrorCode &) = delete; //! Error code map std::map map_; }; //! Error Code Define #define PROXIMA_BE_REPOSITORY_ERROR_CODE_DEFINE(__NAME__, __VAL__, __DESC__) \ const proxima::be::repository::ErrorCode::Code ErrorCode_##__NAME__( \ (__VAL__), (__DESC__)); \ const proxima::be::repository::ErrorCode::Code \ &_ErrorCode_##__VAL__##_Register(ErrorCode_##__NAME__) //! Proxima BE Error Code Declare #define PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(__NAME__) \ extern const proxima::be::repository::ErrorCode::Code ErrorCode_##__NAME__ //! Error code helper #define PROXIMA_BE_REPOSITORY_ERROR_CODE(__NAME__) \ proxima::be::repository::ErrorCode_##__NAME__ //! Build-in error code PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(Success); // Success // 1000~1999 [Common Error] PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(RuntimeError); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(LogicError); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(LoadConfig); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(ConfigError); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(InvalidArgument); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(NotInitialized); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(OpenFile); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(ReadData); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(ExceedLimit); // //! Common Error for all module //! Error for index module PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(DuplicateCollection); //! Error for agent module PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(ExceedRateLimit); //! Error for binlog PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(ConnectMysql); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(InvalidMysqlTable); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(ExecuteMysql); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(TableNoMoreData); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(InvalidRowData); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(UnsupportedMysqlVersion); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(ExecuteSimpleCommand); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(BinlogDump); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(BinlogNoMoreData); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(InvalidMysqlResult); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(UnsupportedBinlogFormat); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(FetchMysqlResult); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(Suspended); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(InvalidCollectionConfig); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(RepeatedInitialized); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(NoInitialized); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(MismatchedVersion); //! Error for collection PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(CollectionNotExist); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(RPCFailed); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(Terminate); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(InvalidUri); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(InitChannel); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(InvalidMysqlHandler); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(InvalidLSNContext); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(NoMoreData); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(SchemaChanged); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(MismatchedSchema); PROXIMA_BE_REPOSITORY_ERROR_CODE_DECLARE(MismatchedMagicNumber); } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/repository_common/glogger.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of index logger, based on glog */ #include #include #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wunused-parameter" #endif #include #ifdef __GNUC__ #pragma GCC diagnostic pop #endif namespace google { namespace glog_internal_namespace_ { extern bool IsGoogleLoggingInitialized(void); extern bool ShutdownGoogleLoggingUtilities(void); } // namespace glog_internal_namespace_ } // namespace google namespace proxima { namespace be { namespace repository { class RepositoryAppendLogger : public aitheta2::IndexLogger { public: RepositoryAppendLogger() = default; ~RepositoryAppendLogger() { this->cleanup(); } public: int init(const aitheta2::IndexParams ¶ms) override { if (!google::glog_internal_namespace_::IsGoogleLoggingInitialized()) { std::string log_dir = params.get_as_string("proxima.file.logger.log_dir"); std::string log_file = params.get_as_string("proxima.file.logger.log_file"); if (!ailego::File::IsExist(log_dir)) { ailego::File::MakePath(log_dir); } FLAGS_log_dir = log_dir; FLAGS_max_log_size = 2048; FLAGS_logbufsecs = 0; // it's really a bad feature for glog // logs <= LOG_FATAL will also output to stderr // and we can only set FATAL at most // and so we should avoid to use LOG_FATAL FLAGS_stderrthreshold = google::GLOG_FATAL; static std::string new_log_file = log_file; google::InitGoogleLogging(new_log_file.c_str()); } return 0; } int cleanup() override { if (google::glog_internal_namespace_::IsGoogleLoggingInitialized()) { google::ShutdownGoogleLogging(); } return 0; } void log(int level, const char *file, int line, const char *format, va_list args) override { static google::LogSeverity severities[] = { google::GLOG_INFO, google::GLOG_INFO, google::GLOG_WARNING, google::GLOG_ERROR, google::GLOG_FATAL}; char buf[2048]; vsnprintf(buf, sizeof(buf), format, args); google::LogMessage(file, line, severities[level]).stream() << buf; google::FlushLogFiles(severities[level]); } }; INDEX_FACTORY_REGISTER_LOGGER(RepositoryAppendLogger); } // namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/repository_common/logger.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Encapsulation of aitheta2 index logger */ #pragma once #include #include #include #include "error_code.h" namespace proxima { namespace be { namespace repository { class LogUtil { public: static int Init(const std::string &log_dir, const std::string &log_file, int log_level, const std::string &logger_name) { if (log_dir.empty() || log_file.empty()) { return ErrorCode_InvalidArgument; } if (!ailego::File::IsExist(log_dir)) { ailego::File::MakePath(log_dir); } auto logger = aitheta2::IndexFactory::CreateLogger(logger_name); if (!logger) { LOG_FATAL("Invalid logger_name[%s]", logger_name.c_str()); return ErrorCode_InvalidArgument; } aitheta2::IndexParams params; params.set("proxima.file.logger.log_dir", log_dir); params.set("proxima.file.logger.log_file", log_file); params.set("proxima.file.logger.path", log_dir + "/" + log_file); std::string program_name = ailego::File::BaseName(gflags::GetArgv0()); params.set("proxima.program.program_name", program_name); int ret = logger->init(params); if (ret != 0) { return ret; } aitheta2::IndexLoggerBroker::SetLevel(log_level); aitheta2::IndexLoggerBroker::Register(logger); return 0; } static void Shutdown() { aitheta2::IndexLoggerBroker::Unregister(); } }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: src/repository/repository_common/version.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Apr 2021 * \brief Mysql repository version information */ #include "version.h" #include #ifdef mysql_repository_common_VERSION #define MYSQL_REPOSITORY_VERSION_STRING mysql_repository_common_VERSION #else #define MYSQL_REPOSITORY_VERSION_STRING "unknown" #endif namespace proxima { namespace be { namespace repository { static const char MYSQL_REPOSITORY_VERSION_DETAILS[] = AILEGO_VERSION_COMPILE_DETAILS( "Mysql Repository Version " MYSQL_REPOSITORY_VERSION_STRING ".\nCopyright (C) Alibaba, Inc. and its affiliates. All rights " "reserved.\n"); const char *Version::String(void) { return MYSQL_REPOSITORY_VERSION_STRING; } const char *Version::Details(void) { return MYSQL_REPOSITORY_VERSION_DETAILS; } } // namespace repository } // namespace be } // namespace proxima ================================================ FILE: src/repository/repository_common/version.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Apr 2021 * \brief Mysql repository version information */ #pragma once namespace proxima { namespace be { namespace repository { struct Version { static const char *String(void); static const char *Details(void); }; } // namespace repository } // namespace be } // namespace proxima ================================================ FILE: src/server/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Oct 2020 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) if(APPLE) set(APPLE_FRAMEWORK_LIBS -framework CoreFoundation -framework CoreGraphics -framework CoreData -framework CoreText -framework Security -framework Foundation -Wl,-U,_MallocExtension_ReleaseFreeMemory -Wl,-U,_ProfilerStart -Wl,-U,_ProfilerStop -Wl,-U,_RegisterThriftProtocol ) endif() # proxima_be_agent library aux_source_directory(. SERVER_SRCS) list(REMOVE_ITEM SERVER_SRCS "./main.cc") cc_library( NAME proxima_be_server STATIC STRICT SRCS ${SERVER_SRCS} LIBS proxima_be_admin proxima_be_agent proxima_be_query proxima_be_index proxima_be_meta proxima_be_common proxima_be_proto proxima_be_metrics INCS . .. VERSION "${PROXIMA_BE_VERSION}" ) # proxima_be binary cc_binary( NAME proxima_be PACKED SRCS main.cc LIBS proxima_be_server proxima_be_admin proxima_be_agent proxima_be_query proxima_be_index proxima_be_meta proxima_be_common proxima_be_proto proxima_be_metrics brpc ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} DEPS proxima INCS .. LDFLAGS ${APPLE_FRAMEWORK_LIBS} ) set_target_properties(proxima_be PROPERTIES INSTALL_RPATH ${LIB_PATH}) ================================================ FILE: src/server/grpc_server.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of grpc server */ #include "grpc_server.h" #include #include "common/config.h" #include "common/error_code.h" #include "common/logger.h" extern std::string GetVersion(); namespace proxima { namespace be { namespace server { GrpcServerUPtr GrpcServer::Create() { return std::unique_ptr(new GrpcServer()); } GrpcServer::~GrpcServer() { if (thread_ != nullptr) { this->stop(); } } int GrpcServer::bind_and_start(const agent::IndexAgentPtr &index_agent, const query::QueryAgentPtr &query_agent, const admin::AdminAgentPtr &admin_agent, const std::string &version) { auto *request_handler = new ProximaRequestHandler(index_agent, query_agent, admin_agent); if (!request_handler) { LOG_ERROR("Create proxima request handler failed."); return ErrorCode_RuntimeError; } // Set server version request_handler->set_version(version); server_.set_version(version); // Register grpc service int ret = server_.AddService((proto::ProximaService *)request_handler, brpc::SERVER_OWNS_SERVICE); if (ret != 0) { LOG_ERROR("Grpc server add service failed."); return ret; } // async start grpc server in single thread thread_ = std::unique_ptr( new std::thread(&GrpcServer::start_server, this)); // sleep 1s std::this_thread::sleep_for(std::chrono::seconds(1)); return 0; } int GrpcServer::stop() { this->stop_server(); if (thread_ != nullptr) { thread_->join(); thread_ = nullptr; } return 0; } bool GrpcServer::is_running() { return server_.IsRunning(); } int GrpcServer::start_server() { brpc::ServerOptions options; // Do not set auto concurrency limiter, it's unstable // max_concurrency | idle_timeout_sec options not open now // Configured by query thread count, // the pthread pool is shared in global. // We config query thread count + 1, just for preserving // one thread for scheduler. options.num_threads = Config::Instance().get_query_thread_count() + 1; uint32_t listen_port = Config::Instance().get_grpc_listen_port(); int ret = server_.Start(listen_port, &options); if (ret != 0) { LOG_ERROR("Grpc server start failed."); return ret; } LOG_INFO("Grpc server start success. port[%u]", listen_port); while (server_.IsRunning()) { std::this_thread::sleep_for(std::chrono::seconds(1)); } LOG_INFO("Grpc server thread exit."); return 0; } int GrpcServer::stop_server() { server_.Stop(0); server_.Join(); return 0; } } // end namespace server } // namespace be } // end namespace proxima ================================================ FILE: src/server/grpc_server.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Grpc server module of proxima search engine */ #pragma once #include #include #include "common/macro_define.h" #include "proxima_request_handler.h" namespace proxima { namespace be { namespace server { class GrpcServer; using GrpcServerUPtr = std::unique_ptr; /* * GrpcServer provides grpc service with protobuf protocol */ class GrpcServer { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(GrpcServer); //! Constructor GrpcServer() = default; //! Destructor ~GrpcServer(); //! Constructor static GrpcServerUPtr Create(); public: //! Start grpc server int bind_and_start(const agent::IndexAgentPtr &index_agent, const query::QueryAgentPtr &query_agent, const admin::AdminAgentPtr &admin_agent, const std::string &version); //! Stop grpc server int stop(); //! Check if server is running bool is_running(); private: int start_server(); int stop_server(); private: brpc::Server server_{}; std::unique_ptr thread_{}; }; } // end namespace server } // namespace be } // end namespace proxima ================================================ FILE: src/server/http_server.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of http server */ #include "http_server.h" #include #include "common/config.h" #include "common/error_code.h" #include "common/logger.h" extern std::string GetVersion(); namespace proxima { namespace be { namespace server { HttpServerUPtr HttpServer::Create() { return std::unique_ptr(new HttpServer()); } HttpServer::~HttpServer() { if (thread_ != nullptr) { this->stop(); } } int HttpServer::bind_and_start(const agent::IndexAgentPtr &index_agent, const query::QueryAgentPtr &query_agent, const admin::AdminAgentPtr &admin_agent, const std::string &version) { auto *request_handler = new ProximaRequestHandler(index_agent, query_agent, admin_agent); if (!request_handler) { LOG_ERROR("Create proxima request handler failed."); return ErrorCode_RuntimeError; } // Set server version request_handler->set_version(version); server_.set_version(version); // Register http service int ret = server_.AddService( (proto::HttpProximaService *)request_handler, brpc::SERVER_OWNS_SERVICE, // HTTP: // GET /v1/collection/{collection} // POST /v1/collection/{collection} // PUT /v1/collection/{collection}, Not implement yet // DEL /v1/collection/{collection} "/v1/collection/* => collection," // HTTP: GET /v1/collection/{collection}/stats "/v1/collection/*/stats => stats_collection," // HTTP: POST /v1/collection/{collection}/index "/v1/collection/*/index => write," // HTTP: GET /v1/collection/{collection}/doc?key={primary_key} "/v1/collection/*/doc => get_document_by_key," // HTTP: POST /v1/collection/{collection}/query "/v1/collection/*/query => query," // HTTP: GET /v1/collections?repository={repository} "/v1/collections => list_collections," // HTTP: GET /version "/service_version => get_version"); if (ret != 0) { LOG_ERROR("Http server add service failed."); return ret; } // set server version // server_.set_version(GetVersion()); // async start http server in single thread thread_ = std::unique_ptr( new std::thread(&HttpServer::start_server, this)); // sleep 1s std::this_thread::sleep_for(std::chrono::seconds(1)); return 0; } int HttpServer::stop() { this->stop_server(); if (thread_ != nullptr) { thread_->join(); thread_ = nullptr; } return 0; } bool HttpServer::is_running() { return server_.IsRunning(); } int HttpServer::start_server() { brpc::ServerOptions options; // Do not set auto concurrency limiter, it's unstable // max_concurrency | idle_timeout_sec options not open now // Configured by query thread count, // the pthread pool is shared in global. // We config query thread count + 1, just for preserving // one thread for scheduler. options.num_threads = Config::Instance().get_query_thread_count() + 1; uint32_t listen_port = Config::Instance().get_http_listen_port(); int ret = server_.Start(listen_port, &options); if (ret != 0) { LOG_ERROR("Http server start failed."); return ret; } LOG_INFO("Http server start success. port[%u]", listen_port); while (server_.IsRunning()) { std::this_thread::sleep_for(std::chrono::seconds(1)); } LOG_INFO("Http server thread exit."); return 0; } int HttpServer::stop_server() { server_.Stop(0); server_.Join(); return 0; } } // end namespace server } // namespace be } // end namespace proxima ================================================ FILE: src/server/http_server.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Http server module of proxima search engine */ #pragma once #include #include #include "common/macro_define.h" #include "proxima_request_handler.h" namespace proxima { namespace be { namespace server { class HttpServer; using HttpServerUPtr = std::unique_ptr; /* * HttpServer provides http service with http1.1 protocol. * Remind it doesn't support complete http1.1 protocol. */ class HttpServer { public: PROXIMA_DISALLOW_COPY_AND_ASSIGN(HttpServer); //! Constructor HttpServer() = default; //! Destructor ~HttpServer(); //! Constructor static HttpServerUPtr Create(); public: //! Start http server int bind_and_start(const agent::IndexAgentPtr &index_agent, const query::QueryAgentPtr &query_agent, const admin::AdminAgentPtr &admin_gent, const std::string &version); //! Stop http server int stop(); //! Check if server is running bool is_running(); private: int start_server(); int stop_server(); private: brpc::Server server_{}; std::unique_ptr thread_{}; }; } // end namespace server } // namespace be } // end namespace proxima ================================================ FILE: src/server/main.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Entry function of proxima search engine execution */ #include #include #include #include #include #include #include #include #include "common/config.h" #include "common/logger.h" #include "common/version.h" #include "server/proxima_search_engine.h" DEFINE_string(config, "", "Read configuration from this file"); DEFINE_string(plugin, "", "Load proxima plugins from so files"); DEFINE_string(pidfile, "", "Write the pid into this file"); DEFINE_bool(daemon, false, "Run this app in daemon mode"); static bool ValidateConfig(const char *flagname, const std::string &config) { return !config.empty(); } DEFINE_validator(config, ValidateConfig); static inline std::string GetUsage() { std::string usage = "Usage: \n" " proxima_be [options]\n\n" "Options: \n" " --config Read configuration from this file.\n" " --plugin Load proxima plugins, split with ','.\n" " --daemon Run this app in daemon mode.\n" " --pidfile Write the pid into this file.\n" " --version, -v Display version information.\n" " --help, -h Display available options.\n"; return usage; } static bool LoadPlugins(const std::string &plugin_paths) { aitheta2::IndexPluginBroker broker; std::vector so_list; ailego::StringHelper::Split(plugin_paths, ',', &so_list); std::string error; for (auto &so_path : so_list) { if (!broker.emplace(so_path, &error)) { std::cerr << "Failed to load plugin: " << so_path << "(" << error << ")" << std::endl; return false; } else { std::cout << "Loaded plugin: " << so_path << std::endl; } } return true; } void ShutdownHandler(int sig) { LOG_INFO("Receive stop signal: %d", sig); auto &engine = proxima::be::server::ProximaSearchEngine::Instance(); engine.stop(); } static inline void SetupSignals() { ailego::ProcessHelper::IgnoreSignal(SIGHUP); ailego::ProcessHelper::IgnoreSignal(SIGPIPE); ailego::ProcessHelper::IgnoreSignal(SIGCHLD); ailego::ProcessHelper::RegisterSignal(SIGINT, ShutdownHandler); ailego::ProcessHelper::RegisterSignal(SIGTERM, ShutdownHandler); // These two signals are reserved for other usage ailego::ProcessHelper::RegisterSignal(SIGUSR1, ShutdownHandler); ailego::ProcessHelper::RegisterSignal(SIGUSR2, ShutdownHandler); } int main(int argc, char *argv[]) { // Parse arguments for (int i = 1; i < argc; ++i) { const char *arg = argv[i]; if (!strcmp(arg, "-help") || !strcmp(arg, "--help") || !strcmp(arg, "-h")) { std::cout << GetUsage() << std::endl; exit(0); } else if (!strcmp(arg, "-version") || !strcmp(arg, "--version") || !strcmp(arg, "-v")) { std::cout << proxima::be::Version::Details() << std::endl; exit(0); } } gflags::ParseCommandLineNonHelpFlags(&argc, &argv, false); // Load config proxima::be::Config &config = proxima::be::Config::Instance(); int ret = config.load_config(FLAGS_config); if (ret != 0) { std::cerr << "ProximaSE load configuration failed." << std::endl; exit(1); } if (!config.validate_config()) { std::cerr << "ProximaSE validate configuration failed." << std::endl; exit(1); } // Load plugins if (!FLAGS_plugin.empty()) { if (!LoadPlugins(FLAGS_plugin)) { std::cerr << "ProximaSE load plugins failed." << std::endl; exit(1); } } // Initialize bug report ailego::BugReport::Bootstrap(argc, argv, config.get_log_dir().c_str()); // Start engine auto &engine = proxima::be::server::ProximaSearchEngine::Instance(); ret = engine.init(FLAGS_daemon, FLAGS_pidfile); if (ret != 0) { std::cerr << "ProximaSE init failed." << std::endl; exit(1); } engine.set_version(proxima::be::Version::String()); ret = engine.start(); if (ret != 0) { std::cerr << "ProximaSE start failed." << std::endl; engine.stop(); engine.cleanup(); exit(1); } else { std::cout << "ProximaSE start successfully." << std::endl; } // Handle signals SetupSignals(); // Wait for signals pause(); // Stop and cleanup engine engine.stop(); engine.cleanup(); return 0; } ================================================ FILE: src/server/proto_converter.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Oct 2020 * \brief Proto converter interface implementation for bilin engine */ #include "proto_converter.h" #include "common/transformer.h" #include "common/types_helper.h" namespace proxima { namespace be { namespace server { int ProtoConverter::ConvertIndexData( const std::string &index_value, const meta::ColumnMeta &column_meta, const proto::WriteRequest::IndexColumnMeta &proto_meta, bool is_bytes, index::ColumnData *column_data) { IndexTypes index_type = column_meta.index_type(); if (index_type == IndexTypes::PROXIMA_GRAPH_INDEX) { column_data->column_name = column_meta.name(); column_data->data_type = column_meta.data_type(); column_data->dimension = column_meta.dimension(); if (is_bytes) { int ret = ParseBytesIndexColumnValue(index_value, column_meta, proto_meta, &(column_data->data)); if (ret != 0) { LOG_ERROR("Set index column value failed. column[%s].", column_meta.name().c_str()); return ret; } } else { int ret = ParseJsonIndexColumnValue(index_value, column_meta, proto_meta, &(column_data->data)); if (ret != 0) { LOG_ERROR("Parse index column value failed. column[%s].", column_meta.name().c_str()); return ret; } } } else { LOG_ERROR("Invalid index type %u.", (uint32_t)index_type); return ErrorCode_InvalidIndexType; } return 0; } int ProtoConverter::ParseBytesIndexColumnValue( const std::string &column_value, const meta::ColumnMeta &meta, const proto::WriteRequest::IndexColumnMeta &proto_meta, std::string *serialized_value) { DataTypes in_data_type = DataTypeCodeBook::Get(proto_meta.data_type()); if (Transformer::NeedTransform(in_data_type, meta.data_type())) { std::string dst_column_value; int ret = Transformer::Transform(in_data_type, column_value, meta.data_type(), &dst_column_value); if (ret != 0) { LOG_ERROR("Transform vector failed. in[%d] out[%d]", (int)in_data_type, (int)meta.data_type()); return ret; } return CopyBytesIndexColumnValue(dst_column_value, meta, serialized_value); } else { return CopyBytesIndexColumnValue(column_value, meta, serialized_value); } } int ProtoConverter::CopyBytesIndexColumnValue(const std::string &column_value, const meta::ColumnMeta &meta, std::string *serialized_value) { int ret = 0; switch (meta.data_type()) { case DataTypes::VECTOR_FP32: ret = ValidateTypedIndexColumnValue(column_value, meta); break; case DataTypes::VECTOR_FP16: ret = ValidateTypedIndexColumnValue(column_value, meta); break; case DataTypes::VECTOR_INT16: ret = ValidateTypedIndexColumnValue(column_value, meta); break; case DataTypes::VECTOR_INT8: ret = ValidateTypedIndexColumnValue(column_value, meta); break; case DataTypes::VECTOR_INT4: ret = ValidateTypedIndexColumnValue(column_value, meta); break; case DataTypes::VECTOR_BINARY32: ret = ValidateTypedIndexColumnValue(column_value, meta); break; case DataTypes::VECTOR_BINARY64: ret = ValidateTypedIndexColumnValue(column_value, meta); break; default: LOG_ERROR("Invalid data type %u.", (uint32_t)meta.data_type()); return ErrorCode_InvalidDataType; } if (ret != 0) { LOG_ERROR("Index value is invalid"); return ret; } *serialized_value = column_value; return 0; } int ProtoConverter::ParseJsonIndexColumnValue( const std::string &column_value, const meta::ColumnMeta &meta, const proto::WriteRequest::IndexColumnMeta &proto_meta, std::string *serialized_value) { DataTypes src_data_type = DataTypeCodeBook::Get(proto_meta.data_type()); int ret = Transformer::SupportTransform(src_data_type, meta.data_type()); if (ret != 0) { LOG_ERROR("Not support current transform. src[%d] dst[%d]", (int)src_data_type, (int)meta.data_type()); return ret; } switch (src_data_type) { case DataTypes::VECTOR_FP32: ret = ParseTypedIndexColumnValue(column_value, meta, serialized_value); break; case DataTypes::VECTOR_FP16: ret = ParseTypedIndexColumnValue(column_value, meta, serialized_value); break; case DataTypes::VECTOR_INT16: ret = ParseTypedIndexColumnValue(column_value, meta, serialized_value); break; case DataTypes::VECTOR_INT8: ret = ParseTypedIndexColumnValue(column_value, meta, serialized_value); break; case DataTypes::VECTOR_INT4: ret = ParseTypedIndexColumnValue(column_value, meta, serialized_value); break; case DataTypes::VECTOR_BINARY32: ret = ParseTypedIndexColumnValue(column_value, meta, serialized_value); break; case DataTypes::VECTOR_BINARY64: ret = ParseTypedIndexColumnValue(column_value, meta, serialized_value); break; default: LOG_ERROR("Unsupported data type %u.", (uint32_t)src_data_type); return ErrorCode_InvalidDataType; } return ret; } } // end namespace server } // namespace be } // end namespace proxima ================================================ FILE: src/server/proto_converter.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Oct 2020 * \brief Proto converter interface definition for bilin engine */ #pragma once #include #include #include "common/error_code.h" #include "common/logger.h" #include "common/transformer.h" #include "index/collection_dataset.h" #include "meta/meta.h" #include "proto/proxima_be.pb.h" namespace proxima { namespace be { namespace server { /*! ProtoConverter */ class ProtoConverter { public: //! Convert Index Data static int ConvertIndexData( const std::string &index_value, const meta::ColumnMeta &column_meta, const proto::WriteRequest::IndexColumnMeta &proto_meta, bool is_bytes, index::ColumnData *column_value); private: //! Parse single index column value static int ParseJsonIndexColumnValue( const std::string &column_value, const meta::ColumnMeta &meta, const proto::WriteRequest::IndexColumnMeta &proto_meta, std::string *serialized_value); //! Parse single index column value static int ParseBytesIndexColumnValue( const std::string &column_value, const meta::ColumnMeta &meta, const proto::WriteRequest::IndexColumnMeta &proto_meta, std::string *serialized_value); //! Copy bytes index column value static int CopyBytesIndexColumnValue(const std::string &column_value, const meta::ColumnMeta &meta, std::string *serialized_value); //! Parse single typed index column value template static int ParseTypedIndexColumnValue(const std::string &column_value, const meta::ColumnMeta &meta, std::string *serialized_value); //! Parse single typed index column value static int SetTypedIndexColumnValue(const std::string &column_value, std::string *serialized_value); //! Validate single typed index column value template static int ValidateTypedIndexColumnValue(const std::string &column_value, const meta::ColumnMeta &meta); }; template int ProtoConverter::ParseTypedIndexColumnValue(const std::string &column_value, const meta::ColumnMeta &meta, std::string *serialized_value) { std::vector values; DataTypes data_type = meta.data_type(); uint32_t dimension = meta.dimension(); Transformer::Transform(column_value, nullptr, &values); if (data_type == DataTypes::VECTOR_BINARY32) { dimension /= 32; } else if (data_type == DataTypes::VECTOR_BINARY64) { dimension /= 64; } if (values.size() != dimension) { LOG_ERROR("Vector dimension mismatched. expected[%u], actual[%zu]", dimension, values.size()); return ErrorCode_MismatchedDimension; } if (data_type == DataTypes::VECTOR_INT4) { Primary2Bytes::Bytes(values, serialized_value); } else if (data_type == DataTypes::VECTOR_FP16) { Primary2Bytes::Bytes(values, serialized_value); } else { size_t vector_size = dimension * sizeof(T); serialized_value->resize(vector_size); memcpy(&((*serialized_value)[0]), values.data(), vector_size); } return 0; } template int ProtoConverter::ValidateTypedIndexColumnValue( const std::string &column_value, const meta::ColumnMeta &meta) { DataTypes data_type = meta.data_type(); uint32_t dimension = meta.dimension(); if (data_type == DataTypes::VECTOR_BINARY32) { dimension /= 32; } else if (data_type == DataTypes::VECTOR_BINARY64) { dimension /= 64; } size_t except_size = 0; if (data_type == DataTypes::VECTOR_INT4 || data_type == DataTypes::VECTOR_FP16) { except_size = dimension * sizeof(T) / 2; } else { except_size = dimension * sizeof(T); } if (except_size != column_value.size()) { LOG_ERROR("Vector size mismatched. expected[%zu], actual[%zu]", except_size, column_value.size()); return ErrorCode_MismatchedDimension; } return 0; } } // end namespace server } // namespace be } // end namespace proxima ================================================ FILE: src/server/proxima_request_handler.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of proxima request handler */ #include "proxima_request_handler.h" #include #include #include #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wunused-parameter" #endif #include #ifdef __GNUC__ #pragma GCC diagnostic pop #endif #include "agent/write_request.h" #include "common/error_code.h" #include "common/protobuf_helper.h" #include "metrics/metrics.h" #include "write_request_builder.h" namespace proxima { namespace be { namespace server { using metrics::ProtocolType; namespace { static void inline SetStatus(int ret, proto::Status *status) { status->set_code(ret); status->set_reason(ErrorCode::What(ret)); } //! Parse collection meta from json string static inline int ParseRequestFromJson(const std::string &json_str, google::protobuf::Message *meta) { ProtobufHelper::JsonParseOptions options; // ignore params which can't be automatic parse from json options.ignore_unknown_fields = true; if (!ProtobufHelper::JsonToMessage(json_str, options, meta)) { LOG_ERROR("ParseRequestFromJson failed. json[%s]", json_str.c_str()); return ErrorCode_InvalidArgument; } return 0; } //! Serialize response to controller static inline void SerializeResponse(const google::protobuf::Message &response, brpc::Controller *brpc_controller) { brpc_controller->http_response().set_content_type("application/json"); std::string json_resp; if (!ProtobufHelper::MessageToJson(response, &json_resp)) { LOG_ERROR("Can't serialize PB response to json. message[%s]", response.ShortDebugString().c_str()); } else { brpc_controller->response_attachment().append(json_resp); } } static inline void UnknownMethod(brpc::Controller *controller, int allowed_method, google::protobuf::Message *rsp, proto::Status *status) { SetStatus(PROXIMA_BE_ERROR_CODE(InvalidQuery), status); controller->http_response().set_status_code( brpc::HTTP_STATUS_METHOD_NOT_ALLOWED); status->mutable_reason()->append(": invalid http method"); const char *allowed = nullptr; switch (allowed_method) { case brpc::HTTP_METHOD_POST: allowed = "POST"; break; case brpc::HTTP_METHOD_GET: allowed = "GET"; break; case brpc::HTTP_METHOD_PUT: allowed = "PUT"; break; case brpc::HTTP_METHOD_DELETE: allowed = "DELETE"; break; // default ignore } if (allowed) { controller->http_response().SetHeader("Allowed", allowed); } SerializeResponse(*rsp, controller); } } // namespace #define RETURN_IF_NOT_HTTP_METHOD(CONTROLLER, METHOD, RSP, STATUS) \ if (CONTROLLER->http_request().method() != METHOD) { \ UnknownMethod(CONTROLLER, METHOD, RSP, STATUS); \ return; \ } ProximaRequestHandler::ProximaRequestHandler( const agent::IndexAgentPtr &p_index_agent, const query::QueryAgentPtr &p_query_agent, const admin::AdminAgentPtr &p_admin_agent) : index_agent_(p_index_agent), query_agent_(p_query_agent), admin_agent_(p_admin_agent) {} void ProximaRequestHandler::create_collection( ::google::protobuf::RpcController * /*controller*/, const proto::CollectionConfig *request, proto::Status *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); int ret = admin_agent_->create_collection(*request); SetStatus(ret, response); } void ProximaRequestHandler::drop_collection( ::google::protobuf::RpcController * /*controller*/, const proto::CollectionName *request, proto::Status *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); int ret = admin_agent_->drop_collection(request->collection_name()); SetStatus(ret, response); } void ProximaRequestHandler::describe_collection( ::google::protobuf::RpcController * /*controller*/, const proto::CollectionName *request, proto::DescribeCollectionResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); int ret = admin_agent_->describe_collection(request->collection_name(), response); SetStatus(ret, response->mutable_status()); } void ProximaRequestHandler::list_collections( ::google::protobuf::RpcController * /*controller*/, const proto::ListCondition *request, proto::ListCollectionsResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); int ret = admin_agent_->list_collections(*request, response); SetStatus(ret, response->mutable_status()); } void ProximaRequestHandler::stats_collection( ::google::protobuf::RpcController * /*controller*/, const proto::CollectionName *request, proto::StatsCollectionResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); int ret = admin_agent_->stats_collection(request->collection_name(), response); SetStatus(ret, response->mutable_status()); } void ProximaRequestHandler::write( ::google::protobuf::RpcController * /*controller*/, const proto::WriteRequest *request, proto::Status *response, ::google::protobuf::Closure *done) { int code = 0; metrics::WriteMetrics metrics{ProtocolType::kGrpc, &code}; metrics.update_with_write_request(*request); LOG_DEBUG("%s", request->ShortDebugString().c_str()); brpc::ClosureGuard done_guard(done); code = this->write_impl(*request, response); } void ProximaRequestHandler::query(::google::protobuf::RpcController *, const proto::QueryRequest *request, proto::QueryResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); ailego::ElapsedTime latency; int code = 0; metrics::QueryMetrics metrics{metrics::ProtocolType::kGrpc, &code}; metrics.update_with_query_request(*request); code = query_agent_->search(request, response); if (code != 0) { LOG_ERROR("Can't handle query. code[%d] what[%s]", code, ErrorCode::What(code)); } response->set_latency_us(latency.micro_seconds()); SetStatus(code, response->mutable_status()); } void ProximaRequestHandler::get_document_by_key( ::google::protobuf::RpcController * /*controller*/, const proto::GetDocumentRequest *request, proto::GetDocumentResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); int code = 0; metrics::GetDocumentMetrics metrics{ProtocolType::kGrpc, &code}; code = query_agent_->search_by_key(request, response); if (code != 0) { LOG_ERROR("Can't handle query. code[%d] what[%s]", code, ErrorCode::What(code)); } SetStatus(code, response->mutable_status()); } void ProximaRequestHandler::get_version( ::google::protobuf::RpcController * /* controller */, const proto::GetVersionRequest * /* request */, proto::GetVersionResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->set_version(version_); SetStatus(0, response->mutable_status()); } void ProximaRequestHandler::collection( ::google::protobuf::RpcController *controller, const proto::HttpRequest * /*request*/, proto::HttpResponse * /*response*/, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); auto *brpc_controller = dynamic_cast(controller); auto method = brpc_controller->http_request().method(); if (method == brpc::HttpMethod::HTTP_METHOD_POST) { create_collection(brpc_controller); } else if (method == brpc::HttpMethod::HTTP_METHOD_GET) { describe_collection(brpc_controller); } else if (method == brpc::HttpMethod::HTTP_METHOD_DELETE) { drop_collection(brpc_controller); } else { proto::Status status; SetStatus(PROXIMA_BE_ERROR_CODE(InvalidQuery), &status); status.set_reason(": invalid http method"); brpc_controller->http_response().set_status_code( brpc::HTTP_STATUS_METHOD_NOT_ALLOWED); SerializeResponse(status, brpc_controller); } } void ProximaRequestHandler::stats_collection( ::google::protobuf::RpcController *controller, const proto::HttpRequest * /*request*/, proto::HttpResponse * /*response*/, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); auto *brpc_controller = dynamic_cast(controller); proto::StatsCollectionResponse pb_response; RETURN_IF_NOT_HTTP_METHOD(brpc_controller, brpc::HTTP_METHOD_GET, &pb_response, pb_response.mutable_status()) std::string collection_name; int code = parse_collection(brpc_controller, &collection_name); if (code == 0) { code = admin_agent_->stats_collection(collection_name, &pb_response); } SetStatus(code, pb_response.mutable_status()); SerializeResponse(pb_response, brpc_controller); } void ProximaRequestHandler::write(::google::protobuf::RpcController *controller, const proto::HttpRequest * /*request*/, proto::HttpResponse * /*response*/, ::google::protobuf::Closure *done) { int code = 0; metrics::WriteMetrics metrics{ProtocolType::kHttp, &code}; brpc::ClosureGuard done_guard(done); auto *brpc_controller = dynamic_cast(controller); proto::Status status; RETURN_IF_NOT_HTTP_METHOD(brpc_controller, brpc::HTTP_METHOD_POST, &status, &status) std::string collection_name; code = parse_collection(brpc_controller, &collection_name); if (code == 0) { const std::string http_body = brpc_controller->request_attachment().to_string(); proto::WriteRequest pb_request; code = ParseRequestFromJson(http_body, &pb_request); if (code == 0) { pb_request.set_collection_name(collection_name); metrics.update_with_write_request(pb_request); code = this->write_impl(pb_request, &status); } else { SetStatus(code, &status); } } SerializeResponse(status, brpc_controller); } void ProximaRequestHandler::query(::google::protobuf::RpcController *controller, const proto::HttpRequest * /*request*/, proto::HttpResponse * /*response*/, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); ailego::ElapsedTime latency; int code = 0; metrics::QueryMetrics metrics{metrics::ProtocolType::kHttp, &code}; auto *brpc_controller = dynamic_cast(controller); // Check http method proto::QueryResponse pb_response; RETURN_IF_NOT_HTTP_METHOD(brpc_controller, brpc::HTTP_METHOD_POST, &pb_response, pb_response.mutable_status()) std::string collection_name; code = parse_collection(brpc_controller, &collection_name); if (code == 0) { const std::string body = brpc_controller->request_attachment().to_string(); proto::QueryRequest pb_request; code = ParseRequestFromJson(body, &pb_request); if (code == 0) { metrics.update_with_query_request(pb_request); pb_request.set_collection_name(collection_name); code = query_agent_->search(&pb_request, &pb_response); if (code != 0) { LOG_ERROR("Can't handle query. code[%d] what[%s]", code, ErrorCode::What(code)); } } } pb_response.set_latency_us(latency.micro_seconds()); SetStatus(code, pb_response.mutable_status()); SerializeResponse(pb_response, brpc_controller); } void ProximaRequestHandler::get_document_by_key( ::google::protobuf::RpcController *controller, const proto::HttpRequest * /*request*/, proto::HttpResponse * /*response*/, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); auto *brpc_controller = dynamic_cast(controller); int code = 0; metrics::GetDocumentMetrics metrics{ProtocolType::kHttp, &code}; // Check http method proto::GetDocumentResponse pb_response; RETURN_IF_NOT_HTTP_METHOD(brpc_controller, brpc::HTTP_METHOD_GET, &pb_response, pb_response.mutable_status()) std::string collection_name; code = parse_collection(brpc_controller, &collection_name); if (code == 0) { proto::GetDocumentRequest pb_request; pb_request.set_collection_name(collection_name); auto *key = brpc_controller->http_request().uri().GetQuery("key"); if (key) { pb_request.set_primary_key(std::strtoull(key->c_str(), nullptr, 10)); code = query_agent_->search_by_key(&pb_request, &pb_response); if (code != 0) { LOG_ERROR("Can't handle query. code[%d] what[%s]", code, ErrorCode::What(code)); } } else { code = PROXIMA_BE_ERROR_CODE(InvalidArgument); } } SetStatus(code, pb_response.mutable_status()); SerializeResponse(pb_response, brpc_controller); } void ProximaRequestHandler::list_collections( ::google::protobuf::RpcController *controller, const proto::HttpRequest * /*request*/, proto::HttpResponse * /*response*/, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); auto *brpc_controller = static_cast(controller); proto::ListCollectionsResponse pb_response; RETURN_IF_NOT_HTTP_METHOD(brpc_controller, brpc::HTTP_METHOD_GET, &pb_response, pb_response.mutable_status()) proto::ListCondition pb_request; auto *repo = brpc_controller->http_request().uri().GetQuery("repository"); if (repo) { pb_request.set_repository_name(*repo); } int code = admin_agent_->list_collections(pb_request, &pb_response); SetStatus(code, pb_response.mutable_status()); SerializeResponse(pb_response, brpc_controller); } void ProximaRequestHandler::get_version( ::google::protobuf::RpcController *controller, const proto::HttpRequest * /* request */, proto::HttpResponse * /* response */, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); auto *brpc_controller = dynamic_cast(controller); proto::GetVersionResponse pb_response; pb_response.set_version(version_); SetStatus(0, pb_response.mutable_status()); SerializeResponse(pb_response, brpc_controller); } int ProximaRequestHandler::write_impl(const proto::WriteRequest &request, proto::Status *response) { auto &collection_name = request.collection_name(); auto meta = index_agent_->get_collection_meta(collection_name); auto column_order = index_agent_->get_column_order(collection_name); if (!meta || !column_order) { SetStatus(ErrorCode_InexistentCollection, response); LOG_ERROR("Invalid collection. collection[%s]", collection_name.c_str()); return ErrorCode_InexistentCollection; } agent::WriteRequest write_request; int code = WriteRequestBuilder::build(*meta, *column_order, request, &write_request); if (code != 0) { SetStatus(code, response); LOG_ERROR("Write request builder build failed. code[%d] collection[%s]", code, collection_name.c_str()); return code; } code = index_agent_->write(write_request); if (code != 0) { LOG_ERROR("Index agent write request failed. code[%d] collection[%s]", code, collection_name.c_str()); } SetStatus(code, response); return code; } void ProximaRequestHandler::create_collection(brpc::Controller *controller) { proto::Status pb_response; RETURN_IF_NOT_HTTP_METHOD(controller, brpc::HTTP_METHOD_POST, &pb_response, &pb_response) const std::string &http_body = controller->request_attachment().to_string(); proto::CollectionConfig pb_request; int code = ParseRequestFromJson(http_body, &pb_request); if (code == 0) { if (pb_request.collection_name().empty()) { pb_request.set_collection_name( controller->http_request().unresolved_path()); } code = admin_agent_->create_collection(pb_request); } SetStatus(code, &pb_response); SerializeResponse(pb_response, controller); } void ProximaRequestHandler::describe_collection(brpc::Controller *controller) { proto::DescribeCollectionResponse pb_response; RETURN_IF_NOT_HTTP_METHOD(controller, brpc::HTTP_METHOD_GET, &pb_response, pb_response.mutable_status()) const std::string &collection_name = controller->http_request().unresolved_path(); int code = admin_agent_->describe_collection(collection_name, &pb_response); SetStatus(code, pb_response.mutable_status()); SerializeResponse(pb_response, controller); } void ProximaRequestHandler::drop_collection(brpc::Controller *controller) { proto::Status pb_response; RETURN_IF_NOT_HTTP_METHOD(controller, brpc::HTTP_METHOD_DELETE, &pb_response, &pb_response) const std::string &collection_name = controller->http_request().unresolved_path(); int code = admin_agent_->drop_collection(collection_name); SetStatus(code, &pb_response); SerializeResponse(pb_response, controller); } int ProximaRequestHandler::parse_collection(brpc::Controller *controller, std::string *collection_name) { auto &path = controller->http_request().uri().path(); std::vector elements; ailego::StringHelper::Split(path, "/", &elements); if (elements.size() < 4) { return PROXIMA_BE_ERROR_CODE(InvalidArgument); } collection_name->assign(elements[3]); return 0; } } // end namespace server } // namespace be } // end namespace proxima ================================================ FILE: src/server/proxima_request_handler.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of pb service interface, it will be registered * to http/grpc server for rpc service */ #pragma once #include #include "admin/admin_agent.h" #include "agent/index_agent.h" #include "proto/proxima_be.pb.h" #include "query/query_agent.h" namespace proxima { namespace be { namespace server { class ProximaRequestHandler : public proto::ProximaService, public proto::HttpProximaService { public: ProximaRequestHandler(const agent::IndexAgentPtr &index_agent, const query::QueryAgentPtr &query_agent, const admin::AdminAgentPtr &admin_agent); ~ProximaRequestHandler() = default; public: void create_collection(::google::protobuf::RpcController *controller, const proto::CollectionConfig *request, proto::Status *response, ::google::protobuf::Closure *done) override; void drop_collection(::google::protobuf::RpcController *controller, const proto::CollectionName *request, proto::Status *response, ::google::protobuf::Closure *done) override; void describe_collection(::google::protobuf::RpcController *controller, const proto::CollectionName *request, proto::DescribeCollectionResponse *response, ::google::protobuf::Closure *done) override; void list_collections(::google::protobuf::RpcController *controller, const proto::ListCondition *request, proto::ListCollectionsResponse *response, ::google::protobuf::Closure *done) override; void stats_collection(::google::protobuf::RpcController *controller, const proto::CollectionName *request, proto::StatsCollectionResponse *response, ::google::protobuf::Closure *done) override; void write(::google::protobuf::RpcController *controller, const proto::WriteRequest *request, proto::Status *response, ::google::protobuf::Closure *done) override; void query(::google::protobuf::RpcController *controller, const proto::QueryRequest *request, proto::QueryResponse *response, ::google::protobuf::Closure *done) override; void get_document_by_key(::google::protobuf::RpcController *controller, const proto::GetDocumentRequest *request, proto::GetDocumentResponse *response, ::google::protobuf::Closure *done) override; void get_version(::google::protobuf::RpcController *controller, const proto::GetVersionRequest *request, proto::GetVersionResponse *response, ::google::protobuf::Closure *done) override; public: // Restful apis from HttpProximaService void collection(::google::protobuf::RpcController *controller, const proto::HttpRequest *request, proto::HttpResponse *response, ::google::protobuf::Closure *done) override; void stats_collection(::google::protobuf::RpcController *controller, const proto::HttpRequest *request, proto::HttpResponse *response, ::google::protobuf::Closure *done) override; void write(::google::protobuf::RpcController *controller, const proto::HttpRequest *request, proto::HttpResponse *response, ::google::protobuf::Closure *done) override; void query(::google::protobuf::RpcController *controller, const proto::HttpRequest *request, proto::HttpResponse *response, ::google::protobuf::Closure *done) override; void get_document_by_key(::google::protobuf::RpcController *controller, const proto::HttpRequest *request, proto::HttpResponse *response, ::google::protobuf::Closure *done) override; void list_collections(::google::protobuf::RpcController *controller, const proto::HttpRequest *request, proto::HttpResponse *response, ::google::protobuf::Closure *done) override; void get_version(::google::protobuf::RpcController *controller, const proto::HttpRequest *request, proto::HttpResponse *response, ::google::protobuf::Closure *done) override; public: void set_version(const std::string &val) { version_ = val; } private: int write_impl(const proto::WriteRequest &request, proto::Status *response); void create_collection(brpc::Controller *controller); void drop_collection(brpc::Controller *controller); void describe_collection(brpc::Controller *controller); int parse_collection(brpc::Controller *controller, std::string *collection); private: std::string version_{}; agent::IndexAgentPtr index_agent_{}; query::QueryAgentPtr query_agent_{}; admin::AdminAgentPtr admin_agent_{}; }; } // end namespace server } // namespace be } // end namespace proxima ================================================ FILE: src/server/proxima_search_engine.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Implementation of proxima search engine */ #include "proxima_search_engine.h" #include #include #include #include #include "common/config.h" #include "common/error_code.h" #include "common/logger.h" #include "metrics/metrics_collector.h" namespace proxima { namespace be { namespace server { int ProximaSearchEngine::init(bool daemonized, const std::string &pid_file) { if (!pid_file.empty() && !pid_file_.open(pid_file)) { LOG_ERROR("ProximaSE open the pid file failed, pid_file=[%s].", pid_file.c_str()); return ErrorCode_OpenFile; } daemonized_ = daemonized; // init logger int ret = init_logger(); if (ret != 0) { LOG_ERROR("ProximaSE init logger error."); return ret; } // get config Config &config = Config::Instance(); // init metrics ret = metrics::MetricsCollector::CreateAndInitMetrics(config.metrics_config()); if (ret != 0) { LOG_ERROR("ProximaSE init metrics error"); return ret; } // init meta agent meta_agent_ = meta::MetaAgent::Create(config.get_meta_uri()); if (!meta_agent_) { LOG_ERROR("Create meta agent failed."); return ErrorCode_RuntimeError; } ret = meta_agent_->init(); if (ret != 0) { LOG_ERROR("Init meta agent failed."); return ret; } // init index agent index_agent_ = agent::IndexAgent::Create(meta_agent_->get_service()); if (!index_agent_) { LOG_ERROR("Create index agent failed."); return ErrorCode_RuntimeError; } ret = index_agent_->init(); if (ret != 0) { LOG_ERROR("Init index agent failed."); return ret; } // init query agent uint32_t concurrency = config.get_query_thread_count(); query_agent_ = query::QueryAgent::Create( index_agent_->get_service(), meta_agent_->get_service(), concurrency); if (!query_agent_) { LOG_ERROR("Create query agent failed."); return ErrorCode_RuntimeError; } ret = query_agent_->init(); if (ret != 0) { LOG_ERROR("Init query agent failed."); return ret; } // init admin agent admin_agent_ = admin::AdminAgent::Create(meta_agent_, index_agent_, query_agent_); if (!admin_agent_) { LOG_ERROR("Create admin agent failed."); return ErrorCode_RuntimeError; } ret = admin_agent_->init(); if (ret != 0) { LOG_ERROR("Init admin agent failed."); return ret; } grpc_server_ = GrpcServer::Create(); if (!grpc_server_) { LOG_ERROR("GrpcServer create failed."); return ErrorCode_RuntimeError; } http_server_ = HttpServer::Create(); if (!http_server_) { LOG_ERROR("HttpServer create failed."); return ErrorCode_RuntimeError; } return 0; } int ProximaSearchEngine::cleanup() { if (admin_agent_ != nullptr) { admin_agent_->cleanup(); } if (query_agent_ != nullptr) { query_agent_->cleanup(); } if (index_agent_ != nullptr) { index_agent_->cleanup(); } if (meta_agent_ != nullptr) { meta_agent_->cleanup(); } LOG_INFO("ProximaSE cleanup complete."); LogUtil::Shutdown(); Config::Instance().cleanup(); daemonized_ = false; return 0; } int ProximaSearchEngine::start() { if (daemonized_) { daemonize(); } // start meta agent int ret = meta_agent_->start(); if (ret != 0) { LOG_ERROR("Start meta agent failed."); return ret; } // start index agent ret = index_agent_->start(); if (ret != 0) { LOG_ERROR("Start index agent failed."); return ret; } // start query agent ret = query_agent_->start(); if (ret != 0) { LOG_ERROR("Start query agent failed."); return ret; } // start admin agent ret = admin_agent_->start(); if (ret != 0) { LOG_ERROR("Start admin agent failed."); return ret; } // start grpc server if (support_brpc_protocol()) { ret = grpc_server_->bind_and_start(index_agent_, query_agent_, admin_agent_, version_); if (ret != 0) { LOG_ERROR("GrpcServer bind and start failed."); return ret; } std::this_thread::sleep_for(std::chrono::seconds(1)); if (!grpc_server_->is_running()) { return ErrorCode_StartServer; } } // start http server if (support_http_protocol()) { ret = http_server_->bind_and_start(index_agent_, query_agent_, admin_agent_, version_); if (ret != 0) { LOG_ERROR("HttpServer bind and start failed."); return ret; } std::this_thread::sleep_for(std::chrono::seconds(1)); if (!http_server_->is_running()) { return ErrorCode_StartServer; } } LOG_INFO("ProximaSE start successfully."); return 0; } int ProximaSearchEngine::stop() { if (is_stopping_.exchange(true)) { return 0; } if (grpc_server_ != nullptr && grpc_server_->is_running()) { grpc_server_->stop(); } if (http_server_ != nullptr && http_server_->is_running()) { http_server_->stop(); } if (admin_agent_ != nullptr) { admin_agent_->stop(); } if (query_agent_ != nullptr) { query_agent_->stop(); } if (index_agent_ != nullptr) { index_agent_->stop(); } if (meta_agent_ != nullptr) { meta_agent_->stop(); } pid_file_.close(); LOG_INFO("ProximaSE stopped."); return 0; } int ProximaSearchEngine::init_logger() { // get logger config std::string log_dir = Config::Instance().get_log_dir(); std::string log_file = Config::Instance().get_log_file(); uint32_t log_level = Config::Instance().get_log_level(); std::string logger_type = Config::Instance().get_logger_type(); // int logger return LogUtil::Init(log_dir, log_file, log_level, logger_type); } void ProximaSearchEngine::daemonize() { std::string log_dir = Config::Instance().get_log_dir(); std::string stdout_path = log_dir + "./stdout.log"; std::string stderr_path = log_dir + "./stderr.log"; ailego::ProcessHelper::Daemon(stdout_path.c_str(), stderr_path.c_str()); } bool ProximaSearchEngine::support_brpc_protocol() { std::string protocol = Config::Instance().get_protocol(); std::vector prots; ailego::StringHelper::Split(protocol, '|', &prots); auto it = std::find_if(prots.begin(), prots.end(), [](const std::string &str) { return str == "grpc"; }); return (it != prots.end()); } bool ProximaSearchEngine::support_http_protocol() { std::string protocol = Config::Instance().get_protocol(); std::vector prots; ailego::StringHelper::Split(protocol, '|', &prots); auto it = std::find_if(prots.begin(), prots.end(), [](const std::string &str) { return str == "http"; }); return (it != prots.end()); } } // end namespace server } // namespace be } // end namespace proxima ================================================ FILE: src/server/proxima_search_engine.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Main class to describe proxima search engine * interface and action. It's designed as sigleton. */ #pragma once #include #include #include #include "admin/admin_agent.h" #include "agent/index_agent.h" #include "common/macro_define.h" #include "meta/meta_agent.h" #include "query/query_agent.h" #include "grpc_server.h" #include "http_server.h" namespace proxima { namespace be { namespace server { class ProximaSearchEngine : public ailego::Singleton { public: //! Initialize int init(bool daemonized, const std::string &pid_file); //! Cleanup memory int cleanup(); //! Start server int start(); //! Stop server int stop(); public: //! Set version void set_version(const char *val) { version_ = val; } private: //! Initilize logger int init_logger(); //! Start as daemon void daemonize(); //! Return if support brpc protocol bool support_brpc_protocol(); //! Return if support http protocol bool support_http_protocol(); private: bool daemonized_{false}; ailego::PidFile pid_file_{}; std::string version_{}; agent::IndexAgentPtr index_agent_{}; query::QueryAgentPtr query_agent_{}; meta::MetaAgentPtr meta_agent_{}; admin::AdminAgentPtr admin_agent_{}; GrpcServerUPtr grpc_server_{}; HttpServerUPtr http_server_{}; std::atomic is_stopping_{false}; }; } // end namespace server } // namespace be } // end namespace proxima ================================================ FILE: src/server/write_request_builder.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Mar 2021 * \brief Implements write request builder interface */ #include "write_request_builder.h" #include "common/types_helper.h" #include "proto_converter.h" namespace proxima { namespace be { namespace server { using RequestType = agent::WriteRequest::RequestType; int WriteRequestBuilder::build(const meta::CollectionMeta &meta, const agent::ColumnOrder &column_order, const proto::WriteRequest &pb_request, agent::WriteRequest *write_request) { // get if indexes and forwards sequence are strictly match collection meta bool index_full_match = false; bool forward_full_match = false; get_index_and_forward_mode(pb_request, meta, &index_full_match, &forward_full_match); // validate indexes and forward values size int ret = validate_request(pb_request, meta, column_order, index_full_match, forward_full_match); if (ret != 0) { return ret; } RequestType request_type = meta.repository() ? RequestType::PROXY : RequestType::DIRECT; if (request_type == RequestType::PROXY) { ret = build_proxy_request(meta, column_order, pb_request, index_full_match, forward_full_match, write_request); } else { ret = build_direct_request(meta, column_order, pb_request, index_full_match, forward_full_match, write_request); } if (ret != 0) { LOG_ERROR("Build write request failed. collection[%s]", pb_request.collection_name().c_str()); return ret; } write_request->set_request_type(request_type); return 0; } void WriteRequestBuilder::get_index_and_forward_mode( const proto::WriteRequest &request, const meta::CollectionMeta &meta, bool *index_full_match, bool *forward_full_match) { // check index columns size auto &request_index_columns = request.row_meta().index_column_metas(); auto &meta_index_columns = meta.index_columns(); size_t index_column_size = static_cast(request_index_columns.size()); size_t meta_columns_size = meta_index_columns.size(); // get index column full match *index_full_match = false; if (meta_columns_size == index_column_size) { size_t i = 0; for (i = 0; i < meta_columns_size; ++i) { if (meta_index_columns[i]->name() != request_index_columns[i].column_name()) { break; } } if (i == meta_columns_size) { *index_full_match = true; } } // get forward column full match auto &request_forward_columns = request.row_meta().forward_column_names(); auto &meta_forward_columns = meta.forward_columns(); size_t request_forward_size = static_cast(request_forward_columns.size()); size_t meta_forward_size = meta_forward_columns.size(); *forward_full_match = false; if (meta_forward_size == request_forward_size) { size_t i = 0; for (i = 0; i < meta_forward_size; ++i) { if (meta_forward_columns[i] != request_forward_columns[i]) { break; } } if (i == meta_forward_size) { *forward_full_match = true; } } } int WriteRequestBuilder::validate_request( const proto::WriteRequest &request, const meta::CollectionMeta &meta, const agent::ColumnOrder &column_order, bool index_full_match, bool forward_full_match) { auto &collection = request.collection_name(); auto &request_index_metas = request.row_meta().index_column_metas(); size_t index_column_size = static_cast(request_index_metas.size()); size_t meta_index_size = meta.index_columns().size(); // check request is empty if (!request.rows_size()) { LOG_ERROR("Write request is empty. collection[%s]", collection.c_str()); return ErrorCode_InvalidWriteRequest; } // check index if (index_column_size != (size_t)request_index_metas.size()) { LOG_ERROR( "Collection index column meta size mismatched. " "meta[%zu] index[%zu] collection[%s]", index_column_size, (size_t)request_index_metas.size(), collection.c_str()); return ErrorCode_InvalidWriteRequest; } if (meta_index_size < index_column_size) { LOG_ERROR( "Collection index columns size mismatched. meta[%zu] " "request[%zu] collection[%s]", meta_index_size, index_column_size, collection.c_str()); return ErrorCode_InvalidWriteRequest; } if (!index_full_match) { auto &index_order = column_order.get_index_order(); for (size_t i = 0; i < index_column_size; ++i) { auto &index_column = request_index_metas[i].column_name(); auto it = index_order.find(index_column); if (it == index_order.end()) { LOG_ERROR("Collection index field invalid. request[%s] collection[%s]", index_column.c_str(), collection.c_str()); return ErrorCode_InvalidWriteRequest; } } } for (size_t i = 0; i < index_column_size; ++i) { auto &index_column = request_index_metas[i].column_name(); auto column_meta = meta.column_by_name(index_column); if (!column_meta) { LOG_ERROR("Invalid index column. name[%s] collection[%s]", index_column.c_str(), collection.c_str()); return ErrorCode_InvalidWriteRequest; } if (column_meta->dimension() != request_index_metas[i].dimension()) { LOG_ERROR( "Index column dimension mismatched. " "meta[%u] request[%u] column[%s] collection[%s]", column_meta->dimension(), request_index_metas[i].dimension(), index_column.c_str(), collection.c_str()); return ErrorCode_InvalidWriteRequest; } } // check forward auto &request_forward_columns = request.row_meta().forward_column_names(); size_t request_forward_size = static_cast(request_forward_columns.size()); size_t meta_forward_size = meta.forward_columns().size(); if (meta_forward_size < request_forward_size) { LOG_ERROR( "Collection forward columns size mismatched. meta[%zu] " "request[%zu] collection[%s]", meta_forward_size, request_forward_size, collection.c_str()); return ErrorCode_InvalidWriteRequest; } if (!forward_full_match) { auto &forward_order = column_order.get_forward_order(); for (auto &forward_column : request_forward_columns) { auto it = forward_order.find(forward_column); if (it == forward_order.end()) { LOG_ERROR( "Collection forward field invalid. request[%s] collection[%s]", forward_column.c_str(), collection.c_str()); return ErrorCode_InvalidWriteRequest; } } } // check index&forward data for (int i = 0; i < request.rows_size(); ++i) { auto &row = request.rows(i); if (row.operation_type() == proxima::be::proto::OP_DELETE) { continue; } if (!index_column_size) { LOG_ERROR("Row index column names is empty. collection[%s]", collection.c_str()); return ErrorCode_InvalidWriteRequest; } size_t index_value_size = static_cast(row.index_column_values().values_size()); if (index_value_size != index_column_size) { LOG_ERROR( "Row index columns size mismatched. meta[%zu] " "values[%zu] collection[%s]", index_column_size, index_value_size, collection.c_str()); return ErrorCode_InvalidWriteRequest; } size_t forward_value_size = static_cast(row.forward_column_values().values_size()); if (forward_value_size != request_forward_size) { LOG_ERROR( "Row forward columns size mismatched. meta[%zu] " "values[%zu] collection[%s]", request_forward_size, forward_value_size, collection.c_str()); return ErrorCode_InvalidWriteRequest; } } return 0; } int WriteRequestBuilder::build_proxy_request( const meta::CollectionMeta &meta, const agent::ColumnOrder &column_order, const proto::WriteRequest &pb_request, bool index_full_match, bool forward_full_match, agent::WriteRequest *write_request) { auto &row_meta = pb_request.row_meta(); auto &collection = pb_request.collection_name(); for (int i = 0; i < pb_request.rows_size(); ++i) { // schema revision default 0 index::CollectionDatasetPtr record = std::make_shared(0); auto &row = pb_request.rows(i); int ret = build_record(row, row_meta, meta, column_order, index_full_match, forward_full_match, record.get()); if (ret != 0) { LOG_ERROR("Build record failed. id[%d] collection[%s]", i, collection.c_str()); return ret; } write_request->add_collection_dataset(record); } write_request->set_magic_number(pb_request.magic_number()); write_request->set_collection_name(collection); return 0; } int WriteRequestBuilder::build_direct_request( const meta::CollectionMeta &meta, const agent::ColumnOrder &column_order, const proto::WriteRequest &pb_request, bool index_full_match, bool forward_full_match, agent::WriteRequest *write_request) { auto &row_meta = pb_request.row_meta(); auto &collection = pb_request.collection_name(); // schema revision default 0 index::CollectionDatasetPtr dataset = std::make_shared(0); for (int i = 0; i < pb_request.rows_size(); ++i) { auto &row = pb_request.rows(i); int ret = build_record(row, row_meta, meta, column_order, index_full_match, forward_full_match, dataset.get()); if (ret != 0) { LOG_ERROR("Build record failed. id[%d] collection[%s]", i, collection.c_str()); return ret; } } write_request->add_collection_dataset(dataset); write_request->set_collection_name(collection); return 0; } int WriteRequestBuilder::build_record( const proto::WriteRequest::Row &row, const proto::WriteRequest::RowMeta &row_meta, const meta::CollectionMeta &meta, const agent::ColumnOrder &column_order, bool index_full_match, bool forward_full_match, index::CollectionDataset *dataset) { auto *row_data = dataset->add_row_data(); row_data->primary_key = row.primary_key(); // set lsn context if (meta.repository()) { if (!row.has_lsn_context()) { LOG_ERROR("Row not set lsn_context field. pk[%zu] collection[%s]", (size_t)row.primary_key(), meta.name().c_str()); return ErrorCode_EmptyLsnContext; } row_data->lsn_check = true; auto &lsn_ctx = row.lsn_context(); row_data->lsn = lsn_ctx.lsn(); row_data->lsn_context = lsn_ctx.context(); } else { row_data->lsn_check = false; } row_data->operation_type = OperationTypesCodeBook::Get(row.operation_type()); if (row_data->operation_type == OperationTypes::DELETE) { return 0; } // build forwards data int ret = build_forwards_data(row, row_meta, column_order, meta, forward_full_match, row_data); if (ret != 0) { LOG_ERROR("Build forwards data failed. collection[%s]", meta.name().c_str()); return ret; } // build index data ret = build_indexes_data(row, row_meta, meta, index_full_match, row_data); if (ret != 0) { LOG_ERROR("Build indexes data failed. collection[%s]", meta.name().c_str()); return ret; } return 0; } int WriteRequestBuilder::build_forwards_data( const proto::WriteRequest::Row &row, const proto::WriteRequest::RowMeta &row_meta, const agent::ColumnOrder &column_order, const meta::CollectionMeta &meta, bool forward_full_match, index::CollectionDataset::RowData *row_data) { // if forward_full_match is true, direct serialized auto *forward_data = &(row_data->forward_data); if (forward_full_match) { if (!row.forward_column_values().SerializeToString(forward_data)) { LOG_ERROR("Forward columns serialize failed. collection[%s]", meta.name().c_str()); return ErrorCode_SerializeError; } return 0; } // init the value list proto::GenericValueList value_list; auto &forward_order = column_order.get_forward_order(); size_t meta_forward_size = meta.forward_columns().size(); for (size_t i = 0; i < meta_forward_size; ++i) { value_list.add_values(); } // fill the value list auto &request_forward_columns = row_meta.forward_column_names(); auto &forward_values = row.forward_column_values().values(); for (int i = 0; i < request_forward_columns.size(); ++i) { auto &forward_column = request_forward_columns[i]; auto it = forward_order.find(forward_column); if (it != forward_order.end()) { if (it->second < meta_forward_size) { value_list.mutable_values(it->second)->CopyFrom(forward_values[i]); } else { LOG_ERROR( "Forward order invalid. forward[%s] index[%zu] " "max_size[%zu] collection[%s]", forward_column.c_str(), it->second, meta_forward_size, meta.name().c_str()); return ErrorCode_RuntimeError; } } else { LOG_ERROR("Find forward order failed. forward[%s] collection[%s]", forward_column.c_str(), meta.name().c_str()); return ErrorCode_InvalidWriteRequest; } } // copy forward data if (!value_list.SerializeToString(forward_data)) { LOG_ERROR("Forward columns serialize failed. collection[%s]", meta.name().c_str()); return ErrorCode_SerializeError; } return 0; } int WriteRequestBuilder::build_indexes_data( const proto::WriteRequest::Row &row, const proto::WriteRequest::RowMeta &row_meta, const meta::CollectionMeta &meta, bool index_full_match, index::CollectionDataset::RowData *row_data) { auto &index_column_metas = row_meta.index_column_metas(); int index_column_size = index_column_metas.size(); row_data->column_datas.resize(index_column_size); auto &index_values = row.index_column_values().values(); auto &column_meta_list = meta.index_columns(); for (int i = 0; i < index_column_size; ++i) { meta::ColumnMetaPtr column_meta; if (index_full_match) { column_meta = column_meta_list[i]; } else { column_meta = meta.column_by_name(index_column_metas[i].column_name()); } if (!column_meta) { LOG_ERROR("Find index column failed. column[%s] collection[%s]", index_column_metas[i].column_name().c_str(), meta.name().c_str()); return ErrorCode_MismatchedIndexColumn; } auto value_type = index_values[i].value_oneof_case(); if ((column_meta->index_type() != IndexTypes::PROXIMA_GRAPH_INDEX) || (value_type != proto::GenericValue::ValueOneofCase::kStringValue && value_type != proto::GenericValue::ValueOneofCase::kBytesValue)) { LOG_ERROR( "Only support PROXIMA_GRAPH_INDEX && (string or bytes) type." " collection[%s]", meta.name().c_str()); return ErrorCode_MismatchedIndexColumn; } int ret = 0; auto &column_data = row_data->column_datas[i]; if (value_type == proto::GenericValue::ValueOneofCase::kStringValue) { ret = ProtoConverter::ConvertIndexData( index_values[i].string_value(), *column_meta, index_column_metas[i], false, &column_data); } else { ret = ProtoConverter::ConvertIndexData( index_values[i].bytes_value(), *column_meta, index_column_metas[i], true, &column_data); } if (ret != 0) { LOG_ERROR("Convert collection index data failed. collection[%s]", meta.name().c_str()); return ret; } } return 0; } } // end namespace server } // namespace be } // end namespace proxima ================================================ FILE: src/server/write_request_builder.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Hongqing.hu * \date Mar 2021 * \brief Write request builder interface definition */ #pragma once #include "agent/column_order.h" #include "agent/write_request.h" #include "proto/proxima_be.pb.h" namespace proxima { namespace be { namespace server { /*! WriteRequestBuilder */ class WriteRequestBuilder { public: //! build write request static int build(const meta::CollectionMeta &meta, const agent::ColumnOrder &column_order, const proto::WriteRequest &pb_request, agent::WriteRequest *write_request); private: static void get_index_and_forward_mode(const proto::WriteRequest &request, const meta::CollectionMeta &meta, bool *index_full_match, bool *forward_full_match); static int validate_request(const proto::WriteRequest &request, const meta::CollectionMeta &meta, const agent::ColumnOrder &column_order, bool index_full_match, bool forward_full_match); static int build_proxy_request(const meta::CollectionMeta &meta, const agent::ColumnOrder &column_order, const proto::WriteRequest &pb_request, bool index_full_match, bool forward_full_match, agent::WriteRequest *write_request); static int build_direct_request(const meta::CollectionMeta &meta, const agent::ColumnOrder &column_order, const proto::WriteRequest &pb_request, bool index_full_match, bool forward_full_match, agent::WriteRequest *write_request); static int build_record(const proto::WriteRequest::Row &row, const proto::WriteRequest::RowMeta &row_meta, const meta::CollectionMeta &meta, const agent::ColumnOrder &column_order, bool index_full_match, bool forward_full_match, index::CollectionDataset *dataset); static int build_forwards_data(const proto::WriteRequest::Row &row, const proto::WriteRequest::RowMeta &row_meta, const agent::ColumnOrder &column_order, const meta::CollectionMeta &meta, bool forward_full_match, index::CollectionDataset::RowData *row_data); static int build_indexes_data(const proto::WriteRequest::Row &row, const proto::WriteRequest::RowMeta &row_meta, const meta::CollectionMeta &meta, bool index_full_match, index::CollectionDataset::RowData *row_data); }; } // end namespace server } // namespace be } // end namespace proxima ================================================ FILE: tests/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Feb 2021 ## \brief Detail cmake build script of unittest ## include(../cmake/bazel.cmake) include(../cmake/option.cmake) execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/integration ${CMAKE_CURRENT_BINARY_DIR}/integration ) cc_directories(common meta index agent query server admin) cc_directory(repository) ================================================ FILE: tests/README.md ================================================ ================================================ FILE: tests/admin/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Feb 2021 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) if(APPLE) set(APPLE_FRAMEWORK_LIBS -framework CoreFoundation -framework CoreGraphics -framework CoreData -framework CoreText -framework Security -framework Foundation -Wl,-U,_MallocExtension_ReleaseFreeMemory -Wl,-U,_ProfilerStart -Wl,-U,_ProfilerStop -Wl,-U,_RegisterThriftProtocol ) endif() file(GLOB ALL_TEST_SRCS *_test.cc) foreach (CC_SRCS ${ALL_TEST_SRCS}) get_filename_component(CC_TARGET ${CC_SRCS} NAME_WE) cc_gmock( NAME ${CC_TARGET} STRICT LIBS proxima_be_server proxima_be_agent proxima_be_index proxima_be_meta proxima_be_common proxima_be_proto ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} SRCS ${CC_SRCS} INCS .. ../../src LDFLAGS ${APPLE_FRAMEWORK_LIBS} ) set_target_properties(${CC_TARGET} PROPERTIES INSTALL_RPATH ${LIB_PATH}) cc_test_suite(proxima_be_server ${CC_TARGET}) endforeach () ================================================ FILE: tests/admin/admin_proto_converter_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include #define private public #include "admin/admin_proto_converter.h" #undef private #include #include using namespace std; using namespace testing; namespace proxima { namespace be { namespace admin { namespace test { proto::CollectionConfig GetTestCollectionConfig() { proto::CollectionConfig config; config.set_collection_name("collection"); config.set_max_docs_per_segment(1000); config.add_forward_column_names("f1"); config.add_forward_column_names("f2"); config.add_forward_column_names("f3"); auto *index = config.add_index_column_params(); index->set_dimension(32); index->set_column_name("index1"); index->set_data_type(proto::DT_VECTOR_FP16); return config; } proto::CollectionConfig GetTestCollectionConfigWithDbRepository() { auto config = GetTestCollectionConfig(); auto *repo = config.mutable_repository_config(); repo->set_repository_name("test_repo"); repo->set_repository_type( proto::CollectionConfig_RepositoryConfig_RepositoryType_RT_DATABASE); auto *db = repo->mutable_database(); db->set_password("password"); db->set_user("user"); db->set_connection_uri("url"); db->set_table_name("table"); return config; } TEST(AdminProtoConverterTest, PBToCollectionBase) { auto config = GetTestCollectionConfig(); meta::CollectionBase c; ASSERT_EQ(AdminProtoConverter::PBToCollectionBase(config, &c), 0); EXPECT_EQ(c.name(), "collection"); EXPECT_EQ(c.max_docs_per_segment(), 1000); EXPECT_THAT(c.forward_columns(), testing::ContainerEq(vector{"f1", "f2", "f3"})); EXPECT_FALSE(c.repository()); auto &index_columns = c.index_columns(); EXPECT_EQ(index_columns.size(), 1U); auto &index = index_columns[0]; EXPECT_EQ(index->name(), "index1"); EXPECT_EQ(index->dimension(), 32); EXPECT_EQ(index->data_type(), DataTypes::VECTOR_FP16); }; TEST(AdminProtoConverterTest, PBToCollectionBaseWithRepository) { auto config = GetTestCollectionConfigWithDbRepository(); meta::CollectionBase c; ASSERT_EQ(AdminProtoConverter::PBToCollectionBase(config, &c), 0); EXPECT_EQ(c.name(), "collection"); EXPECT_EQ(c.max_docs_per_segment(), 1000); EXPECT_THAT(c.forward_columns(), testing::ContainerEq(vector{"f1", "f2", "f3"})); auto &index_columns = c.index_columns(); EXPECT_EQ(index_columns.size(), 1U); auto &index = index_columns[0]; EXPECT_EQ(index->name(), "index1"); EXPECT_EQ(index->dimension(), 32); EXPECT_EQ(index->data_type(), DataTypes::VECTOR_FP16); EXPECT_TRUE(c.repository()); auto db_repo = dynamic_pointer_cast(c.repository()); EXPECT_TRUE(db_repo); EXPECT_EQ(db_repo->password(), "password"); EXPECT_EQ(db_repo->user(), "user"); EXPECT_EQ(db_repo->table_name(), "table"); EXPECT_EQ(db_repo->connection(), "url"); EXPECT_EQ(db_repo->name(), "test_repo"); EXPECT_EQ(c.repository()->type(), meta::RepositoryTypes::DATABASE); }; TEST(AdminProtoConverterTest, CollectionMetaToPB) { auto config = GetTestCollectionConfig(); meta::CollectionBase c; ASSERT_EQ(AdminProtoConverter::PBToCollectionBase(config, &c), 0); meta::CollectionMeta meta(c); meta.set_status(meta::CollectionStatus::SERVING); proto::CollectionInfo info; AdminProtoConverter::CollectionMetaToPB(meta, &info); EXPECT_EQ(info.status(), proto::CollectionInfo_CollectionStatus_CS_SERVING); auto &conf = info.config(); EXPECT_EQ(conf.max_docs_per_segment(), 1000); EXPECT_EQ(conf.forward_column_names_size(), 3); EXPECT_EQ(conf.forward_column_names(0), "f1"); EXPECT_EQ(conf.forward_column_names(1), "f2"); EXPECT_EQ(conf.forward_column_names(2), "f3"); EXPECT_EQ(conf.index_column_params_size(), 1); auto &index = conf.index_column_params(0); EXPECT_EQ(index.dimension(), 32); EXPECT_EQ(index.data_type(), proto::DT_VECTOR_FP16); EXPECT_EQ(index.column_name(), "index1"); EXPECT_EQ(conf.collection_name(), "collection"); EXPECT_FALSE(conf.has_repository_config()); } TEST(AdminProtoConverterTest, CollectionMetaToPBWithRepository) { auto config = GetTestCollectionConfigWithDbRepository(); meta::CollectionBase c; ASSERT_EQ(AdminProtoConverter::PBToCollectionBase(config, &c), 0); meta::CollectionMeta meta(c); meta.set_status(meta::CollectionStatus::SERVING); proto::CollectionInfo info; AdminProtoConverter::CollectionMetaToPB(meta, &info); auto &conf = info.config(); EXPECT_EQ(conf.max_docs_per_segment(), 1000); EXPECT_EQ(conf.forward_column_names_size(), 3); EXPECT_EQ(conf.forward_column_names(0), "f1"); EXPECT_EQ(conf.forward_column_names(1), "f2"); EXPECT_EQ(conf.forward_column_names(2), "f3"); EXPECT_EQ(conf.index_column_params_size(), 1); auto &index = conf.index_column_params(0); EXPECT_EQ(index.dimension(), 32); EXPECT_EQ(index.data_type(), proto::DT_VECTOR_FP16); EXPECT_EQ(index.column_name(), "index1"); EXPECT_EQ(conf.collection_name(), "collection"); EXPECT_TRUE(conf.has_repository_config()); auto &repo_config = conf.repository_config(); EXPECT_EQ(repo_config.repository_name(), "test_repo"); EXPECT_EQ( repo_config.repository_type(), proto::CollectionConfig_RepositoryConfig_RepositoryType_RT_DATABASE); EXPECT_TRUE(repo_config.has_database()); auto &db = repo_config.database(); EXPECT_EQ(db.user(), "user"); EXPECT_EQ(db.password(), "password"); EXPECT_EQ(db.table_name(), "table"); EXPECT_EQ(db.connection_uri(), "url"); } TEST(AdminProtoConverterTest, CollectionStatsToPB) { index::CollectionStats stats; stats.collection_name = "collection"; stats.collection_path = "path"; stats.total_segment_count = 1000; index::SegmentMeta sm; sm.segment_id = 11; sm.max_doc_id = 3000; stats.segment_stats.push_back(index::SegmentStats(sm)); stats.segment_stats.push_back(index::SegmentStats(sm)); proto::CollectionStats pb_stats; AdminProtoConverter::CollectionStatsToPB(stats, &pb_stats); EXPECT_EQ(pb_stats.collection_name(), "collection"); EXPECT_EQ(pb_stats.collection_path(), "path"); EXPECT_EQ(pb_stats.total_segment_count(), 1000); EXPECT_EQ(pb_stats.segment_stats_size(), 2); EXPECT_EQ(pb_stats.segment_stats(0).segment_id(), 11); EXPECT_EQ(pb_stats.segment_stats(0).max_doc_id(), 3000); } } // namespace test } // namespace admin } // namespace be } // namespace proxima ================================================ FILE: tests/agent/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Feb 2021 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) if(APPLE) set(APPLE_FRAMEWORK_LIBS -framework CoreFoundation -framework CoreGraphics -framework CoreData -framework CoreText -framework Security -framework Foundation -Wl,-U,_MallocExtension_ReleaseFreeMemory -Wl,-U,_ProfilerStart -Wl,-U,_ProfilerStop -Wl,-U,_RegisterThriftProtocol ) endif() file(GLOB ALL_TEST_SRCS *_test.cc) foreach (CC_SRCS ${ALL_TEST_SRCS}) get_filename_component(CC_TARGET ${CC_SRCS} NAME_WE) cc_gmock( NAME ${CC_TARGET} STRICT LIBS proxima_be_admin proxima_be_agent proxima_be_query proxima_be_index proxima_be_meta proxima_be_common proxima_be_proto proxima ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} SRCS ${CC_SRCS} INCS .. ../../src LDFLAGS ${APPLE_FRAMEWORK_LIBS} ) set_target_properties(${CC_TARGET} PROPERTIES INSTALL_RPATH ${LIB_PATH}) cc_test_suite(proxima_be_agent ${CC_TARGET}) endforeach () ================================================ FILE: tests/agent/collection_counter_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author hongqing.hu * \date Dec 2020 * \brief */ #include #define private public #define protected public #include "agent/collection_counter.h" #include "agent/index_agent.h" #undef protected #undef private using namespace proxima::be; using namespace proxima::be::agent; class CollectionCounterTest : public testing::Test { protected: // Sets up the test fixture. void SetUp() override {} // Tears down the test fixture. void TearDown() override {} }; TEST_F(CollectionCounterTest, TestGeneral) { CollectionCounterMap map; std::string name("test1"); map.add_counter(name); auto counter = map.get_counter(name); ASSERT_TRUE(counter != nullptr); uint32_t count = 100; counter->add_active_count(count); counter->sub_active_count(count - 1); counter->dec_active_count(); ASSERT_EQ(counter->active_count(), (uint32_t)0); map.remove_counter(name); counter = map.get_counter(name); ASSERT_TRUE(counter == nullptr); } ================================================ FILE: tests/agent/index_agent_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author hongqing.hu * \date Dec 2020 * \brief */ #include #define private public #define protected public #include "agent/index_agent.h" #include "index/file_helper.h" #include "index/mock_index_service.h" // for MockIndexService #include "meta/mock_meta_service.h" // for MockMetaService #include "proto/common.pb.h" #undef protected #undef private using namespace proxima::be; using namespace proxima::be::agent; class IndexAgentTest : public Test { protected: // Sets up the test fixture. void SetUp() override { meta_service_ = std::make_shared(); char cmd_buf[100]; snprintf(cmd_buf, 100, "rm -rf ./agent_friends/"); system(cmd_buf); FillSchema(&proxy_schema_, proxy_request_, true); FillSchema(&direct_schema_, direct_request_, false); collection_path_ = "./" + collection_name_; } // Tears down the test fixture. void TearDown() override { meta_service_.reset(); index::FileHelper::RemoveDirectory(collection_path_); } void FillSchema(meta::CollectionMetaPtr *schema, WriteRequest &request, bool with_repo = true) { *schema = std::make_shared(); auto *forward_columns = (*schema)->mutable_forward_columns(); forward_columns->emplace_back("age"); meta::ColumnMetaPtr column_meta = std::make_shared(); column_meta->set_name("face"); column_meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); column_meta->set_data_type(DataTypes::VECTOR_FP32); column_meta->set_dimension(16); column_meta->mutable_parameters()->set("metric_type", "SquaredEuclidean"); (*schema)->append(column_meta); (*schema)->set_name(collection_name_); if (with_repo) { meta::RepositoryBasePtr repo = std::make_shared(); repo->set_name(collection_name_); (*schema)->set_repository(repo); } request.set_collection_name(collection_name_); index::CollectionDatasetPtr dataset = std::make_shared(0); auto *row_data = dataset->add_row_data(); row_data->primary_key = 123456; row_data->operation_type = OperationTypes::INSERT; if (with_repo) { row_data->lsn_check = true; row_data->lsn = 1; row_data->lsn_context = "binlog:123"; request.set_request_type(WriteRequest::RequestType::PROXY); } else { row_data->lsn_check = false; request.set_request_type(WriteRequest::RequestType::DIRECT); } row_data->column_datas.resize(1); row_data->column_datas[0].column_name = "face"; row_data->column_datas[0].data_type = DataTypes::VECTOR_FP32; row_data->column_datas[0].dimension = 16; std::vector vectors = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; row_data->column_datas[0].data.resize(vectors.size() * sizeof(float)); memcpy((void *)&(row_data->column_datas[0].data[0]), (void *)vectors.data(), vectors.size() * sizeof(float)); proto::GenericValueList forward_list; forward_list.add_values()->set_int32_value(32); forward_list.SerializeToString(&(row_data->forward_data)); request.add_collection_dataset(dataset); } protected: std::string collection_name_{"agent_friends"}; std::string collection_path_{}; meta::CollectionMetaPtr proxy_schema_{}; meta::CollectionMetaPtr direct_schema_{}; WriteRequest proxy_request_{}; WriteRequest direct_request_{}; MockMetaServicePtr meta_service_{nullptr}; MockIndexServicePtr index_service_{nullptr}; }; TEST_F(IndexAgentTest, TestGeneral) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(0)); ret = agent->start(); ASSERT_EQ(ret, 0); meta::CollectionMetaPtr schema = proxy_schema_; // create collection EXPECT_CALL(*meta_service_, get_current_collection(_)) .Times(1) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->create_collection(collection_name_); ASSERT_EQ(ret, 0); // process proxy_request_.set_magic_number(agent->agent_timestamp_); // create collection EXPECT_CALL(*meta_service_, get_current_collection(_)) .Times(2) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->write(proxy_request_); ASSERT_EQ(ret, 0); sleep(1); // get collection stats index::CollectionStats stats; ret = agent->get_collection_stats(collection_name_, &stats); ASSERT_EQ(ret, 0); // is collection suspend EXPECT_CALL(*meta_service_, get_current_collection(_)) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ASSERT_EQ(agent->is_collection_suspend(collection_name_), false); // update collection meta::CollectionMetaPtr new_schema; WriteRequest tmp_request; FillSchema(&new_schema, tmp_request, true); new_schema->set_revision(2); EXPECT_CALL(*meta_service_, get_collection(_, _)) .WillOnce(Invoke([&new_schema](const std::string &, uint32_t revision) -> meta::CollectionMetaPtr { return new_schema; })) .RetiresOnSaturation(); ret = agent->update_collection(collection_name_, 2); ASSERT_EQ(ret, 0); sleep(1); // drop collection ret = agent->drop_collection(collection_name_); ASSERT_EQ(ret, 0); ret = agent->stop(); ASSERT_EQ(ret, 0); ret = agent->cleanup(); ASSERT_EQ(ret, 0); } TEST_F(IndexAgentTest, TestCreateCollectionWithMetaServiceFailed) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(0)); ret = agent->start(); ASSERT_EQ(ret, 0); // create collection EXPECT_CALL(*meta_service_, get_current_collection(_)) .WillOnce(Invoke([](const std::string &) -> meta::CollectionMetaPtr { return nullptr; })) .RetiresOnSaturation(); ret = agent->create_collection(collection_name_); ASSERT_EQ(ret, ErrorCode_InexistentCollection); ret = agent->stop(); ASSERT_EQ(ret, 0); ret = agent->cleanup(); ASSERT_EQ(ret, 0); } TEST_F(IndexAgentTest, TestCreateCollectionWithIndexServiceFailed) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(0)); ret = agent->start(); ASSERT_EQ(ret, 0); index::FileHelper::CreateDirectory(collection_path_); agent->get_service()->index_directory_ = "./"; meta::CollectionMetaPtr schema = std::make_shared(); // create collection EXPECT_CALL(*meta_service_, get_current_collection(_)) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->create_collection(collection_name_); ASSERT_EQ(ret, ErrorCode_DuplicateCollection); ret = agent->stop(); ASSERT_EQ(ret, 0); ret = agent->cleanup(); ASSERT_EQ(ret, 0); } TEST_F(IndexAgentTest, TestUpdateCollectionFailed) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(0)); ret = agent->start(); ASSERT_EQ(ret, 0); // get counter failed ret = agent->update_collection(collection_name_, 100); ASSERT_EQ(ret, ErrorCode_RuntimeError); // create collection meta::CollectionMetaPtr schema = std::make_shared(); // create collection EXPECT_CALL(*meta_service_, get_current_collection(_)) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->create_collection(collection_name_); ASSERT_EQ(ret, 0); // get collection meta failed EXPECT_CALL(*meta_service_, get_collection(_, _)) .WillOnce( Invoke([](const std::string &, uint32_t) -> meta::CollectionMetaPtr { return nullptr; })) .RetiresOnSaturation(); ret = agent->update_collection(collection_name_, 100); ASSERT_EQ(ret, ErrorCode_InexistentCollection); // index service update collection failed meta::CollectionMetaPtr new_schema = std::make_shared(); EXPECT_CALL(*meta_service_, get_collection(_, _)) .WillOnce(Invoke([&new_schema](const std::string &, uint32_t revision) -> meta::CollectionMetaPtr { return new_schema; })) .RetiresOnSaturation(); ret = agent->update_collection(collection_name_, 100); ASSERT_EQ(ret, ErrorCode_MismatchedSchema); ret = agent->stop(); ASSERT_EQ(ret, 0); ret = agent->cleanup(); ASSERT_EQ(ret, 0); } TEST_F(IndexAgentTest, TestDropCollectionFailed) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(0)); ret = agent->start(); ASSERT_EQ(ret, 0); // get counter failed ret = agent->drop_collection(collection_name_); ASSERT_EQ(ret, ErrorCode_InexistentCollection); ret = agent->stop(); ASSERT_EQ(ret, 0); ret = agent->cleanup(); ASSERT_EQ(ret, 0); } TEST_F(IndexAgentTest, TestGetCollectionStatsFailed) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(0)); ret = agent->start(); ASSERT_EQ(ret, 0); // get collection stats index::CollectionStats stats; ret = agent->get_collection_stats(collection_name_, &stats); ASSERT_EQ(ret, ErrorCode_InexistentCollection); ret = agent->stop(); ASSERT_EQ(ret, 0); ret = agent->cleanup(); ASSERT_EQ(ret, 0); } TEST_F(IndexAgentTest, TestIsCollectionSuspendFailed) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(0)); ret = agent->start(); ASSERT_EQ(ret, 0); // is collection suspend meta::CollectionMetaPtr schema; EXPECT_CALL(*meta_service_, get_current_collection(_)) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); bool result = agent->is_collection_suspend(collection_name_); ASSERT_EQ(result, false); ret = agent->stop(); ASSERT_EQ(ret, 0); ret = agent->cleanup(); ASSERT_EQ(ret, 0); } TEST_F(IndexAgentTest, TestInitFailed) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); agent->meta_service_ = nullptr; // meta service nullptr int ret = agent->init(); ASSERT_EQ(ret, ErrorCode_RuntimeError); } TEST_F(IndexAgentTest, TestStartFailed) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); // load index service failed EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(1)); ret = agent->start(); ASSERT_EQ(ret, 1); } TEST_F(IndexAgentTest, TestLoadIndexServiceFailed) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); ret = agent->index_service_->start(); ASSERT_EQ(ret, 0); // get latest collections failed EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(1)); ret = agent->load_index_service(); ASSERT_EQ(ret, 1); meta::CollectionMetaPtr schema = proxy_schema_; EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(Invoke([&schema](meta::CollectionMetaPtrList *schemas) -> int { schemas->emplace_back(schema); return 0; })) .RetiresOnSaturation(); ret = agent->load_index_service(); ASSERT_EQ(ret, ErrorCode_InvalidIndexDataFormat); } TEST_F(IndexAgentTest, TestWriteSuccessWithProxy) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(0)); ret = agent->start(); ASSERT_EQ(ret, 0); meta::CollectionMetaPtr schema = proxy_schema_; // create collection EXPECT_CALL(*meta_service_, get_current_collection(_)) .Times(1) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->create_collection(collection_name_); ASSERT_EQ(ret, 0); // process proxy_request_.set_magic_number(agent->agent_timestamp_); // create collection EXPECT_CALL(*meta_service_, get_current_collection(_)) .Times(2) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->write(proxy_request_); ASSERT_EQ(ret, 0); sleep(1); // drop collection ret = agent->drop_collection(collection_name_); ASSERT_EQ(ret, 0); ret = agent->stop(); ASSERT_EQ(ret, 0); ret = agent->cleanup(); ASSERT_EQ(ret, 0); } TEST_F(IndexAgentTest, TestWriteSuccessWithDirect) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(0)); ret = agent->start(); ASSERT_EQ(ret, 0); meta::CollectionMetaPtr schema = direct_schema_; // create collection EXPECT_CALL(*meta_service_, get_current_collection(_)) .Times(1) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->create_collection(collection_name_); ASSERT_EQ(ret, 0); // process EXPECT_CALL(*meta_service_, get_current_collection(_)) .Times(2) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->write(direct_request_); ASSERT_EQ(ret, 0); sleep(1); // drop collection ret = agent->drop_collection(collection_name_); ASSERT_EQ(ret, 0); ret = agent->stop(); ASSERT_EQ(ret, 0); ret = agent->cleanup(); ASSERT_EQ(ret, 0); } TEST_F(IndexAgentTest, TestWriteSuccessWithDirectRepeatedWrite) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(0)); ret = agent->start(); ASSERT_EQ(ret, 0); meta::CollectionMetaPtr schema = direct_schema_; // create collection EXPECT_CALL(*meta_service_, get_current_collection(_)) .Times(1) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->create_collection(collection_name_); ASSERT_EQ(ret, 0); // process EXPECT_CALL(*meta_service_, get_current_collection(_)) .Times(2) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->write(direct_request_); ASSERT_EQ(ret, 0); sleep(1); // process EXPECT_CALL(*meta_service_, get_current_collection(_)) .Times(2) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->write(direct_request_); ASSERT_EQ(ret, ErrorCode_DuplicateKey); sleep(1); // drop collection ret = agent->drop_collection(collection_name_); ASSERT_EQ(ret, 0); ret = agent->stop(); ASSERT_EQ(ret, 0); ret = agent->cleanup(); ASSERT_EQ(ret, 0); } TEST_F(IndexAgentTest, TestWriteWithEmptyRequest) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(0)); ret = agent->start(); ASSERT_EQ(ret, 0); WriteRequest request; ret = agent->write(request); ASSERT_EQ(ret, 0); } TEST_F(IndexAgentTest, TestWriteFailedWithCollectionSuspend) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(0)); ret = agent->start(); ASSERT_EQ(ret, 0); meta::CollectionMetaPtr schema = proxy_schema_; // create collection EXPECT_CALL(*meta_service_, get_current_collection(_)) .Times(1) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->create_collection(collection_name_); ASSERT_EQ(ret, 0); // process proxy_request_.set_magic_number(agent->agent_timestamp_); schema->set_writable(false); // create collection EXPECT_CALL(*meta_service_, get_current_collection(_)) .Times(1) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->write(proxy_request_); ASSERT_EQ(ret, ErrorCode_SuspendedCollection); // drop collection ret = agent->drop_collection(collection_name_); ASSERT_EQ(ret, 0); ret = agent->stop(); ASSERT_EQ(ret, 0); ret = agent->cleanup(); ASSERT_EQ(ret, 0); } TEST_F(IndexAgentTest, TestWriteFailedWithMagicNumber) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(0)); ret = agent->start(); ASSERT_EQ(ret, 0); meta::CollectionMetaPtr schema = proxy_schema_; // create collection EXPECT_CALL(*meta_service_, get_current_collection(_)) .Times(1) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->create_collection(collection_name_); ASSERT_EQ(ret, 0); // process EXPECT_CALL(*meta_service_, get_current_collection(_)) .Times(1) .WillOnce( Invoke([&schema](const std::string &) -> meta::CollectionMetaPtr { return schema; })) .RetiresOnSaturation(); ret = agent->write(proxy_request_); ASSERT_EQ(ret, ErrorCode_MismatchedMagicNumber); sleep(1); // drop collection ret = agent->drop_collection(collection_name_); ASSERT_EQ(ret, 0); ret = agent->stop(); ASSERT_EQ(ret, 0); ret = agent->cleanup(); ASSERT_EQ(ret, 0); } TEST_F(IndexAgentTest, TestWriteDatasetFailed) { IndexAgentPtr agent = IndexAgent::Create(meta_service_); int ret = agent->init(); ASSERT_EQ(ret, 0); // load index service failed EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(testing::Return(0)); ret = agent->start(); ASSERT_EQ(ret, 0); index::CollectionDatasetPtr record = std::make_shared(0); CollectionCounterPtr counter = std::make_shared(); agent->write_dataset("invalid", record, counter.get()); ret = agent->stop(); ASSERT_EQ(ret, 0); ret = agent->cleanup(); ASSERT_EQ(ret, 0); } ================================================ FILE: tests/common/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Feb 2021 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) if(APPLE) set(APPLE_FRAMEWORK_LIBS -framework CoreFoundation -framework CoreGraphics -framework CoreData -framework CoreText -framework Security -framework Foundation -Wl,-U,_MallocExtension_ReleaseFreeMemory -Wl,-U,_ProfilerStart -Wl,-U,_ProfilerStop -Wl,-U,_RegisterThriftProtocol ) endif() cc_proto_library( NAME test_proto STATIC SRCS *.proto PROTOROOT ./ ) file(GLOB ALL_TEST_SRCS *_test.cc) foreach (CC_SRCS ${ALL_TEST_SRCS}) get_filename_component(CC_TARGET ${CC_SRCS} NAME_WE) cc_gmock( NAME ${CC_TARGET} STRICT LIBS proxima_be_common proxima_be_proto test_proto brpc ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} SRCS ${CC_SRCS} INCS .. ../../src LDFLAGS ${APPLE_FRAMEWORK_LIBS} ) set_target_properties(${CC_TARGET} PROPERTIES INSTALL_RPATH ${LIB_PATH}) cc_test_suite(proxima_be_common ${CC_TARGET}) endforeach () ================================================ FILE: tests/common/config_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author haichao.chc * \date Dec 2020 * \brief */ #define private public #define protected public #include "common/config.h" #undef private #undef protected #include #include #include using namespace proxima::be; TEST(ConfigTest, TestGeneral) { auto &config = Config::Instance(); std::string pwd_path; ailego::FileHelper::GetWorkingDirectory(&pwd_path); ASSERT_EQ(config.get_protocol(), "grpc|http"); ASSERT_EQ(config.get_grpc_listen_port(), 16000); ASSERT_EQ(config.get_http_listen_port(), 16001); ASSERT_EQ(config.get_log_dir(), pwd_path + "/log/"); ASSERT_EQ(config.get_log_file(), "proxima_be.log"); ASSERT_EQ(config.get_log_level(), 2); ASSERT_EQ(config.get_logger_type(), "AppendLogger"); ASSERT_EQ(config.get_index_build_thread_count(), 10); ASSERT_EQ(config.get_index_dump_thread_count(), 3); ASSERT_EQ(config.get_index_max_build_qps(), 0); ASSERT_EQ(config.get_index_directory(), pwd_path); ASSERT_EQ(config.get_index_flush_internal(), 300); ASSERT_EQ(config.get_meta_uri(), std::string("sqlite://") .append(pwd_path) .append("/proxima_be_meta.sqlite")); ASSERT_EQ(config.get_query_thread_count(), std::thread::hardware_concurrency()); // check wrong config auto *common_config = config.config_.mutable_common_config(); common_config->set_protocol("h2sofa"); ASSERT_EQ(config.validate_config(), false); common_config->set_protocol("http"); ASSERT_EQ(config.validate_config(), true); common_config->set_protocol("grpc"); ASSERT_EQ(config.validate_config(), true); common_config->set_grpc_listen_port(127433); ASSERT_EQ(config.validate_config(), false); common_config->set_grpc_listen_port(12345); ASSERT_EQ(config.validate_config(), true); common_config->set_grpc_listen_port(0); ASSERT_EQ(config.validate_config(), true); common_config->set_http_listen_port(123456); ASSERT_EQ(config.validate_config(), false); common_config->set_http_listen_port(12345); ASSERT_EQ(config.validate_config(), true); common_config->set_http_listen_port(0); ASSERT_EQ(config.validate_config(), true); common_config->set_logger_type("XXLogger"); ASSERT_EQ(config.validate_config(), false); common_config->set_logger_type("SysLogger"); ASSERT_EQ(config.validate_config(), true); common_config->set_logger_type("ConsoleLogger"); ASSERT_EQ(config.validate_config(), true); auto *index_config = config.config_.mutable_index_config(); index_config->set_build_thread_count(1000); ASSERT_EQ(config.validate_config(), false); index_config->set_build_thread_count(0); ASSERT_EQ(config.validate_config(), true); index_config->set_dump_thread_count(1000); ASSERT_EQ(config.validate_config(), false); index_config->set_dump_thread_count(0); ASSERT_EQ(config.validate_config(), true); auto *query_config = config.config_.mutable_query_config(); query_config->set_query_thread_count(1000); ASSERT_EQ(config.validate_config(), false); query_config->set_query_thread_count(0); ASSERT_EQ(config.validate_config(), true); } ================================================ FILE: tests/common/profiler_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #include "common/profiler.h" #include using namespace proxima::be; TEST(ProfilerTest, TestDisabledProfiler) { Profiler profiler(false); EXPECT_FALSE(profiler.enabled()); profiler.start(); EXPECT_EQ(profiler.open_stage("abc"), 0); EXPECT_EQ(profiler.close_stage(), 0); EXPECT_EQ(profiler.add("abc", 10), 0); profiler.stop(); EXPECT_EQ(profiler.as_json_string(), std::string("{}")); } TEST(ProfilerTest, TestEnabledProfiler) { Profiler profiler(true); EXPECT_TRUE(profiler.enabled()); profiler.start(); EXPECT_EQ(profiler.open_stage("abc"), 0); EXPECT_EQ(profiler.close_stage(), 0); EXPECT_EQ(profiler.add("abc", 10), 0); EXPECT_EQ(profiler.close_stage(), 0); EXPECT_TRUE(profiler.close_stage() != 0); EXPECT_TRUE(profiler.open_stage("def") != 0); profiler.start(); EXPECT_EQ(profiler.open_stage("def"), 0); profiler.stop(); std::string json_str = profiler.as_json_string(); EXPECT_TRUE(json_str.size() != 0); ailego::JsonValue val = ailego::JsonValue(); ailego::JsonValue tmp; EXPECT_TRUE(tmp.parse(json_str)); } ================================================ FILE: tests/common/protobuf_helper_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author jiliang.ljl * \date Feb 2021 * \brief */ #include "common/protobuf_helper.h" #include #include #include #include #include #include #include "proto/proxima_be.pb.h" #include "test.pb.h" namespace proxima { namespace be { using ::proxima::be::proto::test::ProtoTest; proto::CollectionConfig GetMeta(const std::string &name, uint64_t doc_per_segment) { proto::CollectionConfig meta; meta.set_collection_name(name); meta.add_forward_column_names("f1"); meta.add_forward_column_names("f2"); meta.set_max_docs_per_segment(doc_per_segment); auto cm1 = meta.add_index_column_params(); cm1->set_column_name("column1"); auto kv = cm1->add_extra_params(); kv->set_key("k1"); kv->set_value("v1"); kv = cm1->add_extra_params(); kv->set_key("k2"); kv->set_value("v2"); auto cm2 = meta.add_index_column_params(); for (size_t i = 0; i < 10; i++) { kv = cm2->add_extra_params(); kv->set_key("k" + std::to_string(i)); kv->set_value("v" + std::to_string(i)); } return meta; } static int ToJson(const google::protobuf::Message &response, std::string *json) { google::protobuf::util::JsonOptions options; options.add_whitespace = false; options.always_print_primitive_fields = true; options.preserve_proto_field_names = true; google::protobuf::util::Status status = google::protobuf::util::MessageToJsonString(response, json, options); return status.error_code(); } static std::string ToJson(const google::protobuf::Message &response) { std::string json; google::protobuf::util::JsonOptions options; options.add_whitespace = false; options.preserve_proto_field_names = true; google::protobuf::util::MessageToJsonString(response, &json, options); return json; } static bool ToJsonBrpc(const google::protobuf::Message &response, std::string *json) { json2pb::Pb2JsonOptions options; options.enable_protobuf_map = false; options.bytes_to_base64 = true; options.always_print_primitive_fields = true; return json2pb::ProtoMessageToJson(response, json); } static void TestGoogleJsonDeserializeOk( const std::string &json, const google::protobuf::Message &original, google::protobuf::Message *back) { back->Clear(); google::protobuf::util::JsonParseOptions options; // ignore params which can't be automatic parse from json options.ignore_unknown_fields = true; google::protobuf::util::Status status = google::protobuf::util::JsonStringToMessage(json, back, options); ASSERT_TRUE(status.ok()); EXPECT_EQ(original.SerializeAsString(), back->SerializeAsString()); } TEST(ProtobufHelper, Test) { auto meta = GetMeta("test", 100); std::string out; bool ret = ProtobufHelper::MessageToJson(meta, &out); printf("reflection:\n %s\n", out.c_str()); EXPECT_TRUE(ret); std::string out2; ToJson(meta, &out2); printf("google:\n %s\n", out2.c_str()); std::string out3; ToJsonBrpc(meta, &out3); printf("brpc:\n %s\n", out3.c_str()); proto::CollectionConfig meta_back; TestGoogleJsonDeserializeOk(out, meta, &meta_back); } TEST(ProtobufHelper, TestOneof) { auto assert_expect = [](const proto::QueryRequest &req) { proto::QueryRequest back; std::string out; bool ret = ProtobufHelper::MessageToJson(req, &out); EXPECT_TRUE(ret); printf("reflection\n%s\n", out.c_str()); std::string out2; ToJson(req, &out2); printf("google:\n%s\n", out2.c_str()); std::string out3; ToJsonBrpc(req, &out3); printf("brpc:\n%s\n", out2.c_str()); TestGoogleJsonDeserializeOk(out, req, &back); }; // set first one of { proto::QueryRequest req; req.mutable_knn_param()->set_batch_count(10); assert_expect(req); } // set none of one of { proto::QueryRequest req; assert_expect(req); } } TEST(ProtobufHelper, TestOptions) { auto meta = GetMeta("test", 100); ProtobufHelper::PrintOptions options; options.always_print_primitive_fields = false; std::string out; bool ret = ProtobufHelper::MessageToJson(meta, options, &out); printf("reflection:\n %s\n", out.c_str()); EXPECT_TRUE(ret); proto::CollectionConfig meta_back; TestGoogleJsonDeserializeOk(out, meta, &meta_back); } TEST(ProtobufHelper, Benchmark) { std::vector metas; const int COUNT = 10000; std::vector outs1(COUNT); std::vector outs2(COUNT); std::vector outs3(COUNT); for (size_t i = 0; i < COUNT; i++) { metas.push_back(GetMeta("test" + std::to_string(i), i)); } uint64_t time1 = 0; uint64_t time2 = 0; uint64_t time3 = 0; { ailego::ElapsedTime timer; for (size_t i = 0; i < COUNT; i++) { ProtobufHelper::MessageToJson(metas[i], &outs1[i]); } time1 = timer.micro_seconds(); } { ailego::ElapsedTime timer; for (size_t i = 0; i < COUNT; i++) { ToJson(metas[i], &outs2[i]); } time2 = timer.micro_seconds(); } { ailego::ElapsedTime timer; for (size_t i = 0; i < COUNT; i++) { ToJsonBrpc(metas[i], &outs3[i]); } time3 = timer.micro_seconds(); } printf("reflection: %zu\n", (size_t)time1); printf("pb MessageToJsonString: %zu\n", (size_t)time2); printf("brpc: %zu\n", (size_t)time3); } static bool ToMessagePb(const std::string &json, google::protobuf::Message *msg) { google::protobuf::util::JsonParseOptions options; // ignore params which can't be automatic parse from json options.ignore_unknown_fields = true; google::protobuf::util::Status status = google::protobuf::util::JsonStringToMessage(json, msg, options); if (!status.ok()) { fprintf(stderr, "ParseRequestFromJson failed. status[%s] json[%s]\n", status.ToString().c_str(), json.c_str()); return false; } return true; } static bool ToMessageBrpc(const std::string &json, google::protobuf::Message *msg, std::string *error = nullptr) { return json2pb::JsonToProtoMessage(json, msg, error); } const std::string kTestJson = R"foo({"collection_name": "test_collection", "debug_mode": false, "knn_param": {"column_name": "test_column", "topk": 20, "batch_count": 1, "dimension": 480, "data_type": "DT_VECTOR_FP32", "is_linear": false, "matrix": "[b'[0.133300781,0.00359916687,0.0234069824,0.0513000488,0.0621032715,-0.0505065918,-0.0451049805,0,-0.00680160522,-0.0156021118,0.00349998474,0.0130996704,0.029296875,0.049987793,0.0753173828,-0.00400161743,0.00540161133,0.0786132812,0.00680160522,0.0455932617,-0.0396118164,-0.0433044434,0.0462036133,0.0588989258,-0.059387207,-0.0390014648,-0.0272979736,-0.0301055908,-0.047088623,-0.0339050293,0.00230026245,0.0523986816,-0.0598144531,-0.0748901367,-0.0380859375,-0.0624084473,0.0437927246,-0.00949859619,-0.00239944458,0.0272064209,0.0645751953,0.0313110352,0.0160980225,0.0207977295,-0.0252075195,0.0817871094,0.0969238281,0.0265045166,0.0859985352,0.000599861145,0.0362854004,-0.0130004883,-0.0443115234,0.0141983032,0.0555114746,-0.0555114746,0.0339050293,-0.0409851074,0.0327148438,-0.0440979004,0.00540161133,0.0200958252,0.103210449,-0.020401001,-0.00510025024,-0.061706543,0.0307006836,-0.0349121094,-0.000599861145,0.0853881836,-0.0477905273,0.073425293,-0.0137023926,0.0314941406,-0.0231018066,-0.00900268555,0.0349121094,-0.0225067139,0.0314941406,0.0527038574,-0.0141983032,-0.028793335,-0.0278015137,-0.069519043,0.0407104492,-0.000899791718,-0.0437927246,0.0883178711,0.0484008789,-0.0260009766,-0.054107666,-0.00709915161,-0.0142974854,-0.0654296875,0.00869750977,-0.0517883301,-0.0397949219,-0.0310058594,-0.032409668,0.0567016602,-0.0066986084,-0.0494995117,0.0204925537,-0.0290985107,0.0883789062,-0.0252075195,-0.0729980469,-0.0510864258,0.0254058838,-0.0158996582,0.000599861145,0.0349121094,-0.00759887695,-0.07421875,0.0567932129,-0.0294036865,-0.0645751953,-0.0559997559,0.0783081055,0.0150985718,0.00239944458,-0.103271484,0.00859832764,-0.0283050537,-0.00270080566,-0.0481872559,-0.0307006836,0.0314941406,-0.0234985352,-0.00340080261,0.0390014648,-0.0328063965,0.00949859619,-0.0648193359,-0.0361938477,-0.00450134277,0.0342102051,-0.0433044434,-0.0433044434,-0.0066986084,0.0513000488,-0.00479888916,0.0505981445,0.0124969482,0.0114974976,0.0408935547,0.0338134766,0.0060005188,-0.0149002075,-0.0425109863,-0.0577087402,-0.014503479,-0.00789642334,-0.00699996948,0.00450134277,0.0867919922,0.00410079956,0.0016002655,-0.00879669189,0.00680160522,-0.0544128418,-0.0581970215,0.0276031494,0.0227966309,0.065612793,-0.0187072754,0.0914916992,-0.0269927979,0.00469970703,-0.0586853027,0.0902709961,0.0441894531,-0.0775146484,-0.000400066376,-0.0563049316,0.028793335,-0.071472168,-0.0142974854,-0.000500202179,0.025604248,-0.0433044434,0.00340080261,0.0591125488,-0.025894165,0.00550079346,0.0614013672,-0.0830078125,-0.0247955322,-0.0265960693,-0.057800293,-0.0706787109,0.057800293,0,0.00239944458,-0.0440979004,-0.0955200195,0.00910186768,-0.0092010498,-0.0202026367,-0.0521850586,0.0314025879,-0.0827026367,0.0111999512,0.036895752,-0.0178985596,0.0100021362,0.0281066895,-0.000899791718,0.0979003906,0.0249023438,-0.0469970703,0.0270996094,0.0240936279,0.0787963867,-0.0407104492,0.102416992,0.0103988647,0.0853271484,0.0811767578,-0.0189971924,0.00849914551,0.00270080566,-0.0254974365,-0.0772094727,-0.032989502,-0.0157928467,-0.0932006836,-0.0225067139,0.0592041016,0.0186004639,0.0933837891,0.0247955322,-0.00609970093,0.0127029419,0.00390052795,-0.0281066895,-0.0109024048,0.0328063965,0.0599060059,0.0659790039,-0.00569915771,0.0635986328,-0.0444946289,0.0184936523,0.0405883789,0.0136032104,0.00469970703,0.0390014648,-0.033203125,-0.0592956543,-0.0285949707,0,-0.0278930664,0.0396118164,0.0880126953,-0.0234985352,0.0060005188,-0.0104980469,0.0258026123,0.0109024048,-0.0133972168,-0.0243988037,0.00490188599,-0.013999939,0.0393981934,-0.00340080261,-0.0468139648,-0.016998291,0.037902832,0.00370025635,0.0422973633,-0.0339050293,0.0180969238,-0.0104980469,0.0187072754,-0.00770187378,0.0180053711,-0.0374145508,-0.00469970703,0.0759887695,-0.0480041504,0.0218963623,-0.025100708,0.0728149414,0.114196777,-0.0169067383,-0.0859985352,-0.0249023438,-0.021697998,0.0225982666,0.0761108398,-0.0454101562,0.00930023193,0.0272064209,0.0548095703,0.0574035645,-0.0260925293,0.000899791718,-0.00250053406,-0.00820159912,-0.0200958252,0.0361022949,-0.000500202179,-0.0897827148,-0.0133972168,0.0589904785,-0.00340080261,0.0320129395,0.00419998169,0.0651245117,-0.0419006348,-0.0367126465,-0.00410079956,-0.0634155273,-0.0616149902,-0.0132980347,0.00939941406,0.053314209,-0.10748291,0.0354003906,-0.0207061768,0.00680160522,0.0411071777,0.114990234,-0.0321044922,0.00109958649,0.037902832,-0.00429916382,-0.016494751,-0.0108032227,0.00559997559,0.0827026367,0.0563049316,-0.0254974365,-0.0582885742,0.0534057617,-0.013999939,-0.0797729492,-0.00619888306,-0.0375976562,0.0585021973,-0.106506348,0.0274047852,-0.0364990234,0.0473937988,0.0892944336,0.00500106812,-0.0178070068,0.0320129395,-0.0477905273,0.0679931641,-0.0544128418,0.0502929688,0.0175018311,-0.029800415,0.0220947266,0.00239944458,0.00289916992,0.0737915039,0.0991210938,-0.0318908691,-0.0182952881,0.0184936523,0.0252075195,-0.00309944153,-0.0157012939,0.0321960449,-0.0234069824,-0.0281066895,0.0502929688,-0.00289916992,0.0476989746,0.0404968262,-0.102905273,-0.0100021362,0.0318908691,0.0715942383,-0.0822753906,-0.0108032227,-0.0659790039,0.0074005127,-0.0245056152,0.0640258789,-0.0114974976,-0.0634155273,-0.0412902832,-0.0328979492,0.0102996826,-0.100585938,-0.00939941406,-0.0294952393,-0.00890350342,-0.00419998169,-0.0301055908,-0.0204925537,0.00200080872,-0.0581970215,0.000800132751,-0.0213928223,-0.0606994629,-0.0736083984,-0.0296936035,-0.0488891602,-0.0382995605,0.044708252,0.0184936523,0.0013999939,0.0173950195,-0.0173034668,0.102478027,0.0614929199,-0.0231018066,-0.00439834595,-0.0139007568,-0.0466918945,0.0315856934,0.0805053711,-0.0222015381,-0.0132980347,0.100524902,-0.0131988525,-0.0988769531,-0.0541992188,0.016204834,0.0130996704,0.0234985352,0.0361022949,-0.033996582,-0.0130004883,-0.0498046875,-0.00550079346,0.0676879883,0.0392150879,0.0117034912,-0.0112991333,-0.0610961914,0.0325927734,-0.00510025024,-0.0770263672,0.0419006348,-0.00579833984,-0.0437927246,-0.0254058838,-0.0585021973,-0.00579833984,0.0662231445,-0.0444030762,0.0236968994,-0.0618896484,-0.0260009766,-0.00250053406,-0.0736083984,-0.0111999512,0.0491943359,0.0656738281,0.078918457,0.094909668,0.0600891113,0.0430908203,0.0155029297,0.0548095703,0.0726928711,0.00129985809,-0.0480957031,-0.0167999268,0.0313110352,0.0452880859,0.0169067383,-0.0115966797,-0.00390052795,0.0930175781,-0.00949859619,0.0357971191,0.0354919434,-0.00289916992,0.0645141602,0.119995117,0.0452880859,0.0265960693,-0.0698242188]']"}})foo"; const std::string kCamelcaseJson = R"foo({"collectionName": "test_collection", "debugMode": false, "knn_param": {"column_name": "test_column", "topk": 20, "batch_count": 1, "dimension": 480, "data_type": "DT_VECTOR_FP32", "is_linear": false, "matrix": "[b'[0.133300781,0.00359916687,0.0234069824,0.0513000488,0.0621032715,-0.0505065918,-0.0451049805,0,-0.00680160522,-0.0156021118,0.00349998474,0.0130996704,0.029296875,0.049987793,0.0753173828,-0.00400161743,0.00540161133,0.0786132812,0.00680160522,0.0455932617,-0.0396118164,-0.0433044434,0.0462036133,0.0588989258,-0.059387207,-0.0390014648,-0.0272979736,-0.0301055908,-0.047088623,-0.0339050293,0.00230026245,0.0523986816,-0.0598144531,-0.0748901367,-0.0380859375,-0.0624084473,0.0437927246,-0.00949859619,-0.00239944458,0.0272064209,0.0645751953,0.0313110352,0.0160980225,0.0207977295,-0.0252075195,0.0817871094,0.0969238281,0.0265045166,0.0859985352,0.000599861145,0.0362854004,-0.0130004883,-0.0443115234,0.0141983032,0.0555114746,-0.0555114746,0.0339050293,-0.0409851074,0.0327148438,-0.0440979004,0.00540161133,0.0200958252,0.103210449,-0.020401001,-0.00510025024,-0.061706543,0.0307006836,-0.0349121094,-0.000599861145,0.0853881836,-0.0477905273,0.073425293,-0.0137023926,0.0314941406,-0.0231018066,-0.00900268555,0.0349121094,-0.0225067139,0.0314941406,0.0527038574,-0.0141983032,-0.028793335,-0.0278015137,-0.069519043,0.0407104492,-0.000899791718,-0.0437927246,0.0883178711,0.0484008789,-0.0260009766,-0.054107666,-0.00709915161,-0.0142974854,-0.0654296875,0.00869750977,-0.0517883301,-0.0397949219,-0.0310058594,-0.032409668,0.0567016602,-0.0066986084,-0.0494995117,0.0204925537,-0.0290985107,0.0883789062,-0.0252075195,-0.0729980469,-0.0510864258,0.0254058838,-0.0158996582,0.000599861145,0.0349121094,-0.00759887695,-0.07421875,0.0567932129,-0.0294036865,-0.0645751953,-0.0559997559,0.0783081055,0.0150985718,0.00239944458,-0.103271484,0.00859832764,-0.0283050537,-0.00270080566,-0.0481872559,-0.0307006836,0.0314941406,-0.0234985352,-0.00340080261,0.0390014648,-0.0328063965,0.00949859619,-0.0648193359,-0.0361938477,-0.00450134277,0.0342102051,-0.0433044434,-0.0433044434,-0.0066986084,0.0513000488,-0.00479888916,0.0505981445,0.0124969482,0.0114974976,0.0408935547,0.0338134766,0.0060005188,-0.0149002075,-0.0425109863,-0.0577087402,-0.014503479,-0.00789642334,-0.00699996948,0.00450134277,0.0867919922,0.00410079956,0.0016002655,-0.00879669189,0.00680160522,-0.0544128418,-0.0581970215,0.0276031494,0.0227966309,0.065612793,-0.0187072754,0.0914916992,-0.0269927979,0.00469970703,-0.0586853027,0.0902709961,0.0441894531,-0.0775146484,-0.000400066376,-0.0563049316,0.028793335,-0.071472168,-0.0142974854,-0.000500202179,0.025604248,-0.0433044434,0.00340080261,0.0591125488,-0.025894165,0.00550079346,0.0614013672,-0.0830078125,-0.0247955322,-0.0265960693,-0.057800293,-0.0706787109,0.057800293,0,0.00239944458,-0.0440979004,-0.0955200195,0.00910186768,-0.0092010498,-0.0202026367,-0.0521850586,0.0314025879,-0.0827026367,0.0111999512,0.036895752,-0.0178985596,0.0100021362,0.0281066895,-0.000899791718,0.0979003906,0.0249023438,-0.0469970703,0.0270996094,0.0240936279,0.0787963867,-0.0407104492,0.102416992,0.0103988647,0.0853271484,0.0811767578,-0.0189971924,0.00849914551,0.00270080566,-0.0254974365,-0.0772094727,-0.032989502,-0.0157928467,-0.0932006836,-0.0225067139,0.0592041016,0.0186004639,0.0933837891,0.0247955322,-0.00609970093,0.0127029419,0.00390052795,-0.0281066895,-0.0109024048,0.0328063965,0.0599060059,0.0659790039,-0.00569915771,0.0635986328,-0.0444946289,0.0184936523,0.0405883789,0.0136032104,0.00469970703,0.0390014648,-0.033203125,-0.0592956543,-0.0285949707,0,-0.0278930664,0.0396118164,0.0880126953,-0.0234985352,0.0060005188,-0.0104980469,0.0258026123,0.0109024048,-0.0133972168,-0.0243988037,0.00490188599,-0.013999939,0.0393981934,-0.00340080261,-0.0468139648,-0.016998291,0.037902832,0.00370025635,0.0422973633,-0.0339050293,0.0180969238,-0.0104980469,0.0187072754,-0.00770187378,0.0180053711,-0.0374145508,-0.00469970703,0.0759887695,-0.0480041504,0.0218963623,-0.025100708,0.0728149414,0.114196777,-0.0169067383,-0.0859985352,-0.0249023438,-0.021697998,0.0225982666,0.0761108398,-0.0454101562,0.00930023193,0.0272064209,0.0548095703,0.0574035645,-0.0260925293,0.000899791718,-0.00250053406,-0.00820159912,-0.0200958252,0.0361022949,-0.000500202179,-0.0897827148,-0.0133972168,0.0589904785,-0.00340080261,0.0320129395,0.00419998169,0.0651245117,-0.0419006348,-0.0367126465,-0.00410079956,-0.0634155273,-0.0616149902,-0.0132980347,0.00939941406,0.053314209,-0.10748291,0.0354003906,-0.0207061768,0.00680160522,0.0411071777,0.114990234,-0.0321044922,0.00109958649,0.037902832,-0.00429916382,-0.016494751,-0.0108032227,0.00559997559,0.0827026367,0.0563049316,-0.0254974365,-0.0582885742,0.0534057617,-0.013999939,-0.0797729492,-0.00619888306,-0.0375976562,0.0585021973,-0.106506348,0.0274047852,-0.0364990234,0.0473937988,0.0892944336,0.00500106812,-0.0178070068,0.0320129395,-0.0477905273,0.0679931641,-0.0544128418,0.0502929688,0.0175018311,-0.029800415,0.0220947266,0.00239944458,0.00289916992,0.0737915039,0.0991210938,-0.0318908691,-0.0182952881,0.0184936523,0.0252075195,-0.00309944153,-0.0157012939,0.0321960449,-0.0234069824,-0.0281066895,0.0502929688,-0.00289916992,0.0476989746,0.0404968262,-0.102905273,-0.0100021362,0.0318908691,0.0715942383,-0.0822753906,-0.0108032227,-0.0659790039,0.0074005127,-0.0245056152,0.0640258789,-0.0114974976,-0.0634155273,-0.0412902832,-0.0328979492,0.0102996826,-0.100585938,-0.00939941406,-0.0294952393,-0.00890350342,-0.00419998169,-0.0301055908,-0.0204925537,0.00200080872,-0.0581970215,0.000800132751,-0.0213928223,-0.0606994629,-0.0736083984,-0.0296936035,-0.0488891602,-0.0382995605,0.044708252,0.0184936523,0.0013999939,0.0173950195,-0.0173034668,0.102478027,0.0614929199,-0.0231018066,-0.00439834595,-0.0139007568,-0.0466918945,0.0315856934,0.0805053711,-0.0222015381,-0.0132980347,0.100524902,-0.0131988525,-0.0988769531,-0.0541992188,0.016204834,0.0130996704,0.0234985352,0.0361022949,-0.033996582,-0.0130004883,-0.0498046875,-0.00550079346,0.0676879883,0.0392150879,0.0117034912,-0.0112991333,-0.0610961914,0.0325927734,-0.00510025024,-0.0770263672,0.0419006348,-0.00579833984,-0.0437927246,-0.0254058838,-0.0585021973,-0.00579833984,0.0662231445,-0.0444030762,0.0236968994,-0.0618896484,-0.0260009766,-0.00250053406,-0.0736083984,-0.0111999512,0.0491943359,0.0656738281,0.078918457,0.094909668,0.0600891113,0.0430908203,0.0155029297,0.0548095703,0.0726928711,0.00129985809,-0.0480957031,-0.0167999268,0.0313110352,0.0452880859,0.0169067383,-0.0115966797,-0.00390052795,0.0930175781,-0.00949859619,0.0357971191,0.0354919434,-0.00289916992,0.0645141602,0.119995117,0.0452880859,0.0265960693,-0.0698242188]']"}})foo"; TEST(ProtobufHelper, DesJson) { for (auto json : {kTestJson, kCamelcaseJson}) { proxima::be::proto::QueryRequest pb_req; EXPECT_TRUE(ToMessagePb(kTestJson, &pb_req)); proxima::be::proto::QueryRequest brpc_req; std::string error; EXPECT_TRUE(ToMessageBrpc(kTestJson, &brpc_req, &error)); EXPECT_EQ(error, ""); proxima::be::proto::QueryRequest se_req; EXPECT_TRUE(ProtobufHelper::JsonToMessage(kTestJson, &se_req)); EXPECT_EQ(pb_req.SerializeAsString(), se_req.SerializeAsString()); EXPECT_EQ(pb_req.DebugString(), se_req.DebugString()); // brpc does not support camel case // EXPECT_EQ(pb_req.DebugString(), brpc_req.DebugString()); // EXPECT_EQ(pb_req.SerializeAsString(), brpc_req.SerializeAsString()); } } TEST(ProtobufHelper, DesJsonBench) { const int COUNT = 10000; std::vector pb_reqs(COUNT); std::vector brpc_reqs(COUNT); std::vector se_reqs(COUNT); uint64_t time_pb = 0; uint64_t time_brpc = 0; uint64_t time_se = 0; { ailego::ElapsedTime timer; for (size_t i = 0; i < COUNT; i++) { ToMessagePb(kTestJson, &pb_reqs[i]); } time_pb = timer.micro_seconds(); } { ailego::ElapsedTime timer; for (size_t i = 0; i < COUNT; i++) { ToMessageBrpc(kTestJson, &brpc_reqs[i]); } time_brpc = timer.micro_seconds(); } { ailego::ElapsedTime timer; for (size_t i = 0; i < COUNT; i++) { ProtobufHelper::JsonToMessage(kTestJson, &se_reqs[i]); } time_se = timer.micro_seconds(); } printf("be: %zu\n", (size_t)time_se); printf("pb: %zu\n", (size_t)time_pb); printf("brpc: %zu\n", (size_t)time_brpc); } TEST(ProtobufHelperDesJson, int32) { ProtoTest t; EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"i32":1})", &t)); EXPECT_EQ(t.i32(), 1); EXPECT_TRUE(ProtobufHelper::JsonToMessage( R"({"i32":)" + std::to_string(std::numeric_limits::max()) + "}", &t)); EXPECT_EQ(t.i32(), std::numeric_limits::max()); EXPECT_TRUE(ProtobufHelper::JsonToMessage( R"({"i32":)" + std::to_string(std::numeric_limits::min()) + "}", &t)); EXPECT_EQ(t.i32(), std::numeric_limits::min()); EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"i32":null})", &t)); EXPECT_EQ(t.i32(), 0); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i32":1.0})", &t)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i32":"1"})", &t)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i32":[1]})", &t)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i32":{"k":"v"}})", &t)); } TEST(ProtobufHelperDesJson, uint32) { ProtoTest t; EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"u32":1})", &t)); EXPECT_EQ(t.u32(), 1); EXPECT_TRUE(ProtobufHelper::JsonToMessage( R"({"u32":)" + std::to_string(std::numeric_limits::max()) + "}", &t)); EXPECT_EQ(t.u32(), std::numeric_limits::max()); EXPECT_TRUE(ProtobufHelper::JsonToMessage( R"({"u32":)" + std::to_string(std::numeric_limits::min()) + "}", &t)); EXPECT_EQ(t.u32(), std::numeric_limits::min()); EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"u32":null})", &t)); EXPECT_EQ(t.u32(), 0); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u32":1.0})", &t)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u32":"1"})", &t)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u32":[1]})", &t)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u32":{"k":"v"}})", &t)); } TEST(ProtobufHelperDesJson, int64) { ProtoTest t; EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"i64":1})", &t)); EXPECT_EQ(t.i64(), 1); EXPECT_TRUE(ProtobufHelper::JsonToMessage( R"({"i64":)" + std::to_string(std::numeric_limits::max()) + "}", &t)); EXPECT_EQ(t.i64(), std::numeric_limits::max()); EXPECT_TRUE(ProtobufHelper::JsonToMessage( R"({"i64":)" + std::to_string(std::numeric_limits::min()) + "}", &t)); EXPECT_EQ(t.i64(), std::numeric_limits::min()); EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"i64":null})", &t)); EXPECT_EQ(t.i64(), 0); // test string EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"i64":"1"})", &t)); EXPECT_EQ(t.i64(), 1); EXPECT_TRUE(ProtobufHelper::JsonToMessage( R"({"i64":")" + std::to_string(std::numeric_limits::max()) + "\"}", &t)); EXPECT_EQ(t.i64(), std::numeric_limits::max()); EXPECT_TRUE(ProtobufHelper::JsonToMessage( R"({"i64":")" + std::to_string(std::numeric_limits::min()) + "\"}", &t)); EXPECT_EQ(t.i64(), std::numeric_limits::min()); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i64":1.0})", &t)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i64":[1]})", &t)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i64":{"k":"v"}})", &t)); } TEST(ProtobufHelperDesJson, uint64) { ProtoTest t; EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"u64":1})", &t)); EXPECT_EQ(t.u64(), 1); EXPECT_TRUE(ProtobufHelper::JsonToMessage( R"({"u64":)" + std::to_string(std::numeric_limits::max()) + "}", &t)); EXPECT_EQ(t.u64(), std::numeric_limits::max()); EXPECT_TRUE(ProtobufHelper::JsonToMessage( R"({"u64":)" + std::to_string(std::numeric_limits::min()) + "}", &t)); EXPECT_EQ(t.u64(), std::numeric_limits::min()); EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"u64":null})", &t)); EXPECT_EQ(t.u64(), 0); // test string EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"u64":"1"})", &t)); EXPECT_EQ(t.u64(), 1); EXPECT_TRUE(ProtobufHelper::JsonToMessage( R"({"u64":")" + std::to_string(std::numeric_limits::max()) + "\"}", &t)); EXPECT_EQ(t.u64(), std::numeric_limits::max()); EXPECT_TRUE(ProtobufHelper::JsonToMessage( R"({"u64":")" + std::to_string(std::numeric_limits::min()) + "\"}", &t)); EXPECT_EQ(t.u64(), std::numeric_limits::min()); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u64":1.0})", &t)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u64":[1]})", &t)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u64":{"k":"v"}})", &t)); } static void FloatMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_FLOAT_EQ(d.f32(), s.f32()); } static void FloatNan(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_TRUE(std::isnan(d.f32())); } TEST(ProtobufHelperDesJson, float) { ProtoTest s; FloatMatch(s); s.set_f32(1.0); FloatMatch(s); s.set_f32(std::numeric_limits::max()); FloatMatch(s); s.set_f32(-std::numeric_limits::max()); FloatMatch(s); s.set_f32(std::numeric_limits::min()); FloatMatch(s); s.set_f32(-std::numeric_limits::min()); FloatMatch(s); s.set_f32(std::numeric_limits::infinity()); FloatMatch(s); s.set_f32(-std::numeric_limits::infinity()); FloatMatch(s); s.set_f32(std::numeric_limits::quiet_NaN()); FloatNan(s); s.set_f32(-std::numeric_limits::quiet_NaN()); FloatNan(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f32":"1"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f32":[1]})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f32":{"k":"v"}})", &s)); } static void DoubleMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_FLOAT_EQ(d.f64(), s.f64()); } static void DoubleNan(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_TRUE(std::isnan(d.f64())); } TEST(ProtobufHelperDesJson, double) { ProtoTest s; DoubleMatch(s); s.set_f64(1.0); DoubleMatch(s); s.set_f64(std::numeric_limits::max()); DoubleMatch(s); s.set_f64(-std::numeric_limits::max()); DoubleMatch(s); s.set_f64(std::numeric_limits::min()); DoubleMatch(s); s.set_f64(-std::numeric_limits::min()); DoubleMatch(s); s.set_f64(std::numeric_limits::infinity()); DoubleMatch(s); s.set_f64(-std::numeric_limits::infinity()); DoubleMatch(s); s.set_f64(std::numeric_limits::quiet_NaN()); DoubleNan(s); s.set_f64(-std::numeric_limits::quiet_NaN()); DoubleNan(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f64":"1"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f64":[1]})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f64":{"k":"v"}})", &s)); } static void BoolMatch(const ProtoTest &s) { ProtoTest d; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.b(), s.b()); } TEST(ProtobufHelperDesJson, bool) { ProtoTest s; BoolMatch(s); s.set_b(true); BoolMatch(s); s.set_b(false); BoolMatch(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"b":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"b":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"b":"1"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"b":[1]})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"b":{"k":"v"}})", &s)); } static void EnumMatch(const ProtoTest &s) { ProtoTest d; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.e(), s.e()); } TEST(ProtobufHelperDesJson, enum) { ProtoTest s; EnumMatch(s); s.set_e(proto::test::ProtoTest_Enum_MON); EnumMatch(s); EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"e":1})", &s)); EXPECT_EQ(s.e(), proto::test::ProtoTest_Enum_TUE); EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"e":"TUE"})", &s)); EXPECT_EQ(s.e(), proto::test::ProtoTest_Enum_TUE); // invalid value EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"e":10000})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"e":"Invalid"})", &s)); // invalid type EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"e":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"e":"1"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"e":[1]})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"e":{"k":"v"}})", &s)); } static void MessageMatch(const ProtoTest &s) { ProtoTest d; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.nest().i32(), s.nest().i32()); EXPECT_EQ(d.nest().u32(), s.nest().u32()); } TEST(ProtobufHelperDesJson, Message) { ProtoTest s; MessageMatch(s); s.mutable_nest()->set_i32(42); MessageMatch(s); s.mutable_nest()->set_i32(42); s.mutable_nest()->set_u32(2); MessageMatch(s); s.mutable_nest()->set_i32(std::numeric_limits::max()); s.mutable_nest()->set_u32(std::numeric_limits::min()); MessageMatch(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"nest":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"nest":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"nest":"1"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"nest":[1]})", &s)); } static void StringMatch(const ProtoTest &s) { ProtoTest d; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.str(), s.str()); } TEST(ProtobufHelperDesJson, string) { ProtoTest s; StringMatch(s); s.set_str("42"); StringMatch(s); s.set_str("long long long long long long long long long long long long ago"); StringMatch(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"str":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"str":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"str":[1]})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"str":{"k":"v"}})", &s)); } static void BinaryMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.binary(), s.binary()); } TEST(ProtobufHelperDesJson, binary) { ProtoTest s; BinaryMatch(s); s.set_binary("42"); BinaryMatch(s); s.set_binary( "long long long long long long long long long long long long ago"); BinaryMatch(s); float v = 42.0; s.set_binary(reinterpret_cast(&v), sizeof(v)); BinaryMatch(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"binary":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"binary":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"binary":[1]})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"binary":{"k":"v"}})", &s)); } static void Int32ArrayMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.i32s_size(), s.i32s_size()); for (int i = 0; i < d.i32s_size(); i++) { EXPECT_EQ(d.i32s(i), s.i32s(i)); } } TEST(ProtobufHelperDesJson, Int32Array) { ProtoTest s; Int32ArrayMatch(s); s.add_i32s(42); Int32ArrayMatch(s); s.add_i32s(std::numeric_limits::max()); Int32ArrayMatch(s); s.add_i32s(std::numeric_limits::min()); Int32ArrayMatch(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i32s":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i32s":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i32s":"string"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i32s":["string"}])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i32s":[1,2,3.0])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i32s":{"k":"v"}})", &s)); } static void Uint32ArrayMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.u32s_size(), s.u32s_size()); for (int i = 0; i < d.u32s_size(); i++) { EXPECT_EQ(d.u32s(i), s.u32s(i)); } } TEST(ProtobufHelperDesJson, Uint32Array) { ProtoTest s; Uint32ArrayMatch(s); s.add_u32s(42); Uint32ArrayMatch(s); s.add_u32s(std::numeric_limits::max()); Uint32ArrayMatch(s); s.add_u32s(std::numeric_limits::min()); Uint32ArrayMatch(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u32s":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u32s":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u32s":"string"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u32s":["string"}])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u32s":[1,2,3.0])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u32s":{"k":"v"}})", &s)); } static void Int64ArrayMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.i64s_size(), s.i64s_size()); for (int i = 0; i < d.i64s_size(); i++) { EXPECT_EQ(d.i64s(i), s.i64s(i)); } } TEST(ProtobufHelperDesJson, Int64Array) { ProtoTest s; Int64ArrayMatch(s); s.add_i64s(42); Int64ArrayMatch(s); s.add_i64s(std::numeric_limits::max()); Int64ArrayMatch(s); s.add_i64s(std::numeric_limits::min()); Int64ArrayMatch(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i64s":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i64s":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i64s":"string"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i64s":["string"}])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i64s":[1,2,3.0])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"i64s":{"k":"v"}})", &s)); } static void Uint64ArrayMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.u64s_size(), s.u64s_size()); for (int i = 0; i < d.u64s_size(); i++) { EXPECT_EQ(d.u64s(i), s.u64s(i)); } } TEST(ProtobufHelperDesJson, Uint64Array) { ProtoTest s; Uint64ArrayMatch(s); s.add_u64s(42); Uint64ArrayMatch(s); s.add_u64s(std::numeric_limits::max()); Uint64ArrayMatch(s); s.add_u64s(std::numeric_limits::min()); Uint64ArrayMatch(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u64s":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u64s":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u64s":"string"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u64s":["string"}])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u64s":[1,2,3.0])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"u64s":{"k":"v"}})", &s)); } static void FloatArrayMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.f32s_size(), s.f32s_size()); for (int i = 0; i < d.f32s_size(); i++) { EXPECT_THAT(d.f32s(i), testing::NanSensitiveFloatEq(s.f32s(i))); } } TEST(ProtobufHelperDesJson, FloatArray) { ProtoTest s; FloatArrayMatch(s); s.add_f32s(42); FloatArrayMatch(s); s.add_f32s(std::numeric_limits::max()); FloatArrayMatch(s); s.add_f32s(-std::numeric_limits::max()); FloatArrayMatch(s); s.add_f32s(std::numeric_limits::min()); FloatArrayMatch(s); s.add_f32s(-std::numeric_limits::min()); FloatArrayMatch(s); s.add_f32s(std::numeric_limits::infinity()); FloatArrayMatch(s); s.add_f32s(-std::numeric_limits::infinity()); FloatArrayMatch(s); s.add_f32s(std::numeric_limits::quiet_NaN()); FloatArrayMatch(s); s.add_f32s(-std::numeric_limits::quiet_NaN()); FloatArrayMatch(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f32s":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f32s":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f32s":"string"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f32s":["string"}])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f32s":[1,2,[]])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f32s":{"k":"v"}})", &s)); } static void DoubleArrayMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.f64s_size(), s.f64s_size()); for (int i = 0; i < d.f64s_size(); i++) { EXPECT_THAT(d.f64s(i), testing::NanSensitiveDoubleEq(s.f64s(i))); } } TEST(ProtobufHelperDesJson, DoubleArray) { ProtoTest s; DoubleArrayMatch(s); s.add_f64s(42); DoubleArrayMatch(s); s.add_f64s(std::numeric_limits::max()); DoubleArrayMatch(s); s.add_f64s(-std::numeric_limits::max()); DoubleArrayMatch(s); s.add_f64s(std::numeric_limits::min()); DoubleArrayMatch(s); s.add_f64s(-std::numeric_limits::min()); DoubleArrayMatch(s); s.add_f64s(std::numeric_limits::infinity()); DoubleArrayMatch(s); s.add_f64s(-std::numeric_limits::infinity()); DoubleArrayMatch(s); s.add_f64s(std::numeric_limits::quiet_NaN()); DoubleArrayMatch(s); s.add_f64s(-std::numeric_limits::quiet_NaN()); DoubleArrayMatch(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f64s":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f64s":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f64s":"string"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f64s":["string"}])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f64s":[1,2,[]])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"f64s":{"k":"v"}})", &s)); } static void BoolArrayMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.bs_size(), s.bs_size()); for (int i = 0; i < d.bs_size(); i++) { EXPECT_EQ(d.bs(i), s.bs(i)); } } TEST(ProtobufHelperDesJson, BoolArray) { ProtoTest s; BoolArrayMatch(s); s.add_bs(42); BoolArrayMatch(s); s.add_bs(true); BoolArrayMatch(s); s.add_bs(false); BoolArrayMatch(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"bs":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"bs":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"bs":"string"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"bs":["string"}])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"bs":[1,2,3.0])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"bs":{"k":"v"}})", &s)); } static void EnumArrayMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.es_size(), s.es_size()); for (int i = 0; i < d.es_size(); i++) { EXPECT_EQ(d.es(i), s.es(i)); } } TEST(ProtobufHelperDesJson, EnumArray) { ProtoTest s; EnumArrayMatch(s); s.add_es(proto::test::ProtoTest_Enum_TUE); EnumArrayMatch(s); s.add_es(proto::test::ProtoTest_Enum_MON); EnumArrayMatch(s); s.add_es(proto::test::ProtoTest_Enum_SUN); EnumArrayMatch(s); EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"es":["TUE"]})", &s)); EXPECT_EQ(s.es_size(), 1); EXPECT_EQ(s.es(0), proto::test::ProtoTest_Enum_TUE); EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"es":["TUE", "MON"]})", &s)); EXPECT_EQ(s.es_size(), 2); EXPECT_EQ(s.es(0), proto::test::ProtoTest_Enum_TUE); EXPECT_EQ(s.es(1), proto::test::ProtoTest_Enum_MON); EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"es":["TUE", 0]})", &s)); EXPECT_EQ(s.es_size(), 2); EXPECT_EQ(s.es(0), proto::test::ProtoTest_Enum_TUE); EXPECT_EQ(s.es(1), proto::test::ProtoTest_Enum_MON); EXPECT_TRUE(ProtobufHelper::JsonToMessage(R"({"es":[1, 0]})", &s)); EXPECT_EQ(s.es_size(), 2); EXPECT_EQ(s.es(0), proto::test::ProtoTest_Enum_TUE); EXPECT_EQ(s.es(1), proto::test::ProtoTest_Enum_MON); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"es":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"es":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"es":"string"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"es":["string"}])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"es":[1,2,3.0])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"es":{"k":"v"}})", &s)); } static void MessageArrayMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.nests_size(), s.nests_size()); for (int i = 0; i < d.nests_size(); i++) { EXPECT_EQ(d.nests(i).i32(), s.nests(i).i32()); EXPECT_EQ(d.nests(i).u32(), s.nests(i).u32()); } } TEST(ProtobufHelperDesJson, MessageArray) { ProtoTest s; MessageArrayMatch(s); auto *n = s.add_nests(); MessageArrayMatch(s); n = s.add_nests(); n->set_i32(432); n->set_u32(234); MessageArrayMatch(s); n = s.add_nests(); n->set_i32(std::numeric_limits::min()); n->set_u32(std::numeric_limits::max()); MessageArrayMatch(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"nests":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"nests":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"nests":"string"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"nests":["string"}])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"nests":[1,2,3.0])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"nests":{"k":"v"}})", &s)); EXPECT_FALSE( ProtobufHelper::JsonToMessage(R"({"nests":[1, {"k":"v"}]})", &s)); } static void StringArrayMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.strs_size(), s.strs_size()); for (int i = 0; i < d.strs_size(); i++) { EXPECT_EQ(d.strs(i), s.strs(i)); } } TEST(ProtobufHelperDesJson, StringArray) { ProtoTest s; StringArrayMatch(s); s.add_strs("42"); StringArrayMatch(s); s.add_strs("long long long long long long long long long long long long ago"); StringArrayMatch(s); s.add_strs(""); StringArrayMatch(s); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"strs":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"strs":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"strs":"string"})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"strs":["string", 1}])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"strs":[1,2,3.0])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"strs":{"k":"v"}})", &s)); } static void BinaryArrayMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.binarys_size(), s.binarys_size()); for (int i = 0; i < d.binarys_size(); i++) { EXPECT_EQ(d.binarys(i), s.binarys(i)); } } TEST(ProtobufHelperDesJson, BinaryArray) { ProtoTest s; BinaryArrayMatch(s); s.add_binarys("42"); BinaryArrayMatch(s); s.add_binarys( "long long long long long long long long long long long long ago"); BinaryArrayMatch(s); s.add_binarys(""); BinaryArrayMatch(s); float v = 42.0; s.add_binarys(reinterpret_cast(&v), sizeof(v)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"binarys":1})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"binarys":1.0})", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"binarys":"string"})", &s)); EXPECT_FALSE( ProtobufHelper::JsonToMessage(R"({"binarys":["string", 1}])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"binarys":[1,2,3.0])", &s)); EXPECT_FALSE(ProtobufHelper::JsonToMessage(R"({"binarys":{"k":"v"}})", &s)); } static void AllMatch(const ProtoTest &s) { ProtoTest d; std::cout << ToJson(s) << std::endl; EXPECT_TRUE(ProtobufHelper::JsonToMessage(ToJson(s), &d)); EXPECT_EQ(d.SerializeAsString(), s.SerializeAsString()); } TEST(ProtobufHelperDesJson, All) { ProtoTest s; AllMatch(s); s.set_i32(42); AllMatch(s); s.set_u32(42); AllMatch(s); s.set_i64(42); AllMatch(s); s.set_u64(42); AllMatch(s); s.set_b(true); AllMatch(s); s.set_f32(42.0); AllMatch(s); s.set_f64(42.0); AllMatch(s); s.set_e(proto::test::ProtoTest_Enum_TUE); AllMatch(s); s.set_str("42"); AllMatch(s); s.set_binary("42"); AllMatch(s); s.mutable_nest()->set_i32(42); AllMatch(s); s.mutable_nest()->set_u32(42); AllMatch(s); s.add_i32s(42); AllMatch(s); s.add_i32s(42); AllMatch(s); s.add_u32s(42); AllMatch(s); s.add_u32s(42); AllMatch(s); s.add_i64s(42); AllMatch(s); s.add_i64s(42); AllMatch(s); s.add_u64s(42); AllMatch(s); s.add_u64s(42); AllMatch(s); s.add_bs(true); AllMatch(s); s.add_bs(false); AllMatch(s); s.add_f32s(42); AllMatch(s); s.add_f32s(42); AllMatch(s); s.add_f64s(42); AllMatch(s); s.add_f64s(42); AllMatch(s); s.add_es(proto::test::ProtoTest_Enum_TUE); AllMatch(s); s.add_es(proto::test::ProtoTest_Enum_MON); AllMatch(s); s.add_nests()->set_i32(42); AllMatch(s); s.add_nests()->set_u32(42); AllMatch(s); s.add_strs("42"); AllMatch(s); s.add_strs("42"); AllMatch(s); s.add_binarys("42"); AllMatch(s); s.add_binarys( "long long long long long long long long long long long long ago"); AllMatch(s); } TEST(ProtobufHelperDesJson, Options) { ProtoTest s; EXPECT_FALSE( ProtobufHelper::JsonToMessage(R"({"i32":42,"non_exist":[]})", &s)); ProtobufHelper::JsonParseOptions opt; opt.ignore_unknown_fields = true; EXPECT_TRUE( ProtobufHelper::JsonToMessage(R"({"i32":42,"non_exist":[]})", opt, &s)); EXPECT_EQ(s.i32(), 42); } } // namespace be } // namespace proxima ================================================ FILE: tests/common/test.proto ================================================ syntax = "proto3"; package proxima.be.proto.test; message ProtoTest { enum Enum { MON = 0; TUE = 1; SUN = 6; } message Nest { int32 i32 = 1; uint32 u32 = 2; } int32 i32 = 1; uint32 u32 = 2; int64 i64 = 3; uint64 u64 = 4; float f32 = 5; double f64 = 6; bool b = 7; Enum e = 8; Nest nest = 9; string str = 19; bytes binary = 20; repeated int32 i32s = 10; repeated uint32 u32s = 11; repeated int64 i64s = 12; repeated uint64 u64s = 13; repeated float f32s = 14; repeated double f64s = 15; repeated bool bs = 16; repeated Enum es = 17; repeated Nest nests = 18; repeated string strs = 21; repeated bytes binarys = 22; } ================================================ FILE: tests/common/transformer_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Apr 2021 * \brief */ #define private public #include "common/transformer.h" #undef private #include using namespace proxima::be; class TransformerTest : public testing::Test { protected: void SetUp() {} void TearDown() {} }; TEST_F(TransformerTest, TestTransformJsonVector) { size_t dimension = 512; std::ostringstream oss; oss << "["; for (size_t i = 0; i < 512; ++i) { if (i % 2 == 0) oss << (i + 1) / 512.0 << ","; else oss << (i + 1) / (-512.0) << ","; } oss << "]"; std::string index_value = oss.str(); std::string output_value; std::vector vectors; auto ret = Transformer::Transform(index_value, nullptr, &vectors); ASSERT_EQ(ret, dimension); ASSERT_EQ(vectors.size(), dimension); } TEST_F(TransformerTest, TestExpectedSize) { std::ostringstream oss; oss << "["; for (size_t i = 0; i < 512; ++i) { if (i % 2 == 0) oss << (i + 1) / 512.0 << ","; else oss << (i + 1) / (-512.0) << ","; } oss << "]"; std::string index_value = oss.str(); std::string output_value; std::vector vectors; auto ret = Transformer::Transform(index_value, nullptr, &vectors); ASSERT_EQ(ret, 512); ASSERT_EQ(vectors.size(), 512); } TEST_F(TransformerTest, TestInvalidVectorFormat) { std::ostringstream oss; oss << "{\"a\":1}"; std::string index_value = oss.str(); std::string output_value; std::vector vectors; auto ret = Transformer::Transform(index_value, nullptr, &vectors); ASSERT_EQ(ret, PROXIMA_BE_ERROR_CODE(InvalidVectorFormat)); } TEST_F(TransformerTest, TestParseJsonVectorFailedWithInvalidType) { std::ostringstream oss; oss << "["; for (size_t i = 0; i < 512; ++i) { if (i % 2 == 0) oss << (i + 1) / 512.0 << ","; else oss << (i + 1) / (-512.0) << ","; } std::string index_value = oss.str(); std::string output_value; std::vector vectors; auto ret = Transformer::Transform(index_value, nullptr, &vectors); ASSERT_EQ(ret, PROXIMA_BE_ERROR_CODE(InvalidVectorFormat)); } TEST_F(TransformerTest, TestInt82Int4) { std::string index_value("[1,2,3,4,5,6]"); std::string output_value; std::vector values; Transformer::Transform(index_value, nullptr, &values); Primary2Bytes::Bytes(values, &output_value); const uint8_t *data = (const uint8_t *)(&(output_value[0])); for (uint32_t i = 1; i <= 3; ++i) { ASSERT_FLOAT_EQ((int8_t)(2 * i - 1), (int8_t)(data[i - 1] & 0xf)); ASSERT_FLOAT_EQ((uint8_t)(2 * i), (int8_t)(data[i - 1] >> 4)); } } TEST_F(TransformerTest, TestFP32ToFP16) { std::string index_value("[1,2,3,4,5,6]"); uint32_t dimension = 6; std::string output_value; std::vector values; Transformer::Transform(index_value, nullptr, &values); Primary2Bytes::Bytes(values, &output_value); const uint16_t *data = (const uint16_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension; ++i) { ASSERT_FLOAT_EQ(1.0f * i, ailego::FloatHelper::ToFP32(data[i - 1])); } } ================================================ FILE: tests/common/types_helper_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "common/types_helper.h" #include using namespace proxima::be; TEST(DataTypeCodeBookTest, TestGet) { ASSERT_EQ(DataTypeCodeBook::Get(proto::DataType::DT_UNDEFINED), DataTypes::UNDEFINED); ASSERT_EQ(DataTypeCodeBook::Get(proto::DataType::DT_VECTOR_BINARY32), DataTypes::VECTOR_BINARY32); ASSERT_EQ(DataTypeCodeBook::Get(proto::DataType::DT_VECTOR_BINARY64), DataTypes::VECTOR_BINARY64); ASSERT_EQ(DataTypeCodeBook::Get(proto::DataType::DT_VECTOR_FP16), DataTypes::VECTOR_FP16); ASSERT_EQ(DataTypeCodeBook::Get(proto::DataType::DT_VECTOR_FP32), DataTypes::VECTOR_FP32); ASSERT_EQ(DataTypeCodeBook::Get(proto::DataType::DT_VECTOR_FP64), DataTypes::VECTOR_FP64); ASSERT_EQ(DataTypeCodeBook::Get(proto::DataType::DT_VECTOR_INT8), DataTypes::VECTOR_INT8); ASSERT_EQ(DataTypeCodeBook::Get(proto::DataType::DT_VECTOR_INT16), DataTypes::VECTOR_INT16); ASSERT_EQ(DataTypeCodeBook::Get(proto::DataType::DT_VECTOR_INT4), DataTypes::VECTOR_INT4); } TEST(ProtoConverterTest, TestConvertOperationType) { ASSERT_EQ(OperationTypesCodeBook::Get(proto::OP_INSERT), OperationTypes::INSERT); ASSERT_EQ(OperationTypesCodeBook::Get(proto::OP_UPDATE), OperationTypes::UPDATE); ASSERT_EQ(OperationTypesCodeBook::Get(proto::OP_DELETE), OperationTypes::DELETE); } ================================================ FILE: tests/index/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Feb 2021 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) if(APPLE) set(APPLE_FRAMEWORK_LIBS -framework CoreFoundation -framework CoreGraphics -framework CoreData -framework CoreText -framework Security -framework Foundation -Wl,-U,_MallocExtension_ReleaseFreeMemory -Wl,-U,_ProfilerStart -Wl,-U,_ProfilerStop -Wl,-U,_RegisterThriftProtocol ) endif() file(GLOB ALL_TEST_SRCS *_test.cc) foreach (CC_SRCS ${ALL_TEST_SRCS}) get_filename_component(CC_TARGET ${CC_SRCS} NAME_WE) cc_gmock( NAME ${CC_TARGET} STRICT LIBS proxima_be_admin proxima_be_agent proxima_be_query proxima_be_index proxima_be_meta proxima_be_common proxima_be_proto proxima ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} SRCS ${CC_SRCS} INCS .. ../../src ../../src/index/ LDFLAGS ${APPLE_FRAMEWORK_LIBS} ) set_target_properties(${CC_TARGET} PROPERTIES INSTALL_RPATH ${LIB_PATH}) cc_test_suite(proxima_be_index ${CC_TARGET}) endforeach () ================================================ FILE: tests/index/collection_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "index/collection.h" #include using namespace proxima::be; using namespace proxima::be::index; class CollectionTest : public testing::Test { protected: void SetUp() { char cmd_buf[100]; snprintf(cmd_buf, 100, "rm -rf ./teachers/"); system(cmd_buf); FillSchema(); } void TearDown() {} void FillSchema() { schema_ = std::make_shared(); meta::ColumnMetaPtr column_meta = std::make_shared(); column_meta->set_name("face"); column_meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); column_meta->set_data_type(DataTypes::VECTOR_FP32); column_meta->set_dimension(16); column_meta->mutable_parameters()->set("metric_type", "SquaredEuclidean"); schema_->append(column_meta); schema_->set_name("teachers"); schema_->set_revision(0); // Set default value to 0 schema_->set_max_docs_per_segment(0); } protected: meta::CollectionMetaPtr schema_{}; }; TEST_F(CollectionTest, TestGeneral) { index::ThreadPool thread_pool(10, false); CollectionPtr collection = Collection::Create(schema_->name(), "./", schema_, 10, &thread_pool); ASSERT_NE(collection, nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = collection->open(read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 1000; i++) { CollectionDatasetPtr add_records = std::make_shared(1); CollectionDataset::RowData *new_row = add_records->add_row_data(); new_row->primary_key = i; new_row->operation_type = OperationTypes::INSERT; new_row->lsn = i; new_row->forward_data = "hello"; CollectionDataset::ColumnData new_column; new_column.column_name = "face"; new_column.data_type = DataTypes::VECTOR_FP32; new_column.dimension = 16; std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); new_column.data = vector; new_row->column_datas.emplace_back(new_column); ret = collection->write_records(*add_records); ASSERT_EQ(ret, 0); uint64_t lsn; std::string lsn_context; ret = collection->get_latest_lsn(&lsn, &lsn_context); ASSERT_EQ(ret, 0); ASSERT_EQ(lsn, i); } // test search query std::vector segments; ret = collection->get_segments(&segments); ASSERT_EQ(ret, 0); ASSERT_EQ(segments.size(), 1); ASSERT_EQ(segments[0]->collection_name(), "teachers"); ASSERT_EQ(segments[0]->segment_id(), 0); ASSERT_EQ(segments[0]->doc_count(), 1000); for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; query_params.data_type = DataTypes::VECTOR_FP32; query_params.dimension = 16; QueryResultList result_list; ret = segments[0]->knn_search("face", query, query_params, &result_list); ASSERT_EQ(ret, 0); ASSERT_EQ(result_list.size(), 10); ASSERT_EQ(result_list[0].primary_key, i); ASSERT_EQ(result_list[0].score, 0.0f); ASSERT_EQ(result_list[0].lsn, i); } } TEST_F(CollectionTest, TestDumpSegment) { index::ThreadPool thread_pool(10, false); CollectionPtr collection = Collection::Create(schema_->name(), "./", schema_, 10, &thread_pool); ASSERT_NE(collection, nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = collection->open(read_options); ASSERT_EQ(ret, 0); // add segment dump document limit schema_->set_max_docs_per_segment(900); for (size_t i = 0; i < 2000; i++) { CollectionDatasetPtr add_records = std::make_shared(1); CollectionDataset::RowData *new_row = add_records->add_row_data(); new_row->primary_key = i; new_row->operation_type = OperationTypes::INSERT; new_row->lsn = i; new_row->forward_data = "hello"; CollectionDataset::ColumnData new_column; new_column.column_name = "face"; new_column.data_type = DataTypes::VECTOR_FP32; new_column.dimension = 16; std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); new_column.data = vector; new_row->column_datas.emplace_back(new_column); ret = collection->write_records(*add_records); ASSERT_EQ(ret, 0); if (i > 0 && i % 900 == 0) { sleep(2); } } CollectionStats stats; ret = collection->get_stats(&stats); ASSERT_EQ(ret, 0); ASSERT_EQ(stats.total_doc_count, 2000); ASSERT_EQ(stats.delete_doc_count, 0); ASSERT_EQ(stats.total_segment_count, 3); ASSERT_EQ(stats.total_index_file_count, 8); ASSERT_GT(stats.total_index_file_size, 2000U); ASSERT_EQ(stats.segment_stats.size(), 3); ASSERT_EQ(stats.segment_stats[0].segment_id, 0); ASSERT_EQ(stats.segment_stats[0].state, SegmentState::PERSIST); ASSERT_EQ(stats.segment_stats[0].doc_count, 900); ASSERT_EQ(stats.segment_stats[0].min_doc_id, 0); ASSERT_EQ(stats.segment_stats[0].max_doc_id, 899); ASSERT_EQ(stats.segment_stats[0].min_primary_key, 0); ASSERT_EQ(stats.segment_stats[0].max_primary_key, 899); ASSERT_EQ(stats.segment_stats[0].min_lsn, 0); ASSERT_EQ(stats.segment_stats[0].max_lsn, 899); ASSERT_EQ(stats.segment_stats[0].index_file_count, 1); ASSERT_GT(stats.segment_stats[0].index_file_size, 0); ASSERT_EQ(stats.segment_stats[1].segment_id, 1); ASSERT_EQ(stats.segment_stats[1].state, SegmentState::PERSIST); ASSERT_EQ(stats.segment_stats[1].doc_count, 900); ASSERT_EQ(stats.segment_stats[1].min_doc_id, 1899); ASSERT_EQ(stats.segment_stats[1].max_doc_id, 2798); ASSERT_EQ(stats.segment_stats[1].min_primary_key, 900); ASSERT_EQ(stats.segment_stats[1].max_primary_key, 1799); ASSERT_EQ(stats.segment_stats[1].min_lsn, 900); ASSERT_EQ(stats.segment_stats[1].max_lsn, 1799); ASSERT_EQ(stats.segment_stats[1].index_file_count, 1); ASSERT_GT(stats.segment_stats[1].index_file_size, 0); ASSERT_EQ(stats.segment_stats[2].segment_id, 2); ASSERT_EQ(stats.segment_stats[2].state, SegmentState::WRITING); ASSERT_EQ(stats.segment_stats[2].doc_count, 200); ASSERT_EQ(stats.segment_stats[2].min_doc_id, 3798); ASSERT_EQ(stats.segment_stats[2].max_doc_id, 3997); ASSERT_EQ(stats.segment_stats[2].min_primary_key, 1800); ASSERT_EQ(stats.segment_stats[2].max_primary_key, 1999); ASSERT_EQ(stats.segment_stats[2].min_lsn, 1800); ASSERT_EQ(stats.segment_stats[2].max_lsn, 1999); ASSERT_EQ(stats.segment_stats[2].index_file_count, 2); ASSERT_GT(stats.segment_stats[2].index_file_size, 0); std::vector segments; ret = collection->get_segments(&segments); ASSERT_EQ(ret, 0); ASSERT_EQ(segments.size(), 3); for (size_t i = 0; i < 2000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; query_params.data_type = DataTypes::VECTOR_FP32; query_params.dimension = 16; QueryResultList all_result; for (size_t j = 0; j < segments.size(); j++) { QueryResultList result_list; ret = segments[j]->knn_search("face", query, query_params, &result_list); ASSERT_EQ(ret, 0); all_result.insert(all_result.end(), result_list.begin(), result_list.end()); } std::sort(all_result.begin(), all_result.end()); ASSERT_EQ(all_result[0].primary_key, i); ASSERT_EQ(all_result[0].score, 0.0f); ASSERT_EQ(all_result[0].lsn, i); } } TEST_F(CollectionTest, TestDeleteRecord) { index::ThreadPool thread_pool(10, false); CollectionPtr collection = Collection::Create(schema_->name(), "./", schema_, 10, &thread_pool); ASSERT_NE(collection, nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = collection->open(read_options); ASSERT_EQ(ret, 0); // insert 1000 records for (size_t i = 0; i < 1000; i++) { CollectionDatasetPtr add_records = std::make_shared(1); CollectionDataset::RowData *new_row = add_records->add_row_data(); new_row->primary_key = i; new_row->operation_type = OperationTypes::INSERT; new_row->lsn = i; new_row->forward_data = "hello"; CollectionDataset::ColumnData new_column; new_column.column_name = "face"; new_column.data_type = DataTypes::VECTOR_FP32; new_column.dimension = 16; std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); new_column.data = vector; new_row->column_datas.emplace_back(new_column); ret = collection->write_records(*add_records); ASSERT_EQ(ret, 0); } std::vector segments; ret = collection->get_segments(&segments); ASSERT_EQ(ret, 0); ASSERT_EQ(segments.size(), 1); // search front 500 records for (size_t i = 0; i < 500; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; query_params.data_type = DataTypes::VECTOR_FP32; query_params.dimension = 16; QueryResultList result_list; ret = segments[0]->knn_search("face", query, query_params, &result_list); ASSERT_EQ(ret, 0); ASSERT_EQ(result_list[0].primary_key, i); ASSERT_EQ(result_list[0].score, 0.0f); ASSERT_EQ(result_list[0].lsn, i); } // delete front 500 records for (size_t i = 0; i < 500; i++) { CollectionDatasetPtr del_records = std::make_shared(1); CollectionDataset::RowData *new_row = del_records->add_row_data(); new_row->primary_key = i; new_row->operation_type = OperationTypes::DELETE; ret = collection->write_records(*del_records); ASSERT_EQ(ret, 0); } // search front 500 records again for (size_t i = 0; i < 500; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; query_params.data_type = DataTypes::VECTOR_FP32; query_params.dimension = 16; QueryResultList result_list; ret = segments[0]->knn_search("face", query, query_params, &result_list); ASSERT_EQ(ret, 0); ASSERT_NE(result_list[0].primary_key, i); ASSERT_NE(result_list[0].score, 0.0f); ASSERT_NE(result_list[0].lsn, i); } } TEST_F(CollectionTest, TestUpdateRecord) { index::ThreadPool thread_pool(10, false); CollectionPtr collection = Collection::Create(schema_->name(), "./", schema_, 10, &thread_pool); ASSERT_NE(collection, nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = collection->open(read_options); ASSERT_EQ(ret, 0); // insert 1000 records for (size_t i = 0; i < 1000; i++) { CollectionDatasetPtr add_records = std::make_shared(1); CollectionDataset::RowData *new_row = add_records->add_row_data(); new_row->primary_key = i; new_row->operation_type = OperationTypes::INSERT; new_row->lsn = i; new_row->lsn_check = true; new_row->forward_data = "hello"; CollectionDataset::ColumnData new_column; new_column.column_name = "face"; new_column.data_type = DataTypes::VECTOR_FP32; new_column.dimension = 16; std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); new_column.data = vector; new_row->column_datas.emplace_back(new_column); ret = collection->write_records(*add_records); ASSERT_EQ(ret, 0); } uint64_t lsn; std::string lsn_context; ret = collection->get_latest_lsn(&lsn, &lsn_context); ASSERT_EQ(ret, 0); ASSERT_EQ(lsn, 999); // update 1000 wrong records for (size_t i = 0; i < 1000; i++) { CollectionDatasetPtr update_records = std::make_shared(1); CollectionDataset::RowData *new_row = update_records->add_row_data(); new_row->primary_key = i; new_row->operation_type = OperationTypes::UPDATE; new_row->lsn = i; new_row->lsn_check = true; new_row->forward_data = "hello_update"; CollectionDataset::ColumnData new_column; new_column.column_name = "face"; new_column.data_type = DataTypes::VECTOR_FP32; new_column.dimension = 16; std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); new_column.data = vector; new_row->column_datas.emplace_back(new_column); ret = collection->write_records(*update_records); ASSERT_NE(ret, 0); } // update 1000 right records for (size_t i = 0; i < 1000; i++) { CollectionDatasetPtr update_records = std::make_shared(1); CollectionDataset::RowData *new_row = update_records->add_row_data(); new_row->primary_key = i; new_row->operation_type = OperationTypes::UPDATE; new_row->lsn = i + 1; new_row->lsn_check = true; new_row->forward_data = "hello_update"; CollectionDataset::ColumnData new_column; new_column.column_name = "face"; new_column.data_type = DataTypes::VECTOR_FP32; new_column.dimension = 16; std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); new_column.data = vector; new_row->column_datas.emplace_back(new_column); ret = collection->write_records(*update_records); ASSERT_EQ(ret, 0); } ret = collection->get_latest_lsn(&lsn, &lsn_context); ASSERT_EQ(ret, 0); ASSERT_EQ(lsn, 1000); // search 1000 records std::vector segments; ret = collection->get_segments(&segments); ASSERT_EQ(ret, 0); ASSERT_EQ(segments.size(), 1); for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; query_params.data_type = DataTypes::VECTOR_FP32; query_params.dimension = 16; QueryResultList result_list; ret = segments[0]->knn_search("face", query, query_params, &result_list); ASSERT_EQ(ret, 0); ASSERT_EQ(result_list[0].primary_key, i); ASSERT_EQ(result_list[0].score, 0.0f); ASSERT_EQ(result_list[0].lsn, i + 1); ASSERT_EQ(result_list[0].forward_data, "hello_update"); } } void do_insert_record(Collection *collection, size_t number) { CollectionDatasetPtr add_records = std::make_shared(1); CollectionDataset::RowData *new_row = add_records->add_row_data(); new_row->primary_key = number; new_row->operation_type = OperationTypes::INSERT; new_row->lsn = number; new_row->forward_data = "hello"; CollectionDataset::ColumnData new_column; new_column.column_name = "face"; new_column.data_type = DataTypes::VECTOR_FP32; new_column.dimension = 16; std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = number * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); new_column.data = vector; new_row->column_datas.emplace_back(new_column); int ret = collection->write_records(*add_records); ASSERT_EQ(ret, 0); } void do_search_record(Collection *collection, size_t number, bool expect_found) { std::vector segments; int ret = collection->get_segments(&segments); ASSERT_EQ(ret, 0); ASSERT_EQ(segments.size(), 1); std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = number * 1.0f; } std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; query_params.data_type = DataTypes::VECTOR_FP32; query_params.dimension = 16; query_params.query_id = number; QueryResultList result_list; ret = segments[0]->knn_search("face", query, query_params, &result_list); ASSERT_EQ(ret, 0); if (expect_found) { ASSERT_EQ(result_list[0].primary_key, number); ASSERT_EQ(result_list[0].score, 0.0f); ASSERT_EQ(result_list[0].lsn, number); ASSERT_EQ(result_list[0].forward_data, "hello"); } else { ASSERT_NE(result_list[0].primary_key, number); ASSERT_NE(result_list[0].score, 0.0f); } } void do_delete_record(Collection *collection, size_t number) { CollectionDatasetPtr delete_record = std::make_shared(1); CollectionDataset::RowData *new_row = delete_record->add_row_data(); new_row->primary_key = number; new_row->operation_type = OperationTypes::DELETE; new_row->lsn = number + 1; int ret = collection->write_records(*delete_record); ASSERT_EQ(ret, 0); } void do_update_record(Collection *collection, size_t number) { CollectionDatasetPtr add_records = std::make_shared(1); CollectionDataset::RowData *new_row = add_records->add_row_data(); new_row->primary_key = number; new_row->operation_type = OperationTypes::UPDATE; new_row->lsn = number + 1; new_row->forward_data = "hello_update"; CollectionDataset::ColumnData new_column; new_column.column_name = "face"; new_column.data_type = DataTypes::VECTOR_FP32; new_column.dimension = 16; std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = number * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); new_column.data = vector; new_row->column_datas.emplace_back(new_column); int ret = collection->write_records(*add_records); ASSERT_EQ(ret, 0); } void do_hybrid_ops(Collection *collection, size_t number) { do_insert_record(collection, number); do_search_record(collection, number, true); do_delete_record(collection, number); do_search_record(collection, number, false); } TEST_F(CollectionTest, TestMultiThread) { index::ThreadPool thread_pool(10, false); CollectionPtr collection = Collection::Create(schema_->name(), "./", schema_, 10, &thread_pool); ASSERT_NE(collection, nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = collection->open(read_options); ASSERT_EQ(ret, 0); // test multithread insert records auto group = thread_pool.make_group(); for (size_t i = 0; i < 1000; i++) { group->submit(ailego::Closure::New(&do_insert_record, collection.get(), i)); } group->wait_finish(); // test multithread search records for (size_t i = 0; i < 1000; i++) { group->submit( ailego::Closure::New(&do_search_record, collection.get(), i, true)); } group->wait_finish(); // test multithread delete records for (size_t i = 0; i < 500; i++) { group->submit(ailego::Closure::New(&do_delete_record, collection.get(), i)); } group->wait_finish(); // test multithread update records for (size_t i = 500; i < 1000; i++) { group->submit(ailego::Closure::New(&do_update_record, collection.get(), i)); } group->wait_finish(); // test multithread hybrid operations for (size_t i = 1000; i < 2000; i++) { group->submit(ailego::Closure::New(&do_hybrid_ops, collection.get(), i)); } group->wait_finish(); } TEST_F(CollectionTest, TestUpdateSchema) { index::ThreadPool thread_pool(10, false); CollectionPtr collection = Collection::Create(schema_->name(), "./", schema_, 10, &thread_pool); ASSERT_NE(collection, nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = collection->open(read_options); ASSERT_EQ(ret, 0); schema_->set_max_docs_per_segment(900); // create 2 persist segment and 1 memory segment for (size_t i = 0; i < 2000; i++) { CollectionDatasetPtr add_records = std::make_shared(1); CollectionDataset::RowData *new_row = add_records->add_row_data(); new_row->primary_key = i; new_row->operation_type = OperationTypes::INSERT; new_row->lsn = i; new_row->forward_data = "hello"; CollectionDataset::ColumnData new_column; new_column.column_name = "face"; new_column.data_type = DataTypes::VECTOR_FP32; new_column.dimension = 16; std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); new_column.data = vector; new_row->column_datas.emplace_back(new_column); ret = collection->write_records(*add_records); ASSERT_EQ(ret, 0); } sleep(3); auto new_schema = std::make_shared(); meta::ColumnMetaPtr column_meta = std::make_shared(); column_meta->set_name("face1"); column_meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); column_meta->set_data_type(DataTypes::VECTOR_FP32); column_meta->set_dimension(16); column_meta->mutable_parameters()->set("metric_type", "SquaredEuclidean"); new_schema->append(column_meta); new_schema->set_name("teachers"); new_schema->set_revision(0); ret = collection->update_schema(new_schema); ASSERT_NE(ret, 0); new_schema->set_revision(1); ret = collection->update_schema(new_schema); ASSERT_EQ(ret, 0); } ================================================ FILE: tests/index/column_indexer_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "index/column/column_indexer.h" #include #include "index/file_helper.h" using namespace proxima::be; using namespace proxima::be::index; class ColumnIndexerTest : public testing::Test { protected: void SetUp() { FileHelper::RemoveFile("./data.pxa.test_column.0"); } void TearDown() {} }; TEST_F(ColumnIndexerTest, TestGeneral) { auto column_indexer = ColumnIndexer::Create("test_collection", "./", 0, "test_column", IndexTypes::PROXIMA_GRAPH_INDEX); meta::ColumnMeta meta; meta.set_name("test_column"); meta.set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta.set_data_type(DataTypes::VECTOR_FP32); meta.set_dimension(16); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = column_indexer->open(meta, read_options); ASSERT_EQ(ret, 0); // Test insert for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); ColumnData column_data; column_data.column_name = "test_column"; column_data.data_type = DataTypes::VECTOR_FP32; column_data.dimension = 16; column_data.data = vector; ret = column_indexer->insert(i, column_data); ASSERT_EQ(ret, 0); } // Test search for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } IndexDocumentList result_list; std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; ret = column_indexer->search(query, query_params, nullptr, &result_list); ASSERT_EQ(ret, 0); ASSERT_NEAR(result_list[0].score(), 0.0f, 0.1f); ASSERT_EQ(result_list[0].key(), i); } } TEST_F(ColumnIndexerTest, TestQuantizeFP16) { auto column_indexer = ColumnIndexer::Create("test_collection", "./", 0, "test_column", IndexTypes::PROXIMA_GRAPH_INDEX); meta::ColumnMeta meta; meta.set_name("test_column"); meta.set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta.set_data_type(DataTypes::VECTOR_FP32); meta.set_dimension(16); meta.mutable_parameters()->set("quantize_type", "DT_VECTOR_FP16"); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = column_indexer->open(meta, read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); ColumnData column_data; column_data.column_name = "test_column"; column_data.data_type = DataTypes::VECTOR_FP32; column_data.dimension = 16; column_data.data = vector; ret = column_indexer->insert(i, column_data); ASSERT_EQ(ret, 0); } for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } IndexDocumentList result_list; std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; ret = column_indexer->search(query, query_params, nullptr, &result_list); ASSERT_EQ(ret, 0); ASSERT_NEAR(result_list[0].score(), 0.0f, 0.1f); ASSERT_EQ(result_list[0].key(), i); } } TEST_F(ColumnIndexerTest, TestQuantizeINT8) { auto column_indexer = ColumnIndexer::Create("test_collection", "./", 0, "test_column", IndexTypes::PROXIMA_GRAPH_INDEX); meta::ColumnMeta meta; meta.set_name("test_column"); meta.set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta.set_data_type(DataTypes::VECTOR_FP32); meta.set_dimension(16); meta.mutable_parameters()->set("quantize_type", "DT_VECTOR_INT8"); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = column_indexer->open(meta, read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); ColumnData column_data; column_data.column_name = "test_column"; column_data.data_type = DataTypes::VECTOR_FP32; column_data.dimension = 16; column_data.data = vector; ret = column_indexer->insert(i, column_data); ASSERT_EQ(ret, 0); } for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } IndexDocumentList result_list; std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; ret = column_indexer->search(query, query_params, nullptr, &result_list); ASSERT_EQ(ret, 0); ASSERT_NEAR(result_list[0].score(), 0.0f, 0.1f); ASSERT_EQ(result_list[0].key(), i); } } TEST_F(ColumnIndexerTest, TestQuantizeINT8InnerProduct) { auto column_indexer = ColumnIndexer::Create("test_collection_int8_ip", "./", 0, "test_column", IndexTypes::PROXIMA_GRAPH_INDEX); meta::ColumnMeta meta; meta.set_name("test_column"); meta.set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta.set_data_type(DataTypes::VECTOR_FP32); meta.set_dimension(16); meta.mutable_parameters()->set("quantize_type", "DT_VECTOR_INT8"); meta.mutable_parameters()->set("metric_type", "InnerProduct"); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = column_indexer->open(meta, read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i <= 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 0.001f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); ColumnData column_data; column_data.column_name = "test_column"; column_data.data_type = DataTypes::VECTOR_FP32; column_data.dimension = 16; column_data.data = vector; ret = column_indexer->insert(i, column_data); ASSERT_EQ(ret, 0); } std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = 1.0f; } IndexDocumentList result_list; std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; ret = column_indexer->search(query, query_params, nullptr, &result_list); ASSERT_EQ(ret, 0); ASSERT_EQ(1000, result_list[0].key()); ASSERT_NEAR(result_list[0].score(), 16.0f, 0.1f); } TEST_F(ColumnIndexerTest, TestQuantizeINT4) { auto column_indexer = ColumnIndexer::Create("test_collection", "./", 0, "test_column", IndexTypes::PROXIMA_GRAPH_INDEX); meta::ColumnMeta meta; meta.set_name("test_column"); meta.set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta.set_data_type(DataTypes::VECTOR_FP32); meta.set_dimension(16); meta.mutable_parameters()->set("quantize_type", "DT_VECTOR_INT4"); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = column_indexer->open(meta, read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); ColumnData column_data; column_data.column_name = "test_column"; column_data.data_type = DataTypes::VECTOR_FP32; column_data.dimension = 16; column_data.data = vector; ret = column_indexer->insert(i, column_data); ASSERT_EQ(ret, 0); } for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } IndexDocumentList result_list; std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; ret = column_indexer->search(query, query_params, nullptr, &result_list); ASSERT_EQ(ret, 0); ASSERT_NEAR(result_list[0].score(), 0.0f, 0.1f); ASSERT_EQ(result_list[0].key(), i); } } TEST_F(ColumnIndexerTest, TestOswgEngine) { auto column_indexer = ColumnIndexer::Create("test_collection", "./", 0, "test_column", IndexTypes::PROXIMA_GRAPH_INDEX); meta::ColumnMeta meta; meta.set_name("test_column"); meta.set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta.set_data_type(DataTypes::VECTOR_FP32); meta.set_dimension(16); meta.mutable_parameters()->set("engine", "OSWG"); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = column_indexer->open(meta, read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); ColumnData column_data; column_data.column_name = "test_column"; column_data.data_type = DataTypes::VECTOR_FP32; column_data.dimension = 16; column_data.data = vector; ret = column_indexer->insert(i, column_data); ASSERT_EQ(ret, 0); } for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } IndexDocumentList result_list; std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; ret = column_indexer->search(query, query_params, nullptr, &result_list); ASSERT_EQ(ret, 0); ASSERT_NEAR(result_list[0].score(), 0.0f, 0.1f); ASSERT_EQ(result_list[0].key(), i); } for (size_t i = 0; i < 1000; i++) { ret = column_indexer->remove(i); ASSERT_EQ(ret, 0); std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } IndexDocumentList result_list; std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; ret = column_indexer->search(query, query_params, nullptr, &result_list); ASSERT_EQ(ret, 0); if (result_list.size() > 0) { ASSERT_NE(result_list[0].key(), i); } } } ================================================ FILE: tests/index/column_reader_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * File : column_searcher_test.cc * Author: haichao.chc * Date : 2021-01-02 * Brief : Unittest of ColumnSearcher */ #include "index/column/column_reader.h" #include #include #include "index/column/column_indexer.h" using namespace proxima::be; using namespace proxima::be::index; class ColumnReaderTest : public testing::Test { protected: void SetUp() { FileHelper::RemoveFile("./data.pxa.test_column.0"); FileHelper::RemoveFile("data.seg.0"); } void TearDown() {} }; TEST_F(ColumnReaderTest, TestGeneral) { auto column_indexer = ColumnIndexer::Create("test_collection", "./", 0, "test_column", IndexTypes::PROXIMA_GRAPH_INDEX); meta::ColumnMeta meta; meta.set_name("test_column"); meta.set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta.set_data_type(DataTypes::VECTOR_FP32); meta.set_dimension(16); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = column_indexer->open(meta, read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); ColumnData column_data; column_data.column_name = "test_column"; column_data.data_type = DataTypes::VECTOR_FP32; column_data.dimension = 16; column_data.data = vector; ret = column_indexer->insert(i, column_data); ASSERT_EQ(ret, 0); } auto dumper = aitheta2::IndexFactory::CreateDumper("FileDumper"); ASSERT_NE(dumper, nullptr); ret = dumper->create("data.seg.0"); ASSERT_EQ(ret, 0); IndexDumperPtr column_dumper = std::make_shared( dumper, COLUMN_DUMP_BLOCK + "test_column"); ret = column_indexer->dump(column_dumper); ASSERT_EQ(ret, 0); column_dumper->close(); dumper->close(); ret = column_indexer->close(); ASSERT_EQ(ret, 0); auto column_reader = ColumnReader::Create("test_collection", "./", 0, "test_column", IndexTypes::PROXIMA_GRAPH_INDEX); ASSERT_NE(column_reader, nullptr); column_reader->set_concurrency(10); read_options.create_new = false; ret = column_reader->open(meta, read_options); ASSERT_EQ(ret, 0); // knn search for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } IndexDocumentList result_list; std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; ret = column_reader->search(query, query_params, nullptr, &result_list); ASSERT_EQ(ret, 0); ASSERT_EQ(result_list[0].score(), 0.0f); ASSERT_EQ(result_list[0].key(), i); } // linear search for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } IndexDocumentList result_list; std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; query_params.is_linear = true; ret = column_reader->search(query, query_params, nullptr, &result_list); ASSERT_EQ(ret, 0); ASSERT_EQ(result_list[0].score(), 0.0f); ASSERT_EQ(result_list[0].key(), i); } column_reader->close(); } TEST_F(ColumnReaderTest, TestQuantizeINT8InnerProduct) { auto column_indexer = ColumnIndexer::Create("test_collection_int8_ip", "./", 0, "test_column", IndexTypes::PROXIMA_GRAPH_INDEX); meta::ColumnMeta meta; meta.set_name("test_column"); meta.set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta.set_data_type(DataTypes::VECTOR_FP32); meta.set_dimension(16); meta.mutable_parameters()->set("quantize_type", "DT_VECTOR_INT8"); meta.mutable_parameters()->set("metric_type", "InnerProduct"); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = column_indexer->open(meta, read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i <= 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 0.001f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); ColumnData column_data; column_data.column_name = "test_column"; column_data.data_type = DataTypes::VECTOR_FP32; column_data.dimension = 16; column_data.data = vector; ret = column_indexer->insert(i, column_data); ASSERT_EQ(ret, 0); } auto dumper = aitheta2::IndexFactory::CreateDumper("FileDumper"); ASSERT_NE(dumper, nullptr); ret = dumper->create("data.seg.0"); ASSERT_EQ(ret, 0); IndexDumperPtr column_dumper = std::make_shared( dumper, COLUMN_DUMP_BLOCK + "test_column"); ret = column_indexer->dump(column_dumper); ASSERT_EQ(ret, 0); column_dumper->close(); dumper->close(); ret = column_indexer->close(); ASSERT_EQ(ret, 0); auto column_reader = ColumnReader::Create("test_collection", "./", 0, "test_column", IndexTypes::PROXIMA_GRAPH_INDEX); ASSERT_NE(column_reader, nullptr); column_reader->set_concurrency(10); read_options.create_new = false; ret = column_reader->open(meta, read_options); ASSERT_EQ(ret, 0); std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = 1.0f; } IndexDocumentList result_list; std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; ret = column_reader->search(query, query_params, nullptr, &result_list); ASSERT_EQ(ret, 0); LOG_DEBUG("%f", result_list[0].score()); ASSERT_EQ(1000, result_list[0].key()); ASSERT_NEAR(result_list[0].score(), 16.0f, 0.1f); column_reader->close(); } ================================================ FILE: tests/index/delete_store_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "index/delete_store.h" #include using namespace proxima::be; using namespace proxima::be::index; class DeleteStoreTest : public testing::Test { protected: void SetUp() { char cmd_buf[100]; snprintf(cmd_buf, 100, "rm -rf ./data.del"); system(cmd_buf); } void TearDown() {} }; TEST_F(DeleteStoreTest, TestGeneral) { DeleteStorePtr delete_store = DeleteStore::Create("collection_test", "./"); ASSERT_NE(delete_store, nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = delete_store->open(read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 10000; i++) { ASSERT_EQ(delete_store->insert(i), 0); } for (size_t i = 0; i < 10000; i++) { ASSERT_EQ(delete_store->has(i), true); } ASSERT_EQ(delete_store->close(), 0); ret = delete_store->open(read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 10000; i++) { ASSERT_EQ(delete_store->has(i), true); } } ================================================ FILE: tests/index/forward_indexer_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "index/column/forward_indexer.h" #include #include #include #include "index/file_helper.h" using namespace proxima::be; using namespace proxima::be::index; class ForwardIndexerTest : public testing::Test { protected: void SetUp() { FileHelper::RemoveFile("./data.fwd.0"); } void TearDown() {} }; TEST_F(ForwardIndexerTest, TestGeneral) { auto forward_indexer = ForwardIndexer::Create("test_collection", "./", 0); ASSERT_NE(forward_indexer, nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; forward_indexer->set_start_doc_id(0U); int ret = forward_indexer->open(read_options); ASSERT_EQ(ret, 0); // insert 1000 records for (size_t i = 0; i < 1000; i++) { ForwardData forward; forward.header.primary_key = i; forward.header.lsn = i; forward.header.revision = i; forward.data = "hello"; idx_t doc_id = 0U; ret = forward_indexer->insert(forward, &doc_id); ASSERT_EQ(ret, 0); ASSERT_EQ(doc_id, i); } // seek 1000 records for (size_t i = 0; i < 1000; i++) { ForwardData forward; ret = forward_indexer->seek(i, &forward); ASSERT_EQ(ret, 0); ASSERT_EQ(forward.header.primary_key, i); ASSERT_EQ(forward.header.lsn, i); ASSERT_EQ(forward.header.revision, i); ASSERT_EQ(forward.data, "hello"); } ret = forward_indexer->flush(); ASSERT_EQ(ret, 0); ret = forward_indexer->close(); ASSERT_EQ(ret, 0); // test reopen read_options.create_new = false; ret = forward_indexer->open(read_options); ASSERT_EQ(ret, 0); // test seek 1000 records again for (size_t i = 0; i < 1000; i++) { ForwardData forward; ret = forward_indexer->seek(i, &forward); ASSERT_EQ(ret, 0); ASSERT_EQ(forward.header.primary_key, i); ASSERT_EQ(forward.header.lsn, i); ASSERT_EQ(forward.header.revision, i); ASSERT_EQ(forward.data, "hello"); } // Test remove for (size_t i = 0; i < 1000; i++) { ret = forward_indexer->remove(i); ASSERT_EQ(ret, 0); ForwardData forward; ret = forward_indexer->seek(i, &forward); ASSERT_NE(ret, 0); } } std::mutex g_mutex; std::unordered_map g_key_id_map; void do_insert_forward(ForwardIndexer *forward_indexer, size_t number) { ForwardData forward; forward.header.primary_key = number; forward.header.lsn = number; forward.header.revision = number; forward.data = "hello"; idx_t doc_id = 0U; int ret = forward_indexer->insert(forward, &doc_id); ASSERT_EQ(ret, 0); std::lock_guard lock(g_mutex); g_key_id_map[number] = doc_id; } void do_seek_forward(ForwardIndexer *forward_indexer, size_t number) { std::lock_guard lock(g_mutex); ForwardData forward; int ret = forward_indexer->seek(g_key_id_map[number], &forward); ASSERT_EQ(ret, 0); ASSERT_EQ(forward.header.primary_key, number); ASSERT_EQ(forward.header.lsn, number); ASSERT_EQ(forward.header.revision, number); ASSERT_EQ(forward.data, "hello"); } void do_hybrid_operations(ForwardIndexer *forward_indexer, size_t number) { do_insert_forward(forward_indexer, number); do_seek_forward(forward_indexer, number); } TEST_F(ForwardIndexerTest, TestMultiThread) { auto forward_indexer = ForwardIndexer::Create("test_collection", "./", 0); ASSERT_TRUE(forward_indexer != nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; forward_indexer->set_start_doc_id(0U); int ret = forward_indexer->open(read_options); ASSERT_EQ(ret, 0); ailego::ThreadPool pool(3); for (size_t i = 0; i < 2000; i++) { pool.execute(&do_hybrid_operations, forward_indexer.get(), i); } pool.wait_finish(); } ================================================ FILE: tests/index/forward_reader_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "index/column/forward_reader.h" #include #include #include #include "index/column/forward_indexer.h" #include "index/file_helper.h" using namespace proxima::be; using namespace proxima::be::index; class ForwardReaderTest : public testing::Test { protected: void SetUp() { FileHelper::RemoveFile("./data.fwd.0"); FileHelper::RemoveFile("data.seg.0"); } void TearDown() {} }; void do_search(ForwardReader *reader, size_t number) { ForwardData forward; int ret = reader->seek(number, &forward); ASSERT_EQ(ret, 0); ASSERT_EQ(forward.header.primary_key, number); ASSERT_EQ(forward.header.lsn, number); ASSERT_EQ(forward.header.revision, number); ASSERT_EQ(forward.data, "hello"); } TEST_F(ForwardReaderTest, TestGeneral) { auto forward_indexer = ForwardIndexer::Create("test_collection", "./", 0); ASSERT_TRUE(forward_indexer != nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; forward_indexer->set_start_doc_id(0); int ret = forward_indexer->open(read_options); ASSERT_EQ(ret, 0); // insert 1000 records for (size_t i = 0; i < 1000; i++) { ForwardData forward; forward.header.primary_key = i; forward.header.lsn = i; forward.header.revision = i; forward.data = "hello"; idx_t doc_id = 0U; ret = forward_indexer->insert(forward, &doc_id); ASSERT_EQ(ret, 0); ASSERT_EQ(doc_id, i); } auto dumper = aitheta2::IndexFactory::CreateDumper("FileDumper"); ASSERT_NE(dumper, nullptr); ret = dumper->create("data.seg.0"); ASSERT_EQ(ret, 0); IndexDumperPtr fwd_dumper = std::make_shared(dumper, FORWARD_DUMP_BLOCK); ret = forward_indexer->dump(fwd_dumper); ASSERT_EQ(ret, 0); fwd_dumper->close(); dumper->close(); ret = forward_indexer->close(); ASSERT_EQ(ret, 0); auto forward_reader = ForwardReader::Create("test_collection", "./", 0); read_options.create_new = false; ret = forward_reader->open(read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 1000; i++) { ForwardData forward; ret = forward_reader->seek(i, &forward); ASSERT_EQ(ret, 0); ASSERT_EQ(forward.header.primary_key, i); ASSERT_EQ(forward.header.lsn, i); ASSERT_EQ(forward.header.revision, i); ASSERT_EQ(forward.data, "hello"); } ailego::ThreadPool pool(3); for (size_t i = 0; i < 1000; i++) { pool.execute(&do_search, forward_reader.get(), i); } pool.wait_finish(); forward_reader->close(); } ================================================ FILE: tests/index/id_map_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "index/id_map.h" #include using namespace proxima::be; using namespace proxima::be::index; class IDMapTest : public testing::Test { protected: void SetUp() { char cmd_buf[100]; snprintf(cmd_buf, 100, "rm -rf ./data.id"); system(cmd_buf); } void TearDown() {} }; TEST_F(IDMapTest, TestGeneral) { auto id_map = IDMap::Create("collection_test", "./"); ASSERT_NE(id_map, nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = id_map->open(read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 20000; i++) { ret = id_map->insert(i, i); ASSERT_EQ(ret, 0); } for (size_t i = 0; i < 20000; i++) { ASSERT_EQ(id_map->has(i), true); idx_t doc_id = id_map->get_mapping_id(i); ASSERT_EQ(doc_id, i); } ret = id_map->close(); ASSERT_EQ(ret, 0); ret = id_map->open(read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 20000; i++) { ASSERT_EQ(id_map->has(i), true); idx_t doc_id = id_map->get_mapping_id(i); ASSERT_EQ(doc_id, i); } for (size_t i = 0; i < 10000; i++) { id_map->remove(i); } for (size_t i = 0; i < 10000; i++) { ASSERT_EQ(id_map->has(i), false); } ret = id_map->close(); ASSERT_EQ(ret, 0); ret = id_map->open(read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 10000; i++) { ASSERT_EQ(id_map->has(i), false); } for (size_t i = 10000; i < 20000; i++) { ASSERT_EQ(id_map->has(i), true); idx_t doc_id = id_map->get_mapping_id(i); ASSERT_EQ(doc_id, i); } } ================================================ FILE: tests/index/index_service_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "index/index_service.h" #include using namespace proxima::be; using namespace proxima::be::index; class IndexServiceTest : public testing::Test { protected: void SetUp() { char cmd_buf[100]; snprintf(cmd_buf, 100, "rm -rf ./teachers/"); system(cmd_buf); snprintf(cmd_buf, 100, "rm -rf ./students/"); system(cmd_buf); FillSchema(); } void TearDown() {} void FillSchema() { schema_ = std::make_shared(); meta::ColumnMetaPtr column_meta = std::make_shared(); column_meta->set_name("face"); column_meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); column_meta->set_data_type(DataTypes::VECTOR_FP32); column_meta->set_dimension(16); column_meta->mutable_parameters()->set("metric_type", "SquaredEuclidean"); schema_->append(column_meta); schema_->set_name("teachers"); schema1_ = std::make_shared(); meta::ColumnMetaPtr column_meta1 = std::make_shared(); column_meta1->set_name("face"); column_meta1->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); column_meta1->set_data_type(DataTypes::VECTOR_FP32); column_meta1->set_dimension(16); column_meta1->mutable_parameters()->set("metric_type", "SquaredEuclidean"); schema1_->append(column_meta1); schema1_->set_name("students"); } meta::CollectionMetaPtr CreateSchema(const std::string &name) { auto schema = std::make_shared(); meta::ColumnMetaPtr column_meta = std::make_shared(); column_meta->set_name("column_test"); column_meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); column_meta->set_data_type(DataTypes::VECTOR_FP32); column_meta->set_dimension(16); column_meta->mutable_parameters()->set("metric_type", "SquaredEuclidean"); schema->append(column_meta); schema->set_name(name); return schema; } protected: meta::CollectionMetaPtr schema_{}; meta::CollectionMetaPtr schema1_{}; }; TEST_F(IndexServiceTest, TestGeneral) { IndexService index_service; int ret = index_service.init(); ASSERT_EQ(ret, 0); ret = index_service.start(); ASSERT_EQ(ret, 0); ret = index_service.create_collection("teachers", schema_); ASSERT_EQ(ret, 0); ASSERT_EQ(index_service.has_collection("teachers"), true); std::vector names; ret = index_service.list_collections(&names); ASSERT_EQ(ret, 0); ASSERT_EQ(names.size(), 1); ASSERT_EQ(names[0], "teachers"); std::vector segments; ret = index_service.list_segments("teachers", &segments); ASSERT_EQ(ret, 0); ASSERT_EQ(segments.size(), 1); index_service.stop(); } TEST_F(IndexServiceTest, TestLoadCollection) { IndexService index_service; ASSERT_EQ(index_service.init(), 0); ASSERT_EQ(index_service.start(), 0); int ret = index_service.create_collection("teachers", schema_); ASSERT_EQ(ret, 0); ret = index_service.create_collection("students", schema1_); ASSERT_EQ(ret, 0); ASSERT_EQ(index_service.stop(), 0); ret = index_service.start(); std::vector names; names.emplace_back("teachers"); names.emplace_back("students"); std::vector schemas; schemas.emplace_back(schema_); schemas.emplace_back(schema1_); ret = index_service.load_collections(names, schemas); ASSERT_EQ(ret, 0); index_service.stop(); } void do_hybrid_collection_operations(IndexService *service, const std::string &name, const meta::CollectionMetaPtr &schema) { int ret = service->create_collection(name, schema); ASSERT_EQ(ret, 0); ret = service->drop_collection(name); ASSERT_EQ(ret, 0); } TEST_F(IndexServiceTest, TestMultiThread) { IndexService index_service; ASSERT_EQ(index_service.init(), 0); ASSERT_EQ(index_service.start(), 0); ailego::ThreadPool pool(3); for (int i = 0; i < 100; i++) { std::string name = "collection_" + std::to_string(i); auto schema = CreateSchema(name); pool.execute(&do_hybrid_collection_operations, &index_service, name, schema); } pool.wait_finish(); index_service.stop(); } ================================================ FILE: tests/index/lsn_store_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define private public #define protected public #include "index/lsn_store.h" #undef private #undef protected #include #include #include using namespace proxima::be; using namespace proxima::be::index; class LsnStoreTest : public testing::Test { protected: void SetUp() { char cmd_buf[100]; snprintf(cmd_buf, 100, "rm -rf ./data.lsn"); system(cmd_buf); } void TearDown() {} }; TEST_F(LsnStoreTest, TestGeneral) { LsnStorePtr lsn_store = LsnStore::Create("teachers", "./"); ASSERT_TRUE(lsn_store != nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = lsn_store->open(read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 40000; i++) { std::string lsn_context = "JDBC://hello"; ret = lsn_store->append(i, lsn_context + std::to_string(i)); ASSERT_EQ(ret, 0); } ASSERT_EQ(lsn_store->header_.tail_block_index, 1); ASSERT_GT(lsn_store->data_blocks_[0]->data_size(), 0); LOG_INFO("data_size: %lu", lsn_store->data_blocks_[0]->data_size()); ASSERT_GT(lsn_store->data_blocks_[1]->data_size(), 0); ASSERT_EQ(lsn_store->data_blocks_[2]->data_size(), 0); for (size_t i = 30000; i < 70000; i++) { std::string lsn_context = "JDBC://hello"; ret = lsn_store->append(i, lsn_context + std::to_string(i)); ASSERT_EQ(ret, 0); } ASSERT_EQ(lsn_store->header_.tail_block_index, 0); ASSERT_GT(lsn_store->data_blocks_[1]->data_size(), 0); LOG_INFO("data_size: %lu", lsn_store->data_blocks_[0]->data_size()); ASSERT_EQ(lsn_store->data_blocks_[2]->data_size(), 0); ret = lsn_store->shift(); ASSERT_EQ(ret, 0); ASSERT_EQ(lsn_store->data_blocks_[2]->data_size(), lsn_store->data_blocks_[0]->data_size()); for (size_t i = 70000; i < 71000; i++) { std::string lsn_context = "JDBC://hello"; ret = lsn_store->append(i, lsn_context + std::to_string(i)); ASSERT_EQ(ret, 0); ailego::ElapsedTime timer; uint64_t lsn; std::string lsn_context_val; ret = lsn_store->get_latest_lsn(&lsn, &lsn_context_val); ASSERT_EQ(ret, 0); ASSERT_EQ(lsn, i); ASSERT_EQ(lsn_context_val, lsn_context + std::to_string(i)); } ret = lsn_store->close(); ASSERT_EQ(ret, 0); read_options.use_mmap = true; read_options.create_new = false; ret = lsn_store->open(read_options); ASSERT_EQ(ret, 0); uint64_t lsn; std::string lsn_context_val; lsn_store->get_latest_lsn(&lsn, &lsn_context_val); ASSERT_EQ(lsn, 70999); ASSERT_EQ(lsn_context_val, std::string("JDBC://hello") + std::to_string(70999)); } void do_insert(LsnStore *lsn_store, size_t number) { std::string lsn_context = "JDBC://hello"; int ret = lsn_store->append(number, lsn_context + std::to_string(number)); ASSERT_EQ(ret, 0); } TEST_F(LsnStoreTest, TestMultiThread) { LsnStorePtr lsn_store = LsnStore::Create("teachers", "./"); ASSERT_TRUE(lsn_store != nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = lsn_store->open(read_options); ASSERT_EQ(ret, 0); ailego::ThreadPool pool(10, false); for (size_t i = 0; i < 10000; i++) { pool.execute(do_insert, lsn_store.get(), i); } pool.wait_finish(); LOG_INFO("data_size0: %lu", lsn_store->data_blocks_[0]->data_size()); LOG_INFO("data_size1: %lu", lsn_store->data_blocks_[1]->data_size()); LOG_INFO("data_size2: %lu", lsn_store->data_blocks_[2]->data_size()); uint64_t lsn; std::string lsn_context_val; ret = lsn_store->get_latest_lsn(&lsn, &lsn_context_val); ASSERT_EQ(ret, 0); ASSERT_GE(lsn, 9999); ASSERT_EQ(lsn_context_val, std::string("JDBC://hello") + std::to_string(9999)); } ================================================ FILE: tests/index/memory_segment_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "index/segment/memory_segment.h" #include #include using namespace proxima::be; using namespace proxima::be::index; class MemorySegmentTest : public testing::Test { protected: void SetUp() { ailego::FileHelper::RemoveDirectory("./teachers/"); FillSchema(); } void TearDown() {} void FillSchema() { schema_ = std::make_shared(); meta::ColumnMetaPtr column_meta = std::make_shared(); column_meta->set_name("face"); column_meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); column_meta->set_data_type(DataTypes::VECTOR_FP32); column_meta->set_dimension(16); column_meta->mutable_parameters()->set("metric_type", "SquaredEuclidean"); schema_->append(column_meta); schema_->set_name("teachers"); } protected: meta::CollectionMetaPtr schema_{}; }; TEST_F(MemorySegmentTest, TestGeneral) { DeleteStore delete_store("teachers", "./teachers/"); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = delete_store.open(read_options); ASSERT_EQ(ret, 0); IDMap id_map("teachers", "./teachers/"); ret = id_map.open(read_options); ASSERT_EQ(ret, 0); SegmentMeta segment_meta; segment_meta.segment_id = 0; MemorySegmentPtr memory_segment = MemorySegment::Create("teachers", "./teachers/", segment_meta, schema_.get(), &delete_store, &id_map, 5); ASSERT_TRUE(memory_segment != nullptr); ret = memory_segment->open(read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 1000; i++) { Record record; record.primary_key = i; record.lsn = i; record.forward_data = std::string("hello") + std::to_string(i); CollectionDataset::ColumnData new_column; new_column.column_name = "face"; new_column.data_type = DataTypes::VECTOR_FP32; new_column.dimension = 16U; std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); new_column.data = vector; record.column_datas.emplace_back(new_column); idx_t doc_id; ret = memory_segment->insert(record, &doc_id); ASSERT_EQ(ret, 0); ASSERT_EQ(doc_id, i); id_map.insert(record.primary_key, doc_id); } for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; query_params.data_type = DataTypes::VECTOR_FP32; query_params.dimension = 16; QueryResultList result_list; ret = memory_segment->knn_search("face", query, query_params, &result_list); ASSERT_EQ(ret, 0); ASSERT_EQ(result_list[0].primary_key, i); ASSERT_EQ(result_list[0].score, 0.0f); ASSERT_EQ(result_list[0].lsn, i); ASSERT_EQ(result_list[0].forward_data, std::string("hello") + std::to_string(i)); } for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; query_params.data_type = DataTypes::VECTOR_FP32; query_params.dimension = 16; query_params.radius = 0.1f; QueryResultList result_list; ret = memory_segment->knn_search("face", query, query_params, &result_list); ASSERT_EQ(ret, 0); ASSERT_EQ(result_list.size(), 1); ASSERT_EQ(result_list[0].primary_key, i); ASSERT_EQ(result_list[0].score, 0.0f); ASSERT_EQ(result_list[0].lsn, i); ASSERT_EQ(result_list[0].forward_data, std::string("hello") + std::to_string(i)); } for (size_t i = 0; i < 1000; i++) { QueryResult result; ret = memory_segment->kv_search(i, &result); ASSERT_EQ(ret, 0); ASSERT_EQ(result.primary_key, i); ASSERT_EQ(result.score, 0.0f); ASSERT_EQ(result.lsn, i); ASSERT_EQ(result.forward_data, std::string("hello") + std::to_string(i)); } } ================================================ FILE: tests/index/mock_index_service.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #pragma once #include #include "index/index_service.h" using namespace proxima::be; using namespace proxima::be::index; using namespace ::testing; // import ::testing::* //! Mock IndexService class MockIndexService : public IndexService { public: ~MockIndexService() = default; public: //! Create collection with schema MOCK_METHOD(int, create_collection, (const std::string &collection_name, const meta::CollectionMetaPtr &schema), (override)); //! Drop collection by name MOCK_METHOD(int, drop_collection, (const std::string &collection_name), (override)); //! Update collection schema MOCK_METHOD(int, update_collection, (const std::string &collection_name, const meta::CollectionMetaPtr &new_schema), (override)); //! Check if collection exist MOCK_METHOD(bool, has_collection, (const std::string &collection_name), (override)); //! Load collections from storage MOCK_METHOD(int, load_collections, (const std::vector &collection_names, const std::vector &schemas), (override)); //! List all collection names MOCK_METHOD(int, list_collections, (std::vector * collection_names), (override)); //! List all collection segments MOCK_METHOD(int, list_segments, (const std::string &collection_name, std::vector *segments), (override)); //! Get collection latest lsn MOCK_METHOD(int, get_latest_lsn, (const std::string &collection_name, uint64_t *lsn, std::string *lsn_context), (override)); //! Write records to some collection MOCK_METHOD(int, write_records, (const std::string &collection_name, const CollectionDatasetPtr &records), (override)); protected: //! Initialize inner members MOCK_METHOD(int, init_impl, (), (override)); //! Cleanup and destroy objects MOCK_METHOD(int, cleanup_impl, (), (override)); //! Start worker thread MOCK_METHOD(int, start_impl, (), (override)); //! Stop worker thread MOCK_METHOD(int, stop_impl, (), (override)); }; using MockIndexServicePtr = std::shared_ptr; ================================================ FILE: tests/index/mock_segment.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include #include "index/index_service.h" using namespace proxima::be; using namespace proxima::be::index; class MockSegment : public Segment { public: ~MockSegment() override = default; MOCK_METHOD(size_t, doc_count, (), (const, override)); MOCK_METHOD(ForwardReaderPtr, get_forward_reader, (), (const, override)); MOCK_METHOD(ColumnReaderPtr, get_column_reader, (const std::string &column_name), (const, override)); MOCK_METHOD(int, remove_column, (const std::string &column_name), (override)); MOCK_METHOD(int, add_column, (const meta::ColumnMetaPtr &column_meta), (override)); MOCK_METHOD(int, knn_search, (const std::string &column_name, const std::string &query, const QueryParams &query_params, QueryResultList *results), (override)); MOCK_METHOD(int, knn_search, (const std::string &column_name, const std::string &query, const QueryParams &query_params, uint32_t batch_count, std::vector *results), (override)); MOCK_METHOD(int, kv_search, (uint64_t primary_key, QueryResult *result), (override)); }; ================================================ FILE: tests/index/persist_hash_map_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "index/persist_hash_map.h" #include #include #include "index/snapshot.h" using namespace proxima::be; using namespace proxima::be::index; class PersistHashMapTest : public testing::Test { protected: void SetUp() { char cmd_buf[100]; snprintf(cmd_buf, 100, "rm -rf ./idmap"); system(cmd_buf); } void TearDown() {} }; TEST_F(PersistHashMapTest, TestGeneral) { ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; SnapshotPtr snapshot; int ret = Snapshot::CreateAndOpen("./idmap", FileID::ID_FILE, read_options, &snapshot); ASSERT_EQ(ret, 0); PersistHashMap id_map; ret = id_map.mount(snapshot->data()); ASSERT_EQ(ret, 0); ASSERT_EQ(0, id_map.reserve(50000)); for (size_t i = 0; i < 20000; i++) { ret = id_map.emplace(i, i); ASSERT_EQ(ret, 0); } size_t size = id_map.size(); ASSERT_EQ(size, 20000); for (size_t i = 0; i < 20000; i++) { ASSERT_EQ(id_map.has(i), true); idx_t doc_id; ASSERT_EQ(0, id_map.get(i, &doc_id)); ASSERT_EQ(doc_id, i); } id_map.unmount(); ret = id_map.mount(snapshot->data()); ASSERT_EQ(ret, 0); size = id_map.size(); ASSERT_EQ(size, 20000); for (size_t i = 0; i < 20000; i++) { ASSERT_EQ(id_map.has(i), true); idx_t doc_id; ASSERT_EQ(0, id_map.get(i, &doc_id)); ASSERT_EQ(doc_id, i); } for (size_t i = 0; i < 10000; i++) { ret = id_map.erase(i); ASSERT_EQ(ret, 0); } for (size_t i = 0; i < 10000; i++) { ASSERT_EQ(id_map.has(i), false); } for (size_t i = 20000; i < 50000; i++) { ret = id_map.emplace(i, i); ASSERT_EQ(ret, 0); } id_map.unmount(); ret = id_map.mount(snapshot->data()); ASSERT_EQ(ret, 0); size = id_map.size(); ASSERT_EQ(size, 40000); for (size_t i = 0; i < 10000; i++) { ASSERT_EQ(id_map.has(i), false); } for (size_t i = 10000; i < 50000; i++) { ASSERT_EQ(id_map.has(i), true); idx_t doc_id; ASSERT_EQ(0, id_map.get(i, &doc_id)); ASSERT_EQ(doc_id, i); } for (size_t i = 40000; i < 50000; i++) { int ret = id_map.emplace_or_assign(i, i + 1); ASSERT_EQ(ret, 0); } for (size_t i = 40000; i < 50000; i++) { idx_t doc_id; ASSERT_EQ(0, id_map.get(i, &doc_id)); ASSERT_EQ(doc_id, i + 1); } } ================================================ FILE: tests/index/persist_segment_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "index/segment/persist_segment.h" #include #include "index/segment/memory_segment.h" using namespace proxima::be; using namespace proxima::be::index; class PersistSegmentTest : public testing::Test { protected: void SetUp() { char cmd_buf[100]; snprintf(cmd_buf, 100, "rm -rf ./teachers/"); system(cmd_buf); FillSchema(); } void TearDown() {} void FillSchema() { schema_ = std::make_shared(); meta::ColumnMetaPtr column_meta = std::make_shared(); column_meta->set_name("face"); column_meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); column_meta->set_data_type(DataTypes::VECTOR_FP32); column_meta->set_dimension(16); column_meta->mutable_parameters()->set("metric_type", "SquaredEuclidean"); schema_->append(column_meta); schema_->set_name("teachers"); } protected: meta::CollectionMetaPtr schema_{}; }; TEST_F(PersistSegmentTest, TestGeneral) { DeleteStore delete_store("teachers", "./teachers/"); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = delete_store.open(read_options); ASSERT_EQ(ret, 0); IDMap id_map("teachers", "./teachers/"); ret = id_map.open(read_options); ASSERT_EQ(ret, 0); SegmentMeta segment_meta; segment_meta.segment_id = 0; MemorySegmentPtr memory_segment = MemorySegment::Create("teachers", "./teachers/", segment_meta, schema_.get(), &delete_store, &id_map, 5); ASSERT_TRUE(memory_segment != nullptr); ret = memory_segment->open(read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 1000; i++) { Record record; record.primary_key = i; record.lsn = i; record.forward_data = "hello"; CollectionDataset::ColumnData new_column; new_column.column_name = "face"; new_column.data_type = DataTypes::VECTOR_FP32; new_column.dimension = 16U; std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string vector((char *)fvec.data(), fvec.size() * sizeof(float)); new_column.data = vector; record.column_datas.emplace_back(new_column); idx_t doc_id; ret = memory_segment->insert(record, &doc_id); ASSERT_EQ(ret, 0); ASSERT_EQ(doc_id, i); id_map.insert(record.primary_key, doc_id); } ret = memory_segment->dump(); ASSERT_EQ(ret, 0); PersistSegmentPtr persist_segment = PersistSegment::Create( "teachers", "./teachers/", memory_segment->segment_meta(), schema_.get(), &delete_store, &id_map, 5); ASSERT_NE(persist_segment, nullptr); read_options.create_new = false; ret = persist_segment->load(read_options); ASSERT_EQ(ret, 0); auto &meta0 = memory_segment->segment_meta(); auto &meta1 = persist_segment->segment_meta(); ASSERT_EQ(meta0.segment_id, meta1.segment_id); ASSERT_EQ(meta0.state, meta1.state); ASSERT_EQ(meta0.index_file_size, meta1.index_file_size); ASSERT_EQ(meta0.min_doc_id, meta1.min_doc_id); ASSERT_EQ(meta0.max_doc_id, meta1.max_doc_id); ASSERT_EQ(meta0.min_primary_key, meta1.min_primary_key); ASSERT_EQ(meta0.max_primary_key, meta1.max_primary_key); ASSERT_EQ(meta0.min_timestamp, meta1.min_timestamp); ASSERT_EQ(meta0.max_timestamp, meta1.max_timestamp); for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; query_params.data_type = DataTypes::VECTOR_FP32; query_params.dimension = 16; QueryResultList result_list; ret = persist_segment->knn_search("face", query, query_params, &result_list); ASSERT_EQ(ret, 0); ASSERT_EQ(result_list[0].primary_key, i); ASSERT_EQ(result_list[0].score, 0.0f); ASSERT_EQ(result_list[0].lsn, i); ASSERT_EQ(result_list[0].forward_data, "hello"); } for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; query_params.data_type = DataTypes::VECTOR_FP32; query_params.dimension = 16; query_params.radius = 0.1f; QueryResultList result_list; ret = persist_segment->knn_search("face", query, query_params, &result_list); ASSERT_EQ(ret, 0); ASSERT_EQ(result_list.size(), 1); ASSERT_EQ(result_list[0].primary_key, i); ASSERT_EQ(result_list[0].score, 0.0f); ASSERT_EQ(result_list[0].lsn, i); ASSERT_EQ(result_list[0].forward_data, "hello"); } for (size_t i = 0; i < 1000; i++) { QueryResult result; ret = persist_segment->kv_search(i, &result); ASSERT_EQ(ret, 0); ASSERT_EQ(result.primary_key, i); ASSERT_EQ(result.score, 0.0f); ASSERT_EQ(result.lsn, i); ASSERT_EQ(result.forward_data, "hello"); } for (size_t i = 0; i < 1000; i++) { ret = delete_store.insert(i); ASSERT_EQ(ret, 0); } for (size_t i = 0; i < 1000; i++) { std::vector fvec(16U); for (size_t j = 0; j < 16U; j++) { fvec[j] = i * 1.0f; } std::string query((char *)fvec.data(), fvec.size() * sizeof(float)); QueryParams query_params; query_params.topk = 10; query_params.data_type = DataTypes::VECTOR_FP32; query_params.dimension = 16; QueryResultList result_list; ret = persist_segment->knn_search("face", query, query_params, &result_list); ASSERT_EQ(ret, 0); ASSERT_EQ(result_list.size(), 0); } for (size_t i = 0; i < 1000; i++) { QueryResult result; ret = persist_segment->kv_search(i, &result); ASSERT_EQ(ret, 0); ASSERT_EQ(result.primary_key, INVALID_KEY); } } ================================================ FILE: tests/index/version_manager_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "index/version_manager.h" #include using namespace proxima::be; using namespace proxima::be::index; class VersionManagerTest : public testing::Test { protected: void SetUp() { char cmd_buf[100]; snprintf(cmd_buf, 100, "rm -rf ./data.manifest"); system(cmd_buf); } void TearDown() {} }; TEST_F(VersionManagerTest, TestGeneral) { auto version_manager = VersionManager::Create("collection_test", "./"); ASSERT_NE(version_manager, nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = version_manager->open(read_options); ASSERT_EQ(ret, 0); ASSERT_EQ(version_manager->total_segment_count(), 1); for (size_t i = 1; i < 100; i++) { SegmentMeta segment_meta; int ret = version_manager->alloc_segment_meta(&segment_meta); ASSERT_EQ(ret, 0); segment_meta.state = SegmentState::WRITING; ret = version_manager->update_segment_meta(segment_meta); ASSERT_EQ(ret, 0); ASSERT_EQ(segment_meta.segment_id, i); ASSERT_EQ(version_manager->total_segment_count(), i + 1); } for (size_t i = 0; i < 100; i++) { VersionEdit edit; edit.add_segments.emplace_back(i); ret = version_manager->apply(edit); ASSERT_EQ(ret, 0); ASSERT_EQ(version_manager->current_version().size(), i + 1); } for (size_t i = 0; i < 100; i++) { SegmentMeta segment_meta; segment_meta.segment_id = i; segment_meta.state = SegmentState::WRITING; segment_meta.doc_count = i; segment_meta.min_primary_key = i; segment_meta.max_primary_key = i; segment_meta.min_doc_id = i; segment_meta.max_doc_id = i; segment_meta.min_timestamp = i; segment_meta.max_timestamp = i; ret = version_manager->update_segment_meta(segment_meta); ASSERT_EQ(ret, 0); } for (size_t i = 0; i < 100; i++) { SegmentMeta segment_meta; int ret = version_manager->get_segment_meta(i, &segment_meta); ASSERT_EQ(ret, 0); ASSERT_EQ(segment_meta.segment_id, i); ASSERT_EQ(segment_meta.state, SegmentState::WRITING); ASSERT_EQ(segment_meta.doc_count, i); ASSERT_EQ(segment_meta.min_primary_key, i); ASSERT_EQ(segment_meta.max_primary_key, i); ASSERT_EQ(segment_meta.min_doc_id, i); ASSERT_EQ(segment_meta.max_doc_id, i); ASSERT_EQ(segment_meta.min_timestamp, i); ASSERT_EQ(segment_meta.max_timestamp, i); } version_manager->close(); read_options.create_new = false; ret = version_manager->open(read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 100; i++) { SegmentMeta segment_meta; int ret = version_manager->get_segment_meta(i, &segment_meta); ASSERT_EQ(ret, 0); ASSERT_EQ(segment_meta.segment_id, i); ASSERT_EQ(segment_meta.state, SegmentState::WRITING); ASSERT_EQ(segment_meta.doc_count, i); ASSERT_EQ(segment_meta.min_doc_id, i); ASSERT_EQ(segment_meta.max_doc_id, i); ASSERT_EQ(segment_meta.min_primary_key, i); ASSERT_EQ(segment_meta.max_primary_key, i); ASSERT_EQ(segment_meta.min_timestamp, i); ASSERT_EQ(segment_meta.max_timestamp, i); } ASSERT_EQ(version_manager->current_version().size(), 100); for (size_t i = 0; i < 100; i++) { const SegmentMeta &segment_meta = version_manager->current_version()[i]; ASSERT_EQ(segment_meta.segment_id, i); ASSERT_EQ(segment_meta.doc_count, i); ASSERT_EQ(segment_meta.min_primary_key, i); ASSERT_EQ(segment_meta.max_primary_key, i); ASSERT_EQ(segment_meta.min_doc_id, i); ASSERT_EQ(segment_meta.max_doc_id, i); ASSERT_EQ(segment_meta.min_timestamp, i); ASSERT_EQ(segment_meta.max_timestamp, i); } // test alloc unused segment meta // check if it will be reused for (size_t i = 0; i < 100; i++) { SegmentMeta segment_meta; int ret = version_manager->alloc_segment_meta(&segment_meta); ASSERT_EQ(ret, 0); ASSERT_EQ(segment_meta.segment_id, 100); } } TEST_F(VersionManagerTest, TestVersionEdit) { auto version_manager = VersionManager::Create("collection_test", "./"); ASSERT_NE(version_manager, nullptr); ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = version_manager->open(read_options); ASSERT_EQ(ret, 0); for (size_t i = 0; i < 100; i++) { SegmentMeta segment_meta; ret = version_manager->alloc_segment_meta(&segment_meta); ASSERT_EQ(ret, 0); segment_meta.state = SegmentState::WRITING; ret = version_manager->update_segment_meta(segment_meta); ASSERT_EQ(ret, 0); ASSERT_EQ(segment_meta.segment_id, i + 1); } VersionEdit edit1; edit1.add_segments.emplace_back(10); edit1.add_segments.emplace_back(11); ret = version_manager->apply(edit1); ASSERT_EQ(ret, 0); ASSERT_EQ(version_manager->current_version().size(), 2); ASSERT_EQ(version_manager->current_version()[0].segment_id, 10); ASSERT_EQ(version_manager->current_version()[1].segment_id, 11); VersionEdit edit2; edit2.add_segments.emplace_back(12); edit2.add_segments.emplace_back(13); edit2.delete_segments.emplace_back(10); ret = version_manager->apply(edit2); ASSERT_EQ(ret, 0); ASSERT_EQ(version_manager->current_version().size(), 3); ASSERT_EQ(version_manager->current_version()[0].segment_id, 11); ASSERT_EQ(version_manager->current_version()[1].segment_id, 12); ASSERT_EQ(version_manager->current_version()[2].segment_id, 13); } ================================================ FILE: tests/integration/README.md ================================================ How to run all integration test cases outside docker 1、cd build/ 2、sh ./tests/integration/run.sh How to run one test suite outside docker 1、cd build/ 2、sh ./tests/integration/run.sh test_admin_agent How to run one test case outside docker 1、cd build/ 2、sh ./tests/integration/run.sh test_admin_agent.TestAdminAgent.test_create_collection ########################################## How to run integration test case in docker 1、cd build/ 2、update the tests/integration/run.sh as following sudo docker run -it --net=host -v ${PWD}/..:/v ghcr.io/proximabilin/proxima-be bash 3、sh ./tests/integration/run.sh 4、cd /v/tests/integration && sh ./script/setup_ci.sh build /v 5、export PYTHONPATH=/v/sdk/python; export BUILD_DIR_NAME=build; export SRC_PATH=/v 6、python3 src/case/test_xxx.py ================================================ FILE: tests/integration/data/test_clean_db.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_collection; create table if not exists test_collection(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); ================================================ FILE: tests/integration/data/test_collection_create_and_remove_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_collection_create_and_remove; create table if not exists test_collection_create_and_remove(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); insert into test_collection_create_and_remove values(1, 'name1', 11.111, 100,'[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_collection_create_and_remove values(2, 'name2', 12.111, 200,'[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); select count(*) from test_collection_create_and_remove; ================================================ FILE: tests/integration/data/test_forward_date_and_time_frac_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_date_and_time_frac; create table if not exists test_forward_with_date_and_time_frac(id int primary key auto_increment, f1 date, f2 time(1), f3 datetime(3), f4 timestamp(6) DEFAULT CURRENT_TIMESTAMP(6), f5 float, f6 year, column1 varchar(256)); insert into test_forward_with_date_and_time_frac values(1, '2021-01-12', '13:00:01.9', '2021-01-12 13:00:01.123', '2021-01-12 13:00:00.123456', 1.1, '2021','[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_date_and_time_frac values(2, '2021-01-13', '13:00:02.9', '2021-01-13 13:00:02.123', '2021-01-13 13:00:00.123456', 2.1, '2021','[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_date_and_time_frac values(3, '2021-01-14', '13:00:03.9', '2021-01-14 13:00:03.123', '2021-01-14 13:00:00.123456', 3.1, '2021','[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_date_and_time_frac values(4, '2021-01-15', '13:00:04.9', '2021-01-15 13:00:04.123', '2021-01-15 13:00:00.123456', 4.1, '2021','[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_date_and_time_frac; ================================================ FILE: tests/integration/data/test_forward_date_and_time_frac_inc.sql ================================================ use test_db; insert into test_forward_with_date_and_time_frac values(5, '2021-01-16', '13:00:05.9', '2021-01-16 13:00:05.123', '2021-01-16 13:00:00.123456', 5.1, '2021', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_date_and_time_frac values(6, '2021-01-17', '13:00:06.9', '2021-01-17 13:00:06.123', '2021-01-17 13:00:00.123456', 6.1, '2021', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_date_and_time_frac values(7, '2021-01-18', '13:00:07.9', '2021-01-18 13:00:07.123', '2021-01-18 13:00:00.123456', 7.1, '2021', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); insert into test_forward_with_date_and_time_frac values(8, '2021-01-19', '13:00:08.9', '2021-01-19 13:00:08.123', '2021-01-19 13:00:00.123456', 8.1, '2021', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8]'); delete from test_forward_with_date_and_time_frac where id = 1; update test_forward_with_date_and_time_frac set f5 = 1.0 where id > 0; select count(*) from test_forward_with_date_and_time_frac; ================================================ FILE: tests/integration/data/test_forward_date_and_time_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_date_and_time; create table if not exists test_forward_with_date_and_time(id int primary key auto_increment, f1 date, f2 time, f3 datetime, f4 timestamp DEFAULT CURRENT_TIMESTAMP, f5 float, f6 year, column1 varchar(256)); insert into test_forward_with_date_and_time values(1, '2021-01-12', '13:00:01', '2021-01-12 13:00:01', '2021-01-12 13:00:00', 1.1, '2021','[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_date_and_time values(2, '2021-01-13', '13:00:02', '2021-01-13 13:00:02', '2021-01-13 13:00:00', 2.1, '2021','[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_date_and_time values(3, '2021-01-14', '13:00:03', '2021-01-14 13:00:03', '2021-01-14 13:00:00', 3.1, '2021','[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_date_and_time values(4, '2021-01-15', '13:00:04', '2021-01-15 13:00:04', '2021-01-15 13:00:00', 4.1, '2021','[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_date_and_time; ================================================ FILE: tests/integration/data/test_forward_date_and_time_inc.sql ================================================ use test_db; insert into test_forward_with_date_and_time values(5, '2021-01-16', '13:00:05', '2021-01-16 13:00:05', '2021-01-16 13:00:00', 5.1, '2021', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_date_and_time values(6, '2021-01-17', '13:00:06', '2021-01-17 13:00:06', '2021-01-17 13:00:00', 6.1, '2021', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_date_and_time values(7, '2021-01-18', '13:00:07', '2021-01-18 13:00:07', '2021-01-18 13:00:00', 7.1, '2021', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); insert into test_forward_with_date_and_time values(8, '2021-01-19', '13:00:08', '2021-01-19 13:00:08', '2021-01-19 13:00:00', 8.1, '2021', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8]'); delete from test_forward_with_date_and_time where id = 1; update test_forward_with_date_and_time set f5 = 1.0 where id > 0; select count(*) from test_forward_with_date_and_time; ================================================ FILE: tests/integration/data/test_forward_numeric_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_numeric; create table if not exists test_forward_with_numeric(id int primary key auto_increment, f1 tinyint, f2 smallint, f3 mediumint, f4 int, f5 BIGINT, f6 float, f7 double, column1 varchar(256)); insert into test_forward_with_numeric values(1, 121, 20001, 65601, 2000000001, 8000000001, 1.1234, 1.11223344, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_numeric values(2, 122, 20002, 65602, 2000000002, 8000000002, 2.1234, 2.11223344, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_numeric values(3, 123, 20003, 65603, 2000000003, 8000000003, 3.1234, 3.11223344, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_numeric values(4, 124, 20004, 65604, 2000000004, 8000000004, 4.1234, 4.11223344, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_numeric; ================================================ FILE: tests/integration/data/test_forward_numeric_inc.sql ================================================ use test_db; insert into test_forward_with_numeric values(5, 125, 20005, 65605, 2000000005, 8000000005, 5.1234, 5.11223344, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_numeric values(6, 126, 20006, 65606, 2000000006, 8000000006, 6.1234, 6.11223344, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_numeric values(7, 127, 20007, 65607, 2000000007, 8000000007, 7.1234, 7.11223344, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); delete from test_forward_with_numeric where id = 1; update test_forward_with_numeric set f2 = f2 + 1 where id > 0; select count(*) from test_forward_with_numeric; ================================================ FILE: tests/integration/data/test_forward_with_binary_and_varbinary_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_binary_and_varbinary; create table if not exists test_forward_with_binary_and_varbinary(id int primary key auto_increment, f1 binary(16), f2 binary(64), f3 varbinary(3), f4 varbinary(1024), f5 float, column1 varchar(256)); insert into test_forward_with_binary_and_varbinary values(1, x'F1', '1111', x'F1F1F1', '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_binary_and_varbinary values(2, x'F1', '2222', x'F1F1F1', '22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222', 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_binary_and_varbinary values(3, x'F1', '3333', x'F1F1F1', '33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333', 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_binary_and_varbinary values(4, x'F1', '4444', x'F1F1F1', '44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444', 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); # select id, HEX(f1), HEX(f2), f3, f4, f5, column1 from test_forward_with_binary_and_varbinary; select count(*) from test_forward_with_binary_and_varbinary; ================================================ FILE: tests/integration/data/test_forward_with_binary_and_varbinary_inc.sql ================================================ use test_db; insert into test_forward_with_binary_and_varbinary values(5, x'F1', '5555', x'F1F1F1', '55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555', 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_binary_and_varbinary values(6, x'F1', '6666', x'F1F1F1', '66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666', 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_binary_and_varbinary values(7, x'F1', '7777', x'F1F1F1', '77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777', 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_forward_with_binary_and_varbinary set f5 = f5 + 1; delete from test_forward_with_binary_and_varbinary where id=7; select count(*) from test_forward_with_binary_and_varbinary; ================================================ FILE: tests/integration/data/test_forward_with_bit_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_bit; create table if not exists test_forward_with_bit(id int primary key auto_increment, f1 bit(8), f2 bit(16), f3 bit(24), f4 bit(48), f5 float, column1 varchar(256)); insert into test_forward_with_bit values(1, 0, 128, 65535, 5000000000, 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_bit values(2, 1, 129, 65536, 5000000001, 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_bit values(3, 2, 130, 65537, 5000000002, 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); # select id, f1+0,f2+0,f3+0,f4+0,f5,column1 from test_forward_with_bit; select count(*) from test_forward_with_bit; ================================================ FILE: tests/integration/data/test_forward_with_bit_inc.sql ================================================ use test_db; insert into test_forward_with_bit values(4, 3, 131, 65538, 5000000003, 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); insert into test_forward_with_bit values(5, 4, 132, 65539, 5000000004, 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_bit values(6, 5, 133, 65540, 5000000005, 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_bit values(7, 6, 134, 65541, 5000000006, 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_forward_with_bit set f5 = f5 + 1; delete from test_forward_with_bit where id=7; # select id, f1+0,f2+0,f3+0,f4+0,f5,column1 from test_forward_with_bit; select count(*) from test_forward_with_bit; ================================================ FILE: tests/integration/data/test_forward_with_blob_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_blob; create table if not exists test_forward_with_blob(id int primary key auto_increment, f1 tinyblob, f2 blob, f3 mediumblob, f4 longblob, f5 float, column1 varchar(256)); insert into test_forward_with_blob values(1, x'F1F2F3F4', '1111', '111', '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_blob values(2, x'F1F2F3F4', '2222', '222', '22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222', 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_blob values(3, x'F1F2F3F4', '3333', '333', '33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333', 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_blob values(4, x'F1F2F3F4', '4444', '444', '44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444', 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_blob; ================================================ FILE: tests/integration/data/test_forward_with_blob_gbk_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_blob_gbk; create table if not exists test_forward_with_blob_gbk(id int primary key auto_increment, f1 tinyblob, f2 blob, f3 mediumblob, f4 longblob, f5 float, column1 varchar(256)) default charset gbk; insert into test_forward_with_blob_gbk values(1, '', '1111', '111', '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_blob_gbk values(2, '', '2222', '222', '22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222', 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_blob_gbk values(3, '', '3333', '333', '33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333', 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_blob_gbk values(4, '', '4444', '444', '44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444', 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_blob_gbk; ================================================ FILE: tests/integration/data/test_forward_with_blob_gbk_inc.sql ================================================ use test_db; insert into test_forward_with_blob_gbk values(5, '', '5555', '555', '55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555', 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_blob_gbk values(6, '', '6666', '666', '66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666', 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_blob_gbk values(7, '', '7777', '777', '77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777', 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_forward_with_blob_gbk set f5 = f5 + 1; delete from test_forward_with_blob_gbk where id=7; select count(*) from test_forward_with_blob_gbk; ================================================ FILE: tests/integration/data/test_forward_with_blob_inc.sql ================================================ use test_db; insert into test_forward_with_blob values(5, x'F1F2F3F4', '5555', '555', '55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555', 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_blob values(6, x'F1F2F3F4', '6666', '666', '66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666', 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_blob values(7, x'F1F2F3F4', '7777', '777', '77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777', 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_forward_with_blob set f5 = f5 + 1; delete from test_forward_with_blob where id=7; select count(*) from test_forward_with_blob; ================================================ FILE: tests/integration/data/test_forward_with_char_and_varchar_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_char_and_varchar; create table if not exists test_forward_with_char_and_varchar(id int primary key auto_increment, f1 char(16), f2 char(255), f3 varchar(3), f4 varchar(1024), f5 float, column1 varchar(256)); insert into test_forward_with_char_and_varchar values(1, '1111111111111111', '1111', '111', '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_char_and_varchar values(2, '2222222222222222', '2222', '222', '22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222', 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_char_and_varchar values(3, '3333333333333333', '3333', '333', '33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333', 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_char_and_varchar values(4, '4444444444444444', '4444', '444', '44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444', 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_char_and_varchar; ================================================ FILE: tests/integration/data/test_forward_with_char_and_varchar_inc.sql ================================================ use test_db; insert into test_forward_with_char_and_varchar values(5, '5555555555555555', '5555', '555', '55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555', 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_char_and_varchar values(6, '6666666666666666', '6666', '666', '66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666', 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_char_and_varchar values(7, '7777777777777777', '7777', '777', '77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777', 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_forward_with_char_and_varchar set f5 = f5 + 1; delete from test_forward_with_char_and_varchar where id=7; select count(*) from test_forward_with_char_and_varchar; ================================================ FILE: tests/integration/data/test_forward_with_charset_gbk_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_charset_gbk; create table if not exists test_forward_with_charset_gbk(id int primary key auto_increment, f1 char(16), f2 char(255), f3 varchar(3), f4 varchar(1024), f5 float, column1 varchar(256)) default charset gbk; insert into test_forward_with_charset_gbk values(1, '第一个字段', '定长字段', '我是谁', '第三个字段', 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_charset_gbk values(2, '第一个字段', '定长字段', '我是谁', '第三个字段', 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_charset_gbk values(3, '第一个字段', '定长字段', '我是谁', '第三个字段', 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_charset_gbk values(4, '第一个字段', '定长字段', '我是谁', '第三个字段', 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_charset_gbk; ================================================ FILE: tests/integration/data/test_forward_with_charset_gbk_inc.sql ================================================ use test_db; insert into test_forward_with_charset_gbk values(5, '第一个字段', '定长字段', '我是谁', '第三个字段', 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_charset_gbk values(6, '第一个字段', '定长字段', '我是谁', '第三个字段', 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_charset_gbk values(7, '第一个字段', '定长字段', '我是谁', '第三个字段', 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_forward_with_charset_gbk set f5 = f5 + 1; delete from test_forward_with_charset_gbk where id=7; select count(*) from test_forward_with_charset_gbk; ================================================ FILE: tests/integration/data/test_forward_with_charset_utf8_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_charset_utf8; create table if not exists test_forward_with_charset_utf8(id int primary key auto_increment, f1 char(16), f2 char(255), f3 varchar(3), f4 varchar(1024), f5 float, column1 varchar(256)) default charset utf8; insert into test_forward_with_charset_utf8 values(1, '第一个字段', '定长字段', '我是谁', '第三个字段', 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_charset_utf8 values(2, '第一个字段', '定长字段', '我是谁', '第三个字段', 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_charset_utf8 values(3, '第一个字段', '定长字段', '我是谁', '第三个字段', 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_charset_utf8 values(4, '第一个字段', '定长字段', '我是谁', '第三个字段', 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_charset_utf8; ================================================ FILE: tests/integration/data/test_forward_with_charset_utf8_inc.sql ================================================ use test_db; insert into test_forward_with_charset_utf8 values(5, '第一个字段', '定长字段', '我是谁', '第三个字段', 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_charset_utf8 values(6, '第一个字段', '定长字段', '我是谁', '第三个字段', 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_charset_utf8 values(7, '第一个字段', '定长字段', '我是谁', '第三个字段', 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_forward_with_charset_utf8 set f5 = f5 + 1; delete from test_forward_with_charset_utf8 where id=7; select count(*) from test_forward_with_charset_utf8; ================================================ FILE: tests/integration/data/test_forward_with_decimal_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_decimal; create table if not exists test_forward_with_decimal(id int primary key auto_increment, f1 char(16), f2 decimal(15,10), f3 varchar(3), f4 varchar(1024), f5 float, column1 varchar(256)); insert into test_forward_with_decimal values(1, '1111111111111111', 12345.0123456789, '111', '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_decimal values(2, '2222222222222222', 12345.1123456789, '222', '22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222', 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_decimal values(3, '3333333333333333', 12345.2123456789, '333', '33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333', 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_decimal values(4, '4444444444444444', 12345.3123456789, '444', '44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444', 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_decimal; ================================================ FILE: tests/integration/data/test_forward_with_decimal_inc.sql ================================================ use test_db; insert into test_forward_with_decimal values(5, '5555555555555555', 12345.4123456789, '555', '55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555', 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_decimal values(6, '6666666666666666', 12345.5123456789, '666', '66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666', 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_decimal values(7, '7777777777777777', 12345.6123456789, '777', '77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777', 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_forward_with_decimal set f5 = f5 + 1; delete from test_forward_with_decimal where id=7; select count(*) from test_forward_with_decimal; ================================================ FILE: tests/integration/data/test_forward_with_empty_value_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_empty_value; create table if not exists test_forward_with_empty_value( id int primary key auto_increment, f1 char(16) not null, f2 char(64) null default '', f3 varchar(3) null default '', f4 int null, f5 float null, f6 double null, f7 datetime(3) null, f8 timestamp null, f9 date null, f10 text null, f11 longtext null, f12 blob null, f13 bit(8) null, f14 binary(8) null default '', f15 varbinary(8) null default '', f16 set('1', '2', '3') null default '', f17 enum('1', '2', '3') null, f18 json null, f19 geometry null, f20 varchar(256)); insert into test_forward_with_empty_value(id, f1, f10, f11, f12, f13, f20) values(1, '1111111111111111', '', '', '', '', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_empty_value(id, f1, f10, f11, f12, f13, f20) values(2, '2222222222222222', '', '', '', '', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_empty_value(id, f1, f10, f11, f12, f13, f20) values(3, '3333333333333333', '', '', '', '', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_empty_value(id, f1, f10, f11, f12, f13, f20) values(4, '4444444444444444', '', '', '', '', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_empty_value; ================================================ FILE: tests/integration/data/test_forward_with_empty_value_inc.sql ================================================ use test_db; insert into test_forward_with_empty_value(id, f1, f10, f11, f12, f13, f20) values(5, '5555555555555555', '', '', '', '', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_empty_value(id, f1, f10, f11, f12, f13, f20) values(6, '6666666666666666', '', '', '', '', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_empty_value(id, f1, f10, f11, f12, f13, f20) values(7, '7777777777777777', '', '', '', '', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); insert into test_forward_with_empty_value(id, f1, f10, f11, f12, f13, f20) values(8, '8888888888888888', '', '', '', '', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8]'); delete from test_forward_with_empty_value where id = 1; update test_forward_with_empty_value set f4 = id where id > 0; update test_forward_with_empty_value set f4 = NULL where id > 0; select count(*) from test_forward_with_empty_value; ================================================ FILE: tests/integration/data/test_forward_with_geometry_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_geometry; create table if not exists test_forward_with_geometry(id int primary key auto_increment, f1 char(16), f2 geometry, f3 varchar(3), f4 varchar(1024), f5 float, column1 varchar(256)); insert into test_forward_with_geometry values(1, '1111111111111111', geomfromtext('point(108.9498710632 34.2588125935)'), '111', '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_geometry values(2, '2222222222222222', geomfromtext('point(108.9498710632 34.2588125935)'), '222', '22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222', 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_geometry values(3, '3333333333333333', geomfromtext('point(108.9498710632 34.2588125935)'), '333', '33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333', 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_geometry values(4, '4444444444444444', geomfromtext('point(108.9498710632 34.2588125935)'), '444', '44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444', 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_geometry; ================================================ FILE: tests/integration/data/test_forward_with_geometry_inc.sql ================================================ use test_db; insert into test_forward_with_geometry values(5, '5555555555555555', geomfromtext('point(108.9498710632 34.2588125935)'), '555', '55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555', 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_geometry values(6, '6666666666666666', geomfromtext('point(108.9498710632 34.2588125935)'), '666', '66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666', 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_geometry values(7, '7777777777777777', geomfromtext('point(108.9498710632 34.2588125935)'), '777', '77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777', 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_forward_with_geometry set f5 = f5 + 1; delete from test_forward_with_geometry where id=7; select count(*) from test_forward_with_geometry; ================================================ FILE: tests/integration/data/test_forward_with_json_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_json; create table if not exists test_forward_with_json(id int primary key auto_increment, f1 char(16), f2 json, f3 varchar(3), f4 varchar(1024), f5 float, column1 varchar(256)); insert into test_forward_with_json values(1, '1111111111111111', '[1,2,3,4]', '111', '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_json values(2, '2222222222222222', '[1,2,3,4]', '222', '22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222', 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_json values(3, '3333333333333333', '[1,2,3,4]', '333', '33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333', 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_json values(4, '4444444444444444', '[1,2,3,4]', '444', '44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444', 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_json; ================================================ FILE: tests/integration/data/test_forward_with_json_inc.sql ================================================ use test_db; insert into test_forward_with_json values(5, '5555555555555555', '[1,2,3,4]', '555', '55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555', 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_json values(6, '6666666666666666', '[1,2,3,4]', '666', '66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666', 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_json values(7, '7777777777777777', '[1,2,3,4]', '777', '77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777', 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_forward_with_json set f5 = f5 + 1; delete from test_forward_with_json where id=7; select count(*) from test_forward_with_json; ================================================ FILE: tests/integration/data/test_forward_with_set_and_enum_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_set_and_enum; create table if not exists test_forward_with_set_and_enum(id int primary key auto_increment, f1 set('1', '2', '3', '4', '5', '6', '7', '8'), f2 set('111','222','333','444', '555', '666', '777'), f3 enum('1','2','3','4','5','6','7','8'), f4 enum('1111', '2222', '3333', '4444', '5555', '6666', '7777'), f5 float, column1 varchar(256)); insert into test_forward_with_set_and_enum values(1, '1,8', '111', '1', '1111', 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_set_and_enum values(2, '2,8', '222', '2', '2222', 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_set_and_enum values(3, '3,8', '333', '3', '3333', 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_set_and_enum values(4, '4,8', '444', '4', '4444', 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_set_and_enum; ================================================ FILE: tests/integration/data/test_forward_with_set_and_enum_inc.sql ================================================ use test_db; insert into test_forward_with_set_and_enum values(5, '5,8', '555', '5', '5555', 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_set_and_enum values(6, '6,8', '666', '6', '6666', 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_set_and_enum values(7, '7,8', '777', '7', '7777', 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_forward_with_set_and_enum set f5 = f5 + 1; delete from test_forward_with_set_and_enum where id=7; select count(*) from test_forward_with_set_and_enum; ================================================ FILE: tests/integration/data/test_forward_with_text_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_text; create table if not exists test_forward_with_text(id int primary key auto_increment, f1 tinytext, f2 text, f3 mediumtext, f4 longtext, f5 float, column1 varchar(256)); insert into test_forward_with_text values(1, '1111111111111111', '1111', '111', '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_text values(2, '2222222222222222', '2222', '222', '22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222', 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_text values(3, '3333333333333333', '3333', '333', '33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333', 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_text values(4, '4444444444444444', '4444', '444', '44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444', 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_text; ================================================ FILE: tests/integration/data/test_forward_with_text_gbk_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_text_gbk; create table if not exists test_forward_with_text_gbk(id int primary key auto_increment, f1 tinytext, f2 text, f3 mediumtext, f4 longtext, f5 float, column1 varchar(256)) ENGINE=InnoDB DEFAULT CHARSET gbk; insert into test_forward_with_text_gbk values(1, '我是向量检索引擎', '1111你', '111你', '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111你', 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_text_gbk values(2, '我是向量检索引擎', '2222你', '222你', '22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222你', 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_text_gbk values(3, '我是向量检索引擎', '3333你', '333你', '33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333你', 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_text_gbk values(4, '我是向量检索引擎', '4444你', '444你', '44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444你', 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_text_gbk; ================================================ FILE: tests/integration/data/test_forward_with_text_gbk_inc.sql ================================================ use test_db; insert into test_forward_with_text_gbk values(5, '我是向量检索引擎', '5555你', '555你', '55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555你', 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_text_gbk values(6, '我是向量检索引擎', '6666你', '666你', '66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666你', 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_text_gbk values(7, '我是向量检索引擎', '7777你', '777你', '77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777你', 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_forward_with_text_gbk set f5 = f5 + 1; delete from test_forward_with_text_gbk where id=7; select count(*) from test_forward_with_text_gbk; ================================================ FILE: tests/integration/data/test_forward_with_text_inc.sql ================================================ use test_db; insert into test_forward_with_text values(5, '5555555555555555', '5555', '555', '55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555', 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_text values(6, '6666666666666666', '6666', '666', '66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666', 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_text values(7, '7777777777777777', '7777', '777', '77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777', 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_forward_with_text set f5 = f5 + 1; delete from test_forward_with_text where id=7; select count(*) from test_forward_with_text; ================================================ FILE: tests/integration/data/test_forward_with_types_null_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_forward_with_types_null; create table if not exists test_forward_with_types_null( id int primary key auto_increment, f1 char(16) not null, f2 char(64) null, f3 varchar(3) null, f4 int null, f5 float null, f6 double null, f7 datetime(3) null, f8 timestamp null, f9 date null, f10 text null, f11 longtext null, f12 blob null, f13 bit(8) null, f14 binary(8) null, f15 varbinary(8) null, f16 set('1', '2', '3') null, f17 enum('1', '2', '3') null, f18 json null, f19 geometry null, f20 varchar(256)); insert into test_forward_with_types_null(id, f1, f20) values(1, '1111111111111111', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_forward_with_types_null(id, f1, f20) values(2, '2222222222222222', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_forward_with_types_null(id, f1, f20) values(3, '3333333333333333', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_forward_with_types_null(id, f1, f20) values(4, '4444444444444444', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_forward_with_types_null; ================================================ FILE: tests/integration/data/test_forward_with_types_null_inc.sql ================================================ use test_db; insert into test_forward_with_types_null(id, f1, f20) values(5, '5555555555555555', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_forward_with_types_null(id, f1, f20) values(6, '6666666666666666', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_forward_with_types_null(id, f1, f20) values(7, '7777777777777777', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); insert into test_forward_with_types_null(id, f1, f20) values(8, '8888888888888888', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8]'); delete from test_forward_with_types_null where id = 1; update test_forward_with_types_null set f4 = id where id > 0; update test_forward_with_types_null set f4 = NULL where id > 0; select count(*) from test_forward_with_types_null; ================================================ FILE: tests/integration/data/test_increment_mode_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_increment_mode; create table if not exists test_increment_mode(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); insert into test_increment_mode values(1, 'name1', 11.111, 100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_increment_mode values(2, 'name2', 12.111, 200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); select count(*) from test_increment_mode; ================================================ FILE: tests/integration/data/test_increment_mode_inc.sql ================================================ use test_db; insert into test_increment_mode values(3, 'name3', 13.111, 300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_increment_mode values(4, 'name4', 14.111, 400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); insert into test_increment_mode values(5, 'name5', 15.111, 500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_increment_mode values(6, 'name6', 16.111, 600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_increment_mode values(7, 'name7', 17.111, 700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); select count(*) from test_increment_mode; ================================================ FILE: tests/integration/data/test_invalid_lsn_info_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_invalid_lsn_info; create table if not exists test_invalid_lsn_info(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); insert into test_invalid_lsn_info values(1, 'name1', 11.111, 100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_invalid_lsn_info values(2, 'name2', 12.111, 200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_invalid_lsn_info values(3, 'name3', 13.111, 300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_invalid_lsn_info values(4, 'name4', 14.111, 400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); insert into test_invalid_lsn_info values(5, 'name5', 15.111, 500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_invalid_lsn_info values(6, 'name6', 16.111, 600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_invalid_lsn_info values(7, 'name7', 17.111, 700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); insert into test_invalid_lsn_info values(8, 'name8', 18.111, 800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8]'); insert into test_invalid_lsn_info values(9, 'name9', 19.111, 900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9]'); insert into test_invalid_lsn_info values(10, 'name10', 20.111, 1000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,10]'); insert into test_invalid_lsn_info values(11, 'name11', 21.111, 1100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,11]'); insert into test_invalid_lsn_info values(12, 'name12', 22.111, 1200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,12]'); insert into test_invalid_lsn_info values(13, 'name13', 23.111, 1300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,13]'); insert into test_invalid_lsn_info values(14, 'name14', 24.111, 1400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,14]'); insert into test_invalid_lsn_info values(15, 'name15', 25.111, 1500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,15]'); insert into test_invalid_lsn_info values(16, 'name16', 26.111, 1600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,16]'); insert into test_invalid_lsn_info values(17, 'name17', 27.111, 1700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,17]'); insert into test_invalid_lsn_info values(18, 'name18', 28.111, 1800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,18]'); insert into test_invalid_lsn_info values(19, 'name19', 29.111, 1900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,19]'); insert into test_invalid_lsn_info values(20, 'name20', 30.111, 2000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,20]'); insert into test_invalid_lsn_info values(21, 'name21', 31.111, 2100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,21]'); insert into test_invalid_lsn_info values(22, 'name22', 32.111, 2200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,22]'); insert into test_invalid_lsn_info values(23, 'name23', 33.111, 2300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,23]'); insert into test_invalid_lsn_info values(24, 'name24', 34.111, 2400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,24]'); insert into test_invalid_lsn_info values(25, 'name25', 35.111, 2500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,25]'); insert into test_invalid_lsn_info values(26, 'name26', 36.111, 2600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,26]'); insert into test_invalid_lsn_info values(27, 'name27', 37.111, 2700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,27]'); insert into test_invalid_lsn_info values(28, 'name28', 38.111, 2800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,28]'); insert into test_invalid_lsn_info values(29, 'name29', 39.111, 2900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,29]'); insert into test_invalid_lsn_info values(30, 'name30', 40.111, 3000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,30]'); insert into test_invalid_lsn_info values(31, 'name31', 41.111, 3100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,31]'); insert into test_invalid_lsn_info values(32, 'name32', 42.111, 3200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,32]'); insert into test_invalid_lsn_info values(33, 'name33', 43.111, 3300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,33]'); insert into test_invalid_lsn_info values(34, 'name34', 44.111, 3400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,34]'); insert into test_invalid_lsn_info values(35, 'name35', 45.111, 3500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,35]'); insert into test_invalid_lsn_info values(36, 'name36', 46.111, 3600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,36]'); insert into test_invalid_lsn_info values(37, 'name37', 47.111, 3700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,37]'); insert into test_invalid_lsn_info values(38, 'name38', 48.111, 3800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,38]'); insert into test_invalid_lsn_info values(39, 'name39', 49.111, 3900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,39]'); insert into test_invalid_lsn_info values(40, 'name40', 50.111, 4000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,40]'); insert into test_invalid_lsn_info values(41, 'name41', 51.111, 4100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,41]'); insert into test_invalid_lsn_info values(42, 'name42', 52.111, 4200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,42]'); insert into test_invalid_lsn_info values(43, 'name43', 53.111, 4300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,43]'); insert into test_invalid_lsn_info values(44, 'name44', 54.111, 4400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,44]'); insert into test_invalid_lsn_info values(45, 'name45', 55.111, 4500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,45]'); insert into test_invalid_lsn_info values(46, 'name46', 56.111, 4600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,46]'); insert into test_invalid_lsn_info values(47, 'name47', 57.111, 4700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,47]'); insert into test_invalid_lsn_info values(48, 'name48', 58.111, 4800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,48]'); insert into test_invalid_lsn_info values(49, 'name49', 59.111, 4900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,49]'); insert into test_invalid_lsn_info values(50, 'name50', 60.111, 5000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,50]'); insert into test_invalid_lsn_info values(51, 'name51', 61.111, 5100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,51]'); insert into test_invalid_lsn_info values(52, 'name52', 62.111, 5200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,52]'); insert into test_invalid_lsn_info values(53, 'name53', 63.111, 5300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,53]'); insert into test_invalid_lsn_info values(54, 'name54', 64.111, 5400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,54]'); insert into test_invalid_lsn_info values(55, 'name55', 65.111, 5500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,55]'); insert into test_invalid_lsn_info values(56, 'name56', 66.111, 5600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,56]'); insert into test_invalid_lsn_info values(57, 'name57', 67.111, 5700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,57]'); insert into test_invalid_lsn_info values(58, 'name58', 68.111, 5800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,58]'); insert into test_invalid_lsn_info values(59, 'name59', 69.111, 5900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,59]'); insert into test_invalid_lsn_info values(60, 'name60', 70.111, 6000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,60]'); insert into test_invalid_lsn_info values(61, 'name61', 71.111, 6100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,61]'); insert into test_invalid_lsn_info values(62, 'name62', 72.111, 6200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,62]'); insert into test_invalid_lsn_info values(63, 'name63', 73.111, 6300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,63]'); insert into test_invalid_lsn_info values(64, 'name64', 74.111, 6400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,64]'); insert into test_invalid_lsn_info values(65, 'name65', 75.111, 6500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,65]'); insert into test_invalid_lsn_info values(66, 'name66', 76.111, 6600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,66]'); insert into test_invalid_lsn_info values(67, 'name67', 77.111, 6700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,67]'); insert into test_invalid_lsn_info values(68, 'name68', 78.111, 6800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,68]'); insert into test_invalid_lsn_info values(69, 'name69', 79.111, 6900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,69]'); insert into test_invalid_lsn_info values(70, 'name70', 80.111, 7000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,70]'); insert into test_invalid_lsn_info values(71, 'name71', 81.111, 7100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,71]'); insert into test_invalid_lsn_info values(72, 'name72', 82.111, 7200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,72]'); insert into test_invalid_lsn_info values(73, 'name73', 83.111, 7300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,73]'); insert into test_invalid_lsn_info values(74, 'name74', 84.111, 7400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,74]'); insert into test_invalid_lsn_info values(75, 'name75', 85.111, 7500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,75]'); insert into test_invalid_lsn_info values(76, 'name76', 86.111, 7600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,76]'); insert into test_invalid_lsn_info values(77, 'name77', 87.111, 7700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,77]'); insert into test_invalid_lsn_info values(78, 'name78', 88.111, 7800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,78]'); insert into test_invalid_lsn_info values(79, 'name79', 89.111, 7900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,79]'); insert into test_invalid_lsn_info values(80, 'name80', 90.111, 8000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,80]'); insert into test_invalid_lsn_info values(81, 'name81', 91.111, 8100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,81]'); insert into test_invalid_lsn_info values(82, 'name82', 92.111, 8200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,82]'); insert into test_invalid_lsn_info values(83, 'name83', 93.111, 8300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,83]'); insert into test_invalid_lsn_info values(84, 'name84', 94.111, 8400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,84]'); insert into test_invalid_lsn_info values(85, 'name85', 95.111, 8500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,85]'); insert into test_invalid_lsn_info values(86, 'name86', 96.111, 8600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,86]'); insert into test_invalid_lsn_info values(87, 'name87', 97.111, 8700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,87]'); insert into test_invalid_lsn_info values(88, 'name88', 98.111, 8800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,88]'); insert into test_invalid_lsn_info values(89, 'name89', 99.111, 8900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,89]'); insert into test_invalid_lsn_info values(90, 'name90', 100.111, 9000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,90]'); insert into test_invalid_lsn_info values(91, 'name91', 101.111, 9100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,91]'); insert into test_invalid_lsn_info values(92, 'name92', 102.111, 9200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,92]'); insert into test_invalid_lsn_info values(93, 'name93', 103.111, 9300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,93]'); insert into test_invalid_lsn_info values(94, 'name94', 104.111, 9400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,94]'); insert into test_invalid_lsn_info values(95, 'name95', 105.111, 9500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,95]'); insert into test_invalid_lsn_info values(96, 'name96', 106.111, 9600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,96]'); insert into test_invalid_lsn_info values(97, 'name97', 107.111, 9700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,97]'); insert into test_invalid_lsn_info values(98, 'name98', 108.111, 9800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,98]'); insert into test_invalid_lsn_info values(99, 'name99', 109.111, 9900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,99]'); insert into test_invalid_lsn_info values(100, 'name100', 110.111, 10000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,100]'); select count(*) from test_invalid_lsn_info; ================================================ FILE: tests/integration/data/test_invalid_lsn_info_inc.sql ================================================ use test_db; insert into test_invalid_lsn_info values(101, 'name101', 111.111, 10100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,101]'); insert into test_invalid_lsn_info values(102, 'name102', 112.111, 10200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,102]'); insert into test_invalid_lsn_info values(103, 'name103', 113.111, 10300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,103]'); insert into test_invalid_lsn_info values(104, 'name104', 114.111, 10400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,104]'); insert into test_invalid_lsn_info values(105, 'name105', 115.111, 10500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,105]'); insert into test_invalid_lsn_info values(106, 'name106', 116.111, 10600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,106]'); insert into test_invalid_lsn_info values(107, 'name107', 117.111, 10700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,107]'); insert into test_invalid_lsn_info values(108, 'name108', 118.111, 10800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,108]'); insert into test_invalid_lsn_info values(109, 'name109', 119.111, 10900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,109]'); insert into test_invalid_lsn_info values(110, 'name110', 120.111, 11000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,110]'); insert into test_invalid_lsn_info values(111, 'name111', 121.111, 11100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,111]'); insert into test_invalid_lsn_info values(112, 'name112', 122.111, 11200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,112]'); insert into test_invalid_lsn_info values(113, 'name113', 123.111, 11300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,113]'); insert into test_invalid_lsn_info values(114, 'name114', 124.111, 11400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,114]'); insert into test_invalid_lsn_info values(115, 'name115', 125.111, 11500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,115]'); insert into test_invalid_lsn_info values(116, 'name116', 126.111, 11600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,116]'); insert into test_invalid_lsn_info values(117, 'name117', 127.111, 11700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,117]'); insert into test_invalid_lsn_info values(118, 'name118', 128.111, 11800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,118]'); insert into test_invalid_lsn_info values(119, 'name119', 129.111, 11900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,119]'); insert into test_invalid_lsn_info values(120, 'name120', 130.111, 12000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,120]'); insert into test_invalid_lsn_info values(121, 'name121', 131.111, 12100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,121]'); insert into test_invalid_lsn_info values(122, 'name122', 132.111, 12200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,122]'); insert into test_invalid_lsn_info values(123, 'name123', 133.111, 12300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,123]'); insert into test_invalid_lsn_info values(124, 'name124', 134.111, 12400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,124]'); insert into test_invalid_lsn_info values(125, 'name125', 135.111, 12500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,125]'); insert into test_invalid_lsn_info values(126, 'name126', 136.111, 12600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,126]'); insert into test_invalid_lsn_info values(127, 'name127', 137.111, 12700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,127]'); insert into test_invalid_lsn_info values(128, 'name128', 138.111, 12800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,128]'); insert into test_invalid_lsn_info values(129, 'name129', 139.111, 12900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,129]'); insert into test_invalid_lsn_info values(130, 'name130', 140.111, 13000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,130]'); insert into test_invalid_lsn_info values(131, 'name131', 141.111, 13100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,131]'); insert into test_invalid_lsn_info values(132, 'name132', 142.111, 13200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,132]'); insert into test_invalid_lsn_info values(133, 'name133', 143.111, 13300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,133]'); insert into test_invalid_lsn_info values(134, 'name134', 144.111, 13400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,134]'); insert into test_invalid_lsn_info values(135, 'name135', 145.111, 13500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,135]'); insert into test_invalid_lsn_info values(136, 'name136', 146.111, 13600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,136]'); insert into test_invalid_lsn_info values(137, 'name137', 147.111, 13700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,137]'); insert into test_invalid_lsn_info values(138, 'name138', 148.111, 13800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,138]'); insert into test_invalid_lsn_info values(139, 'name139', 149.111, 13900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,139]'); insert into test_invalid_lsn_info values(140, 'name140', 150.111, 14000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,140]'); insert into test_invalid_lsn_info values(141, 'name141', 151.111, 14100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,141]'); insert into test_invalid_lsn_info values(142, 'name142', 152.111, 14200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,142]'); insert into test_invalid_lsn_info values(143, 'name143', 153.111, 14300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,143]'); insert into test_invalid_lsn_info values(144, 'name144', 154.111, 14400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,144]'); insert into test_invalid_lsn_info values(145, 'name145', 155.111, 14500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,145]'); insert into test_invalid_lsn_info values(146, 'name146', 156.111, 14600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,146]'); insert into test_invalid_lsn_info values(147, 'name147', 157.111, 14700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,147]'); insert into test_invalid_lsn_info values(148, 'name148', 158.111, 14800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,148]'); insert into test_invalid_lsn_info values(149, 'name149', 159.111, 14900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,149]'); insert into test_invalid_lsn_info values(150, 'name150', 160.111, 15000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,150]'); insert into test_invalid_lsn_info values(151, 'name151', 161.111, 15100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,151]'); insert into test_invalid_lsn_info values(152, 'name152', 162.111, 15200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,152]'); insert into test_invalid_lsn_info values(153, 'name153', 163.111, 15300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,153]'); insert into test_invalid_lsn_info values(154, 'name154', 164.111, 15400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,154]'); insert into test_invalid_lsn_info values(155, 'name155', 165.111, 15500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,155]'); insert into test_invalid_lsn_info values(156, 'name156', 166.111, 15600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,156]'); insert into test_invalid_lsn_info values(157, 'name157', 167.111, 15700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,157]'); insert into test_invalid_lsn_info values(158, 'name158', 168.111, 15800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,158]'); insert into test_invalid_lsn_info values(159, 'name159', 169.111, 15900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,159]'); insert into test_invalid_lsn_info values(160, 'name160', 170.111, 16000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,160]'); insert into test_invalid_lsn_info values(161, 'name161', 171.111, 16100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,161]'); insert into test_invalid_lsn_info values(162, 'name162', 172.111, 16200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,162]'); insert into test_invalid_lsn_info values(163, 'name163', 173.111, 16300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,163]'); insert into test_invalid_lsn_info values(164, 'name164', 174.111, 16400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,164]'); insert into test_invalid_lsn_info values(165, 'name165', 175.111, 16500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,165]'); insert into test_invalid_lsn_info values(166, 'name166', 176.111, 16600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,166]'); insert into test_invalid_lsn_info values(167, 'name167', 177.111, 16700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,167]'); insert into test_invalid_lsn_info values(168, 'name168', 178.111, 16800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,168]'); insert into test_invalid_lsn_info values(169, 'name169', 179.111, 16900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,169]'); insert into test_invalid_lsn_info values(170, 'name170', 180.111, 17000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,170]'); insert into test_invalid_lsn_info values(171, 'name171', 181.111, 17100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,171]'); insert into test_invalid_lsn_info values(172, 'name172', 182.111, 17200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,172]'); insert into test_invalid_lsn_info values(173, 'name173', 183.111, 17300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,173]'); insert into test_invalid_lsn_info values(174, 'name174', 184.111, 17400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,174]'); insert into test_invalid_lsn_info values(175, 'name175', 185.111, 17500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,175]'); insert into test_invalid_lsn_info values(176, 'name176', 186.111, 17600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,176]'); insert into test_invalid_lsn_info values(177, 'name177', 187.111, 17700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,177]'); insert into test_invalid_lsn_info values(178, 'name178', 188.111, 17800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,178]'); insert into test_invalid_lsn_info values(179, 'name179', 189.111, 17900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,179]'); insert into test_invalid_lsn_info values(180, 'name180', 190.111, 18000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,180]'); insert into test_invalid_lsn_info values(181, 'name181', 191.111, 18100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,181]'); insert into test_invalid_lsn_info values(182, 'name182', 192.111, 18200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,182]'); insert into test_invalid_lsn_info values(183, 'name183', 193.111, 18300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,183]'); insert into test_invalid_lsn_info values(184, 'name184', 194.111, 18400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,184]'); insert into test_invalid_lsn_info values(185, 'name185', 195.111, 18500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,185]'); insert into test_invalid_lsn_info values(186, 'name186', 196.111, 18600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,186]'); insert into test_invalid_lsn_info values(187, 'name187', 197.111, 18700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,187]'); insert into test_invalid_lsn_info values(188, 'name188', 198.111, 18800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,188]'); insert into test_invalid_lsn_info values(189, 'name189', 199.111, 18900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,189]'); insert into test_invalid_lsn_info values(190, 'name190', 200.111, 19000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,190]'); insert into test_invalid_lsn_info values(191, 'name191', 201.111, 19100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,191]'); insert into test_invalid_lsn_info values(192, 'name192', 202.111, 19200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,192]'); insert into test_invalid_lsn_info values(193, 'name193', 203.111, 19300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,193]'); insert into test_invalid_lsn_info values(194, 'name194', 204.111, 19400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,194]'); insert into test_invalid_lsn_info values(195, 'name195', 205.111, 19500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,195]'); insert into test_invalid_lsn_info values(196, 'name196', 206.111, 19600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,196]'); insert into test_invalid_lsn_info values(197, 'name197', 207.111, 19700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,197]'); insert into test_invalid_lsn_info values(198, 'name198', 208.111, 19800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,198]'); insert into test_invalid_lsn_info values(199, 'name199', 209.111, 19900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,199]'); insert into test_invalid_lsn_info values(200, 'name200', 210.111, 20000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,200]'); insert into test_invalid_lsn_info values(201, 'name201', 211.111, 20100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,201]'); insert into test_invalid_lsn_info values(202, 'name202', 212.111, 20200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,202]'); insert into test_invalid_lsn_info values(203, 'name203', 213.111, 20300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,203]'); insert into test_invalid_lsn_info values(204, 'name204', 214.111, 20400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,204]'); insert into test_invalid_lsn_info values(205, 'name205', 215.111, 20500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,205]'); insert into test_invalid_lsn_info values(206, 'name206', 216.111, 20600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,206]'); insert into test_invalid_lsn_info values(207, 'name207', 217.111, 20700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,207]'); insert into test_invalid_lsn_info values(208, 'name208', 218.111, 20800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,208]'); insert into test_invalid_lsn_info values(209, 'name209', 219.111, 20900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,209]'); insert into test_invalid_lsn_info values(210, 'name210', 220.111, 21000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,210]'); insert into test_invalid_lsn_info values(211, 'name211', 221.111, 21100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,211]'); insert into test_invalid_lsn_info values(212, 'name212', 222.111, 21200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,212]'); insert into test_invalid_lsn_info values(213, 'name213', 223.111, 21300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,213]'); insert into test_invalid_lsn_info values(214, 'name214', 224.111, 21400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,214]'); insert into test_invalid_lsn_info values(215, 'name215', 225.111, 21500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,215]'); insert into test_invalid_lsn_info values(216, 'name216', 226.111, 21600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,216]'); insert into test_invalid_lsn_info values(217, 'name217', 227.111, 21700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,217]'); insert into test_invalid_lsn_info values(218, 'name218', 228.111, 21800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,218]'); insert into test_invalid_lsn_info values(219, 'name219', 229.111, 21900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,219]'); insert into test_invalid_lsn_info values(220, 'name220', 230.111, 22000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,220]'); insert into test_invalid_lsn_info values(221, 'name221', 231.111, 22100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,221]'); insert into test_invalid_lsn_info values(222, 'name222', 232.111, 22200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,222]'); insert into test_invalid_lsn_info values(223, 'name223', 233.111, 22300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,223]'); insert into test_invalid_lsn_info values(224, 'name224', 234.111, 22400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,224]'); insert into test_invalid_lsn_info values(225, 'name225', 235.111, 22500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,225]'); insert into test_invalid_lsn_info values(226, 'name226', 236.111, 22600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,226]'); insert into test_invalid_lsn_info values(227, 'name227', 237.111, 22700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,227]'); insert into test_invalid_lsn_info values(228, 'name228', 238.111, 22800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,228]'); insert into test_invalid_lsn_info values(229, 'name229', 239.111, 22900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,229]'); insert into test_invalid_lsn_info values(230, 'name230', 240.111, 23000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,230]'); insert into test_invalid_lsn_info values(231, 'name231', 241.111, 23100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,231]'); insert into test_invalid_lsn_info values(232, 'name232', 242.111, 23200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,232]'); insert into test_invalid_lsn_info values(233, 'name233', 243.111, 23300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,233]'); insert into test_invalid_lsn_info values(234, 'name234', 244.111, 23400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,234]'); insert into test_invalid_lsn_info values(235, 'name235', 245.111, 23500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,235]'); insert into test_invalid_lsn_info values(236, 'name236', 246.111, 23600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,236]'); insert into test_invalid_lsn_info values(237, 'name237', 247.111, 23700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,237]'); insert into test_invalid_lsn_info values(238, 'name238', 248.111, 23800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,238]'); insert into test_invalid_lsn_info values(239, 'name239', 249.111, 23900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,239]'); insert into test_invalid_lsn_info values(240, 'name240', 250.111, 24000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,240]'); insert into test_invalid_lsn_info values(241, 'name241', 251.111, 24100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,241]'); insert into test_invalid_lsn_info values(242, 'name242', 252.111, 24200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,242]'); insert into test_invalid_lsn_info values(243, 'name243', 253.111, 24300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,243]'); insert into test_invalid_lsn_info values(244, 'name244', 254.111, 24400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,244]'); insert into test_invalid_lsn_info values(245, 'name245', 255.111, 24500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,245]'); insert into test_invalid_lsn_info values(246, 'name246', 256.111, 24600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,246]'); insert into test_invalid_lsn_info values(247, 'name247', 257.111, 24700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,247]'); insert into test_invalid_lsn_info values(248, 'name248', 258.111, 24800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,248]'); insert into test_invalid_lsn_info values(249, 'name249', 259.111, 24900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,249]'); insert into test_invalid_lsn_info values(250, 'name250', 260.111, 25000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,250]'); insert into test_invalid_lsn_info values(251, 'name251', 261.111, 25100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,251]'); insert into test_invalid_lsn_info values(252, 'name252', 262.111, 25200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,252]'); insert into test_invalid_lsn_info values(253, 'name253', 263.111, 25300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,253]'); insert into test_invalid_lsn_info values(254, 'name254', 264.111, 25400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,254]'); insert into test_invalid_lsn_info values(255, 'name255', 265.111, 25500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,255]'); insert into test_invalid_lsn_info values(256, 'name256', 266.111, 25600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,256]'); insert into test_invalid_lsn_info values(257, 'name257', 267.111, 25700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,257]'); insert into test_invalid_lsn_info values(258, 'name258', 268.111, 25800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,258]'); insert into test_invalid_lsn_info values(259, 'name259', 269.111, 25900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,259]'); insert into test_invalid_lsn_info values(260, 'name260', 270.111, 26000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,260]'); insert into test_invalid_lsn_info values(261, 'name261', 271.111, 26100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,261]'); insert into test_invalid_lsn_info values(262, 'name262', 272.111, 26200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,262]'); insert into test_invalid_lsn_info values(263, 'name263', 273.111, 26300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,263]'); insert into test_invalid_lsn_info values(264, 'name264', 274.111, 26400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,264]'); insert into test_invalid_lsn_info values(265, 'name265', 275.111, 26500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,265]'); insert into test_invalid_lsn_info values(266, 'name266', 276.111, 26600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,266]'); insert into test_invalid_lsn_info values(267, 'name267', 277.111, 26700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,267]'); insert into test_invalid_lsn_info values(268, 'name268', 278.111, 26800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,268]'); insert into test_invalid_lsn_info values(269, 'name269', 279.111, 26900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,269]'); insert into test_invalid_lsn_info values(270, 'name270', 280.111, 27000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,270]'); insert into test_invalid_lsn_info values(271, 'name271', 281.111, 27100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,271]'); insert into test_invalid_lsn_info values(272, 'name272', 282.111, 27200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,272]'); insert into test_invalid_lsn_info values(273, 'name273', 283.111, 27300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,273]'); insert into test_invalid_lsn_info values(274, 'name274', 284.111, 27400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,274]'); insert into test_invalid_lsn_info values(275, 'name275', 285.111, 27500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,275]'); insert into test_invalid_lsn_info values(276, 'name276', 286.111, 27600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,276]'); insert into test_invalid_lsn_info values(277, 'name277', 287.111, 27700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,277]'); insert into test_invalid_lsn_info values(278, 'name278', 288.111, 27800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,278]'); insert into test_invalid_lsn_info values(279, 'name279', 289.111, 27900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,279]'); insert into test_invalid_lsn_info values(280, 'name280', 290.111, 28000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,280]'); insert into test_invalid_lsn_info values(281, 'name281', 291.111, 28100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,281]'); insert into test_invalid_lsn_info values(282, 'name282', 292.111, 28200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,282]'); insert into test_invalid_lsn_info values(283, 'name283', 293.111, 28300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,283]'); insert into test_invalid_lsn_info values(284, 'name284', 294.111, 28400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,284]'); insert into test_invalid_lsn_info values(285, 'name285', 295.111, 28500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,285]'); insert into test_invalid_lsn_info values(286, 'name286', 296.111, 28600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,286]'); insert into test_invalid_lsn_info values(287, 'name287', 297.111, 28700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,287]'); insert into test_invalid_lsn_info values(288, 'name288', 298.111, 28800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,288]'); insert into test_invalid_lsn_info values(289, 'name289', 299.111, 28900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,289]'); insert into test_invalid_lsn_info values(290, 'name290', 300.111, 29000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,290]'); insert into test_invalid_lsn_info values(291, 'name291', 301.111, 29100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,291]'); insert into test_invalid_lsn_info values(292, 'name292', 302.111, 29200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,292]'); insert into test_invalid_lsn_info values(293, 'name293', 303.111, 29300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,293]'); insert into test_invalid_lsn_info values(294, 'name294', 304.111, 29400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,294]'); insert into test_invalid_lsn_info values(295, 'name295', 305.111, 29500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,295]'); insert into test_invalid_lsn_info values(296, 'name296', 306.111, 29600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,296]'); insert into test_invalid_lsn_info values(297, 'name297', 307.111, 29700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,297]'); insert into test_invalid_lsn_info values(298, 'name298', 308.111, 29800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,298]'); insert into test_invalid_lsn_info values(299, 'name299', 309.111, 29900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,299]'); insert into test_invalid_lsn_info values(300, 'name300', 310.111, 30000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,300]'); select count(*) from test_invalid_lsn_info; ================================================ FILE: tests/integration/data/test_multi_collections_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_multi_collections; create table if not exists test_multi_collections(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); insert into test_multi_collections values(1, 'name1', 11.111, 100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_multi_collections values(2, 'name2', 12.111, 200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_multi_collections values(3, 'name3', 13.111, 300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_multi_collections values(4, 'name4', 14.111, 400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); insert into test_multi_collections values(5, 'name5', 15.111, 500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_multi_collections values(6, 'name6', 16.111, 600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_multi_collections values(7, 'name7', 17.111, 700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); insert into test_multi_collections values(8, 'name8', 18.111, 800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8]'); insert into test_multi_collections values(9, 'name9', 19.111, 900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9]'); insert into test_multi_collections values(10, 'name10', 20.111, 1000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,10]'); insert into test_multi_collections values(11, 'name11', 21.111, 1100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,11]'); insert into test_multi_collections values(12, 'name12', 22.111, 1200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,12]'); insert into test_multi_collections values(13, 'name13', 23.111, 1300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,13]'); insert into test_multi_collections values(14, 'name14', 24.111, 1400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,14]'); insert into test_multi_collections values(15, 'name15', 25.111, 1500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,15]'); insert into test_multi_collections values(16, 'name16', 26.111, 1600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,16]'); insert into test_multi_collections values(17, 'name17', 27.111, 1700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,17]'); insert into test_multi_collections values(18, 'name18', 28.111, 1800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,18]'); insert into test_multi_collections values(19, 'name19', 29.111, 1900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,19]'); insert into test_multi_collections values(20, 'name20', 30.111, 2000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,20]'); insert into test_multi_collections values(21, 'name21', 31.111, 2100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,21]'); insert into test_multi_collections values(22, 'name22', 32.111, 2200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,22]'); insert into test_multi_collections values(23, 'name23', 33.111, 2300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,23]'); insert into test_multi_collections values(24, 'name24', 34.111, 2400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,24]'); insert into test_multi_collections values(25, 'name25', 35.111, 2500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,25]'); insert into test_multi_collections values(26, 'name26', 36.111, 2600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,26]'); insert into test_multi_collections values(27, 'name27', 37.111, 2700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,27]'); insert into test_multi_collections values(28, 'name28', 38.111, 2800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,28]'); insert into test_multi_collections values(29, 'name29', 39.111, 2900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,29]'); insert into test_multi_collections values(30, 'name30', 40.111, 3000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,30]'); insert into test_multi_collections values(31, 'name31', 41.111, 3100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,31]'); insert into test_multi_collections values(32, 'name32', 42.111, 3200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,32]'); insert into test_multi_collections values(33, 'name33', 43.111, 3300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,33]'); insert into test_multi_collections values(34, 'name34', 44.111, 3400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,34]'); insert into test_multi_collections values(35, 'name35', 45.111, 3500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,35]'); insert into test_multi_collections values(36, 'name36', 46.111, 3600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,36]'); insert into test_multi_collections values(37, 'name37', 47.111, 3700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,37]'); insert into test_multi_collections values(38, 'name38', 48.111, 3800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,38]'); insert into test_multi_collections values(39, 'name39', 49.111, 3900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,39]'); insert into test_multi_collections values(40, 'name40', 50.111, 4000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,40]'); insert into test_multi_collections values(41, 'name41', 51.111, 4100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,41]'); insert into test_multi_collections values(42, 'name42', 52.111, 4200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,42]'); insert into test_multi_collections values(43, 'name43', 53.111, 4300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,43]'); insert into test_multi_collections values(44, 'name44', 54.111, 4400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,44]'); insert into test_multi_collections values(45, 'name45', 55.111, 4500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,45]'); insert into test_multi_collections values(46, 'name46', 56.111, 4600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,46]'); insert into test_multi_collections values(47, 'name47', 57.111, 4700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,47]'); insert into test_multi_collections values(48, 'name48', 58.111, 4800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,48]'); insert into test_multi_collections values(49, 'name49', 59.111, 4900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,49]'); insert into test_multi_collections values(50, 'name50', 60.111, 5000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,50]'); insert into test_multi_collections values(51, 'name51', 61.111, 5100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,51]'); insert into test_multi_collections values(52, 'name52', 62.111, 5200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,52]'); insert into test_multi_collections values(53, 'name53', 63.111, 5300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,53]'); insert into test_multi_collections values(54, 'name54', 64.111, 5400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,54]'); insert into test_multi_collections values(55, 'name55', 65.111, 5500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,55]'); insert into test_multi_collections values(56, 'name56', 66.111, 5600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,56]'); insert into test_multi_collections values(57, 'name57', 67.111, 5700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,57]'); insert into test_multi_collections values(58, 'name58', 68.111, 5800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,58]'); insert into test_multi_collections values(59, 'name59', 69.111, 5900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,59]'); insert into test_multi_collections values(60, 'name60', 70.111, 6000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,60]'); insert into test_multi_collections values(61, 'name61', 71.111, 6100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,61]'); insert into test_multi_collections values(62, 'name62', 72.111, 6200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,62]'); insert into test_multi_collections values(63, 'name63', 73.111, 6300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,63]'); insert into test_multi_collections values(64, 'name64', 74.111, 6400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,64]'); insert into test_multi_collections values(65, 'name65', 75.111, 6500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,65]'); insert into test_multi_collections values(66, 'name66', 76.111, 6600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,66]'); insert into test_multi_collections values(67, 'name67', 77.111, 6700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,67]'); insert into test_multi_collections values(68, 'name68', 78.111, 6800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,68]'); insert into test_multi_collections values(69, 'name69', 79.111, 6900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,69]'); insert into test_multi_collections values(70, 'name70', 80.111, 7000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,70]'); insert into test_multi_collections values(71, 'name71', 81.111, 7100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,71]'); insert into test_multi_collections values(72, 'name72', 82.111, 7200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,72]'); insert into test_multi_collections values(73, 'name73', 83.111, 7300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,73]'); insert into test_multi_collections values(74, 'name74', 84.111, 7400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,74]'); insert into test_multi_collections values(75, 'name75', 85.111, 7500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,75]'); insert into test_multi_collections values(76, 'name76', 86.111, 7600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,76]'); insert into test_multi_collections values(77, 'name77', 87.111, 7700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,77]'); insert into test_multi_collections values(78, 'name78', 88.111, 7800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,78]'); insert into test_multi_collections values(79, 'name79', 89.111, 7900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,79]'); insert into test_multi_collections values(80, 'name80', 90.111, 8000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,80]'); insert into test_multi_collections values(81, 'name81', 91.111, 8100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,81]'); insert into test_multi_collections values(82, 'name82', 92.111, 8200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,82]'); insert into test_multi_collections values(83, 'name83', 93.111, 8300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,83]'); insert into test_multi_collections values(84, 'name84', 94.111, 8400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,84]'); insert into test_multi_collections values(85, 'name85', 95.111, 8500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,85]'); insert into test_multi_collections values(86, 'name86', 96.111, 8600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,86]'); insert into test_multi_collections values(87, 'name87', 97.111, 8700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,87]'); insert into test_multi_collections values(88, 'name88', 98.111, 8800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,88]'); insert into test_multi_collections values(89, 'name89', 99.111, 8900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,89]'); insert into test_multi_collections values(90, 'name90', 100.111, 9000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,90]'); insert into test_multi_collections values(91, 'name91', 101.111, 9100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,91]'); insert into test_multi_collections values(92, 'name92', 102.111, 9200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,92]'); insert into test_multi_collections values(93, 'name93', 103.111, 9300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,93]'); insert into test_multi_collections values(94, 'name94', 104.111, 9400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,94]'); insert into test_multi_collections values(95, 'name95', 105.111, 9500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,95]'); insert into test_multi_collections values(96, 'name96', 106.111, 9600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,96]'); insert into test_multi_collections values(97, 'name97', 107.111, 9700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,97]'); insert into test_multi_collections values(98, 'name98', 108.111, 9800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,98]'); insert into test_multi_collections values(99, 'name99', 109.111, 9900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,99]'); insert into test_multi_collections values(100, 'name100', 110.111, 10000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,100]'); select count(*) from test_multi_collections; ================================================ FILE: tests/integration/data/test_multi_collections_inc.sql ================================================ use test_db; insert into test_multi_collections values(101, 'name101', 111.111, 10100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,101]'); insert into test_multi_collections values(102, 'name102', 112.111, 10200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,102]'); insert into test_multi_collections values(103, 'name103', 113.111, 10300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,103]'); insert into test_multi_collections values(104, 'name104', 114.111, 10400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,104]'); insert into test_multi_collections values(105, 'name105', 115.111, 10500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,105]'); insert into test_multi_collections values(106, 'name106', 116.111, 10600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,106]'); insert into test_multi_collections values(107, 'name107', 117.111, 10700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,107]'); insert into test_multi_collections values(108, 'name108', 118.111, 10800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,108]'); insert into test_multi_collections values(109, 'name109', 119.111, 10900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,109]'); insert into test_multi_collections values(110, 'name110', 120.111, 11000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,110]'); insert into test_multi_collections values(111, 'name111', 121.111, 11100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,111]'); insert into test_multi_collections values(112, 'name112', 122.111, 11200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,112]'); insert into test_multi_collections values(113, 'name113', 123.111, 11300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,113]'); insert into test_multi_collections values(114, 'name114', 124.111, 11400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,114]'); insert into test_multi_collections values(115, 'name115', 125.111, 11500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,115]'); insert into test_multi_collections values(116, 'name116', 126.111, 11600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,116]'); insert into test_multi_collections values(117, 'name117', 127.111, 11700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,117]'); insert into test_multi_collections values(118, 'name118', 128.111, 11800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,118]'); insert into test_multi_collections values(119, 'name119', 129.111, 11900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,119]'); insert into test_multi_collections values(120, 'name120', 130.111, 12000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,120]'); insert into test_multi_collections values(121, 'name121', 131.111, 12100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,121]'); insert into test_multi_collections values(122, 'name122', 132.111, 12200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,122]'); insert into test_multi_collections values(123, 'name123', 133.111, 12300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,123]'); insert into test_multi_collections values(124, 'name124', 134.111, 12400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,124]'); insert into test_multi_collections values(125, 'name125', 135.111, 12500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,125]'); insert into test_multi_collections values(126, 'name126', 136.111, 12600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,126]'); insert into test_multi_collections values(127, 'name127', 137.111, 12700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,127]'); insert into test_multi_collections values(128, 'name128', 138.111, 12800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,128]'); insert into test_multi_collections values(129, 'name129', 139.111, 12900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,129]'); insert into test_multi_collections values(130, 'name130', 140.111, 13000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,130]'); insert into test_multi_collections values(131, 'name131', 141.111, 13100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,131]'); insert into test_multi_collections values(132, 'name132', 142.111, 13200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,132]'); insert into test_multi_collections values(133, 'name133', 143.111, 13300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,133]'); insert into test_multi_collections values(134, 'name134', 144.111, 13400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,134]'); insert into test_multi_collections values(135, 'name135', 145.111, 13500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,135]'); insert into test_multi_collections values(136, 'name136', 146.111, 13600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,136]'); insert into test_multi_collections values(137, 'name137', 147.111, 13700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,137]'); insert into test_multi_collections values(138, 'name138', 148.111, 13800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,138]'); insert into test_multi_collections values(139, 'name139', 149.111, 13900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,139]'); insert into test_multi_collections values(140, 'name140', 150.111, 14000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,140]'); insert into test_multi_collections values(141, 'name141', 151.111, 14100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,141]'); insert into test_multi_collections values(142, 'name142', 152.111, 14200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,142]'); insert into test_multi_collections values(143, 'name143', 153.111, 14300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,143]'); insert into test_multi_collections values(144, 'name144', 154.111, 14400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,144]'); insert into test_multi_collections values(145, 'name145', 155.111, 14500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,145]'); insert into test_multi_collections values(146, 'name146', 156.111, 14600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,146]'); insert into test_multi_collections values(147, 'name147', 157.111, 14700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,147]'); insert into test_multi_collections values(148, 'name148', 158.111, 14800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,148]'); insert into test_multi_collections values(149, 'name149', 159.111, 14900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,149]'); insert into test_multi_collections values(150, 'name150', 160.111, 15000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,150]'); insert into test_multi_collections values(151, 'name151', 161.111, 15100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,151]'); insert into test_multi_collections values(152, 'name152', 162.111, 15200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,152]'); insert into test_multi_collections values(153, 'name153', 163.111, 15300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,153]'); insert into test_multi_collections values(154, 'name154', 164.111, 15400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,154]'); insert into test_multi_collections values(155, 'name155', 165.111, 15500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,155]'); insert into test_multi_collections values(156, 'name156', 166.111, 15600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,156]'); insert into test_multi_collections values(157, 'name157', 167.111, 15700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,157]'); insert into test_multi_collections values(158, 'name158', 168.111, 15800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,158]'); insert into test_multi_collections values(159, 'name159', 169.111, 15900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,159]'); insert into test_multi_collections values(160, 'name160', 170.111, 16000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,160]'); insert into test_multi_collections values(161, 'name161', 171.111, 16100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,161]'); insert into test_multi_collections values(162, 'name162', 172.111, 16200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,162]'); insert into test_multi_collections values(163, 'name163', 173.111, 16300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,163]'); insert into test_multi_collections values(164, 'name164', 174.111, 16400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,164]'); insert into test_multi_collections values(165, 'name165', 175.111, 16500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,165]'); insert into test_multi_collections values(166, 'name166', 176.111, 16600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,166]'); insert into test_multi_collections values(167, 'name167', 177.111, 16700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,167]'); insert into test_multi_collections values(168, 'name168', 178.111, 16800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,168]'); insert into test_multi_collections values(169, 'name169', 179.111, 16900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,169]'); insert into test_multi_collections values(170, 'name170', 180.111, 17000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,170]'); insert into test_multi_collections values(171, 'name171', 181.111, 17100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,171]'); insert into test_multi_collections values(172, 'name172', 182.111, 17200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,172]'); insert into test_multi_collections values(173, 'name173', 183.111, 17300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,173]'); insert into test_multi_collections values(174, 'name174', 184.111, 17400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,174]'); insert into test_multi_collections values(175, 'name175', 185.111, 17500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,175]'); insert into test_multi_collections values(176, 'name176', 186.111, 17600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,176]'); insert into test_multi_collections values(177, 'name177', 187.111, 17700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,177]'); insert into test_multi_collections values(178, 'name178', 188.111, 17800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,178]'); insert into test_multi_collections values(179, 'name179', 189.111, 17900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,179]'); insert into test_multi_collections values(180, 'name180', 190.111, 18000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,180]'); insert into test_multi_collections values(181, 'name181', 191.111, 18100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,181]'); insert into test_multi_collections values(182, 'name182', 192.111, 18200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,182]'); insert into test_multi_collections values(183, 'name183', 193.111, 18300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,183]'); insert into test_multi_collections values(184, 'name184', 194.111, 18400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,184]'); insert into test_multi_collections values(185, 'name185', 195.111, 18500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,185]'); insert into test_multi_collections values(186, 'name186', 196.111, 18600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,186]'); insert into test_multi_collections values(187, 'name187', 197.111, 18700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,187]'); insert into test_multi_collections values(188, 'name188', 198.111, 18800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,188]'); insert into test_multi_collections values(189, 'name189', 199.111, 18900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,189]'); insert into test_multi_collections values(190, 'name190', 200.111, 19000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,190]'); insert into test_multi_collections values(191, 'name191', 201.111, 19100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,191]'); insert into test_multi_collections values(192, 'name192', 202.111, 19200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,192]'); insert into test_multi_collections values(193, 'name193', 203.111, 19300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,193]'); insert into test_multi_collections values(194, 'name194', 204.111, 19400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,194]'); insert into test_multi_collections values(195, 'name195', 205.111, 19500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,195]'); insert into test_multi_collections values(196, 'name196', 206.111, 19600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,196]'); insert into test_multi_collections values(197, 'name197', 207.111, 19700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,197]'); insert into test_multi_collections values(198, 'name198', 208.111, 19800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,198]'); insert into test_multi_collections values(199, 'name199', 209.111, 19900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,199]'); insert into test_multi_collections values(200, 'name200', 210.111, 20000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,200]'); insert into test_multi_collections values(201, 'name201', 211.111, 20100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,201]'); insert into test_multi_collections values(202, 'name202', 212.111, 20200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,202]'); insert into test_multi_collections values(203, 'name203', 213.111, 20300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,203]'); insert into test_multi_collections values(204, 'name204', 214.111, 20400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,204]'); insert into test_multi_collections values(205, 'name205', 215.111, 20500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,205]'); insert into test_multi_collections values(206, 'name206', 216.111, 20600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,206]'); insert into test_multi_collections values(207, 'name207', 217.111, 20700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,207]'); insert into test_multi_collections values(208, 'name208', 218.111, 20800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,208]'); insert into test_multi_collections values(209, 'name209', 219.111, 20900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,209]'); insert into test_multi_collections values(210, 'name210', 220.111, 21000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,210]'); insert into test_multi_collections values(211, 'name211', 221.111, 21100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,211]'); insert into test_multi_collections values(212, 'name212', 222.111, 21200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,212]'); insert into test_multi_collections values(213, 'name213', 223.111, 21300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,213]'); insert into test_multi_collections values(214, 'name214', 224.111, 21400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,214]'); insert into test_multi_collections values(215, 'name215', 225.111, 21500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,215]'); insert into test_multi_collections values(216, 'name216', 226.111, 21600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,216]'); insert into test_multi_collections values(217, 'name217', 227.111, 21700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,217]'); insert into test_multi_collections values(218, 'name218', 228.111, 21800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,218]'); insert into test_multi_collections values(219, 'name219', 229.111, 21900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,219]'); insert into test_multi_collections values(220, 'name220', 230.111, 22000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,220]'); insert into test_multi_collections values(221, 'name221', 231.111, 22100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,221]'); insert into test_multi_collections values(222, 'name222', 232.111, 22200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,222]'); insert into test_multi_collections values(223, 'name223', 233.111, 22300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,223]'); insert into test_multi_collections values(224, 'name224', 234.111, 22400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,224]'); insert into test_multi_collections values(225, 'name225', 235.111, 22500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,225]'); insert into test_multi_collections values(226, 'name226', 236.111, 22600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,226]'); insert into test_multi_collections values(227, 'name227', 237.111, 22700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,227]'); insert into test_multi_collections values(228, 'name228', 238.111, 22800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,228]'); insert into test_multi_collections values(229, 'name229', 239.111, 22900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,229]'); insert into test_multi_collections values(230, 'name230', 240.111, 23000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,230]'); insert into test_multi_collections values(231, 'name231', 241.111, 23100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,231]'); insert into test_multi_collections values(232, 'name232', 242.111, 23200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,232]'); insert into test_multi_collections values(233, 'name233', 243.111, 23300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,233]'); insert into test_multi_collections values(234, 'name234', 244.111, 23400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,234]'); insert into test_multi_collections values(235, 'name235', 245.111, 23500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,235]'); insert into test_multi_collections values(236, 'name236', 246.111, 23600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,236]'); insert into test_multi_collections values(237, 'name237', 247.111, 23700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,237]'); insert into test_multi_collections values(238, 'name238', 248.111, 23800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,238]'); insert into test_multi_collections values(239, 'name239', 249.111, 23900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,239]'); insert into test_multi_collections values(240, 'name240', 250.111, 24000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,240]'); insert into test_multi_collections values(241, 'name241', 251.111, 24100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,241]'); insert into test_multi_collections values(242, 'name242', 252.111, 24200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,242]'); insert into test_multi_collections values(243, 'name243', 253.111, 24300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,243]'); insert into test_multi_collections values(244, 'name244', 254.111, 24400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,244]'); insert into test_multi_collections values(245, 'name245', 255.111, 24500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,245]'); insert into test_multi_collections values(246, 'name246', 256.111, 24600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,246]'); insert into test_multi_collections values(247, 'name247', 257.111, 24700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,247]'); insert into test_multi_collections values(248, 'name248', 258.111, 24800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,248]'); insert into test_multi_collections values(249, 'name249', 259.111, 24900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,249]'); insert into test_multi_collections values(250, 'name250', 260.111, 25000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,250]'); insert into test_multi_collections values(251, 'name251', 261.111, 25100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,251]'); insert into test_multi_collections values(252, 'name252', 262.111, 25200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,252]'); insert into test_multi_collections values(253, 'name253', 263.111, 25300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,253]'); insert into test_multi_collections values(254, 'name254', 264.111, 25400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,254]'); insert into test_multi_collections values(255, 'name255', 265.111, 25500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,255]'); insert into test_multi_collections values(256, 'name256', 266.111, 25600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,256]'); insert into test_multi_collections values(257, 'name257', 267.111, 25700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,257]'); insert into test_multi_collections values(258, 'name258', 268.111, 25800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,258]'); insert into test_multi_collections values(259, 'name259', 269.111, 25900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,259]'); insert into test_multi_collections values(260, 'name260', 270.111, 26000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,260]'); insert into test_multi_collections values(261, 'name261', 271.111, 26100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,261]'); insert into test_multi_collections values(262, 'name262', 272.111, 26200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,262]'); insert into test_multi_collections values(263, 'name263', 273.111, 26300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,263]'); insert into test_multi_collections values(264, 'name264', 274.111, 26400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,264]'); insert into test_multi_collections values(265, 'name265', 275.111, 26500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,265]'); insert into test_multi_collections values(266, 'name266', 276.111, 26600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,266]'); insert into test_multi_collections values(267, 'name267', 277.111, 26700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,267]'); insert into test_multi_collections values(268, 'name268', 278.111, 26800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,268]'); insert into test_multi_collections values(269, 'name269', 279.111, 26900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,269]'); insert into test_multi_collections values(270, 'name270', 280.111, 27000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,270]'); insert into test_multi_collections values(271, 'name271', 281.111, 27100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,271]'); insert into test_multi_collections values(272, 'name272', 282.111, 27200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,272]'); insert into test_multi_collections values(273, 'name273', 283.111, 27300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,273]'); insert into test_multi_collections values(274, 'name274', 284.111, 27400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,274]'); insert into test_multi_collections values(275, 'name275', 285.111, 27500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,275]'); insert into test_multi_collections values(276, 'name276', 286.111, 27600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,276]'); insert into test_multi_collections values(277, 'name277', 287.111, 27700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,277]'); insert into test_multi_collections values(278, 'name278', 288.111, 27800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,278]'); insert into test_multi_collections values(279, 'name279', 289.111, 27900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,279]'); insert into test_multi_collections values(280, 'name280', 290.111, 28000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,280]'); insert into test_multi_collections values(281, 'name281', 291.111, 28100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,281]'); insert into test_multi_collections values(282, 'name282', 292.111, 28200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,282]'); insert into test_multi_collections values(283, 'name283', 293.111, 28300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,283]'); insert into test_multi_collections values(284, 'name284', 294.111, 28400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,284]'); insert into test_multi_collections values(285, 'name285', 295.111, 28500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,285]'); insert into test_multi_collections values(286, 'name286', 296.111, 28600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,286]'); insert into test_multi_collections values(287, 'name287', 297.111, 28700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,287]'); insert into test_multi_collections values(288, 'name288', 298.111, 28800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,288]'); insert into test_multi_collections values(289, 'name289', 299.111, 28900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,289]'); insert into test_multi_collections values(290, 'name290', 300.111, 29000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,290]'); insert into test_multi_collections values(291, 'name291', 301.111, 29100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,291]'); insert into test_multi_collections values(292, 'name292', 302.111, 29200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,292]'); insert into test_multi_collections values(293, 'name293', 303.111, 29300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,293]'); insert into test_multi_collections values(294, 'name294', 304.111, 29400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,294]'); insert into test_multi_collections values(295, 'name295', 305.111, 29500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,295]'); insert into test_multi_collections values(296, 'name296', 306.111, 29600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,296]'); insert into test_multi_collections values(297, 'name297', 307.111, 29700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,297]'); insert into test_multi_collections values(298, 'name298', 308.111, 29800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,298]'); insert into test_multi_collections values(299, 'name299', 309.111, 29900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,299]'); insert into test_multi_collections values(300, 'name300', 310.111, 30000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,300]'); select count(*) from test_multi_collections; ================================================ FILE: tests/integration/data/test_mysql_restart_with_create_collection_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_mysql_restart_with_create_collection; create table if not exists test_mysql_restart_with_create_collection(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); insert into test_mysql_restart_with_create_collection values(1, 'name1', 11.111, 100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_mysql_restart_with_create_collection values(2, 'name2', 12.111, 200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_mysql_restart_with_create_collection values(3, 'name3', 13.111, 300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_mysql_restart_with_create_collection values(4, 'name4', 14.111, 400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); insert into test_mysql_restart_with_create_collection values(5, 'name5', 15.111, 500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_mysql_restart_with_create_collection values(6, 'name6', 16.111, 600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_mysql_restart_with_create_collection values(7, 'name7', 17.111, 700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); insert into test_mysql_restart_with_create_collection values(8, 'name8', 18.111, 800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8]'); insert into test_mysql_restart_with_create_collection values(9, 'name9', 19.111, 900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9]'); insert into test_mysql_restart_with_create_collection values(10, 'name10', 20.111, 1000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,10]'); insert into test_mysql_restart_with_create_collection values(11, 'name11', 21.111, 1100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,11]'); insert into test_mysql_restart_with_create_collection values(12, 'name12', 22.111, 1200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,12]'); insert into test_mysql_restart_with_create_collection values(13, 'name13', 23.111, 1300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,13]'); insert into test_mysql_restart_with_create_collection values(14, 'name14', 24.111, 1400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,14]'); insert into test_mysql_restart_with_create_collection values(15, 'name15', 25.111, 1500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,15]'); insert into test_mysql_restart_with_create_collection values(16, 'name16', 26.111, 1600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,16]'); insert into test_mysql_restart_with_create_collection values(17, 'name17', 27.111, 1700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,17]'); insert into test_mysql_restart_with_create_collection values(18, 'name18', 28.111, 1800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,18]'); insert into test_mysql_restart_with_create_collection values(19, 'name19', 29.111, 1900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,19]'); insert into test_mysql_restart_with_create_collection values(20, 'name20', 30.111, 2000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,20]'); insert into test_mysql_restart_with_create_collection values(21, 'name21', 31.111, 2100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,21]'); insert into test_mysql_restart_with_create_collection values(22, 'name22', 32.111, 2200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,22]'); insert into test_mysql_restart_with_create_collection values(23, 'name23', 33.111, 2300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,23]'); insert into test_mysql_restart_with_create_collection values(24, 'name24', 34.111, 2400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,24]'); insert into test_mysql_restart_with_create_collection values(25, 'name25', 35.111, 2500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,25]'); insert into test_mysql_restart_with_create_collection values(26, 'name26', 36.111, 2600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,26]'); insert into test_mysql_restart_with_create_collection values(27, 'name27', 37.111, 2700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,27]'); insert into test_mysql_restart_with_create_collection values(28, 'name28', 38.111, 2800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,28]'); insert into test_mysql_restart_with_create_collection values(29, 'name29', 39.111, 2900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,29]'); insert into test_mysql_restart_with_create_collection values(30, 'name30', 40.111, 3000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,30]'); insert into test_mysql_restart_with_create_collection values(31, 'name31', 41.111, 3100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,31]'); insert into test_mysql_restart_with_create_collection values(32, 'name32', 42.111, 3200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,32]'); insert into test_mysql_restart_with_create_collection values(33, 'name33', 43.111, 3300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,33]'); insert into test_mysql_restart_with_create_collection values(34, 'name34', 44.111, 3400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,34]'); insert into test_mysql_restart_with_create_collection values(35, 'name35', 45.111, 3500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,35]'); insert into test_mysql_restart_with_create_collection values(36, 'name36', 46.111, 3600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,36]'); insert into test_mysql_restart_with_create_collection values(37, 'name37', 47.111, 3700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,37]'); insert into test_mysql_restart_with_create_collection values(38, 'name38', 48.111, 3800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,38]'); insert into test_mysql_restart_with_create_collection values(39, 'name39', 49.111, 3900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,39]'); insert into test_mysql_restart_with_create_collection values(40, 'name40', 50.111, 4000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,40]'); insert into test_mysql_restart_with_create_collection values(41, 'name41', 51.111, 4100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,41]'); insert into test_mysql_restart_with_create_collection values(42, 'name42', 52.111, 4200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,42]'); insert into test_mysql_restart_with_create_collection values(43, 'name43', 53.111, 4300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,43]'); insert into test_mysql_restart_with_create_collection values(44, 'name44', 54.111, 4400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,44]'); insert into test_mysql_restart_with_create_collection values(45, 'name45', 55.111, 4500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,45]'); insert into test_mysql_restart_with_create_collection values(46, 'name46', 56.111, 4600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,46]'); insert into test_mysql_restart_with_create_collection values(47, 'name47', 57.111, 4700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,47]'); insert into test_mysql_restart_with_create_collection values(48, 'name48', 58.111, 4800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,48]'); insert into test_mysql_restart_with_create_collection values(49, 'name49', 59.111, 4900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,49]'); insert into test_mysql_restart_with_create_collection values(50, 'name50', 60.111, 5000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,50]'); insert into test_mysql_restart_with_create_collection values(51, 'name51', 61.111, 5100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,51]'); insert into test_mysql_restart_with_create_collection values(52, 'name52', 62.111, 5200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,52]'); insert into test_mysql_restart_with_create_collection values(53, 'name53', 63.111, 5300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,53]'); insert into test_mysql_restart_with_create_collection values(54, 'name54', 64.111, 5400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,54]'); insert into test_mysql_restart_with_create_collection values(55, 'name55', 65.111, 5500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,55]'); insert into test_mysql_restart_with_create_collection values(56, 'name56', 66.111, 5600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,56]'); insert into test_mysql_restart_with_create_collection values(57, 'name57', 67.111, 5700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,57]'); insert into test_mysql_restart_with_create_collection values(58, 'name58', 68.111, 5800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,58]'); insert into test_mysql_restart_with_create_collection values(59, 'name59', 69.111, 5900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,59]'); insert into test_mysql_restart_with_create_collection values(60, 'name60', 70.111, 6000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,60]'); insert into test_mysql_restart_with_create_collection values(61, 'name61', 71.111, 6100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,61]'); insert into test_mysql_restart_with_create_collection values(62, 'name62', 72.111, 6200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,62]'); insert into test_mysql_restart_with_create_collection values(63, 'name63', 73.111, 6300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,63]'); insert into test_mysql_restart_with_create_collection values(64, 'name64', 74.111, 6400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,64]'); insert into test_mysql_restart_with_create_collection values(65, 'name65', 75.111, 6500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,65]'); insert into test_mysql_restart_with_create_collection values(66, 'name66', 76.111, 6600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,66]'); insert into test_mysql_restart_with_create_collection values(67, 'name67', 77.111, 6700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,67]'); insert into test_mysql_restart_with_create_collection values(68, 'name68', 78.111, 6800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,68]'); insert into test_mysql_restart_with_create_collection values(69, 'name69', 79.111, 6900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,69]'); insert into test_mysql_restart_with_create_collection values(70, 'name70', 80.111, 7000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,70]'); insert into test_mysql_restart_with_create_collection values(71, 'name71', 81.111, 7100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,71]'); insert into test_mysql_restart_with_create_collection values(72, 'name72', 82.111, 7200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,72]'); insert into test_mysql_restart_with_create_collection values(73, 'name73', 83.111, 7300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,73]'); insert into test_mysql_restart_with_create_collection values(74, 'name74', 84.111, 7400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,74]'); insert into test_mysql_restart_with_create_collection values(75, 'name75', 85.111, 7500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,75]'); insert into test_mysql_restart_with_create_collection values(76, 'name76', 86.111, 7600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,76]'); insert into test_mysql_restart_with_create_collection values(77, 'name77', 87.111, 7700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,77]'); insert into test_mysql_restart_with_create_collection values(78, 'name78', 88.111, 7800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,78]'); insert into test_mysql_restart_with_create_collection values(79, 'name79', 89.111, 7900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,79]'); insert into test_mysql_restart_with_create_collection values(80, 'name80', 90.111, 8000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,80]'); insert into test_mysql_restart_with_create_collection values(81, 'name81', 91.111, 8100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,81]'); insert into test_mysql_restart_with_create_collection values(82, 'name82', 92.111, 8200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,82]'); insert into test_mysql_restart_with_create_collection values(83, 'name83', 93.111, 8300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,83]'); insert into test_mysql_restart_with_create_collection values(84, 'name84', 94.111, 8400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,84]'); insert into test_mysql_restart_with_create_collection values(85, 'name85', 95.111, 8500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,85]'); insert into test_mysql_restart_with_create_collection values(86, 'name86', 96.111, 8600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,86]'); insert into test_mysql_restart_with_create_collection values(87, 'name87', 97.111, 8700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,87]'); insert into test_mysql_restart_with_create_collection values(88, 'name88', 98.111, 8800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,88]'); insert into test_mysql_restart_with_create_collection values(89, 'name89', 99.111, 8900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,89]'); insert into test_mysql_restart_with_create_collection values(90, 'name90', 100.111, 9000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,90]'); insert into test_mysql_restart_with_create_collection values(91, 'name91', 101.111, 9100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,91]'); insert into test_mysql_restart_with_create_collection values(92, 'name92', 102.111, 9200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,92]'); insert into test_mysql_restart_with_create_collection values(93, 'name93', 103.111, 9300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,93]'); insert into test_mysql_restart_with_create_collection values(94, 'name94', 104.111, 9400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,94]'); insert into test_mysql_restart_with_create_collection values(95, 'name95', 105.111, 9500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,95]'); insert into test_mysql_restart_with_create_collection values(96, 'name96', 106.111, 9600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,96]'); insert into test_mysql_restart_with_create_collection values(97, 'name97', 107.111, 9700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,97]'); insert into test_mysql_restart_with_create_collection values(98, 'name98', 108.111, 9800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,98]'); insert into test_mysql_restart_with_create_collection values(99, 'name99', 109.111, 9900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,99]'); insert into test_mysql_restart_with_create_collection values(100, 'name100', 110.111, 10000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,100]'); select count(*) from test_mysql_restart_with_create_collection; ================================================ FILE: tests/integration/data/test_mysql_restart_with_full_mode_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_mysql_restart_with_full_mode; create table if not exists test_mysql_restart_with_full_mode(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); insert into test_mysql_restart_with_full_mode values(1, 'name1', 11.111, 100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_mysql_restart_with_full_mode values(2, 'name2', 12.111, 200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_mysql_restart_with_full_mode values(3, 'name3', 13.111, 300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_mysql_restart_with_full_mode values(4, 'name4', 14.111, 400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); insert into test_mysql_restart_with_full_mode values(5, 'name5', 15.111, 500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_mysql_restart_with_full_mode values(6, 'name6', 16.111, 600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_mysql_restart_with_full_mode values(7, 'name7', 17.111, 700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); insert into test_mysql_restart_with_full_mode values(8, 'name8', 18.111, 800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8]'); insert into test_mysql_restart_with_full_mode values(9, 'name9', 19.111, 900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9]'); insert into test_mysql_restart_with_full_mode values(10, 'name10', 20.111, 1000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,10]'); insert into test_mysql_restart_with_full_mode values(11, 'name11', 21.111, 1100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,11]'); insert into test_mysql_restart_with_full_mode values(12, 'name12', 22.111, 1200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,12]'); insert into test_mysql_restart_with_full_mode values(13, 'name13', 23.111, 1300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,13]'); insert into test_mysql_restart_with_full_mode values(14, 'name14', 24.111, 1400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,14]'); insert into test_mysql_restart_with_full_mode values(15, 'name15', 25.111, 1500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,15]'); insert into test_mysql_restart_with_full_mode values(16, 'name16', 26.111, 1600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,16]'); insert into test_mysql_restart_with_full_mode values(17, 'name17', 27.111, 1700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,17]'); insert into test_mysql_restart_with_full_mode values(18, 'name18', 28.111, 1800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,18]'); insert into test_mysql_restart_with_full_mode values(19, 'name19', 29.111, 1900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,19]'); insert into test_mysql_restart_with_full_mode values(20, 'name20', 30.111, 2000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,20]'); insert into test_mysql_restart_with_full_mode values(21, 'name21', 31.111, 2100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,21]'); insert into test_mysql_restart_with_full_mode values(22, 'name22', 32.111, 2200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,22]'); insert into test_mysql_restart_with_full_mode values(23, 'name23', 33.111, 2300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,23]'); insert into test_mysql_restart_with_full_mode values(24, 'name24', 34.111, 2400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,24]'); insert into test_mysql_restart_with_full_mode values(25, 'name25', 35.111, 2500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,25]'); insert into test_mysql_restart_with_full_mode values(26, 'name26', 36.111, 2600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,26]'); insert into test_mysql_restart_with_full_mode values(27, 'name27', 37.111, 2700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,27]'); insert into test_mysql_restart_with_full_mode values(28, 'name28', 38.111, 2800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,28]'); insert into test_mysql_restart_with_full_mode values(29, 'name29', 39.111, 2900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,29]'); insert into test_mysql_restart_with_full_mode values(30, 'name30', 40.111, 3000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,30]'); insert into test_mysql_restart_with_full_mode values(31, 'name31', 41.111, 3100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,31]'); insert into test_mysql_restart_with_full_mode values(32, 'name32', 42.111, 3200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,32]'); insert into test_mysql_restart_with_full_mode values(33, 'name33', 43.111, 3300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,33]'); insert into test_mysql_restart_with_full_mode values(34, 'name34', 44.111, 3400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,34]'); insert into test_mysql_restart_with_full_mode values(35, 'name35', 45.111, 3500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,35]'); insert into test_mysql_restart_with_full_mode values(36, 'name36', 46.111, 3600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,36]'); insert into test_mysql_restart_with_full_mode values(37, 'name37', 47.111, 3700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,37]'); insert into test_mysql_restart_with_full_mode values(38, 'name38', 48.111, 3800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,38]'); insert into test_mysql_restart_with_full_mode values(39, 'name39', 49.111, 3900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,39]'); insert into test_mysql_restart_with_full_mode values(40, 'name40', 50.111, 4000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,40]'); insert into test_mysql_restart_with_full_mode values(41, 'name41', 51.111, 4100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,41]'); insert into test_mysql_restart_with_full_mode values(42, 'name42', 52.111, 4200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,42]'); insert into test_mysql_restart_with_full_mode values(43, 'name43', 53.111, 4300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,43]'); insert into test_mysql_restart_with_full_mode values(44, 'name44', 54.111, 4400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,44]'); insert into test_mysql_restart_with_full_mode values(45, 'name45', 55.111, 4500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,45]'); insert into test_mysql_restart_with_full_mode values(46, 'name46', 56.111, 4600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,46]'); insert into test_mysql_restart_with_full_mode values(47, 'name47', 57.111, 4700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,47]'); insert into test_mysql_restart_with_full_mode values(48, 'name48', 58.111, 4800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,48]'); insert into test_mysql_restart_with_full_mode values(49, 'name49', 59.111, 4900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,49]'); insert into test_mysql_restart_with_full_mode values(50, 'name50', 60.111, 5000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,50]'); insert into test_mysql_restart_with_full_mode values(51, 'name51', 61.111, 5100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,51]'); insert into test_mysql_restart_with_full_mode values(52, 'name52', 62.111, 5200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,52]'); insert into test_mysql_restart_with_full_mode values(53, 'name53', 63.111, 5300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,53]'); insert into test_mysql_restart_with_full_mode values(54, 'name54', 64.111, 5400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,54]'); insert into test_mysql_restart_with_full_mode values(55, 'name55', 65.111, 5500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,55]'); insert into test_mysql_restart_with_full_mode values(56, 'name56', 66.111, 5600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,56]'); insert into test_mysql_restart_with_full_mode values(57, 'name57', 67.111, 5700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,57]'); insert into test_mysql_restart_with_full_mode values(58, 'name58', 68.111, 5800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,58]'); insert into test_mysql_restart_with_full_mode values(59, 'name59', 69.111, 5900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,59]'); insert into test_mysql_restart_with_full_mode values(60, 'name60', 70.111, 6000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,60]'); insert into test_mysql_restart_with_full_mode values(61, 'name61', 71.111, 6100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,61]'); insert into test_mysql_restart_with_full_mode values(62, 'name62', 72.111, 6200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,62]'); insert into test_mysql_restart_with_full_mode values(63, 'name63', 73.111, 6300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,63]'); insert into test_mysql_restart_with_full_mode values(64, 'name64', 74.111, 6400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,64]'); insert into test_mysql_restart_with_full_mode values(65, 'name65', 75.111, 6500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,65]'); insert into test_mysql_restart_with_full_mode values(66, 'name66', 76.111, 6600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,66]'); insert into test_mysql_restart_with_full_mode values(67, 'name67', 77.111, 6700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,67]'); insert into test_mysql_restart_with_full_mode values(68, 'name68', 78.111, 6800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,68]'); insert into test_mysql_restart_with_full_mode values(69, 'name69', 79.111, 6900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,69]'); insert into test_mysql_restart_with_full_mode values(70, 'name70', 80.111, 7000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,70]'); insert into test_mysql_restart_with_full_mode values(71, 'name71', 81.111, 7100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,71]'); insert into test_mysql_restart_with_full_mode values(72, 'name72', 82.111, 7200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,72]'); insert into test_mysql_restart_with_full_mode values(73, 'name73', 83.111, 7300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,73]'); insert into test_mysql_restart_with_full_mode values(74, 'name74', 84.111, 7400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,74]'); insert into test_mysql_restart_with_full_mode values(75, 'name75', 85.111, 7500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,75]'); insert into test_mysql_restart_with_full_mode values(76, 'name76', 86.111, 7600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,76]'); insert into test_mysql_restart_with_full_mode values(77, 'name77', 87.111, 7700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,77]'); insert into test_mysql_restart_with_full_mode values(78, 'name78', 88.111, 7800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,78]'); insert into test_mysql_restart_with_full_mode values(79, 'name79', 89.111, 7900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,79]'); insert into test_mysql_restart_with_full_mode values(80, 'name80', 90.111, 8000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,80]'); insert into test_mysql_restart_with_full_mode values(81, 'name81', 91.111, 8100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,81]'); insert into test_mysql_restart_with_full_mode values(82, 'name82', 92.111, 8200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,82]'); insert into test_mysql_restart_with_full_mode values(83, 'name83', 93.111, 8300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,83]'); insert into test_mysql_restart_with_full_mode values(84, 'name84', 94.111, 8400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,84]'); insert into test_mysql_restart_with_full_mode values(85, 'name85', 95.111, 8500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,85]'); insert into test_mysql_restart_with_full_mode values(86, 'name86', 96.111, 8600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,86]'); insert into test_mysql_restart_with_full_mode values(87, 'name87', 97.111, 8700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,87]'); insert into test_mysql_restart_with_full_mode values(88, 'name88', 98.111, 8800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,88]'); insert into test_mysql_restart_with_full_mode values(89, 'name89', 99.111, 8900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,89]'); insert into test_mysql_restart_with_full_mode values(90, 'name90', 100.111, 9000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,90]'); insert into test_mysql_restart_with_full_mode values(91, 'name91', 101.111, 9100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,91]'); insert into test_mysql_restart_with_full_mode values(92, 'name92', 102.111, 9200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,92]'); insert into test_mysql_restart_with_full_mode values(93, 'name93', 103.111, 9300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,93]'); insert into test_mysql_restart_with_full_mode values(94, 'name94', 104.111, 9400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,94]'); insert into test_mysql_restart_with_full_mode values(95, 'name95', 105.111, 9500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,95]'); insert into test_mysql_restart_with_full_mode values(96, 'name96', 106.111, 9600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,96]'); insert into test_mysql_restart_with_full_mode values(97, 'name97', 107.111, 9700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,97]'); insert into test_mysql_restart_with_full_mode values(98, 'name98', 108.111, 9800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,98]'); insert into test_mysql_restart_with_full_mode values(99, 'name99', 109.111, 9900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,99]'); insert into test_mysql_restart_with_full_mode values(100, 'name100', 110.111, 10000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,100]'); insert into test_mysql_restart_with_full_mode values(101, 'name101', 111.111, 10100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,101]'); insert into test_mysql_restart_with_full_mode values(102, 'name102', 112.111, 10200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,102]'); insert into test_mysql_restart_with_full_mode values(103, 'name103', 113.111, 10300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,103]'); insert into test_mysql_restart_with_full_mode values(104, 'name104', 114.111, 10400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,104]'); insert into test_mysql_restart_with_full_mode values(105, 'name105', 115.111, 10500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,105]'); insert into test_mysql_restart_with_full_mode values(106, 'name106', 116.111, 10600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,106]'); insert into test_mysql_restart_with_full_mode values(107, 'name107', 117.111, 10700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,107]'); insert into test_mysql_restart_with_full_mode values(108, 'name108', 118.111, 10800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,108]'); insert into test_mysql_restart_with_full_mode values(109, 'name109', 119.111, 10900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,109]'); insert into test_mysql_restart_with_full_mode values(110, 'name110', 120.111, 11000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,110]'); insert into test_mysql_restart_with_full_mode values(111, 'name111', 121.111, 11100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,111]'); insert into test_mysql_restart_with_full_mode values(112, 'name112', 122.111, 11200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,112]'); insert into test_mysql_restart_with_full_mode values(113, 'name113', 123.111, 11300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,113]'); insert into test_mysql_restart_with_full_mode values(114, 'name114', 124.111, 11400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,114]'); insert into test_mysql_restart_with_full_mode values(115, 'name115', 125.111, 11500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,115]'); insert into test_mysql_restart_with_full_mode values(116, 'name116', 126.111, 11600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,116]'); insert into test_mysql_restart_with_full_mode values(117, 'name117', 127.111, 11700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,117]'); insert into test_mysql_restart_with_full_mode values(118, 'name118', 128.111, 11800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,118]'); insert into test_mysql_restart_with_full_mode values(119, 'name119', 129.111, 11900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,119]'); insert into test_mysql_restart_with_full_mode values(120, 'name120', 130.111, 12000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,120]'); insert into test_mysql_restart_with_full_mode values(121, 'name121', 131.111, 12100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,121]'); insert into test_mysql_restart_with_full_mode values(122, 'name122', 132.111, 12200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,122]'); insert into test_mysql_restart_with_full_mode values(123, 'name123', 133.111, 12300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,123]'); insert into test_mysql_restart_with_full_mode values(124, 'name124', 134.111, 12400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,124]'); insert into test_mysql_restart_with_full_mode values(125, 'name125', 135.111, 12500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,125]'); insert into test_mysql_restart_with_full_mode values(126, 'name126', 136.111, 12600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,126]'); insert into test_mysql_restart_with_full_mode values(127, 'name127', 137.111, 12700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,127]'); insert into test_mysql_restart_with_full_mode values(128, 'name128', 138.111, 12800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,128]'); insert into test_mysql_restart_with_full_mode values(129, 'name129', 139.111, 12900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,129]'); insert into test_mysql_restart_with_full_mode values(130, 'name130', 140.111, 13000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,130]'); insert into test_mysql_restart_with_full_mode values(131, 'name131', 141.111, 13100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,131]'); insert into test_mysql_restart_with_full_mode values(132, 'name132', 142.111, 13200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,132]'); insert into test_mysql_restart_with_full_mode values(133, 'name133', 143.111, 13300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,133]'); insert into test_mysql_restart_with_full_mode values(134, 'name134', 144.111, 13400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,134]'); insert into test_mysql_restart_with_full_mode values(135, 'name135', 145.111, 13500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,135]'); insert into test_mysql_restart_with_full_mode values(136, 'name136', 146.111, 13600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,136]'); insert into test_mysql_restart_with_full_mode values(137, 'name137', 147.111, 13700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,137]'); insert into test_mysql_restart_with_full_mode values(138, 'name138', 148.111, 13800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,138]'); insert into test_mysql_restart_with_full_mode values(139, 'name139', 149.111, 13900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,139]'); insert into test_mysql_restart_with_full_mode values(140, 'name140', 150.111, 14000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,140]'); insert into test_mysql_restart_with_full_mode values(141, 'name141', 151.111, 14100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,141]'); insert into test_mysql_restart_with_full_mode values(142, 'name142', 152.111, 14200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,142]'); insert into test_mysql_restart_with_full_mode values(143, 'name143', 153.111, 14300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,143]'); insert into test_mysql_restart_with_full_mode values(144, 'name144', 154.111, 14400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,144]'); insert into test_mysql_restart_with_full_mode values(145, 'name145', 155.111, 14500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,145]'); insert into test_mysql_restart_with_full_mode values(146, 'name146', 156.111, 14600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,146]'); insert into test_mysql_restart_with_full_mode values(147, 'name147', 157.111, 14700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,147]'); insert into test_mysql_restart_with_full_mode values(148, 'name148', 158.111, 14800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,148]'); insert into test_mysql_restart_with_full_mode values(149, 'name149', 159.111, 14900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,149]'); insert into test_mysql_restart_with_full_mode values(150, 'name150', 160.111, 15000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,150]'); insert into test_mysql_restart_with_full_mode values(151, 'name151', 161.111, 15100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,151]'); insert into test_mysql_restart_with_full_mode values(152, 'name152', 162.111, 15200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,152]'); insert into test_mysql_restart_with_full_mode values(153, 'name153', 163.111, 15300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,153]'); insert into test_mysql_restart_with_full_mode values(154, 'name154', 164.111, 15400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,154]'); insert into test_mysql_restart_with_full_mode values(155, 'name155', 165.111, 15500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,155]'); insert into test_mysql_restart_with_full_mode values(156, 'name156', 166.111, 15600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,156]'); insert into test_mysql_restart_with_full_mode values(157, 'name157', 167.111, 15700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,157]'); insert into test_mysql_restart_with_full_mode values(158, 'name158', 168.111, 15800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,158]'); insert into test_mysql_restart_with_full_mode values(159, 'name159', 169.111, 15900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,159]'); insert into test_mysql_restart_with_full_mode values(160, 'name160', 170.111, 16000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,160]'); insert into test_mysql_restart_with_full_mode values(161, 'name161', 171.111, 16100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,161]'); insert into test_mysql_restart_with_full_mode values(162, 'name162', 172.111, 16200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,162]'); insert into test_mysql_restart_with_full_mode values(163, 'name163', 173.111, 16300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,163]'); insert into test_mysql_restart_with_full_mode values(164, 'name164', 174.111, 16400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,164]'); insert into test_mysql_restart_with_full_mode values(165, 'name165', 175.111, 16500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,165]'); insert into test_mysql_restart_with_full_mode values(166, 'name166', 176.111, 16600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,166]'); insert into test_mysql_restart_with_full_mode values(167, 'name167', 177.111, 16700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,167]'); insert into test_mysql_restart_with_full_mode values(168, 'name168', 178.111, 16800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,168]'); insert into test_mysql_restart_with_full_mode values(169, 'name169', 179.111, 16900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,169]'); insert into test_mysql_restart_with_full_mode values(170, 'name170', 180.111, 17000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,170]'); insert into test_mysql_restart_with_full_mode values(171, 'name171', 181.111, 17100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,171]'); insert into test_mysql_restart_with_full_mode values(172, 'name172', 182.111, 17200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,172]'); insert into test_mysql_restart_with_full_mode values(173, 'name173', 183.111, 17300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,173]'); insert into test_mysql_restart_with_full_mode values(174, 'name174', 184.111, 17400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,174]'); insert into test_mysql_restart_with_full_mode values(175, 'name175', 185.111, 17500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,175]'); insert into test_mysql_restart_with_full_mode values(176, 'name176', 186.111, 17600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,176]'); insert into test_mysql_restart_with_full_mode values(177, 'name177', 187.111, 17700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,177]'); insert into test_mysql_restart_with_full_mode values(178, 'name178', 188.111, 17800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,178]'); insert into test_mysql_restart_with_full_mode values(179, 'name179', 189.111, 17900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,179]'); insert into test_mysql_restart_with_full_mode values(180, 'name180', 190.111, 18000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,180]'); insert into test_mysql_restart_with_full_mode values(181, 'name181', 191.111, 18100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,181]'); insert into test_mysql_restart_with_full_mode values(182, 'name182', 192.111, 18200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,182]'); insert into test_mysql_restart_with_full_mode values(183, 'name183', 193.111, 18300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,183]'); insert into test_mysql_restart_with_full_mode values(184, 'name184', 194.111, 18400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,184]'); insert into test_mysql_restart_with_full_mode values(185, 'name185', 195.111, 18500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,185]'); insert into test_mysql_restart_with_full_mode values(186, 'name186', 196.111, 18600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,186]'); insert into test_mysql_restart_with_full_mode values(187, 'name187', 197.111, 18700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,187]'); insert into test_mysql_restart_with_full_mode values(188, 'name188', 198.111, 18800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,188]'); insert into test_mysql_restart_with_full_mode values(189, 'name189', 199.111, 18900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,189]'); insert into test_mysql_restart_with_full_mode values(190, 'name190', 200.111, 19000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,190]'); insert into test_mysql_restart_with_full_mode values(191, 'name191', 201.111, 19100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,191]'); insert into test_mysql_restart_with_full_mode values(192, 'name192', 202.111, 19200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,192]'); insert into test_mysql_restart_with_full_mode values(193, 'name193', 203.111, 19300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,193]'); insert into test_mysql_restart_with_full_mode values(194, 'name194', 204.111, 19400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,194]'); insert into test_mysql_restart_with_full_mode values(195, 'name195', 205.111, 19500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,195]'); insert into test_mysql_restart_with_full_mode values(196, 'name196', 206.111, 19600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,196]'); insert into test_mysql_restart_with_full_mode values(197, 'name197', 207.111, 19700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,197]'); insert into test_mysql_restart_with_full_mode values(198, 'name198', 208.111, 19800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,198]'); insert into test_mysql_restart_with_full_mode values(199, 'name199', 209.111, 19900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,199]'); insert into test_mysql_restart_with_full_mode values(200, 'name200', 210.111, 20000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,200]'); insert into test_mysql_restart_with_full_mode values(201, 'name201', 211.111, 20100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,201]'); insert into test_mysql_restart_with_full_mode values(202, 'name202', 212.111, 20200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,202]'); insert into test_mysql_restart_with_full_mode values(203, 'name203', 213.111, 20300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,203]'); insert into test_mysql_restart_with_full_mode values(204, 'name204', 214.111, 20400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,204]'); insert into test_mysql_restart_with_full_mode values(205, 'name205', 215.111, 20500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,205]'); insert into test_mysql_restart_with_full_mode values(206, 'name206', 216.111, 20600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,206]'); insert into test_mysql_restart_with_full_mode values(207, 'name207', 217.111, 20700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,207]'); insert into test_mysql_restart_with_full_mode values(208, 'name208', 218.111, 20800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,208]'); insert into test_mysql_restart_with_full_mode values(209, 'name209', 219.111, 20900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,209]'); insert into test_mysql_restart_with_full_mode values(210, 'name210', 220.111, 21000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,210]'); insert into test_mysql_restart_with_full_mode values(211, 'name211', 221.111, 21100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,211]'); insert into test_mysql_restart_with_full_mode values(212, 'name212', 222.111, 21200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,212]'); insert into test_mysql_restart_with_full_mode values(213, 'name213', 223.111, 21300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,213]'); insert into test_mysql_restart_with_full_mode values(214, 'name214', 224.111, 21400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,214]'); insert into test_mysql_restart_with_full_mode values(215, 'name215', 225.111, 21500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,215]'); insert into test_mysql_restart_with_full_mode values(216, 'name216', 226.111, 21600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,216]'); insert into test_mysql_restart_with_full_mode values(217, 'name217', 227.111, 21700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,217]'); insert into test_mysql_restart_with_full_mode values(218, 'name218', 228.111, 21800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,218]'); insert into test_mysql_restart_with_full_mode values(219, 'name219', 229.111, 21900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,219]'); insert into test_mysql_restart_with_full_mode values(220, 'name220', 230.111, 22000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,220]'); insert into test_mysql_restart_with_full_mode values(221, 'name221', 231.111, 22100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,221]'); insert into test_mysql_restart_with_full_mode values(222, 'name222', 232.111, 22200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,222]'); insert into test_mysql_restart_with_full_mode values(223, 'name223', 233.111, 22300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,223]'); insert into test_mysql_restart_with_full_mode values(224, 'name224', 234.111, 22400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,224]'); insert into test_mysql_restart_with_full_mode values(225, 'name225', 235.111, 22500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,225]'); insert into test_mysql_restart_with_full_mode values(226, 'name226', 236.111, 22600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,226]'); insert into test_mysql_restart_with_full_mode values(227, 'name227', 237.111, 22700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,227]'); insert into test_mysql_restart_with_full_mode values(228, 'name228', 238.111, 22800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,228]'); insert into test_mysql_restart_with_full_mode values(229, 'name229', 239.111, 22900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,229]'); insert into test_mysql_restart_with_full_mode values(230, 'name230', 240.111, 23000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,230]'); insert into test_mysql_restart_with_full_mode values(231, 'name231', 241.111, 23100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,231]'); insert into test_mysql_restart_with_full_mode values(232, 'name232', 242.111, 23200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,232]'); insert into test_mysql_restart_with_full_mode values(233, 'name233', 243.111, 23300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,233]'); insert into test_mysql_restart_with_full_mode values(234, 'name234', 244.111, 23400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,234]'); insert into test_mysql_restart_with_full_mode values(235, 'name235', 245.111, 23500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,235]'); insert into test_mysql_restart_with_full_mode values(236, 'name236', 246.111, 23600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,236]'); insert into test_mysql_restart_with_full_mode values(237, 'name237', 247.111, 23700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,237]'); insert into test_mysql_restart_with_full_mode values(238, 'name238', 248.111, 23800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,238]'); insert into test_mysql_restart_with_full_mode values(239, 'name239', 249.111, 23900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,239]'); insert into test_mysql_restart_with_full_mode values(240, 'name240', 250.111, 24000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,240]'); insert into test_mysql_restart_with_full_mode values(241, 'name241', 251.111, 24100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,241]'); insert into test_mysql_restart_with_full_mode values(242, 'name242', 252.111, 24200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,242]'); insert into test_mysql_restart_with_full_mode values(243, 'name243', 253.111, 24300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,243]'); insert into test_mysql_restart_with_full_mode values(244, 'name244', 254.111, 24400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,244]'); insert into test_mysql_restart_with_full_mode values(245, 'name245', 255.111, 24500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,245]'); insert into test_mysql_restart_with_full_mode values(246, 'name246', 256.111, 24600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,246]'); insert into test_mysql_restart_with_full_mode values(247, 'name247', 257.111, 24700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,247]'); insert into test_mysql_restart_with_full_mode values(248, 'name248', 258.111, 24800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,248]'); insert into test_mysql_restart_with_full_mode values(249, 'name249', 259.111, 24900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,249]'); insert into test_mysql_restart_with_full_mode values(250, 'name250', 260.111, 25000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,250]'); insert into test_mysql_restart_with_full_mode values(251, 'name251', 261.111, 25100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,251]'); insert into test_mysql_restart_with_full_mode values(252, 'name252', 262.111, 25200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,252]'); insert into test_mysql_restart_with_full_mode values(253, 'name253', 263.111, 25300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,253]'); insert into test_mysql_restart_with_full_mode values(254, 'name254', 264.111, 25400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,254]'); insert into test_mysql_restart_with_full_mode values(255, 'name255', 265.111, 25500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,255]'); insert into test_mysql_restart_with_full_mode values(256, 'name256', 266.111, 25600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,256]'); insert into test_mysql_restart_with_full_mode values(257, 'name257', 267.111, 25700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,257]'); insert into test_mysql_restart_with_full_mode values(258, 'name258', 268.111, 25800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,258]'); insert into test_mysql_restart_with_full_mode values(259, 'name259', 269.111, 25900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,259]'); insert into test_mysql_restart_with_full_mode values(260, 'name260', 270.111, 26000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,260]'); insert into test_mysql_restart_with_full_mode values(261, 'name261', 271.111, 26100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,261]'); insert into test_mysql_restart_with_full_mode values(262, 'name262', 272.111, 26200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,262]'); insert into test_mysql_restart_with_full_mode values(263, 'name263', 273.111, 26300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,263]'); insert into test_mysql_restart_with_full_mode values(264, 'name264', 274.111, 26400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,264]'); insert into test_mysql_restart_with_full_mode values(265, 'name265', 275.111, 26500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,265]'); insert into test_mysql_restart_with_full_mode values(266, 'name266', 276.111, 26600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,266]'); insert into test_mysql_restart_with_full_mode values(267, 'name267', 277.111, 26700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,267]'); insert into test_mysql_restart_with_full_mode values(268, 'name268', 278.111, 26800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,268]'); insert into test_mysql_restart_with_full_mode values(269, 'name269', 279.111, 26900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,269]'); insert into test_mysql_restart_with_full_mode values(270, 'name270', 280.111, 27000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,270]'); insert into test_mysql_restart_with_full_mode values(271, 'name271', 281.111, 27100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,271]'); insert into test_mysql_restart_with_full_mode values(272, 'name272', 282.111, 27200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,272]'); insert into test_mysql_restart_with_full_mode values(273, 'name273', 283.111, 27300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,273]'); insert into test_mysql_restart_with_full_mode values(274, 'name274', 284.111, 27400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,274]'); insert into test_mysql_restart_with_full_mode values(275, 'name275', 285.111, 27500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,275]'); insert into test_mysql_restart_with_full_mode values(276, 'name276', 286.111, 27600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,276]'); insert into test_mysql_restart_with_full_mode values(277, 'name277', 287.111, 27700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,277]'); insert into test_mysql_restart_with_full_mode values(278, 'name278', 288.111, 27800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,278]'); insert into test_mysql_restart_with_full_mode values(279, 'name279', 289.111, 27900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,279]'); insert into test_mysql_restart_with_full_mode values(280, 'name280', 290.111, 28000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,280]'); insert into test_mysql_restart_with_full_mode values(281, 'name281', 291.111, 28100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,281]'); insert into test_mysql_restart_with_full_mode values(282, 'name282', 292.111, 28200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,282]'); insert into test_mysql_restart_with_full_mode values(283, 'name283', 293.111, 28300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,283]'); insert into test_mysql_restart_with_full_mode values(284, 'name284', 294.111, 28400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,284]'); insert into test_mysql_restart_with_full_mode values(285, 'name285', 295.111, 28500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,285]'); insert into test_mysql_restart_with_full_mode values(286, 'name286', 296.111, 28600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,286]'); insert into test_mysql_restart_with_full_mode values(287, 'name287', 297.111, 28700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,287]'); insert into test_mysql_restart_with_full_mode values(288, 'name288', 298.111, 28800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,288]'); insert into test_mysql_restart_with_full_mode values(289, 'name289', 299.111, 28900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,289]'); insert into test_mysql_restart_with_full_mode values(290, 'name290', 300.111, 29000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,290]'); insert into test_mysql_restart_with_full_mode values(291, 'name291', 301.111, 29100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,291]'); insert into test_mysql_restart_with_full_mode values(292, 'name292', 302.111, 29200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,292]'); insert into test_mysql_restart_with_full_mode values(293, 'name293', 303.111, 29300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,293]'); insert into test_mysql_restart_with_full_mode values(294, 'name294', 304.111, 29400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,294]'); insert into test_mysql_restart_with_full_mode values(295, 'name295', 305.111, 29500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,295]'); insert into test_mysql_restart_with_full_mode values(296, 'name296', 306.111, 29600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,296]'); insert into test_mysql_restart_with_full_mode values(297, 'name297', 307.111, 29700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,297]'); insert into test_mysql_restart_with_full_mode values(298, 'name298', 308.111, 29800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,298]'); insert into test_mysql_restart_with_full_mode values(299, 'name299', 309.111, 29900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,299]'); insert into test_mysql_restart_with_full_mode values(300, 'name300', 310.111, 30000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,300]'); select count(*) from test_mysql_restart_with_full_mode; ================================================ FILE: tests/integration/data/test_mysql_restart_with_inc_mode_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_mysql_restart_with_inc_mode; create table if not exists test_mysql_restart_with_inc_mode(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); insert into test_mysql_restart_with_inc_mode values(1, 'name1', 11.111, 100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_mysql_restart_with_inc_mode values(2, 'name2', 12.111, 200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_mysql_restart_with_inc_mode values(3, 'name3', 13.111, 300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_mysql_restart_with_inc_mode values(4, 'name4', 14.111, 400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); insert into test_mysql_restart_with_inc_mode values(5, 'name5', 15.111, 500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_mysql_restart_with_inc_mode values(6, 'name6', 16.111, 600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_mysql_restart_with_inc_mode values(7, 'name7', 17.111, 700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); insert into test_mysql_restart_with_inc_mode values(8, 'name8', 18.111, 800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8]'); insert into test_mysql_restart_with_inc_mode values(9, 'name9', 19.111, 900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9]'); insert into test_mysql_restart_with_inc_mode values(10, 'name10', 20.111, 1000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,10]'); insert into test_mysql_restart_with_inc_mode values(11, 'name11', 21.111, 1100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,11]'); insert into test_mysql_restart_with_inc_mode values(12, 'name12', 22.111, 1200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,12]'); insert into test_mysql_restart_with_inc_mode values(13, 'name13', 23.111, 1300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,13]'); insert into test_mysql_restart_with_inc_mode values(14, 'name14', 24.111, 1400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,14]'); insert into test_mysql_restart_with_inc_mode values(15, 'name15', 25.111, 1500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,15]'); insert into test_mysql_restart_with_inc_mode values(16, 'name16', 26.111, 1600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,16]'); insert into test_mysql_restart_with_inc_mode values(17, 'name17', 27.111, 1700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,17]'); insert into test_mysql_restart_with_inc_mode values(18, 'name18', 28.111, 1800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,18]'); insert into test_mysql_restart_with_inc_mode values(19, 'name19', 29.111, 1900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,19]'); insert into test_mysql_restart_with_inc_mode values(20, 'name20', 30.111, 2000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,20]'); insert into test_mysql_restart_with_inc_mode values(21, 'name21', 31.111, 2100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,21]'); insert into test_mysql_restart_with_inc_mode values(22, 'name22', 32.111, 2200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,22]'); insert into test_mysql_restart_with_inc_mode values(23, 'name23', 33.111, 2300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,23]'); insert into test_mysql_restart_with_inc_mode values(24, 'name24', 34.111, 2400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,24]'); insert into test_mysql_restart_with_inc_mode values(25, 'name25', 35.111, 2500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,25]'); insert into test_mysql_restart_with_inc_mode values(26, 'name26', 36.111, 2600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,26]'); insert into test_mysql_restart_with_inc_mode values(27, 'name27', 37.111, 2700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,27]'); insert into test_mysql_restart_with_inc_mode values(28, 'name28', 38.111, 2800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,28]'); insert into test_mysql_restart_with_inc_mode values(29, 'name29', 39.111, 2900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,29]'); insert into test_mysql_restart_with_inc_mode values(30, 'name30', 40.111, 3000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,30]'); insert into test_mysql_restart_with_inc_mode values(31, 'name31', 41.111, 3100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,31]'); insert into test_mysql_restart_with_inc_mode values(32, 'name32', 42.111, 3200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,32]'); insert into test_mysql_restart_with_inc_mode values(33, 'name33', 43.111, 3300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,33]'); insert into test_mysql_restart_with_inc_mode values(34, 'name34', 44.111, 3400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,34]'); insert into test_mysql_restart_with_inc_mode values(35, 'name35', 45.111, 3500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,35]'); insert into test_mysql_restart_with_inc_mode values(36, 'name36', 46.111, 3600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,36]'); insert into test_mysql_restart_with_inc_mode values(37, 'name37', 47.111, 3700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,37]'); insert into test_mysql_restart_with_inc_mode values(38, 'name38', 48.111, 3800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,38]'); insert into test_mysql_restart_with_inc_mode values(39, 'name39', 49.111, 3900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,39]'); insert into test_mysql_restart_with_inc_mode values(40, 'name40', 50.111, 4000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,40]'); insert into test_mysql_restart_with_inc_mode values(41, 'name41', 51.111, 4100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,41]'); insert into test_mysql_restart_with_inc_mode values(42, 'name42', 52.111, 4200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,42]'); insert into test_mysql_restart_with_inc_mode values(43, 'name43', 53.111, 4300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,43]'); insert into test_mysql_restart_with_inc_mode values(44, 'name44', 54.111, 4400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,44]'); insert into test_mysql_restart_with_inc_mode values(45, 'name45', 55.111, 4500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,45]'); insert into test_mysql_restart_with_inc_mode values(46, 'name46', 56.111, 4600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,46]'); insert into test_mysql_restart_with_inc_mode values(47, 'name47', 57.111, 4700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,47]'); insert into test_mysql_restart_with_inc_mode values(48, 'name48', 58.111, 4800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,48]'); insert into test_mysql_restart_with_inc_mode values(49, 'name49', 59.111, 4900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,49]'); insert into test_mysql_restart_with_inc_mode values(50, 'name50', 60.111, 5000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,50]'); insert into test_mysql_restart_with_inc_mode values(51, 'name51', 61.111, 5100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,51]'); insert into test_mysql_restart_with_inc_mode values(52, 'name52', 62.111, 5200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,52]'); insert into test_mysql_restart_with_inc_mode values(53, 'name53', 63.111, 5300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,53]'); insert into test_mysql_restart_with_inc_mode values(54, 'name54', 64.111, 5400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,54]'); insert into test_mysql_restart_with_inc_mode values(55, 'name55', 65.111, 5500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,55]'); insert into test_mysql_restart_with_inc_mode values(56, 'name56', 66.111, 5600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,56]'); insert into test_mysql_restart_with_inc_mode values(57, 'name57', 67.111, 5700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,57]'); insert into test_mysql_restart_with_inc_mode values(58, 'name58', 68.111, 5800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,58]'); insert into test_mysql_restart_with_inc_mode values(59, 'name59', 69.111, 5900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,59]'); insert into test_mysql_restart_with_inc_mode values(60, 'name60', 70.111, 6000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,60]'); insert into test_mysql_restart_with_inc_mode values(61, 'name61', 71.111, 6100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,61]'); insert into test_mysql_restart_with_inc_mode values(62, 'name62', 72.111, 6200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,62]'); insert into test_mysql_restart_with_inc_mode values(63, 'name63', 73.111, 6300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,63]'); insert into test_mysql_restart_with_inc_mode values(64, 'name64', 74.111, 6400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,64]'); insert into test_mysql_restart_with_inc_mode values(65, 'name65', 75.111, 6500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,65]'); insert into test_mysql_restart_with_inc_mode values(66, 'name66', 76.111, 6600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,66]'); insert into test_mysql_restart_with_inc_mode values(67, 'name67', 77.111, 6700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,67]'); insert into test_mysql_restart_with_inc_mode values(68, 'name68', 78.111, 6800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,68]'); insert into test_mysql_restart_with_inc_mode values(69, 'name69', 79.111, 6900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,69]'); insert into test_mysql_restart_with_inc_mode values(70, 'name70', 80.111, 7000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,70]'); insert into test_mysql_restart_with_inc_mode values(71, 'name71', 81.111, 7100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,71]'); insert into test_mysql_restart_with_inc_mode values(72, 'name72', 82.111, 7200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,72]'); insert into test_mysql_restart_with_inc_mode values(73, 'name73', 83.111, 7300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,73]'); insert into test_mysql_restart_with_inc_mode values(74, 'name74', 84.111, 7400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,74]'); insert into test_mysql_restart_with_inc_mode values(75, 'name75', 85.111, 7500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,75]'); insert into test_mysql_restart_with_inc_mode values(76, 'name76', 86.111, 7600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,76]'); insert into test_mysql_restart_with_inc_mode values(77, 'name77', 87.111, 7700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,77]'); insert into test_mysql_restart_with_inc_mode values(78, 'name78', 88.111, 7800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,78]'); insert into test_mysql_restart_with_inc_mode values(79, 'name79', 89.111, 7900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,79]'); insert into test_mysql_restart_with_inc_mode values(80, 'name80', 90.111, 8000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,80]'); insert into test_mysql_restart_with_inc_mode values(81, 'name81', 91.111, 8100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,81]'); insert into test_mysql_restart_with_inc_mode values(82, 'name82', 92.111, 8200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,82]'); insert into test_mysql_restart_with_inc_mode values(83, 'name83', 93.111, 8300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,83]'); insert into test_mysql_restart_with_inc_mode values(84, 'name84', 94.111, 8400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,84]'); insert into test_mysql_restart_with_inc_mode values(85, 'name85', 95.111, 8500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,85]'); insert into test_mysql_restart_with_inc_mode values(86, 'name86', 96.111, 8600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,86]'); insert into test_mysql_restart_with_inc_mode values(87, 'name87', 97.111, 8700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,87]'); insert into test_mysql_restart_with_inc_mode values(88, 'name88', 98.111, 8800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,88]'); insert into test_mysql_restart_with_inc_mode values(89, 'name89', 99.111, 8900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,89]'); insert into test_mysql_restart_with_inc_mode values(90, 'name90', 100.111, 9000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,90]'); insert into test_mysql_restart_with_inc_mode values(91, 'name91', 101.111, 9100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,91]'); insert into test_mysql_restart_with_inc_mode values(92, 'name92', 102.111, 9200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,92]'); insert into test_mysql_restart_with_inc_mode values(93, 'name93', 103.111, 9300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,93]'); insert into test_mysql_restart_with_inc_mode values(94, 'name94', 104.111, 9400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,94]'); insert into test_mysql_restart_with_inc_mode values(95, 'name95', 105.111, 9500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,95]'); insert into test_mysql_restart_with_inc_mode values(96, 'name96', 106.111, 9600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,96]'); insert into test_mysql_restart_with_inc_mode values(97, 'name97', 107.111, 9700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,97]'); insert into test_mysql_restart_with_inc_mode values(98, 'name98', 108.111, 9800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,98]'); insert into test_mysql_restart_with_inc_mode values(99, 'name99', 109.111, 9900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,99]'); insert into test_mysql_restart_with_inc_mode values(100, 'name100', 110.111, 10000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,100]'); select count(*) from test_mysql_restart_with_inc_mode; ================================================ FILE: tests/integration/data/test_mysql_restart_with_inc_mode_inc_1.sql ================================================ use test_db; insert into test_mysql_restart_with_inc_mode values(101, 'name101', 111.111, 10100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,101]'); insert into test_mysql_restart_with_inc_mode values(102, 'name102', 112.111, 10200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,102]'); insert into test_mysql_restart_with_inc_mode values(103, 'name103', 113.111, 10300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,103]'); insert into test_mysql_restart_with_inc_mode values(104, 'name104', 114.111, 10400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,104]'); insert into test_mysql_restart_with_inc_mode values(105, 'name105', 115.111, 10500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,105]'); insert into test_mysql_restart_with_inc_mode values(106, 'name106', 116.111, 10600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,106]'); insert into test_mysql_restart_with_inc_mode values(107, 'name107', 117.111, 10700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,107]'); insert into test_mysql_restart_with_inc_mode values(108, 'name108', 118.111, 10800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,108]'); insert into test_mysql_restart_with_inc_mode values(109, 'name109', 119.111, 10900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,109]'); insert into test_mysql_restart_with_inc_mode values(110, 'name110', 120.111, 11000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,110]'); insert into test_mysql_restart_with_inc_mode values(111, 'name111', 121.111, 11100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,111]'); insert into test_mysql_restart_with_inc_mode values(112, 'name112', 122.111, 11200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,112]'); insert into test_mysql_restart_with_inc_mode values(113, 'name113', 123.111, 11300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,113]'); insert into test_mysql_restart_with_inc_mode values(114, 'name114', 124.111, 11400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,114]'); insert into test_mysql_restart_with_inc_mode values(115, 'name115', 125.111, 11500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,115]'); insert into test_mysql_restart_with_inc_mode values(116, 'name116', 126.111, 11600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,116]'); insert into test_mysql_restart_with_inc_mode values(117, 'name117', 127.111, 11700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,117]'); insert into test_mysql_restart_with_inc_mode values(118, 'name118', 128.111, 11800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,118]'); insert into test_mysql_restart_with_inc_mode values(119, 'name119', 129.111, 11900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,119]'); insert into test_mysql_restart_with_inc_mode values(120, 'name120', 130.111, 12000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,120]'); insert into test_mysql_restart_with_inc_mode values(121, 'name121', 131.111, 12100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,121]'); insert into test_mysql_restart_with_inc_mode values(122, 'name122', 132.111, 12200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,122]'); insert into test_mysql_restart_with_inc_mode values(123, 'name123', 133.111, 12300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,123]'); insert into test_mysql_restart_with_inc_mode values(124, 'name124', 134.111, 12400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,124]'); insert into test_mysql_restart_with_inc_mode values(125, 'name125', 135.111, 12500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,125]'); insert into test_mysql_restart_with_inc_mode values(126, 'name126', 136.111, 12600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,126]'); insert into test_mysql_restart_with_inc_mode values(127, 'name127', 137.111, 12700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,127]'); insert into test_mysql_restart_with_inc_mode values(128, 'name128', 138.111, 12800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,128]'); insert into test_mysql_restart_with_inc_mode values(129, 'name129', 139.111, 12900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,129]'); insert into test_mysql_restart_with_inc_mode values(130, 'name130', 140.111, 13000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,130]'); insert into test_mysql_restart_with_inc_mode values(131, 'name131', 141.111, 13100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,131]'); insert into test_mysql_restart_with_inc_mode values(132, 'name132', 142.111, 13200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,132]'); insert into test_mysql_restart_with_inc_mode values(133, 'name133', 143.111, 13300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,133]'); insert into test_mysql_restart_with_inc_mode values(134, 'name134', 144.111, 13400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,134]'); insert into test_mysql_restart_with_inc_mode values(135, 'name135', 145.111, 13500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,135]'); insert into test_mysql_restart_with_inc_mode values(136, 'name136', 146.111, 13600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,136]'); insert into test_mysql_restart_with_inc_mode values(137, 'name137', 147.111, 13700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,137]'); insert into test_mysql_restart_with_inc_mode values(138, 'name138', 148.111, 13800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,138]'); insert into test_mysql_restart_with_inc_mode values(139, 'name139', 149.111, 13900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,139]'); insert into test_mysql_restart_with_inc_mode values(140, 'name140', 150.111, 14000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,140]'); insert into test_mysql_restart_with_inc_mode values(141, 'name141', 151.111, 14100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,141]'); insert into test_mysql_restart_with_inc_mode values(142, 'name142', 152.111, 14200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,142]'); insert into test_mysql_restart_with_inc_mode values(143, 'name143', 153.111, 14300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,143]'); insert into test_mysql_restart_with_inc_mode values(144, 'name144', 154.111, 14400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,144]'); insert into test_mysql_restart_with_inc_mode values(145, 'name145', 155.111, 14500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,145]'); insert into test_mysql_restart_with_inc_mode values(146, 'name146', 156.111, 14600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,146]'); insert into test_mysql_restart_with_inc_mode values(147, 'name147', 157.111, 14700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,147]'); insert into test_mysql_restart_with_inc_mode values(148, 'name148', 158.111, 14800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,148]'); insert into test_mysql_restart_with_inc_mode values(149, 'name149', 159.111, 14900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,149]'); insert into test_mysql_restart_with_inc_mode values(150, 'name150', 160.111, 15000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,150]'); insert into test_mysql_restart_with_inc_mode values(151, 'name151', 161.111, 15100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,151]'); insert into test_mysql_restart_with_inc_mode values(152, 'name152', 162.111, 15200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,152]'); insert into test_mysql_restart_with_inc_mode values(153, 'name153', 163.111, 15300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,153]'); insert into test_mysql_restart_with_inc_mode values(154, 'name154', 164.111, 15400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,154]'); insert into test_mysql_restart_with_inc_mode values(155, 'name155', 165.111, 15500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,155]'); insert into test_mysql_restart_with_inc_mode values(156, 'name156', 166.111, 15600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,156]'); insert into test_mysql_restart_with_inc_mode values(157, 'name157', 167.111, 15700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,157]'); insert into test_mysql_restart_with_inc_mode values(158, 'name158', 168.111, 15800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,158]'); insert into test_mysql_restart_with_inc_mode values(159, 'name159', 169.111, 15900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,159]'); insert into test_mysql_restart_with_inc_mode values(160, 'name160', 170.111, 16000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,160]'); insert into test_mysql_restart_with_inc_mode values(161, 'name161', 171.111, 16100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,161]'); insert into test_mysql_restart_with_inc_mode values(162, 'name162', 172.111, 16200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,162]'); insert into test_mysql_restart_with_inc_mode values(163, 'name163', 173.111, 16300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,163]'); insert into test_mysql_restart_with_inc_mode values(164, 'name164', 174.111, 16400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,164]'); insert into test_mysql_restart_with_inc_mode values(165, 'name165', 175.111, 16500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,165]'); insert into test_mysql_restart_with_inc_mode values(166, 'name166', 176.111, 16600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,166]'); insert into test_mysql_restart_with_inc_mode values(167, 'name167', 177.111, 16700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,167]'); insert into test_mysql_restart_with_inc_mode values(168, 'name168', 178.111, 16800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,168]'); insert into test_mysql_restart_with_inc_mode values(169, 'name169', 179.111, 16900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,169]'); insert into test_mysql_restart_with_inc_mode values(170, 'name170', 180.111, 17000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,170]'); insert into test_mysql_restart_with_inc_mode values(171, 'name171', 181.111, 17100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,171]'); insert into test_mysql_restart_with_inc_mode values(172, 'name172', 182.111, 17200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,172]'); insert into test_mysql_restart_with_inc_mode values(173, 'name173', 183.111, 17300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,173]'); insert into test_mysql_restart_with_inc_mode values(174, 'name174', 184.111, 17400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,174]'); insert into test_mysql_restart_with_inc_mode values(175, 'name175', 185.111, 17500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,175]'); insert into test_mysql_restart_with_inc_mode values(176, 'name176', 186.111, 17600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,176]'); insert into test_mysql_restart_with_inc_mode values(177, 'name177', 187.111, 17700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,177]'); insert into test_mysql_restart_with_inc_mode values(178, 'name178', 188.111, 17800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,178]'); insert into test_mysql_restart_with_inc_mode values(179, 'name179', 189.111, 17900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,179]'); insert into test_mysql_restart_with_inc_mode values(180, 'name180', 190.111, 18000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,180]'); insert into test_mysql_restart_with_inc_mode values(181, 'name181', 191.111, 18100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,181]'); insert into test_mysql_restart_with_inc_mode values(182, 'name182', 192.111, 18200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,182]'); insert into test_mysql_restart_with_inc_mode values(183, 'name183', 193.111, 18300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,183]'); insert into test_mysql_restart_with_inc_mode values(184, 'name184', 194.111, 18400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,184]'); insert into test_mysql_restart_with_inc_mode values(185, 'name185', 195.111, 18500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,185]'); insert into test_mysql_restart_with_inc_mode values(186, 'name186', 196.111, 18600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,186]'); insert into test_mysql_restart_with_inc_mode values(187, 'name187', 197.111, 18700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,187]'); insert into test_mysql_restart_with_inc_mode values(188, 'name188', 198.111, 18800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,188]'); insert into test_mysql_restart_with_inc_mode values(189, 'name189', 199.111, 18900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,189]'); insert into test_mysql_restart_with_inc_mode values(190, 'name190', 200.111, 19000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,190]'); insert into test_mysql_restart_with_inc_mode values(191, 'name191', 201.111, 19100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,191]'); insert into test_mysql_restart_with_inc_mode values(192, 'name192', 202.111, 19200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,192]'); insert into test_mysql_restart_with_inc_mode values(193, 'name193', 203.111, 19300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,193]'); insert into test_mysql_restart_with_inc_mode values(194, 'name194', 204.111, 19400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,194]'); insert into test_mysql_restart_with_inc_mode values(195, 'name195', 205.111, 19500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,195]'); insert into test_mysql_restart_with_inc_mode values(196, 'name196', 206.111, 19600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,196]'); insert into test_mysql_restart_with_inc_mode values(197, 'name197', 207.111, 19700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,197]'); insert into test_mysql_restart_with_inc_mode values(198, 'name198', 208.111, 19800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,198]'); insert into test_mysql_restart_with_inc_mode values(199, 'name199', 209.111, 19900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,199]'); insert into test_mysql_restart_with_inc_mode values(200, 'name200', 210.111, 20000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,200]'); select count(*) from test_mysql_restart_with_inc_mode; ================================================ FILE: tests/integration/data/test_mysql_restart_with_inc_mode_inc_2.sql ================================================ use test_db; insert into test_mysql_restart_with_inc_mode values(201, 'name201', 211.111, 20100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,201]'); insert into test_mysql_restart_with_inc_mode values(202, 'name202', 212.111, 20200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,202]'); insert into test_mysql_restart_with_inc_mode values(203, 'name203', 213.111, 20300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,203]'); insert into test_mysql_restart_with_inc_mode values(204, 'name204', 214.111, 20400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,204]'); insert into test_mysql_restart_with_inc_mode values(205, 'name205', 215.111, 20500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,205]'); insert into test_mysql_restart_with_inc_mode values(206, 'name206', 216.111, 20600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,206]'); insert into test_mysql_restart_with_inc_mode values(207, 'name207', 217.111, 20700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,207]'); insert into test_mysql_restart_with_inc_mode values(208, 'name208', 218.111, 20800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,208]'); insert into test_mysql_restart_with_inc_mode values(209, 'name209', 219.111, 20900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,209]'); insert into test_mysql_restart_with_inc_mode values(210, 'name210', 220.111, 21000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,210]'); insert into test_mysql_restart_with_inc_mode values(211, 'name211', 221.111, 21100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,211]'); insert into test_mysql_restart_with_inc_mode values(212, 'name212', 222.111, 21200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,212]'); insert into test_mysql_restart_with_inc_mode values(213, 'name213', 223.111, 21300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,213]'); insert into test_mysql_restart_with_inc_mode values(214, 'name214', 224.111, 21400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,214]'); insert into test_mysql_restart_with_inc_mode values(215, 'name215', 225.111, 21500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,215]'); insert into test_mysql_restart_with_inc_mode values(216, 'name216', 226.111, 21600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,216]'); insert into test_mysql_restart_with_inc_mode values(217, 'name217', 227.111, 21700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,217]'); insert into test_mysql_restart_with_inc_mode values(218, 'name218', 228.111, 21800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,218]'); insert into test_mysql_restart_with_inc_mode values(219, 'name219', 229.111, 21900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,219]'); insert into test_mysql_restart_with_inc_mode values(220, 'name220', 230.111, 22000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,220]'); insert into test_mysql_restart_with_inc_mode values(221, 'name221', 231.111, 22100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,221]'); insert into test_mysql_restart_with_inc_mode values(222, 'name222', 232.111, 22200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,222]'); insert into test_mysql_restart_with_inc_mode values(223, 'name223', 233.111, 22300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,223]'); insert into test_mysql_restart_with_inc_mode values(224, 'name224', 234.111, 22400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,224]'); insert into test_mysql_restart_with_inc_mode values(225, 'name225', 235.111, 22500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,225]'); insert into test_mysql_restart_with_inc_mode values(226, 'name226', 236.111, 22600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,226]'); insert into test_mysql_restart_with_inc_mode values(227, 'name227', 237.111, 22700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,227]'); insert into test_mysql_restart_with_inc_mode values(228, 'name228', 238.111, 22800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,228]'); insert into test_mysql_restart_with_inc_mode values(229, 'name229', 239.111, 22900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,229]'); insert into test_mysql_restart_with_inc_mode values(230, 'name230', 240.111, 23000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,230]'); insert into test_mysql_restart_with_inc_mode values(231, 'name231', 241.111, 23100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,231]'); insert into test_mysql_restart_with_inc_mode values(232, 'name232', 242.111, 23200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,232]'); insert into test_mysql_restart_with_inc_mode values(233, 'name233', 243.111, 23300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,233]'); insert into test_mysql_restart_with_inc_mode values(234, 'name234', 244.111, 23400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,234]'); insert into test_mysql_restart_with_inc_mode values(235, 'name235', 245.111, 23500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,235]'); insert into test_mysql_restart_with_inc_mode values(236, 'name236', 246.111, 23600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,236]'); insert into test_mysql_restart_with_inc_mode values(237, 'name237', 247.111, 23700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,237]'); insert into test_mysql_restart_with_inc_mode values(238, 'name238', 248.111, 23800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,238]'); insert into test_mysql_restart_with_inc_mode values(239, 'name239', 249.111, 23900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,239]'); insert into test_mysql_restart_with_inc_mode values(240, 'name240', 250.111, 24000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,240]'); insert into test_mysql_restart_with_inc_mode values(241, 'name241', 251.111, 24100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,241]'); insert into test_mysql_restart_with_inc_mode values(242, 'name242', 252.111, 24200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,242]'); insert into test_mysql_restart_with_inc_mode values(243, 'name243', 253.111, 24300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,243]'); insert into test_mysql_restart_with_inc_mode values(244, 'name244', 254.111, 24400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,244]'); insert into test_mysql_restart_with_inc_mode values(245, 'name245', 255.111, 24500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,245]'); insert into test_mysql_restart_with_inc_mode values(246, 'name246', 256.111, 24600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,246]'); insert into test_mysql_restart_with_inc_mode values(247, 'name247', 257.111, 24700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,247]'); insert into test_mysql_restart_with_inc_mode values(248, 'name248', 258.111, 24800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,248]'); insert into test_mysql_restart_with_inc_mode values(249, 'name249', 259.111, 24900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,249]'); insert into test_mysql_restart_with_inc_mode values(250, 'name250', 260.111, 25000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,250]'); insert into test_mysql_restart_with_inc_mode values(251, 'name251', 261.111, 25100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,251]'); insert into test_mysql_restart_with_inc_mode values(252, 'name252', 262.111, 25200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,252]'); insert into test_mysql_restart_with_inc_mode values(253, 'name253', 263.111, 25300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,253]'); insert into test_mysql_restart_with_inc_mode values(254, 'name254', 264.111, 25400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,254]'); insert into test_mysql_restart_with_inc_mode values(255, 'name255', 265.111, 25500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,255]'); insert into test_mysql_restart_with_inc_mode values(256, 'name256', 266.111, 25600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,256]'); insert into test_mysql_restart_with_inc_mode values(257, 'name257', 267.111, 25700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,257]'); insert into test_mysql_restart_with_inc_mode values(258, 'name258', 268.111, 25800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,258]'); insert into test_mysql_restart_with_inc_mode values(259, 'name259', 269.111, 25900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,259]'); insert into test_mysql_restart_with_inc_mode values(260, 'name260', 270.111, 26000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,260]'); insert into test_mysql_restart_with_inc_mode values(261, 'name261', 271.111, 26100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,261]'); insert into test_mysql_restart_with_inc_mode values(262, 'name262', 272.111, 26200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,262]'); insert into test_mysql_restart_with_inc_mode values(263, 'name263', 273.111, 26300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,263]'); insert into test_mysql_restart_with_inc_mode values(264, 'name264', 274.111, 26400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,264]'); insert into test_mysql_restart_with_inc_mode values(265, 'name265', 275.111, 26500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,265]'); insert into test_mysql_restart_with_inc_mode values(266, 'name266', 276.111, 26600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,266]'); insert into test_mysql_restart_with_inc_mode values(267, 'name267', 277.111, 26700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,267]'); insert into test_mysql_restart_with_inc_mode values(268, 'name268', 278.111, 26800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,268]'); insert into test_mysql_restart_with_inc_mode values(269, 'name269', 279.111, 26900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,269]'); insert into test_mysql_restart_with_inc_mode values(270, 'name270', 280.111, 27000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,270]'); insert into test_mysql_restart_with_inc_mode values(271, 'name271', 281.111, 27100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,271]'); insert into test_mysql_restart_with_inc_mode values(272, 'name272', 282.111, 27200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,272]'); insert into test_mysql_restart_with_inc_mode values(273, 'name273', 283.111, 27300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,273]'); insert into test_mysql_restart_with_inc_mode values(274, 'name274', 284.111, 27400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,274]'); insert into test_mysql_restart_with_inc_mode values(275, 'name275', 285.111, 27500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,275]'); insert into test_mysql_restart_with_inc_mode values(276, 'name276', 286.111, 27600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,276]'); insert into test_mysql_restart_with_inc_mode values(277, 'name277', 287.111, 27700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,277]'); insert into test_mysql_restart_with_inc_mode values(278, 'name278', 288.111, 27800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,278]'); insert into test_mysql_restart_with_inc_mode values(279, 'name279', 289.111, 27900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,279]'); insert into test_mysql_restart_with_inc_mode values(280, 'name280', 290.111, 28000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,280]'); insert into test_mysql_restart_with_inc_mode values(281, 'name281', 291.111, 28100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,281]'); insert into test_mysql_restart_with_inc_mode values(282, 'name282', 292.111, 28200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,282]'); insert into test_mysql_restart_with_inc_mode values(283, 'name283', 293.111, 28300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,283]'); insert into test_mysql_restart_with_inc_mode values(284, 'name284', 294.111, 28400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,284]'); insert into test_mysql_restart_with_inc_mode values(285, 'name285', 295.111, 28500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,285]'); insert into test_mysql_restart_with_inc_mode values(286, 'name286', 296.111, 28600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,286]'); insert into test_mysql_restart_with_inc_mode values(287, 'name287', 297.111, 28700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,287]'); insert into test_mysql_restart_with_inc_mode values(288, 'name288', 298.111, 28800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,288]'); insert into test_mysql_restart_with_inc_mode values(289, 'name289', 299.111, 28900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,289]'); insert into test_mysql_restart_with_inc_mode values(290, 'name290', 300.111, 29000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,290]'); insert into test_mysql_restart_with_inc_mode values(291, 'name291', 301.111, 29100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,291]'); insert into test_mysql_restart_with_inc_mode values(292, 'name292', 302.111, 29200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,292]'); insert into test_mysql_restart_with_inc_mode values(293, 'name293', 303.111, 29300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,293]'); insert into test_mysql_restart_with_inc_mode values(294, 'name294', 304.111, 29400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,294]'); insert into test_mysql_restart_with_inc_mode values(295, 'name295', 305.111, 29500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,295]'); insert into test_mysql_restart_with_inc_mode values(296, 'name296', 306.111, 29600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,296]'); insert into test_mysql_restart_with_inc_mode values(297, 'name297', 307.111, 29700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,297]'); insert into test_mysql_restart_with_inc_mode values(298, 'name298', 308.111, 29800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,298]'); insert into test_mysql_restart_with_inc_mode values(299, 'name299', 309.111, 29900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,299]'); insert into test_mysql_restart_with_inc_mode values(300, 'name300', 310.111, 30000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,300]'); select count(*) from test_mysql_restart_with_inc_mode; ================================================ FILE: tests/integration/data/test_one_field_both_index_and_forward_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_one_field_both_index_and_forward; create table if not exists test_one_field_both_index_and_forward(id int primary key auto_increment, f1 char(16), f2 float, column1 varchar(256), column2 varchar(256)); insert into test_one_field_both_index_and_forward values(1, '1111111111111111', 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_one_field_both_index_and_forward values(2, '2222222222222222', 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_one_field_both_index_and_forward values(3, '3333333333333333', 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_one_field_both_index_and_forward values(4, '4444444444444444', 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_one_field_both_index_and_forward; ================================================ FILE: tests/integration/data/test_one_field_both_index_and_forward_inc.sql ================================================ use test_db; insert into test_one_field_both_index_and_forward values(5, '5555555555555555', 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_one_field_both_index_and_forward values(6, '6666666666666666', 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_one_field_both_index_and_forward values(7, '7777777777777777', 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_one_field_both_index_and_forward set f2 = f2 + 1; delete from test_one_field_both_index_and_forward where id=7; select count(*) from test_one_field_both_index_and_forward; ================================================ FILE: tests/integration/data/test_one_field_both_index_fields_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_one_field_both_index_fields; create table if not exists test_one_field_both_index_fields(id int primary key auto_increment, f1 char(16), f2 float, column1 varchar(256), column2 varchar(256)); insert into test_one_field_both_index_fields values(1, '1111111111111111', 1.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_one_field_both_index_fields values(2, '2222222222222222', 2.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_one_field_both_index_fields values(3, '3333333333333333', 3.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_one_field_both_index_fields values(4, '4444444444444444', 4.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_one_field_both_index_fields; ================================================ FILE: tests/integration/data/test_one_field_both_index_fields_inc.sql ================================================ use test_db; insert into test_one_field_both_index_fields values(5, '5555555555555555', 5.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_one_field_both_index_fields values(6, '6666666666666666', 6.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_one_field_both_index_fields values(7, '7777777777777777', 7.0, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]', '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); update test_one_field_both_index_fields set f2 = f2 + 1; delete from test_one_field_both_index_fields where id=7; select count(*) from test_one_field_both_index_fields; ================================================ FILE: tests/integration/data/test_proxima_be_restart_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_proxima_be_restart; create table if not exists test_proxima_be_restart(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); insert into test_proxima_be_restart values(1, 'name1', 11.111, 100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_proxima_be_restart values(2, 'name2', 12.111, 200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); select count(*) from test_proxima_be_restart; ================================================ FILE: tests/integration/data/test_proxima_be_restart_full_1.sql ================================================ use test_db; insert into test_proxima_be_restart values(3, 'name3', 13.111, 300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_proxima_be_restart values(4, 'name4', 14.111, 400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_proxima_be_restart; ================================================ FILE: tests/integration/data/test_proxima_be_restart_inc.sql ================================================ use test_db; insert into test_proxima_be_restart values(5, 'name5', 15.111, 500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_proxima_be_restart values(6, 'name6', 16.111, 600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); select count(*) from test_proxima_be_restart; ================================================ FILE: tests/integration/data/test_proxima_be_restart_inc_1.sql ================================================ use test_db; insert into test_proxima_be_restart values(7, 'name7', 17.111, 700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); select count(*) from test_proxima_be_restart; ================================================ FILE: tests/integration/data/test_proxima_be_restart_with_collection_empty_full.sql ================================================ use test_db; insert into test_proxima_be_restart_with_collection_empty values(1, 'name1', 11.111, 100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); select count(*) from test_proxima_be_restart_with_collection_empty; ================================================ FILE: tests/integration/data/test_proxima_be_restart_with_collection_empty_inc.sql ================================================ use test_db; insert into test_proxima_be_restart_with_collection_empty values(2, 'name2', 12.111, 200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); select count(*) from test_proxima_be_restart_with_collection_empty; ================================================ FILE: tests/integration/data/test_proxima_be_restart_with_collection_empty_meta.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_proxima_be_restart_with_collection_empty; create table if not exists test_proxima_be_restart_with_collection_empty(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); ================================================ FILE: tests/integration/data/test_proxima_be_restart_with_full_stage_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_proxima_be_restart_with_full_stage; create table if not exists test_proxima_be_restart_with_full_stage(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); insert into test_proxima_be_restart_with_full_stage values(1, 'name1', 11.111, 100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_proxima_be_restart_with_full_stage values(2, 'name2', 12.111, 200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_proxima_be_restart_with_full_stage values(3, 'name3', 13.111, 300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_proxima_be_restart_with_full_stage values(4, 'name4', 14.111, 400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); insert into test_proxima_be_restart_with_full_stage values(5, 'name5', 15.111, 500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_proxima_be_restart_with_full_stage values(6, 'name6', 16.111, 600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_proxima_be_restart_with_full_stage values(7, 'name7', 17.111, 700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); insert into test_proxima_be_restart_with_full_stage values(8, 'name8', 18.111, 800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8]'); insert into test_proxima_be_restart_with_full_stage values(9, 'name9', 19.111, 900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9]'); insert into test_proxima_be_restart_with_full_stage values(10, 'name10', 20.111, 1000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,10]'); insert into test_proxima_be_restart_with_full_stage values(11, 'name11', 21.111, 1100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,11]'); insert into test_proxima_be_restart_with_full_stage values(12, 'name12', 22.111, 1200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,12]'); insert into test_proxima_be_restart_with_full_stage values(13, 'name13', 23.111, 1300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,13]'); insert into test_proxima_be_restart_with_full_stage values(14, 'name14', 24.111, 1400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,14]'); insert into test_proxima_be_restart_with_full_stage values(15, 'name15', 25.111, 1500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,15]'); insert into test_proxima_be_restart_with_full_stage values(16, 'name16', 26.111, 1600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,16]'); insert into test_proxima_be_restart_with_full_stage values(17, 'name17', 27.111, 1700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,17]'); insert into test_proxima_be_restart_with_full_stage values(18, 'name18', 28.111, 1800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,18]'); insert into test_proxima_be_restart_with_full_stage values(19, 'name19', 29.111, 1900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,19]'); insert into test_proxima_be_restart_with_full_stage values(20, 'name20', 30.111, 2000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,20]'); insert into test_proxima_be_restart_with_full_stage values(21, 'name21', 31.111, 2100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,21]'); insert into test_proxima_be_restart_with_full_stage values(22, 'name22', 32.111, 2200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,22]'); insert into test_proxima_be_restart_with_full_stage values(23, 'name23', 33.111, 2300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,23]'); insert into test_proxima_be_restart_with_full_stage values(24, 'name24', 34.111, 2400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,24]'); insert into test_proxima_be_restart_with_full_stage values(25, 'name25', 35.111, 2500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,25]'); insert into test_proxima_be_restart_with_full_stage values(26, 'name26', 36.111, 2600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,26]'); insert into test_proxima_be_restart_with_full_stage values(27, 'name27', 37.111, 2700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,27]'); insert into test_proxima_be_restart_with_full_stage values(28, 'name28', 38.111, 2800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,28]'); insert into test_proxima_be_restart_with_full_stage values(29, 'name29', 39.111, 2900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,29]'); insert into test_proxima_be_restart_with_full_stage values(30, 'name30', 40.111, 3000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,30]'); insert into test_proxima_be_restart_with_full_stage values(31, 'name31', 41.111, 3100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,31]'); insert into test_proxima_be_restart_with_full_stage values(32, 'name32', 42.111, 3200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,32]'); insert into test_proxima_be_restart_with_full_stage values(33, 'name33', 43.111, 3300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,33]'); insert into test_proxima_be_restart_with_full_stage values(34, 'name34', 44.111, 3400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,34]'); insert into test_proxima_be_restart_with_full_stage values(35, 'name35', 45.111, 3500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,35]'); insert into test_proxima_be_restart_with_full_stage values(36, 'name36', 46.111, 3600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,36]'); insert into test_proxima_be_restart_with_full_stage values(37, 'name37', 47.111, 3700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,37]'); insert into test_proxima_be_restart_with_full_stage values(38, 'name38', 48.111, 3800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,38]'); insert into test_proxima_be_restart_with_full_stage values(39, 'name39', 49.111, 3900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,39]'); insert into test_proxima_be_restart_with_full_stage values(40, 'name40', 50.111, 4000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,40]'); insert into test_proxima_be_restart_with_full_stage values(41, 'name41', 51.111, 4100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,41]'); insert into test_proxima_be_restart_with_full_stage values(42, 'name42', 52.111, 4200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,42]'); insert into test_proxima_be_restart_with_full_stage values(43, 'name43', 53.111, 4300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,43]'); insert into test_proxima_be_restart_with_full_stage values(44, 'name44', 54.111, 4400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,44]'); insert into test_proxima_be_restart_with_full_stage values(45, 'name45', 55.111, 4500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,45]'); insert into test_proxima_be_restart_with_full_stage values(46, 'name46', 56.111, 4600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,46]'); insert into test_proxima_be_restart_with_full_stage values(47, 'name47', 57.111, 4700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,47]'); insert into test_proxima_be_restart_with_full_stage values(48, 'name48', 58.111, 4800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,48]'); insert into test_proxima_be_restart_with_full_stage values(49, 'name49', 59.111, 4900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,49]'); insert into test_proxima_be_restart_with_full_stage values(50, 'name50', 60.111, 5000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,50]'); insert into test_proxima_be_restart_with_full_stage values(51, 'name51', 61.111, 5100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,51]'); insert into test_proxima_be_restart_with_full_stage values(52, 'name52', 62.111, 5200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,52]'); insert into test_proxima_be_restart_with_full_stage values(53, 'name53', 63.111, 5300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,53]'); insert into test_proxima_be_restart_with_full_stage values(54, 'name54', 64.111, 5400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,54]'); insert into test_proxima_be_restart_with_full_stage values(55, 'name55', 65.111, 5500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,55]'); insert into test_proxima_be_restart_with_full_stage values(56, 'name56', 66.111, 5600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,56]'); insert into test_proxima_be_restart_with_full_stage values(57, 'name57', 67.111, 5700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,57]'); insert into test_proxima_be_restart_with_full_stage values(58, 'name58', 68.111, 5800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,58]'); insert into test_proxima_be_restart_with_full_stage values(59, 'name59', 69.111, 5900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,59]'); insert into test_proxima_be_restart_with_full_stage values(60, 'name60', 70.111, 6000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,60]'); insert into test_proxima_be_restart_with_full_stage values(61, 'name61', 71.111, 6100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,61]'); insert into test_proxima_be_restart_with_full_stage values(62, 'name62', 72.111, 6200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,62]'); insert into test_proxima_be_restart_with_full_stage values(63, 'name63', 73.111, 6300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,63]'); insert into test_proxima_be_restart_with_full_stage values(64, 'name64', 74.111, 6400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,64]'); insert into test_proxima_be_restart_with_full_stage values(65, 'name65', 75.111, 6500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,65]'); insert into test_proxima_be_restart_with_full_stage values(66, 'name66', 76.111, 6600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,66]'); insert into test_proxima_be_restart_with_full_stage values(67, 'name67', 77.111, 6700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,67]'); insert into test_proxima_be_restart_with_full_stage values(68, 'name68', 78.111, 6800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,68]'); insert into test_proxima_be_restart_with_full_stage values(69, 'name69', 79.111, 6900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,69]'); insert into test_proxima_be_restart_with_full_stage values(70, 'name70', 80.111, 7000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,70]'); insert into test_proxima_be_restart_with_full_stage values(71, 'name71', 81.111, 7100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,71]'); insert into test_proxima_be_restart_with_full_stage values(72, 'name72', 82.111, 7200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,72]'); insert into test_proxima_be_restart_with_full_stage values(73, 'name73', 83.111, 7300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,73]'); insert into test_proxima_be_restart_with_full_stage values(74, 'name74', 84.111, 7400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,74]'); insert into test_proxima_be_restart_with_full_stage values(75, 'name75', 85.111, 7500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,75]'); insert into test_proxima_be_restart_with_full_stage values(76, 'name76', 86.111, 7600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,76]'); insert into test_proxima_be_restart_with_full_stage values(77, 'name77', 87.111, 7700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,77]'); insert into test_proxima_be_restart_with_full_stage values(78, 'name78', 88.111, 7800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,78]'); insert into test_proxima_be_restart_with_full_stage values(79, 'name79', 89.111, 7900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,79]'); insert into test_proxima_be_restart_with_full_stage values(80, 'name80', 90.111, 8000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,80]'); insert into test_proxima_be_restart_with_full_stage values(81, 'name81', 91.111, 8100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,81]'); insert into test_proxima_be_restart_with_full_stage values(82, 'name82', 92.111, 8200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,82]'); insert into test_proxima_be_restart_with_full_stage values(83, 'name83', 93.111, 8300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,83]'); insert into test_proxima_be_restart_with_full_stage values(84, 'name84', 94.111, 8400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,84]'); insert into test_proxima_be_restart_with_full_stage values(85, 'name85', 95.111, 8500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,85]'); insert into test_proxima_be_restart_with_full_stage values(86, 'name86', 96.111, 8600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,86]'); insert into test_proxima_be_restart_with_full_stage values(87, 'name87', 97.111, 8700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,87]'); insert into test_proxima_be_restart_with_full_stage values(88, 'name88', 98.111, 8800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,88]'); insert into test_proxima_be_restart_with_full_stage values(89, 'name89', 99.111, 8900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,89]'); insert into test_proxima_be_restart_with_full_stage values(90, 'name90', 100.111, 9000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,90]'); insert into test_proxima_be_restart_with_full_stage values(91, 'name91', 101.111, 9100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,91]'); insert into test_proxima_be_restart_with_full_stage values(92, 'name92', 102.111, 9200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,92]'); insert into test_proxima_be_restart_with_full_stage values(93, 'name93', 103.111, 9300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,93]'); insert into test_proxima_be_restart_with_full_stage values(94, 'name94', 104.111, 9400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,94]'); insert into test_proxima_be_restart_with_full_stage values(95, 'name95', 105.111, 9500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,95]'); insert into test_proxima_be_restart_with_full_stage values(96, 'name96', 106.111, 9600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,96]'); insert into test_proxima_be_restart_with_full_stage values(97, 'name97', 107.111, 9700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,97]'); insert into test_proxima_be_restart_with_full_stage values(98, 'name98', 108.111, 9800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,98]'); insert into test_proxima_be_restart_with_full_stage values(99, 'name99', 109.111, 9900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,99]'); insert into test_proxima_be_restart_with_full_stage values(100, 'name100', 110.111, 10000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,100]'); insert into test_proxima_be_restart_with_full_stage values(101, 'name101', 111.111, 10100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,101]'); insert into test_proxima_be_restart_with_full_stage values(102, 'name102', 112.111, 10200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,102]'); insert into test_proxima_be_restart_with_full_stage values(103, 'name103', 113.111, 10300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,103]'); insert into test_proxima_be_restart_with_full_stage values(104, 'name104', 114.111, 10400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,104]'); insert into test_proxima_be_restart_with_full_stage values(105, 'name105', 115.111, 10500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,105]'); insert into test_proxima_be_restart_with_full_stage values(106, 'name106', 116.111, 10600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,106]'); insert into test_proxima_be_restart_with_full_stage values(107, 'name107', 117.111, 10700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,107]'); insert into test_proxima_be_restart_with_full_stage values(108, 'name108', 118.111, 10800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,108]'); insert into test_proxima_be_restart_with_full_stage values(109, 'name109', 119.111, 10900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,109]'); insert into test_proxima_be_restart_with_full_stage values(110, 'name110', 120.111, 11000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,110]'); insert into test_proxima_be_restart_with_full_stage values(111, 'name111', 121.111, 11100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,111]'); insert into test_proxima_be_restart_with_full_stage values(112, 'name112', 122.111, 11200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,112]'); insert into test_proxima_be_restart_with_full_stage values(113, 'name113', 123.111, 11300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,113]'); insert into test_proxima_be_restart_with_full_stage values(114, 'name114', 124.111, 11400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,114]'); insert into test_proxima_be_restart_with_full_stage values(115, 'name115', 125.111, 11500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,115]'); insert into test_proxima_be_restart_with_full_stage values(116, 'name116', 126.111, 11600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,116]'); insert into test_proxima_be_restart_with_full_stage values(117, 'name117', 127.111, 11700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,117]'); insert into test_proxima_be_restart_with_full_stage values(118, 'name118', 128.111, 11800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,118]'); insert into test_proxima_be_restart_with_full_stage values(119, 'name119', 129.111, 11900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,119]'); insert into test_proxima_be_restart_with_full_stage values(120, 'name120', 130.111, 12000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,120]'); insert into test_proxima_be_restart_with_full_stage values(121, 'name121', 131.111, 12100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,121]'); insert into test_proxima_be_restart_with_full_stage values(122, 'name122', 132.111, 12200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,122]'); insert into test_proxima_be_restart_with_full_stage values(123, 'name123', 133.111, 12300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,123]'); insert into test_proxima_be_restart_with_full_stage values(124, 'name124', 134.111, 12400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,124]'); insert into test_proxima_be_restart_with_full_stage values(125, 'name125', 135.111, 12500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,125]'); insert into test_proxima_be_restart_with_full_stage values(126, 'name126', 136.111, 12600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,126]'); insert into test_proxima_be_restart_with_full_stage values(127, 'name127', 137.111, 12700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,127]'); insert into test_proxima_be_restart_with_full_stage values(128, 'name128', 138.111, 12800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,128]'); insert into test_proxima_be_restart_with_full_stage values(129, 'name129', 139.111, 12900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,129]'); insert into test_proxima_be_restart_with_full_stage values(130, 'name130', 140.111, 13000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,130]'); insert into test_proxima_be_restart_with_full_stage values(131, 'name131', 141.111, 13100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,131]'); insert into test_proxima_be_restart_with_full_stage values(132, 'name132', 142.111, 13200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,132]'); insert into test_proxima_be_restart_with_full_stage values(133, 'name133', 143.111, 13300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,133]'); insert into test_proxima_be_restart_with_full_stage values(134, 'name134', 144.111, 13400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,134]'); insert into test_proxima_be_restart_with_full_stage values(135, 'name135', 145.111, 13500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,135]'); insert into test_proxima_be_restart_with_full_stage values(136, 'name136', 146.111, 13600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,136]'); insert into test_proxima_be_restart_with_full_stage values(137, 'name137', 147.111, 13700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,137]'); insert into test_proxima_be_restart_with_full_stage values(138, 'name138', 148.111, 13800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,138]'); insert into test_proxima_be_restart_with_full_stage values(139, 'name139', 149.111, 13900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,139]'); insert into test_proxima_be_restart_with_full_stage values(140, 'name140', 150.111, 14000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,140]'); insert into test_proxima_be_restart_with_full_stage values(141, 'name141', 151.111, 14100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,141]'); insert into test_proxima_be_restart_with_full_stage values(142, 'name142', 152.111, 14200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,142]'); insert into test_proxima_be_restart_with_full_stage values(143, 'name143', 153.111, 14300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,143]'); insert into test_proxima_be_restart_with_full_stage values(144, 'name144', 154.111, 14400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,144]'); insert into test_proxima_be_restart_with_full_stage values(145, 'name145', 155.111, 14500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,145]'); insert into test_proxima_be_restart_with_full_stage values(146, 'name146', 156.111, 14600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,146]'); insert into test_proxima_be_restart_with_full_stage values(147, 'name147', 157.111, 14700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,147]'); insert into test_proxima_be_restart_with_full_stage values(148, 'name148', 158.111, 14800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,148]'); insert into test_proxima_be_restart_with_full_stage values(149, 'name149', 159.111, 14900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,149]'); insert into test_proxima_be_restart_with_full_stage values(150, 'name150', 160.111, 15000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,150]'); insert into test_proxima_be_restart_with_full_stage values(151, 'name151', 161.111, 15100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,151]'); insert into test_proxima_be_restart_with_full_stage values(152, 'name152', 162.111, 15200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,152]'); insert into test_proxima_be_restart_with_full_stage values(153, 'name153', 163.111, 15300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,153]'); insert into test_proxima_be_restart_with_full_stage values(154, 'name154', 164.111, 15400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,154]'); insert into test_proxima_be_restart_with_full_stage values(155, 'name155', 165.111, 15500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,155]'); insert into test_proxima_be_restart_with_full_stage values(156, 'name156', 166.111, 15600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,156]'); insert into test_proxima_be_restart_with_full_stage values(157, 'name157', 167.111, 15700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,157]'); insert into test_proxima_be_restart_with_full_stage values(158, 'name158', 168.111, 15800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,158]'); insert into test_proxima_be_restart_with_full_stage values(159, 'name159', 169.111, 15900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,159]'); insert into test_proxima_be_restart_with_full_stage values(160, 'name160', 170.111, 16000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,160]'); insert into test_proxima_be_restart_with_full_stage values(161, 'name161', 171.111, 16100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,161]'); insert into test_proxima_be_restart_with_full_stage values(162, 'name162', 172.111, 16200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,162]'); insert into test_proxima_be_restart_with_full_stage values(163, 'name163', 173.111, 16300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,163]'); insert into test_proxima_be_restart_with_full_stage values(164, 'name164', 174.111, 16400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,164]'); insert into test_proxima_be_restart_with_full_stage values(165, 'name165', 175.111, 16500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,165]'); insert into test_proxima_be_restart_with_full_stage values(166, 'name166', 176.111, 16600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,166]'); insert into test_proxima_be_restart_with_full_stage values(167, 'name167', 177.111, 16700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,167]'); insert into test_proxima_be_restart_with_full_stage values(168, 'name168', 178.111, 16800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,168]'); insert into test_proxima_be_restart_with_full_stage values(169, 'name169', 179.111, 16900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,169]'); insert into test_proxima_be_restart_with_full_stage values(170, 'name170', 180.111, 17000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,170]'); insert into test_proxima_be_restart_with_full_stage values(171, 'name171', 181.111, 17100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,171]'); insert into test_proxima_be_restart_with_full_stage values(172, 'name172', 182.111, 17200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,172]'); insert into test_proxima_be_restart_with_full_stage values(173, 'name173', 183.111, 17300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,173]'); insert into test_proxima_be_restart_with_full_stage values(174, 'name174', 184.111, 17400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,174]'); insert into test_proxima_be_restart_with_full_stage values(175, 'name175', 185.111, 17500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,175]'); insert into test_proxima_be_restart_with_full_stage values(176, 'name176', 186.111, 17600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,176]'); insert into test_proxima_be_restart_with_full_stage values(177, 'name177', 187.111, 17700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,177]'); insert into test_proxima_be_restart_with_full_stage values(178, 'name178', 188.111, 17800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,178]'); insert into test_proxima_be_restart_with_full_stage values(179, 'name179', 189.111, 17900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,179]'); insert into test_proxima_be_restart_with_full_stage values(180, 'name180', 190.111, 18000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,180]'); insert into test_proxima_be_restart_with_full_stage values(181, 'name181', 191.111, 18100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,181]'); insert into test_proxima_be_restart_with_full_stage values(182, 'name182', 192.111, 18200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,182]'); insert into test_proxima_be_restart_with_full_stage values(183, 'name183', 193.111, 18300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,183]'); insert into test_proxima_be_restart_with_full_stage values(184, 'name184', 194.111, 18400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,184]'); insert into test_proxima_be_restart_with_full_stage values(185, 'name185', 195.111, 18500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,185]'); insert into test_proxima_be_restart_with_full_stage values(186, 'name186', 196.111, 18600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,186]'); insert into test_proxima_be_restart_with_full_stage values(187, 'name187', 197.111, 18700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,187]'); insert into test_proxima_be_restart_with_full_stage values(188, 'name188', 198.111, 18800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,188]'); insert into test_proxima_be_restart_with_full_stage values(189, 'name189', 199.111, 18900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,189]'); insert into test_proxima_be_restart_with_full_stage values(190, 'name190', 200.111, 19000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,190]'); insert into test_proxima_be_restart_with_full_stage values(191, 'name191', 201.111, 19100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,191]'); insert into test_proxima_be_restart_with_full_stage values(192, 'name192', 202.111, 19200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,192]'); insert into test_proxima_be_restart_with_full_stage values(193, 'name193', 203.111, 19300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,193]'); insert into test_proxima_be_restart_with_full_stage values(194, 'name194', 204.111, 19400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,194]'); insert into test_proxima_be_restart_with_full_stage values(195, 'name195', 205.111, 19500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,195]'); insert into test_proxima_be_restart_with_full_stage values(196, 'name196', 206.111, 19600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,196]'); insert into test_proxima_be_restart_with_full_stage values(197, 'name197', 207.111, 19700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,197]'); insert into test_proxima_be_restart_with_full_stage values(198, 'name198', 208.111, 19800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,198]'); insert into test_proxima_be_restart_with_full_stage values(199, 'name199', 209.111, 19900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,199]'); insert into test_proxima_be_restart_with_full_stage values(200, 'name200', 210.111, 20000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,200]'); insert into test_proxima_be_restart_with_full_stage values(201, 'name201', 211.111, 20100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,201]'); insert into test_proxima_be_restart_with_full_stage values(202, 'name202', 212.111, 20200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,202]'); insert into test_proxima_be_restart_with_full_stage values(203, 'name203', 213.111, 20300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,203]'); insert into test_proxima_be_restart_with_full_stage values(204, 'name204', 214.111, 20400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,204]'); insert into test_proxima_be_restart_with_full_stage values(205, 'name205', 215.111, 20500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,205]'); insert into test_proxima_be_restart_with_full_stage values(206, 'name206', 216.111, 20600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,206]'); insert into test_proxima_be_restart_with_full_stage values(207, 'name207', 217.111, 20700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,207]'); insert into test_proxima_be_restart_with_full_stage values(208, 'name208', 218.111, 20800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,208]'); insert into test_proxima_be_restart_with_full_stage values(209, 'name209', 219.111, 20900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,209]'); insert into test_proxima_be_restart_with_full_stage values(210, 'name210', 220.111, 21000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,210]'); insert into test_proxima_be_restart_with_full_stage values(211, 'name211', 221.111, 21100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,211]'); insert into test_proxima_be_restart_with_full_stage values(212, 'name212', 222.111, 21200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,212]'); insert into test_proxima_be_restart_with_full_stage values(213, 'name213', 223.111, 21300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,213]'); insert into test_proxima_be_restart_with_full_stage values(214, 'name214', 224.111, 21400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,214]'); insert into test_proxima_be_restart_with_full_stage values(215, 'name215', 225.111, 21500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,215]'); insert into test_proxima_be_restart_with_full_stage values(216, 'name216', 226.111, 21600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,216]'); insert into test_proxima_be_restart_with_full_stage values(217, 'name217', 227.111, 21700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,217]'); insert into test_proxima_be_restart_with_full_stage values(218, 'name218', 228.111, 21800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,218]'); insert into test_proxima_be_restart_with_full_stage values(219, 'name219', 229.111, 21900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,219]'); insert into test_proxima_be_restart_with_full_stage values(220, 'name220', 230.111, 22000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,220]'); insert into test_proxima_be_restart_with_full_stage values(221, 'name221', 231.111, 22100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,221]'); insert into test_proxima_be_restart_with_full_stage values(222, 'name222', 232.111, 22200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,222]'); insert into test_proxima_be_restart_with_full_stage values(223, 'name223', 233.111, 22300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,223]'); insert into test_proxima_be_restart_with_full_stage values(224, 'name224', 234.111, 22400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,224]'); insert into test_proxima_be_restart_with_full_stage values(225, 'name225', 235.111, 22500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,225]'); insert into test_proxima_be_restart_with_full_stage values(226, 'name226', 236.111, 22600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,226]'); insert into test_proxima_be_restart_with_full_stage values(227, 'name227', 237.111, 22700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,227]'); insert into test_proxima_be_restart_with_full_stage values(228, 'name228', 238.111, 22800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,228]'); insert into test_proxima_be_restart_with_full_stage values(229, 'name229', 239.111, 22900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,229]'); insert into test_proxima_be_restart_with_full_stage values(230, 'name230', 240.111, 23000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,230]'); insert into test_proxima_be_restart_with_full_stage values(231, 'name231', 241.111, 23100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,231]'); insert into test_proxima_be_restart_with_full_stage values(232, 'name232', 242.111, 23200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,232]'); insert into test_proxima_be_restart_with_full_stage values(233, 'name233', 243.111, 23300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,233]'); insert into test_proxima_be_restart_with_full_stage values(234, 'name234', 244.111, 23400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,234]'); insert into test_proxima_be_restart_with_full_stage values(235, 'name235', 245.111, 23500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,235]'); insert into test_proxima_be_restart_with_full_stage values(236, 'name236', 246.111, 23600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,236]'); insert into test_proxima_be_restart_with_full_stage values(237, 'name237', 247.111, 23700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,237]'); insert into test_proxima_be_restart_with_full_stage values(238, 'name238', 248.111, 23800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,238]'); insert into test_proxima_be_restart_with_full_stage values(239, 'name239', 249.111, 23900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,239]'); insert into test_proxima_be_restart_with_full_stage values(240, 'name240', 250.111, 24000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,240]'); insert into test_proxima_be_restart_with_full_stage values(241, 'name241', 251.111, 24100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,241]'); insert into test_proxima_be_restart_with_full_stage values(242, 'name242', 252.111, 24200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,242]'); insert into test_proxima_be_restart_with_full_stage values(243, 'name243', 253.111, 24300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,243]'); insert into test_proxima_be_restart_with_full_stage values(244, 'name244', 254.111, 24400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,244]'); insert into test_proxima_be_restart_with_full_stage values(245, 'name245', 255.111, 24500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,245]'); insert into test_proxima_be_restart_with_full_stage values(246, 'name246', 256.111, 24600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,246]'); insert into test_proxima_be_restart_with_full_stage values(247, 'name247', 257.111, 24700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,247]'); insert into test_proxima_be_restart_with_full_stage values(248, 'name248', 258.111, 24800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,248]'); insert into test_proxima_be_restart_with_full_stage values(249, 'name249', 259.111, 24900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,249]'); insert into test_proxima_be_restart_with_full_stage values(250, 'name250', 260.111, 25000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,250]'); insert into test_proxima_be_restart_with_full_stage values(251, 'name251', 261.111, 25100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,251]'); insert into test_proxima_be_restart_with_full_stage values(252, 'name252', 262.111, 25200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,252]'); insert into test_proxima_be_restart_with_full_stage values(253, 'name253', 263.111, 25300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,253]'); insert into test_proxima_be_restart_with_full_stage values(254, 'name254', 264.111, 25400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,254]'); insert into test_proxima_be_restart_with_full_stage values(255, 'name255', 265.111, 25500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,255]'); insert into test_proxima_be_restart_with_full_stage values(256, 'name256', 266.111, 25600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,256]'); insert into test_proxima_be_restart_with_full_stage values(257, 'name257', 267.111, 25700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,257]'); insert into test_proxima_be_restart_with_full_stage values(258, 'name258', 268.111, 25800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,258]'); insert into test_proxima_be_restart_with_full_stage values(259, 'name259', 269.111, 25900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,259]'); insert into test_proxima_be_restart_with_full_stage values(260, 'name260', 270.111, 26000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,260]'); insert into test_proxima_be_restart_with_full_stage values(261, 'name261', 271.111, 26100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,261]'); insert into test_proxima_be_restart_with_full_stage values(262, 'name262', 272.111, 26200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,262]'); insert into test_proxima_be_restart_with_full_stage values(263, 'name263', 273.111, 26300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,263]'); insert into test_proxima_be_restart_with_full_stage values(264, 'name264', 274.111, 26400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,264]'); insert into test_proxima_be_restart_with_full_stage values(265, 'name265', 275.111, 26500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,265]'); insert into test_proxima_be_restart_with_full_stage values(266, 'name266', 276.111, 26600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,266]'); insert into test_proxima_be_restart_with_full_stage values(267, 'name267', 277.111, 26700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,267]'); insert into test_proxima_be_restart_with_full_stage values(268, 'name268', 278.111, 26800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,268]'); insert into test_proxima_be_restart_with_full_stage values(269, 'name269', 279.111, 26900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,269]'); insert into test_proxima_be_restart_with_full_stage values(270, 'name270', 280.111, 27000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,270]'); insert into test_proxima_be_restart_with_full_stage values(271, 'name271', 281.111, 27100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,271]'); insert into test_proxima_be_restart_with_full_stage values(272, 'name272', 282.111, 27200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,272]'); insert into test_proxima_be_restart_with_full_stage values(273, 'name273', 283.111, 27300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,273]'); insert into test_proxima_be_restart_with_full_stage values(274, 'name274', 284.111, 27400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,274]'); insert into test_proxima_be_restart_with_full_stage values(275, 'name275', 285.111, 27500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,275]'); insert into test_proxima_be_restart_with_full_stage values(276, 'name276', 286.111, 27600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,276]'); insert into test_proxima_be_restart_with_full_stage values(277, 'name277', 287.111, 27700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,277]'); insert into test_proxima_be_restart_with_full_stage values(278, 'name278', 288.111, 27800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,278]'); insert into test_proxima_be_restart_with_full_stage values(279, 'name279', 289.111, 27900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,279]'); insert into test_proxima_be_restart_with_full_stage values(280, 'name280', 290.111, 28000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,280]'); insert into test_proxima_be_restart_with_full_stage values(281, 'name281', 291.111, 28100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,281]'); insert into test_proxima_be_restart_with_full_stage values(282, 'name282', 292.111, 28200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,282]'); insert into test_proxima_be_restart_with_full_stage values(283, 'name283', 293.111, 28300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,283]'); insert into test_proxima_be_restart_with_full_stage values(284, 'name284', 294.111, 28400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,284]'); insert into test_proxima_be_restart_with_full_stage values(285, 'name285', 295.111, 28500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,285]'); insert into test_proxima_be_restart_with_full_stage values(286, 'name286', 296.111, 28600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,286]'); insert into test_proxima_be_restart_with_full_stage values(287, 'name287', 297.111, 28700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,287]'); insert into test_proxima_be_restart_with_full_stage values(288, 'name288', 298.111, 28800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,288]'); insert into test_proxima_be_restart_with_full_stage values(289, 'name289', 299.111, 28900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,289]'); insert into test_proxima_be_restart_with_full_stage values(290, 'name290', 300.111, 29000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,290]'); insert into test_proxima_be_restart_with_full_stage values(291, 'name291', 301.111, 29100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,291]'); insert into test_proxima_be_restart_with_full_stage values(292, 'name292', 302.111, 29200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,292]'); insert into test_proxima_be_restart_with_full_stage values(293, 'name293', 303.111, 29300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,293]'); insert into test_proxima_be_restart_with_full_stage values(294, 'name294', 304.111, 29400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,294]'); insert into test_proxima_be_restart_with_full_stage values(295, 'name295', 305.111, 29500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,295]'); insert into test_proxima_be_restart_with_full_stage values(296, 'name296', 306.111, 29600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,296]'); insert into test_proxima_be_restart_with_full_stage values(297, 'name297', 307.111, 29700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,297]'); insert into test_proxima_be_restart_with_full_stage values(298, 'name298', 308.111, 29800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,298]'); insert into test_proxima_be_restart_with_full_stage values(299, 'name299', 309.111, 29900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,299]'); insert into test_proxima_be_restart_with_full_stage values(300, 'name300', 310.111, 30000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,300]'); insert into test_proxima_be_restart_with_full_stage values(301, 'name301', 311.111, 30100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,301]'); insert into test_proxima_be_restart_with_full_stage values(302, 'name302', 312.111, 30200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,302]'); insert into test_proxima_be_restart_with_full_stage values(303, 'name303', 313.111, 30300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,303]'); insert into test_proxima_be_restart_with_full_stage values(304, 'name304', 314.111, 30400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,304]'); insert into test_proxima_be_restart_with_full_stage values(305, 'name305', 315.111, 30500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,305]'); insert into test_proxima_be_restart_with_full_stage values(306, 'name306', 316.111, 30600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,306]'); insert into test_proxima_be_restart_with_full_stage values(307, 'name307', 317.111, 30700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,307]'); insert into test_proxima_be_restart_with_full_stage values(308, 'name308', 318.111, 30800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,308]'); insert into test_proxima_be_restart_with_full_stage values(309, 'name309', 319.111, 30900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,309]'); insert into test_proxima_be_restart_with_full_stage values(310, 'name310', 320.111, 31000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,310]'); insert into test_proxima_be_restart_with_full_stage values(311, 'name311', 321.111, 31100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,311]'); insert into test_proxima_be_restart_with_full_stage values(312, 'name312', 322.111, 31200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,312]'); insert into test_proxima_be_restart_with_full_stage values(313, 'name313', 323.111, 31300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,313]'); insert into test_proxima_be_restart_with_full_stage values(314, 'name314', 324.111, 31400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,314]'); insert into test_proxima_be_restart_with_full_stage values(315, 'name315', 325.111, 31500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,315]'); insert into test_proxima_be_restart_with_full_stage values(316, 'name316', 326.111, 31600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,316]'); insert into test_proxima_be_restart_with_full_stage values(317, 'name317', 327.111, 31700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,317]'); insert into test_proxima_be_restart_with_full_stage values(318, 'name318', 328.111, 31800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,318]'); insert into test_proxima_be_restart_with_full_stage values(319, 'name319', 329.111, 31900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,319]'); insert into test_proxima_be_restart_with_full_stage values(320, 'name320', 330.111, 32000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,320]'); insert into test_proxima_be_restart_with_full_stage values(321, 'name321', 331.111, 32100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,321]'); insert into test_proxima_be_restart_with_full_stage values(322, 'name322', 332.111, 32200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,322]'); insert into test_proxima_be_restart_with_full_stage values(323, 'name323', 333.111, 32300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,323]'); insert into test_proxima_be_restart_with_full_stage values(324, 'name324', 334.111, 32400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,324]'); insert into test_proxima_be_restart_with_full_stage values(325, 'name325', 335.111, 32500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,325]'); insert into test_proxima_be_restart_with_full_stage values(326, 'name326', 336.111, 32600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,326]'); insert into test_proxima_be_restart_with_full_stage values(327, 'name327', 337.111, 32700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,327]'); insert into test_proxima_be_restart_with_full_stage values(328, 'name328', 338.111, 32800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,328]'); insert into test_proxima_be_restart_with_full_stage values(329, 'name329', 339.111, 32900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,329]'); insert into test_proxima_be_restart_with_full_stage values(330, 'name330', 340.111, 33000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,330]'); insert into test_proxima_be_restart_with_full_stage values(331, 'name331', 341.111, 33100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,331]'); insert into test_proxima_be_restart_with_full_stage values(332, 'name332', 342.111, 33200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,332]'); insert into test_proxima_be_restart_with_full_stage values(333, 'name333', 343.111, 33300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,333]'); insert into test_proxima_be_restart_with_full_stage values(334, 'name334', 344.111, 33400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,334]'); insert into test_proxima_be_restart_with_full_stage values(335, 'name335', 345.111, 33500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,335]'); insert into test_proxima_be_restart_with_full_stage values(336, 'name336', 346.111, 33600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,336]'); insert into test_proxima_be_restart_with_full_stage values(337, 'name337', 347.111, 33700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,337]'); insert into test_proxima_be_restart_with_full_stage values(338, 'name338', 348.111, 33800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,338]'); insert into test_proxima_be_restart_with_full_stage values(339, 'name339', 349.111, 33900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,339]'); insert into test_proxima_be_restart_with_full_stage values(340, 'name340', 350.111, 34000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,340]'); insert into test_proxima_be_restart_with_full_stage values(341, 'name341', 351.111, 34100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,341]'); insert into test_proxima_be_restart_with_full_stage values(342, 'name342', 352.111, 34200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,342]'); insert into test_proxima_be_restart_with_full_stage values(343, 'name343', 353.111, 34300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,343]'); insert into test_proxima_be_restart_with_full_stage values(344, 'name344', 354.111, 34400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,344]'); insert into test_proxima_be_restart_with_full_stage values(345, 'name345', 355.111, 34500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,345]'); insert into test_proxima_be_restart_with_full_stage values(346, 'name346', 356.111, 34600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,346]'); insert into test_proxima_be_restart_with_full_stage values(347, 'name347', 357.111, 34700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,347]'); insert into test_proxima_be_restart_with_full_stage values(348, 'name348', 358.111, 34800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,348]'); insert into test_proxima_be_restart_with_full_stage values(349, 'name349', 359.111, 34900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,349]'); insert into test_proxima_be_restart_with_full_stage values(350, 'name350', 360.111, 35000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,350]'); insert into test_proxima_be_restart_with_full_stage values(351, 'name351', 361.111, 35100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,351]'); insert into test_proxima_be_restart_with_full_stage values(352, 'name352', 362.111, 35200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,352]'); insert into test_proxima_be_restart_with_full_stage values(353, 'name353', 363.111, 35300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,353]'); insert into test_proxima_be_restart_with_full_stage values(354, 'name354', 364.111, 35400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,354]'); insert into test_proxima_be_restart_with_full_stage values(355, 'name355', 365.111, 35500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,355]'); insert into test_proxima_be_restart_with_full_stage values(356, 'name356', 366.111, 35600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,356]'); insert into test_proxima_be_restart_with_full_stage values(357, 'name357', 367.111, 35700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,357]'); insert into test_proxima_be_restart_with_full_stage values(358, 'name358', 368.111, 35800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,358]'); insert into test_proxima_be_restart_with_full_stage values(359, 'name359', 369.111, 35900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,359]'); insert into test_proxima_be_restart_with_full_stage values(360, 'name360', 370.111, 36000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,360]'); insert into test_proxima_be_restart_with_full_stage values(361, 'name361', 371.111, 36100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,361]'); insert into test_proxima_be_restart_with_full_stage values(362, 'name362', 372.111, 36200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,362]'); insert into test_proxima_be_restart_with_full_stage values(363, 'name363', 373.111, 36300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,363]'); insert into test_proxima_be_restart_with_full_stage values(364, 'name364', 374.111, 36400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,364]'); insert into test_proxima_be_restart_with_full_stage values(365, 'name365', 375.111, 36500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,365]'); insert into test_proxima_be_restart_with_full_stage values(366, 'name366', 376.111, 36600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,366]'); insert into test_proxima_be_restart_with_full_stage values(367, 'name367', 377.111, 36700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,367]'); insert into test_proxima_be_restart_with_full_stage values(368, 'name368', 378.111, 36800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,368]'); insert into test_proxima_be_restart_with_full_stage values(369, 'name369', 379.111, 36900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,369]'); insert into test_proxima_be_restart_with_full_stage values(370, 'name370', 380.111, 37000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,370]'); insert into test_proxima_be_restart_with_full_stage values(371, 'name371', 381.111, 37100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,371]'); insert into test_proxima_be_restart_with_full_stage values(372, 'name372', 382.111, 37200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,372]'); insert into test_proxima_be_restart_with_full_stage values(373, 'name373', 383.111, 37300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,373]'); insert into test_proxima_be_restart_with_full_stage values(374, 'name374', 384.111, 37400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,374]'); insert into test_proxima_be_restart_with_full_stage values(375, 'name375', 385.111, 37500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,375]'); insert into test_proxima_be_restart_with_full_stage values(376, 'name376', 386.111, 37600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,376]'); insert into test_proxima_be_restart_with_full_stage values(377, 'name377', 387.111, 37700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,377]'); insert into test_proxima_be_restart_with_full_stage values(378, 'name378', 388.111, 37800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,378]'); insert into test_proxima_be_restart_with_full_stage values(379, 'name379', 389.111, 37900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,379]'); insert into test_proxima_be_restart_with_full_stage values(380, 'name380', 390.111, 38000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,380]'); insert into test_proxima_be_restart_with_full_stage values(381, 'name381', 391.111, 38100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,381]'); insert into test_proxima_be_restart_with_full_stage values(382, 'name382', 392.111, 38200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,382]'); insert into test_proxima_be_restart_with_full_stage values(383, 'name383', 393.111, 38300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,383]'); insert into test_proxima_be_restart_with_full_stage values(384, 'name384', 394.111, 38400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,384]'); insert into test_proxima_be_restart_with_full_stage values(385, 'name385', 395.111, 38500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,385]'); insert into test_proxima_be_restart_with_full_stage values(386, 'name386', 396.111, 38600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,386]'); insert into test_proxima_be_restart_with_full_stage values(387, 'name387', 397.111, 38700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,387]'); insert into test_proxima_be_restart_with_full_stage values(388, 'name388', 398.111, 38800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,388]'); insert into test_proxima_be_restart_with_full_stage values(389, 'name389', 399.111, 38900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,389]'); insert into test_proxima_be_restart_with_full_stage values(390, 'name390', 400.111, 39000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,390]'); insert into test_proxima_be_restart_with_full_stage values(391, 'name391', 401.111, 39100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,391]'); insert into test_proxima_be_restart_with_full_stage values(392, 'name392', 402.111, 39200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,392]'); insert into test_proxima_be_restart_with_full_stage values(393, 'name393', 403.111, 39300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,393]'); insert into test_proxima_be_restart_with_full_stage values(394, 'name394', 404.111, 39400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,394]'); insert into test_proxima_be_restart_with_full_stage values(395, 'name395', 405.111, 39500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,395]'); insert into test_proxima_be_restart_with_full_stage values(396, 'name396', 406.111, 39600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,396]'); insert into test_proxima_be_restart_with_full_stage values(397, 'name397', 407.111, 39700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,397]'); insert into test_proxima_be_restart_with_full_stage values(398, 'name398', 408.111, 39800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,398]'); insert into test_proxima_be_restart_with_full_stage values(399, 'name399', 409.111, 39900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,399]'); insert into test_proxima_be_restart_with_full_stage values(400, 'name400', 410.111, 40000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,400]'); insert into test_proxima_be_restart_with_full_stage values(401, 'name401', 411.111, 40100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,401]'); insert into test_proxima_be_restart_with_full_stage values(402, 'name402', 412.111, 40200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,402]'); insert into test_proxima_be_restart_with_full_stage values(403, 'name403', 413.111, 40300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,403]'); insert into test_proxima_be_restart_with_full_stage values(404, 'name404', 414.111, 40400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,404]'); insert into test_proxima_be_restart_with_full_stage values(405, 'name405', 415.111, 40500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,405]'); insert into test_proxima_be_restart_with_full_stage values(406, 'name406', 416.111, 40600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,406]'); insert into test_proxima_be_restart_with_full_stage values(407, 'name407', 417.111, 40700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,407]'); insert into test_proxima_be_restart_with_full_stage values(408, 'name408', 418.111, 40800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,408]'); insert into test_proxima_be_restart_with_full_stage values(409, 'name409', 419.111, 40900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,409]'); insert into test_proxima_be_restart_with_full_stage values(410, 'name410', 420.111, 41000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,410]'); insert into test_proxima_be_restart_with_full_stage values(411, 'name411', 421.111, 41100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,411]'); insert into test_proxima_be_restart_with_full_stage values(412, 'name412', 422.111, 41200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,412]'); insert into test_proxima_be_restart_with_full_stage values(413, 'name413', 423.111, 41300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,413]'); insert into test_proxima_be_restart_with_full_stage values(414, 'name414', 424.111, 41400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,414]'); insert into test_proxima_be_restart_with_full_stage values(415, 'name415', 425.111, 41500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,415]'); insert into test_proxima_be_restart_with_full_stage values(416, 'name416', 426.111, 41600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,416]'); insert into test_proxima_be_restart_with_full_stage values(417, 'name417', 427.111, 41700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,417]'); insert into test_proxima_be_restart_with_full_stage values(418, 'name418', 428.111, 41800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,418]'); insert into test_proxima_be_restart_with_full_stage values(419, 'name419', 429.111, 41900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,419]'); insert into test_proxima_be_restart_with_full_stage values(420, 'name420', 430.111, 42000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,420]'); insert into test_proxima_be_restart_with_full_stage values(421, 'name421', 431.111, 42100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,421]'); insert into test_proxima_be_restart_with_full_stage values(422, 'name422', 432.111, 42200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,422]'); insert into test_proxima_be_restart_with_full_stage values(423, 'name423', 433.111, 42300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,423]'); insert into test_proxima_be_restart_with_full_stage values(424, 'name424', 434.111, 42400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,424]'); insert into test_proxima_be_restart_with_full_stage values(425, 'name425', 435.111, 42500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,425]'); insert into test_proxima_be_restart_with_full_stage values(426, 'name426', 436.111, 42600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,426]'); insert into test_proxima_be_restart_with_full_stage values(427, 'name427', 437.111, 42700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,427]'); insert into test_proxima_be_restart_with_full_stage values(428, 'name428', 438.111, 42800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,428]'); insert into test_proxima_be_restart_with_full_stage values(429, 'name429', 439.111, 42900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,429]'); insert into test_proxima_be_restart_with_full_stage values(430, 'name430', 440.111, 43000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,430]'); insert into test_proxima_be_restart_with_full_stage values(431, 'name431', 441.111, 43100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,431]'); insert into test_proxima_be_restart_with_full_stage values(432, 'name432', 442.111, 43200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,432]'); insert into test_proxima_be_restart_with_full_stage values(433, 'name433', 443.111, 43300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,433]'); insert into test_proxima_be_restart_with_full_stage values(434, 'name434', 444.111, 43400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,434]'); insert into test_proxima_be_restart_with_full_stage values(435, 'name435', 445.111, 43500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,435]'); insert into test_proxima_be_restart_with_full_stage values(436, 'name436', 446.111, 43600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,436]'); insert into test_proxima_be_restart_with_full_stage values(437, 'name437', 447.111, 43700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,437]'); insert into test_proxima_be_restart_with_full_stage values(438, 'name438', 448.111, 43800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,438]'); insert into test_proxima_be_restart_with_full_stage values(439, 'name439', 449.111, 43900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,439]'); insert into test_proxima_be_restart_with_full_stage values(440, 'name440', 450.111, 44000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,440]'); insert into test_proxima_be_restart_with_full_stage values(441, 'name441', 451.111, 44100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,441]'); insert into test_proxima_be_restart_with_full_stage values(442, 'name442', 452.111, 44200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,442]'); insert into test_proxima_be_restart_with_full_stage values(443, 'name443', 453.111, 44300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,443]'); insert into test_proxima_be_restart_with_full_stage values(444, 'name444', 454.111, 44400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,444]'); insert into test_proxima_be_restart_with_full_stage values(445, 'name445', 455.111, 44500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,445]'); insert into test_proxima_be_restart_with_full_stage values(446, 'name446', 456.111, 44600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,446]'); insert into test_proxima_be_restart_with_full_stage values(447, 'name447', 457.111, 44700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,447]'); insert into test_proxima_be_restart_with_full_stage values(448, 'name448', 458.111, 44800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,448]'); insert into test_proxima_be_restart_with_full_stage values(449, 'name449', 459.111, 44900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,449]'); insert into test_proxima_be_restart_with_full_stage values(450, 'name450', 460.111, 45000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,450]'); insert into test_proxima_be_restart_with_full_stage values(451, 'name451', 461.111, 45100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,451]'); insert into test_proxima_be_restart_with_full_stage values(452, 'name452', 462.111, 45200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,452]'); insert into test_proxima_be_restart_with_full_stage values(453, 'name453', 463.111, 45300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,453]'); insert into test_proxima_be_restart_with_full_stage values(454, 'name454', 464.111, 45400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,454]'); insert into test_proxima_be_restart_with_full_stage values(455, 'name455', 465.111, 45500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,455]'); insert into test_proxima_be_restart_with_full_stage values(456, 'name456', 466.111, 45600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,456]'); insert into test_proxima_be_restart_with_full_stage values(457, 'name457', 467.111, 45700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,457]'); insert into test_proxima_be_restart_with_full_stage values(458, 'name458', 468.111, 45800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,458]'); insert into test_proxima_be_restart_with_full_stage values(459, 'name459', 469.111, 45900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,459]'); insert into test_proxima_be_restart_with_full_stage values(460, 'name460', 470.111, 46000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,460]'); insert into test_proxima_be_restart_with_full_stage values(461, 'name461', 471.111, 46100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,461]'); insert into test_proxima_be_restart_with_full_stage values(462, 'name462', 472.111, 46200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,462]'); insert into test_proxima_be_restart_with_full_stage values(463, 'name463', 473.111, 46300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,463]'); insert into test_proxima_be_restart_with_full_stage values(464, 'name464', 474.111, 46400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,464]'); insert into test_proxima_be_restart_with_full_stage values(465, 'name465', 475.111, 46500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,465]'); insert into test_proxima_be_restart_with_full_stage values(466, 'name466', 476.111, 46600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,466]'); insert into test_proxima_be_restart_with_full_stage values(467, 'name467', 477.111, 46700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,467]'); insert into test_proxima_be_restart_with_full_stage values(468, 'name468', 478.111, 46800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,468]'); insert into test_proxima_be_restart_with_full_stage values(469, 'name469', 479.111, 46900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,469]'); insert into test_proxima_be_restart_with_full_stage values(470, 'name470', 480.111, 47000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,470]'); insert into test_proxima_be_restart_with_full_stage values(471, 'name471', 481.111, 47100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,471]'); insert into test_proxima_be_restart_with_full_stage values(472, 'name472', 482.111, 47200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,472]'); insert into test_proxima_be_restart_with_full_stage values(473, 'name473', 483.111, 47300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,473]'); insert into test_proxima_be_restart_with_full_stage values(474, 'name474', 484.111, 47400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,474]'); insert into test_proxima_be_restart_with_full_stage values(475, 'name475', 485.111, 47500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,475]'); insert into test_proxima_be_restart_with_full_stage values(476, 'name476', 486.111, 47600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,476]'); insert into test_proxima_be_restart_with_full_stage values(477, 'name477', 487.111, 47700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,477]'); insert into test_proxima_be_restart_with_full_stage values(478, 'name478', 488.111, 47800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,478]'); insert into test_proxima_be_restart_with_full_stage values(479, 'name479', 489.111, 47900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,479]'); insert into test_proxima_be_restart_with_full_stage values(480, 'name480', 490.111, 48000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,480]'); insert into test_proxima_be_restart_with_full_stage values(481, 'name481', 491.111, 48100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,481]'); insert into test_proxima_be_restart_with_full_stage values(482, 'name482', 492.111, 48200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,482]'); insert into test_proxima_be_restart_with_full_stage values(483, 'name483', 493.111, 48300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,483]'); insert into test_proxima_be_restart_with_full_stage values(484, 'name484', 494.111, 48400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,484]'); insert into test_proxima_be_restart_with_full_stage values(485, 'name485', 495.111, 48500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,485]'); insert into test_proxima_be_restart_with_full_stage values(486, 'name486', 496.111, 48600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,486]'); insert into test_proxima_be_restart_with_full_stage values(487, 'name487', 497.111, 48700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,487]'); insert into test_proxima_be_restart_with_full_stage values(488, 'name488', 498.111, 48800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,488]'); insert into test_proxima_be_restart_with_full_stage values(489, 'name489', 499.111, 48900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,489]'); insert into test_proxima_be_restart_with_full_stage values(490, 'name490', 500.111, 49000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,490]'); insert into test_proxima_be_restart_with_full_stage values(491, 'name491', 501.111, 49100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,491]'); insert into test_proxima_be_restart_with_full_stage values(492, 'name492', 502.111, 49200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,492]'); insert into test_proxima_be_restart_with_full_stage values(493, 'name493', 503.111, 49300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,493]'); insert into test_proxima_be_restart_with_full_stage values(494, 'name494', 504.111, 49400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,494]'); insert into test_proxima_be_restart_with_full_stage values(495, 'name495', 505.111, 49500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,495]'); insert into test_proxima_be_restart_with_full_stage values(496, 'name496', 506.111, 49600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,496]'); insert into test_proxima_be_restart_with_full_stage values(497, 'name497', 507.111, 49700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,497]'); insert into test_proxima_be_restart_with_full_stage values(498, 'name498', 508.111, 49800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,498]'); insert into test_proxima_be_restart_with_full_stage values(499, 'name499', 509.111, 49900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,499]'); insert into test_proxima_be_restart_with_full_stage values(500, 'name500', 510.111, 50000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,500]'); insert into test_proxima_be_restart_with_full_stage values(501, 'name501', 511.111, 50100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,501]'); insert into test_proxima_be_restart_with_full_stage values(502, 'name502', 512.111, 50200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,502]'); insert into test_proxima_be_restart_with_full_stage values(503, 'name503', 513.111, 50300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,503]'); insert into test_proxima_be_restart_with_full_stage values(504, 'name504', 514.111, 50400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,504]'); insert into test_proxima_be_restart_with_full_stage values(505, 'name505', 515.111, 50500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,505]'); insert into test_proxima_be_restart_with_full_stage values(506, 'name506', 516.111, 50600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,506]'); insert into test_proxima_be_restart_with_full_stage values(507, 'name507', 517.111, 50700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,507]'); insert into test_proxima_be_restart_with_full_stage values(508, 'name508', 518.111, 50800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,508]'); insert into test_proxima_be_restart_with_full_stage values(509, 'name509', 519.111, 50900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,509]'); insert into test_proxima_be_restart_with_full_stage values(510, 'name510', 520.111, 51000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,510]'); insert into test_proxima_be_restart_with_full_stage values(511, 'name511', 521.111, 51100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,511]'); insert into test_proxima_be_restart_with_full_stage values(512, 'name512', 522.111, 51200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,512]'); insert into test_proxima_be_restart_with_full_stage values(513, 'name513', 523.111, 51300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,513]'); insert into test_proxima_be_restart_with_full_stage values(514, 'name514', 524.111, 51400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,514]'); insert into test_proxima_be_restart_with_full_stage values(515, 'name515', 525.111, 51500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,515]'); insert into test_proxima_be_restart_with_full_stage values(516, 'name516', 526.111, 51600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,516]'); insert into test_proxima_be_restart_with_full_stage values(517, 'name517', 527.111, 51700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,517]'); insert into test_proxima_be_restart_with_full_stage values(518, 'name518', 528.111, 51800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,518]'); insert into test_proxima_be_restart_with_full_stage values(519, 'name519', 529.111, 51900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,519]'); insert into test_proxima_be_restart_with_full_stage values(520, 'name520', 530.111, 52000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,520]'); insert into test_proxima_be_restart_with_full_stage values(521, 'name521', 531.111, 52100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,521]'); insert into test_proxima_be_restart_with_full_stage values(522, 'name522', 532.111, 52200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,522]'); insert into test_proxima_be_restart_with_full_stage values(523, 'name523', 533.111, 52300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,523]'); insert into test_proxima_be_restart_with_full_stage values(524, 'name524', 534.111, 52400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,524]'); insert into test_proxima_be_restart_with_full_stage values(525, 'name525', 535.111, 52500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,525]'); insert into test_proxima_be_restart_with_full_stage values(526, 'name526', 536.111, 52600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,526]'); insert into test_proxima_be_restart_with_full_stage values(527, 'name527', 537.111, 52700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,527]'); insert into test_proxima_be_restart_with_full_stage values(528, 'name528', 538.111, 52800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,528]'); insert into test_proxima_be_restart_with_full_stage values(529, 'name529', 539.111, 52900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,529]'); insert into test_proxima_be_restart_with_full_stage values(530, 'name530', 540.111, 53000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,530]'); insert into test_proxima_be_restart_with_full_stage values(531, 'name531', 541.111, 53100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,531]'); insert into test_proxima_be_restart_with_full_stage values(532, 'name532', 542.111, 53200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,532]'); insert into test_proxima_be_restart_with_full_stage values(533, 'name533', 543.111, 53300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,533]'); insert into test_proxima_be_restart_with_full_stage values(534, 'name534', 544.111, 53400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,534]'); insert into test_proxima_be_restart_with_full_stage values(535, 'name535', 545.111, 53500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,535]'); insert into test_proxima_be_restart_with_full_stage values(536, 'name536', 546.111, 53600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,536]'); insert into test_proxima_be_restart_with_full_stage values(537, 'name537', 547.111, 53700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,537]'); insert into test_proxima_be_restart_with_full_stage values(538, 'name538', 548.111, 53800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,538]'); insert into test_proxima_be_restart_with_full_stage values(539, 'name539', 549.111, 53900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,539]'); insert into test_proxima_be_restart_with_full_stage values(540, 'name540', 550.111, 54000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,540]'); insert into test_proxima_be_restart_with_full_stage values(541, 'name541', 551.111, 54100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,541]'); insert into test_proxima_be_restart_with_full_stage values(542, 'name542', 552.111, 54200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,542]'); insert into test_proxima_be_restart_with_full_stage values(543, 'name543', 553.111, 54300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,543]'); insert into test_proxima_be_restart_with_full_stage values(544, 'name544', 554.111, 54400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,544]'); insert into test_proxima_be_restart_with_full_stage values(545, 'name545', 555.111, 54500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,545]'); insert into test_proxima_be_restart_with_full_stage values(546, 'name546', 556.111, 54600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,546]'); insert into test_proxima_be_restart_with_full_stage values(547, 'name547', 557.111, 54700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,547]'); insert into test_proxima_be_restart_with_full_stage values(548, 'name548', 558.111, 54800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,548]'); insert into test_proxima_be_restart_with_full_stage values(549, 'name549', 559.111, 54900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,549]'); insert into test_proxima_be_restart_with_full_stage values(550, 'name550', 560.111, 55000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,550]'); insert into test_proxima_be_restart_with_full_stage values(551, 'name551', 561.111, 55100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,551]'); insert into test_proxima_be_restart_with_full_stage values(552, 'name552', 562.111, 55200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,552]'); insert into test_proxima_be_restart_with_full_stage values(553, 'name553', 563.111, 55300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,553]'); insert into test_proxima_be_restart_with_full_stage values(554, 'name554', 564.111, 55400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,554]'); insert into test_proxima_be_restart_with_full_stage values(555, 'name555', 565.111, 55500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,555]'); insert into test_proxima_be_restart_with_full_stage values(556, 'name556', 566.111, 55600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,556]'); insert into test_proxima_be_restart_with_full_stage values(557, 'name557', 567.111, 55700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,557]'); insert into test_proxima_be_restart_with_full_stage values(558, 'name558', 568.111, 55800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,558]'); insert into test_proxima_be_restart_with_full_stage values(559, 'name559', 569.111, 55900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,559]'); insert into test_proxima_be_restart_with_full_stage values(560, 'name560', 570.111, 56000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,560]'); insert into test_proxima_be_restart_with_full_stage values(561, 'name561', 571.111, 56100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,561]'); insert into test_proxima_be_restart_with_full_stage values(562, 'name562', 572.111, 56200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,562]'); insert into test_proxima_be_restart_with_full_stage values(563, 'name563', 573.111, 56300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,563]'); insert into test_proxima_be_restart_with_full_stage values(564, 'name564', 574.111, 56400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,564]'); insert into test_proxima_be_restart_with_full_stage values(565, 'name565', 575.111, 56500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,565]'); insert into test_proxima_be_restart_with_full_stage values(566, 'name566', 576.111, 56600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,566]'); insert into test_proxima_be_restart_with_full_stage values(567, 'name567', 577.111, 56700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,567]'); insert into test_proxima_be_restart_with_full_stage values(568, 'name568', 578.111, 56800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,568]'); insert into test_proxima_be_restart_with_full_stage values(569, 'name569', 579.111, 56900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,569]'); insert into test_proxima_be_restart_with_full_stage values(570, 'name570', 580.111, 57000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,570]'); insert into test_proxima_be_restart_with_full_stage values(571, 'name571', 581.111, 57100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,571]'); insert into test_proxima_be_restart_with_full_stage values(572, 'name572', 582.111, 57200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,572]'); insert into test_proxima_be_restart_with_full_stage values(573, 'name573', 583.111, 57300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,573]'); insert into test_proxima_be_restart_with_full_stage values(574, 'name574', 584.111, 57400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,574]'); insert into test_proxima_be_restart_with_full_stage values(575, 'name575', 585.111, 57500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,575]'); insert into test_proxima_be_restart_with_full_stage values(576, 'name576', 586.111, 57600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,576]'); insert into test_proxima_be_restart_with_full_stage values(577, 'name577', 587.111, 57700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,577]'); insert into test_proxima_be_restart_with_full_stage values(578, 'name578', 588.111, 57800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,578]'); insert into test_proxima_be_restart_with_full_stage values(579, 'name579', 589.111, 57900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,579]'); insert into test_proxima_be_restart_with_full_stage values(580, 'name580', 590.111, 58000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,580]'); insert into test_proxima_be_restart_with_full_stage values(581, 'name581', 591.111, 58100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,581]'); insert into test_proxima_be_restart_with_full_stage values(582, 'name582', 592.111, 58200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,582]'); insert into test_proxima_be_restart_with_full_stage values(583, 'name583', 593.111, 58300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,583]'); insert into test_proxima_be_restart_with_full_stage values(584, 'name584', 594.111, 58400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,584]'); insert into test_proxima_be_restart_with_full_stage values(585, 'name585', 595.111, 58500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,585]'); insert into test_proxima_be_restart_with_full_stage values(586, 'name586', 596.111, 58600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,586]'); insert into test_proxima_be_restart_with_full_stage values(587, 'name587', 597.111, 58700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,587]'); insert into test_proxima_be_restart_with_full_stage values(588, 'name588', 598.111, 58800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,588]'); insert into test_proxima_be_restart_with_full_stage values(589, 'name589', 599.111, 58900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,589]'); insert into test_proxima_be_restart_with_full_stage values(590, 'name590', 600.111, 59000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,590]'); insert into test_proxima_be_restart_with_full_stage values(591, 'name591', 601.111, 59100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,591]'); insert into test_proxima_be_restart_with_full_stage values(592, 'name592', 602.111, 59200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,592]'); insert into test_proxima_be_restart_with_full_stage values(593, 'name593', 603.111, 59300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,593]'); insert into test_proxima_be_restart_with_full_stage values(594, 'name594', 604.111, 59400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,594]'); insert into test_proxima_be_restart_with_full_stage values(595, 'name595', 605.111, 59500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,595]'); insert into test_proxima_be_restart_with_full_stage values(596, 'name596', 606.111, 59600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,596]'); insert into test_proxima_be_restart_with_full_stage values(597, 'name597', 607.111, 59700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,597]'); insert into test_proxima_be_restart_with_full_stage values(598, 'name598', 608.111, 59800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,598]'); insert into test_proxima_be_restart_with_full_stage values(599, 'name599', 609.111, 59900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,599]'); insert into test_proxima_be_restart_with_full_stage values(600, 'name600', 610.111, 60000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,600]'); insert into test_proxima_be_restart_with_full_stage values(601, 'name601', 611.111, 60100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,601]'); insert into test_proxima_be_restart_with_full_stage values(602, 'name602', 612.111, 60200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,602]'); insert into test_proxima_be_restart_with_full_stage values(603, 'name603', 613.111, 60300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,603]'); insert into test_proxima_be_restart_with_full_stage values(604, 'name604', 614.111, 60400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,604]'); insert into test_proxima_be_restart_with_full_stage values(605, 'name605', 615.111, 60500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,605]'); insert into test_proxima_be_restart_with_full_stage values(606, 'name606', 616.111, 60600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,606]'); insert into test_proxima_be_restart_with_full_stage values(607, 'name607', 617.111, 60700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,607]'); insert into test_proxima_be_restart_with_full_stage values(608, 'name608', 618.111, 60800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,608]'); insert into test_proxima_be_restart_with_full_stage values(609, 'name609', 619.111, 60900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,609]'); insert into test_proxima_be_restart_with_full_stage values(610, 'name610', 620.111, 61000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,610]'); insert into test_proxima_be_restart_with_full_stage values(611, 'name611', 621.111, 61100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,611]'); insert into test_proxima_be_restart_with_full_stage values(612, 'name612', 622.111, 61200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,612]'); insert into test_proxima_be_restart_with_full_stage values(613, 'name613', 623.111, 61300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,613]'); insert into test_proxima_be_restart_with_full_stage values(614, 'name614', 624.111, 61400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,614]'); insert into test_proxima_be_restart_with_full_stage values(615, 'name615', 625.111, 61500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,615]'); insert into test_proxima_be_restart_with_full_stage values(616, 'name616', 626.111, 61600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,616]'); insert into test_proxima_be_restart_with_full_stage values(617, 'name617', 627.111, 61700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,617]'); insert into test_proxima_be_restart_with_full_stage values(618, 'name618', 628.111, 61800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,618]'); insert into test_proxima_be_restart_with_full_stage values(619, 'name619', 629.111, 61900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,619]'); insert into test_proxima_be_restart_with_full_stage values(620, 'name620', 630.111, 62000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,620]'); insert into test_proxima_be_restart_with_full_stage values(621, 'name621', 631.111, 62100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,621]'); insert into test_proxima_be_restart_with_full_stage values(622, 'name622', 632.111, 62200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,622]'); insert into test_proxima_be_restart_with_full_stage values(623, 'name623', 633.111, 62300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,623]'); insert into test_proxima_be_restart_with_full_stage values(624, 'name624', 634.111, 62400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,624]'); insert into test_proxima_be_restart_with_full_stage values(625, 'name625', 635.111, 62500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,625]'); insert into test_proxima_be_restart_with_full_stage values(626, 'name626', 636.111, 62600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,626]'); insert into test_proxima_be_restart_with_full_stage values(627, 'name627', 637.111, 62700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,627]'); insert into test_proxima_be_restart_with_full_stage values(628, 'name628', 638.111, 62800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,628]'); insert into test_proxima_be_restart_with_full_stage values(629, 'name629', 639.111, 62900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,629]'); insert into test_proxima_be_restart_with_full_stage values(630, 'name630', 640.111, 63000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,630]'); insert into test_proxima_be_restart_with_full_stage values(631, 'name631', 641.111, 63100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,631]'); insert into test_proxima_be_restart_with_full_stage values(632, 'name632', 642.111, 63200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,632]'); insert into test_proxima_be_restart_with_full_stage values(633, 'name633', 643.111, 63300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,633]'); insert into test_proxima_be_restart_with_full_stage values(634, 'name634', 644.111, 63400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,634]'); insert into test_proxima_be_restart_with_full_stage values(635, 'name635', 645.111, 63500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,635]'); insert into test_proxima_be_restart_with_full_stage values(636, 'name636', 646.111, 63600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,636]'); insert into test_proxima_be_restart_with_full_stage values(637, 'name637', 647.111, 63700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,637]'); insert into test_proxima_be_restart_with_full_stage values(638, 'name638', 648.111, 63800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,638]'); insert into test_proxima_be_restart_with_full_stage values(639, 'name639', 649.111, 63900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,639]'); insert into test_proxima_be_restart_with_full_stage values(640, 'name640', 650.111, 64000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,640]'); insert into test_proxima_be_restart_with_full_stage values(641, 'name641', 651.111, 64100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,641]'); insert into test_proxima_be_restart_with_full_stage values(642, 'name642', 652.111, 64200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,642]'); insert into test_proxima_be_restart_with_full_stage values(643, 'name643', 653.111, 64300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,643]'); insert into test_proxima_be_restart_with_full_stage values(644, 'name644', 654.111, 64400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,644]'); insert into test_proxima_be_restart_with_full_stage values(645, 'name645', 655.111, 64500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,645]'); insert into test_proxima_be_restart_with_full_stage values(646, 'name646', 656.111, 64600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,646]'); insert into test_proxima_be_restart_with_full_stage values(647, 'name647', 657.111, 64700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,647]'); insert into test_proxima_be_restart_with_full_stage values(648, 'name648', 658.111, 64800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,648]'); insert into test_proxima_be_restart_with_full_stage values(649, 'name649', 659.111, 64900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,649]'); insert into test_proxima_be_restart_with_full_stage values(650, 'name650', 660.111, 65000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,650]'); insert into test_proxima_be_restart_with_full_stage values(651, 'name651', 661.111, 65100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,651]'); insert into test_proxima_be_restart_with_full_stage values(652, 'name652', 662.111, 65200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,652]'); insert into test_proxima_be_restart_with_full_stage values(653, 'name653', 663.111, 65300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,653]'); insert into test_proxima_be_restart_with_full_stage values(654, 'name654', 664.111, 65400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,654]'); insert into test_proxima_be_restart_with_full_stage values(655, 'name655', 665.111, 65500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,655]'); insert into test_proxima_be_restart_with_full_stage values(656, 'name656', 666.111, 65600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,656]'); insert into test_proxima_be_restart_with_full_stage values(657, 'name657', 667.111, 65700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,657]'); insert into test_proxima_be_restart_with_full_stage values(658, 'name658', 668.111, 65800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,658]'); insert into test_proxima_be_restart_with_full_stage values(659, 'name659', 669.111, 65900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,659]'); insert into test_proxima_be_restart_with_full_stage values(660, 'name660', 670.111, 66000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,660]'); insert into test_proxima_be_restart_with_full_stage values(661, 'name661', 671.111, 66100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,661]'); insert into test_proxima_be_restart_with_full_stage values(662, 'name662', 672.111, 66200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,662]'); insert into test_proxima_be_restart_with_full_stage values(663, 'name663', 673.111, 66300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,663]'); insert into test_proxima_be_restart_with_full_stage values(664, 'name664', 674.111, 66400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,664]'); insert into test_proxima_be_restart_with_full_stage values(665, 'name665', 675.111, 66500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,665]'); insert into test_proxima_be_restart_with_full_stage values(666, 'name666', 676.111, 66600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,666]'); insert into test_proxima_be_restart_with_full_stage values(667, 'name667', 677.111, 66700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,667]'); insert into test_proxima_be_restart_with_full_stage values(668, 'name668', 678.111, 66800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,668]'); insert into test_proxima_be_restart_with_full_stage values(669, 'name669', 679.111, 66900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,669]'); insert into test_proxima_be_restart_with_full_stage values(670, 'name670', 680.111, 67000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,670]'); insert into test_proxima_be_restart_with_full_stage values(671, 'name671', 681.111, 67100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,671]'); insert into test_proxima_be_restart_with_full_stage values(672, 'name672', 682.111, 67200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,672]'); insert into test_proxima_be_restart_with_full_stage values(673, 'name673', 683.111, 67300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,673]'); insert into test_proxima_be_restart_with_full_stage values(674, 'name674', 684.111, 67400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,674]'); insert into test_proxima_be_restart_with_full_stage values(675, 'name675', 685.111, 67500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,675]'); insert into test_proxima_be_restart_with_full_stage values(676, 'name676', 686.111, 67600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,676]'); insert into test_proxima_be_restart_with_full_stage values(677, 'name677', 687.111, 67700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,677]'); insert into test_proxima_be_restart_with_full_stage values(678, 'name678', 688.111, 67800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,678]'); insert into test_proxima_be_restart_with_full_stage values(679, 'name679', 689.111, 67900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,679]'); insert into test_proxima_be_restart_with_full_stage values(680, 'name680', 690.111, 68000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,680]'); insert into test_proxima_be_restart_with_full_stage values(681, 'name681', 691.111, 68100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,681]'); insert into test_proxima_be_restart_with_full_stage values(682, 'name682', 692.111, 68200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,682]'); insert into test_proxima_be_restart_with_full_stage values(683, 'name683', 693.111, 68300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,683]'); insert into test_proxima_be_restart_with_full_stage values(684, 'name684', 694.111, 68400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,684]'); insert into test_proxima_be_restart_with_full_stage values(685, 'name685', 695.111, 68500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,685]'); insert into test_proxima_be_restart_with_full_stage values(686, 'name686', 696.111, 68600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,686]'); insert into test_proxima_be_restart_with_full_stage values(687, 'name687', 697.111, 68700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,687]'); insert into test_proxima_be_restart_with_full_stage values(688, 'name688', 698.111, 68800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,688]'); insert into test_proxima_be_restart_with_full_stage values(689, 'name689', 699.111, 68900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,689]'); insert into test_proxima_be_restart_with_full_stage values(690, 'name690', 700.111, 69000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,690]'); insert into test_proxima_be_restart_with_full_stage values(691, 'name691', 701.111, 69100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,691]'); insert into test_proxima_be_restart_with_full_stage values(692, 'name692', 702.111, 69200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,692]'); insert into test_proxima_be_restart_with_full_stage values(693, 'name693', 703.111, 69300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,693]'); insert into test_proxima_be_restart_with_full_stage values(694, 'name694', 704.111, 69400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,694]'); insert into test_proxima_be_restart_with_full_stage values(695, 'name695', 705.111, 69500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,695]'); insert into test_proxima_be_restart_with_full_stage values(696, 'name696', 706.111, 69600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,696]'); insert into test_proxima_be_restart_with_full_stage values(697, 'name697', 707.111, 69700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,697]'); insert into test_proxima_be_restart_with_full_stage values(698, 'name698', 708.111, 69800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,698]'); insert into test_proxima_be_restart_with_full_stage values(699, 'name699', 709.111, 69900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,699]'); insert into test_proxima_be_restart_with_full_stage values(700, 'name700', 710.111, 70000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,700]'); insert into test_proxima_be_restart_with_full_stage values(701, 'name701', 711.111, 70100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,701]'); insert into test_proxima_be_restart_with_full_stage values(702, 'name702', 712.111, 70200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,702]'); insert into test_proxima_be_restart_with_full_stage values(703, 'name703', 713.111, 70300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,703]'); insert into test_proxima_be_restart_with_full_stage values(704, 'name704', 714.111, 70400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,704]'); insert into test_proxima_be_restart_with_full_stage values(705, 'name705', 715.111, 70500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,705]'); insert into test_proxima_be_restart_with_full_stage values(706, 'name706', 716.111, 70600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,706]'); insert into test_proxima_be_restart_with_full_stage values(707, 'name707', 717.111, 70700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,707]'); insert into test_proxima_be_restart_with_full_stage values(708, 'name708', 718.111, 70800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,708]'); insert into test_proxima_be_restart_with_full_stage values(709, 'name709', 719.111, 70900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,709]'); insert into test_proxima_be_restart_with_full_stage values(710, 'name710', 720.111, 71000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,710]'); insert into test_proxima_be_restart_with_full_stage values(711, 'name711', 721.111, 71100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,711]'); insert into test_proxima_be_restart_with_full_stage values(712, 'name712', 722.111, 71200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,712]'); insert into test_proxima_be_restart_with_full_stage values(713, 'name713', 723.111, 71300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,713]'); insert into test_proxima_be_restart_with_full_stage values(714, 'name714', 724.111, 71400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,714]'); insert into test_proxima_be_restart_with_full_stage values(715, 'name715', 725.111, 71500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,715]'); insert into test_proxima_be_restart_with_full_stage values(716, 'name716', 726.111, 71600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,716]'); insert into test_proxima_be_restart_with_full_stage values(717, 'name717', 727.111, 71700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,717]'); insert into test_proxima_be_restart_with_full_stage values(718, 'name718', 728.111, 71800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,718]'); insert into test_proxima_be_restart_with_full_stage values(719, 'name719', 729.111, 71900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,719]'); insert into test_proxima_be_restart_with_full_stage values(720, 'name720', 730.111, 72000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,720]'); insert into test_proxima_be_restart_with_full_stage values(721, 'name721', 731.111, 72100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,721]'); insert into test_proxima_be_restart_with_full_stage values(722, 'name722', 732.111, 72200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,722]'); insert into test_proxima_be_restart_with_full_stage values(723, 'name723', 733.111, 72300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,723]'); insert into test_proxima_be_restart_with_full_stage values(724, 'name724', 734.111, 72400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,724]'); insert into test_proxima_be_restart_with_full_stage values(725, 'name725', 735.111, 72500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,725]'); insert into test_proxima_be_restart_with_full_stage values(726, 'name726', 736.111, 72600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,726]'); insert into test_proxima_be_restart_with_full_stage values(727, 'name727', 737.111, 72700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,727]'); insert into test_proxima_be_restart_with_full_stage values(728, 'name728', 738.111, 72800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,728]'); insert into test_proxima_be_restart_with_full_stage values(729, 'name729', 739.111, 72900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,729]'); insert into test_proxima_be_restart_with_full_stage values(730, 'name730', 740.111, 73000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,730]'); insert into test_proxima_be_restart_with_full_stage values(731, 'name731', 741.111, 73100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,731]'); insert into test_proxima_be_restart_with_full_stage values(732, 'name732', 742.111, 73200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,732]'); insert into test_proxima_be_restart_with_full_stage values(733, 'name733', 743.111, 73300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,733]'); insert into test_proxima_be_restart_with_full_stage values(734, 'name734', 744.111, 73400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,734]'); insert into test_proxima_be_restart_with_full_stage values(735, 'name735', 745.111, 73500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,735]'); insert into test_proxima_be_restart_with_full_stage values(736, 'name736', 746.111, 73600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,736]'); insert into test_proxima_be_restart_with_full_stage values(737, 'name737', 747.111, 73700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,737]'); insert into test_proxima_be_restart_with_full_stage values(738, 'name738', 748.111, 73800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,738]'); insert into test_proxima_be_restart_with_full_stage values(739, 'name739', 749.111, 73900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,739]'); insert into test_proxima_be_restart_with_full_stage values(740, 'name740', 750.111, 74000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,740]'); insert into test_proxima_be_restart_with_full_stage values(741, 'name741', 751.111, 74100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,741]'); insert into test_proxima_be_restart_with_full_stage values(742, 'name742', 752.111, 74200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,742]'); insert into test_proxima_be_restart_with_full_stage values(743, 'name743', 753.111, 74300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,743]'); insert into test_proxima_be_restart_with_full_stage values(744, 'name744', 754.111, 74400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,744]'); insert into test_proxima_be_restart_with_full_stage values(745, 'name745', 755.111, 74500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,745]'); insert into test_proxima_be_restart_with_full_stage values(746, 'name746', 756.111, 74600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,746]'); insert into test_proxima_be_restart_with_full_stage values(747, 'name747', 757.111, 74700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,747]'); insert into test_proxima_be_restart_with_full_stage values(748, 'name748', 758.111, 74800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,748]'); insert into test_proxima_be_restart_with_full_stage values(749, 'name749', 759.111, 74900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,749]'); insert into test_proxima_be_restart_with_full_stage values(750, 'name750', 760.111, 75000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,750]'); insert into test_proxima_be_restart_with_full_stage values(751, 'name751', 761.111, 75100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,751]'); insert into test_proxima_be_restart_with_full_stage values(752, 'name752', 762.111, 75200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,752]'); insert into test_proxima_be_restart_with_full_stage values(753, 'name753', 763.111, 75300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,753]'); insert into test_proxima_be_restart_with_full_stage values(754, 'name754', 764.111, 75400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,754]'); insert into test_proxima_be_restart_with_full_stage values(755, 'name755', 765.111, 75500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,755]'); insert into test_proxima_be_restart_with_full_stage values(756, 'name756', 766.111, 75600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,756]'); insert into test_proxima_be_restart_with_full_stage values(757, 'name757', 767.111, 75700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,757]'); insert into test_proxima_be_restart_with_full_stage values(758, 'name758', 768.111, 75800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,758]'); insert into test_proxima_be_restart_with_full_stage values(759, 'name759', 769.111, 75900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,759]'); insert into test_proxima_be_restart_with_full_stage values(760, 'name760', 770.111, 76000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,760]'); insert into test_proxima_be_restart_with_full_stage values(761, 'name761', 771.111, 76100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,761]'); insert into test_proxima_be_restart_with_full_stage values(762, 'name762', 772.111, 76200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,762]'); insert into test_proxima_be_restart_with_full_stage values(763, 'name763', 773.111, 76300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,763]'); insert into test_proxima_be_restart_with_full_stage values(764, 'name764', 774.111, 76400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,764]'); insert into test_proxima_be_restart_with_full_stage values(765, 'name765', 775.111, 76500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,765]'); insert into test_proxima_be_restart_with_full_stage values(766, 'name766', 776.111, 76600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,766]'); insert into test_proxima_be_restart_with_full_stage values(767, 'name767', 777.111, 76700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,767]'); insert into test_proxima_be_restart_with_full_stage values(768, 'name768', 778.111, 76800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,768]'); insert into test_proxima_be_restart_with_full_stage values(769, 'name769', 779.111, 76900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,769]'); insert into test_proxima_be_restart_with_full_stage values(770, 'name770', 780.111, 77000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,770]'); insert into test_proxima_be_restart_with_full_stage values(771, 'name771', 781.111, 77100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,771]'); insert into test_proxima_be_restart_with_full_stage values(772, 'name772', 782.111, 77200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,772]'); insert into test_proxima_be_restart_with_full_stage values(773, 'name773', 783.111, 77300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,773]'); insert into test_proxima_be_restart_with_full_stage values(774, 'name774', 784.111, 77400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,774]'); insert into test_proxima_be_restart_with_full_stage values(775, 'name775', 785.111, 77500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,775]'); insert into test_proxima_be_restart_with_full_stage values(776, 'name776', 786.111, 77600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,776]'); insert into test_proxima_be_restart_with_full_stage values(777, 'name777', 787.111, 77700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,777]'); insert into test_proxima_be_restart_with_full_stage values(778, 'name778', 788.111, 77800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,778]'); insert into test_proxima_be_restart_with_full_stage values(779, 'name779', 789.111, 77900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,779]'); insert into test_proxima_be_restart_with_full_stage values(780, 'name780', 790.111, 78000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,780]'); insert into test_proxima_be_restart_with_full_stage values(781, 'name781', 791.111, 78100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,781]'); insert into test_proxima_be_restart_with_full_stage values(782, 'name782', 792.111, 78200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,782]'); insert into test_proxima_be_restart_with_full_stage values(783, 'name783', 793.111, 78300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,783]'); insert into test_proxima_be_restart_with_full_stage values(784, 'name784', 794.111, 78400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,784]'); insert into test_proxima_be_restart_with_full_stage values(785, 'name785', 795.111, 78500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,785]'); insert into test_proxima_be_restart_with_full_stage values(786, 'name786', 796.111, 78600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,786]'); insert into test_proxima_be_restart_with_full_stage values(787, 'name787', 797.111, 78700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,787]'); insert into test_proxima_be_restart_with_full_stage values(788, 'name788', 798.111, 78800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,788]'); insert into test_proxima_be_restart_with_full_stage values(789, 'name789', 799.111, 78900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,789]'); insert into test_proxima_be_restart_with_full_stage values(790, 'name790', 800.111, 79000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,790]'); insert into test_proxima_be_restart_with_full_stage values(791, 'name791', 801.111, 79100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,791]'); insert into test_proxima_be_restart_with_full_stage values(792, 'name792', 802.111, 79200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,792]'); insert into test_proxima_be_restart_with_full_stage values(793, 'name793', 803.111, 79300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,793]'); insert into test_proxima_be_restart_with_full_stage values(794, 'name794', 804.111, 79400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,794]'); insert into test_proxima_be_restart_with_full_stage values(795, 'name795', 805.111, 79500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,795]'); insert into test_proxima_be_restart_with_full_stage values(796, 'name796', 806.111, 79600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,796]'); insert into test_proxima_be_restart_with_full_stage values(797, 'name797', 807.111, 79700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,797]'); insert into test_proxima_be_restart_with_full_stage values(798, 'name798', 808.111, 79800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,798]'); insert into test_proxima_be_restart_with_full_stage values(799, 'name799', 809.111, 79900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,799]'); insert into test_proxima_be_restart_with_full_stage values(800, 'name800', 810.111, 80000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,800]'); insert into test_proxima_be_restart_with_full_stage values(801, 'name801', 811.111, 80100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,801]'); insert into test_proxima_be_restart_with_full_stage values(802, 'name802', 812.111, 80200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,802]'); insert into test_proxima_be_restart_with_full_stage values(803, 'name803', 813.111, 80300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,803]'); insert into test_proxima_be_restart_with_full_stage values(804, 'name804', 814.111, 80400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,804]'); insert into test_proxima_be_restart_with_full_stage values(805, 'name805', 815.111, 80500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,805]'); insert into test_proxima_be_restart_with_full_stage values(806, 'name806', 816.111, 80600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,806]'); insert into test_proxima_be_restart_with_full_stage values(807, 'name807', 817.111, 80700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,807]'); insert into test_proxima_be_restart_with_full_stage values(808, 'name808', 818.111, 80800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,808]'); insert into test_proxima_be_restart_with_full_stage values(809, 'name809', 819.111, 80900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,809]'); insert into test_proxima_be_restart_with_full_stage values(810, 'name810', 820.111, 81000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,810]'); insert into test_proxima_be_restart_with_full_stage values(811, 'name811', 821.111, 81100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,811]'); insert into test_proxima_be_restart_with_full_stage values(812, 'name812', 822.111, 81200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,812]'); insert into test_proxima_be_restart_with_full_stage values(813, 'name813', 823.111, 81300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,813]'); insert into test_proxima_be_restart_with_full_stage values(814, 'name814', 824.111, 81400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,814]'); insert into test_proxima_be_restart_with_full_stage values(815, 'name815', 825.111, 81500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,815]'); insert into test_proxima_be_restart_with_full_stage values(816, 'name816', 826.111, 81600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,816]'); insert into test_proxima_be_restart_with_full_stage values(817, 'name817', 827.111, 81700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,817]'); insert into test_proxima_be_restart_with_full_stage values(818, 'name818', 828.111, 81800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,818]'); insert into test_proxima_be_restart_with_full_stage values(819, 'name819', 829.111, 81900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,819]'); insert into test_proxima_be_restart_with_full_stage values(820, 'name820', 830.111, 82000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,820]'); insert into test_proxima_be_restart_with_full_stage values(821, 'name821', 831.111, 82100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,821]'); insert into test_proxima_be_restart_with_full_stage values(822, 'name822', 832.111, 82200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,822]'); insert into test_proxima_be_restart_with_full_stage values(823, 'name823', 833.111, 82300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,823]'); insert into test_proxima_be_restart_with_full_stage values(824, 'name824', 834.111, 82400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,824]'); insert into test_proxima_be_restart_with_full_stage values(825, 'name825', 835.111, 82500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,825]'); insert into test_proxima_be_restart_with_full_stage values(826, 'name826', 836.111, 82600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,826]'); insert into test_proxima_be_restart_with_full_stage values(827, 'name827', 837.111, 82700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,827]'); insert into test_proxima_be_restart_with_full_stage values(828, 'name828', 838.111, 82800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,828]'); insert into test_proxima_be_restart_with_full_stage values(829, 'name829', 839.111, 82900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,829]'); insert into test_proxima_be_restart_with_full_stage values(830, 'name830', 840.111, 83000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,830]'); insert into test_proxima_be_restart_with_full_stage values(831, 'name831', 841.111, 83100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,831]'); insert into test_proxima_be_restart_with_full_stage values(832, 'name832', 842.111, 83200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,832]'); insert into test_proxima_be_restart_with_full_stage values(833, 'name833', 843.111, 83300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,833]'); insert into test_proxima_be_restart_with_full_stage values(834, 'name834', 844.111, 83400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,834]'); insert into test_proxima_be_restart_with_full_stage values(835, 'name835', 845.111, 83500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,835]'); insert into test_proxima_be_restart_with_full_stage values(836, 'name836', 846.111, 83600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,836]'); insert into test_proxima_be_restart_with_full_stage values(837, 'name837', 847.111, 83700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,837]'); insert into test_proxima_be_restart_with_full_stage values(838, 'name838', 848.111, 83800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,838]'); insert into test_proxima_be_restart_with_full_stage values(839, 'name839', 849.111, 83900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,839]'); insert into test_proxima_be_restart_with_full_stage values(840, 'name840', 850.111, 84000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,840]'); insert into test_proxima_be_restart_with_full_stage values(841, 'name841', 851.111, 84100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,841]'); insert into test_proxima_be_restart_with_full_stage values(842, 'name842', 852.111, 84200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,842]'); insert into test_proxima_be_restart_with_full_stage values(843, 'name843', 853.111, 84300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,843]'); insert into test_proxima_be_restart_with_full_stage values(844, 'name844', 854.111, 84400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,844]'); insert into test_proxima_be_restart_with_full_stage values(845, 'name845', 855.111, 84500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,845]'); insert into test_proxima_be_restart_with_full_stage values(846, 'name846', 856.111, 84600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,846]'); insert into test_proxima_be_restart_with_full_stage values(847, 'name847', 857.111, 84700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,847]'); insert into test_proxima_be_restart_with_full_stage values(848, 'name848', 858.111, 84800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,848]'); insert into test_proxima_be_restart_with_full_stage values(849, 'name849', 859.111, 84900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,849]'); insert into test_proxima_be_restart_with_full_stage values(850, 'name850', 860.111, 85000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,850]'); insert into test_proxima_be_restart_with_full_stage values(851, 'name851', 861.111, 85100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,851]'); insert into test_proxima_be_restart_with_full_stage values(852, 'name852', 862.111, 85200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,852]'); insert into test_proxima_be_restart_with_full_stage values(853, 'name853', 863.111, 85300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,853]'); insert into test_proxima_be_restart_with_full_stage values(854, 'name854', 864.111, 85400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,854]'); insert into test_proxima_be_restart_with_full_stage values(855, 'name855', 865.111, 85500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,855]'); insert into test_proxima_be_restart_with_full_stage values(856, 'name856', 866.111, 85600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,856]'); insert into test_proxima_be_restart_with_full_stage values(857, 'name857', 867.111, 85700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,857]'); insert into test_proxima_be_restart_with_full_stage values(858, 'name858', 868.111, 85800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,858]'); insert into test_proxima_be_restart_with_full_stage values(859, 'name859', 869.111, 85900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,859]'); insert into test_proxima_be_restart_with_full_stage values(860, 'name860', 870.111, 86000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,860]'); insert into test_proxima_be_restart_with_full_stage values(861, 'name861', 871.111, 86100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,861]'); insert into test_proxima_be_restart_with_full_stage values(862, 'name862', 872.111, 86200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,862]'); insert into test_proxima_be_restart_with_full_stage values(863, 'name863', 873.111, 86300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,863]'); insert into test_proxima_be_restart_with_full_stage values(864, 'name864', 874.111, 86400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,864]'); insert into test_proxima_be_restart_with_full_stage values(865, 'name865', 875.111, 86500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,865]'); insert into test_proxima_be_restart_with_full_stage values(866, 'name866', 876.111, 86600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,866]'); insert into test_proxima_be_restart_with_full_stage values(867, 'name867', 877.111, 86700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,867]'); insert into test_proxima_be_restart_with_full_stage values(868, 'name868', 878.111, 86800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,868]'); insert into test_proxima_be_restart_with_full_stage values(869, 'name869', 879.111, 86900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,869]'); insert into test_proxima_be_restart_with_full_stage values(870, 'name870', 880.111, 87000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,870]'); insert into test_proxima_be_restart_with_full_stage values(871, 'name871', 881.111, 87100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,871]'); insert into test_proxima_be_restart_with_full_stage values(872, 'name872', 882.111, 87200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,872]'); insert into test_proxima_be_restart_with_full_stage values(873, 'name873', 883.111, 87300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,873]'); insert into test_proxima_be_restart_with_full_stage values(874, 'name874', 884.111, 87400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,874]'); insert into test_proxima_be_restart_with_full_stage values(875, 'name875', 885.111, 87500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,875]'); insert into test_proxima_be_restart_with_full_stage values(876, 'name876', 886.111, 87600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,876]'); insert into test_proxima_be_restart_with_full_stage values(877, 'name877', 887.111, 87700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,877]'); insert into test_proxima_be_restart_with_full_stage values(878, 'name878', 888.111, 87800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,878]'); insert into test_proxima_be_restart_with_full_stage values(879, 'name879', 889.111, 87900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,879]'); insert into test_proxima_be_restart_with_full_stage values(880, 'name880', 890.111, 88000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,880]'); insert into test_proxima_be_restart_with_full_stage values(881, 'name881', 891.111, 88100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,881]'); insert into test_proxima_be_restart_with_full_stage values(882, 'name882', 892.111, 88200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,882]'); insert into test_proxima_be_restart_with_full_stage values(883, 'name883', 893.111, 88300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,883]'); insert into test_proxima_be_restart_with_full_stage values(884, 'name884', 894.111, 88400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,884]'); insert into test_proxima_be_restart_with_full_stage values(885, 'name885', 895.111, 88500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,885]'); insert into test_proxima_be_restart_with_full_stage values(886, 'name886', 896.111, 88600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,886]'); insert into test_proxima_be_restart_with_full_stage values(887, 'name887', 897.111, 88700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,887]'); insert into test_proxima_be_restart_with_full_stage values(888, 'name888', 898.111, 88800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,888]'); insert into test_proxima_be_restart_with_full_stage values(889, 'name889', 899.111, 88900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,889]'); insert into test_proxima_be_restart_with_full_stage values(890, 'name890', 900.111, 89000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,890]'); insert into test_proxima_be_restart_with_full_stage values(891, 'name891', 901.111, 89100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,891]'); insert into test_proxima_be_restart_with_full_stage values(892, 'name892', 902.111, 89200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,892]'); insert into test_proxima_be_restart_with_full_stage values(893, 'name893', 903.111, 89300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,893]'); insert into test_proxima_be_restart_with_full_stage values(894, 'name894', 904.111, 89400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,894]'); insert into test_proxima_be_restart_with_full_stage values(895, 'name895', 905.111, 89500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,895]'); insert into test_proxima_be_restart_with_full_stage values(896, 'name896', 906.111, 89600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,896]'); insert into test_proxima_be_restart_with_full_stage values(897, 'name897', 907.111, 89700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,897]'); insert into test_proxima_be_restart_with_full_stage values(898, 'name898', 908.111, 89800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,898]'); insert into test_proxima_be_restart_with_full_stage values(899, 'name899', 909.111, 89900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,899]'); insert into test_proxima_be_restart_with_full_stage values(900, 'name900', 910.111, 90000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,900]'); insert into test_proxima_be_restart_with_full_stage values(901, 'name901', 911.111, 90100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,901]'); insert into test_proxima_be_restart_with_full_stage values(902, 'name902', 912.111, 90200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,902]'); insert into test_proxima_be_restart_with_full_stage values(903, 'name903', 913.111, 90300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,903]'); insert into test_proxima_be_restart_with_full_stage values(904, 'name904', 914.111, 90400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,904]'); insert into test_proxima_be_restart_with_full_stage values(905, 'name905', 915.111, 90500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,905]'); insert into test_proxima_be_restart_with_full_stage values(906, 'name906', 916.111, 90600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,906]'); insert into test_proxima_be_restart_with_full_stage values(907, 'name907', 917.111, 90700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,907]'); insert into test_proxima_be_restart_with_full_stage values(908, 'name908', 918.111, 90800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,908]'); insert into test_proxima_be_restart_with_full_stage values(909, 'name909', 919.111, 90900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,909]'); insert into test_proxima_be_restart_with_full_stage values(910, 'name910', 920.111, 91000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,910]'); insert into test_proxima_be_restart_with_full_stage values(911, 'name911', 921.111, 91100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,911]'); insert into test_proxima_be_restart_with_full_stage values(912, 'name912', 922.111, 91200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,912]'); insert into test_proxima_be_restart_with_full_stage values(913, 'name913', 923.111, 91300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,913]'); insert into test_proxima_be_restart_with_full_stage values(914, 'name914', 924.111, 91400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,914]'); insert into test_proxima_be_restart_with_full_stage values(915, 'name915', 925.111, 91500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,915]'); insert into test_proxima_be_restart_with_full_stage values(916, 'name916', 926.111, 91600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,916]'); insert into test_proxima_be_restart_with_full_stage values(917, 'name917', 927.111, 91700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,917]'); insert into test_proxima_be_restart_with_full_stage values(918, 'name918', 928.111, 91800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,918]'); insert into test_proxima_be_restart_with_full_stage values(919, 'name919', 929.111, 91900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,919]'); insert into test_proxima_be_restart_with_full_stage values(920, 'name920', 930.111, 92000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,920]'); insert into test_proxima_be_restart_with_full_stage values(921, 'name921', 931.111, 92100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,921]'); insert into test_proxima_be_restart_with_full_stage values(922, 'name922', 932.111, 92200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,922]'); insert into test_proxima_be_restart_with_full_stage values(923, 'name923', 933.111, 92300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,923]'); insert into test_proxima_be_restart_with_full_stage values(924, 'name924', 934.111, 92400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,924]'); insert into test_proxima_be_restart_with_full_stage values(925, 'name925', 935.111, 92500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,925]'); insert into test_proxima_be_restart_with_full_stage values(926, 'name926', 936.111, 92600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,926]'); insert into test_proxima_be_restart_with_full_stage values(927, 'name927', 937.111, 92700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,927]'); insert into test_proxima_be_restart_with_full_stage values(928, 'name928', 938.111, 92800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,928]'); insert into test_proxima_be_restart_with_full_stage values(929, 'name929', 939.111, 92900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,929]'); insert into test_proxima_be_restart_with_full_stage values(930, 'name930', 940.111, 93000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,930]'); insert into test_proxima_be_restart_with_full_stage values(931, 'name931', 941.111, 93100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,931]'); insert into test_proxima_be_restart_with_full_stage values(932, 'name932', 942.111, 93200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,932]'); insert into test_proxima_be_restart_with_full_stage values(933, 'name933', 943.111, 93300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,933]'); insert into test_proxima_be_restart_with_full_stage values(934, 'name934', 944.111, 93400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,934]'); insert into test_proxima_be_restart_with_full_stage values(935, 'name935', 945.111, 93500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,935]'); insert into test_proxima_be_restart_with_full_stage values(936, 'name936', 946.111, 93600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,936]'); insert into test_proxima_be_restart_with_full_stage values(937, 'name937', 947.111, 93700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,937]'); insert into test_proxima_be_restart_with_full_stage values(938, 'name938', 948.111, 93800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,938]'); insert into test_proxima_be_restart_with_full_stage values(939, 'name939', 949.111, 93900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,939]'); insert into test_proxima_be_restart_with_full_stage values(940, 'name940', 950.111, 94000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,940]'); insert into test_proxima_be_restart_with_full_stage values(941, 'name941', 951.111, 94100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,941]'); insert into test_proxima_be_restart_with_full_stage values(942, 'name942', 952.111, 94200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,942]'); insert into test_proxima_be_restart_with_full_stage values(943, 'name943', 953.111, 94300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,943]'); insert into test_proxima_be_restart_with_full_stage values(944, 'name944', 954.111, 94400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,944]'); insert into test_proxima_be_restart_with_full_stage values(945, 'name945', 955.111, 94500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,945]'); insert into test_proxima_be_restart_with_full_stage values(946, 'name946', 956.111, 94600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,946]'); insert into test_proxima_be_restart_with_full_stage values(947, 'name947', 957.111, 94700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,947]'); insert into test_proxima_be_restart_with_full_stage values(948, 'name948', 958.111, 94800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,948]'); insert into test_proxima_be_restart_with_full_stage values(949, 'name949', 959.111, 94900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,949]'); insert into test_proxima_be_restart_with_full_stage values(950, 'name950', 960.111, 95000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,950]'); insert into test_proxima_be_restart_with_full_stage values(951, 'name951', 961.111, 95100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,951]'); insert into test_proxima_be_restart_with_full_stage values(952, 'name952', 962.111, 95200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,952]'); insert into test_proxima_be_restart_with_full_stage values(953, 'name953', 963.111, 95300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,953]'); insert into test_proxima_be_restart_with_full_stage values(954, 'name954', 964.111, 95400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,954]'); insert into test_proxima_be_restart_with_full_stage values(955, 'name955', 965.111, 95500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,955]'); insert into test_proxima_be_restart_with_full_stage values(956, 'name956', 966.111, 95600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,956]'); insert into test_proxima_be_restart_with_full_stage values(957, 'name957', 967.111, 95700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,957]'); insert into test_proxima_be_restart_with_full_stage values(958, 'name958', 968.111, 95800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,958]'); insert into test_proxima_be_restart_with_full_stage values(959, 'name959', 969.111, 95900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,959]'); insert into test_proxima_be_restart_with_full_stage values(960, 'name960', 970.111, 96000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,960]'); insert into test_proxima_be_restart_with_full_stage values(961, 'name961', 971.111, 96100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,961]'); insert into test_proxima_be_restart_with_full_stage values(962, 'name962', 972.111, 96200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,962]'); insert into test_proxima_be_restart_with_full_stage values(963, 'name963', 973.111, 96300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,963]'); insert into test_proxima_be_restart_with_full_stage values(964, 'name964', 974.111, 96400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,964]'); insert into test_proxima_be_restart_with_full_stage values(965, 'name965', 975.111, 96500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,965]'); insert into test_proxima_be_restart_with_full_stage values(966, 'name966', 976.111, 96600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,966]'); insert into test_proxima_be_restart_with_full_stage values(967, 'name967', 977.111, 96700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,967]'); insert into test_proxima_be_restart_with_full_stage values(968, 'name968', 978.111, 96800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,968]'); insert into test_proxima_be_restart_with_full_stage values(969, 'name969', 979.111, 96900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,969]'); insert into test_proxima_be_restart_with_full_stage values(970, 'name970', 980.111, 97000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,970]'); insert into test_proxima_be_restart_with_full_stage values(971, 'name971', 981.111, 97100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,971]'); insert into test_proxima_be_restart_with_full_stage values(972, 'name972', 982.111, 97200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,972]'); insert into test_proxima_be_restart_with_full_stage values(973, 'name973', 983.111, 97300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,973]'); insert into test_proxima_be_restart_with_full_stage values(974, 'name974', 984.111, 97400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,974]'); insert into test_proxima_be_restart_with_full_stage values(975, 'name975', 985.111, 97500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,975]'); insert into test_proxima_be_restart_with_full_stage values(976, 'name976', 986.111, 97600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,976]'); insert into test_proxima_be_restart_with_full_stage values(977, 'name977', 987.111, 97700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,977]'); insert into test_proxima_be_restart_with_full_stage values(978, 'name978', 988.111, 97800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,978]'); insert into test_proxima_be_restart_with_full_stage values(979, 'name979', 989.111, 97900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,979]'); insert into test_proxima_be_restart_with_full_stage values(980, 'name980', 990.111, 98000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,980]'); insert into test_proxima_be_restart_with_full_stage values(981, 'name981', 991.111, 98100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,981]'); insert into test_proxima_be_restart_with_full_stage values(982, 'name982', 992.111, 98200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,982]'); insert into test_proxima_be_restart_with_full_stage values(983, 'name983', 993.111, 98300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,983]'); insert into test_proxima_be_restart_with_full_stage values(984, 'name984', 994.111, 98400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,984]'); insert into test_proxima_be_restart_with_full_stage values(985, 'name985', 995.111, 98500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,985]'); insert into test_proxima_be_restart_with_full_stage values(986, 'name986', 996.111, 98600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,986]'); insert into test_proxima_be_restart_with_full_stage values(987, 'name987', 997.111, 98700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,987]'); insert into test_proxima_be_restart_with_full_stage values(988, 'name988', 998.111, 98800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,988]'); insert into test_proxima_be_restart_with_full_stage values(989, 'name989', 999.111, 98900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,989]'); insert into test_proxima_be_restart_with_full_stage values(990, 'name990', 1000.111, 99000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,990]'); insert into test_proxima_be_restart_with_full_stage values(991, 'name991', 1001.111, 99100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,991]'); insert into test_proxima_be_restart_with_full_stage values(992, 'name992', 1002.111, 99200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,992]'); insert into test_proxima_be_restart_with_full_stage values(993, 'name993', 1003.111, 99300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,993]'); insert into test_proxima_be_restart_with_full_stage values(994, 'name994', 1004.111, 99400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,994]'); insert into test_proxima_be_restart_with_full_stage values(995, 'name995', 1005.111, 99500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,995]'); insert into test_proxima_be_restart_with_full_stage values(996, 'name996', 1006.111, 99600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,996]'); insert into test_proxima_be_restart_with_full_stage values(997, 'name997', 1007.111, 99700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,997]'); insert into test_proxima_be_restart_with_full_stage values(998, 'name998', 1008.111, 99800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,998]'); insert into test_proxima_be_restart_with_full_stage values(999, 'name999', 1009.111, 99900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,999]'); insert into test_proxima_be_restart_with_full_stage values(1000, 'name1000', 1010.111, 100000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1000]'); insert into test_proxima_be_restart_with_full_stage values(1001, 'name1001', 1011.111, 100100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1001]'); insert into test_proxima_be_restart_with_full_stage values(1002, 'name1002', 1012.111, 100200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1002]'); insert into test_proxima_be_restart_with_full_stage values(1003, 'name1003', 1013.111, 100300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1003]'); insert into test_proxima_be_restart_with_full_stage values(1004, 'name1004', 1014.111, 100400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1004]'); insert into test_proxima_be_restart_with_full_stage values(1005, 'name1005', 1015.111, 100500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1005]'); insert into test_proxima_be_restart_with_full_stage values(1006, 'name1006', 1016.111, 100600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1006]'); insert into test_proxima_be_restart_with_full_stage values(1007, 'name1007', 1017.111, 100700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1007]'); insert into test_proxima_be_restart_with_full_stage values(1008, 'name1008', 1018.111, 100800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1008]'); insert into test_proxima_be_restart_with_full_stage values(1009, 'name1009', 1019.111, 100900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1009]'); insert into test_proxima_be_restart_with_full_stage values(1010, 'name1010', 1020.111, 101000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1010]'); insert into test_proxima_be_restart_with_full_stage values(1011, 'name1011', 1021.111, 101100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1011]'); insert into test_proxima_be_restart_with_full_stage values(1012, 'name1012', 1022.111, 101200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1012]'); insert into test_proxima_be_restart_with_full_stage values(1013, 'name1013', 1023.111, 101300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1013]'); insert into test_proxima_be_restart_with_full_stage values(1014, 'name1014', 1024.111, 101400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1014]'); insert into test_proxima_be_restart_with_full_stage values(1015, 'name1015', 1025.111, 101500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1015]'); insert into test_proxima_be_restart_with_full_stage values(1016, 'name1016', 1026.111, 101600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1016]'); insert into test_proxima_be_restart_with_full_stage values(1017, 'name1017', 1027.111, 101700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1017]'); insert into test_proxima_be_restart_with_full_stage values(1018, 'name1018', 1028.111, 101800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1018]'); insert into test_proxima_be_restart_with_full_stage values(1019, 'name1019', 1029.111, 101900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1019]'); insert into test_proxima_be_restart_with_full_stage values(1020, 'name1020', 1030.111, 102000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1020]'); insert into test_proxima_be_restart_with_full_stage values(1021, 'name1021', 1031.111, 102100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1021]'); insert into test_proxima_be_restart_with_full_stage values(1022, 'name1022', 1032.111, 102200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1022]'); insert into test_proxima_be_restart_with_full_stage values(1023, 'name1023', 1033.111, 102300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1023]'); insert into test_proxima_be_restart_with_full_stage values(1024, 'name1024', 1034.111, 102400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1024]'); insert into test_proxima_be_restart_with_full_stage values(1025, 'name1025', 1035.111, 102500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1025]'); insert into test_proxima_be_restart_with_full_stage values(1026, 'name1026', 1036.111, 102600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1026]'); insert into test_proxima_be_restart_with_full_stage values(1027, 'name1027', 1037.111, 102700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1027]'); insert into test_proxima_be_restart_with_full_stage values(1028, 'name1028', 1038.111, 102800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1028]'); insert into test_proxima_be_restart_with_full_stage values(1029, 'name1029', 1039.111, 102900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1029]'); insert into test_proxima_be_restart_with_full_stage values(1030, 'name1030', 1040.111, 103000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1030]'); insert into test_proxima_be_restart_with_full_stage values(1031, 'name1031', 1041.111, 103100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1031]'); insert into test_proxima_be_restart_with_full_stage values(1032, 'name1032', 1042.111, 103200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1032]'); insert into test_proxima_be_restart_with_full_stage values(1033, 'name1033', 1043.111, 103300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1033]'); insert into test_proxima_be_restart_with_full_stage values(1034, 'name1034', 1044.111, 103400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1034]'); insert into test_proxima_be_restart_with_full_stage values(1035, 'name1035', 1045.111, 103500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1035]'); insert into test_proxima_be_restart_with_full_stage values(1036, 'name1036', 1046.111, 103600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1036]'); insert into test_proxima_be_restart_with_full_stage values(1037, 'name1037', 1047.111, 103700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1037]'); insert into test_proxima_be_restart_with_full_stage values(1038, 'name1038', 1048.111, 103800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1038]'); insert into test_proxima_be_restart_with_full_stage values(1039, 'name1039', 1049.111, 103900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1039]'); insert into test_proxima_be_restart_with_full_stage values(1040, 'name1040', 1050.111, 104000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1040]'); insert into test_proxima_be_restart_with_full_stage values(1041, 'name1041', 1051.111, 104100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1041]'); insert into test_proxima_be_restart_with_full_stage values(1042, 'name1042', 1052.111, 104200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1042]'); insert into test_proxima_be_restart_with_full_stage values(1043, 'name1043', 1053.111, 104300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1043]'); insert into test_proxima_be_restart_with_full_stage values(1044, 'name1044', 1054.111, 104400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1044]'); insert into test_proxima_be_restart_with_full_stage values(1045, 'name1045', 1055.111, 104500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1045]'); insert into test_proxima_be_restart_with_full_stage values(1046, 'name1046', 1056.111, 104600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1046]'); insert into test_proxima_be_restart_with_full_stage values(1047, 'name1047', 1057.111, 104700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1047]'); insert into test_proxima_be_restart_with_full_stage values(1048, 'name1048', 1058.111, 104800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1048]'); insert into test_proxima_be_restart_with_full_stage values(1049, 'name1049', 1059.111, 104900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1049]'); insert into test_proxima_be_restart_with_full_stage values(1050, 'name1050', 1060.111, 105000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1050]'); insert into test_proxima_be_restart_with_full_stage values(1051, 'name1051', 1061.111, 105100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1051]'); insert into test_proxima_be_restart_with_full_stage values(1052, 'name1052', 1062.111, 105200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1052]'); insert into test_proxima_be_restart_with_full_stage values(1053, 'name1053', 1063.111, 105300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1053]'); insert into test_proxima_be_restart_with_full_stage values(1054, 'name1054', 1064.111, 105400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1054]'); insert into test_proxima_be_restart_with_full_stage values(1055, 'name1055', 1065.111, 105500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1055]'); insert into test_proxima_be_restart_with_full_stage values(1056, 'name1056', 1066.111, 105600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1056]'); insert into test_proxima_be_restart_with_full_stage values(1057, 'name1057', 1067.111, 105700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1057]'); insert into test_proxima_be_restart_with_full_stage values(1058, 'name1058', 1068.111, 105800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1058]'); insert into test_proxima_be_restart_with_full_stage values(1059, 'name1059', 1069.111, 105900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1059]'); insert into test_proxima_be_restart_with_full_stage values(1060, 'name1060', 1070.111, 106000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1060]'); insert into test_proxima_be_restart_with_full_stage values(1061, 'name1061', 1071.111, 106100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1061]'); insert into test_proxima_be_restart_with_full_stage values(1062, 'name1062', 1072.111, 106200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1062]'); insert into test_proxima_be_restart_with_full_stage values(1063, 'name1063', 1073.111, 106300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1063]'); insert into test_proxima_be_restart_with_full_stage values(1064, 'name1064', 1074.111, 106400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1064]'); insert into test_proxima_be_restart_with_full_stage values(1065, 'name1065', 1075.111, 106500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1065]'); insert into test_proxima_be_restart_with_full_stage values(1066, 'name1066', 1076.111, 106600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1066]'); insert into test_proxima_be_restart_with_full_stage values(1067, 'name1067', 1077.111, 106700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1067]'); insert into test_proxima_be_restart_with_full_stage values(1068, 'name1068', 1078.111, 106800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1068]'); insert into test_proxima_be_restart_with_full_stage values(1069, 'name1069', 1079.111, 106900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1069]'); insert into test_proxima_be_restart_with_full_stage values(1070, 'name1070', 1080.111, 107000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1070]'); insert into test_proxima_be_restart_with_full_stage values(1071, 'name1071', 1081.111, 107100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1071]'); insert into test_proxima_be_restart_with_full_stage values(1072, 'name1072', 1082.111, 107200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1072]'); insert into test_proxima_be_restart_with_full_stage values(1073, 'name1073', 1083.111, 107300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1073]'); insert into test_proxima_be_restart_with_full_stage values(1074, 'name1074', 1084.111, 107400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1074]'); insert into test_proxima_be_restart_with_full_stage values(1075, 'name1075', 1085.111, 107500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1075]'); insert into test_proxima_be_restart_with_full_stage values(1076, 'name1076', 1086.111, 107600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1076]'); insert into test_proxima_be_restart_with_full_stage values(1077, 'name1077', 1087.111, 107700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1077]'); insert into test_proxima_be_restart_with_full_stage values(1078, 'name1078', 1088.111, 107800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1078]'); insert into test_proxima_be_restart_with_full_stage values(1079, 'name1079', 1089.111, 107900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1079]'); insert into test_proxima_be_restart_with_full_stage values(1080, 'name1080', 1090.111, 108000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1080]'); insert into test_proxima_be_restart_with_full_stage values(1081, 'name1081', 1091.111, 108100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1081]'); insert into test_proxima_be_restart_with_full_stage values(1082, 'name1082', 1092.111, 108200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1082]'); insert into test_proxima_be_restart_with_full_stage values(1083, 'name1083', 1093.111, 108300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1083]'); insert into test_proxima_be_restart_with_full_stage values(1084, 'name1084', 1094.111, 108400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1084]'); insert into test_proxima_be_restart_with_full_stage values(1085, 'name1085', 1095.111, 108500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1085]'); insert into test_proxima_be_restart_with_full_stage values(1086, 'name1086', 1096.111, 108600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1086]'); insert into test_proxima_be_restart_with_full_stage values(1087, 'name1087', 1097.111, 108700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1087]'); insert into test_proxima_be_restart_with_full_stage values(1088, 'name1088', 1098.111, 108800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1088]'); insert into test_proxima_be_restart_with_full_stage values(1089, 'name1089', 1099.111, 108900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1089]'); insert into test_proxima_be_restart_with_full_stage values(1090, 'name1090', 1100.111, 109000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1090]'); insert into test_proxima_be_restart_with_full_stage values(1091, 'name1091', 1101.111, 109100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1091]'); insert into test_proxima_be_restart_with_full_stage values(1092, 'name1092', 1102.111, 109200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1092]'); insert into test_proxima_be_restart_with_full_stage values(1093, 'name1093', 1103.111, 109300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1093]'); insert into test_proxima_be_restart_with_full_stage values(1094, 'name1094', 1104.111, 109400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1094]'); insert into test_proxima_be_restart_with_full_stage values(1095, 'name1095', 1105.111, 109500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1095]'); insert into test_proxima_be_restart_with_full_stage values(1096, 'name1096', 1106.111, 109600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1096]'); insert into test_proxima_be_restart_with_full_stage values(1097, 'name1097', 1107.111, 109700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1097]'); insert into test_proxima_be_restart_with_full_stage values(1098, 'name1098', 1108.111, 109800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1098]'); insert into test_proxima_be_restart_with_full_stage values(1099, 'name1099', 1109.111, 109900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1099]'); insert into test_proxima_be_restart_with_full_stage values(1100, 'name1100', 1110.111, 110000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1100]'); insert into test_proxima_be_restart_with_full_stage values(1101, 'name1101', 1111.111, 110100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1101]'); insert into test_proxima_be_restart_with_full_stage values(1102, 'name1102', 1112.111, 110200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1102]'); insert into test_proxima_be_restart_with_full_stage values(1103, 'name1103', 1113.111, 110300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1103]'); insert into test_proxima_be_restart_with_full_stage values(1104, 'name1104', 1114.111, 110400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1104]'); insert into test_proxima_be_restart_with_full_stage values(1105, 'name1105', 1115.111, 110500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1105]'); insert into test_proxima_be_restart_with_full_stage values(1106, 'name1106', 1116.111, 110600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1106]'); insert into test_proxima_be_restart_with_full_stage values(1107, 'name1107', 1117.111, 110700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1107]'); insert into test_proxima_be_restart_with_full_stage values(1108, 'name1108', 1118.111, 110800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1108]'); insert into test_proxima_be_restart_with_full_stage values(1109, 'name1109', 1119.111, 110900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1109]'); insert into test_proxima_be_restart_with_full_stage values(1110, 'name1110', 1120.111, 111000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1110]'); insert into test_proxima_be_restart_with_full_stage values(1111, 'name1111', 1121.111, 111100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1111]'); insert into test_proxima_be_restart_with_full_stage values(1112, 'name1112', 1122.111, 111200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1112]'); insert into test_proxima_be_restart_with_full_stage values(1113, 'name1113', 1123.111, 111300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1113]'); insert into test_proxima_be_restart_with_full_stage values(1114, 'name1114', 1124.111, 111400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1114]'); insert into test_proxima_be_restart_with_full_stage values(1115, 'name1115', 1125.111, 111500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1115]'); insert into test_proxima_be_restart_with_full_stage values(1116, 'name1116', 1126.111, 111600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1116]'); insert into test_proxima_be_restart_with_full_stage values(1117, 'name1117', 1127.111, 111700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1117]'); insert into test_proxima_be_restart_with_full_stage values(1118, 'name1118', 1128.111, 111800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1118]'); insert into test_proxima_be_restart_with_full_stage values(1119, 'name1119', 1129.111, 111900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1119]'); insert into test_proxima_be_restart_with_full_stage values(1120, 'name1120', 1130.111, 112000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1120]'); insert into test_proxima_be_restart_with_full_stage values(1121, 'name1121', 1131.111, 112100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1121]'); insert into test_proxima_be_restart_with_full_stage values(1122, 'name1122', 1132.111, 112200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1122]'); insert into test_proxima_be_restart_with_full_stage values(1123, 'name1123', 1133.111, 112300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1123]'); insert into test_proxima_be_restart_with_full_stage values(1124, 'name1124', 1134.111, 112400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1124]'); insert into test_proxima_be_restart_with_full_stage values(1125, 'name1125', 1135.111, 112500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1125]'); insert into test_proxima_be_restart_with_full_stage values(1126, 'name1126', 1136.111, 112600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1126]'); insert into test_proxima_be_restart_with_full_stage values(1127, 'name1127', 1137.111, 112700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1127]'); insert into test_proxima_be_restart_with_full_stage values(1128, 'name1128', 1138.111, 112800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1128]'); insert into test_proxima_be_restart_with_full_stage values(1129, 'name1129', 1139.111, 112900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1129]'); insert into test_proxima_be_restart_with_full_stage values(1130, 'name1130', 1140.111, 113000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1130]'); insert into test_proxima_be_restart_with_full_stage values(1131, 'name1131', 1141.111, 113100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1131]'); insert into test_proxima_be_restart_with_full_stage values(1132, 'name1132', 1142.111, 113200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1132]'); insert into test_proxima_be_restart_with_full_stage values(1133, 'name1133', 1143.111, 113300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1133]'); insert into test_proxima_be_restart_with_full_stage values(1134, 'name1134', 1144.111, 113400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1134]'); insert into test_proxima_be_restart_with_full_stage values(1135, 'name1135', 1145.111, 113500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1135]'); insert into test_proxima_be_restart_with_full_stage values(1136, 'name1136', 1146.111, 113600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1136]'); insert into test_proxima_be_restart_with_full_stage values(1137, 'name1137', 1147.111, 113700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1137]'); insert into test_proxima_be_restart_with_full_stage values(1138, 'name1138', 1148.111, 113800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1138]'); insert into test_proxima_be_restart_with_full_stage values(1139, 'name1139', 1149.111, 113900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1139]'); insert into test_proxima_be_restart_with_full_stage values(1140, 'name1140', 1150.111, 114000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1140]'); insert into test_proxima_be_restart_with_full_stage values(1141, 'name1141', 1151.111, 114100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1141]'); insert into test_proxima_be_restart_with_full_stage values(1142, 'name1142', 1152.111, 114200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1142]'); insert into test_proxima_be_restart_with_full_stage values(1143, 'name1143', 1153.111, 114300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1143]'); insert into test_proxima_be_restart_with_full_stage values(1144, 'name1144', 1154.111, 114400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1144]'); insert into test_proxima_be_restart_with_full_stage values(1145, 'name1145', 1155.111, 114500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1145]'); insert into test_proxima_be_restart_with_full_stage values(1146, 'name1146', 1156.111, 114600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1146]'); insert into test_proxima_be_restart_with_full_stage values(1147, 'name1147', 1157.111, 114700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1147]'); insert into test_proxima_be_restart_with_full_stage values(1148, 'name1148', 1158.111, 114800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1148]'); insert into test_proxima_be_restart_with_full_stage values(1149, 'name1149', 1159.111, 114900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1149]'); insert into test_proxima_be_restart_with_full_stage values(1150, 'name1150', 1160.111, 115000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1150]'); insert into test_proxima_be_restart_with_full_stage values(1151, 'name1151', 1161.111, 115100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1151]'); insert into test_proxima_be_restart_with_full_stage values(1152, 'name1152', 1162.111, 115200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1152]'); insert into test_proxima_be_restart_with_full_stage values(1153, 'name1153', 1163.111, 115300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1153]'); insert into test_proxima_be_restart_with_full_stage values(1154, 'name1154', 1164.111, 115400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1154]'); insert into test_proxima_be_restart_with_full_stage values(1155, 'name1155', 1165.111, 115500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1155]'); insert into test_proxima_be_restart_with_full_stage values(1156, 'name1156', 1166.111, 115600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1156]'); insert into test_proxima_be_restart_with_full_stage values(1157, 'name1157', 1167.111, 115700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1157]'); insert into test_proxima_be_restart_with_full_stage values(1158, 'name1158', 1168.111, 115800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1158]'); insert into test_proxima_be_restart_with_full_stage values(1159, 'name1159', 1169.111, 115900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1159]'); insert into test_proxima_be_restart_with_full_stage values(1160, 'name1160', 1170.111, 116000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1160]'); insert into test_proxima_be_restart_with_full_stage values(1161, 'name1161', 1171.111, 116100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1161]'); insert into test_proxima_be_restart_with_full_stage values(1162, 'name1162', 1172.111, 116200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1162]'); insert into test_proxima_be_restart_with_full_stage values(1163, 'name1163', 1173.111, 116300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1163]'); insert into test_proxima_be_restart_with_full_stage values(1164, 'name1164', 1174.111, 116400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1164]'); insert into test_proxima_be_restart_with_full_stage values(1165, 'name1165', 1175.111, 116500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1165]'); insert into test_proxima_be_restart_with_full_stage values(1166, 'name1166', 1176.111, 116600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1166]'); insert into test_proxima_be_restart_with_full_stage values(1167, 'name1167', 1177.111, 116700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1167]'); insert into test_proxima_be_restart_with_full_stage values(1168, 'name1168', 1178.111, 116800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1168]'); insert into test_proxima_be_restart_with_full_stage values(1169, 'name1169', 1179.111, 116900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1169]'); insert into test_proxima_be_restart_with_full_stage values(1170, 'name1170', 1180.111, 117000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1170]'); insert into test_proxima_be_restart_with_full_stage values(1171, 'name1171', 1181.111, 117100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1171]'); insert into test_proxima_be_restart_with_full_stage values(1172, 'name1172', 1182.111, 117200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1172]'); insert into test_proxima_be_restart_with_full_stage values(1173, 'name1173', 1183.111, 117300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1173]'); insert into test_proxima_be_restart_with_full_stage values(1174, 'name1174', 1184.111, 117400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1174]'); insert into test_proxima_be_restart_with_full_stage values(1175, 'name1175', 1185.111, 117500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1175]'); insert into test_proxima_be_restart_with_full_stage values(1176, 'name1176', 1186.111, 117600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1176]'); insert into test_proxima_be_restart_with_full_stage values(1177, 'name1177', 1187.111, 117700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1177]'); insert into test_proxima_be_restart_with_full_stage values(1178, 'name1178', 1188.111, 117800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1178]'); insert into test_proxima_be_restart_with_full_stage values(1179, 'name1179', 1189.111, 117900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1179]'); insert into test_proxima_be_restart_with_full_stage values(1180, 'name1180', 1190.111, 118000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1180]'); insert into test_proxima_be_restart_with_full_stage values(1181, 'name1181', 1191.111, 118100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1181]'); insert into test_proxima_be_restart_with_full_stage values(1182, 'name1182', 1192.111, 118200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1182]'); insert into test_proxima_be_restart_with_full_stage values(1183, 'name1183', 1193.111, 118300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1183]'); insert into test_proxima_be_restart_with_full_stage values(1184, 'name1184', 1194.111, 118400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1184]'); insert into test_proxima_be_restart_with_full_stage values(1185, 'name1185', 1195.111, 118500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1185]'); insert into test_proxima_be_restart_with_full_stage values(1186, 'name1186', 1196.111, 118600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1186]'); insert into test_proxima_be_restart_with_full_stage values(1187, 'name1187', 1197.111, 118700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1187]'); insert into test_proxima_be_restart_with_full_stage values(1188, 'name1188', 1198.111, 118800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1188]'); insert into test_proxima_be_restart_with_full_stage values(1189, 'name1189', 1199.111, 118900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1189]'); insert into test_proxima_be_restart_with_full_stage values(1190, 'name1190', 1200.111, 119000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1190]'); insert into test_proxima_be_restart_with_full_stage values(1191, 'name1191', 1201.111, 119100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1191]'); insert into test_proxima_be_restart_with_full_stage values(1192, 'name1192', 1202.111, 119200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1192]'); insert into test_proxima_be_restart_with_full_stage values(1193, 'name1193', 1203.111, 119300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1193]'); insert into test_proxima_be_restart_with_full_stage values(1194, 'name1194', 1204.111, 119400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1194]'); insert into test_proxima_be_restart_with_full_stage values(1195, 'name1195', 1205.111, 119500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1195]'); insert into test_proxima_be_restart_with_full_stage values(1196, 'name1196', 1206.111, 119600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1196]'); insert into test_proxima_be_restart_with_full_stage values(1197, 'name1197', 1207.111, 119700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1197]'); insert into test_proxima_be_restart_with_full_stage values(1198, 'name1198', 1208.111, 119800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1198]'); insert into test_proxima_be_restart_with_full_stage values(1199, 'name1199', 1209.111, 119900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1199]'); insert into test_proxima_be_restart_with_full_stage values(1200, 'name1200', 1210.111, 120000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1200]'); insert into test_proxima_be_restart_with_full_stage values(1201, 'name1201', 1211.111, 120100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1201]'); insert into test_proxima_be_restart_with_full_stage values(1202, 'name1202', 1212.111, 120200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1202]'); insert into test_proxima_be_restart_with_full_stage values(1203, 'name1203', 1213.111, 120300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1203]'); insert into test_proxima_be_restart_with_full_stage values(1204, 'name1204', 1214.111, 120400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1204]'); insert into test_proxima_be_restart_with_full_stage values(1205, 'name1205', 1215.111, 120500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1205]'); insert into test_proxima_be_restart_with_full_stage values(1206, 'name1206', 1216.111, 120600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1206]'); insert into test_proxima_be_restart_with_full_stage values(1207, 'name1207', 1217.111, 120700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1207]'); insert into test_proxima_be_restart_with_full_stage values(1208, 'name1208', 1218.111, 120800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1208]'); insert into test_proxima_be_restart_with_full_stage values(1209, 'name1209', 1219.111, 120900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1209]'); insert into test_proxima_be_restart_with_full_stage values(1210, 'name1210', 1220.111, 121000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1210]'); insert into test_proxima_be_restart_with_full_stage values(1211, 'name1211', 1221.111, 121100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1211]'); insert into test_proxima_be_restart_with_full_stage values(1212, 'name1212', 1222.111, 121200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1212]'); insert into test_proxima_be_restart_with_full_stage values(1213, 'name1213', 1223.111, 121300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1213]'); insert into test_proxima_be_restart_with_full_stage values(1214, 'name1214', 1224.111, 121400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1214]'); insert into test_proxima_be_restart_with_full_stage values(1215, 'name1215', 1225.111, 121500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1215]'); insert into test_proxima_be_restart_with_full_stage values(1216, 'name1216', 1226.111, 121600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1216]'); insert into test_proxima_be_restart_with_full_stage values(1217, 'name1217', 1227.111, 121700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1217]'); insert into test_proxima_be_restart_with_full_stage values(1218, 'name1218', 1228.111, 121800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1218]'); insert into test_proxima_be_restart_with_full_stage values(1219, 'name1219', 1229.111, 121900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1219]'); insert into test_proxima_be_restart_with_full_stage values(1220, 'name1220', 1230.111, 122000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1220]'); insert into test_proxima_be_restart_with_full_stage values(1221, 'name1221', 1231.111, 122100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1221]'); insert into test_proxima_be_restart_with_full_stage values(1222, 'name1222', 1232.111, 122200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1222]'); insert into test_proxima_be_restart_with_full_stage values(1223, 'name1223', 1233.111, 122300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1223]'); insert into test_proxima_be_restart_with_full_stage values(1224, 'name1224', 1234.111, 122400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1224]'); insert into test_proxima_be_restart_with_full_stage values(1225, 'name1225', 1235.111, 122500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1225]'); insert into test_proxima_be_restart_with_full_stage values(1226, 'name1226', 1236.111, 122600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1226]'); insert into test_proxima_be_restart_with_full_stage values(1227, 'name1227', 1237.111, 122700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1227]'); insert into test_proxima_be_restart_with_full_stage values(1228, 'name1228', 1238.111, 122800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1228]'); insert into test_proxima_be_restart_with_full_stage values(1229, 'name1229', 1239.111, 122900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1229]'); insert into test_proxima_be_restart_with_full_stage values(1230, 'name1230', 1240.111, 123000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1230]'); insert into test_proxima_be_restart_with_full_stage values(1231, 'name1231', 1241.111, 123100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1231]'); insert into test_proxima_be_restart_with_full_stage values(1232, 'name1232', 1242.111, 123200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1232]'); insert into test_proxima_be_restart_with_full_stage values(1233, 'name1233', 1243.111, 123300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1233]'); insert into test_proxima_be_restart_with_full_stage values(1234, 'name1234', 1244.111, 123400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1234]'); insert into test_proxima_be_restart_with_full_stage values(1235, 'name1235', 1245.111, 123500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1235]'); insert into test_proxima_be_restart_with_full_stage values(1236, 'name1236', 1246.111, 123600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1236]'); insert into test_proxima_be_restart_with_full_stage values(1237, 'name1237', 1247.111, 123700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1237]'); insert into test_proxima_be_restart_with_full_stage values(1238, 'name1238', 1248.111, 123800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1238]'); insert into test_proxima_be_restart_with_full_stage values(1239, 'name1239', 1249.111, 123900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1239]'); insert into test_proxima_be_restart_with_full_stage values(1240, 'name1240', 1250.111, 124000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1240]'); insert into test_proxima_be_restart_with_full_stage values(1241, 'name1241', 1251.111, 124100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1241]'); insert into test_proxima_be_restart_with_full_stage values(1242, 'name1242', 1252.111, 124200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1242]'); insert into test_proxima_be_restart_with_full_stage values(1243, 'name1243', 1253.111, 124300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1243]'); insert into test_proxima_be_restart_with_full_stage values(1244, 'name1244', 1254.111, 124400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1244]'); insert into test_proxima_be_restart_with_full_stage values(1245, 'name1245', 1255.111, 124500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1245]'); insert into test_proxima_be_restart_with_full_stage values(1246, 'name1246', 1256.111, 124600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1246]'); insert into test_proxima_be_restart_with_full_stage values(1247, 'name1247', 1257.111, 124700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1247]'); insert into test_proxima_be_restart_with_full_stage values(1248, 'name1248', 1258.111, 124800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1248]'); insert into test_proxima_be_restart_with_full_stage values(1249, 'name1249', 1259.111, 124900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1249]'); insert into test_proxima_be_restart_with_full_stage values(1250, 'name1250', 1260.111, 125000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1250]'); insert into test_proxima_be_restart_with_full_stage values(1251, 'name1251', 1261.111, 125100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1251]'); insert into test_proxima_be_restart_with_full_stage values(1252, 'name1252', 1262.111, 125200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1252]'); insert into test_proxima_be_restart_with_full_stage values(1253, 'name1253', 1263.111, 125300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1253]'); insert into test_proxima_be_restart_with_full_stage values(1254, 'name1254', 1264.111, 125400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1254]'); insert into test_proxima_be_restart_with_full_stage values(1255, 'name1255', 1265.111, 125500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1255]'); insert into test_proxima_be_restart_with_full_stage values(1256, 'name1256', 1266.111, 125600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1256]'); insert into test_proxima_be_restart_with_full_stage values(1257, 'name1257', 1267.111, 125700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1257]'); insert into test_proxima_be_restart_with_full_stage values(1258, 'name1258', 1268.111, 125800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1258]'); insert into test_proxima_be_restart_with_full_stage values(1259, 'name1259', 1269.111, 125900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1259]'); insert into test_proxima_be_restart_with_full_stage values(1260, 'name1260', 1270.111, 126000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1260]'); insert into test_proxima_be_restart_with_full_stage values(1261, 'name1261', 1271.111, 126100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1261]'); insert into test_proxima_be_restart_with_full_stage values(1262, 'name1262', 1272.111, 126200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1262]'); insert into test_proxima_be_restart_with_full_stage values(1263, 'name1263', 1273.111, 126300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1263]'); insert into test_proxima_be_restart_with_full_stage values(1264, 'name1264', 1274.111, 126400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1264]'); insert into test_proxima_be_restart_with_full_stage values(1265, 'name1265', 1275.111, 126500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1265]'); insert into test_proxima_be_restart_with_full_stage values(1266, 'name1266', 1276.111, 126600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1266]'); insert into test_proxima_be_restart_with_full_stage values(1267, 'name1267', 1277.111, 126700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1267]'); insert into test_proxima_be_restart_with_full_stage values(1268, 'name1268', 1278.111, 126800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1268]'); insert into test_proxima_be_restart_with_full_stage values(1269, 'name1269', 1279.111, 126900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1269]'); insert into test_proxima_be_restart_with_full_stage values(1270, 'name1270', 1280.111, 127000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1270]'); insert into test_proxima_be_restart_with_full_stage values(1271, 'name1271', 1281.111, 127100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1271]'); insert into test_proxima_be_restart_with_full_stage values(1272, 'name1272', 1282.111, 127200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1272]'); insert into test_proxima_be_restart_with_full_stage values(1273, 'name1273', 1283.111, 127300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1273]'); insert into test_proxima_be_restart_with_full_stage values(1274, 'name1274', 1284.111, 127400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1274]'); insert into test_proxima_be_restart_with_full_stage values(1275, 'name1275', 1285.111, 127500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1275]'); insert into test_proxima_be_restart_with_full_stage values(1276, 'name1276', 1286.111, 127600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1276]'); insert into test_proxima_be_restart_with_full_stage values(1277, 'name1277', 1287.111, 127700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1277]'); insert into test_proxima_be_restart_with_full_stage values(1278, 'name1278', 1288.111, 127800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1278]'); insert into test_proxima_be_restart_with_full_stage values(1279, 'name1279', 1289.111, 127900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1279]'); insert into test_proxima_be_restart_with_full_stage values(1280, 'name1280', 1290.111, 128000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1280]'); insert into test_proxima_be_restart_with_full_stage values(1281, 'name1281', 1291.111, 128100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1281]'); insert into test_proxima_be_restart_with_full_stage values(1282, 'name1282', 1292.111, 128200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1282]'); insert into test_proxima_be_restart_with_full_stage values(1283, 'name1283', 1293.111, 128300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1283]'); insert into test_proxima_be_restart_with_full_stage values(1284, 'name1284', 1294.111, 128400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1284]'); insert into test_proxima_be_restart_with_full_stage values(1285, 'name1285', 1295.111, 128500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1285]'); insert into test_proxima_be_restart_with_full_stage values(1286, 'name1286', 1296.111, 128600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1286]'); insert into test_proxima_be_restart_with_full_stage values(1287, 'name1287', 1297.111, 128700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1287]'); insert into test_proxima_be_restart_with_full_stage values(1288, 'name1288', 1298.111, 128800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1288]'); insert into test_proxima_be_restart_with_full_stage values(1289, 'name1289', 1299.111, 128900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1289]'); insert into test_proxima_be_restart_with_full_stage values(1290, 'name1290', 1300.111, 129000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1290]'); insert into test_proxima_be_restart_with_full_stage values(1291, 'name1291', 1301.111, 129100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1291]'); insert into test_proxima_be_restart_with_full_stage values(1292, 'name1292', 1302.111, 129200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1292]'); insert into test_proxima_be_restart_with_full_stage values(1293, 'name1293', 1303.111, 129300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1293]'); insert into test_proxima_be_restart_with_full_stage values(1294, 'name1294', 1304.111, 129400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1294]'); insert into test_proxima_be_restart_with_full_stage values(1295, 'name1295', 1305.111, 129500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1295]'); insert into test_proxima_be_restart_with_full_stage values(1296, 'name1296', 1306.111, 129600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1296]'); insert into test_proxima_be_restart_with_full_stage values(1297, 'name1297', 1307.111, 129700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1297]'); insert into test_proxima_be_restart_with_full_stage values(1298, 'name1298', 1308.111, 129800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1298]'); insert into test_proxima_be_restart_with_full_stage values(1299, 'name1299', 1309.111, 129900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1299]'); insert into test_proxima_be_restart_with_full_stage values(1300, 'name1300', 1310.111, 130000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1300]'); insert into test_proxima_be_restart_with_full_stage values(1301, 'name1301', 1311.111, 130100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1301]'); insert into test_proxima_be_restart_with_full_stage values(1302, 'name1302', 1312.111, 130200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1302]'); insert into test_proxima_be_restart_with_full_stage values(1303, 'name1303', 1313.111, 130300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1303]'); insert into test_proxima_be_restart_with_full_stage values(1304, 'name1304', 1314.111, 130400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1304]'); insert into test_proxima_be_restart_with_full_stage values(1305, 'name1305', 1315.111, 130500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1305]'); insert into test_proxima_be_restart_with_full_stage values(1306, 'name1306', 1316.111, 130600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1306]'); insert into test_proxima_be_restart_with_full_stage values(1307, 'name1307', 1317.111, 130700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1307]'); insert into test_proxima_be_restart_with_full_stage values(1308, 'name1308', 1318.111, 130800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1308]'); insert into test_proxima_be_restart_with_full_stage values(1309, 'name1309', 1319.111, 130900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1309]'); insert into test_proxima_be_restart_with_full_stage values(1310, 'name1310', 1320.111, 131000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1310]'); insert into test_proxima_be_restart_with_full_stage values(1311, 'name1311', 1321.111, 131100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1311]'); insert into test_proxima_be_restart_with_full_stage values(1312, 'name1312', 1322.111, 131200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1312]'); insert into test_proxima_be_restart_with_full_stage values(1313, 'name1313', 1323.111, 131300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1313]'); insert into test_proxima_be_restart_with_full_stage values(1314, 'name1314', 1324.111, 131400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1314]'); insert into test_proxima_be_restart_with_full_stage values(1315, 'name1315', 1325.111, 131500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1315]'); insert into test_proxima_be_restart_with_full_stage values(1316, 'name1316', 1326.111, 131600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1316]'); insert into test_proxima_be_restart_with_full_stage values(1317, 'name1317', 1327.111, 131700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1317]'); insert into test_proxima_be_restart_with_full_stage values(1318, 'name1318', 1328.111, 131800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1318]'); insert into test_proxima_be_restart_with_full_stage values(1319, 'name1319', 1329.111, 131900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1319]'); insert into test_proxima_be_restart_with_full_stage values(1320, 'name1320', 1330.111, 132000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1320]'); insert into test_proxima_be_restart_with_full_stage values(1321, 'name1321', 1331.111, 132100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1321]'); insert into test_proxima_be_restart_with_full_stage values(1322, 'name1322', 1332.111, 132200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1322]'); insert into test_proxima_be_restart_with_full_stage values(1323, 'name1323', 1333.111, 132300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1323]'); insert into test_proxima_be_restart_with_full_stage values(1324, 'name1324', 1334.111, 132400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1324]'); insert into test_proxima_be_restart_with_full_stage values(1325, 'name1325', 1335.111, 132500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1325]'); insert into test_proxima_be_restart_with_full_stage values(1326, 'name1326', 1336.111, 132600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1326]'); insert into test_proxima_be_restart_with_full_stage values(1327, 'name1327', 1337.111, 132700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1327]'); insert into test_proxima_be_restart_with_full_stage values(1328, 'name1328', 1338.111, 132800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1328]'); insert into test_proxima_be_restart_with_full_stage values(1329, 'name1329', 1339.111, 132900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1329]'); insert into test_proxima_be_restart_with_full_stage values(1330, 'name1330', 1340.111, 133000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1330]'); insert into test_proxima_be_restart_with_full_stage values(1331, 'name1331', 1341.111, 133100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1331]'); insert into test_proxima_be_restart_with_full_stage values(1332, 'name1332', 1342.111, 133200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1332]'); insert into test_proxima_be_restart_with_full_stage values(1333, 'name1333', 1343.111, 133300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1333]'); insert into test_proxima_be_restart_with_full_stage values(1334, 'name1334', 1344.111, 133400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1334]'); insert into test_proxima_be_restart_with_full_stage values(1335, 'name1335', 1345.111, 133500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1335]'); insert into test_proxima_be_restart_with_full_stage values(1336, 'name1336', 1346.111, 133600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1336]'); insert into test_proxima_be_restart_with_full_stage values(1337, 'name1337', 1347.111, 133700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1337]'); insert into test_proxima_be_restart_with_full_stage values(1338, 'name1338', 1348.111, 133800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1338]'); insert into test_proxima_be_restart_with_full_stage values(1339, 'name1339', 1349.111, 133900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1339]'); insert into test_proxima_be_restart_with_full_stage values(1340, 'name1340', 1350.111, 134000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1340]'); insert into test_proxima_be_restart_with_full_stage values(1341, 'name1341', 1351.111, 134100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1341]'); insert into test_proxima_be_restart_with_full_stage values(1342, 'name1342', 1352.111, 134200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1342]'); insert into test_proxima_be_restart_with_full_stage values(1343, 'name1343', 1353.111, 134300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1343]'); insert into test_proxima_be_restart_with_full_stage values(1344, 'name1344', 1354.111, 134400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1344]'); insert into test_proxima_be_restart_with_full_stage values(1345, 'name1345', 1355.111, 134500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1345]'); insert into test_proxima_be_restart_with_full_stage values(1346, 'name1346', 1356.111, 134600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1346]'); insert into test_proxima_be_restart_with_full_stage values(1347, 'name1347', 1357.111, 134700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1347]'); insert into test_proxima_be_restart_with_full_stage values(1348, 'name1348', 1358.111, 134800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1348]'); insert into test_proxima_be_restart_with_full_stage values(1349, 'name1349', 1359.111, 134900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1349]'); insert into test_proxima_be_restart_with_full_stage values(1350, 'name1350', 1360.111, 135000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1350]'); insert into test_proxima_be_restart_with_full_stage values(1351, 'name1351', 1361.111, 135100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1351]'); insert into test_proxima_be_restart_with_full_stage values(1352, 'name1352', 1362.111, 135200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1352]'); insert into test_proxima_be_restart_with_full_stage values(1353, 'name1353', 1363.111, 135300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1353]'); insert into test_proxima_be_restart_with_full_stage values(1354, 'name1354', 1364.111, 135400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1354]'); insert into test_proxima_be_restart_with_full_stage values(1355, 'name1355', 1365.111, 135500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1355]'); insert into test_proxima_be_restart_with_full_stage values(1356, 'name1356', 1366.111, 135600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1356]'); insert into test_proxima_be_restart_with_full_stage values(1357, 'name1357', 1367.111, 135700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1357]'); insert into test_proxima_be_restart_with_full_stage values(1358, 'name1358', 1368.111, 135800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1358]'); insert into test_proxima_be_restart_with_full_stage values(1359, 'name1359', 1369.111, 135900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1359]'); insert into test_proxima_be_restart_with_full_stage values(1360, 'name1360', 1370.111, 136000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1360]'); insert into test_proxima_be_restart_with_full_stage values(1361, 'name1361', 1371.111, 136100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1361]'); insert into test_proxima_be_restart_with_full_stage values(1362, 'name1362', 1372.111, 136200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1362]'); insert into test_proxima_be_restart_with_full_stage values(1363, 'name1363', 1373.111, 136300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1363]'); insert into test_proxima_be_restart_with_full_stage values(1364, 'name1364', 1374.111, 136400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1364]'); insert into test_proxima_be_restart_with_full_stage values(1365, 'name1365', 1375.111, 136500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1365]'); insert into test_proxima_be_restart_with_full_stage values(1366, 'name1366', 1376.111, 136600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1366]'); insert into test_proxima_be_restart_with_full_stage values(1367, 'name1367', 1377.111, 136700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1367]'); insert into test_proxima_be_restart_with_full_stage values(1368, 'name1368', 1378.111, 136800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1368]'); insert into test_proxima_be_restart_with_full_stage values(1369, 'name1369', 1379.111, 136900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1369]'); insert into test_proxima_be_restart_with_full_stage values(1370, 'name1370', 1380.111, 137000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1370]'); insert into test_proxima_be_restart_with_full_stage values(1371, 'name1371', 1381.111, 137100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1371]'); insert into test_proxima_be_restart_with_full_stage values(1372, 'name1372', 1382.111, 137200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1372]'); insert into test_proxima_be_restart_with_full_stage values(1373, 'name1373', 1383.111, 137300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1373]'); insert into test_proxima_be_restart_with_full_stage values(1374, 'name1374', 1384.111, 137400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1374]'); insert into test_proxima_be_restart_with_full_stage values(1375, 'name1375', 1385.111, 137500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1375]'); insert into test_proxima_be_restart_with_full_stage values(1376, 'name1376', 1386.111, 137600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1376]'); insert into test_proxima_be_restart_with_full_stage values(1377, 'name1377', 1387.111, 137700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1377]'); insert into test_proxima_be_restart_with_full_stage values(1378, 'name1378', 1388.111, 137800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1378]'); insert into test_proxima_be_restart_with_full_stage values(1379, 'name1379', 1389.111, 137900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1379]'); insert into test_proxima_be_restart_with_full_stage values(1380, 'name1380', 1390.111, 138000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1380]'); insert into test_proxima_be_restart_with_full_stage values(1381, 'name1381', 1391.111, 138100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1381]'); insert into test_proxima_be_restart_with_full_stage values(1382, 'name1382', 1392.111, 138200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1382]'); insert into test_proxima_be_restart_with_full_stage values(1383, 'name1383', 1393.111, 138300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1383]'); insert into test_proxima_be_restart_with_full_stage values(1384, 'name1384', 1394.111, 138400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1384]'); insert into test_proxima_be_restart_with_full_stage values(1385, 'name1385', 1395.111, 138500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1385]'); insert into test_proxima_be_restart_with_full_stage values(1386, 'name1386', 1396.111, 138600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1386]'); insert into test_proxima_be_restart_with_full_stage values(1387, 'name1387', 1397.111, 138700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1387]'); insert into test_proxima_be_restart_with_full_stage values(1388, 'name1388', 1398.111, 138800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1388]'); insert into test_proxima_be_restart_with_full_stage values(1389, 'name1389', 1399.111, 138900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1389]'); insert into test_proxima_be_restart_with_full_stage values(1390, 'name1390', 1400.111, 139000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1390]'); insert into test_proxima_be_restart_with_full_stage values(1391, 'name1391', 1401.111, 139100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1391]'); insert into test_proxima_be_restart_with_full_stage values(1392, 'name1392', 1402.111, 139200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1392]'); insert into test_proxima_be_restart_with_full_stage values(1393, 'name1393', 1403.111, 139300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1393]'); insert into test_proxima_be_restart_with_full_stage values(1394, 'name1394', 1404.111, 139400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1394]'); insert into test_proxima_be_restart_with_full_stage values(1395, 'name1395', 1405.111, 139500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1395]'); insert into test_proxima_be_restart_with_full_stage values(1396, 'name1396', 1406.111, 139600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1396]'); insert into test_proxima_be_restart_with_full_stage values(1397, 'name1397', 1407.111, 139700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1397]'); insert into test_proxima_be_restart_with_full_stage values(1398, 'name1398', 1408.111, 139800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1398]'); insert into test_proxima_be_restart_with_full_stage values(1399, 'name1399', 1409.111, 139900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1399]'); insert into test_proxima_be_restart_with_full_stage values(1400, 'name1400', 1410.111, 140000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1400]'); insert into test_proxima_be_restart_with_full_stage values(1401, 'name1401', 1411.111, 140100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1401]'); insert into test_proxima_be_restart_with_full_stage values(1402, 'name1402', 1412.111, 140200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1402]'); insert into test_proxima_be_restart_with_full_stage values(1403, 'name1403', 1413.111, 140300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1403]'); insert into test_proxima_be_restart_with_full_stage values(1404, 'name1404', 1414.111, 140400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1404]'); insert into test_proxima_be_restart_with_full_stage values(1405, 'name1405', 1415.111, 140500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1405]'); insert into test_proxima_be_restart_with_full_stage values(1406, 'name1406', 1416.111, 140600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1406]'); insert into test_proxima_be_restart_with_full_stage values(1407, 'name1407', 1417.111, 140700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1407]'); insert into test_proxima_be_restart_with_full_stage values(1408, 'name1408', 1418.111, 140800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1408]'); insert into test_proxima_be_restart_with_full_stage values(1409, 'name1409', 1419.111, 140900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1409]'); insert into test_proxima_be_restart_with_full_stage values(1410, 'name1410', 1420.111, 141000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1410]'); insert into test_proxima_be_restart_with_full_stage values(1411, 'name1411', 1421.111, 141100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1411]'); insert into test_proxima_be_restart_with_full_stage values(1412, 'name1412', 1422.111, 141200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1412]'); insert into test_proxima_be_restart_with_full_stage values(1413, 'name1413', 1423.111, 141300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1413]'); insert into test_proxima_be_restart_with_full_stage values(1414, 'name1414', 1424.111, 141400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1414]'); insert into test_proxima_be_restart_with_full_stage values(1415, 'name1415', 1425.111, 141500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1415]'); insert into test_proxima_be_restart_with_full_stage values(1416, 'name1416', 1426.111, 141600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1416]'); insert into test_proxima_be_restart_with_full_stage values(1417, 'name1417', 1427.111, 141700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1417]'); insert into test_proxima_be_restart_with_full_stage values(1418, 'name1418', 1428.111, 141800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1418]'); insert into test_proxima_be_restart_with_full_stage values(1419, 'name1419', 1429.111, 141900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1419]'); insert into test_proxima_be_restart_with_full_stage values(1420, 'name1420', 1430.111, 142000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1420]'); insert into test_proxima_be_restart_with_full_stage values(1421, 'name1421', 1431.111, 142100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1421]'); insert into test_proxima_be_restart_with_full_stage values(1422, 'name1422', 1432.111, 142200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1422]'); insert into test_proxima_be_restart_with_full_stage values(1423, 'name1423', 1433.111, 142300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1423]'); insert into test_proxima_be_restart_with_full_stage values(1424, 'name1424', 1434.111, 142400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1424]'); insert into test_proxima_be_restart_with_full_stage values(1425, 'name1425', 1435.111, 142500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1425]'); insert into test_proxima_be_restart_with_full_stage values(1426, 'name1426', 1436.111, 142600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1426]'); insert into test_proxima_be_restart_with_full_stage values(1427, 'name1427', 1437.111, 142700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1427]'); insert into test_proxima_be_restart_with_full_stage values(1428, 'name1428', 1438.111, 142800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1428]'); insert into test_proxima_be_restart_with_full_stage values(1429, 'name1429', 1439.111, 142900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1429]'); insert into test_proxima_be_restart_with_full_stage values(1430, 'name1430', 1440.111, 143000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1430]'); insert into test_proxima_be_restart_with_full_stage values(1431, 'name1431', 1441.111, 143100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1431]'); insert into test_proxima_be_restart_with_full_stage values(1432, 'name1432', 1442.111, 143200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1432]'); insert into test_proxima_be_restart_with_full_stage values(1433, 'name1433', 1443.111, 143300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1433]'); insert into test_proxima_be_restart_with_full_stage values(1434, 'name1434', 1444.111, 143400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1434]'); insert into test_proxima_be_restart_with_full_stage values(1435, 'name1435', 1445.111, 143500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1435]'); insert into test_proxima_be_restart_with_full_stage values(1436, 'name1436', 1446.111, 143600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1436]'); insert into test_proxima_be_restart_with_full_stage values(1437, 'name1437', 1447.111, 143700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1437]'); insert into test_proxima_be_restart_with_full_stage values(1438, 'name1438', 1448.111, 143800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1438]'); insert into test_proxima_be_restart_with_full_stage values(1439, 'name1439', 1449.111, 143900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1439]'); insert into test_proxima_be_restart_with_full_stage values(1440, 'name1440', 1450.111, 144000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1440]'); insert into test_proxima_be_restart_with_full_stage values(1441, 'name1441', 1451.111, 144100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1441]'); insert into test_proxima_be_restart_with_full_stage values(1442, 'name1442', 1452.111, 144200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1442]'); insert into test_proxima_be_restart_with_full_stage values(1443, 'name1443', 1453.111, 144300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1443]'); insert into test_proxima_be_restart_with_full_stage values(1444, 'name1444', 1454.111, 144400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1444]'); insert into test_proxima_be_restart_with_full_stage values(1445, 'name1445', 1455.111, 144500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1445]'); insert into test_proxima_be_restart_with_full_stage values(1446, 'name1446', 1456.111, 144600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1446]'); insert into test_proxima_be_restart_with_full_stage values(1447, 'name1447', 1457.111, 144700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1447]'); insert into test_proxima_be_restart_with_full_stage values(1448, 'name1448', 1458.111, 144800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1448]'); insert into test_proxima_be_restart_with_full_stage values(1449, 'name1449', 1459.111, 144900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1449]'); insert into test_proxima_be_restart_with_full_stage values(1450, 'name1450', 1460.111, 145000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1450]'); insert into test_proxima_be_restart_with_full_stage values(1451, 'name1451', 1461.111, 145100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1451]'); insert into test_proxima_be_restart_with_full_stage values(1452, 'name1452', 1462.111, 145200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1452]'); insert into test_proxima_be_restart_with_full_stage values(1453, 'name1453', 1463.111, 145300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1453]'); insert into test_proxima_be_restart_with_full_stage values(1454, 'name1454', 1464.111, 145400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1454]'); insert into test_proxima_be_restart_with_full_stage values(1455, 'name1455', 1465.111, 145500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1455]'); insert into test_proxima_be_restart_with_full_stage values(1456, 'name1456', 1466.111, 145600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1456]'); insert into test_proxima_be_restart_with_full_stage values(1457, 'name1457', 1467.111, 145700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1457]'); insert into test_proxima_be_restart_with_full_stage values(1458, 'name1458', 1468.111, 145800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1458]'); insert into test_proxima_be_restart_with_full_stage values(1459, 'name1459', 1469.111, 145900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1459]'); insert into test_proxima_be_restart_with_full_stage values(1460, 'name1460', 1470.111, 146000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1460]'); insert into test_proxima_be_restart_with_full_stage values(1461, 'name1461', 1471.111, 146100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1461]'); insert into test_proxima_be_restart_with_full_stage values(1462, 'name1462', 1472.111, 146200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1462]'); insert into test_proxima_be_restart_with_full_stage values(1463, 'name1463', 1473.111, 146300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1463]'); insert into test_proxima_be_restart_with_full_stage values(1464, 'name1464', 1474.111, 146400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1464]'); insert into test_proxima_be_restart_with_full_stage values(1465, 'name1465', 1475.111, 146500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1465]'); insert into test_proxima_be_restart_with_full_stage values(1466, 'name1466', 1476.111, 146600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1466]'); insert into test_proxima_be_restart_with_full_stage values(1467, 'name1467', 1477.111, 146700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1467]'); insert into test_proxima_be_restart_with_full_stage values(1468, 'name1468', 1478.111, 146800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1468]'); insert into test_proxima_be_restart_with_full_stage values(1469, 'name1469', 1479.111, 146900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1469]'); insert into test_proxima_be_restart_with_full_stage values(1470, 'name1470', 1480.111, 147000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1470]'); insert into test_proxima_be_restart_with_full_stage values(1471, 'name1471', 1481.111, 147100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1471]'); insert into test_proxima_be_restart_with_full_stage values(1472, 'name1472', 1482.111, 147200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1472]'); insert into test_proxima_be_restart_with_full_stage values(1473, 'name1473', 1483.111, 147300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1473]'); insert into test_proxima_be_restart_with_full_stage values(1474, 'name1474', 1484.111, 147400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1474]'); insert into test_proxima_be_restart_with_full_stage values(1475, 'name1475', 1485.111, 147500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1475]'); insert into test_proxima_be_restart_with_full_stage values(1476, 'name1476', 1486.111, 147600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1476]'); insert into test_proxima_be_restart_with_full_stage values(1477, 'name1477', 1487.111, 147700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1477]'); insert into test_proxima_be_restart_with_full_stage values(1478, 'name1478', 1488.111, 147800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1478]'); insert into test_proxima_be_restart_with_full_stage values(1479, 'name1479', 1489.111, 147900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1479]'); insert into test_proxima_be_restart_with_full_stage values(1480, 'name1480', 1490.111, 148000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1480]'); insert into test_proxima_be_restart_with_full_stage values(1481, 'name1481', 1491.111, 148100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1481]'); insert into test_proxima_be_restart_with_full_stage values(1482, 'name1482', 1492.111, 148200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1482]'); insert into test_proxima_be_restart_with_full_stage values(1483, 'name1483', 1493.111, 148300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1483]'); insert into test_proxima_be_restart_with_full_stage values(1484, 'name1484', 1494.111, 148400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1484]'); insert into test_proxima_be_restart_with_full_stage values(1485, 'name1485', 1495.111, 148500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1485]'); insert into test_proxima_be_restart_with_full_stage values(1486, 'name1486', 1496.111, 148600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1486]'); insert into test_proxima_be_restart_with_full_stage values(1487, 'name1487', 1497.111, 148700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1487]'); insert into test_proxima_be_restart_with_full_stage values(1488, 'name1488', 1498.111, 148800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1488]'); insert into test_proxima_be_restart_with_full_stage values(1489, 'name1489', 1499.111, 148900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1489]'); insert into test_proxima_be_restart_with_full_stage values(1490, 'name1490', 1500.111, 149000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1490]'); insert into test_proxima_be_restart_with_full_stage values(1491, 'name1491', 1501.111, 149100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1491]'); insert into test_proxima_be_restart_with_full_stage values(1492, 'name1492', 1502.111, 149200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1492]'); insert into test_proxima_be_restart_with_full_stage values(1493, 'name1493', 1503.111, 149300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1493]'); insert into test_proxima_be_restart_with_full_stage values(1494, 'name1494', 1504.111, 149400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1494]'); insert into test_proxima_be_restart_with_full_stage values(1495, 'name1495', 1505.111, 149500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1495]'); insert into test_proxima_be_restart_with_full_stage values(1496, 'name1496', 1506.111, 149600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1496]'); insert into test_proxima_be_restart_with_full_stage values(1497, 'name1497', 1507.111, 149700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1497]'); insert into test_proxima_be_restart_with_full_stage values(1498, 'name1498', 1508.111, 149800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1498]'); insert into test_proxima_be_restart_with_full_stage values(1499, 'name1499', 1509.111, 149900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1499]'); insert into test_proxima_be_restart_with_full_stage values(1500, 'name1500', 1510.111, 150000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1500]'); insert into test_proxima_be_restart_with_full_stage values(1501, 'name1501', 1511.111, 150100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1501]'); insert into test_proxima_be_restart_with_full_stage values(1502, 'name1502', 1512.111, 150200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1502]'); insert into test_proxima_be_restart_with_full_stage values(1503, 'name1503', 1513.111, 150300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1503]'); insert into test_proxima_be_restart_with_full_stage values(1504, 'name1504', 1514.111, 150400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1504]'); insert into test_proxima_be_restart_with_full_stage values(1505, 'name1505', 1515.111, 150500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1505]'); insert into test_proxima_be_restart_with_full_stage values(1506, 'name1506', 1516.111, 150600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1506]'); insert into test_proxima_be_restart_with_full_stage values(1507, 'name1507', 1517.111, 150700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1507]'); insert into test_proxima_be_restart_with_full_stage values(1508, 'name1508', 1518.111, 150800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1508]'); insert into test_proxima_be_restart_with_full_stage values(1509, 'name1509', 1519.111, 150900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1509]'); insert into test_proxima_be_restart_with_full_stage values(1510, 'name1510', 1520.111, 151000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1510]'); insert into test_proxima_be_restart_with_full_stage values(1511, 'name1511', 1521.111, 151100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1511]'); insert into test_proxima_be_restart_with_full_stage values(1512, 'name1512', 1522.111, 151200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1512]'); insert into test_proxima_be_restart_with_full_stage values(1513, 'name1513', 1523.111, 151300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1513]'); insert into test_proxima_be_restart_with_full_stage values(1514, 'name1514', 1524.111, 151400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1514]'); insert into test_proxima_be_restart_with_full_stage values(1515, 'name1515', 1525.111, 151500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1515]'); insert into test_proxima_be_restart_with_full_stage values(1516, 'name1516', 1526.111, 151600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1516]'); insert into test_proxima_be_restart_with_full_stage values(1517, 'name1517', 1527.111, 151700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1517]'); insert into test_proxima_be_restart_with_full_stage values(1518, 'name1518', 1528.111, 151800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1518]'); insert into test_proxima_be_restart_with_full_stage values(1519, 'name1519', 1529.111, 151900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1519]'); insert into test_proxima_be_restart_with_full_stage values(1520, 'name1520', 1530.111, 152000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1520]'); insert into test_proxima_be_restart_with_full_stage values(1521, 'name1521', 1531.111, 152100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1521]'); insert into test_proxima_be_restart_with_full_stage values(1522, 'name1522', 1532.111, 152200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1522]'); insert into test_proxima_be_restart_with_full_stage values(1523, 'name1523', 1533.111, 152300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1523]'); insert into test_proxima_be_restart_with_full_stage values(1524, 'name1524', 1534.111, 152400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1524]'); insert into test_proxima_be_restart_with_full_stage values(1525, 'name1525', 1535.111, 152500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1525]'); insert into test_proxima_be_restart_with_full_stage values(1526, 'name1526', 1536.111, 152600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1526]'); insert into test_proxima_be_restart_with_full_stage values(1527, 'name1527', 1537.111, 152700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1527]'); insert into test_proxima_be_restart_with_full_stage values(1528, 'name1528', 1538.111, 152800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1528]'); insert into test_proxima_be_restart_with_full_stage values(1529, 'name1529', 1539.111, 152900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1529]'); insert into test_proxima_be_restart_with_full_stage values(1530, 'name1530', 1540.111, 153000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1530]'); insert into test_proxima_be_restart_with_full_stage values(1531, 'name1531', 1541.111, 153100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1531]'); insert into test_proxima_be_restart_with_full_stage values(1532, 'name1532', 1542.111, 153200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1532]'); insert into test_proxima_be_restart_with_full_stage values(1533, 'name1533', 1543.111, 153300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1533]'); insert into test_proxima_be_restart_with_full_stage values(1534, 'name1534', 1544.111, 153400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1534]'); insert into test_proxima_be_restart_with_full_stage values(1535, 'name1535', 1545.111, 153500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1535]'); insert into test_proxima_be_restart_with_full_stage values(1536, 'name1536', 1546.111, 153600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1536]'); insert into test_proxima_be_restart_with_full_stage values(1537, 'name1537', 1547.111, 153700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1537]'); insert into test_proxima_be_restart_with_full_stage values(1538, 'name1538', 1548.111, 153800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1538]'); insert into test_proxima_be_restart_with_full_stage values(1539, 'name1539', 1549.111, 153900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1539]'); insert into test_proxima_be_restart_with_full_stage values(1540, 'name1540', 1550.111, 154000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1540]'); insert into test_proxima_be_restart_with_full_stage values(1541, 'name1541', 1551.111, 154100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1541]'); insert into test_proxima_be_restart_with_full_stage values(1542, 'name1542', 1552.111, 154200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1542]'); insert into test_proxima_be_restart_with_full_stage values(1543, 'name1543', 1553.111, 154300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1543]'); insert into test_proxima_be_restart_with_full_stage values(1544, 'name1544', 1554.111, 154400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1544]'); insert into test_proxima_be_restart_with_full_stage values(1545, 'name1545', 1555.111, 154500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1545]'); insert into test_proxima_be_restart_with_full_stage values(1546, 'name1546', 1556.111, 154600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1546]'); insert into test_proxima_be_restart_with_full_stage values(1547, 'name1547', 1557.111, 154700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1547]'); insert into test_proxima_be_restart_with_full_stage values(1548, 'name1548', 1558.111, 154800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1548]'); insert into test_proxima_be_restart_with_full_stage values(1549, 'name1549', 1559.111, 154900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1549]'); insert into test_proxima_be_restart_with_full_stage values(1550, 'name1550', 1560.111, 155000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1550]'); insert into test_proxima_be_restart_with_full_stage values(1551, 'name1551', 1561.111, 155100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1551]'); insert into test_proxima_be_restart_with_full_stage values(1552, 'name1552', 1562.111, 155200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1552]'); insert into test_proxima_be_restart_with_full_stage values(1553, 'name1553', 1563.111, 155300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1553]'); insert into test_proxima_be_restart_with_full_stage values(1554, 'name1554', 1564.111, 155400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1554]'); insert into test_proxima_be_restart_with_full_stage values(1555, 'name1555', 1565.111, 155500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1555]'); insert into test_proxima_be_restart_with_full_stage values(1556, 'name1556', 1566.111, 155600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1556]'); insert into test_proxima_be_restart_with_full_stage values(1557, 'name1557', 1567.111, 155700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1557]'); insert into test_proxima_be_restart_with_full_stage values(1558, 'name1558', 1568.111, 155800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1558]'); insert into test_proxima_be_restart_with_full_stage values(1559, 'name1559', 1569.111, 155900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1559]'); insert into test_proxima_be_restart_with_full_stage values(1560, 'name1560', 1570.111, 156000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1560]'); insert into test_proxima_be_restart_with_full_stage values(1561, 'name1561', 1571.111, 156100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1561]'); insert into test_proxima_be_restart_with_full_stage values(1562, 'name1562', 1572.111, 156200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1562]'); insert into test_proxima_be_restart_with_full_stage values(1563, 'name1563', 1573.111, 156300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1563]'); insert into test_proxima_be_restart_with_full_stage values(1564, 'name1564', 1574.111, 156400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1564]'); insert into test_proxima_be_restart_with_full_stage values(1565, 'name1565', 1575.111, 156500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1565]'); insert into test_proxima_be_restart_with_full_stage values(1566, 'name1566', 1576.111, 156600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1566]'); insert into test_proxima_be_restart_with_full_stage values(1567, 'name1567', 1577.111, 156700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1567]'); insert into test_proxima_be_restart_with_full_stage values(1568, 'name1568', 1578.111, 156800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1568]'); insert into test_proxima_be_restart_with_full_stage values(1569, 'name1569', 1579.111, 156900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1569]'); insert into test_proxima_be_restart_with_full_stage values(1570, 'name1570', 1580.111, 157000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1570]'); insert into test_proxima_be_restart_with_full_stage values(1571, 'name1571', 1581.111, 157100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1571]'); insert into test_proxima_be_restart_with_full_stage values(1572, 'name1572', 1582.111, 157200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1572]'); insert into test_proxima_be_restart_with_full_stage values(1573, 'name1573', 1583.111, 157300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1573]'); insert into test_proxima_be_restart_with_full_stage values(1574, 'name1574', 1584.111, 157400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1574]'); insert into test_proxima_be_restart_with_full_stage values(1575, 'name1575', 1585.111, 157500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1575]'); insert into test_proxima_be_restart_with_full_stage values(1576, 'name1576', 1586.111, 157600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1576]'); insert into test_proxima_be_restart_with_full_stage values(1577, 'name1577', 1587.111, 157700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1577]'); insert into test_proxima_be_restart_with_full_stage values(1578, 'name1578', 1588.111, 157800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1578]'); insert into test_proxima_be_restart_with_full_stage values(1579, 'name1579', 1589.111, 157900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1579]'); insert into test_proxima_be_restart_with_full_stage values(1580, 'name1580', 1590.111, 158000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1580]'); insert into test_proxima_be_restart_with_full_stage values(1581, 'name1581', 1591.111, 158100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1581]'); insert into test_proxima_be_restart_with_full_stage values(1582, 'name1582', 1592.111, 158200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1582]'); insert into test_proxima_be_restart_with_full_stage values(1583, 'name1583', 1593.111, 158300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1583]'); insert into test_proxima_be_restart_with_full_stage values(1584, 'name1584', 1594.111, 158400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1584]'); insert into test_proxima_be_restart_with_full_stage values(1585, 'name1585', 1595.111, 158500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1585]'); insert into test_proxima_be_restart_with_full_stage values(1586, 'name1586', 1596.111, 158600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1586]'); insert into test_proxima_be_restart_with_full_stage values(1587, 'name1587', 1597.111, 158700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1587]'); insert into test_proxima_be_restart_with_full_stage values(1588, 'name1588', 1598.111, 158800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1588]'); insert into test_proxima_be_restart_with_full_stage values(1589, 'name1589', 1599.111, 158900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1589]'); insert into test_proxima_be_restart_with_full_stage values(1590, 'name1590', 1600.111, 159000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1590]'); insert into test_proxima_be_restart_with_full_stage values(1591, 'name1591', 1601.111, 159100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1591]'); insert into test_proxima_be_restart_with_full_stage values(1592, 'name1592', 1602.111, 159200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1592]'); insert into test_proxima_be_restart_with_full_stage values(1593, 'name1593', 1603.111, 159300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1593]'); insert into test_proxima_be_restart_with_full_stage values(1594, 'name1594', 1604.111, 159400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1594]'); insert into test_proxima_be_restart_with_full_stage values(1595, 'name1595', 1605.111, 159500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1595]'); insert into test_proxima_be_restart_with_full_stage values(1596, 'name1596', 1606.111, 159600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1596]'); insert into test_proxima_be_restart_with_full_stage values(1597, 'name1597', 1607.111, 159700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1597]'); insert into test_proxima_be_restart_with_full_stage values(1598, 'name1598', 1608.111, 159800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1598]'); insert into test_proxima_be_restart_with_full_stage values(1599, 'name1599', 1609.111, 159900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1599]'); insert into test_proxima_be_restart_with_full_stage values(1600, 'name1600', 1610.111, 160000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1600]'); insert into test_proxima_be_restart_with_full_stage values(1601, 'name1601', 1611.111, 160100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1601]'); insert into test_proxima_be_restart_with_full_stage values(1602, 'name1602', 1612.111, 160200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1602]'); insert into test_proxima_be_restart_with_full_stage values(1603, 'name1603', 1613.111, 160300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1603]'); insert into test_proxima_be_restart_with_full_stage values(1604, 'name1604', 1614.111, 160400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1604]'); insert into test_proxima_be_restart_with_full_stage values(1605, 'name1605', 1615.111, 160500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1605]'); insert into test_proxima_be_restart_with_full_stage values(1606, 'name1606', 1616.111, 160600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1606]'); insert into test_proxima_be_restart_with_full_stage values(1607, 'name1607', 1617.111, 160700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1607]'); insert into test_proxima_be_restart_with_full_stage values(1608, 'name1608', 1618.111, 160800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1608]'); insert into test_proxima_be_restart_with_full_stage values(1609, 'name1609', 1619.111, 160900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1609]'); insert into test_proxima_be_restart_with_full_stage values(1610, 'name1610', 1620.111, 161000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1610]'); insert into test_proxima_be_restart_with_full_stage values(1611, 'name1611', 1621.111, 161100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1611]'); insert into test_proxima_be_restart_with_full_stage values(1612, 'name1612', 1622.111, 161200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1612]'); insert into test_proxima_be_restart_with_full_stage values(1613, 'name1613', 1623.111, 161300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1613]'); insert into test_proxima_be_restart_with_full_stage values(1614, 'name1614', 1624.111, 161400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1614]'); insert into test_proxima_be_restart_with_full_stage values(1615, 'name1615', 1625.111, 161500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1615]'); insert into test_proxima_be_restart_with_full_stage values(1616, 'name1616', 1626.111, 161600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1616]'); insert into test_proxima_be_restart_with_full_stage values(1617, 'name1617', 1627.111, 161700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1617]'); insert into test_proxima_be_restart_with_full_stage values(1618, 'name1618', 1628.111, 161800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1618]'); insert into test_proxima_be_restart_with_full_stage values(1619, 'name1619', 1629.111, 161900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1619]'); insert into test_proxima_be_restart_with_full_stage values(1620, 'name1620', 1630.111, 162000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1620]'); insert into test_proxima_be_restart_with_full_stage values(1621, 'name1621', 1631.111, 162100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1621]'); insert into test_proxima_be_restart_with_full_stage values(1622, 'name1622', 1632.111, 162200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1622]'); insert into test_proxima_be_restart_with_full_stage values(1623, 'name1623', 1633.111, 162300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1623]'); insert into test_proxima_be_restart_with_full_stage values(1624, 'name1624', 1634.111, 162400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1624]'); insert into test_proxima_be_restart_with_full_stage values(1625, 'name1625', 1635.111, 162500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1625]'); insert into test_proxima_be_restart_with_full_stage values(1626, 'name1626', 1636.111, 162600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1626]'); insert into test_proxima_be_restart_with_full_stage values(1627, 'name1627', 1637.111, 162700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1627]'); insert into test_proxima_be_restart_with_full_stage values(1628, 'name1628', 1638.111, 162800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1628]'); insert into test_proxima_be_restart_with_full_stage values(1629, 'name1629', 1639.111, 162900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1629]'); insert into test_proxima_be_restart_with_full_stage values(1630, 'name1630', 1640.111, 163000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1630]'); insert into test_proxima_be_restart_with_full_stage values(1631, 'name1631', 1641.111, 163100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1631]'); insert into test_proxima_be_restart_with_full_stage values(1632, 'name1632', 1642.111, 163200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1632]'); insert into test_proxima_be_restart_with_full_stage values(1633, 'name1633', 1643.111, 163300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1633]'); insert into test_proxima_be_restart_with_full_stage values(1634, 'name1634', 1644.111, 163400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1634]'); insert into test_proxima_be_restart_with_full_stage values(1635, 'name1635', 1645.111, 163500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1635]'); insert into test_proxima_be_restart_with_full_stage values(1636, 'name1636', 1646.111, 163600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1636]'); insert into test_proxima_be_restart_with_full_stage values(1637, 'name1637', 1647.111, 163700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1637]'); insert into test_proxima_be_restart_with_full_stage values(1638, 'name1638', 1648.111, 163800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1638]'); insert into test_proxima_be_restart_with_full_stage values(1639, 'name1639', 1649.111, 163900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1639]'); insert into test_proxima_be_restart_with_full_stage values(1640, 'name1640', 1650.111, 164000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1640]'); insert into test_proxima_be_restart_with_full_stage values(1641, 'name1641', 1651.111, 164100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1641]'); insert into test_proxima_be_restart_with_full_stage values(1642, 'name1642', 1652.111, 164200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1642]'); insert into test_proxima_be_restart_with_full_stage values(1643, 'name1643', 1653.111, 164300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1643]'); insert into test_proxima_be_restart_with_full_stage values(1644, 'name1644', 1654.111, 164400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1644]'); insert into test_proxima_be_restart_with_full_stage values(1645, 'name1645', 1655.111, 164500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1645]'); insert into test_proxima_be_restart_with_full_stage values(1646, 'name1646', 1656.111, 164600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1646]'); insert into test_proxima_be_restart_with_full_stage values(1647, 'name1647', 1657.111, 164700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1647]'); insert into test_proxima_be_restart_with_full_stage values(1648, 'name1648', 1658.111, 164800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1648]'); insert into test_proxima_be_restart_with_full_stage values(1649, 'name1649', 1659.111, 164900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1649]'); insert into test_proxima_be_restart_with_full_stage values(1650, 'name1650', 1660.111, 165000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1650]'); insert into test_proxima_be_restart_with_full_stage values(1651, 'name1651', 1661.111, 165100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1651]'); insert into test_proxima_be_restart_with_full_stage values(1652, 'name1652', 1662.111, 165200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1652]'); insert into test_proxima_be_restart_with_full_stage values(1653, 'name1653', 1663.111, 165300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1653]'); insert into test_proxima_be_restart_with_full_stage values(1654, 'name1654', 1664.111, 165400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1654]'); insert into test_proxima_be_restart_with_full_stage values(1655, 'name1655', 1665.111, 165500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1655]'); insert into test_proxima_be_restart_with_full_stage values(1656, 'name1656', 1666.111, 165600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1656]'); insert into test_proxima_be_restart_with_full_stage values(1657, 'name1657', 1667.111, 165700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1657]'); insert into test_proxima_be_restart_with_full_stage values(1658, 'name1658', 1668.111, 165800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1658]'); insert into test_proxima_be_restart_with_full_stage values(1659, 'name1659', 1669.111, 165900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1659]'); insert into test_proxima_be_restart_with_full_stage values(1660, 'name1660', 1670.111, 166000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1660]'); insert into test_proxima_be_restart_with_full_stage values(1661, 'name1661', 1671.111, 166100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1661]'); insert into test_proxima_be_restart_with_full_stage values(1662, 'name1662', 1672.111, 166200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1662]'); insert into test_proxima_be_restart_with_full_stage values(1663, 'name1663', 1673.111, 166300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1663]'); insert into test_proxima_be_restart_with_full_stage values(1664, 'name1664', 1674.111, 166400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1664]'); insert into test_proxima_be_restart_with_full_stage values(1665, 'name1665', 1675.111, 166500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1665]'); insert into test_proxima_be_restart_with_full_stage values(1666, 'name1666', 1676.111, 166600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1666]'); insert into test_proxima_be_restart_with_full_stage values(1667, 'name1667', 1677.111, 166700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1667]'); insert into test_proxima_be_restart_with_full_stage values(1668, 'name1668', 1678.111, 166800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1668]'); insert into test_proxima_be_restart_with_full_stage values(1669, 'name1669', 1679.111, 166900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1669]'); insert into test_proxima_be_restart_with_full_stage values(1670, 'name1670', 1680.111, 167000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1670]'); insert into test_proxima_be_restart_with_full_stage values(1671, 'name1671', 1681.111, 167100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1671]'); insert into test_proxima_be_restart_with_full_stage values(1672, 'name1672', 1682.111, 167200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1672]'); insert into test_proxima_be_restart_with_full_stage values(1673, 'name1673', 1683.111, 167300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1673]'); insert into test_proxima_be_restart_with_full_stage values(1674, 'name1674', 1684.111, 167400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1674]'); insert into test_proxima_be_restart_with_full_stage values(1675, 'name1675', 1685.111, 167500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1675]'); insert into test_proxima_be_restart_with_full_stage values(1676, 'name1676', 1686.111, 167600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1676]'); insert into test_proxima_be_restart_with_full_stage values(1677, 'name1677', 1687.111, 167700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1677]'); insert into test_proxima_be_restart_with_full_stage values(1678, 'name1678', 1688.111, 167800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1678]'); insert into test_proxima_be_restart_with_full_stage values(1679, 'name1679', 1689.111, 167900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1679]'); insert into test_proxima_be_restart_with_full_stage values(1680, 'name1680', 1690.111, 168000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1680]'); insert into test_proxima_be_restart_with_full_stage values(1681, 'name1681', 1691.111, 168100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1681]'); insert into test_proxima_be_restart_with_full_stage values(1682, 'name1682', 1692.111, 168200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1682]'); insert into test_proxima_be_restart_with_full_stage values(1683, 'name1683', 1693.111, 168300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1683]'); insert into test_proxima_be_restart_with_full_stage values(1684, 'name1684', 1694.111, 168400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1684]'); insert into test_proxima_be_restart_with_full_stage values(1685, 'name1685', 1695.111, 168500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1685]'); insert into test_proxima_be_restart_with_full_stage values(1686, 'name1686', 1696.111, 168600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1686]'); insert into test_proxima_be_restart_with_full_stage values(1687, 'name1687', 1697.111, 168700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1687]'); insert into test_proxima_be_restart_with_full_stage values(1688, 'name1688', 1698.111, 168800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1688]'); insert into test_proxima_be_restart_with_full_stage values(1689, 'name1689', 1699.111, 168900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1689]'); insert into test_proxima_be_restart_with_full_stage values(1690, 'name1690', 1700.111, 169000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1690]'); insert into test_proxima_be_restart_with_full_stage values(1691, 'name1691', 1701.111, 169100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1691]'); insert into test_proxima_be_restart_with_full_stage values(1692, 'name1692', 1702.111, 169200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1692]'); insert into test_proxima_be_restart_with_full_stage values(1693, 'name1693', 1703.111, 169300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1693]'); insert into test_proxima_be_restart_with_full_stage values(1694, 'name1694', 1704.111, 169400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1694]'); insert into test_proxima_be_restart_with_full_stage values(1695, 'name1695', 1705.111, 169500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1695]'); insert into test_proxima_be_restart_with_full_stage values(1696, 'name1696', 1706.111, 169600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1696]'); insert into test_proxima_be_restart_with_full_stage values(1697, 'name1697', 1707.111, 169700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1697]'); insert into test_proxima_be_restart_with_full_stage values(1698, 'name1698', 1708.111, 169800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1698]'); insert into test_proxima_be_restart_with_full_stage values(1699, 'name1699', 1709.111, 169900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1699]'); insert into test_proxima_be_restart_with_full_stage values(1700, 'name1700', 1710.111, 170000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1700]'); insert into test_proxima_be_restart_with_full_stage values(1701, 'name1701', 1711.111, 170100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1701]'); insert into test_proxima_be_restart_with_full_stage values(1702, 'name1702', 1712.111, 170200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1702]'); insert into test_proxima_be_restart_with_full_stage values(1703, 'name1703', 1713.111, 170300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1703]'); insert into test_proxima_be_restart_with_full_stage values(1704, 'name1704', 1714.111, 170400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1704]'); insert into test_proxima_be_restart_with_full_stage values(1705, 'name1705', 1715.111, 170500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1705]'); insert into test_proxima_be_restart_with_full_stage values(1706, 'name1706', 1716.111, 170600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1706]'); insert into test_proxima_be_restart_with_full_stage values(1707, 'name1707', 1717.111, 170700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1707]'); insert into test_proxima_be_restart_with_full_stage values(1708, 'name1708', 1718.111, 170800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1708]'); insert into test_proxima_be_restart_with_full_stage values(1709, 'name1709', 1719.111, 170900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1709]'); insert into test_proxima_be_restart_with_full_stage values(1710, 'name1710', 1720.111, 171000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1710]'); insert into test_proxima_be_restart_with_full_stage values(1711, 'name1711', 1721.111, 171100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1711]'); insert into test_proxima_be_restart_with_full_stage values(1712, 'name1712', 1722.111, 171200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1712]'); insert into test_proxima_be_restart_with_full_stage values(1713, 'name1713', 1723.111, 171300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1713]'); insert into test_proxima_be_restart_with_full_stage values(1714, 'name1714', 1724.111, 171400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1714]'); insert into test_proxima_be_restart_with_full_stage values(1715, 'name1715', 1725.111, 171500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1715]'); insert into test_proxima_be_restart_with_full_stage values(1716, 'name1716', 1726.111, 171600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1716]'); insert into test_proxima_be_restart_with_full_stage values(1717, 'name1717', 1727.111, 171700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1717]'); insert into test_proxima_be_restart_with_full_stage values(1718, 'name1718', 1728.111, 171800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1718]'); insert into test_proxima_be_restart_with_full_stage values(1719, 'name1719', 1729.111, 171900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1719]'); insert into test_proxima_be_restart_with_full_stage values(1720, 'name1720', 1730.111, 172000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1720]'); insert into test_proxima_be_restart_with_full_stage values(1721, 'name1721', 1731.111, 172100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1721]'); insert into test_proxima_be_restart_with_full_stage values(1722, 'name1722', 1732.111, 172200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1722]'); insert into test_proxima_be_restart_with_full_stage values(1723, 'name1723', 1733.111, 172300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1723]'); insert into test_proxima_be_restart_with_full_stage values(1724, 'name1724', 1734.111, 172400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1724]'); insert into test_proxima_be_restart_with_full_stage values(1725, 'name1725', 1735.111, 172500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1725]'); insert into test_proxima_be_restart_with_full_stage values(1726, 'name1726', 1736.111, 172600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1726]'); insert into test_proxima_be_restart_with_full_stage values(1727, 'name1727', 1737.111, 172700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1727]'); insert into test_proxima_be_restart_with_full_stage values(1728, 'name1728', 1738.111, 172800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1728]'); insert into test_proxima_be_restart_with_full_stage values(1729, 'name1729', 1739.111, 172900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1729]'); insert into test_proxima_be_restart_with_full_stage values(1730, 'name1730', 1740.111, 173000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1730]'); insert into test_proxima_be_restart_with_full_stage values(1731, 'name1731', 1741.111, 173100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1731]'); insert into test_proxima_be_restart_with_full_stage values(1732, 'name1732', 1742.111, 173200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1732]'); insert into test_proxima_be_restart_with_full_stage values(1733, 'name1733', 1743.111, 173300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1733]'); insert into test_proxima_be_restart_with_full_stage values(1734, 'name1734', 1744.111, 173400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1734]'); insert into test_proxima_be_restart_with_full_stage values(1735, 'name1735', 1745.111, 173500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1735]'); insert into test_proxima_be_restart_with_full_stage values(1736, 'name1736', 1746.111, 173600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1736]'); insert into test_proxima_be_restart_with_full_stage values(1737, 'name1737', 1747.111, 173700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1737]'); insert into test_proxima_be_restart_with_full_stage values(1738, 'name1738', 1748.111, 173800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1738]'); insert into test_proxima_be_restart_with_full_stage values(1739, 'name1739', 1749.111, 173900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1739]'); insert into test_proxima_be_restart_with_full_stage values(1740, 'name1740', 1750.111, 174000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1740]'); insert into test_proxima_be_restart_with_full_stage values(1741, 'name1741', 1751.111, 174100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1741]'); insert into test_proxima_be_restart_with_full_stage values(1742, 'name1742', 1752.111, 174200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1742]'); insert into test_proxima_be_restart_with_full_stage values(1743, 'name1743', 1753.111, 174300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1743]'); insert into test_proxima_be_restart_with_full_stage values(1744, 'name1744', 1754.111, 174400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1744]'); insert into test_proxima_be_restart_with_full_stage values(1745, 'name1745', 1755.111, 174500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1745]'); insert into test_proxima_be_restart_with_full_stage values(1746, 'name1746', 1756.111, 174600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1746]'); insert into test_proxima_be_restart_with_full_stage values(1747, 'name1747', 1757.111, 174700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1747]'); insert into test_proxima_be_restart_with_full_stage values(1748, 'name1748', 1758.111, 174800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1748]'); insert into test_proxima_be_restart_with_full_stage values(1749, 'name1749', 1759.111, 174900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1749]'); insert into test_proxima_be_restart_with_full_stage values(1750, 'name1750', 1760.111, 175000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1750]'); insert into test_proxima_be_restart_with_full_stage values(1751, 'name1751', 1761.111, 175100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1751]'); insert into test_proxima_be_restart_with_full_stage values(1752, 'name1752', 1762.111, 175200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1752]'); insert into test_proxima_be_restart_with_full_stage values(1753, 'name1753', 1763.111, 175300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1753]'); insert into test_proxima_be_restart_with_full_stage values(1754, 'name1754', 1764.111, 175400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1754]'); insert into test_proxima_be_restart_with_full_stage values(1755, 'name1755', 1765.111, 175500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1755]'); insert into test_proxima_be_restart_with_full_stage values(1756, 'name1756', 1766.111, 175600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1756]'); insert into test_proxima_be_restart_with_full_stage values(1757, 'name1757', 1767.111, 175700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1757]'); insert into test_proxima_be_restart_with_full_stage values(1758, 'name1758', 1768.111, 175800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1758]'); insert into test_proxima_be_restart_with_full_stage values(1759, 'name1759', 1769.111, 175900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1759]'); insert into test_proxima_be_restart_with_full_stage values(1760, 'name1760', 1770.111, 176000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1760]'); insert into test_proxima_be_restart_with_full_stage values(1761, 'name1761', 1771.111, 176100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1761]'); insert into test_proxima_be_restart_with_full_stage values(1762, 'name1762', 1772.111, 176200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1762]'); insert into test_proxima_be_restart_with_full_stage values(1763, 'name1763', 1773.111, 176300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1763]'); insert into test_proxima_be_restart_with_full_stage values(1764, 'name1764', 1774.111, 176400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1764]'); insert into test_proxima_be_restart_with_full_stage values(1765, 'name1765', 1775.111, 176500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1765]'); insert into test_proxima_be_restart_with_full_stage values(1766, 'name1766', 1776.111, 176600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1766]'); insert into test_proxima_be_restart_with_full_stage values(1767, 'name1767', 1777.111, 176700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1767]'); insert into test_proxima_be_restart_with_full_stage values(1768, 'name1768', 1778.111, 176800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1768]'); insert into test_proxima_be_restart_with_full_stage values(1769, 'name1769', 1779.111, 176900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1769]'); insert into test_proxima_be_restart_with_full_stage values(1770, 'name1770', 1780.111, 177000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1770]'); insert into test_proxima_be_restart_with_full_stage values(1771, 'name1771', 1781.111, 177100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1771]'); insert into test_proxima_be_restart_with_full_stage values(1772, 'name1772', 1782.111, 177200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1772]'); insert into test_proxima_be_restart_with_full_stage values(1773, 'name1773', 1783.111, 177300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1773]'); insert into test_proxima_be_restart_with_full_stage values(1774, 'name1774', 1784.111, 177400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1774]'); insert into test_proxima_be_restart_with_full_stage values(1775, 'name1775', 1785.111, 177500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1775]'); insert into test_proxima_be_restart_with_full_stage values(1776, 'name1776', 1786.111, 177600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1776]'); insert into test_proxima_be_restart_with_full_stage values(1777, 'name1777', 1787.111, 177700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1777]'); insert into test_proxima_be_restart_with_full_stage values(1778, 'name1778', 1788.111, 177800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1778]'); insert into test_proxima_be_restart_with_full_stage values(1779, 'name1779', 1789.111, 177900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1779]'); insert into test_proxima_be_restart_with_full_stage values(1780, 'name1780', 1790.111, 178000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1780]'); insert into test_proxima_be_restart_with_full_stage values(1781, 'name1781', 1791.111, 178100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1781]'); insert into test_proxima_be_restart_with_full_stage values(1782, 'name1782', 1792.111, 178200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1782]'); insert into test_proxima_be_restart_with_full_stage values(1783, 'name1783', 1793.111, 178300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1783]'); insert into test_proxima_be_restart_with_full_stage values(1784, 'name1784', 1794.111, 178400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1784]'); insert into test_proxima_be_restart_with_full_stage values(1785, 'name1785', 1795.111, 178500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1785]'); insert into test_proxima_be_restart_with_full_stage values(1786, 'name1786', 1796.111, 178600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1786]'); insert into test_proxima_be_restart_with_full_stage values(1787, 'name1787', 1797.111, 178700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1787]'); insert into test_proxima_be_restart_with_full_stage values(1788, 'name1788', 1798.111, 178800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1788]'); insert into test_proxima_be_restart_with_full_stage values(1789, 'name1789', 1799.111, 178900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1789]'); insert into test_proxima_be_restart_with_full_stage values(1790, 'name1790', 1800.111, 179000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1790]'); insert into test_proxima_be_restart_with_full_stage values(1791, 'name1791', 1801.111, 179100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1791]'); insert into test_proxima_be_restart_with_full_stage values(1792, 'name1792', 1802.111, 179200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1792]'); insert into test_proxima_be_restart_with_full_stage values(1793, 'name1793', 1803.111, 179300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1793]'); insert into test_proxima_be_restart_with_full_stage values(1794, 'name1794', 1804.111, 179400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1794]'); insert into test_proxima_be_restart_with_full_stage values(1795, 'name1795', 1805.111, 179500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1795]'); insert into test_proxima_be_restart_with_full_stage values(1796, 'name1796', 1806.111, 179600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1796]'); insert into test_proxima_be_restart_with_full_stage values(1797, 'name1797', 1807.111, 179700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1797]'); insert into test_proxima_be_restart_with_full_stage values(1798, 'name1798', 1808.111, 179800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1798]'); insert into test_proxima_be_restart_with_full_stage values(1799, 'name1799', 1809.111, 179900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1799]'); insert into test_proxima_be_restart_with_full_stage values(1800, 'name1800', 1810.111, 180000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1800]'); insert into test_proxima_be_restart_with_full_stage values(1801, 'name1801', 1811.111, 180100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1801]'); insert into test_proxima_be_restart_with_full_stage values(1802, 'name1802', 1812.111, 180200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1802]'); insert into test_proxima_be_restart_with_full_stage values(1803, 'name1803', 1813.111, 180300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1803]'); insert into test_proxima_be_restart_with_full_stage values(1804, 'name1804', 1814.111, 180400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1804]'); insert into test_proxima_be_restart_with_full_stage values(1805, 'name1805', 1815.111, 180500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1805]'); insert into test_proxima_be_restart_with_full_stage values(1806, 'name1806', 1816.111, 180600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1806]'); insert into test_proxima_be_restart_with_full_stage values(1807, 'name1807', 1817.111, 180700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1807]'); insert into test_proxima_be_restart_with_full_stage values(1808, 'name1808', 1818.111, 180800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1808]'); insert into test_proxima_be_restart_with_full_stage values(1809, 'name1809', 1819.111, 180900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1809]'); insert into test_proxima_be_restart_with_full_stage values(1810, 'name1810', 1820.111, 181000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1810]'); insert into test_proxima_be_restart_with_full_stage values(1811, 'name1811', 1821.111, 181100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1811]'); insert into test_proxima_be_restart_with_full_stage values(1812, 'name1812', 1822.111, 181200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1812]'); insert into test_proxima_be_restart_with_full_stage values(1813, 'name1813', 1823.111, 181300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1813]'); insert into test_proxima_be_restart_with_full_stage values(1814, 'name1814', 1824.111, 181400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1814]'); insert into test_proxima_be_restart_with_full_stage values(1815, 'name1815', 1825.111, 181500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1815]'); insert into test_proxima_be_restart_with_full_stage values(1816, 'name1816', 1826.111, 181600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1816]'); insert into test_proxima_be_restart_with_full_stage values(1817, 'name1817', 1827.111, 181700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1817]'); insert into test_proxima_be_restart_with_full_stage values(1818, 'name1818', 1828.111, 181800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1818]'); insert into test_proxima_be_restart_with_full_stage values(1819, 'name1819', 1829.111, 181900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1819]'); insert into test_proxima_be_restart_with_full_stage values(1820, 'name1820', 1830.111, 182000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1820]'); insert into test_proxima_be_restart_with_full_stage values(1821, 'name1821', 1831.111, 182100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1821]'); insert into test_proxima_be_restart_with_full_stage values(1822, 'name1822', 1832.111, 182200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1822]'); insert into test_proxima_be_restart_with_full_stage values(1823, 'name1823', 1833.111, 182300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1823]'); insert into test_proxima_be_restart_with_full_stage values(1824, 'name1824', 1834.111, 182400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1824]'); insert into test_proxima_be_restart_with_full_stage values(1825, 'name1825', 1835.111, 182500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1825]'); insert into test_proxima_be_restart_with_full_stage values(1826, 'name1826', 1836.111, 182600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1826]'); insert into test_proxima_be_restart_with_full_stage values(1827, 'name1827', 1837.111, 182700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1827]'); insert into test_proxima_be_restart_with_full_stage values(1828, 'name1828', 1838.111, 182800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1828]'); insert into test_proxima_be_restart_with_full_stage values(1829, 'name1829', 1839.111, 182900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1829]'); insert into test_proxima_be_restart_with_full_stage values(1830, 'name1830', 1840.111, 183000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1830]'); insert into test_proxima_be_restart_with_full_stage values(1831, 'name1831', 1841.111, 183100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1831]'); insert into test_proxima_be_restart_with_full_stage values(1832, 'name1832', 1842.111, 183200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1832]'); insert into test_proxima_be_restart_with_full_stage values(1833, 'name1833', 1843.111, 183300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1833]'); insert into test_proxima_be_restart_with_full_stage values(1834, 'name1834', 1844.111, 183400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1834]'); insert into test_proxima_be_restart_with_full_stage values(1835, 'name1835', 1845.111, 183500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1835]'); insert into test_proxima_be_restart_with_full_stage values(1836, 'name1836', 1846.111, 183600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1836]'); insert into test_proxima_be_restart_with_full_stage values(1837, 'name1837', 1847.111, 183700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1837]'); insert into test_proxima_be_restart_with_full_stage values(1838, 'name1838', 1848.111, 183800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1838]'); insert into test_proxima_be_restart_with_full_stage values(1839, 'name1839', 1849.111, 183900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1839]'); insert into test_proxima_be_restart_with_full_stage values(1840, 'name1840', 1850.111, 184000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1840]'); insert into test_proxima_be_restart_with_full_stage values(1841, 'name1841', 1851.111, 184100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1841]'); insert into test_proxima_be_restart_with_full_stage values(1842, 'name1842', 1852.111, 184200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1842]'); insert into test_proxima_be_restart_with_full_stage values(1843, 'name1843', 1853.111, 184300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1843]'); insert into test_proxima_be_restart_with_full_stage values(1844, 'name1844', 1854.111, 184400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1844]'); insert into test_proxima_be_restart_with_full_stage values(1845, 'name1845', 1855.111, 184500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1845]'); insert into test_proxima_be_restart_with_full_stage values(1846, 'name1846', 1856.111, 184600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1846]'); insert into test_proxima_be_restart_with_full_stage values(1847, 'name1847', 1857.111, 184700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1847]'); insert into test_proxima_be_restart_with_full_stage values(1848, 'name1848', 1858.111, 184800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1848]'); insert into test_proxima_be_restart_with_full_stage values(1849, 'name1849', 1859.111, 184900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1849]'); insert into test_proxima_be_restart_with_full_stage values(1850, 'name1850', 1860.111, 185000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1850]'); insert into test_proxima_be_restart_with_full_stage values(1851, 'name1851', 1861.111, 185100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1851]'); insert into test_proxima_be_restart_with_full_stage values(1852, 'name1852', 1862.111, 185200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1852]'); insert into test_proxima_be_restart_with_full_stage values(1853, 'name1853', 1863.111, 185300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1853]'); insert into test_proxima_be_restart_with_full_stage values(1854, 'name1854', 1864.111, 185400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1854]'); insert into test_proxima_be_restart_with_full_stage values(1855, 'name1855', 1865.111, 185500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1855]'); insert into test_proxima_be_restart_with_full_stage values(1856, 'name1856', 1866.111, 185600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1856]'); insert into test_proxima_be_restart_with_full_stage values(1857, 'name1857', 1867.111, 185700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1857]'); insert into test_proxima_be_restart_with_full_stage values(1858, 'name1858', 1868.111, 185800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1858]'); insert into test_proxima_be_restart_with_full_stage values(1859, 'name1859', 1869.111, 185900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1859]'); insert into test_proxima_be_restart_with_full_stage values(1860, 'name1860', 1870.111, 186000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1860]'); insert into test_proxima_be_restart_with_full_stage values(1861, 'name1861', 1871.111, 186100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1861]'); insert into test_proxima_be_restart_with_full_stage values(1862, 'name1862', 1872.111, 186200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1862]'); insert into test_proxima_be_restart_with_full_stage values(1863, 'name1863', 1873.111, 186300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1863]'); insert into test_proxima_be_restart_with_full_stage values(1864, 'name1864', 1874.111, 186400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1864]'); insert into test_proxima_be_restart_with_full_stage values(1865, 'name1865', 1875.111, 186500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1865]'); insert into test_proxima_be_restart_with_full_stage values(1866, 'name1866', 1876.111, 186600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1866]'); insert into test_proxima_be_restart_with_full_stage values(1867, 'name1867', 1877.111, 186700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1867]'); insert into test_proxima_be_restart_with_full_stage values(1868, 'name1868', 1878.111, 186800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1868]'); insert into test_proxima_be_restart_with_full_stage values(1869, 'name1869', 1879.111, 186900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1869]'); insert into test_proxima_be_restart_with_full_stage values(1870, 'name1870', 1880.111, 187000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1870]'); insert into test_proxima_be_restart_with_full_stage values(1871, 'name1871', 1881.111, 187100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1871]'); insert into test_proxima_be_restart_with_full_stage values(1872, 'name1872', 1882.111, 187200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1872]'); insert into test_proxima_be_restart_with_full_stage values(1873, 'name1873', 1883.111, 187300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1873]'); insert into test_proxima_be_restart_with_full_stage values(1874, 'name1874', 1884.111, 187400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1874]'); insert into test_proxima_be_restart_with_full_stage values(1875, 'name1875', 1885.111, 187500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1875]'); insert into test_proxima_be_restart_with_full_stage values(1876, 'name1876', 1886.111, 187600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1876]'); insert into test_proxima_be_restart_with_full_stage values(1877, 'name1877', 1887.111, 187700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1877]'); insert into test_proxima_be_restart_with_full_stage values(1878, 'name1878', 1888.111, 187800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1878]'); insert into test_proxima_be_restart_with_full_stage values(1879, 'name1879', 1889.111, 187900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1879]'); insert into test_proxima_be_restart_with_full_stage values(1880, 'name1880', 1890.111, 188000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1880]'); insert into test_proxima_be_restart_with_full_stage values(1881, 'name1881', 1891.111, 188100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1881]'); insert into test_proxima_be_restart_with_full_stage values(1882, 'name1882', 1892.111, 188200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1882]'); insert into test_proxima_be_restart_with_full_stage values(1883, 'name1883', 1893.111, 188300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1883]'); insert into test_proxima_be_restart_with_full_stage values(1884, 'name1884', 1894.111, 188400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1884]'); insert into test_proxima_be_restart_with_full_stage values(1885, 'name1885', 1895.111, 188500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1885]'); insert into test_proxima_be_restart_with_full_stage values(1886, 'name1886', 1896.111, 188600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1886]'); insert into test_proxima_be_restart_with_full_stage values(1887, 'name1887', 1897.111, 188700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1887]'); insert into test_proxima_be_restart_with_full_stage values(1888, 'name1888', 1898.111, 188800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1888]'); insert into test_proxima_be_restart_with_full_stage values(1889, 'name1889', 1899.111, 188900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1889]'); insert into test_proxima_be_restart_with_full_stage values(1890, 'name1890', 1900.111, 189000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1890]'); insert into test_proxima_be_restart_with_full_stage values(1891, 'name1891', 1901.111, 189100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1891]'); insert into test_proxima_be_restart_with_full_stage values(1892, 'name1892', 1902.111, 189200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1892]'); insert into test_proxima_be_restart_with_full_stage values(1893, 'name1893', 1903.111, 189300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1893]'); insert into test_proxima_be_restart_with_full_stage values(1894, 'name1894', 1904.111, 189400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1894]'); insert into test_proxima_be_restart_with_full_stage values(1895, 'name1895', 1905.111, 189500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1895]'); insert into test_proxima_be_restart_with_full_stage values(1896, 'name1896', 1906.111, 189600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1896]'); insert into test_proxima_be_restart_with_full_stage values(1897, 'name1897', 1907.111, 189700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1897]'); insert into test_proxima_be_restart_with_full_stage values(1898, 'name1898', 1908.111, 189800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1898]'); insert into test_proxima_be_restart_with_full_stage values(1899, 'name1899', 1909.111, 189900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1899]'); insert into test_proxima_be_restart_with_full_stage values(1900, 'name1900', 1910.111, 190000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1900]'); insert into test_proxima_be_restart_with_full_stage values(1901, 'name1901', 1911.111, 190100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1901]'); insert into test_proxima_be_restart_with_full_stage values(1902, 'name1902', 1912.111, 190200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1902]'); insert into test_proxima_be_restart_with_full_stage values(1903, 'name1903', 1913.111, 190300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1903]'); insert into test_proxima_be_restart_with_full_stage values(1904, 'name1904', 1914.111, 190400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1904]'); insert into test_proxima_be_restart_with_full_stage values(1905, 'name1905', 1915.111, 190500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1905]'); insert into test_proxima_be_restart_with_full_stage values(1906, 'name1906', 1916.111, 190600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1906]'); insert into test_proxima_be_restart_with_full_stage values(1907, 'name1907', 1917.111, 190700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1907]'); insert into test_proxima_be_restart_with_full_stage values(1908, 'name1908', 1918.111, 190800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1908]'); insert into test_proxima_be_restart_with_full_stage values(1909, 'name1909', 1919.111, 190900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1909]'); insert into test_proxima_be_restart_with_full_stage values(1910, 'name1910', 1920.111, 191000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1910]'); insert into test_proxima_be_restart_with_full_stage values(1911, 'name1911', 1921.111, 191100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1911]'); insert into test_proxima_be_restart_with_full_stage values(1912, 'name1912', 1922.111, 191200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1912]'); insert into test_proxima_be_restart_with_full_stage values(1913, 'name1913', 1923.111, 191300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1913]'); insert into test_proxima_be_restart_with_full_stage values(1914, 'name1914', 1924.111, 191400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1914]'); insert into test_proxima_be_restart_with_full_stage values(1915, 'name1915', 1925.111, 191500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1915]'); insert into test_proxima_be_restart_with_full_stage values(1916, 'name1916', 1926.111, 191600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1916]'); insert into test_proxima_be_restart_with_full_stage values(1917, 'name1917', 1927.111, 191700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1917]'); insert into test_proxima_be_restart_with_full_stage values(1918, 'name1918', 1928.111, 191800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1918]'); insert into test_proxima_be_restart_with_full_stage values(1919, 'name1919', 1929.111, 191900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1919]'); insert into test_proxima_be_restart_with_full_stage values(1920, 'name1920', 1930.111, 192000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1920]'); insert into test_proxima_be_restart_with_full_stage values(1921, 'name1921', 1931.111, 192100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1921]'); insert into test_proxima_be_restart_with_full_stage values(1922, 'name1922', 1932.111, 192200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1922]'); insert into test_proxima_be_restart_with_full_stage values(1923, 'name1923', 1933.111, 192300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1923]'); insert into test_proxima_be_restart_with_full_stage values(1924, 'name1924', 1934.111, 192400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1924]'); insert into test_proxima_be_restart_with_full_stage values(1925, 'name1925', 1935.111, 192500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1925]'); insert into test_proxima_be_restart_with_full_stage values(1926, 'name1926', 1936.111, 192600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1926]'); insert into test_proxima_be_restart_with_full_stage values(1927, 'name1927', 1937.111, 192700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1927]'); insert into test_proxima_be_restart_with_full_stage values(1928, 'name1928', 1938.111, 192800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1928]'); insert into test_proxima_be_restart_with_full_stage values(1929, 'name1929', 1939.111, 192900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1929]'); insert into test_proxima_be_restart_with_full_stage values(1930, 'name1930', 1940.111, 193000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1930]'); insert into test_proxima_be_restart_with_full_stage values(1931, 'name1931', 1941.111, 193100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1931]'); insert into test_proxima_be_restart_with_full_stage values(1932, 'name1932', 1942.111, 193200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1932]'); insert into test_proxima_be_restart_with_full_stage values(1933, 'name1933', 1943.111, 193300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1933]'); insert into test_proxima_be_restart_with_full_stage values(1934, 'name1934', 1944.111, 193400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1934]'); insert into test_proxima_be_restart_with_full_stage values(1935, 'name1935', 1945.111, 193500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1935]'); insert into test_proxima_be_restart_with_full_stage values(1936, 'name1936', 1946.111, 193600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1936]'); insert into test_proxima_be_restart_with_full_stage values(1937, 'name1937', 1947.111, 193700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1937]'); insert into test_proxima_be_restart_with_full_stage values(1938, 'name1938', 1948.111, 193800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1938]'); insert into test_proxima_be_restart_with_full_stage values(1939, 'name1939', 1949.111, 193900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1939]'); insert into test_proxima_be_restart_with_full_stage values(1940, 'name1940', 1950.111, 194000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1940]'); insert into test_proxima_be_restart_with_full_stage values(1941, 'name1941', 1951.111, 194100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1941]'); insert into test_proxima_be_restart_with_full_stage values(1942, 'name1942', 1952.111, 194200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1942]'); insert into test_proxima_be_restart_with_full_stage values(1943, 'name1943', 1953.111, 194300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1943]'); insert into test_proxima_be_restart_with_full_stage values(1944, 'name1944', 1954.111, 194400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1944]'); insert into test_proxima_be_restart_with_full_stage values(1945, 'name1945', 1955.111, 194500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1945]'); insert into test_proxima_be_restart_with_full_stage values(1946, 'name1946', 1956.111, 194600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1946]'); insert into test_proxima_be_restart_with_full_stage values(1947, 'name1947', 1957.111, 194700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1947]'); insert into test_proxima_be_restart_with_full_stage values(1948, 'name1948', 1958.111, 194800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1948]'); insert into test_proxima_be_restart_with_full_stage values(1949, 'name1949', 1959.111, 194900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1949]'); insert into test_proxima_be_restart_with_full_stage values(1950, 'name1950', 1960.111, 195000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1950]'); insert into test_proxima_be_restart_with_full_stage values(1951, 'name1951', 1961.111, 195100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1951]'); insert into test_proxima_be_restart_with_full_stage values(1952, 'name1952', 1962.111, 195200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1952]'); insert into test_proxima_be_restart_with_full_stage values(1953, 'name1953', 1963.111, 195300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1953]'); insert into test_proxima_be_restart_with_full_stage values(1954, 'name1954', 1964.111, 195400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1954]'); insert into test_proxima_be_restart_with_full_stage values(1955, 'name1955', 1965.111, 195500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1955]'); insert into test_proxima_be_restart_with_full_stage values(1956, 'name1956', 1966.111, 195600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1956]'); insert into test_proxima_be_restart_with_full_stage values(1957, 'name1957', 1967.111, 195700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1957]'); insert into test_proxima_be_restart_with_full_stage values(1958, 'name1958', 1968.111, 195800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1958]'); insert into test_proxima_be_restart_with_full_stage values(1959, 'name1959', 1969.111, 195900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1959]'); insert into test_proxima_be_restart_with_full_stage values(1960, 'name1960', 1970.111, 196000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1960]'); insert into test_proxima_be_restart_with_full_stage values(1961, 'name1961', 1971.111, 196100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1961]'); insert into test_proxima_be_restart_with_full_stage values(1962, 'name1962', 1972.111, 196200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1962]'); insert into test_proxima_be_restart_with_full_stage values(1963, 'name1963', 1973.111, 196300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1963]'); insert into test_proxima_be_restart_with_full_stage values(1964, 'name1964', 1974.111, 196400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1964]'); insert into test_proxima_be_restart_with_full_stage values(1965, 'name1965', 1975.111, 196500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1965]'); insert into test_proxima_be_restart_with_full_stage values(1966, 'name1966', 1976.111, 196600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1966]'); insert into test_proxima_be_restart_with_full_stage values(1967, 'name1967', 1977.111, 196700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1967]'); insert into test_proxima_be_restart_with_full_stage values(1968, 'name1968', 1978.111, 196800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1968]'); insert into test_proxima_be_restart_with_full_stage values(1969, 'name1969', 1979.111, 196900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1969]'); insert into test_proxima_be_restart_with_full_stage values(1970, 'name1970', 1980.111, 197000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1970]'); insert into test_proxima_be_restart_with_full_stage values(1971, 'name1971', 1981.111, 197100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1971]'); insert into test_proxima_be_restart_with_full_stage values(1972, 'name1972', 1982.111, 197200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1972]'); insert into test_proxima_be_restart_with_full_stage values(1973, 'name1973', 1983.111, 197300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1973]'); insert into test_proxima_be_restart_with_full_stage values(1974, 'name1974', 1984.111, 197400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1974]'); insert into test_proxima_be_restart_with_full_stage values(1975, 'name1975', 1985.111, 197500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1975]'); insert into test_proxima_be_restart_with_full_stage values(1976, 'name1976', 1986.111, 197600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1976]'); insert into test_proxima_be_restart_with_full_stage values(1977, 'name1977', 1987.111, 197700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1977]'); insert into test_proxima_be_restart_with_full_stage values(1978, 'name1978', 1988.111, 197800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1978]'); insert into test_proxima_be_restart_with_full_stage values(1979, 'name1979', 1989.111, 197900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1979]'); insert into test_proxima_be_restart_with_full_stage values(1980, 'name1980', 1990.111, 198000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1980]'); insert into test_proxima_be_restart_with_full_stage values(1981, 'name1981', 1991.111, 198100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1981]'); insert into test_proxima_be_restart_with_full_stage values(1982, 'name1982', 1992.111, 198200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1982]'); insert into test_proxima_be_restart_with_full_stage values(1983, 'name1983', 1993.111, 198300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1983]'); insert into test_proxima_be_restart_with_full_stage values(1984, 'name1984', 1994.111, 198400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1984]'); insert into test_proxima_be_restart_with_full_stage values(1985, 'name1985', 1995.111, 198500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1985]'); insert into test_proxima_be_restart_with_full_stage values(1986, 'name1986', 1996.111, 198600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1986]'); insert into test_proxima_be_restart_with_full_stage values(1987, 'name1987', 1997.111, 198700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1987]'); insert into test_proxima_be_restart_with_full_stage values(1988, 'name1988', 1998.111, 198800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1988]'); insert into test_proxima_be_restart_with_full_stage values(1989, 'name1989', 1999.111, 198900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1989]'); insert into test_proxima_be_restart_with_full_stage values(1990, 'name1990', 2000.111, 199000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1990]'); insert into test_proxima_be_restart_with_full_stage values(1991, 'name1991', 2001.111, 199100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1991]'); insert into test_proxima_be_restart_with_full_stage values(1992, 'name1992', 2002.111, 199200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1992]'); insert into test_proxima_be_restart_with_full_stage values(1993, 'name1993', 2003.111, 199300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1993]'); insert into test_proxima_be_restart_with_full_stage values(1994, 'name1994', 2004.111, 199400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1994]'); insert into test_proxima_be_restart_with_full_stage values(1995, 'name1995', 2005.111, 199500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1995]'); insert into test_proxima_be_restart_with_full_stage values(1996, 'name1996', 2006.111, 199600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1996]'); insert into test_proxima_be_restart_with_full_stage values(1997, 'name1997', 2007.111, 199700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1997]'); insert into test_proxima_be_restart_with_full_stage values(1998, 'name1998', 2008.111, 199800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1998]'); insert into test_proxima_be_restart_with_full_stage values(1999, 'name1999', 2009.111, 199900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1999]'); insert into test_proxima_be_restart_with_full_stage values(2000, 'name2000', 2010.111, 200000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2000]'); insert into test_proxima_be_restart_with_full_stage values(2001, 'name2001', 2011.111, 200100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2001]'); insert into test_proxima_be_restart_with_full_stage values(2002, 'name2002', 2012.111, 200200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2002]'); insert into test_proxima_be_restart_with_full_stage values(2003, 'name2003', 2013.111, 200300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2003]'); insert into test_proxima_be_restart_with_full_stage values(2004, 'name2004', 2014.111, 200400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2004]'); insert into test_proxima_be_restart_with_full_stage values(2005, 'name2005', 2015.111, 200500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2005]'); insert into test_proxima_be_restart_with_full_stage values(2006, 'name2006', 2016.111, 200600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2006]'); insert into test_proxima_be_restart_with_full_stage values(2007, 'name2007', 2017.111, 200700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2007]'); insert into test_proxima_be_restart_with_full_stage values(2008, 'name2008', 2018.111, 200800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2008]'); insert into test_proxima_be_restart_with_full_stage values(2009, 'name2009', 2019.111, 200900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2009]'); insert into test_proxima_be_restart_with_full_stage values(2010, 'name2010', 2020.111, 201000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2010]'); insert into test_proxima_be_restart_with_full_stage values(2011, 'name2011', 2021.111, 201100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2011]'); insert into test_proxima_be_restart_with_full_stage values(2012, 'name2012', 2022.111, 201200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2012]'); insert into test_proxima_be_restart_with_full_stage values(2013, 'name2013', 2023.111, 201300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2013]'); insert into test_proxima_be_restart_with_full_stage values(2014, 'name2014', 2024.111, 201400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2014]'); insert into test_proxima_be_restart_with_full_stage values(2015, 'name2015', 2025.111, 201500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2015]'); insert into test_proxima_be_restart_with_full_stage values(2016, 'name2016', 2026.111, 201600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2016]'); insert into test_proxima_be_restart_with_full_stage values(2017, 'name2017', 2027.111, 201700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2017]'); insert into test_proxima_be_restart_with_full_stage values(2018, 'name2018', 2028.111, 201800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2018]'); insert into test_proxima_be_restart_with_full_stage values(2019, 'name2019', 2029.111, 201900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2019]'); insert into test_proxima_be_restart_with_full_stage values(2020, 'name2020', 2030.111, 202000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2020]'); insert into test_proxima_be_restart_with_full_stage values(2021, 'name2021', 2031.111, 202100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2021]'); insert into test_proxima_be_restart_with_full_stage values(2022, 'name2022', 2032.111, 202200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2022]'); insert into test_proxima_be_restart_with_full_stage values(2023, 'name2023', 2033.111, 202300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2023]'); insert into test_proxima_be_restart_with_full_stage values(2024, 'name2024', 2034.111, 202400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2024]'); insert into test_proxima_be_restart_with_full_stage values(2025, 'name2025', 2035.111, 202500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2025]'); insert into test_proxima_be_restart_with_full_stage values(2026, 'name2026', 2036.111, 202600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2026]'); insert into test_proxima_be_restart_with_full_stage values(2027, 'name2027', 2037.111, 202700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2027]'); insert into test_proxima_be_restart_with_full_stage values(2028, 'name2028', 2038.111, 202800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2028]'); insert into test_proxima_be_restart_with_full_stage values(2029, 'name2029', 2039.111, 202900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2029]'); insert into test_proxima_be_restart_with_full_stage values(2030, 'name2030', 2040.111, 203000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2030]'); insert into test_proxima_be_restart_with_full_stage values(2031, 'name2031', 2041.111, 203100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2031]'); insert into test_proxima_be_restart_with_full_stage values(2032, 'name2032', 2042.111, 203200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2032]'); insert into test_proxima_be_restart_with_full_stage values(2033, 'name2033', 2043.111, 203300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2033]'); insert into test_proxima_be_restart_with_full_stage values(2034, 'name2034', 2044.111, 203400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2034]'); insert into test_proxima_be_restart_with_full_stage values(2035, 'name2035', 2045.111, 203500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2035]'); insert into test_proxima_be_restart_with_full_stage values(2036, 'name2036', 2046.111, 203600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2036]'); insert into test_proxima_be_restart_with_full_stage values(2037, 'name2037', 2047.111, 203700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2037]'); insert into test_proxima_be_restart_with_full_stage values(2038, 'name2038', 2048.111, 203800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2038]'); insert into test_proxima_be_restart_with_full_stage values(2039, 'name2039', 2049.111, 203900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2039]'); insert into test_proxima_be_restart_with_full_stage values(2040, 'name2040', 2050.111, 204000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2040]'); insert into test_proxima_be_restart_with_full_stage values(2041, 'name2041', 2051.111, 204100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2041]'); insert into test_proxima_be_restart_with_full_stage values(2042, 'name2042', 2052.111, 204200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2042]'); insert into test_proxima_be_restart_with_full_stage values(2043, 'name2043', 2053.111, 204300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2043]'); insert into test_proxima_be_restart_with_full_stage values(2044, 'name2044', 2054.111, 204400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2044]'); insert into test_proxima_be_restart_with_full_stage values(2045, 'name2045', 2055.111, 204500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2045]'); insert into test_proxima_be_restart_with_full_stage values(2046, 'name2046', 2056.111, 204600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2046]'); insert into test_proxima_be_restart_with_full_stage values(2047, 'name2047', 2057.111, 204700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2047]'); insert into test_proxima_be_restart_with_full_stage values(2048, 'name2048', 2058.111, 204800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2048]'); insert into test_proxima_be_restart_with_full_stage values(2049, 'name2049', 2059.111, 204900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2049]'); insert into test_proxima_be_restart_with_full_stage values(2050, 'name2050', 2060.111, 205000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2050]'); insert into test_proxima_be_restart_with_full_stage values(2051, 'name2051', 2061.111, 205100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2051]'); insert into test_proxima_be_restart_with_full_stage values(2052, 'name2052', 2062.111, 205200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2052]'); insert into test_proxima_be_restart_with_full_stage values(2053, 'name2053', 2063.111, 205300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2053]'); insert into test_proxima_be_restart_with_full_stage values(2054, 'name2054', 2064.111, 205400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2054]'); insert into test_proxima_be_restart_with_full_stage values(2055, 'name2055', 2065.111, 205500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2055]'); insert into test_proxima_be_restart_with_full_stage values(2056, 'name2056', 2066.111, 205600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2056]'); insert into test_proxima_be_restart_with_full_stage values(2057, 'name2057', 2067.111, 205700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2057]'); insert into test_proxima_be_restart_with_full_stage values(2058, 'name2058', 2068.111, 205800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2058]'); insert into test_proxima_be_restart_with_full_stage values(2059, 'name2059', 2069.111, 205900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2059]'); insert into test_proxima_be_restart_with_full_stage values(2060, 'name2060', 2070.111, 206000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2060]'); insert into test_proxima_be_restart_with_full_stage values(2061, 'name2061', 2071.111, 206100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2061]'); insert into test_proxima_be_restart_with_full_stage values(2062, 'name2062', 2072.111, 206200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2062]'); insert into test_proxima_be_restart_with_full_stage values(2063, 'name2063', 2073.111, 206300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2063]'); insert into test_proxima_be_restart_with_full_stage values(2064, 'name2064', 2074.111, 206400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2064]'); insert into test_proxima_be_restart_with_full_stage values(2065, 'name2065', 2075.111, 206500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2065]'); insert into test_proxima_be_restart_with_full_stage values(2066, 'name2066', 2076.111, 206600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2066]'); insert into test_proxima_be_restart_with_full_stage values(2067, 'name2067', 2077.111, 206700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2067]'); insert into test_proxima_be_restart_with_full_stage values(2068, 'name2068', 2078.111, 206800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2068]'); insert into test_proxima_be_restart_with_full_stage values(2069, 'name2069', 2079.111, 206900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2069]'); insert into test_proxima_be_restart_with_full_stage values(2070, 'name2070', 2080.111, 207000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2070]'); insert into test_proxima_be_restart_with_full_stage values(2071, 'name2071', 2081.111, 207100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2071]'); insert into test_proxima_be_restart_with_full_stage values(2072, 'name2072', 2082.111, 207200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2072]'); insert into test_proxima_be_restart_with_full_stage values(2073, 'name2073', 2083.111, 207300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2073]'); insert into test_proxima_be_restart_with_full_stage values(2074, 'name2074', 2084.111, 207400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2074]'); insert into test_proxima_be_restart_with_full_stage values(2075, 'name2075', 2085.111, 207500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2075]'); insert into test_proxima_be_restart_with_full_stage values(2076, 'name2076', 2086.111, 207600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2076]'); insert into test_proxima_be_restart_with_full_stage values(2077, 'name2077', 2087.111, 207700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2077]'); insert into test_proxima_be_restart_with_full_stage values(2078, 'name2078', 2088.111, 207800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2078]'); insert into test_proxima_be_restart_with_full_stage values(2079, 'name2079', 2089.111, 207900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2079]'); insert into test_proxima_be_restart_with_full_stage values(2080, 'name2080', 2090.111, 208000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2080]'); insert into test_proxima_be_restart_with_full_stage values(2081, 'name2081', 2091.111, 208100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2081]'); insert into test_proxima_be_restart_with_full_stage values(2082, 'name2082', 2092.111, 208200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2082]'); insert into test_proxima_be_restart_with_full_stage values(2083, 'name2083', 2093.111, 208300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2083]'); insert into test_proxima_be_restart_with_full_stage values(2084, 'name2084', 2094.111, 208400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2084]'); insert into test_proxima_be_restart_with_full_stage values(2085, 'name2085', 2095.111, 208500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2085]'); insert into test_proxima_be_restart_with_full_stage values(2086, 'name2086', 2096.111, 208600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2086]'); insert into test_proxima_be_restart_with_full_stage values(2087, 'name2087', 2097.111, 208700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2087]'); insert into test_proxima_be_restart_with_full_stage values(2088, 'name2088', 2098.111, 208800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2088]'); insert into test_proxima_be_restart_with_full_stage values(2089, 'name2089', 2099.111, 208900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2089]'); insert into test_proxima_be_restart_with_full_stage values(2090, 'name2090', 2100.111, 209000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2090]'); insert into test_proxima_be_restart_with_full_stage values(2091, 'name2091', 2101.111, 209100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2091]'); insert into test_proxima_be_restart_with_full_stage values(2092, 'name2092', 2102.111, 209200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2092]'); insert into test_proxima_be_restart_with_full_stage values(2093, 'name2093', 2103.111, 209300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2093]'); insert into test_proxima_be_restart_with_full_stage values(2094, 'name2094', 2104.111, 209400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2094]'); insert into test_proxima_be_restart_with_full_stage values(2095, 'name2095', 2105.111, 209500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2095]'); insert into test_proxima_be_restart_with_full_stage values(2096, 'name2096', 2106.111, 209600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2096]'); insert into test_proxima_be_restart_with_full_stage values(2097, 'name2097', 2107.111, 209700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2097]'); insert into test_proxima_be_restart_with_full_stage values(2098, 'name2098', 2108.111, 209800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2098]'); insert into test_proxima_be_restart_with_full_stage values(2099, 'name2099', 2109.111, 209900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2099]'); insert into test_proxima_be_restart_with_full_stage values(2100, 'name2100', 2110.111, 210000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2100]'); insert into test_proxima_be_restart_with_full_stage values(2101, 'name2101', 2111.111, 210100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2101]'); insert into test_proxima_be_restart_with_full_stage values(2102, 'name2102', 2112.111, 210200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2102]'); insert into test_proxima_be_restart_with_full_stage values(2103, 'name2103', 2113.111, 210300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2103]'); insert into test_proxima_be_restart_with_full_stage values(2104, 'name2104', 2114.111, 210400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2104]'); insert into test_proxima_be_restart_with_full_stage values(2105, 'name2105', 2115.111, 210500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2105]'); insert into test_proxima_be_restart_with_full_stage values(2106, 'name2106', 2116.111, 210600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2106]'); insert into test_proxima_be_restart_with_full_stage values(2107, 'name2107', 2117.111, 210700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2107]'); insert into test_proxima_be_restart_with_full_stage values(2108, 'name2108', 2118.111, 210800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2108]'); insert into test_proxima_be_restart_with_full_stage values(2109, 'name2109', 2119.111, 210900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2109]'); insert into test_proxima_be_restart_with_full_stage values(2110, 'name2110', 2120.111, 211000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2110]'); insert into test_proxima_be_restart_with_full_stage values(2111, 'name2111', 2121.111, 211100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2111]'); insert into test_proxima_be_restart_with_full_stage values(2112, 'name2112', 2122.111, 211200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2112]'); insert into test_proxima_be_restart_with_full_stage values(2113, 'name2113', 2123.111, 211300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2113]'); insert into test_proxima_be_restart_with_full_stage values(2114, 'name2114', 2124.111, 211400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2114]'); insert into test_proxima_be_restart_with_full_stage values(2115, 'name2115', 2125.111, 211500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2115]'); insert into test_proxima_be_restart_with_full_stage values(2116, 'name2116', 2126.111, 211600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2116]'); insert into test_proxima_be_restart_with_full_stage values(2117, 'name2117', 2127.111, 211700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2117]'); insert into test_proxima_be_restart_with_full_stage values(2118, 'name2118', 2128.111, 211800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2118]'); insert into test_proxima_be_restart_with_full_stage values(2119, 'name2119', 2129.111, 211900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2119]'); insert into test_proxima_be_restart_with_full_stage values(2120, 'name2120', 2130.111, 212000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2120]'); insert into test_proxima_be_restart_with_full_stage values(2121, 'name2121', 2131.111, 212100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2121]'); insert into test_proxima_be_restart_with_full_stage values(2122, 'name2122', 2132.111, 212200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2122]'); insert into test_proxima_be_restart_with_full_stage values(2123, 'name2123', 2133.111, 212300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2123]'); insert into test_proxima_be_restart_with_full_stage values(2124, 'name2124', 2134.111, 212400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2124]'); insert into test_proxima_be_restart_with_full_stage values(2125, 'name2125', 2135.111, 212500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2125]'); insert into test_proxima_be_restart_with_full_stage values(2126, 'name2126', 2136.111, 212600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2126]'); insert into test_proxima_be_restart_with_full_stage values(2127, 'name2127', 2137.111, 212700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2127]'); insert into test_proxima_be_restart_with_full_stage values(2128, 'name2128', 2138.111, 212800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2128]'); insert into test_proxima_be_restart_with_full_stage values(2129, 'name2129', 2139.111, 212900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2129]'); insert into test_proxima_be_restart_with_full_stage values(2130, 'name2130', 2140.111, 213000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2130]'); insert into test_proxima_be_restart_with_full_stage values(2131, 'name2131', 2141.111, 213100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2131]'); insert into test_proxima_be_restart_with_full_stage values(2132, 'name2132', 2142.111, 213200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2132]'); insert into test_proxima_be_restart_with_full_stage values(2133, 'name2133', 2143.111, 213300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2133]'); insert into test_proxima_be_restart_with_full_stage values(2134, 'name2134', 2144.111, 213400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2134]'); insert into test_proxima_be_restart_with_full_stage values(2135, 'name2135', 2145.111, 213500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2135]'); insert into test_proxima_be_restart_with_full_stage values(2136, 'name2136', 2146.111, 213600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2136]'); insert into test_proxima_be_restart_with_full_stage values(2137, 'name2137', 2147.111, 213700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2137]'); insert into test_proxima_be_restart_with_full_stage values(2138, 'name2138', 2148.111, 213800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2138]'); insert into test_proxima_be_restart_with_full_stage values(2139, 'name2139', 2149.111, 213900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2139]'); insert into test_proxima_be_restart_with_full_stage values(2140, 'name2140', 2150.111, 214000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2140]'); insert into test_proxima_be_restart_with_full_stage values(2141, 'name2141', 2151.111, 214100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2141]'); insert into test_proxima_be_restart_with_full_stage values(2142, 'name2142', 2152.111, 214200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2142]'); insert into test_proxima_be_restart_with_full_stage values(2143, 'name2143', 2153.111, 214300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2143]'); insert into test_proxima_be_restart_with_full_stage values(2144, 'name2144', 2154.111, 214400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2144]'); insert into test_proxima_be_restart_with_full_stage values(2145, 'name2145', 2155.111, 214500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2145]'); insert into test_proxima_be_restart_with_full_stage values(2146, 'name2146', 2156.111, 214600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2146]'); insert into test_proxima_be_restart_with_full_stage values(2147, 'name2147', 2157.111, 214700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2147]'); insert into test_proxima_be_restart_with_full_stage values(2148, 'name2148', 2158.111, 214800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2148]'); insert into test_proxima_be_restart_with_full_stage values(2149, 'name2149', 2159.111, 214900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2149]'); insert into test_proxima_be_restart_with_full_stage values(2150, 'name2150', 2160.111, 215000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2150]'); insert into test_proxima_be_restart_with_full_stage values(2151, 'name2151', 2161.111, 215100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2151]'); insert into test_proxima_be_restart_with_full_stage values(2152, 'name2152', 2162.111, 215200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2152]'); insert into test_proxima_be_restart_with_full_stage values(2153, 'name2153', 2163.111, 215300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2153]'); insert into test_proxima_be_restart_with_full_stage values(2154, 'name2154', 2164.111, 215400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2154]'); insert into test_proxima_be_restart_with_full_stage values(2155, 'name2155', 2165.111, 215500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2155]'); insert into test_proxima_be_restart_with_full_stage values(2156, 'name2156', 2166.111, 215600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2156]'); insert into test_proxima_be_restart_with_full_stage values(2157, 'name2157', 2167.111, 215700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2157]'); insert into test_proxima_be_restart_with_full_stage values(2158, 'name2158', 2168.111, 215800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2158]'); insert into test_proxima_be_restart_with_full_stage values(2159, 'name2159', 2169.111, 215900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2159]'); insert into test_proxima_be_restart_with_full_stage values(2160, 'name2160', 2170.111, 216000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2160]'); insert into test_proxima_be_restart_with_full_stage values(2161, 'name2161', 2171.111, 216100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2161]'); insert into test_proxima_be_restart_with_full_stage values(2162, 'name2162', 2172.111, 216200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2162]'); insert into test_proxima_be_restart_with_full_stage values(2163, 'name2163', 2173.111, 216300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2163]'); insert into test_proxima_be_restart_with_full_stage values(2164, 'name2164', 2174.111, 216400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2164]'); insert into test_proxima_be_restart_with_full_stage values(2165, 'name2165', 2175.111, 216500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2165]'); insert into test_proxima_be_restart_with_full_stage values(2166, 'name2166', 2176.111, 216600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2166]'); insert into test_proxima_be_restart_with_full_stage values(2167, 'name2167', 2177.111, 216700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2167]'); insert into test_proxima_be_restart_with_full_stage values(2168, 'name2168', 2178.111, 216800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2168]'); insert into test_proxima_be_restart_with_full_stage values(2169, 'name2169', 2179.111, 216900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2169]'); insert into test_proxima_be_restart_with_full_stage values(2170, 'name2170', 2180.111, 217000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2170]'); insert into test_proxima_be_restart_with_full_stage values(2171, 'name2171', 2181.111, 217100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2171]'); insert into test_proxima_be_restart_with_full_stage values(2172, 'name2172', 2182.111, 217200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2172]'); insert into test_proxima_be_restart_with_full_stage values(2173, 'name2173', 2183.111, 217300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2173]'); insert into test_proxima_be_restart_with_full_stage values(2174, 'name2174', 2184.111, 217400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2174]'); insert into test_proxima_be_restart_with_full_stage values(2175, 'name2175', 2185.111, 217500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2175]'); insert into test_proxima_be_restart_with_full_stage values(2176, 'name2176', 2186.111, 217600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2176]'); insert into test_proxima_be_restart_with_full_stage values(2177, 'name2177', 2187.111, 217700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2177]'); insert into test_proxima_be_restart_with_full_stage values(2178, 'name2178', 2188.111, 217800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2178]'); insert into test_proxima_be_restart_with_full_stage values(2179, 'name2179', 2189.111, 217900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2179]'); insert into test_proxima_be_restart_with_full_stage values(2180, 'name2180', 2190.111, 218000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2180]'); insert into test_proxima_be_restart_with_full_stage values(2181, 'name2181', 2191.111, 218100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2181]'); insert into test_proxima_be_restart_with_full_stage values(2182, 'name2182', 2192.111, 218200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2182]'); insert into test_proxima_be_restart_with_full_stage values(2183, 'name2183', 2193.111, 218300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2183]'); insert into test_proxima_be_restart_with_full_stage values(2184, 'name2184', 2194.111, 218400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2184]'); insert into test_proxima_be_restart_with_full_stage values(2185, 'name2185', 2195.111, 218500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2185]'); insert into test_proxima_be_restart_with_full_stage values(2186, 'name2186', 2196.111, 218600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2186]'); insert into test_proxima_be_restart_with_full_stage values(2187, 'name2187', 2197.111, 218700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2187]'); insert into test_proxima_be_restart_with_full_stage values(2188, 'name2188', 2198.111, 218800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2188]'); insert into test_proxima_be_restart_with_full_stage values(2189, 'name2189', 2199.111, 218900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2189]'); insert into test_proxima_be_restart_with_full_stage values(2190, 'name2190', 2200.111, 219000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2190]'); insert into test_proxima_be_restart_with_full_stage values(2191, 'name2191', 2201.111, 219100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2191]'); insert into test_proxima_be_restart_with_full_stage values(2192, 'name2192', 2202.111, 219200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2192]'); insert into test_proxima_be_restart_with_full_stage values(2193, 'name2193', 2203.111, 219300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2193]'); insert into test_proxima_be_restart_with_full_stage values(2194, 'name2194', 2204.111, 219400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2194]'); insert into test_proxima_be_restart_with_full_stage values(2195, 'name2195', 2205.111, 219500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2195]'); insert into test_proxima_be_restart_with_full_stage values(2196, 'name2196', 2206.111, 219600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2196]'); insert into test_proxima_be_restart_with_full_stage values(2197, 'name2197', 2207.111, 219700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2197]'); insert into test_proxima_be_restart_with_full_stage values(2198, 'name2198', 2208.111, 219800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2198]'); insert into test_proxima_be_restart_with_full_stage values(2199, 'name2199', 2209.111, 219900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2199]'); insert into test_proxima_be_restart_with_full_stage values(2200, 'name2200', 2210.111, 220000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2200]'); insert into test_proxima_be_restart_with_full_stage values(2201, 'name2201', 2211.111, 220100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2201]'); insert into test_proxima_be_restart_with_full_stage values(2202, 'name2202', 2212.111, 220200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2202]'); insert into test_proxima_be_restart_with_full_stage values(2203, 'name2203', 2213.111, 220300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2203]'); insert into test_proxima_be_restart_with_full_stage values(2204, 'name2204', 2214.111, 220400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2204]'); insert into test_proxima_be_restart_with_full_stage values(2205, 'name2205', 2215.111, 220500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2205]'); insert into test_proxima_be_restart_with_full_stage values(2206, 'name2206', 2216.111, 220600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2206]'); insert into test_proxima_be_restart_with_full_stage values(2207, 'name2207', 2217.111, 220700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2207]'); insert into test_proxima_be_restart_with_full_stage values(2208, 'name2208', 2218.111, 220800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2208]'); insert into test_proxima_be_restart_with_full_stage values(2209, 'name2209', 2219.111, 220900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2209]'); insert into test_proxima_be_restart_with_full_stage values(2210, 'name2210', 2220.111, 221000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2210]'); insert into test_proxima_be_restart_with_full_stage values(2211, 'name2211', 2221.111, 221100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2211]'); insert into test_proxima_be_restart_with_full_stage values(2212, 'name2212', 2222.111, 221200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2212]'); insert into test_proxima_be_restart_with_full_stage values(2213, 'name2213', 2223.111, 221300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2213]'); insert into test_proxima_be_restart_with_full_stage values(2214, 'name2214', 2224.111, 221400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2214]'); insert into test_proxima_be_restart_with_full_stage values(2215, 'name2215', 2225.111, 221500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2215]'); insert into test_proxima_be_restart_with_full_stage values(2216, 'name2216', 2226.111, 221600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2216]'); insert into test_proxima_be_restart_with_full_stage values(2217, 'name2217', 2227.111, 221700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2217]'); insert into test_proxima_be_restart_with_full_stage values(2218, 'name2218', 2228.111, 221800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2218]'); insert into test_proxima_be_restart_with_full_stage values(2219, 'name2219', 2229.111, 221900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2219]'); insert into test_proxima_be_restart_with_full_stage values(2220, 'name2220', 2230.111, 222000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2220]'); insert into test_proxima_be_restart_with_full_stage values(2221, 'name2221', 2231.111, 222100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2221]'); insert into test_proxima_be_restart_with_full_stage values(2222, 'name2222', 2232.111, 222200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2222]'); insert into test_proxima_be_restart_with_full_stage values(2223, 'name2223', 2233.111, 222300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2223]'); insert into test_proxima_be_restart_with_full_stage values(2224, 'name2224', 2234.111, 222400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2224]'); insert into test_proxima_be_restart_with_full_stage values(2225, 'name2225', 2235.111, 222500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2225]'); insert into test_proxima_be_restart_with_full_stage values(2226, 'name2226', 2236.111, 222600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2226]'); insert into test_proxima_be_restart_with_full_stage values(2227, 'name2227', 2237.111, 222700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2227]'); insert into test_proxima_be_restart_with_full_stage values(2228, 'name2228', 2238.111, 222800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2228]'); insert into test_proxima_be_restart_with_full_stage values(2229, 'name2229', 2239.111, 222900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2229]'); insert into test_proxima_be_restart_with_full_stage values(2230, 'name2230', 2240.111, 223000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2230]'); insert into test_proxima_be_restart_with_full_stage values(2231, 'name2231', 2241.111, 223100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2231]'); insert into test_proxima_be_restart_with_full_stage values(2232, 'name2232', 2242.111, 223200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2232]'); insert into test_proxima_be_restart_with_full_stage values(2233, 'name2233', 2243.111, 223300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2233]'); insert into test_proxima_be_restart_with_full_stage values(2234, 'name2234', 2244.111, 223400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2234]'); insert into test_proxima_be_restart_with_full_stage values(2235, 'name2235', 2245.111, 223500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2235]'); insert into test_proxima_be_restart_with_full_stage values(2236, 'name2236', 2246.111, 223600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2236]'); insert into test_proxima_be_restart_with_full_stage values(2237, 'name2237', 2247.111, 223700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2237]'); insert into test_proxima_be_restart_with_full_stage values(2238, 'name2238', 2248.111, 223800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2238]'); insert into test_proxima_be_restart_with_full_stage values(2239, 'name2239', 2249.111, 223900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2239]'); insert into test_proxima_be_restart_with_full_stage values(2240, 'name2240', 2250.111, 224000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2240]'); insert into test_proxima_be_restart_with_full_stage values(2241, 'name2241', 2251.111, 224100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2241]'); insert into test_proxima_be_restart_with_full_stage values(2242, 'name2242', 2252.111, 224200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2242]'); insert into test_proxima_be_restart_with_full_stage values(2243, 'name2243', 2253.111, 224300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2243]'); insert into test_proxima_be_restart_with_full_stage values(2244, 'name2244', 2254.111, 224400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2244]'); insert into test_proxima_be_restart_with_full_stage values(2245, 'name2245', 2255.111, 224500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2245]'); insert into test_proxima_be_restart_with_full_stage values(2246, 'name2246', 2256.111, 224600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2246]'); insert into test_proxima_be_restart_with_full_stage values(2247, 'name2247', 2257.111, 224700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2247]'); insert into test_proxima_be_restart_with_full_stage values(2248, 'name2248', 2258.111, 224800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2248]'); insert into test_proxima_be_restart_with_full_stage values(2249, 'name2249', 2259.111, 224900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2249]'); insert into test_proxima_be_restart_with_full_stage values(2250, 'name2250', 2260.111, 225000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2250]'); insert into test_proxima_be_restart_with_full_stage values(2251, 'name2251', 2261.111, 225100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2251]'); insert into test_proxima_be_restart_with_full_stage values(2252, 'name2252', 2262.111, 225200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2252]'); insert into test_proxima_be_restart_with_full_stage values(2253, 'name2253', 2263.111, 225300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2253]'); insert into test_proxima_be_restart_with_full_stage values(2254, 'name2254', 2264.111, 225400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2254]'); insert into test_proxima_be_restart_with_full_stage values(2255, 'name2255', 2265.111, 225500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2255]'); insert into test_proxima_be_restart_with_full_stage values(2256, 'name2256', 2266.111, 225600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2256]'); insert into test_proxima_be_restart_with_full_stage values(2257, 'name2257', 2267.111, 225700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2257]'); insert into test_proxima_be_restart_with_full_stage values(2258, 'name2258', 2268.111, 225800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2258]'); insert into test_proxima_be_restart_with_full_stage values(2259, 'name2259', 2269.111, 225900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2259]'); insert into test_proxima_be_restart_with_full_stage values(2260, 'name2260', 2270.111, 226000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2260]'); insert into test_proxima_be_restart_with_full_stage values(2261, 'name2261', 2271.111, 226100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2261]'); insert into test_proxima_be_restart_with_full_stage values(2262, 'name2262', 2272.111, 226200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2262]'); insert into test_proxima_be_restart_with_full_stage values(2263, 'name2263', 2273.111, 226300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2263]'); insert into test_proxima_be_restart_with_full_stage values(2264, 'name2264', 2274.111, 226400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2264]'); insert into test_proxima_be_restart_with_full_stage values(2265, 'name2265', 2275.111, 226500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2265]'); insert into test_proxima_be_restart_with_full_stage values(2266, 'name2266', 2276.111, 226600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2266]'); insert into test_proxima_be_restart_with_full_stage values(2267, 'name2267', 2277.111, 226700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2267]'); insert into test_proxima_be_restart_with_full_stage values(2268, 'name2268', 2278.111, 226800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2268]'); insert into test_proxima_be_restart_with_full_stage values(2269, 'name2269', 2279.111, 226900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2269]'); insert into test_proxima_be_restart_with_full_stage values(2270, 'name2270', 2280.111, 227000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2270]'); insert into test_proxima_be_restart_with_full_stage values(2271, 'name2271', 2281.111, 227100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2271]'); insert into test_proxima_be_restart_with_full_stage values(2272, 'name2272', 2282.111, 227200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2272]'); insert into test_proxima_be_restart_with_full_stage values(2273, 'name2273', 2283.111, 227300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2273]'); insert into test_proxima_be_restart_with_full_stage values(2274, 'name2274', 2284.111, 227400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2274]'); insert into test_proxima_be_restart_with_full_stage values(2275, 'name2275', 2285.111, 227500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2275]'); insert into test_proxima_be_restart_with_full_stage values(2276, 'name2276', 2286.111, 227600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2276]'); insert into test_proxima_be_restart_with_full_stage values(2277, 'name2277', 2287.111, 227700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2277]'); insert into test_proxima_be_restart_with_full_stage values(2278, 'name2278', 2288.111, 227800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2278]'); insert into test_proxima_be_restart_with_full_stage values(2279, 'name2279', 2289.111, 227900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2279]'); insert into test_proxima_be_restart_with_full_stage values(2280, 'name2280', 2290.111, 228000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2280]'); insert into test_proxima_be_restart_with_full_stage values(2281, 'name2281', 2291.111, 228100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2281]'); insert into test_proxima_be_restart_with_full_stage values(2282, 'name2282', 2292.111, 228200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2282]'); insert into test_proxima_be_restart_with_full_stage values(2283, 'name2283', 2293.111, 228300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2283]'); insert into test_proxima_be_restart_with_full_stage values(2284, 'name2284', 2294.111, 228400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2284]'); insert into test_proxima_be_restart_with_full_stage values(2285, 'name2285', 2295.111, 228500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2285]'); insert into test_proxima_be_restart_with_full_stage values(2286, 'name2286', 2296.111, 228600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2286]'); insert into test_proxima_be_restart_with_full_stage values(2287, 'name2287', 2297.111, 228700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2287]'); insert into test_proxima_be_restart_with_full_stage values(2288, 'name2288', 2298.111, 228800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2288]'); insert into test_proxima_be_restart_with_full_stage values(2289, 'name2289', 2299.111, 228900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2289]'); insert into test_proxima_be_restart_with_full_stage values(2290, 'name2290', 2300.111, 229000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2290]'); insert into test_proxima_be_restart_with_full_stage values(2291, 'name2291', 2301.111, 229100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2291]'); insert into test_proxima_be_restart_with_full_stage values(2292, 'name2292', 2302.111, 229200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2292]'); insert into test_proxima_be_restart_with_full_stage values(2293, 'name2293', 2303.111, 229300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2293]'); insert into test_proxima_be_restart_with_full_stage values(2294, 'name2294', 2304.111, 229400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2294]'); insert into test_proxima_be_restart_with_full_stage values(2295, 'name2295', 2305.111, 229500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2295]'); insert into test_proxima_be_restart_with_full_stage values(2296, 'name2296', 2306.111, 229600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2296]'); insert into test_proxima_be_restart_with_full_stage values(2297, 'name2297', 2307.111, 229700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2297]'); insert into test_proxima_be_restart_with_full_stage values(2298, 'name2298', 2308.111, 229800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2298]'); insert into test_proxima_be_restart_with_full_stage values(2299, 'name2299', 2309.111, 229900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2299]'); insert into test_proxima_be_restart_with_full_stage values(2300, 'name2300', 2310.111, 230000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2300]'); insert into test_proxima_be_restart_with_full_stage values(2301, 'name2301', 2311.111, 230100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2301]'); insert into test_proxima_be_restart_with_full_stage values(2302, 'name2302', 2312.111, 230200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2302]'); insert into test_proxima_be_restart_with_full_stage values(2303, 'name2303', 2313.111, 230300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2303]'); insert into test_proxima_be_restart_with_full_stage values(2304, 'name2304', 2314.111, 230400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2304]'); insert into test_proxima_be_restart_with_full_stage values(2305, 'name2305', 2315.111, 230500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2305]'); insert into test_proxima_be_restart_with_full_stage values(2306, 'name2306', 2316.111, 230600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2306]'); insert into test_proxima_be_restart_with_full_stage values(2307, 'name2307', 2317.111, 230700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2307]'); insert into test_proxima_be_restart_with_full_stage values(2308, 'name2308', 2318.111, 230800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2308]'); insert into test_proxima_be_restart_with_full_stage values(2309, 'name2309', 2319.111, 230900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2309]'); insert into test_proxima_be_restart_with_full_stage values(2310, 'name2310', 2320.111, 231000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2310]'); insert into test_proxima_be_restart_with_full_stage values(2311, 'name2311', 2321.111, 231100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2311]'); insert into test_proxima_be_restart_with_full_stage values(2312, 'name2312', 2322.111, 231200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2312]'); insert into test_proxima_be_restart_with_full_stage values(2313, 'name2313', 2323.111, 231300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2313]'); insert into test_proxima_be_restart_with_full_stage values(2314, 'name2314', 2324.111, 231400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2314]'); insert into test_proxima_be_restart_with_full_stage values(2315, 'name2315', 2325.111, 231500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2315]'); insert into test_proxima_be_restart_with_full_stage values(2316, 'name2316', 2326.111, 231600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2316]'); insert into test_proxima_be_restart_with_full_stage values(2317, 'name2317', 2327.111, 231700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2317]'); insert into test_proxima_be_restart_with_full_stage values(2318, 'name2318', 2328.111, 231800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2318]'); insert into test_proxima_be_restart_with_full_stage values(2319, 'name2319', 2329.111, 231900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2319]'); insert into test_proxima_be_restart_with_full_stage values(2320, 'name2320', 2330.111, 232000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2320]'); insert into test_proxima_be_restart_with_full_stage values(2321, 'name2321', 2331.111, 232100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2321]'); insert into test_proxima_be_restart_with_full_stage values(2322, 'name2322', 2332.111, 232200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2322]'); insert into test_proxima_be_restart_with_full_stage values(2323, 'name2323', 2333.111, 232300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2323]'); insert into test_proxima_be_restart_with_full_stage values(2324, 'name2324', 2334.111, 232400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2324]'); insert into test_proxima_be_restart_with_full_stage values(2325, 'name2325', 2335.111, 232500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2325]'); insert into test_proxima_be_restart_with_full_stage values(2326, 'name2326', 2336.111, 232600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2326]'); insert into test_proxima_be_restart_with_full_stage values(2327, 'name2327', 2337.111, 232700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2327]'); insert into test_proxima_be_restart_with_full_stage values(2328, 'name2328', 2338.111, 232800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2328]'); insert into test_proxima_be_restart_with_full_stage values(2329, 'name2329', 2339.111, 232900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2329]'); insert into test_proxima_be_restart_with_full_stage values(2330, 'name2330', 2340.111, 233000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2330]'); insert into test_proxima_be_restart_with_full_stage values(2331, 'name2331', 2341.111, 233100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2331]'); insert into test_proxima_be_restart_with_full_stage values(2332, 'name2332', 2342.111, 233200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2332]'); insert into test_proxima_be_restart_with_full_stage values(2333, 'name2333', 2343.111, 233300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2333]'); insert into test_proxima_be_restart_with_full_stage values(2334, 'name2334', 2344.111, 233400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2334]'); insert into test_proxima_be_restart_with_full_stage values(2335, 'name2335', 2345.111, 233500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2335]'); insert into test_proxima_be_restart_with_full_stage values(2336, 'name2336', 2346.111, 233600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2336]'); insert into test_proxima_be_restart_with_full_stage values(2337, 'name2337', 2347.111, 233700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2337]'); insert into test_proxima_be_restart_with_full_stage values(2338, 'name2338', 2348.111, 233800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2338]'); insert into test_proxima_be_restart_with_full_stage values(2339, 'name2339', 2349.111, 233900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2339]'); insert into test_proxima_be_restart_with_full_stage values(2340, 'name2340', 2350.111, 234000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2340]'); insert into test_proxima_be_restart_with_full_stage values(2341, 'name2341', 2351.111, 234100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2341]'); insert into test_proxima_be_restart_with_full_stage values(2342, 'name2342', 2352.111, 234200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2342]'); insert into test_proxima_be_restart_with_full_stage values(2343, 'name2343', 2353.111, 234300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2343]'); insert into test_proxima_be_restart_with_full_stage values(2344, 'name2344', 2354.111, 234400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2344]'); insert into test_proxima_be_restart_with_full_stage values(2345, 'name2345', 2355.111, 234500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2345]'); insert into test_proxima_be_restart_with_full_stage values(2346, 'name2346', 2356.111, 234600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2346]'); insert into test_proxima_be_restart_with_full_stage values(2347, 'name2347', 2357.111, 234700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2347]'); insert into test_proxima_be_restart_with_full_stage values(2348, 'name2348', 2358.111, 234800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2348]'); insert into test_proxima_be_restart_with_full_stage values(2349, 'name2349', 2359.111, 234900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2349]'); insert into test_proxima_be_restart_with_full_stage values(2350, 'name2350', 2360.111, 235000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2350]'); insert into test_proxima_be_restart_with_full_stage values(2351, 'name2351', 2361.111, 235100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2351]'); insert into test_proxima_be_restart_with_full_stage values(2352, 'name2352', 2362.111, 235200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2352]'); insert into test_proxima_be_restart_with_full_stage values(2353, 'name2353', 2363.111, 235300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2353]'); insert into test_proxima_be_restart_with_full_stage values(2354, 'name2354', 2364.111, 235400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2354]'); insert into test_proxima_be_restart_with_full_stage values(2355, 'name2355', 2365.111, 235500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2355]'); insert into test_proxima_be_restart_with_full_stage values(2356, 'name2356', 2366.111, 235600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2356]'); insert into test_proxima_be_restart_with_full_stage values(2357, 'name2357', 2367.111, 235700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2357]'); insert into test_proxima_be_restart_with_full_stage values(2358, 'name2358', 2368.111, 235800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2358]'); insert into test_proxima_be_restart_with_full_stage values(2359, 'name2359', 2369.111, 235900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2359]'); insert into test_proxima_be_restart_with_full_stage values(2360, 'name2360', 2370.111, 236000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2360]'); insert into test_proxima_be_restart_with_full_stage values(2361, 'name2361', 2371.111, 236100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2361]'); insert into test_proxima_be_restart_with_full_stage values(2362, 'name2362', 2372.111, 236200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2362]'); insert into test_proxima_be_restart_with_full_stage values(2363, 'name2363', 2373.111, 236300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2363]'); insert into test_proxima_be_restart_with_full_stage values(2364, 'name2364', 2374.111, 236400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2364]'); insert into test_proxima_be_restart_with_full_stage values(2365, 'name2365', 2375.111, 236500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2365]'); insert into test_proxima_be_restart_with_full_stage values(2366, 'name2366', 2376.111, 236600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2366]'); insert into test_proxima_be_restart_with_full_stage values(2367, 'name2367', 2377.111, 236700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2367]'); insert into test_proxima_be_restart_with_full_stage values(2368, 'name2368', 2378.111, 236800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2368]'); insert into test_proxima_be_restart_with_full_stage values(2369, 'name2369', 2379.111, 236900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2369]'); insert into test_proxima_be_restart_with_full_stage values(2370, 'name2370', 2380.111, 237000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2370]'); insert into test_proxima_be_restart_with_full_stage values(2371, 'name2371', 2381.111, 237100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2371]'); insert into test_proxima_be_restart_with_full_stage values(2372, 'name2372', 2382.111, 237200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2372]'); insert into test_proxima_be_restart_with_full_stage values(2373, 'name2373', 2383.111, 237300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2373]'); insert into test_proxima_be_restart_with_full_stage values(2374, 'name2374', 2384.111, 237400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2374]'); insert into test_proxima_be_restart_with_full_stage values(2375, 'name2375', 2385.111, 237500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2375]'); insert into test_proxima_be_restart_with_full_stage values(2376, 'name2376', 2386.111, 237600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2376]'); insert into test_proxima_be_restart_with_full_stage values(2377, 'name2377', 2387.111, 237700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2377]'); insert into test_proxima_be_restart_with_full_stage values(2378, 'name2378', 2388.111, 237800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2378]'); insert into test_proxima_be_restart_with_full_stage values(2379, 'name2379', 2389.111, 237900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2379]'); insert into test_proxima_be_restart_with_full_stage values(2380, 'name2380', 2390.111, 238000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2380]'); insert into test_proxima_be_restart_with_full_stage values(2381, 'name2381', 2391.111, 238100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2381]'); insert into test_proxima_be_restart_with_full_stage values(2382, 'name2382', 2392.111, 238200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2382]'); insert into test_proxima_be_restart_with_full_stage values(2383, 'name2383', 2393.111, 238300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2383]'); insert into test_proxima_be_restart_with_full_stage values(2384, 'name2384', 2394.111, 238400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2384]'); insert into test_proxima_be_restart_with_full_stage values(2385, 'name2385', 2395.111, 238500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2385]'); insert into test_proxima_be_restart_with_full_stage values(2386, 'name2386', 2396.111, 238600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2386]'); insert into test_proxima_be_restart_with_full_stage values(2387, 'name2387', 2397.111, 238700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2387]'); insert into test_proxima_be_restart_with_full_stage values(2388, 'name2388', 2398.111, 238800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2388]'); insert into test_proxima_be_restart_with_full_stage values(2389, 'name2389', 2399.111, 238900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2389]'); insert into test_proxima_be_restart_with_full_stage values(2390, 'name2390', 2400.111, 239000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2390]'); insert into test_proxima_be_restart_with_full_stage values(2391, 'name2391', 2401.111, 239100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2391]'); insert into test_proxima_be_restart_with_full_stage values(2392, 'name2392', 2402.111, 239200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2392]'); insert into test_proxima_be_restart_with_full_stage values(2393, 'name2393', 2403.111, 239300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2393]'); insert into test_proxima_be_restart_with_full_stage values(2394, 'name2394', 2404.111, 239400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2394]'); insert into test_proxima_be_restart_with_full_stage values(2395, 'name2395', 2405.111, 239500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2395]'); insert into test_proxima_be_restart_with_full_stage values(2396, 'name2396', 2406.111, 239600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2396]'); insert into test_proxima_be_restart_with_full_stage values(2397, 'name2397', 2407.111, 239700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2397]'); insert into test_proxima_be_restart_with_full_stage values(2398, 'name2398', 2408.111, 239800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2398]'); insert into test_proxima_be_restart_with_full_stage values(2399, 'name2399', 2409.111, 239900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2399]'); insert into test_proxima_be_restart_with_full_stage values(2400, 'name2400', 2410.111, 240000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2400]'); insert into test_proxima_be_restart_with_full_stage values(2401, 'name2401', 2411.111, 240100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2401]'); insert into test_proxima_be_restart_with_full_stage values(2402, 'name2402', 2412.111, 240200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2402]'); insert into test_proxima_be_restart_with_full_stage values(2403, 'name2403', 2413.111, 240300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2403]'); insert into test_proxima_be_restart_with_full_stage values(2404, 'name2404', 2414.111, 240400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2404]'); insert into test_proxima_be_restart_with_full_stage values(2405, 'name2405', 2415.111, 240500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2405]'); insert into test_proxima_be_restart_with_full_stage values(2406, 'name2406', 2416.111, 240600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2406]'); insert into test_proxima_be_restart_with_full_stage values(2407, 'name2407', 2417.111, 240700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2407]'); insert into test_proxima_be_restart_with_full_stage values(2408, 'name2408', 2418.111, 240800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2408]'); insert into test_proxima_be_restart_with_full_stage values(2409, 'name2409', 2419.111, 240900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2409]'); insert into test_proxima_be_restart_with_full_stage values(2410, 'name2410', 2420.111, 241000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2410]'); insert into test_proxima_be_restart_with_full_stage values(2411, 'name2411', 2421.111, 241100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2411]'); insert into test_proxima_be_restart_with_full_stage values(2412, 'name2412', 2422.111, 241200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2412]'); insert into test_proxima_be_restart_with_full_stage values(2413, 'name2413', 2423.111, 241300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2413]'); insert into test_proxima_be_restart_with_full_stage values(2414, 'name2414', 2424.111, 241400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2414]'); insert into test_proxima_be_restart_with_full_stage values(2415, 'name2415', 2425.111, 241500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2415]'); insert into test_proxima_be_restart_with_full_stage values(2416, 'name2416', 2426.111, 241600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2416]'); insert into test_proxima_be_restart_with_full_stage values(2417, 'name2417', 2427.111, 241700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2417]'); insert into test_proxima_be_restart_with_full_stage values(2418, 'name2418', 2428.111, 241800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2418]'); insert into test_proxima_be_restart_with_full_stage values(2419, 'name2419', 2429.111, 241900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2419]'); insert into test_proxima_be_restart_with_full_stage values(2420, 'name2420', 2430.111, 242000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2420]'); insert into test_proxima_be_restart_with_full_stage values(2421, 'name2421', 2431.111, 242100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2421]'); insert into test_proxima_be_restart_with_full_stage values(2422, 'name2422', 2432.111, 242200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2422]'); insert into test_proxima_be_restart_with_full_stage values(2423, 'name2423', 2433.111, 242300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2423]'); insert into test_proxima_be_restart_with_full_stage values(2424, 'name2424', 2434.111, 242400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2424]'); insert into test_proxima_be_restart_with_full_stage values(2425, 'name2425', 2435.111, 242500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2425]'); insert into test_proxima_be_restart_with_full_stage values(2426, 'name2426', 2436.111, 242600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2426]'); insert into test_proxima_be_restart_with_full_stage values(2427, 'name2427', 2437.111, 242700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2427]'); insert into test_proxima_be_restart_with_full_stage values(2428, 'name2428', 2438.111, 242800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2428]'); insert into test_proxima_be_restart_with_full_stage values(2429, 'name2429', 2439.111, 242900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2429]'); insert into test_proxima_be_restart_with_full_stage values(2430, 'name2430', 2440.111, 243000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2430]'); insert into test_proxima_be_restart_with_full_stage values(2431, 'name2431', 2441.111, 243100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2431]'); insert into test_proxima_be_restart_with_full_stage values(2432, 'name2432', 2442.111, 243200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2432]'); insert into test_proxima_be_restart_with_full_stage values(2433, 'name2433', 2443.111, 243300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2433]'); insert into test_proxima_be_restart_with_full_stage values(2434, 'name2434', 2444.111, 243400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2434]'); insert into test_proxima_be_restart_with_full_stage values(2435, 'name2435', 2445.111, 243500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2435]'); insert into test_proxima_be_restart_with_full_stage values(2436, 'name2436', 2446.111, 243600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2436]'); insert into test_proxima_be_restart_with_full_stage values(2437, 'name2437', 2447.111, 243700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2437]'); insert into test_proxima_be_restart_with_full_stage values(2438, 'name2438', 2448.111, 243800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2438]'); insert into test_proxima_be_restart_with_full_stage values(2439, 'name2439', 2449.111, 243900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2439]'); insert into test_proxima_be_restart_with_full_stage values(2440, 'name2440', 2450.111, 244000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2440]'); insert into test_proxima_be_restart_with_full_stage values(2441, 'name2441', 2451.111, 244100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2441]'); insert into test_proxima_be_restart_with_full_stage values(2442, 'name2442', 2452.111, 244200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2442]'); insert into test_proxima_be_restart_with_full_stage values(2443, 'name2443', 2453.111, 244300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2443]'); insert into test_proxima_be_restart_with_full_stage values(2444, 'name2444', 2454.111, 244400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2444]'); insert into test_proxima_be_restart_with_full_stage values(2445, 'name2445', 2455.111, 244500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2445]'); insert into test_proxima_be_restart_with_full_stage values(2446, 'name2446', 2456.111, 244600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2446]'); insert into test_proxima_be_restart_with_full_stage values(2447, 'name2447', 2457.111, 244700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2447]'); insert into test_proxima_be_restart_with_full_stage values(2448, 'name2448', 2458.111, 244800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2448]'); insert into test_proxima_be_restart_with_full_stage values(2449, 'name2449', 2459.111, 244900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2449]'); insert into test_proxima_be_restart_with_full_stage values(2450, 'name2450', 2460.111, 245000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2450]'); insert into test_proxima_be_restart_with_full_stage values(2451, 'name2451', 2461.111, 245100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2451]'); insert into test_proxima_be_restart_with_full_stage values(2452, 'name2452', 2462.111, 245200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2452]'); insert into test_proxima_be_restart_with_full_stage values(2453, 'name2453', 2463.111, 245300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2453]'); insert into test_proxima_be_restart_with_full_stage values(2454, 'name2454', 2464.111, 245400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2454]'); insert into test_proxima_be_restart_with_full_stage values(2455, 'name2455', 2465.111, 245500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2455]'); insert into test_proxima_be_restart_with_full_stage values(2456, 'name2456', 2466.111, 245600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2456]'); insert into test_proxima_be_restart_with_full_stage values(2457, 'name2457', 2467.111, 245700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2457]'); insert into test_proxima_be_restart_with_full_stage values(2458, 'name2458', 2468.111, 245800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2458]'); insert into test_proxima_be_restart_with_full_stage values(2459, 'name2459', 2469.111, 245900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2459]'); insert into test_proxima_be_restart_with_full_stage values(2460, 'name2460', 2470.111, 246000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2460]'); insert into test_proxima_be_restart_with_full_stage values(2461, 'name2461', 2471.111, 246100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2461]'); insert into test_proxima_be_restart_with_full_stage values(2462, 'name2462', 2472.111, 246200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2462]'); insert into test_proxima_be_restart_with_full_stage values(2463, 'name2463', 2473.111, 246300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2463]'); insert into test_proxima_be_restart_with_full_stage values(2464, 'name2464', 2474.111, 246400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2464]'); insert into test_proxima_be_restart_with_full_stage values(2465, 'name2465', 2475.111, 246500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2465]'); insert into test_proxima_be_restart_with_full_stage values(2466, 'name2466', 2476.111, 246600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2466]'); insert into test_proxima_be_restart_with_full_stage values(2467, 'name2467', 2477.111, 246700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2467]'); insert into test_proxima_be_restart_with_full_stage values(2468, 'name2468', 2478.111, 246800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2468]'); insert into test_proxima_be_restart_with_full_stage values(2469, 'name2469', 2479.111, 246900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2469]'); insert into test_proxima_be_restart_with_full_stage values(2470, 'name2470', 2480.111, 247000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2470]'); insert into test_proxima_be_restart_with_full_stage values(2471, 'name2471', 2481.111, 247100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2471]'); insert into test_proxima_be_restart_with_full_stage values(2472, 'name2472', 2482.111, 247200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2472]'); insert into test_proxima_be_restart_with_full_stage values(2473, 'name2473', 2483.111, 247300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2473]'); insert into test_proxima_be_restart_with_full_stage values(2474, 'name2474', 2484.111, 247400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2474]'); insert into test_proxima_be_restart_with_full_stage values(2475, 'name2475', 2485.111, 247500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2475]'); insert into test_proxima_be_restart_with_full_stage values(2476, 'name2476', 2486.111, 247600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2476]'); insert into test_proxima_be_restart_with_full_stage values(2477, 'name2477', 2487.111, 247700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2477]'); insert into test_proxima_be_restart_with_full_stage values(2478, 'name2478', 2488.111, 247800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2478]'); insert into test_proxima_be_restart_with_full_stage values(2479, 'name2479', 2489.111, 247900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2479]'); insert into test_proxima_be_restart_with_full_stage values(2480, 'name2480', 2490.111, 248000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2480]'); insert into test_proxima_be_restart_with_full_stage values(2481, 'name2481', 2491.111, 248100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2481]'); insert into test_proxima_be_restart_with_full_stage values(2482, 'name2482', 2492.111, 248200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2482]'); insert into test_proxima_be_restart_with_full_stage values(2483, 'name2483', 2493.111, 248300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2483]'); insert into test_proxima_be_restart_with_full_stage values(2484, 'name2484', 2494.111, 248400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2484]'); insert into test_proxima_be_restart_with_full_stage values(2485, 'name2485', 2495.111, 248500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2485]'); insert into test_proxima_be_restart_with_full_stage values(2486, 'name2486', 2496.111, 248600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2486]'); insert into test_proxima_be_restart_with_full_stage values(2487, 'name2487', 2497.111, 248700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2487]'); insert into test_proxima_be_restart_with_full_stage values(2488, 'name2488', 2498.111, 248800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2488]'); insert into test_proxima_be_restart_with_full_stage values(2489, 'name2489', 2499.111, 248900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2489]'); insert into test_proxima_be_restart_with_full_stage values(2490, 'name2490', 2500.111, 249000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2490]'); insert into test_proxima_be_restart_with_full_stage values(2491, 'name2491', 2501.111, 249100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2491]'); insert into test_proxima_be_restart_with_full_stage values(2492, 'name2492', 2502.111, 249200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2492]'); insert into test_proxima_be_restart_with_full_stage values(2493, 'name2493', 2503.111, 249300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2493]'); insert into test_proxima_be_restart_with_full_stage values(2494, 'name2494', 2504.111, 249400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2494]'); insert into test_proxima_be_restart_with_full_stage values(2495, 'name2495', 2505.111, 249500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2495]'); insert into test_proxima_be_restart_with_full_stage values(2496, 'name2496', 2506.111, 249600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2496]'); insert into test_proxima_be_restart_with_full_stage values(2497, 'name2497', 2507.111, 249700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2497]'); insert into test_proxima_be_restart_with_full_stage values(2498, 'name2498', 2508.111, 249800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2498]'); insert into test_proxima_be_restart_with_full_stage values(2499, 'name2499', 2509.111, 249900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2499]'); insert into test_proxima_be_restart_with_full_stage values(2500, 'name2500', 2510.111, 250000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2500]'); insert into test_proxima_be_restart_with_full_stage values(2501, 'name2501', 2511.111, 250100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2501]'); insert into test_proxima_be_restart_with_full_stage values(2502, 'name2502', 2512.111, 250200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2502]'); insert into test_proxima_be_restart_with_full_stage values(2503, 'name2503', 2513.111, 250300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2503]'); insert into test_proxima_be_restart_with_full_stage values(2504, 'name2504', 2514.111, 250400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2504]'); insert into test_proxima_be_restart_with_full_stage values(2505, 'name2505', 2515.111, 250500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2505]'); insert into test_proxima_be_restart_with_full_stage values(2506, 'name2506', 2516.111, 250600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2506]'); insert into test_proxima_be_restart_with_full_stage values(2507, 'name2507', 2517.111, 250700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2507]'); insert into test_proxima_be_restart_with_full_stage values(2508, 'name2508', 2518.111, 250800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2508]'); insert into test_proxima_be_restart_with_full_stage values(2509, 'name2509', 2519.111, 250900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2509]'); insert into test_proxima_be_restart_with_full_stage values(2510, 'name2510', 2520.111, 251000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2510]'); insert into test_proxima_be_restart_with_full_stage values(2511, 'name2511', 2521.111, 251100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2511]'); insert into test_proxima_be_restart_with_full_stage values(2512, 'name2512', 2522.111, 251200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2512]'); insert into test_proxima_be_restart_with_full_stage values(2513, 'name2513', 2523.111, 251300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2513]'); insert into test_proxima_be_restart_with_full_stage values(2514, 'name2514', 2524.111, 251400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2514]'); insert into test_proxima_be_restart_with_full_stage values(2515, 'name2515', 2525.111, 251500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2515]'); insert into test_proxima_be_restart_with_full_stage values(2516, 'name2516', 2526.111, 251600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2516]'); insert into test_proxima_be_restart_with_full_stage values(2517, 'name2517', 2527.111, 251700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2517]'); insert into test_proxima_be_restart_with_full_stage values(2518, 'name2518', 2528.111, 251800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2518]'); insert into test_proxima_be_restart_with_full_stage values(2519, 'name2519', 2529.111, 251900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2519]'); insert into test_proxima_be_restart_with_full_stage values(2520, 'name2520', 2530.111, 252000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2520]'); insert into test_proxima_be_restart_with_full_stage values(2521, 'name2521', 2531.111, 252100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2521]'); insert into test_proxima_be_restart_with_full_stage values(2522, 'name2522', 2532.111, 252200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2522]'); insert into test_proxima_be_restart_with_full_stage values(2523, 'name2523', 2533.111, 252300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2523]'); insert into test_proxima_be_restart_with_full_stage values(2524, 'name2524', 2534.111, 252400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2524]'); insert into test_proxima_be_restart_with_full_stage values(2525, 'name2525', 2535.111, 252500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2525]'); insert into test_proxima_be_restart_with_full_stage values(2526, 'name2526', 2536.111, 252600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2526]'); insert into test_proxima_be_restart_with_full_stage values(2527, 'name2527', 2537.111, 252700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2527]'); insert into test_proxima_be_restart_with_full_stage values(2528, 'name2528', 2538.111, 252800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2528]'); insert into test_proxima_be_restart_with_full_stage values(2529, 'name2529', 2539.111, 252900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2529]'); insert into test_proxima_be_restart_with_full_stage values(2530, 'name2530', 2540.111, 253000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2530]'); insert into test_proxima_be_restart_with_full_stage values(2531, 'name2531', 2541.111, 253100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2531]'); insert into test_proxima_be_restart_with_full_stage values(2532, 'name2532', 2542.111, 253200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2532]'); insert into test_proxima_be_restart_with_full_stage values(2533, 'name2533', 2543.111, 253300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2533]'); insert into test_proxima_be_restart_with_full_stage values(2534, 'name2534', 2544.111, 253400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2534]'); insert into test_proxima_be_restart_with_full_stage values(2535, 'name2535', 2545.111, 253500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2535]'); insert into test_proxima_be_restart_with_full_stage values(2536, 'name2536', 2546.111, 253600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2536]'); insert into test_proxima_be_restart_with_full_stage values(2537, 'name2537', 2547.111, 253700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2537]'); insert into test_proxima_be_restart_with_full_stage values(2538, 'name2538', 2548.111, 253800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2538]'); insert into test_proxima_be_restart_with_full_stage values(2539, 'name2539', 2549.111, 253900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2539]'); insert into test_proxima_be_restart_with_full_stage values(2540, 'name2540', 2550.111, 254000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2540]'); insert into test_proxima_be_restart_with_full_stage values(2541, 'name2541', 2551.111, 254100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2541]'); insert into test_proxima_be_restart_with_full_stage values(2542, 'name2542', 2552.111, 254200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2542]'); insert into test_proxima_be_restart_with_full_stage values(2543, 'name2543', 2553.111, 254300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2543]'); insert into test_proxima_be_restart_with_full_stage values(2544, 'name2544', 2554.111, 254400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2544]'); insert into test_proxima_be_restart_with_full_stage values(2545, 'name2545', 2555.111, 254500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2545]'); insert into test_proxima_be_restart_with_full_stage values(2546, 'name2546', 2556.111, 254600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2546]'); insert into test_proxima_be_restart_with_full_stage values(2547, 'name2547', 2557.111, 254700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2547]'); insert into test_proxima_be_restart_with_full_stage values(2548, 'name2548', 2558.111, 254800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2548]'); insert into test_proxima_be_restart_with_full_stage values(2549, 'name2549', 2559.111, 254900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2549]'); insert into test_proxima_be_restart_with_full_stage values(2550, 'name2550', 2560.111, 255000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2550]'); insert into test_proxima_be_restart_with_full_stage values(2551, 'name2551', 2561.111, 255100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2551]'); insert into test_proxima_be_restart_with_full_stage values(2552, 'name2552', 2562.111, 255200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2552]'); insert into test_proxima_be_restart_with_full_stage values(2553, 'name2553', 2563.111, 255300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2553]'); insert into test_proxima_be_restart_with_full_stage values(2554, 'name2554', 2564.111, 255400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2554]'); insert into test_proxima_be_restart_with_full_stage values(2555, 'name2555', 2565.111, 255500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2555]'); insert into test_proxima_be_restart_with_full_stage values(2556, 'name2556', 2566.111, 255600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2556]'); insert into test_proxima_be_restart_with_full_stage values(2557, 'name2557', 2567.111, 255700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2557]'); insert into test_proxima_be_restart_with_full_stage values(2558, 'name2558', 2568.111, 255800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2558]'); insert into test_proxima_be_restart_with_full_stage values(2559, 'name2559', 2569.111, 255900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2559]'); insert into test_proxima_be_restart_with_full_stage values(2560, 'name2560', 2570.111, 256000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2560]'); insert into test_proxima_be_restart_with_full_stage values(2561, 'name2561', 2571.111, 256100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2561]'); insert into test_proxima_be_restart_with_full_stage values(2562, 'name2562', 2572.111, 256200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2562]'); insert into test_proxima_be_restart_with_full_stage values(2563, 'name2563', 2573.111, 256300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2563]'); insert into test_proxima_be_restart_with_full_stage values(2564, 'name2564', 2574.111, 256400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2564]'); insert into test_proxima_be_restart_with_full_stage values(2565, 'name2565', 2575.111, 256500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2565]'); insert into test_proxima_be_restart_with_full_stage values(2566, 'name2566', 2576.111, 256600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2566]'); insert into test_proxima_be_restart_with_full_stage values(2567, 'name2567', 2577.111, 256700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2567]'); insert into test_proxima_be_restart_with_full_stage values(2568, 'name2568', 2578.111, 256800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2568]'); insert into test_proxima_be_restart_with_full_stage values(2569, 'name2569', 2579.111, 256900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2569]'); insert into test_proxima_be_restart_with_full_stage values(2570, 'name2570', 2580.111, 257000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2570]'); insert into test_proxima_be_restart_with_full_stage values(2571, 'name2571', 2581.111, 257100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2571]'); insert into test_proxima_be_restart_with_full_stage values(2572, 'name2572', 2582.111, 257200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2572]'); insert into test_proxima_be_restart_with_full_stage values(2573, 'name2573', 2583.111, 257300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2573]'); insert into test_proxima_be_restart_with_full_stage values(2574, 'name2574', 2584.111, 257400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2574]'); insert into test_proxima_be_restart_with_full_stage values(2575, 'name2575', 2585.111, 257500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2575]'); insert into test_proxima_be_restart_with_full_stage values(2576, 'name2576', 2586.111, 257600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2576]'); insert into test_proxima_be_restart_with_full_stage values(2577, 'name2577', 2587.111, 257700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2577]'); insert into test_proxima_be_restart_with_full_stage values(2578, 'name2578', 2588.111, 257800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2578]'); insert into test_proxima_be_restart_with_full_stage values(2579, 'name2579', 2589.111, 257900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2579]'); insert into test_proxima_be_restart_with_full_stage values(2580, 'name2580', 2590.111, 258000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2580]'); insert into test_proxima_be_restart_with_full_stage values(2581, 'name2581', 2591.111, 258100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2581]'); insert into test_proxima_be_restart_with_full_stage values(2582, 'name2582', 2592.111, 258200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2582]'); insert into test_proxima_be_restart_with_full_stage values(2583, 'name2583', 2593.111, 258300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2583]'); insert into test_proxima_be_restart_with_full_stage values(2584, 'name2584', 2594.111, 258400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2584]'); insert into test_proxima_be_restart_with_full_stage values(2585, 'name2585', 2595.111, 258500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2585]'); insert into test_proxima_be_restart_with_full_stage values(2586, 'name2586', 2596.111, 258600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2586]'); insert into test_proxima_be_restart_with_full_stage values(2587, 'name2587', 2597.111, 258700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2587]'); insert into test_proxima_be_restart_with_full_stage values(2588, 'name2588', 2598.111, 258800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2588]'); insert into test_proxima_be_restart_with_full_stage values(2589, 'name2589', 2599.111, 258900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2589]'); insert into test_proxima_be_restart_with_full_stage values(2590, 'name2590', 2600.111, 259000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2590]'); insert into test_proxima_be_restart_with_full_stage values(2591, 'name2591', 2601.111, 259100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2591]'); insert into test_proxima_be_restart_with_full_stage values(2592, 'name2592', 2602.111, 259200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2592]'); insert into test_proxima_be_restart_with_full_stage values(2593, 'name2593', 2603.111, 259300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2593]'); insert into test_proxima_be_restart_with_full_stage values(2594, 'name2594', 2604.111, 259400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2594]'); insert into test_proxima_be_restart_with_full_stage values(2595, 'name2595', 2605.111, 259500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2595]'); insert into test_proxima_be_restart_with_full_stage values(2596, 'name2596', 2606.111, 259600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2596]'); insert into test_proxima_be_restart_with_full_stage values(2597, 'name2597', 2607.111, 259700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2597]'); insert into test_proxima_be_restart_with_full_stage values(2598, 'name2598', 2608.111, 259800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2598]'); insert into test_proxima_be_restart_with_full_stage values(2599, 'name2599', 2609.111, 259900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2599]'); insert into test_proxima_be_restart_with_full_stage values(2600, 'name2600', 2610.111, 260000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2600]'); insert into test_proxima_be_restart_with_full_stage values(2601, 'name2601', 2611.111, 260100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2601]'); insert into test_proxima_be_restart_with_full_stage values(2602, 'name2602', 2612.111, 260200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2602]'); insert into test_proxima_be_restart_with_full_stage values(2603, 'name2603', 2613.111, 260300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2603]'); insert into test_proxima_be_restart_with_full_stage values(2604, 'name2604', 2614.111, 260400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2604]'); insert into test_proxima_be_restart_with_full_stage values(2605, 'name2605', 2615.111, 260500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2605]'); insert into test_proxima_be_restart_with_full_stage values(2606, 'name2606', 2616.111, 260600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2606]'); insert into test_proxima_be_restart_with_full_stage values(2607, 'name2607', 2617.111, 260700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2607]'); insert into test_proxima_be_restart_with_full_stage values(2608, 'name2608', 2618.111, 260800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2608]'); insert into test_proxima_be_restart_with_full_stage values(2609, 'name2609', 2619.111, 260900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2609]'); insert into test_proxima_be_restart_with_full_stage values(2610, 'name2610', 2620.111, 261000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2610]'); insert into test_proxima_be_restart_with_full_stage values(2611, 'name2611', 2621.111, 261100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2611]'); insert into test_proxima_be_restart_with_full_stage values(2612, 'name2612', 2622.111, 261200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2612]'); insert into test_proxima_be_restart_with_full_stage values(2613, 'name2613', 2623.111, 261300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2613]'); insert into test_proxima_be_restart_with_full_stage values(2614, 'name2614', 2624.111, 261400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2614]'); insert into test_proxima_be_restart_with_full_stage values(2615, 'name2615', 2625.111, 261500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2615]'); insert into test_proxima_be_restart_with_full_stage values(2616, 'name2616', 2626.111, 261600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2616]'); insert into test_proxima_be_restart_with_full_stage values(2617, 'name2617', 2627.111, 261700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2617]'); insert into test_proxima_be_restart_with_full_stage values(2618, 'name2618', 2628.111, 261800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2618]'); insert into test_proxima_be_restart_with_full_stage values(2619, 'name2619', 2629.111, 261900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2619]'); insert into test_proxima_be_restart_with_full_stage values(2620, 'name2620', 2630.111, 262000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2620]'); insert into test_proxima_be_restart_with_full_stage values(2621, 'name2621', 2631.111, 262100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2621]'); insert into test_proxima_be_restart_with_full_stage values(2622, 'name2622', 2632.111, 262200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2622]'); insert into test_proxima_be_restart_with_full_stage values(2623, 'name2623', 2633.111, 262300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2623]'); insert into test_proxima_be_restart_with_full_stage values(2624, 'name2624', 2634.111, 262400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2624]'); insert into test_proxima_be_restart_with_full_stage values(2625, 'name2625', 2635.111, 262500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2625]'); insert into test_proxima_be_restart_with_full_stage values(2626, 'name2626', 2636.111, 262600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2626]'); insert into test_proxima_be_restart_with_full_stage values(2627, 'name2627', 2637.111, 262700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2627]'); insert into test_proxima_be_restart_with_full_stage values(2628, 'name2628', 2638.111, 262800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2628]'); insert into test_proxima_be_restart_with_full_stage values(2629, 'name2629', 2639.111, 262900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2629]'); insert into test_proxima_be_restart_with_full_stage values(2630, 'name2630', 2640.111, 263000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2630]'); insert into test_proxima_be_restart_with_full_stage values(2631, 'name2631', 2641.111, 263100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2631]'); insert into test_proxima_be_restart_with_full_stage values(2632, 'name2632', 2642.111, 263200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2632]'); insert into test_proxima_be_restart_with_full_stage values(2633, 'name2633', 2643.111, 263300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2633]'); insert into test_proxima_be_restart_with_full_stage values(2634, 'name2634', 2644.111, 263400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2634]'); insert into test_proxima_be_restart_with_full_stage values(2635, 'name2635', 2645.111, 263500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2635]'); insert into test_proxima_be_restart_with_full_stage values(2636, 'name2636', 2646.111, 263600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2636]'); insert into test_proxima_be_restart_with_full_stage values(2637, 'name2637', 2647.111, 263700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2637]'); insert into test_proxima_be_restart_with_full_stage values(2638, 'name2638', 2648.111, 263800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2638]'); insert into test_proxima_be_restart_with_full_stage values(2639, 'name2639', 2649.111, 263900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2639]'); insert into test_proxima_be_restart_with_full_stage values(2640, 'name2640', 2650.111, 264000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2640]'); insert into test_proxima_be_restart_with_full_stage values(2641, 'name2641', 2651.111, 264100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2641]'); insert into test_proxima_be_restart_with_full_stage values(2642, 'name2642', 2652.111, 264200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2642]'); insert into test_proxima_be_restart_with_full_stage values(2643, 'name2643', 2653.111, 264300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2643]'); insert into test_proxima_be_restart_with_full_stage values(2644, 'name2644', 2654.111, 264400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2644]'); insert into test_proxima_be_restart_with_full_stage values(2645, 'name2645', 2655.111, 264500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2645]'); insert into test_proxima_be_restart_with_full_stage values(2646, 'name2646', 2656.111, 264600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2646]'); insert into test_proxima_be_restart_with_full_stage values(2647, 'name2647', 2657.111, 264700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2647]'); insert into test_proxima_be_restart_with_full_stage values(2648, 'name2648', 2658.111, 264800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2648]'); insert into test_proxima_be_restart_with_full_stage values(2649, 'name2649', 2659.111, 264900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2649]'); insert into test_proxima_be_restart_with_full_stage values(2650, 'name2650', 2660.111, 265000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2650]'); insert into test_proxima_be_restart_with_full_stage values(2651, 'name2651', 2661.111, 265100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2651]'); insert into test_proxima_be_restart_with_full_stage values(2652, 'name2652', 2662.111, 265200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2652]'); insert into test_proxima_be_restart_with_full_stage values(2653, 'name2653', 2663.111, 265300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2653]'); insert into test_proxima_be_restart_with_full_stage values(2654, 'name2654', 2664.111, 265400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2654]'); insert into test_proxima_be_restart_with_full_stage values(2655, 'name2655', 2665.111, 265500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2655]'); insert into test_proxima_be_restart_with_full_stage values(2656, 'name2656', 2666.111, 265600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2656]'); insert into test_proxima_be_restart_with_full_stage values(2657, 'name2657', 2667.111, 265700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2657]'); insert into test_proxima_be_restart_with_full_stage values(2658, 'name2658', 2668.111, 265800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2658]'); insert into test_proxima_be_restart_with_full_stage values(2659, 'name2659', 2669.111, 265900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2659]'); insert into test_proxima_be_restart_with_full_stage values(2660, 'name2660', 2670.111, 266000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2660]'); insert into test_proxima_be_restart_with_full_stage values(2661, 'name2661', 2671.111, 266100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2661]'); insert into test_proxima_be_restart_with_full_stage values(2662, 'name2662', 2672.111, 266200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2662]'); insert into test_proxima_be_restart_with_full_stage values(2663, 'name2663', 2673.111, 266300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2663]'); insert into test_proxima_be_restart_with_full_stage values(2664, 'name2664', 2674.111, 266400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2664]'); insert into test_proxima_be_restart_with_full_stage values(2665, 'name2665', 2675.111, 266500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2665]'); insert into test_proxima_be_restart_with_full_stage values(2666, 'name2666', 2676.111, 266600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2666]'); insert into test_proxima_be_restart_with_full_stage values(2667, 'name2667', 2677.111, 266700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2667]'); insert into test_proxima_be_restart_with_full_stage values(2668, 'name2668', 2678.111, 266800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2668]'); insert into test_proxima_be_restart_with_full_stage values(2669, 'name2669', 2679.111, 266900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2669]'); insert into test_proxima_be_restart_with_full_stage values(2670, 'name2670', 2680.111, 267000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2670]'); insert into test_proxima_be_restart_with_full_stage values(2671, 'name2671', 2681.111, 267100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2671]'); insert into test_proxima_be_restart_with_full_stage values(2672, 'name2672', 2682.111, 267200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2672]'); insert into test_proxima_be_restart_with_full_stage values(2673, 'name2673', 2683.111, 267300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2673]'); insert into test_proxima_be_restart_with_full_stage values(2674, 'name2674', 2684.111, 267400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2674]'); insert into test_proxima_be_restart_with_full_stage values(2675, 'name2675', 2685.111, 267500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2675]'); insert into test_proxima_be_restart_with_full_stage values(2676, 'name2676', 2686.111, 267600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2676]'); insert into test_proxima_be_restart_with_full_stage values(2677, 'name2677', 2687.111, 267700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2677]'); insert into test_proxima_be_restart_with_full_stage values(2678, 'name2678', 2688.111, 267800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2678]'); insert into test_proxima_be_restart_with_full_stage values(2679, 'name2679', 2689.111, 267900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2679]'); insert into test_proxima_be_restart_with_full_stage values(2680, 'name2680', 2690.111, 268000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2680]'); insert into test_proxima_be_restart_with_full_stage values(2681, 'name2681', 2691.111, 268100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2681]'); insert into test_proxima_be_restart_with_full_stage values(2682, 'name2682', 2692.111, 268200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2682]'); insert into test_proxima_be_restart_with_full_stage values(2683, 'name2683', 2693.111, 268300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2683]'); insert into test_proxima_be_restart_with_full_stage values(2684, 'name2684', 2694.111, 268400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2684]'); insert into test_proxima_be_restart_with_full_stage values(2685, 'name2685', 2695.111, 268500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2685]'); insert into test_proxima_be_restart_with_full_stage values(2686, 'name2686', 2696.111, 268600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2686]'); insert into test_proxima_be_restart_with_full_stage values(2687, 'name2687', 2697.111, 268700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2687]'); insert into test_proxima_be_restart_with_full_stage values(2688, 'name2688', 2698.111, 268800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2688]'); insert into test_proxima_be_restart_with_full_stage values(2689, 'name2689', 2699.111, 268900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2689]'); insert into test_proxima_be_restart_with_full_stage values(2690, 'name2690', 2700.111, 269000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2690]'); insert into test_proxima_be_restart_with_full_stage values(2691, 'name2691', 2701.111, 269100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2691]'); insert into test_proxima_be_restart_with_full_stage values(2692, 'name2692', 2702.111, 269200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2692]'); insert into test_proxima_be_restart_with_full_stage values(2693, 'name2693', 2703.111, 269300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2693]'); insert into test_proxima_be_restart_with_full_stage values(2694, 'name2694', 2704.111, 269400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2694]'); insert into test_proxima_be_restart_with_full_stage values(2695, 'name2695', 2705.111, 269500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2695]'); insert into test_proxima_be_restart_with_full_stage values(2696, 'name2696', 2706.111, 269600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2696]'); insert into test_proxima_be_restart_with_full_stage values(2697, 'name2697', 2707.111, 269700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2697]'); insert into test_proxima_be_restart_with_full_stage values(2698, 'name2698', 2708.111, 269800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2698]'); insert into test_proxima_be_restart_with_full_stage values(2699, 'name2699', 2709.111, 269900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2699]'); insert into test_proxima_be_restart_with_full_stage values(2700, 'name2700', 2710.111, 270000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2700]'); insert into test_proxima_be_restart_with_full_stage values(2701, 'name2701', 2711.111, 270100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2701]'); insert into test_proxima_be_restart_with_full_stage values(2702, 'name2702', 2712.111, 270200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2702]'); insert into test_proxima_be_restart_with_full_stage values(2703, 'name2703', 2713.111, 270300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2703]'); insert into test_proxima_be_restart_with_full_stage values(2704, 'name2704', 2714.111, 270400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2704]'); insert into test_proxima_be_restart_with_full_stage values(2705, 'name2705', 2715.111, 270500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2705]'); insert into test_proxima_be_restart_with_full_stage values(2706, 'name2706', 2716.111, 270600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2706]'); insert into test_proxima_be_restart_with_full_stage values(2707, 'name2707', 2717.111, 270700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2707]'); insert into test_proxima_be_restart_with_full_stage values(2708, 'name2708', 2718.111, 270800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2708]'); insert into test_proxima_be_restart_with_full_stage values(2709, 'name2709', 2719.111, 270900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2709]'); insert into test_proxima_be_restart_with_full_stage values(2710, 'name2710', 2720.111, 271000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2710]'); insert into test_proxima_be_restart_with_full_stage values(2711, 'name2711', 2721.111, 271100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2711]'); insert into test_proxima_be_restart_with_full_stage values(2712, 'name2712', 2722.111, 271200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2712]'); insert into test_proxima_be_restart_with_full_stage values(2713, 'name2713', 2723.111, 271300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2713]'); insert into test_proxima_be_restart_with_full_stage values(2714, 'name2714', 2724.111, 271400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2714]'); insert into test_proxima_be_restart_with_full_stage values(2715, 'name2715', 2725.111, 271500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2715]'); insert into test_proxima_be_restart_with_full_stage values(2716, 'name2716', 2726.111, 271600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2716]'); insert into test_proxima_be_restart_with_full_stage values(2717, 'name2717', 2727.111, 271700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2717]'); insert into test_proxima_be_restart_with_full_stage values(2718, 'name2718', 2728.111, 271800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2718]'); insert into test_proxima_be_restart_with_full_stage values(2719, 'name2719', 2729.111, 271900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2719]'); insert into test_proxima_be_restart_with_full_stage values(2720, 'name2720', 2730.111, 272000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2720]'); insert into test_proxima_be_restart_with_full_stage values(2721, 'name2721', 2731.111, 272100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2721]'); insert into test_proxima_be_restart_with_full_stage values(2722, 'name2722', 2732.111, 272200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2722]'); insert into test_proxima_be_restart_with_full_stage values(2723, 'name2723', 2733.111, 272300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2723]'); insert into test_proxima_be_restart_with_full_stage values(2724, 'name2724', 2734.111, 272400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2724]'); insert into test_proxima_be_restart_with_full_stage values(2725, 'name2725', 2735.111, 272500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2725]'); insert into test_proxima_be_restart_with_full_stage values(2726, 'name2726', 2736.111, 272600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2726]'); insert into test_proxima_be_restart_with_full_stage values(2727, 'name2727', 2737.111, 272700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2727]'); insert into test_proxima_be_restart_with_full_stage values(2728, 'name2728', 2738.111, 272800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2728]'); insert into test_proxima_be_restart_with_full_stage values(2729, 'name2729', 2739.111, 272900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2729]'); insert into test_proxima_be_restart_with_full_stage values(2730, 'name2730', 2740.111, 273000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2730]'); insert into test_proxima_be_restart_with_full_stage values(2731, 'name2731', 2741.111, 273100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2731]'); insert into test_proxima_be_restart_with_full_stage values(2732, 'name2732', 2742.111, 273200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2732]'); insert into test_proxima_be_restart_with_full_stage values(2733, 'name2733', 2743.111, 273300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2733]'); insert into test_proxima_be_restart_with_full_stage values(2734, 'name2734', 2744.111, 273400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2734]'); insert into test_proxima_be_restart_with_full_stage values(2735, 'name2735', 2745.111, 273500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2735]'); insert into test_proxima_be_restart_with_full_stage values(2736, 'name2736', 2746.111, 273600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2736]'); insert into test_proxima_be_restart_with_full_stage values(2737, 'name2737', 2747.111, 273700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2737]'); insert into test_proxima_be_restart_with_full_stage values(2738, 'name2738', 2748.111, 273800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2738]'); insert into test_proxima_be_restart_with_full_stage values(2739, 'name2739', 2749.111, 273900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2739]'); insert into test_proxima_be_restart_with_full_stage values(2740, 'name2740', 2750.111, 274000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2740]'); insert into test_proxima_be_restart_with_full_stage values(2741, 'name2741', 2751.111, 274100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2741]'); insert into test_proxima_be_restart_with_full_stage values(2742, 'name2742', 2752.111, 274200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2742]'); insert into test_proxima_be_restart_with_full_stage values(2743, 'name2743', 2753.111, 274300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2743]'); insert into test_proxima_be_restart_with_full_stage values(2744, 'name2744', 2754.111, 274400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2744]'); insert into test_proxima_be_restart_with_full_stage values(2745, 'name2745', 2755.111, 274500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2745]'); insert into test_proxima_be_restart_with_full_stage values(2746, 'name2746', 2756.111, 274600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2746]'); insert into test_proxima_be_restart_with_full_stage values(2747, 'name2747', 2757.111, 274700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2747]'); insert into test_proxima_be_restart_with_full_stage values(2748, 'name2748', 2758.111, 274800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2748]'); insert into test_proxima_be_restart_with_full_stage values(2749, 'name2749', 2759.111, 274900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2749]'); insert into test_proxima_be_restart_with_full_stage values(2750, 'name2750', 2760.111, 275000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2750]'); insert into test_proxima_be_restart_with_full_stage values(2751, 'name2751', 2761.111, 275100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2751]'); insert into test_proxima_be_restart_with_full_stage values(2752, 'name2752', 2762.111, 275200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2752]'); insert into test_proxima_be_restart_with_full_stage values(2753, 'name2753', 2763.111, 275300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2753]'); insert into test_proxima_be_restart_with_full_stage values(2754, 'name2754', 2764.111, 275400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2754]'); insert into test_proxima_be_restart_with_full_stage values(2755, 'name2755', 2765.111, 275500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2755]'); insert into test_proxima_be_restart_with_full_stage values(2756, 'name2756', 2766.111, 275600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2756]'); insert into test_proxima_be_restart_with_full_stage values(2757, 'name2757', 2767.111, 275700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2757]'); insert into test_proxima_be_restart_with_full_stage values(2758, 'name2758', 2768.111, 275800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2758]'); insert into test_proxima_be_restart_with_full_stage values(2759, 'name2759', 2769.111, 275900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2759]'); insert into test_proxima_be_restart_with_full_stage values(2760, 'name2760', 2770.111, 276000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2760]'); insert into test_proxima_be_restart_with_full_stage values(2761, 'name2761', 2771.111, 276100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2761]'); insert into test_proxima_be_restart_with_full_stage values(2762, 'name2762', 2772.111, 276200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2762]'); insert into test_proxima_be_restart_with_full_stage values(2763, 'name2763', 2773.111, 276300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2763]'); insert into test_proxima_be_restart_with_full_stage values(2764, 'name2764', 2774.111, 276400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2764]'); insert into test_proxima_be_restart_with_full_stage values(2765, 'name2765', 2775.111, 276500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2765]'); insert into test_proxima_be_restart_with_full_stage values(2766, 'name2766', 2776.111, 276600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2766]'); insert into test_proxima_be_restart_with_full_stage values(2767, 'name2767', 2777.111, 276700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2767]'); insert into test_proxima_be_restart_with_full_stage values(2768, 'name2768', 2778.111, 276800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2768]'); insert into test_proxima_be_restart_with_full_stage values(2769, 'name2769', 2779.111, 276900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2769]'); insert into test_proxima_be_restart_with_full_stage values(2770, 'name2770', 2780.111, 277000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2770]'); insert into test_proxima_be_restart_with_full_stage values(2771, 'name2771', 2781.111, 277100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2771]'); insert into test_proxima_be_restart_with_full_stage values(2772, 'name2772', 2782.111, 277200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2772]'); insert into test_proxima_be_restart_with_full_stage values(2773, 'name2773', 2783.111, 277300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2773]'); insert into test_proxima_be_restart_with_full_stage values(2774, 'name2774', 2784.111, 277400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2774]'); insert into test_proxima_be_restart_with_full_stage values(2775, 'name2775', 2785.111, 277500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2775]'); insert into test_proxima_be_restart_with_full_stage values(2776, 'name2776', 2786.111, 277600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2776]'); insert into test_proxima_be_restart_with_full_stage values(2777, 'name2777', 2787.111, 277700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2777]'); insert into test_proxima_be_restart_with_full_stage values(2778, 'name2778', 2788.111, 277800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2778]'); insert into test_proxima_be_restart_with_full_stage values(2779, 'name2779', 2789.111, 277900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2779]'); insert into test_proxima_be_restart_with_full_stage values(2780, 'name2780', 2790.111, 278000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2780]'); insert into test_proxima_be_restart_with_full_stage values(2781, 'name2781', 2791.111, 278100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2781]'); insert into test_proxima_be_restart_with_full_stage values(2782, 'name2782', 2792.111, 278200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2782]'); insert into test_proxima_be_restart_with_full_stage values(2783, 'name2783', 2793.111, 278300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2783]'); insert into test_proxima_be_restart_with_full_stage values(2784, 'name2784', 2794.111, 278400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2784]'); insert into test_proxima_be_restart_with_full_stage values(2785, 'name2785', 2795.111, 278500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2785]'); insert into test_proxima_be_restart_with_full_stage values(2786, 'name2786', 2796.111, 278600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2786]'); insert into test_proxima_be_restart_with_full_stage values(2787, 'name2787', 2797.111, 278700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2787]'); insert into test_proxima_be_restart_with_full_stage values(2788, 'name2788', 2798.111, 278800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2788]'); insert into test_proxima_be_restart_with_full_stage values(2789, 'name2789', 2799.111, 278900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2789]'); insert into test_proxima_be_restart_with_full_stage values(2790, 'name2790', 2800.111, 279000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2790]'); insert into test_proxima_be_restart_with_full_stage values(2791, 'name2791', 2801.111, 279100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2791]'); insert into test_proxima_be_restart_with_full_stage values(2792, 'name2792', 2802.111, 279200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2792]'); insert into test_proxima_be_restart_with_full_stage values(2793, 'name2793', 2803.111, 279300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2793]'); insert into test_proxima_be_restart_with_full_stage values(2794, 'name2794', 2804.111, 279400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2794]'); insert into test_proxima_be_restart_with_full_stage values(2795, 'name2795', 2805.111, 279500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2795]'); insert into test_proxima_be_restart_with_full_stage values(2796, 'name2796', 2806.111, 279600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2796]'); insert into test_proxima_be_restart_with_full_stage values(2797, 'name2797', 2807.111, 279700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2797]'); insert into test_proxima_be_restart_with_full_stage values(2798, 'name2798', 2808.111, 279800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2798]'); insert into test_proxima_be_restart_with_full_stage values(2799, 'name2799', 2809.111, 279900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2799]'); insert into test_proxima_be_restart_with_full_stage values(2800, 'name2800', 2810.111, 280000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2800]'); insert into test_proxima_be_restart_with_full_stage values(2801, 'name2801', 2811.111, 280100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2801]'); insert into test_proxima_be_restart_with_full_stage values(2802, 'name2802', 2812.111, 280200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2802]'); insert into test_proxima_be_restart_with_full_stage values(2803, 'name2803', 2813.111, 280300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2803]'); insert into test_proxima_be_restart_with_full_stage values(2804, 'name2804', 2814.111, 280400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2804]'); insert into test_proxima_be_restart_with_full_stage values(2805, 'name2805', 2815.111, 280500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2805]'); insert into test_proxima_be_restart_with_full_stage values(2806, 'name2806', 2816.111, 280600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2806]'); insert into test_proxima_be_restart_with_full_stage values(2807, 'name2807', 2817.111, 280700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2807]'); insert into test_proxima_be_restart_with_full_stage values(2808, 'name2808', 2818.111, 280800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2808]'); insert into test_proxima_be_restart_with_full_stage values(2809, 'name2809', 2819.111, 280900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2809]'); insert into test_proxima_be_restart_with_full_stage values(2810, 'name2810', 2820.111, 281000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2810]'); insert into test_proxima_be_restart_with_full_stage values(2811, 'name2811', 2821.111, 281100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2811]'); insert into test_proxima_be_restart_with_full_stage values(2812, 'name2812', 2822.111, 281200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2812]'); insert into test_proxima_be_restart_with_full_stage values(2813, 'name2813', 2823.111, 281300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2813]'); insert into test_proxima_be_restart_with_full_stage values(2814, 'name2814', 2824.111, 281400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2814]'); insert into test_proxima_be_restart_with_full_stage values(2815, 'name2815', 2825.111, 281500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2815]'); insert into test_proxima_be_restart_with_full_stage values(2816, 'name2816', 2826.111, 281600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2816]'); insert into test_proxima_be_restart_with_full_stage values(2817, 'name2817', 2827.111, 281700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2817]'); insert into test_proxima_be_restart_with_full_stage values(2818, 'name2818', 2828.111, 281800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2818]'); insert into test_proxima_be_restart_with_full_stage values(2819, 'name2819', 2829.111, 281900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2819]'); insert into test_proxima_be_restart_with_full_stage values(2820, 'name2820', 2830.111, 282000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2820]'); insert into test_proxima_be_restart_with_full_stage values(2821, 'name2821', 2831.111, 282100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2821]'); insert into test_proxima_be_restart_with_full_stage values(2822, 'name2822', 2832.111, 282200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2822]'); insert into test_proxima_be_restart_with_full_stage values(2823, 'name2823', 2833.111, 282300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2823]'); insert into test_proxima_be_restart_with_full_stage values(2824, 'name2824', 2834.111, 282400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2824]'); insert into test_proxima_be_restart_with_full_stage values(2825, 'name2825', 2835.111, 282500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2825]'); insert into test_proxima_be_restart_with_full_stage values(2826, 'name2826', 2836.111, 282600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2826]'); insert into test_proxima_be_restart_with_full_stage values(2827, 'name2827', 2837.111, 282700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2827]'); insert into test_proxima_be_restart_with_full_stage values(2828, 'name2828', 2838.111, 282800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2828]'); insert into test_proxima_be_restart_with_full_stage values(2829, 'name2829', 2839.111, 282900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2829]'); insert into test_proxima_be_restart_with_full_stage values(2830, 'name2830', 2840.111, 283000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2830]'); insert into test_proxima_be_restart_with_full_stage values(2831, 'name2831', 2841.111, 283100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2831]'); insert into test_proxima_be_restart_with_full_stage values(2832, 'name2832', 2842.111, 283200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2832]'); insert into test_proxima_be_restart_with_full_stage values(2833, 'name2833', 2843.111, 283300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2833]'); insert into test_proxima_be_restart_with_full_stage values(2834, 'name2834', 2844.111, 283400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2834]'); insert into test_proxima_be_restart_with_full_stage values(2835, 'name2835', 2845.111, 283500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2835]'); insert into test_proxima_be_restart_with_full_stage values(2836, 'name2836', 2846.111, 283600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2836]'); insert into test_proxima_be_restart_with_full_stage values(2837, 'name2837', 2847.111, 283700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2837]'); insert into test_proxima_be_restart_with_full_stage values(2838, 'name2838', 2848.111, 283800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2838]'); insert into test_proxima_be_restart_with_full_stage values(2839, 'name2839', 2849.111, 283900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2839]'); insert into test_proxima_be_restart_with_full_stage values(2840, 'name2840', 2850.111, 284000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2840]'); insert into test_proxima_be_restart_with_full_stage values(2841, 'name2841', 2851.111, 284100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2841]'); insert into test_proxima_be_restart_with_full_stage values(2842, 'name2842', 2852.111, 284200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2842]'); insert into test_proxima_be_restart_with_full_stage values(2843, 'name2843', 2853.111, 284300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2843]'); insert into test_proxima_be_restart_with_full_stage values(2844, 'name2844', 2854.111, 284400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2844]'); insert into test_proxima_be_restart_with_full_stage values(2845, 'name2845', 2855.111, 284500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2845]'); insert into test_proxima_be_restart_with_full_stage values(2846, 'name2846', 2856.111, 284600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2846]'); insert into test_proxima_be_restart_with_full_stage values(2847, 'name2847', 2857.111, 284700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2847]'); insert into test_proxima_be_restart_with_full_stage values(2848, 'name2848', 2858.111, 284800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2848]'); insert into test_proxima_be_restart_with_full_stage values(2849, 'name2849', 2859.111, 284900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2849]'); insert into test_proxima_be_restart_with_full_stage values(2850, 'name2850', 2860.111, 285000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2850]'); insert into test_proxima_be_restart_with_full_stage values(2851, 'name2851', 2861.111, 285100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2851]'); insert into test_proxima_be_restart_with_full_stage values(2852, 'name2852', 2862.111, 285200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2852]'); insert into test_proxima_be_restart_with_full_stage values(2853, 'name2853', 2863.111, 285300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2853]'); insert into test_proxima_be_restart_with_full_stage values(2854, 'name2854', 2864.111, 285400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2854]'); insert into test_proxima_be_restart_with_full_stage values(2855, 'name2855', 2865.111, 285500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2855]'); insert into test_proxima_be_restart_with_full_stage values(2856, 'name2856', 2866.111, 285600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2856]'); insert into test_proxima_be_restart_with_full_stage values(2857, 'name2857', 2867.111, 285700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2857]'); insert into test_proxima_be_restart_with_full_stage values(2858, 'name2858', 2868.111, 285800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2858]'); insert into test_proxima_be_restart_with_full_stage values(2859, 'name2859', 2869.111, 285900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2859]'); insert into test_proxima_be_restart_with_full_stage values(2860, 'name2860', 2870.111, 286000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2860]'); insert into test_proxima_be_restart_with_full_stage values(2861, 'name2861', 2871.111, 286100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2861]'); insert into test_proxima_be_restart_with_full_stage values(2862, 'name2862', 2872.111, 286200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2862]'); insert into test_proxima_be_restart_with_full_stage values(2863, 'name2863', 2873.111, 286300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2863]'); insert into test_proxima_be_restart_with_full_stage values(2864, 'name2864', 2874.111, 286400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2864]'); insert into test_proxima_be_restart_with_full_stage values(2865, 'name2865', 2875.111, 286500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2865]'); insert into test_proxima_be_restart_with_full_stage values(2866, 'name2866', 2876.111, 286600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2866]'); insert into test_proxima_be_restart_with_full_stage values(2867, 'name2867', 2877.111, 286700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2867]'); insert into test_proxima_be_restart_with_full_stage values(2868, 'name2868', 2878.111, 286800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2868]'); insert into test_proxima_be_restart_with_full_stage values(2869, 'name2869', 2879.111, 286900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2869]'); insert into test_proxima_be_restart_with_full_stage values(2870, 'name2870', 2880.111, 287000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2870]'); insert into test_proxima_be_restart_with_full_stage values(2871, 'name2871', 2881.111, 287100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2871]'); insert into test_proxima_be_restart_with_full_stage values(2872, 'name2872', 2882.111, 287200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2872]'); insert into test_proxima_be_restart_with_full_stage values(2873, 'name2873', 2883.111, 287300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2873]'); insert into test_proxima_be_restart_with_full_stage values(2874, 'name2874', 2884.111, 287400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2874]'); insert into test_proxima_be_restart_with_full_stage values(2875, 'name2875', 2885.111, 287500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2875]'); insert into test_proxima_be_restart_with_full_stage values(2876, 'name2876', 2886.111, 287600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2876]'); insert into test_proxima_be_restart_with_full_stage values(2877, 'name2877', 2887.111, 287700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2877]'); insert into test_proxima_be_restart_with_full_stage values(2878, 'name2878', 2888.111, 287800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2878]'); insert into test_proxima_be_restart_with_full_stage values(2879, 'name2879', 2889.111, 287900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2879]'); insert into test_proxima_be_restart_with_full_stage values(2880, 'name2880', 2890.111, 288000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2880]'); insert into test_proxima_be_restart_with_full_stage values(2881, 'name2881', 2891.111, 288100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2881]'); insert into test_proxima_be_restart_with_full_stage values(2882, 'name2882', 2892.111, 288200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2882]'); insert into test_proxima_be_restart_with_full_stage values(2883, 'name2883', 2893.111, 288300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2883]'); insert into test_proxima_be_restart_with_full_stage values(2884, 'name2884', 2894.111, 288400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2884]'); insert into test_proxima_be_restart_with_full_stage values(2885, 'name2885', 2895.111, 288500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2885]'); insert into test_proxima_be_restart_with_full_stage values(2886, 'name2886', 2896.111, 288600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2886]'); insert into test_proxima_be_restart_with_full_stage values(2887, 'name2887', 2897.111, 288700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2887]'); insert into test_proxima_be_restart_with_full_stage values(2888, 'name2888', 2898.111, 288800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2888]'); insert into test_proxima_be_restart_with_full_stage values(2889, 'name2889', 2899.111, 288900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2889]'); insert into test_proxima_be_restart_with_full_stage values(2890, 'name2890', 2900.111, 289000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2890]'); insert into test_proxima_be_restart_with_full_stage values(2891, 'name2891', 2901.111, 289100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2891]'); insert into test_proxima_be_restart_with_full_stage values(2892, 'name2892', 2902.111, 289200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2892]'); insert into test_proxima_be_restart_with_full_stage values(2893, 'name2893', 2903.111, 289300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2893]'); insert into test_proxima_be_restart_with_full_stage values(2894, 'name2894', 2904.111, 289400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2894]'); insert into test_proxima_be_restart_with_full_stage values(2895, 'name2895', 2905.111, 289500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2895]'); insert into test_proxima_be_restart_with_full_stage values(2896, 'name2896', 2906.111, 289600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2896]'); insert into test_proxima_be_restart_with_full_stage values(2897, 'name2897', 2907.111, 289700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2897]'); insert into test_proxima_be_restart_with_full_stage values(2898, 'name2898', 2908.111, 289800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2898]'); insert into test_proxima_be_restart_with_full_stage values(2899, 'name2899', 2909.111, 289900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2899]'); insert into test_proxima_be_restart_with_full_stage values(2900, 'name2900', 2910.111, 290000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2900]'); insert into test_proxima_be_restart_with_full_stage values(2901, 'name2901', 2911.111, 290100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2901]'); insert into test_proxima_be_restart_with_full_stage values(2902, 'name2902', 2912.111, 290200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2902]'); insert into test_proxima_be_restart_with_full_stage values(2903, 'name2903', 2913.111, 290300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2903]'); insert into test_proxima_be_restart_with_full_stage values(2904, 'name2904', 2914.111, 290400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2904]'); insert into test_proxima_be_restart_with_full_stage values(2905, 'name2905', 2915.111, 290500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2905]'); insert into test_proxima_be_restart_with_full_stage values(2906, 'name2906', 2916.111, 290600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2906]'); insert into test_proxima_be_restart_with_full_stage values(2907, 'name2907', 2917.111, 290700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2907]'); insert into test_proxima_be_restart_with_full_stage values(2908, 'name2908', 2918.111, 290800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2908]'); insert into test_proxima_be_restart_with_full_stage values(2909, 'name2909', 2919.111, 290900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2909]'); insert into test_proxima_be_restart_with_full_stage values(2910, 'name2910', 2920.111, 291000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2910]'); insert into test_proxima_be_restart_with_full_stage values(2911, 'name2911', 2921.111, 291100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2911]'); insert into test_proxima_be_restart_with_full_stage values(2912, 'name2912', 2922.111, 291200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2912]'); insert into test_proxima_be_restart_with_full_stage values(2913, 'name2913', 2923.111, 291300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2913]'); insert into test_proxima_be_restart_with_full_stage values(2914, 'name2914', 2924.111, 291400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2914]'); insert into test_proxima_be_restart_with_full_stage values(2915, 'name2915', 2925.111, 291500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2915]'); insert into test_proxima_be_restart_with_full_stage values(2916, 'name2916', 2926.111, 291600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2916]'); insert into test_proxima_be_restart_with_full_stage values(2917, 'name2917', 2927.111, 291700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2917]'); insert into test_proxima_be_restart_with_full_stage values(2918, 'name2918', 2928.111, 291800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2918]'); insert into test_proxima_be_restart_with_full_stage values(2919, 'name2919', 2929.111, 291900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2919]'); insert into test_proxima_be_restart_with_full_stage values(2920, 'name2920', 2930.111, 292000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2920]'); insert into test_proxima_be_restart_with_full_stage values(2921, 'name2921', 2931.111, 292100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2921]'); insert into test_proxima_be_restart_with_full_stage values(2922, 'name2922', 2932.111, 292200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2922]'); insert into test_proxima_be_restart_with_full_stage values(2923, 'name2923', 2933.111, 292300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2923]'); insert into test_proxima_be_restart_with_full_stage values(2924, 'name2924', 2934.111, 292400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2924]'); insert into test_proxima_be_restart_with_full_stage values(2925, 'name2925', 2935.111, 292500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2925]'); insert into test_proxima_be_restart_with_full_stage values(2926, 'name2926', 2936.111, 292600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2926]'); insert into test_proxima_be_restart_with_full_stage values(2927, 'name2927', 2937.111, 292700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2927]'); insert into test_proxima_be_restart_with_full_stage values(2928, 'name2928', 2938.111, 292800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2928]'); insert into test_proxima_be_restart_with_full_stage values(2929, 'name2929', 2939.111, 292900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2929]'); insert into test_proxima_be_restart_with_full_stage values(2930, 'name2930', 2940.111, 293000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2930]'); insert into test_proxima_be_restart_with_full_stage values(2931, 'name2931', 2941.111, 293100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2931]'); insert into test_proxima_be_restart_with_full_stage values(2932, 'name2932', 2942.111, 293200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2932]'); insert into test_proxima_be_restart_with_full_stage values(2933, 'name2933', 2943.111, 293300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2933]'); insert into test_proxima_be_restart_with_full_stage values(2934, 'name2934', 2944.111, 293400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2934]'); insert into test_proxima_be_restart_with_full_stage values(2935, 'name2935', 2945.111, 293500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2935]'); insert into test_proxima_be_restart_with_full_stage values(2936, 'name2936', 2946.111, 293600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2936]'); insert into test_proxima_be_restart_with_full_stage values(2937, 'name2937', 2947.111, 293700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2937]'); insert into test_proxima_be_restart_with_full_stage values(2938, 'name2938', 2948.111, 293800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2938]'); insert into test_proxima_be_restart_with_full_stage values(2939, 'name2939', 2949.111, 293900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2939]'); insert into test_proxima_be_restart_with_full_stage values(2940, 'name2940', 2950.111, 294000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2940]'); insert into test_proxima_be_restart_with_full_stage values(2941, 'name2941', 2951.111, 294100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2941]'); insert into test_proxima_be_restart_with_full_stage values(2942, 'name2942', 2952.111, 294200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2942]'); insert into test_proxima_be_restart_with_full_stage values(2943, 'name2943', 2953.111, 294300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2943]'); insert into test_proxima_be_restart_with_full_stage values(2944, 'name2944', 2954.111, 294400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2944]'); insert into test_proxima_be_restart_with_full_stage values(2945, 'name2945', 2955.111, 294500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2945]'); insert into test_proxima_be_restart_with_full_stage values(2946, 'name2946', 2956.111, 294600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2946]'); insert into test_proxima_be_restart_with_full_stage values(2947, 'name2947', 2957.111, 294700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2947]'); insert into test_proxima_be_restart_with_full_stage values(2948, 'name2948', 2958.111, 294800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2948]'); insert into test_proxima_be_restart_with_full_stage values(2949, 'name2949', 2959.111, 294900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2949]'); insert into test_proxima_be_restart_with_full_stage values(2950, 'name2950', 2960.111, 295000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2950]'); insert into test_proxima_be_restart_with_full_stage values(2951, 'name2951', 2961.111, 295100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2951]'); insert into test_proxima_be_restart_with_full_stage values(2952, 'name2952', 2962.111, 295200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2952]'); insert into test_proxima_be_restart_with_full_stage values(2953, 'name2953', 2963.111, 295300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2953]'); insert into test_proxima_be_restart_with_full_stage values(2954, 'name2954', 2964.111, 295400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2954]'); insert into test_proxima_be_restart_with_full_stage values(2955, 'name2955', 2965.111, 295500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2955]'); insert into test_proxima_be_restart_with_full_stage values(2956, 'name2956', 2966.111, 295600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2956]'); insert into test_proxima_be_restart_with_full_stage values(2957, 'name2957', 2967.111, 295700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2957]'); insert into test_proxima_be_restart_with_full_stage values(2958, 'name2958', 2968.111, 295800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2958]'); insert into test_proxima_be_restart_with_full_stage values(2959, 'name2959', 2969.111, 295900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2959]'); insert into test_proxima_be_restart_with_full_stage values(2960, 'name2960', 2970.111, 296000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2960]'); insert into test_proxima_be_restart_with_full_stage values(2961, 'name2961', 2971.111, 296100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2961]'); insert into test_proxima_be_restart_with_full_stage values(2962, 'name2962', 2972.111, 296200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2962]'); insert into test_proxima_be_restart_with_full_stage values(2963, 'name2963', 2973.111, 296300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2963]'); insert into test_proxima_be_restart_with_full_stage values(2964, 'name2964', 2974.111, 296400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2964]'); insert into test_proxima_be_restart_with_full_stage values(2965, 'name2965', 2975.111, 296500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2965]'); insert into test_proxima_be_restart_with_full_stage values(2966, 'name2966', 2976.111, 296600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2966]'); insert into test_proxima_be_restart_with_full_stage values(2967, 'name2967', 2977.111, 296700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2967]'); insert into test_proxima_be_restart_with_full_stage values(2968, 'name2968', 2978.111, 296800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2968]'); insert into test_proxima_be_restart_with_full_stage values(2969, 'name2969', 2979.111, 296900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2969]'); insert into test_proxima_be_restart_with_full_stage values(2970, 'name2970', 2980.111, 297000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2970]'); insert into test_proxima_be_restart_with_full_stage values(2971, 'name2971', 2981.111, 297100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2971]'); insert into test_proxima_be_restart_with_full_stage values(2972, 'name2972', 2982.111, 297200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2972]'); insert into test_proxima_be_restart_with_full_stage values(2973, 'name2973', 2983.111, 297300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2973]'); insert into test_proxima_be_restart_with_full_stage values(2974, 'name2974', 2984.111, 297400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2974]'); insert into test_proxima_be_restart_with_full_stage values(2975, 'name2975', 2985.111, 297500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2975]'); insert into test_proxima_be_restart_with_full_stage values(2976, 'name2976', 2986.111, 297600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2976]'); insert into test_proxima_be_restart_with_full_stage values(2977, 'name2977', 2987.111, 297700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2977]'); insert into test_proxima_be_restart_with_full_stage values(2978, 'name2978', 2988.111, 297800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2978]'); insert into test_proxima_be_restart_with_full_stage values(2979, 'name2979', 2989.111, 297900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2979]'); insert into test_proxima_be_restart_with_full_stage values(2980, 'name2980', 2990.111, 298000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2980]'); insert into test_proxima_be_restart_with_full_stage values(2981, 'name2981', 2991.111, 298100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2981]'); insert into test_proxima_be_restart_with_full_stage values(2982, 'name2982', 2992.111, 298200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2982]'); insert into test_proxima_be_restart_with_full_stage values(2983, 'name2983', 2993.111, 298300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2983]'); insert into test_proxima_be_restart_with_full_stage values(2984, 'name2984', 2994.111, 298400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2984]'); insert into test_proxima_be_restart_with_full_stage values(2985, 'name2985', 2995.111, 298500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2985]'); insert into test_proxima_be_restart_with_full_stage values(2986, 'name2986', 2996.111, 298600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2986]'); insert into test_proxima_be_restart_with_full_stage values(2987, 'name2987', 2997.111, 298700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2987]'); insert into test_proxima_be_restart_with_full_stage values(2988, 'name2988', 2998.111, 298800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2988]'); insert into test_proxima_be_restart_with_full_stage values(2989, 'name2989', 2999.111, 298900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2989]'); insert into test_proxima_be_restart_with_full_stage values(2990, 'name2990', 3000.111, 299000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2990]'); insert into test_proxima_be_restart_with_full_stage values(2991, 'name2991', 3001.111, 299100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2991]'); insert into test_proxima_be_restart_with_full_stage values(2992, 'name2992', 3002.111, 299200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2992]'); insert into test_proxima_be_restart_with_full_stage values(2993, 'name2993', 3003.111, 299300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2993]'); insert into test_proxima_be_restart_with_full_stage values(2994, 'name2994', 3004.111, 299400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2994]'); insert into test_proxima_be_restart_with_full_stage values(2995, 'name2995', 3005.111, 299500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2995]'); insert into test_proxima_be_restart_with_full_stage values(2996, 'name2996', 3006.111, 299600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2996]'); insert into test_proxima_be_restart_with_full_stage values(2997, 'name2997', 3007.111, 299700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2997]'); insert into test_proxima_be_restart_with_full_stage values(2998, 'name2998', 3008.111, 299800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2998]'); insert into test_proxima_be_restart_with_full_stage values(2999, 'name2999', 3009.111, 299900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2999]'); insert into test_proxima_be_restart_with_full_stage values(3000, 'name3000', 3010.111, 300000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3000]'); insert into test_proxima_be_restart_with_full_stage values(3001, 'name3001', 3011.111, 300100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3001]'); insert into test_proxima_be_restart_with_full_stage values(3002, 'name3002', 3012.111, 300200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3002]'); insert into test_proxima_be_restart_with_full_stage values(3003, 'name3003', 3013.111, 300300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3003]'); insert into test_proxima_be_restart_with_full_stage values(3004, 'name3004', 3014.111, 300400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3004]'); insert into test_proxima_be_restart_with_full_stage values(3005, 'name3005', 3015.111, 300500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3005]'); insert into test_proxima_be_restart_with_full_stage values(3006, 'name3006', 3016.111, 300600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3006]'); insert into test_proxima_be_restart_with_full_stage values(3007, 'name3007', 3017.111, 300700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3007]'); insert into test_proxima_be_restart_with_full_stage values(3008, 'name3008', 3018.111, 300800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3008]'); insert into test_proxima_be_restart_with_full_stage values(3009, 'name3009', 3019.111, 300900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3009]'); insert into test_proxima_be_restart_with_full_stage values(3010, 'name3010', 3020.111, 301000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3010]'); insert into test_proxima_be_restart_with_full_stage values(3011, 'name3011', 3021.111, 301100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3011]'); insert into test_proxima_be_restart_with_full_stage values(3012, 'name3012', 3022.111, 301200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3012]'); insert into test_proxima_be_restart_with_full_stage values(3013, 'name3013', 3023.111, 301300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3013]'); insert into test_proxima_be_restart_with_full_stage values(3014, 'name3014', 3024.111, 301400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3014]'); insert into test_proxima_be_restart_with_full_stage values(3015, 'name3015', 3025.111, 301500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3015]'); insert into test_proxima_be_restart_with_full_stage values(3016, 'name3016', 3026.111, 301600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3016]'); insert into test_proxima_be_restart_with_full_stage values(3017, 'name3017', 3027.111, 301700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3017]'); insert into test_proxima_be_restart_with_full_stage values(3018, 'name3018', 3028.111, 301800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3018]'); insert into test_proxima_be_restart_with_full_stage values(3019, 'name3019', 3029.111, 301900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3019]'); insert into test_proxima_be_restart_with_full_stage values(3020, 'name3020', 3030.111, 302000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3020]'); insert into test_proxima_be_restart_with_full_stage values(3021, 'name3021', 3031.111, 302100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3021]'); insert into test_proxima_be_restart_with_full_stage values(3022, 'name3022', 3032.111, 302200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3022]'); insert into test_proxima_be_restart_with_full_stage values(3023, 'name3023', 3033.111, 302300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3023]'); insert into test_proxima_be_restart_with_full_stage values(3024, 'name3024', 3034.111, 302400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3024]'); insert into test_proxima_be_restart_with_full_stage values(3025, 'name3025', 3035.111, 302500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3025]'); insert into test_proxima_be_restart_with_full_stage values(3026, 'name3026', 3036.111, 302600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3026]'); insert into test_proxima_be_restart_with_full_stage values(3027, 'name3027', 3037.111, 302700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3027]'); insert into test_proxima_be_restart_with_full_stage values(3028, 'name3028', 3038.111, 302800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3028]'); insert into test_proxima_be_restart_with_full_stage values(3029, 'name3029', 3039.111, 302900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3029]'); insert into test_proxima_be_restart_with_full_stage values(3030, 'name3030', 3040.111, 303000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3030]'); insert into test_proxima_be_restart_with_full_stage values(3031, 'name3031', 3041.111, 303100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3031]'); insert into test_proxima_be_restart_with_full_stage values(3032, 'name3032', 3042.111, 303200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3032]'); insert into test_proxima_be_restart_with_full_stage values(3033, 'name3033', 3043.111, 303300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3033]'); insert into test_proxima_be_restart_with_full_stage values(3034, 'name3034', 3044.111, 303400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3034]'); insert into test_proxima_be_restart_with_full_stage values(3035, 'name3035', 3045.111, 303500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3035]'); insert into test_proxima_be_restart_with_full_stage values(3036, 'name3036', 3046.111, 303600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3036]'); insert into test_proxima_be_restart_with_full_stage values(3037, 'name3037', 3047.111, 303700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3037]'); insert into test_proxima_be_restart_with_full_stage values(3038, 'name3038', 3048.111, 303800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3038]'); insert into test_proxima_be_restart_with_full_stage values(3039, 'name3039', 3049.111, 303900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3039]'); insert into test_proxima_be_restart_with_full_stage values(3040, 'name3040', 3050.111, 304000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3040]'); insert into test_proxima_be_restart_with_full_stage values(3041, 'name3041', 3051.111, 304100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3041]'); insert into test_proxima_be_restart_with_full_stage values(3042, 'name3042', 3052.111, 304200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3042]'); insert into test_proxima_be_restart_with_full_stage values(3043, 'name3043', 3053.111, 304300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3043]'); insert into test_proxima_be_restart_with_full_stage values(3044, 'name3044', 3054.111, 304400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3044]'); insert into test_proxima_be_restart_with_full_stage values(3045, 'name3045', 3055.111, 304500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3045]'); insert into test_proxima_be_restart_with_full_stage values(3046, 'name3046', 3056.111, 304600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3046]'); insert into test_proxima_be_restart_with_full_stage values(3047, 'name3047', 3057.111, 304700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3047]'); insert into test_proxima_be_restart_with_full_stage values(3048, 'name3048', 3058.111, 304800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3048]'); insert into test_proxima_be_restart_with_full_stage values(3049, 'name3049', 3059.111, 304900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3049]'); insert into test_proxima_be_restart_with_full_stage values(3050, 'name3050', 3060.111, 305000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3050]'); insert into test_proxima_be_restart_with_full_stage values(3051, 'name3051', 3061.111, 305100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3051]'); insert into test_proxima_be_restart_with_full_stage values(3052, 'name3052', 3062.111, 305200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3052]'); insert into test_proxima_be_restart_with_full_stage values(3053, 'name3053', 3063.111, 305300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3053]'); insert into test_proxima_be_restart_with_full_stage values(3054, 'name3054', 3064.111, 305400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3054]'); insert into test_proxima_be_restart_with_full_stage values(3055, 'name3055', 3065.111, 305500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3055]'); insert into test_proxima_be_restart_with_full_stage values(3056, 'name3056', 3066.111, 305600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3056]'); insert into test_proxima_be_restart_with_full_stage values(3057, 'name3057', 3067.111, 305700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3057]'); insert into test_proxima_be_restart_with_full_stage values(3058, 'name3058', 3068.111, 305800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3058]'); insert into test_proxima_be_restart_with_full_stage values(3059, 'name3059', 3069.111, 305900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3059]'); insert into test_proxima_be_restart_with_full_stage values(3060, 'name3060', 3070.111, 306000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3060]'); insert into test_proxima_be_restart_with_full_stage values(3061, 'name3061', 3071.111, 306100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3061]'); insert into test_proxima_be_restart_with_full_stage values(3062, 'name3062', 3072.111, 306200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3062]'); insert into test_proxima_be_restart_with_full_stage values(3063, 'name3063', 3073.111, 306300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3063]'); insert into test_proxima_be_restart_with_full_stage values(3064, 'name3064', 3074.111, 306400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3064]'); insert into test_proxima_be_restart_with_full_stage values(3065, 'name3065', 3075.111, 306500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3065]'); insert into test_proxima_be_restart_with_full_stage values(3066, 'name3066', 3076.111, 306600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3066]'); insert into test_proxima_be_restart_with_full_stage values(3067, 'name3067', 3077.111, 306700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3067]'); insert into test_proxima_be_restart_with_full_stage values(3068, 'name3068', 3078.111, 306800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3068]'); insert into test_proxima_be_restart_with_full_stage values(3069, 'name3069', 3079.111, 306900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3069]'); insert into test_proxima_be_restart_with_full_stage values(3070, 'name3070', 3080.111, 307000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3070]'); insert into test_proxima_be_restart_with_full_stage values(3071, 'name3071', 3081.111, 307100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3071]'); insert into test_proxima_be_restart_with_full_stage values(3072, 'name3072', 3082.111, 307200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3072]'); insert into test_proxima_be_restart_with_full_stage values(3073, 'name3073', 3083.111, 307300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3073]'); insert into test_proxima_be_restart_with_full_stage values(3074, 'name3074', 3084.111, 307400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3074]'); insert into test_proxima_be_restart_with_full_stage values(3075, 'name3075', 3085.111, 307500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3075]'); insert into test_proxima_be_restart_with_full_stage values(3076, 'name3076', 3086.111, 307600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3076]'); insert into test_proxima_be_restart_with_full_stage values(3077, 'name3077', 3087.111, 307700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3077]'); insert into test_proxima_be_restart_with_full_stage values(3078, 'name3078', 3088.111, 307800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3078]'); insert into test_proxima_be_restart_with_full_stage values(3079, 'name3079', 3089.111, 307900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3079]'); insert into test_proxima_be_restart_with_full_stage values(3080, 'name3080', 3090.111, 308000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3080]'); insert into test_proxima_be_restart_with_full_stage values(3081, 'name3081', 3091.111, 308100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3081]'); insert into test_proxima_be_restart_with_full_stage values(3082, 'name3082', 3092.111, 308200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3082]'); insert into test_proxima_be_restart_with_full_stage values(3083, 'name3083', 3093.111, 308300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3083]'); insert into test_proxima_be_restart_with_full_stage values(3084, 'name3084', 3094.111, 308400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3084]'); insert into test_proxima_be_restart_with_full_stage values(3085, 'name3085', 3095.111, 308500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3085]'); insert into test_proxima_be_restart_with_full_stage values(3086, 'name3086', 3096.111, 308600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3086]'); insert into test_proxima_be_restart_with_full_stage values(3087, 'name3087', 3097.111, 308700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3087]'); insert into test_proxima_be_restart_with_full_stage values(3088, 'name3088', 3098.111, 308800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3088]'); insert into test_proxima_be_restart_with_full_stage values(3089, 'name3089', 3099.111, 308900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3089]'); insert into test_proxima_be_restart_with_full_stage values(3090, 'name3090', 3100.111, 309000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3090]'); insert into test_proxima_be_restart_with_full_stage values(3091, 'name3091', 3101.111, 309100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3091]'); insert into test_proxima_be_restart_with_full_stage values(3092, 'name3092', 3102.111, 309200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3092]'); insert into test_proxima_be_restart_with_full_stage values(3093, 'name3093', 3103.111, 309300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3093]'); insert into test_proxima_be_restart_with_full_stage values(3094, 'name3094', 3104.111, 309400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3094]'); insert into test_proxima_be_restart_with_full_stage values(3095, 'name3095', 3105.111, 309500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3095]'); insert into test_proxima_be_restart_with_full_stage values(3096, 'name3096', 3106.111, 309600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3096]'); insert into test_proxima_be_restart_with_full_stage values(3097, 'name3097', 3107.111, 309700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3097]'); insert into test_proxima_be_restart_with_full_stage values(3098, 'name3098', 3108.111, 309800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3098]'); insert into test_proxima_be_restart_with_full_stage values(3099, 'name3099', 3109.111, 309900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3099]'); insert into test_proxima_be_restart_with_full_stage values(3100, 'name3100', 3110.111, 310000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3100]'); insert into test_proxima_be_restart_with_full_stage values(3101, 'name3101', 3111.111, 310100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3101]'); insert into test_proxima_be_restart_with_full_stage values(3102, 'name3102', 3112.111, 310200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3102]'); insert into test_proxima_be_restart_with_full_stage values(3103, 'name3103', 3113.111, 310300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3103]'); insert into test_proxima_be_restart_with_full_stage values(3104, 'name3104', 3114.111, 310400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3104]'); insert into test_proxima_be_restart_with_full_stage values(3105, 'name3105', 3115.111, 310500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3105]'); insert into test_proxima_be_restart_with_full_stage values(3106, 'name3106', 3116.111, 310600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3106]'); insert into test_proxima_be_restart_with_full_stage values(3107, 'name3107', 3117.111, 310700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3107]'); insert into test_proxima_be_restart_with_full_stage values(3108, 'name3108', 3118.111, 310800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3108]'); insert into test_proxima_be_restart_with_full_stage values(3109, 'name3109', 3119.111, 310900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3109]'); insert into test_proxima_be_restart_with_full_stage values(3110, 'name3110', 3120.111, 311000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3110]'); insert into test_proxima_be_restart_with_full_stage values(3111, 'name3111', 3121.111, 311100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3111]'); insert into test_proxima_be_restart_with_full_stage values(3112, 'name3112', 3122.111, 311200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3112]'); insert into test_proxima_be_restart_with_full_stage values(3113, 'name3113', 3123.111, 311300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3113]'); insert into test_proxima_be_restart_with_full_stage values(3114, 'name3114', 3124.111, 311400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3114]'); insert into test_proxima_be_restart_with_full_stage values(3115, 'name3115', 3125.111, 311500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3115]'); insert into test_proxima_be_restart_with_full_stage values(3116, 'name3116', 3126.111, 311600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3116]'); insert into test_proxima_be_restart_with_full_stage values(3117, 'name3117', 3127.111, 311700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3117]'); insert into test_proxima_be_restart_with_full_stage values(3118, 'name3118', 3128.111, 311800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3118]'); insert into test_proxima_be_restart_with_full_stage values(3119, 'name3119', 3129.111, 311900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3119]'); insert into test_proxima_be_restart_with_full_stage values(3120, 'name3120', 3130.111, 312000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3120]'); insert into test_proxima_be_restart_with_full_stage values(3121, 'name3121', 3131.111, 312100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3121]'); insert into test_proxima_be_restart_with_full_stage values(3122, 'name3122', 3132.111, 312200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3122]'); insert into test_proxima_be_restart_with_full_stage values(3123, 'name3123', 3133.111, 312300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3123]'); insert into test_proxima_be_restart_with_full_stage values(3124, 'name3124', 3134.111, 312400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3124]'); insert into test_proxima_be_restart_with_full_stage values(3125, 'name3125', 3135.111, 312500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3125]'); insert into test_proxima_be_restart_with_full_stage values(3126, 'name3126', 3136.111, 312600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3126]'); insert into test_proxima_be_restart_with_full_stage values(3127, 'name3127', 3137.111, 312700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3127]'); insert into test_proxima_be_restart_with_full_stage values(3128, 'name3128', 3138.111, 312800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3128]'); insert into test_proxima_be_restart_with_full_stage values(3129, 'name3129', 3139.111, 312900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3129]'); insert into test_proxima_be_restart_with_full_stage values(3130, 'name3130', 3140.111, 313000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3130]'); insert into test_proxima_be_restart_with_full_stage values(3131, 'name3131', 3141.111, 313100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3131]'); insert into test_proxima_be_restart_with_full_stage values(3132, 'name3132', 3142.111, 313200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3132]'); insert into test_proxima_be_restart_with_full_stage values(3133, 'name3133', 3143.111, 313300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3133]'); insert into test_proxima_be_restart_with_full_stage values(3134, 'name3134', 3144.111, 313400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3134]'); insert into test_proxima_be_restart_with_full_stage values(3135, 'name3135', 3145.111, 313500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3135]'); insert into test_proxima_be_restart_with_full_stage values(3136, 'name3136', 3146.111, 313600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3136]'); insert into test_proxima_be_restart_with_full_stage values(3137, 'name3137', 3147.111, 313700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3137]'); insert into test_proxima_be_restart_with_full_stage values(3138, 'name3138', 3148.111, 313800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3138]'); insert into test_proxima_be_restart_with_full_stage values(3139, 'name3139', 3149.111, 313900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3139]'); insert into test_proxima_be_restart_with_full_stage values(3140, 'name3140', 3150.111, 314000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3140]'); insert into test_proxima_be_restart_with_full_stage values(3141, 'name3141', 3151.111, 314100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3141]'); insert into test_proxima_be_restart_with_full_stage values(3142, 'name3142', 3152.111, 314200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3142]'); insert into test_proxima_be_restart_with_full_stage values(3143, 'name3143', 3153.111, 314300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3143]'); insert into test_proxima_be_restart_with_full_stage values(3144, 'name3144', 3154.111, 314400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3144]'); insert into test_proxima_be_restart_with_full_stage values(3145, 'name3145', 3155.111, 314500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3145]'); insert into test_proxima_be_restart_with_full_stage values(3146, 'name3146', 3156.111, 314600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3146]'); insert into test_proxima_be_restart_with_full_stage values(3147, 'name3147', 3157.111, 314700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3147]'); insert into test_proxima_be_restart_with_full_stage values(3148, 'name3148', 3158.111, 314800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3148]'); insert into test_proxima_be_restart_with_full_stage values(3149, 'name3149', 3159.111, 314900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3149]'); insert into test_proxima_be_restart_with_full_stage values(3150, 'name3150', 3160.111, 315000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3150]'); insert into test_proxima_be_restart_with_full_stage values(3151, 'name3151', 3161.111, 315100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3151]'); insert into test_proxima_be_restart_with_full_stage values(3152, 'name3152', 3162.111, 315200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3152]'); insert into test_proxima_be_restart_with_full_stage values(3153, 'name3153', 3163.111, 315300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3153]'); insert into test_proxima_be_restart_with_full_stage values(3154, 'name3154', 3164.111, 315400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3154]'); insert into test_proxima_be_restart_with_full_stage values(3155, 'name3155', 3165.111, 315500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3155]'); insert into test_proxima_be_restart_with_full_stage values(3156, 'name3156', 3166.111, 315600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3156]'); insert into test_proxima_be_restart_with_full_stage values(3157, 'name3157', 3167.111, 315700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3157]'); insert into test_proxima_be_restart_with_full_stage values(3158, 'name3158', 3168.111, 315800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3158]'); insert into test_proxima_be_restart_with_full_stage values(3159, 'name3159', 3169.111, 315900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3159]'); insert into test_proxima_be_restart_with_full_stage values(3160, 'name3160', 3170.111, 316000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3160]'); insert into test_proxima_be_restart_with_full_stage values(3161, 'name3161', 3171.111, 316100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3161]'); insert into test_proxima_be_restart_with_full_stage values(3162, 'name3162', 3172.111, 316200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3162]'); insert into test_proxima_be_restart_with_full_stage values(3163, 'name3163', 3173.111, 316300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3163]'); insert into test_proxima_be_restart_with_full_stage values(3164, 'name3164', 3174.111, 316400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3164]'); insert into test_proxima_be_restart_with_full_stage values(3165, 'name3165', 3175.111, 316500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3165]'); insert into test_proxima_be_restart_with_full_stage values(3166, 'name3166', 3176.111, 316600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3166]'); insert into test_proxima_be_restart_with_full_stage values(3167, 'name3167', 3177.111, 316700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3167]'); insert into test_proxima_be_restart_with_full_stage values(3168, 'name3168', 3178.111, 316800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3168]'); insert into test_proxima_be_restart_with_full_stage values(3169, 'name3169', 3179.111, 316900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3169]'); insert into test_proxima_be_restart_with_full_stage values(3170, 'name3170', 3180.111, 317000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3170]'); insert into test_proxima_be_restart_with_full_stage values(3171, 'name3171', 3181.111, 317100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3171]'); insert into test_proxima_be_restart_with_full_stage values(3172, 'name3172', 3182.111, 317200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3172]'); insert into test_proxima_be_restart_with_full_stage values(3173, 'name3173', 3183.111, 317300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3173]'); insert into test_proxima_be_restart_with_full_stage values(3174, 'name3174', 3184.111, 317400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3174]'); insert into test_proxima_be_restart_with_full_stage values(3175, 'name3175', 3185.111, 317500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3175]'); insert into test_proxima_be_restart_with_full_stage values(3176, 'name3176', 3186.111, 317600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3176]'); insert into test_proxima_be_restart_with_full_stage values(3177, 'name3177', 3187.111, 317700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3177]'); insert into test_proxima_be_restart_with_full_stage values(3178, 'name3178', 3188.111, 317800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3178]'); insert into test_proxima_be_restart_with_full_stage values(3179, 'name3179', 3189.111, 317900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3179]'); insert into test_proxima_be_restart_with_full_stage values(3180, 'name3180', 3190.111, 318000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3180]'); insert into test_proxima_be_restart_with_full_stage values(3181, 'name3181', 3191.111, 318100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3181]'); insert into test_proxima_be_restart_with_full_stage values(3182, 'name3182', 3192.111, 318200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3182]'); insert into test_proxima_be_restart_with_full_stage values(3183, 'name3183', 3193.111, 318300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3183]'); insert into test_proxima_be_restart_with_full_stage values(3184, 'name3184', 3194.111, 318400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3184]'); insert into test_proxima_be_restart_with_full_stage values(3185, 'name3185', 3195.111, 318500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3185]'); insert into test_proxima_be_restart_with_full_stage values(3186, 'name3186', 3196.111, 318600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3186]'); insert into test_proxima_be_restart_with_full_stage values(3187, 'name3187', 3197.111, 318700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3187]'); insert into test_proxima_be_restart_with_full_stage values(3188, 'name3188', 3198.111, 318800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3188]'); insert into test_proxima_be_restart_with_full_stage values(3189, 'name3189', 3199.111, 318900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3189]'); insert into test_proxima_be_restart_with_full_stage values(3190, 'name3190', 3200.111, 319000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3190]'); insert into test_proxima_be_restart_with_full_stage values(3191, 'name3191', 3201.111, 319100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3191]'); insert into test_proxima_be_restart_with_full_stage values(3192, 'name3192', 3202.111, 319200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3192]'); insert into test_proxima_be_restart_with_full_stage values(3193, 'name3193', 3203.111, 319300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3193]'); insert into test_proxima_be_restart_with_full_stage values(3194, 'name3194', 3204.111, 319400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3194]'); insert into test_proxima_be_restart_with_full_stage values(3195, 'name3195', 3205.111, 319500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3195]'); insert into test_proxima_be_restart_with_full_stage values(3196, 'name3196', 3206.111, 319600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3196]'); insert into test_proxima_be_restart_with_full_stage values(3197, 'name3197', 3207.111, 319700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3197]'); insert into test_proxima_be_restart_with_full_stage values(3198, 'name3198', 3208.111, 319800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3198]'); insert into test_proxima_be_restart_with_full_stage values(3199, 'name3199', 3209.111, 319900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3199]'); insert into test_proxima_be_restart_with_full_stage values(3200, 'name3200', 3210.111, 320000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3200]'); insert into test_proxima_be_restart_with_full_stage values(3201, 'name3201', 3211.111, 320100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3201]'); insert into test_proxima_be_restart_with_full_stage values(3202, 'name3202', 3212.111, 320200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3202]'); insert into test_proxima_be_restart_with_full_stage values(3203, 'name3203', 3213.111, 320300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3203]'); insert into test_proxima_be_restart_with_full_stage values(3204, 'name3204', 3214.111, 320400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3204]'); insert into test_proxima_be_restart_with_full_stage values(3205, 'name3205', 3215.111, 320500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3205]'); insert into test_proxima_be_restart_with_full_stage values(3206, 'name3206', 3216.111, 320600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3206]'); insert into test_proxima_be_restart_with_full_stage values(3207, 'name3207', 3217.111, 320700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3207]'); insert into test_proxima_be_restart_with_full_stage values(3208, 'name3208', 3218.111, 320800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3208]'); insert into test_proxima_be_restart_with_full_stage values(3209, 'name3209', 3219.111, 320900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3209]'); insert into test_proxima_be_restart_with_full_stage values(3210, 'name3210', 3220.111, 321000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3210]'); insert into test_proxima_be_restart_with_full_stage values(3211, 'name3211', 3221.111, 321100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3211]'); insert into test_proxima_be_restart_with_full_stage values(3212, 'name3212', 3222.111, 321200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3212]'); insert into test_proxima_be_restart_with_full_stage values(3213, 'name3213', 3223.111, 321300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3213]'); insert into test_proxima_be_restart_with_full_stage values(3214, 'name3214', 3224.111, 321400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3214]'); insert into test_proxima_be_restart_with_full_stage values(3215, 'name3215', 3225.111, 321500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3215]'); insert into test_proxima_be_restart_with_full_stage values(3216, 'name3216', 3226.111, 321600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3216]'); insert into test_proxima_be_restart_with_full_stage values(3217, 'name3217', 3227.111, 321700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3217]'); insert into test_proxima_be_restart_with_full_stage values(3218, 'name3218', 3228.111, 321800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3218]'); insert into test_proxima_be_restart_with_full_stage values(3219, 'name3219', 3229.111, 321900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3219]'); insert into test_proxima_be_restart_with_full_stage values(3220, 'name3220', 3230.111, 322000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3220]'); insert into test_proxima_be_restart_with_full_stage values(3221, 'name3221', 3231.111, 322100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3221]'); insert into test_proxima_be_restart_with_full_stage values(3222, 'name3222', 3232.111, 322200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3222]'); insert into test_proxima_be_restart_with_full_stage values(3223, 'name3223', 3233.111, 322300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3223]'); insert into test_proxima_be_restart_with_full_stage values(3224, 'name3224', 3234.111, 322400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3224]'); insert into test_proxima_be_restart_with_full_stage values(3225, 'name3225', 3235.111, 322500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3225]'); insert into test_proxima_be_restart_with_full_stage values(3226, 'name3226', 3236.111, 322600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3226]'); insert into test_proxima_be_restart_with_full_stage values(3227, 'name3227', 3237.111, 322700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3227]'); insert into test_proxima_be_restart_with_full_stage values(3228, 'name3228', 3238.111, 322800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3228]'); insert into test_proxima_be_restart_with_full_stage values(3229, 'name3229', 3239.111, 322900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3229]'); insert into test_proxima_be_restart_with_full_stage values(3230, 'name3230', 3240.111, 323000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3230]'); insert into test_proxima_be_restart_with_full_stage values(3231, 'name3231', 3241.111, 323100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3231]'); insert into test_proxima_be_restart_with_full_stage values(3232, 'name3232', 3242.111, 323200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3232]'); insert into test_proxima_be_restart_with_full_stage values(3233, 'name3233', 3243.111, 323300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3233]'); insert into test_proxima_be_restart_with_full_stage values(3234, 'name3234', 3244.111, 323400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3234]'); insert into test_proxima_be_restart_with_full_stage values(3235, 'name3235', 3245.111, 323500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3235]'); insert into test_proxima_be_restart_with_full_stage values(3236, 'name3236', 3246.111, 323600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3236]'); insert into test_proxima_be_restart_with_full_stage values(3237, 'name3237', 3247.111, 323700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3237]'); insert into test_proxima_be_restart_with_full_stage values(3238, 'name3238', 3248.111, 323800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3238]'); insert into test_proxima_be_restart_with_full_stage values(3239, 'name3239', 3249.111, 323900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3239]'); insert into test_proxima_be_restart_with_full_stage values(3240, 'name3240', 3250.111, 324000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3240]'); insert into test_proxima_be_restart_with_full_stage values(3241, 'name3241', 3251.111, 324100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3241]'); insert into test_proxima_be_restart_with_full_stage values(3242, 'name3242', 3252.111, 324200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3242]'); insert into test_proxima_be_restart_with_full_stage values(3243, 'name3243', 3253.111, 324300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3243]'); insert into test_proxima_be_restart_with_full_stage values(3244, 'name3244', 3254.111, 324400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3244]'); insert into test_proxima_be_restart_with_full_stage values(3245, 'name3245', 3255.111, 324500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3245]'); insert into test_proxima_be_restart_with_full_stage values(3246, 'name3246', 3256.111, 324600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3246]'); insert into test_proxima_be_restart_with_full_stage values(3247, 'name3247', 3257.111, 324700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3247]'); insert into test_proxima_be_restart_with_full_stage values(3248, 'name3248', 3258.111, 324800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3248]'); insert into test_proxima_be_restart_with_full_stage values(3249, 'name3249', 3259.111, 324900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3249]'); insert into test_proxima_be_restart_with_full_stage values(3250, 'name3250', 3260.111, 325000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3250]'); insert into test_proxima_be_restart_with_full_stage values(3251, 'name3251', 3261.111, 325100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3251]'); insert into test_proxima_be_restart_with_full_stage values(3252, 'name3252', 3262.111, 325200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3252]'); insert into test_proxima_be_restart_with_full_stage values(3253, 'name3253', 3263.111, 325300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3253]'); insert into test_proxima_be_restart_with_full_stage values(3254, 'name3254', 3264.111, 325400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3254]'); insert into test_proxima_be_restart_with_full_stage values(3255, 'name3255', 3265.111, 325500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3255]'); insert into test_proxima_be_restart_with_full_stage values(3256, 'name3256', 3266.111, 325600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3256]'); insert into test_proxima_be_restart_with_full_stage values(3257, 'name3257', 3267.111, 325700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3257]'); insert into test_proxima_be_restart_with_full_stage values(3258, 'name3258', 3268.111, 325800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3258]'); insert into test_proxima_be_restart_with_full_stage values(3259, 'name3259', 3269.111, 325900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3259]'); insert into test_proxima_be_restart_with_full_stage values(3260, 'name3260', 3270.111, 326000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3260]'); insert into test_proxima_be_restart_with_full_stage values(3261, 'name3261', 3271.111, 326100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3261]'); insert into test_proxima_be_restart_with_full_stage values(3262, 'name3262', 3272.111, 326200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3262]'); insert into test_proxima_be_restart_with_full_stage values(3263, 'name3263', 3273.111, 326300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3263]'); insert into test_proxima_be_restart_with_full_stage values(3264, 'name3264', 3274.111, 326400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3264]'); insert into test_proxima_be_restart_with_full_stage values(3265, 'name3265', 3275.111, 326500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3265]'); insert into test_proxima_be_restart_with_full_stage values(3266, 'name3266', 3276.111, 326600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3266]'); insert into test_proxima_be_restart_with_full_stage values(3267, 'name3267', 3277.111, 326700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3267]'); insert into test_proxima_be_restart_with_full_stage values(3268, 'name3268', 3278.111, 326800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3268]'); insert into test_proxima_be_restart_with_full_stage values(3269, 'name3269', 3279.111, 326900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3269]'); insert into test_proxima_be_restart_with_full_stage values(3270, 'name3270', 3280.111, 327000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3270]'); insert into test_proxima_be_restart_with_full_stage values(3271, 'name3271', 3281.111, 327100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3271]'); insert into test_proxima_be_restart_with_full_stage values(3272, 'name3272', 3282.111, 327200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3272]'); insert into test_proxima_be_restart_with_full_stage values(3273, 'name3273', 3283.111, 327300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3273]'); insert into test_proxima_be_restart_with_full_stage values(3274, 'name3274', 3284.111, 327400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3274]'); insert into test_proxima_be_restart_with_full_stage values(3275, 'name3275', 3285.111, 327500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3275]'); insert into test_proxima_be_restart_with_full_stage values(3276, 'name3276', 3286.111, 327600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3276]'); insert into test_proxima_be_restart_with_full_stage values(3277, 'name3277', 3287.111, 327700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3277]'); insert into test_proxima_be_restart_with_full_stage values(3278, 'name3278', 3288.111, 327800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3278]'); insert into test_proxima_be_restart_with_full_stage values(3279, 'name3279', 3289.111, 327900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3279]'); insert into test_proxima_be_restart_with_full_stage values(3280, 'name3280', 3290.111, 328000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3280]'); insert into test_proxima_be_restart_with_full_stage values(3281, 'name3281', 3291.111, 328100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3281]'); insert into test_proxima_be_restart_with_full_stage values(3282, 'name3282', 3292.111, 328200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3282]'); insert into test_proxima_be_restart_with_full_stage values(3283, 'name3283', 3293.111, 328300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3283]'); insert into test_proxima_be_restart_with_full_stage values(3284, 'name3284', 3294.111, 328400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3284]'); insert into test_proxima_be_restart_with_full_stage values(3285, 'name3285', 3295.111, 328500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3285]'); insert into test_proxima_be_restart_with_full_stage values(3286, 'name3286', 3296.111, 328600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3286]'); insert into test_proxima_be_restart_with_full_stage values(3287, 'name3287', 3297.111, 328700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3287]'); insert into test_proxima_be_restart_with_full_stage values(3288, 'name3288', 3298.111, 328800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3288]'); insert into test_proxima_be_restart_with_full_stage values(3289, 'name3289', 3299.111, 328900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3289]'); insert into test_proxima_be_restart_with_full_stage values(3290, 'name3290', 3300.111, 329000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3290]'); insert into test_proxima_be_restart_with_full_stage values(3291, 'name3291', 3301.111, 329100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3291]'); insert into test_proxima_be_restart_with_full_stage values(3292, 'name3292', 3302.111, 329200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3292]'); insert into test_proxima_be_restart_with_full_stage values(3293, 'name3293', 3303.111, 329300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3293]'); insert into test_proxima_be_restart_with_full_stage values(3294, 'name3294', 3304.111, 329400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3294]'); insert into test_proxima_be_restart_with_full_stage values(3295, 'name3295', 3305.111, 329500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3295]'); insert into test_proxima_be_restart_with_full_stage values(3296, 'name3296', 3306.111, 329600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3296]'); insert into test_proxima_be_restart_with_full_stage values(3297, 'name3297', 3307.111, 329700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3297]'); insert into test_proxima_be_restart_with_full_stage values(3298, 'name3298', 3308.111, 329800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3298]'); insert into test_proxima_be_restart_with_full_stage values(3299, 'name3299', 3309.111, 329900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3299]'); insert into test_proxima_be_restart_with_full_stage values(3300, 'name3300', 3310.111, 330000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3300]'); insert into test_proxima_be_restart_with_full_stage values(3301, 'name3301', 3311.111, 330100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3301]'); insert into test_proxima_be_restart_with_full_stage values(3302, 'name3302', 3312.111, 330200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3302]'); insert into test_proxima_be_restart_with_full_stage values(3303, 'name3303', 3313.111, 330300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3303]'); insert into test_proxima_be_restart_with_full_stage values(3304, 'name3304', 3314.111, 330400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3304]'); insert into test_proxima_be_restart_with_full_stage values(3305, 'name3305', 3315.111, 330500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3305]'); insert into test_proxima_be_restart_with_full_stage values(3306, 'name3306', 3316.111, 330600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3306]'); insert into test_proxima_be_restart_with_full_stage values(3307, 'name3307', 3317.111, 330700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3307]'); insert into test_proxima_be_restart_with_full_stage values(3308, 'name3308', 3318.111, 330800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3308]'); insert into test_proxima_be_restart_with_full_stage values(3309, 'name3309', 3319.111, 330900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3309]'); insert into test_proxima_be_restart_with_full_stage values(3310, 'name3310', 3320.111, 331000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3310]'); insert into test_proxima_be_restart_with_full_stage values(3311, 'name3311', 3321.111, 331100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3311]'); insert into test_proxima_be_restart_with_full_stage values(3312, 'name3312', 3322.111, 331200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3312]'); insert into test_proxima_be_restart_with_full_stage values(3313, 'name3313', 3323.111, 331300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3313]'); insert into test_proxima_be_restart_with_full_stage values(3314, 'name3314', 3324.111, 331400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3314]'); insert into test_proxima_be_restart_with_full_stage values(3315, 'name3315', 3325.111, 331500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3315]'); insert into test_proxima_be_restart_with_full_stage values(3316, 'name3316', 3326.111, 331600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3316]'); insert into test_proxima_be_restart_with_full_stage values(3317, 'name3317', 3327.111, 331700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3317]'); insert into test_proxima_be_restart_with_full_stage values(3318, 'name3318', 3328.111, 331800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3318]'); insert into test_proxima_be_restart_with_full_stage values(3319, 'name3319', 3329.111, 331900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3319]'); insert into test_proxima_be_restart_with_full_stage values(3320, 'name3320', 3330.111, 332000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3320]'); insert into test_proxima_be_restart_with_full_stage values(3321, 'name3321', 3331.111, 332100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3321]'); insert into test_proxima_be_restart_with_full_stage values(3322, 'name3322', 3332.111, 332200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3322]'); insert into test_proxima_be_restart_with_full_stage values(3323, 'name3323', 3333.111, 332300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3323]'); insert into test_proxima_be_restart_with_full_stage values(3324, 'name3324', 3334.111, 332400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3324]'); insert into test_proxima_be_restart_with_full_stage values(3325, 'name3325', 3335.111, 332500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3325]'); insert into test_proxima_be_restart_with_full_stage values(3326, 'name3326', 3336.111, 332600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3326]'); insert into test_proxima_be_restart_with_full_stage values(3327, 'name3327', 3337.111, 332700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3327]'); insert into test_proxima_be_restart_with_full_stage values(3328, 'name3328', 3338.111, 332800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3328]'); insert into test_proxima_be_restart_with_full_stage values(3329, 'name3329', 3339.111, 332900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3329]'); insert into test_proxima_be_restart_with_full_stage values(3330, 'name3330', 3340.111, 333000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3330]'); insert into test_proxima_be_restart_with_full_stage values(3331, 'name3331', 3341.111, 333100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3331]'); insert into test_proxima_be_restart_with_full_stage values(3332, 'name3332', 3342.111, 333200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3332]'); insert into test_proxima_be_restart_with_full_stage values(3333, 'name3333', 3343.111, 333300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3333]'); insert into test_proxima_be_restart_with_full_stage values(3334, 'name3334', 3344.111, 333400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3334]'); insert into test_proxima_be_restart_with_full_stage values(3335, 'name3335', 3345.111, 333500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3335]'); insert into test_proxima_be_restart_with_full_stage values(3336, 'name3336', 3346.111, 333600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3336]'); insert into test_proxima_be_restart_with_full_stage values(3337, 'name3337', 3347.111, 333700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3337]'); insert into test_proxima_be_restart_with_full_stage values(3338, 'name3338', 3348.111, 333800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3338]'); insert into test_proxima_be_restart_with_full_stage values(3339, 'name3339', 3349.111, 333900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3339]'); insert into test_proxima_be_restart_with_full_stage values(3340, 'name3340', 3350.111, 334000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3340]'); insert into test_proxima_be_restart_with_full_stage values(3341, 'name3341', 3351.111, 334100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3341]'); insert into test_proxima_be_restart_with_full_stage values(3342, 'name3342', 3352.111, 334200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3342]'); insert into test_proxima_be_restart_with_full_stage values(3343, 'name3343', 3353.111, 334300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3343]'); insert into test_proxima_be_restart_with_full_stage values(3344, 'name3344', 3354.111, 334400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3344]'); insert into test_proxima_be_restart_with_full_stage values(3345, 'name3345', 3355.111, 334500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3345]'); insert into test_proxima_be_restart_with_full_stage values(3346, 'name3346', 3356.111, 334600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3346]'); insert into test_proxima_be_restart_with_full_stage values(3347, 'name3347', 3357.111, 334700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3347]'); insert into test_proxima_be_restart_with_full_stage values(3348, 'name3348', 3358.111, 334800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3348]'); insert into test_proxima_be_restart_with_full_stage values(3349, 'name3349', 3359.111, 334900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3349]'); insert into test_proxima_be_restart_with_full_stage values(3350, 'name3350', 3360.111, 335000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3350]'); insert into test_proxima_be_restart_with_full_stage values(3351, 'name3351', 3361.111, 335100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3351]'); insert into test_proxima_be_restart_with_full_stage values(3352, 'name3352', 3362.111, 335200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3352]'); insert into test_proxima_be_restart_with_full_stage values(3353, 'name3353', 3363.111, 335300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3353]'); insert into test_proxima_be_restart_with_full_stage values(3354, 'name3354', 3364.111, 335400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3354]'); insert into test_proxima_be_restart_with_full_stage values(3355, 'name3355', 3365.111, 335500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3355]'); insert into test_proxima_be_restart_with_full_stage values(3356, 'name3356', 3366.111, 335600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3356]'); insert into test_proxima_be_restart_with_full_stage values(3357, 'name3357', 3367.111, 335700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3357]'); insert into test_proxima_be_restart_with_full_stage values(3358, 'name3358', 3368.111, 335800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3358]'); insert into test_proxima_be_restart_with_full_stage values(3359, 'name3359', 3369.111, 335900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3359]'); insert into test_proxima_be_restart_with_full_stage values(3360, 'name3360', 3370.111, 336000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3360]'); insert into test_proxima_be_restart_with_full_stage values(3361, 'name3361', 3371.111, 336100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3361]'); insert into test_proxima_be_restart_with_full_stage values(3362, 'name3362', 3372.111, 336200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3362]'); insert into test_proxima_be_restart_with_full_stage values(3363, 'name3363', 3373.111, 336300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3363]'); insert into test_proxima_be_restart_with_full_stage values(3364, 'name3364', 3374.111, 336400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3364]'); insert into test_proxima_be_restart_with_full_stage values(3365, 'name3365', 3375.111, 336500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3365]'); insert into test_proxima_be_restart_with_full_stage values(3366, 'name3366', 3376.111, 336600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3366]'); insert into test_proxima_be_restart_with_full_stage values(3367, 'name3367', 3377.111, 336700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3367]'); insert into test_proxima_be_restart_with_full_stage values(3368, 'name3368', 3378.111, 336800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3368]'); insert into test_proxima_be_restart_with_full_stage values(3369, 'name3369', 3379.111, 336900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3369]'); insert into test_proxima_be_restart_with_full_stage values(3370, 'name3370', 3380.111, 337000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3370]'); insert into test_proxima_be_restart_with_full_stage values(3371, 'name3371', 3381.111, 337100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3371]'); insert into test_proxima_be_restart_with_full_stage values(3372, 'name3372', 3382.111, 337200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3372]'); insert into test_proxima_be_restart_with_full_stage values(3373, 'name3373', 3383.111, 337300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3373]'); insert into test_proxima_be_restart_with_full_stage values(3374, 'name3374', 3384.111, 337400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3374]'); insert into test_proxima_be_restart_with_full_stage values(3375, 'name3375', 3385.111, 337500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3375]'); insert into test_proxima_be_restart_with_full_stage values(3376, 'name3376', 3386.111, 337600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3376]'); insert into test_proxima_be_restart_with_full_stage values(3377, 'name3377', 3387.111, 337700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3377]'); insert into test_proxima_be_restart_with_full_stage values(3378, 'name3378', 3388.111, 337800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3378]'); insert into test_proxima_be_restart_with_full_stage values(3379, 'name3379', 3389.111, 337900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3379]'); insert into test_proxima_be_restart_with_full_stage values(3380, 'name3380', 3390.111, 338000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3380]'); insert into test_proxima_be_restart_with_full_stage values(3381, 'name3381', 3391.111, 338100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3381]'); insert into test_proxima_be_restart_with_full_stage values(3382, 'name3382', 3392.111, 338200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3382]'); insert into test_proxima_be_restart_with_full_stage values(3383, 'name3383', 3393.111, 338300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3383]'); insert into test_proxima_be_restart_with_full_stage values(3384, 'name3384', 3394.111, 338400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3384]'); insert into test_proxima_be_restart_with_full_stage values(3385, 'name3385', 3395.111, 338500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3385]'); insert into test_proxima_be_restart_with_full_stage values(3386, 'name3386', 3396.111, 338600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3386]'); insert into test_proxima_be_restart_with_full_stage values(3387, 'name3387', 3397.111, 338700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3387]'); insert into test_proxima_be_restart_with_full_stage values(3388, 'name3388', 3398.111, 338800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3388]'); insert into test_proxima_be_restart_with_full_stage values(3389, 'name3389', 3399.111, 338900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3389]'); insert into test_proxima_be_restart_with_full_stage values(3390, 'name3390', 3400.111, 339000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3390]'); insert into test_proxima_be_restart_with_full_stage values(3391, 'name3391', 3401.111, 339100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3391]'); insert into test_proxima_be_restart_with_full_stage values(3392, 'name3392', 3402.111, 339200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3392]'); insert into test_proxima_be_restart_with_full_stage values(3393, 'name3393', 3403.111, 339300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3393]'); insert into test_proxima_be_restart_with_full_stage values(3394, 'name3394', 3404.111, 339400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3394]'); insert into test_proxima_be_restart_with_full_stage values(3395, 'name3395', 3405.111, 339500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3395]'); insert into test_proxima_be_restart_with_full_stage values(3396, 'name3396', 3406.111, 339600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3396]'); insert into test_proxima_be_restart_with_full_stage values(3397, 'name3397', 3407.111, 339700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3397]'); insert into test_proxima_be_restart_with_full_stage values(3398, 'name3398', 3408.111, 339800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3398]'); insert into test_proxima_be_restart_with_full_stage values(3399, 'name3399', 3409.111, 339900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3399]'); insert into test_proxima_be_restart_with_full_stage values(3400, 'name3400', 3410.111, 340000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3400]'); insert into test_proxima_be_restart_with_full_stage values(3401, 'name3401', 3411.111, 340100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3401]'); insert into test_proxima_be_restart_with_full_stage values(3402, 'name3402', 3412.111, 340200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3402]'); insert into test_proxima_be_restart_with_full_stage values(3403, 'name3403', 3413.111, 340300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3403]'); insert into test_proxima_be_restart_with_full_stage values(3404, 'name3404', 3414.111, 340400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3404]'); insert into test_proxima_be_restart_with_full_stage values(3405, 'name3405', 3415.111, 340500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3405]'); insert into test_proxima_be_restart_with_full_stage values(3406, 'name3406', 3416.111, 340600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3406]'); insert into test_proxima_be_restart_with_full_stage values(3407, 'name3407', 3417.111, 340700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3407]'); insert into test_proxima_be_restart_with_full_stage values(3408, 'name3408', 3418.111, 340800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3408]'); insert into test_proxima_be_restart_with_full_stage values(3409, 'name3409', 3419.111, 340900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3409]'); insert into test_proxima_be_restart_with_full_stage values(3410, 'name3410', 3420.111, 341000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3410]'); insert into test_proxima_be_restart_with_full_stage values(3411, 'name3411', 3421.111, 341100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3411]'); insert into test_proxima_be_restart_with_full_stage values(3412, 'name3412', 3422.111, 341200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3412]'); insert into test_proxima_be_restart_with_full_stage values(3413, 'name3413', 3423.111, 341300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3413]'); insert into test_proxima_be_restart_with_full_stage values(3414, 'name3414', 3424.111, 341400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3414]'); insert into test_proxima_be_restart_with_full_stage values(3415, 'name3415', 3425.111, 341500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3415]'); insert into test_proxima_be_restart_with_full_stage values(3416, 'name3416', 3426.111, 341600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3416]'); insert into test_proxima_be_restart_with_full_stage values(3417, 'name3417', 3427.111, 341700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3417]'); insert into test_proxima_be_restart_with_full_stage values(3418, 'name3418', 3428.111, 341800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3418]'); insert into test_proxima_be_restart_with_full_stage values(3419, 'name3419', 3429.111, 341900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3419]'); insert into test_proxima_be_restart_with_full_stage values(3420, 'name3420', 3430.111, 342000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3420]'); insert into test_proxima_be_restart_with_full_stage values(3421, 'name3421', 3431.111, 342100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3421]'); insert into test_proxima_be_restart_with_full_stage values(3422, 'name3422', 3432.111, 342200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3422]'); insert into test_proxima_be_restart_with_full_stage values(3423, 'name3423', 3433.111, 342300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3423]'); insert into test_proxima_be_restart_with_full_stage values(3424, 'name3424', 3434.111, 342400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3424]'); insert into test_proxima_be_restart_with_full_stage values(3425, 'name3425', 3435.111, 342500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3425]'); insert into test_proxima_be_restart_with_full_stage values(3426, 'name3426', 3436.111, 342600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3426]'); insert into test_proxima_be_restart_with_full_stage values(3427, 'name3427', 3437.111, 342700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3427]'); insert into test_proxima_be_restart_with_full_stage values(3428, 'name3428', 3438.111, 342800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3428]'); insert into test_proxima_be_restart_with_full_stage values(3429, 'name3429', 3439.111, 342900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3429]'); insert into test_proxima_be_restart_with_full_stage values(3430, 'name3430', 3440.111, 343000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3430]'); insert into test_proxima_be_restart_with_full_stage values(3431, 'name3431', 3441.111, 343100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3431]'); insert into test_proxima_be_restart_with_full_stage values(3432, 'name3432', 3442.111, 343200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3432]'); insert into test_proxima_be_restart_with_full_stage values(3433, 'name3433', 3443.111, 343300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3433]'); insert into test_proxima_be_restart_with_full_stage values(3434, 'name3434', 3444.111, 343400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3434]'); insert into test_proxima_be_restart_with_full_stage values(3435, 'name3435', 3445.111, 343500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3435]'); insert into test_proxima_be_restart_with_full_stage values(3436, 'name3436', 3446.111, 343600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3436]'); insert into test_proxima_be_restart_with_full_stage values(3437, 'name3437', 3447.111, 343700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3437]'); insert into test_proxima_be_restart_with_full_stage values(3438, 'name3438', 3448.111, 343800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3438]'); insert into test_proxima_be_restart_with_full_stage values(3439, 'name3439', 3449.111, 343900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3439]'); insert into test_proxima_be_restart_with_full_stage values(3440, 'name3440', 3450.111, 344000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3440]'); insert into test_proxima_be_restart_with_full_stage values(3441, 'name3441', 3451.111, 344100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3441]'); insert into test_proxima_be_restart_with_full_stage values(3442, 'name3442', 3452.111, 344200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3442]'); insert into test_proxima_be_restart_with_full_stage values(3443, 'name3443', 3453.111, 344300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3443]'); insert into test_proxima_be_restart_with_full_stage values(3444, 'name3444', 3454.111, 344400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3444]'); insert into test_proxima_be_restart_with_full_stage values(3445, 'name3445', 3455.111, 344500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3445]'); insert into test_proxima_be_restart_with_full_stage values(3446, 'name3446', 3456.111, 344600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3446]'); insert into test_proxima_be_restart_with_full_stage values(3447, 'name3447', 3457.111, 344700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3447]'); insert into test_proxima_be_restart_with_full_stage values(3448, 'name3448', 3458.111, 344800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3448]'); insert into test_proxima_be_restart_with_full_stage values(3449, 'name3449', 3459.111, 344900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3449]'); insert into test_proxima_be_restart_with_full_stage values(3450, 'name3450', 3460.111, 345000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3450]'); insert into test_proxima_be_restart_with_full_stage values(3451, 'name3451', 3461.111, 345100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3451]'); insert into test_proxima_be_restart_with_full_stage values(3452, 'name3452', 3462.111, 345200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3452]'); insert into test_proxima_be_restart_with_full_stage values(3453, 'name3453', 3463.111, 345300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3453]'); insert into test_proxima_be_restart_with_full_stage values(3454, 'name3454', 3464.111, 345400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3454]'); insert into test_proxima_be_restart_with_full_stage values(3455, 'name3455', 3465.111, 345500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3455]'); insert into test_proxima_be_restart_with_full_stage values(3456, 'name3456', 3466.111, 345600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3456]'); insert into test_proxima_be_restart_with_full_stage values(3457, 'name3457', 3467.111, 345700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3457]'); insert into test_proxima_be_restart_with_full_stage values(3458, 'name3458', 3468.111, 345800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3458]'); insert into test_proxima_be_restart_with_full_stage values(3459, 'name3459', 3469.111, 345900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3459]'); insert into test_proxima_be_restart_with_full_stage values(3460, 'name3460', 3470.111, 346000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3460]'); insert into test_proxima_be_restart_with_full_stage values(3461, 'name3461', 3471.111, 346100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3461]'); insert into test_proxima_be_restart_with_full_stage values(3462, 'name3462', 3472.111, 346200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3462]'); insert into test_proxima_be_restart_with_full_stage values(3463, 'name3463', 3473.111, 346300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3463]'); insert into test_proxima_be_restart_with_full_stage values(3464, 'name3464', 3474.111, 346400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3464]'); insert into test_proxima_be_restart_with_full_stage values(3465, 'name3465', 3475.111, 346500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3465]'); insert into test_proxima_be_restart_with_full_stage values(3466, 'name3466', 3476.111, 346600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3466]'); insert into test_proxima_be_restart_with_full_stage values(3467, 'name3467', 3477.111, 346700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3467]'); insert into test_proxima_be_restart_with_full_stage values(3468, 'name3468', 3478.111, 346800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3468]'); insert into test_proxima_be_restart_with_full_stage values(3469, 'name3469', 3479.111, 346900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3469]'); insert into test_proxima_be_restart_with_full_stage values(3470, 'name3470', 3480.111, 347000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3470]'); insert into test_proxima_be_restart_with_full_stage values(3471, 'name3471', 3481.111, 347100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3471]'); insert into test_proxima_be_restart_with_full_stage values(3472, 'name3472', 3482.111, 347200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3472]'); insert into test_proxima_be_restart_with_full_stage values(3473, 'name3473', 3483.111, 347300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3473]'); insert into test_proxima_be_restart_with_full_stage values(3474, 'name3474', 3484.111, 347400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3474]'); insert into test_proxima_be_restart_with_full_stage values(3475, 'name3475', 3485.111, 347500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3475]'); insert into test_proxima_be_restart_with_full_stage values(3476, 'name3476', 3486.111, 347600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3476]'); insert into test_proxima_be_restart_with_full_stage values(3477, 'name3477', 3487.111, 347700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3477]'); insert into test_proxima_be_restart_with_full_stage values(3478, 'name3478', 3488.111, 347800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3478]'); insert into test_proxima_be_restart_with_full_stage values(3479, 'name3479', 3489.111, 347900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3479]'); insert into test_proxima_be_restart_with_full_stage values(3480, 'name3480', 3490.111, 348000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3480]'); insert into test_proxima_be_restart_with_full_stage values(3481, 'name3481', 3491.111, 348100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3481]'); insert into test_proxima_be_restart_with_full_stage values(3482, 'name3482', 3492.111, 348200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3482]'); insert into test_proxima_be_restart_with_full_stage values(3483, 'name3483', 3493.111, 348300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3483]'); insert into test_proxima_be_restart_with_full_stage values(3484, 'name3484', 3494.111, 348400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3484]'); insert into test_proxima_be_restart_with_full_stage values(3485, 'name3485', 3495.111, 348500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3485]'); insert into test_proxima_be_restart_with_full_stage values(3486, 'name3486', 3496.111, 348600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3486]'); insert into test_proxima_be_restart_with_full_stage values(3487, 'name3487', 3497.111, 348700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3487]'); insert into test_proxima_be_restart_with_full_stage values(3488, 'name3488', 3498.111, 348800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3488]'); insert into test_proxima_be_restart_with_full_stage values(3489, 'name3489', 3499.111, 348900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3489]'); insert into test_proxima_be_restart_with_full_stage values(3490, 'name3490', 3500.111, 349000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3490]'); insert into test_proxima_be_restart_with_full_stage values(3491, 'name3491', 3501.111, 349100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3491]'); insert into test_proxima_be_restart_with_full_stage values(3492, 'name3492', 3502.111, 349200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3492]'); insert into test_proxima_be_restart_with_full_stage values(3493, 'name3493', 3503.111, 349300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3493]'); insert into test_proxima_be_restart_with_full_stage values(3494, 'name3494', 3504.111, 349400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3494]'); insert into test_proxima_be_restart_with_full_stage values(3495, 'name3495', 3505.111, 349500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3495]'); insert into test_proxima_be_restart_with_full_stage values(3496, 'name3496', 3506.111, 349600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3496]'); insert into test_proxima_be_restart_with_full_stage values(3497, 'name3497', 3507.111, 349700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3497]'); insert into test_proxima_be_restart_with_full_stage values(3498, 'name3498', 3508.111, 349800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3498]'); insert into test_proxima_be_restart_with_full_stage values(3499, 'name3499', 3509.111, 349900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3499]'); insert into test_proxima_be_restart_with_full_stage values(3500, 'name3500', 3510.111, 350000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3500]'); insert into test_proxima_be_restart_with_full_stage values(3501, 'name3501', 3511.111, 350100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3501]'); insert into test_proxima_be_restart_with_full_stage values(3502, 'name3502', 3512.111, 350200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3502]'); insert into test_proxima_be_restart_with_full_stage values(3503, 'name3503', 3513.111, 350300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3503]'); insert into test_proxima_be_restart_with_full_stage values(3504, 'name3504', 3514.111, 350400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3504]'); insert into test_proxima_be_restart_with_full_stage values(3505, 'name3505', 3515.111, 350500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3505]'); insert into test_proxima_be_restart_with_full_stage values(3506, 'name3506', 3516.111, 350600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3506]'); insert into test_proxima_be_restart_with_full_stage values(3507, 'name3507', 3517.111, 350700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3507]'); insert into test_proxima_be_restart_with_full_stage values(3508, 'name3508', 3518.111, 350800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3508]'); insert into test_proxima_be_restart_with_full_stage values(3509, 'name3509', 3519.111, 350900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3509]'); insert into test_proxima_be_restart_with_full_stage values(3510, 'name3510', 3520.111, 351000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3510]'); insert into test_proxima_be_restart_with_full_stage values(3511, 'name3511', 3521.111, 351100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3511]'); insert into test_proxima_be_restart_with_full_stage values(3512, 'name3512', 3522.111, 351200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3512]'); insert into test_proxima_be_restart_with_full_stage values(3513, 'name3513', 3523.111, 351300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3513]'); insert into test_proxima_be_restart_with_full_stage values(3514, 'name3514', 3524.111, 351400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3514]'); insert into test_proxima_be_restart_with_full_stage values(3515, 'name3515', 3525.111, 351500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3515]'); insert into test_proxima_be_restart_with_full_stage values(3516, 'name3516', 3526.111, 351600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3516]'); insert into test_proxima_be_restart_with_full_stage values(3517, 'name3517', 3527.111, 351700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3517]'); insert into test_proxima_be_restart_with_full_stage values(3518, 'name3518', 3528.111, 351800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3518]'); insert into test_proxima_be_restart_with_full_stage values(3519, 'name3519', 3529.111, 351900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3519]'); insert into test_proxima_be_restart_with_full_stage values(3520, 'name3520', 3530.111, 352000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3520]'); insert into test_proxima_be_restart_with_full_stage values(3521, 'name3521', 3531.111, 352100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3521]'); insert into test_proxima_be_restart_with_full_stage values(3522, 'name3522', 3532.111, 352200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3522]'); insert into test_proxima_be_restart_with_full_stage values(3523, 'name3523', 3533.111, 352300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3523]'); insert into test_proxima_be_restart_with_full_stage values(3524, 'name3524', 3534.111, 352400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3524]'); insert into test_proxima_be_restart_with_full_stage values(3525, 'name3525', 3535.111, 352500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3525]'); insert into test_proxima_be_restart_with_full_stage values(3526, 'name3526', 3536.111, 352600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3526]'); insert into test_proxima_be_restart_with_full_stage values(3527, 'name3527', 3537.111, 352700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3527]'); insert into test_proxima_be_restart_with_full_stage values(3528, 'name3528', 3538.111, 352800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3528]'); insert into test_proxima_be_restart_with_full_stage values(3529, 'name3529', 3539.111, 352900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3529]'); insert into test_proxima_be_restart_with_full_stage values(3530, 'name3530', 3540.111, 353000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3530]'); insert into test_proxima_be_restart_with_full_stage values(3531, 'name3531', 3541.111, 353100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3531]'); insert into test_proxima_be_restart_with_full_stage values(3532, 'name3532', 3542.111, 353200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3532]'); insert into test_proxima_be_restart_with_full_stage values(3533, 'name3533', 3543.111, 353300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3533]'); insert into test_proxima_be_restart_with_full_stage values(3534, 'name3534', 3544.111, 353400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3534]'); insert into test_proxima_be_restart_with_full_stage values(3535, 'name3535', 3545.111, 353500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3535]'); insert into test_proxima_be_restart_with_full_stage values(3536, 'name3536', 3546.111, 353600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3536]'); insert into test_proxima_be_restart_with_full_stage values(3537, 'name3537', 3547.111, 353700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3537]'); insert into test_proxima_be_restart_with_full_stage values(3538, 'name3538', 3548.111, 353800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3538]'); insert into test_proxima_be_restart_with_full_stage values(3539, 'name3539', 3549.111, 353900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3539]'); insert into test_proxima_be_restart_with_full_stage values(3540, 'name3540', 3550.111, 354000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3540]'); insert into test_proxima_be_restart_with_full_stage values(3541, 'name3541', 3551.111, 354100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3541]'); insert into test_proxima_be_restart_with_full_stage values(3542, 'name3542', 3552.111, 354200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3542]'); insert into test_proxima_be_restart_with_full_stage values(3543, 'name3543', 3553.111, 354300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3543]'); insert into test_proxima_be_restart_with_full_stage values(3544, 'name3544', 3554.111, 354400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3544]'); insert into test_proxima_be_restart_with_full_stage values(3545, 'name3545', 3555.111, 354500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3545]'); insert into test_proxima_be_restart_with_full_stage values(3546, 'name3546', 3556.111, 354600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3546]'); insert into test_proxima_be_restart_with_full_stage values(3547, 'name3547', 3557.111, 354700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3547]'); insert into test_proxima_be_restart_with_full_stage values(3548, 'name3548', 3558.111, 354800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3548]'); insert into test_proxima_be_restart_with_full_stage values(3549, 'name3549', 3559.111, 354900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3549]'); insert into test_proxima_be_restart_with_full_stage values(3550, 'name3550', 3560.111, 355000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3550]'); insert into test_proxima_be_restart_with_full_stage values(3551, 'name3551', 3561.111, 355100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3551]'); insert into test_proxima_be_restart_with_full_stage values(3552, 'name3552', 3562.111, 355200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3552]'); insert into test_proxima_be_restart_with_full_stage values(3553, 'name3553', 3563.111, 355300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3553]'); insert into test_proxima_be_restart_with_full_stage values(3554, 'name3554', 3564.111, 355400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3554]'); insert into test_proxima_be_restart_with_full_stage values(3555, 'name3555', 3565.111, 355500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3555]'); insert into test_proxima_be_restart_with_full_stage values(3556, 'name3556', 3566.111, 355600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3556]'); insert into test_proxima_be_restart_with_full_stage values(3557, 'name3557', 3567.111, 355700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3557]'); insert into test_proxima_be_restart_with_full_stage values(3558, 'name3558', 3568.111, 355800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3558]'); insert into test_proxima_be_restart_with_full_stage values(3559, 'name3559', 3569.111, 355900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3559]'); insert into test_proxima_be_restart_with_full_stage values(3560, 'name3560', 3570.111, 356000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3560]'); insert into test_proxima_be_restart_with_full_stage values(3561, 'name3561', 3571.111, 356100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3561]'); insert into test_proxima_be_restart_with_full_stage values(3562, 'name3562', 3572.111, 356200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3562]'); insert into test_proxima_be_restart_with_full_stage values(3563, 'name3563', 3573.111, 356300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3563]'); insert into test_proxima_be_restart_with_full_stage values(3564, 'name3564', 3574.111, 356400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3564]'); insert into test_proxima_be_restart_with_full_stage values(3565, 'name3565', 3575.111, 356500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3565]'); insert into test_proxima_be_restart_with_full_stage values(3566, 'name3566', 3576.111, 356600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3566]'); insert into test_proxima_be_restart_with_full_stage values(3567, 'name3567', 3577.111, 356700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3567]'); insert into test_proxima_be_restart_with_full_stage values(3568, 'name3568', 3578.111, 356800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3568]'); insert into test_proxima_be_restart_with_full_stage values(3569, 'name3569', 3579.111, 356900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3569]'); insert into test_proxima_be_restart_with_full_stage values(3570, 'name3570', 3580.111, 357000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3570]'); insert into test_proxima_be_restart_with_full_stage values(3571, 'name3571', 3581.111, 357100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3571]'); insert into test_proxima_be_restart_with_full_stage values(3572, 'name3572', 3582.111, 357200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3572]'); insert into test_proxima_be_restart_with_full_stage values(3573, 'name3573', 3583.111, 357300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3573]'); insert into test_proxima_be_restart_with_full_stage values(3574, 'name3574', 3584.111, 357400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3574]'); insert into test_proxima_be_restart_with_full_stage values(3575, 'name3575', 3585.111, 357500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3575]'); insert into test_proxima_be_restart_with_full_stage values(3576, 'name3576', 3586.111, 357600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3576]'); insert into test_proxima_be_restart_with_full_stage values(3577, 'name3577', 3587.111, 357700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3577]'); insert into test_proxima_be_restart_with_full_stage values(3578, 'name3578', 3588.111, 357800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3578]'); insert into test_proxima_be_restart_with_full_stage values(3579, 'name3579', 3589.111, 357900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3579]'); insert into test_proxima_be_restart_with_full_stage values(3580, 'name3580', 3590.111, 358000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3580]'); insert into test_proxima_be_restart_with_full_stage values(3581, 'name3581', 3591.111, 358100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3581]'); insert into test_proxima_be_restart_with_full_stage values(3582, 'name3582', 3592.111, 358200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3582]'); insert into test_proxima_be_restart_with_full_stage values(3583, 'name3583', 3593.111, 358300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3583]'); insert into test_proxima_be_restart_with_full_stage values(3584, 'name3584', 3594.111, 358400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3584]'); insert into test_proxima_be_restart_with_full_stage values(3585, 'name3585', 3595.111, 358500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3585]'); insert into test_proxima_be_restart_with_full_stage values(3586, 'name3586', 3596.111, 358600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3586]'); insert into test_proxima_be_restart_with_full_stage values(3587, 'name3587', 3597.111, 358700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3587]'); insert into test_proxima_be_restart_with_full_stage values(3588, 'name3588', 3598.111, 358800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3588]'); insert into test_proxima_be_restart_with_full_stage values(3589, 'name3589', 3599.111, 358900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3589]'); insert into test_proxima_be_restart_with_full_stage values(3590, 'name3590', 3600.111, 359000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3590]'); insert into test_proxima_be_restart_with_full_stage values(3591, 'name3591', 3601.111, 359100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3591]'); insert into test_proxima_be_restart_with_full_stage values(3592, 'name3592', 3602.111, 359200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3592]'); insert into test_proxima_be_restart_with_full_stage values(3593, 'name3593', 3603.111, 359300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3593]'); insert into test_proxima_be_restart_with_full_stage values(3594, 'name3594', 3604.111, 359400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3594]'); insert into test_proxima_be_restart_with_full_stage values(3595, 'name3595', 3605.111, 359500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3595]'); insert into test_proxima_be_restart_with_full_stage values(3596, 'name3596', 3606.111, 359600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3596]'); insert into test_proxima_be_restart_with_full_stage values(3597, 'name3597', 3607.111, 359700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3597]'); insert into test_proxima_be_restart_with_full_stage values(3598, 'name3598', 3608.111, 359800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3598]'); insert into test_proxima_be_restart_with_full_stage values(3599, 'name3599', 3609.111, 359900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3599]'); insert into test_proxima_be_restart_with_full_stage values(3600, 'name3600', 3610.111, 360000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3600]'); insert into test_proxima_be_restart_with_full_stage values(3601, 'name3601', 3611.111, 360100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3601]'); insert into test_proxima_be_restart_with_full_stage values(3602, 'name3602', 3612.111, 360200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3602]'); insert into test_proxima_be_restart_with_full_stage values(3603, 'name3603', 3613.111, 360300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3603]'); insert into test_proxima_be_restart_with_full_stage values(3604, 'name3604', 3614.111, 360400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3604]'); insert into test_proxima_be_restart_with_full_stage values(3605, 'name3605', 3615.111, 360500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3605]'); insert into test_proxima_be_restart_with_full_stage values(3606, 'name3606', 3616.111, 360600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3606]'); insert into test_proxima_be_restart_with_full_stage values(3607, 'name3607', 3617.111, 360700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3607]'); insert into test_proxima_be_restart_with_full_stage values(3608, 'name3608', 3618.111, 360800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3608]'); insert into test_proxima_be_restart_with_full_stage values(3609, 'name3609', 3619.111, 360900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3609]'); insert into test_proxima_be_restart_with_full_stage values(3610, 'name3610', 3620.111, 361000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3610]'); insert into test_proxima_be_restart_with_full_stage values(3611, 'name3611', 3621.111, 361100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3611]'); insert into test_proxima_be_restart_with_full_stage values(3612, 'name3612', 3622.111, 361200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3612]'); insert into test_proxima_be_restart_with_full_stage values(3613, 'name3613', 3623.111, 361300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3613]'); insert into test_proxima_be_restart_with_full_stage values(3614, 'name3614', 3624.111, 361400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3614]'); insert into test_proxima_be_restart_with_full_stage values(3615, 'name3615', 3625.111, 361500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3615]'); insert into test_proxima_be_restart_with_full_stage values(3616, 'name3616', 3626.111, 361600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3616]'); insert into test_proxima_be_restart_with_full_stage values(3617, 'name3617', 3627.111, 361700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3617]'); insert into test_proxima_be_restart_with_full_stage values(3618, 'name3618', 3628.111, 361800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3618]'); insert into test_proxima_be_restart_with_full_stage values(3619, 'name3619', 3629.111, 361900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3619]'); insert into test_proxima_be_restart_with_full_stage values(3620, 'name3620', 3630.111, 362000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3620]'); insert into test_proxima_be_restart_with_full_stage values(3621, 'name3621', 3631.111, 362100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3621]'); insert into test_proxima_be_restart_with_full_stage values(3622, 'name3622', 3632.111, 362200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3622]'); insert into test_proxima_be_restart_with_full_stage values(3623, 'name3623', 3633.111, 362300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3623]'); insert into test_proxima_be_restart_with_full_stage values(3624, 'name3624', 3634.111, 362400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3624]'); insert into test_proxima_be_restart_with_full_stage values(3625, 'name3625', 3635.111, 362500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3625]'); insert into test_proxima_be_restart_with_full_stage values(3626, 'name3626', 3636.111, 362600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3626]'); insert into test_proxima_be_restart_with_full_stage values(3627, 'name3627', 3637.111, 362700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3627]'); insert into test_proxima_be_restart_with_full_stage values(3628, 'name3628', 3638.111, 362800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3628]'); insert into test_proxima_be_restart_with_full_stage values(3629, 'name3629', 3639.111, 362900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3629]'); insert into test_proxima_be_restart_with_full_stage values(3630, 'name3630', 3640.111, 363000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3630]'); insert into test_proxima_be_restart_with_full_stage values(3631, 'name3631', 3641.111, 363100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3631]'); insert into test_proxima_be_restart_with_full_stage values(3632, 'name3632', 3642.111, 363200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3632]'); insert into test_proxima_be_restart_with_full_stage values(3633, 'name3633', 3643.111, 363300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3633]'); insert into test_proxima_be_restart_with_full_stage values(3634, 'name3634', 3644.111, 363400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3634]'); insert into test_proxima_be_restart_with_full_stage values(3635, 'name3635', 3645.111, 363500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3635]'); insert into test_proxima_be_restart_with_full_stage values(3636, 'name3636', 3646.111, 363600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3636]'); insert into test_proxima_be_restart_with_full_stage values(3637, 'name3637', 3647.111, 363700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3637]'); insert into test_proxima_be_restart_with_full_stage values(3638, 'name3638', 3648.111, 363800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3638]'); insert into test_proxima_be_restart_with_full_stage values(3639, 'name3639', 3649.111, 363900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3639]'); insert into test_proxima_be_restart_with_full_stage values(3640, 'name3640', 3650.111, 364000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3640]'); insert into test_proxima_be_restart_with_full_stage values(3641, 'name3641', 3651.111, 364100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3641]'); insert into test_proxima_be_restart_with_full_stage values(3642, 'name3642', 3652.111, 364200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3642]'); insert into test_proxima_be_restart_with_full_stage values(3643, 'name3643', 3653.111, 364300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3643]'); insert into test_proxima_be_restart_with_full_stage values(3644, 'name3644', 3654.111, 364400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3644]'); insert into test_proxima_be_restart_with_full_stage values(3645, 'name3645', 3655.111, 364500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3645]'); insert into test_proxima_be_restart_with_full_stage values(3646, 'name3646', 3656.111, 364600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3646]'); insert into test_proxima_be_restart_with_full_stage values(3647, 'name3647', 3657.111, 364700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3647]'); insert into test_proxima_be_restart_with_full_stage values(3648, 'name3648', 3658.111, 364800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3648]'); insert into test_proxima_be_restart_with_full_stage values(3649, 'name3649', 3659.111, 364900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3649]'); insert into test_proxima_be_restart_with_full_stage values(3650, 'name3650', 3660.111, 365000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3650]'); insert into test_proxima_be_restart_with_full_stage values(3651, 'name3651', 3661.111, 365100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3651]'); insert into test_proxima_be_restart_with_full_stage values(3652, 'name3652', 3662.111, 365200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3652]'); insert into test_proxima_be_restart_with_full_stage values(3653, 'name3653', 3663.111, 365300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3653]'); insert into test_proxima_be_restart_with_full_stage values(3654, 'name3654', 3664.111, 365400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3654]'); insert into test_proxima_be_restart_with_full_stage values(3655, 'name3655', 3665.111, 365500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3655]'); insert into test_proxima_be_restart_with_full_stage values(3656, 'name3656', 3666.111, 365600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3656]'); insert into test_proxima_be_restart_with_full_stage values(3657, 'name3657', 3667.111, 365700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3657]'); insert into test_proxima_be_restart_with_full_stage values(3658, 'name3658', 3668.111, 365800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3658]'); insert into test_proxima_be_restart_with_full_stage values(3659, 'name3659', 3669.111, 365900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3659]'); insert into test_proxima_be_restart_with_full_stage values(3660, 'name3660', 3670.111, 366000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3660]'); insert into test_proxima_be_restart_with_full_stage values(3661, 'name3661', 3671.111, 366100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3661]'); insert into test_proxima_be_restart_with_full_stage values(3662, 'name3662', 3672.111, 366200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3662]'); insert into test_proxima_be_restart_with_full_stage values(3663, 'name3663', 3673.111, 366300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3663]'); insert into test_proxima_be_restart_with_full_stage values(3664, 'name3664', 3674.111, 366400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3664]'); insert into test_proxima_be_restart_with_full_stage values(3665, 'name3665', 3675.111, 366500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3665]'); insert into test_proxima_be_restart_with_full_stage values(3666, 'name3666', 3676.111, 366600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3666]'); insert into test_proxima_be_restart_with_full_stage values(3667, 'name3667', 3677.111, 366700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3667]'); insert into test_proxima_be_restart_with_full_stage values(3668, 'name3668', 3678.111, 366800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3668]'); insert into test_proxima_be_restart_with_full_stage values(3669, 'name3669', 3679.111, 366900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3669]'); insert into test_proxima_be_restart_with_full_stage values(3670, 'name3670', 3680.111, 367000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3670]'); insert into test_proxima_be_restart_with_full_stage values(3671, 'name3671', 3681.111, 367100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3671]'); insert into test_proxima_be_restart_with_full_stage values(3672, 'name3672', 3682.111, 367200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3672]'); insert into test_proxima_be_restart_with_full_stage values(3673, 'name3673', 3683.111, 367300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3673]'); insert into test_proxima_be_restart_with_full_stage values(3674, 'name3674', 3684.111, 367400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3674]'); insert into test_proxima_be_restart_with_full_stage values(3675, 'name3675', 3685.111, 367500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3675]'); insert into test_proxima_be_restart_with_full_stage values(3676, 'name3676', 3686.111, 367600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3676]'); insert into test_proxima_be_restart_with_full_stage values(3677, 'name3677', 3687.111, 367700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3677]'); insert into test_proxima_be_restart_with_full_stage values(3678, 'name3678', 3688.111, 367800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3678]'); insert into test_proxima_be_restart_with_full_stage values(3679, 'name3679', 3689.111, 367900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3679]'); insert into test_proxima_be_restart_with_full_stage values(3680, 'name3680', 3690.111, 368000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3680]'); insert into test_proxima_be_restart_with_full_stage values(3681, 'name3681', 3691.111, 368100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3681]'); insert into test_proxima_be_restart_with_full_stage values(3682, 'name3682', 3692.111, 368200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3682]'); insert into test_proxima_be_restart_with_full_stage values(3683, 'name3683', 3693.111, 368300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3683]'); insert into test_proxima_be_restart_with_full_stage values(3684, 'name3684', 3694.111, 368400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3684]'); insert into test_proxima_be_restart_with_full_stage values(3685, 'name3685', 3695.111, 368500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3685]'); insert into test_proxima_be_restart_with_full_stage values(3686, 'name3686', 3696.111, 368600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3686]'); insert into test_proxima_be_restart_with_full_stage values(3687, 'name3687', 3697.111, 368700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3687]'); insert into test_proxima_be_restart_with_full_stage values(3688, 'name3688', 3698.111, 368800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3688]'); insert into test_proxima_be_restart_with_full_stage values(3689, 'name3689', 3699.111, 368900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3689]'); insert into test_proxima_be_restart_with_full_stage values(3690, 'name3690', 3700.111, 369000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3690]'); insert into test_proxima_be_restart_with_full_stage values(3691, 'name3691', 3701.111, 369100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3691]'); insert into test_proxima_be_restart_with_full_stage values(3692, 'name3692', 3702.111, 369200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3692]'); insert into test_proxima_be_restart_with_full_stage values(3693, 'name3693', 3703.111, 369300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3693]'); insert into test_proxima_be_restart_with_full_stage values(3694, 'name3694', 3704.111, 369400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3694]'); insert into test_proxima_be_restart_with_full_stage values(3695, 'name3695', 3705.111, 369500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3695]'); insert into test_proxima_be_restart_with_full_stage values(3696, 'name3696', 3706.111, 369600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3696]'); insert into test_proxima_be_restart_with_full_stage values(3697, 'name3697', 3707.111, 369700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3697]'); insert into test_proxima_be_restart_with_full_stage values(3698, 'name3698', 3708.111, 369800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3698]'); insert into test_proxima_be_restart_with_full_stage values(3699, 'name3699', 3709.111, 369900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3699]'); insert into test_proxima_be_restart_with_full_stage values(3700, 'name3700', 3710.111, 370000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3700]'); insert into test_proxima_be_restart_with_full_stage values(3701, 'name3701', 3711.111, 370100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3701]'); insert into test_proxima_be_restart_with_full_stage values(3702, 'name3702', 3712.111, 370200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3702]'); insert into test_proxima_be_restart_with_full_stage values(3703, 'name3703', 3713.111, 370300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3703]'); insert into test_proxima_be_restart_with_full_stage values(3704, 'name3704', 3714.111, 370400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3704]'); insert into test_proxima_be_restart_with_full_stage values(3705, 'name3705', 3715.111, 370500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3705]'); insert into test_proxima_be_restart_with_full_stage values(3706, 'name3706', 3716.111, 370600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3706]'); insert into test_proxima_be_restart_with_full_stage values(3707, 'name3707', 3717.111, 370700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3707]'); insert into test_proxima_be_restart_with_full_stage values(3708, 'name3708', 3718.111, 370800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3708]'); insert into test_proxima_be_restart_with_full_stage values(3709, 'name3709', 3719.111, 370900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3709]'); insert into test_proxima_be_restart_with_full_stage values(3710, 'name3710', 3720.111, 371000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3710]'); insert into test_proxima_be_restart_with_full_stage values(3711, 'name3711', 3721.111, 371100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3711]'); insert into test_proxima_be_restart_with_full_stage values(3712, 'name3712', 3722.111, 371200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3712]'); insert into test_proxima_be_restart_with_full_stage values(3713, 'name3713', 3723.111, 371300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3713]'); insert into test_proxima_be_restart_with_full_stage values(3714, 'name3714', 3724.111, 371400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3714]'); insert into test_proxima_be_restart_with_full_stage values(3715, 'name3715', 3725.111, 371500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3715]'); insert into test_proxima_be_restart_with_full_stage values(3716, 'name3716', 3726.111, 371600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3716]'); insert into test_proxima_be_restart_with_full_stage values(3717, 'name3717', 3727.111, 371700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3717]'); insert into test_proxima_be_restart_with_full_stage values(3718, 'name3718', 3728.111, 371800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3718]'); insert into test_proxima_be_restart_with_full_stage values(3719, 'name3719', 3729.111, 371900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3719]'); insert into test_proxima_be_restart_with_full_stage values(3720, 'name3720', 3730.111, 372000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3720]'); insert into test_proxima_be_restart_with_full_stage values(3721, 'name3721', 3731.111, 372100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3721]'); insert into test_proxima_be_restart_with_full_stage values(3722, 'name3722', 3732.111, 372200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3722]'); insert into test_proxima_be_restart_with_full_stage values(3723, 'name3723', 3733.111, 372300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3723]'); insert into test_proxima_be_restart_with_full_stage values(3724, 'name3724', 3734.111, 372400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3724]'); insert into test_proxima_be_restart_with_full_stage values(3725, 'name3725', 3735.111, 372500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3725]'); insert into test_proxima_be_restart_with_full_stage values(3726, 'name3726', 3736.111, 372600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3726]'); insert into test_proxima_be_restart_with_full_stage values(3727, 'name3727', 3737.111, 372700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3727]'); insert into test_proxima_be_restart_with_full_stage values(3728, 'name3728', 3738.111, 372800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3728]'); insert into test_proxima_be_restart_with_full_stage values(3729, 'name3729', 3739.111, 372900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3729]'); insert into test_proxima_be_restart_with_full_stage values(3730, 'name3730', 3740.111, 373000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3730]'); insert into test_proxima_be_restart_with_full_stage values(3731, 'name3731', 3741.111, 373100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3731]'); insert into test_proxima_be_restart_with_full_stage values(3732, 'name3732', 3742.111, 373200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3732]'); insert into test_proxima_be_restart_with_full_stage values(3733, 'name3733', 3743.111, 373300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3733]'); insert into test_proxima_be_restart_with_full_stage values(3734, 'name3734', 3744.111, 373400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3734]'); insert into test_proxima_be_restart_with_full_stage values(3735, 'name3735', 3745.111, 373500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3735]'); insert into test_proxima_be_restart_with_full_stage values(3736, 'name3736', 3746.111, 373600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3736]'); insert into test_proxima_be_restart_with_full_stage values(3737, 'name3737', 3747.111, 373700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3737]'); insert into test_proxima_be_restart_with_full_stage values(3738, 'name3738', 3748.111, 373800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3738]'); insert into test_proxima_be_restart_with_full_stage values(3739, 'name3739', 3749.111, 373900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3739]'); insert into test_proxima_be_restart_with_full_stage values(3740, 'name3740', 3750.111, 374000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3740]'); insert into test_proxima_be_restart_with_full_stage values(3741, 'name3741', 3751.111, 374100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3741]'); insert into test_proxima_be_restart_with_full_stage values(3742, 'name3742', 3752.111, 374200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3742]'); insert into test_proxima_be_restart_with_full_stage values(3743, 'name3743', 3753.111, 374300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3743]'); insert into test_proxima_be_restart_with_full_stage values(3744, 'name3744', 3754.111, 374400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3744]'); insert into test_proxima_be_restart_with_full_stage values(3745, 'name3745', 3755.111, 374500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3745]'); insert into test_proxima_be_restart_with_full_stage values(3746, 'name3746', 3756.111, 374600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3746]'); insert into test_proxima_be_restart_with_full_stage values(3747, 'name3747', 3757.111, 374700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3747]'); insert into test_proxima_be_restart_with_full_stage values(3748, 'name3748', 3758.111, 374800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3748]'); insert into test_proxima_be_restart_with_full_stage values(3749, 'name3749', 3759.111, 374900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3749]'); insert into test_proxima_be_restart_with_full_stage values(3750, 'name3750', 3760.111, 375000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3750]'); insert into test_proxima_be_restart_with_full_stage values(3751, 'name3751', 3761.111, 375100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3751]'); insert into test_proxima_be_restart_with_full_stage values(3752, 'name3752', 3762.111, 375200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3752]'); insert into test_proxima_be_restart_with_full_stage values(3753, 'name3753', 3763.111, 375300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3753]'); insert into test_proxima_be_restart_with_full_stage values(3754, 'name3754', 3764.111, 375400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3754]'); insert into test_proxima_be_restart_with_full_stage values(3755, 'name3755', 3765.111, 375500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3755]'); insert into test_proxima_be_restart_with_full_stage values(3756, 'name3756', 3766.111, 375600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3756]'); insert into test_proxima_be_restart_with_full_stage values(3757, 'name3757', 3767.111, 375700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3757]'); insert into test_proxima_be_restart_with_full_stage values(3758, 'name3758', 3768.111, 375800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3758]'); insert into test_proxima_be_restart_with_full_stage values(3759, 'name3759', 3769.111, 375900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3759]'); insert into test_proxima_be_restart_with_full_stage values(3760, 'name3760', 3770.111, 376000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3760]'); insert into test_proxima_be_restart_with_full_stage values(3761, 'name3761', 3771.111, 376100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3761]'); insert into test_proxima_be_restart_with_full_stage values(3762, 'name3762', 3772.111, 376200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3762]'); insert into test_proxima_be_restart_with_full_stage values(3763, 'name3763', 3773.111, 376300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3763]'); insert into test_proxima_be_restart_with_full_stage values(3764, 'name3764', 3774.111, 376400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3764]'); insert into test_proxima_be_restart_with_full_stage values(3765, 'name3765', 3775.111, 376500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3765]'); insert into test_proxima_be_restart_with_full_stage values(3766, 'name3766', 3776.111, 376600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3766]'); insert into test_proxima_be_restart_with_full_stage values(3767, 'name3767', 3777.111, 376700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3767]'); insert into test_proxima_be_restart_with_full_stage values(3768, 'name3768', 3778.111, 376800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3768]'); insert into test_proxima_be_restart_with_full_stage values(3769, 'name3769', 3779.111, 376900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3769]'); insert into test_proxima_be_restart_with_full_stage values(3770, 'name3770', 3780.111, 377000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3770]'); insert into test_proxima_be_restart_with_full_stage values(3771, 'name3771', 3781.111, 377100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3771]'); insert into test_proxima_be_restart_with_full_stage values(3772, 'name3772', 3782.111, 377200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3772]'); insert into test_proxima_be_restart_with_full_stage values(3773, 'name3773', 3783.111, 377300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3773]'); insert into test_proxima_be_restart_with_full_stage values(3774, 'name3774', 3784.111, 377400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3774]'); insert into test_proxima_be_restart_with_full_stage values(3775, 'name3775', 3785.111, 377500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3775]'); insert into test_proxima_be_restart_with_full_stage values(3776, 'name3776', 3786.111, 377600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3776]'); insert into test_proxima_be_restart_with_full_stage values(3777, 'name3777', 3787.111, 377700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3777]'); insert into test_proxima_be_restart_with_full_stage values(3778, 'name3778', 3788.111, 377800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3778]'); insert into test_proxima_be_restart_with_full_stage values(3779, 'name3779', 3789.111, 377900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3779]'); insert into test_proxima_be_restart_with_full_stage values(3780, 'name3780', 3790.111, 378000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3780]'); insert into test_proxima_be_restart_with_full_stage values(3781, 'name3781', 3791.111, 378100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3781]'); insert into test_proxima_be_restart_with_full_stage values(3782, 'name3782', 3792.111, 378200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3782]'); insert into test_proxima_be_restart_with_full_stage values(3783, 'name3783', 3793.111, 378300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3783]'); insert into test_proxima_be_restart_with_full_stage values(3784, 'name3784', 3794.111, 378400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3784]'); insert into test_proxima_be_restart_with_full_stage values(3785, 'name3785', 3795.111, 378500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3785]'); insert into test_proxima_be_restart_with_full_stage values(3786, 'name3786', 3796.111, 378600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3786]'); insert into test_proxima_be_restart_with_full_stage values(3787, 'name3787', 3797.111, 378700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3787]'); insert into test_proxima_be_restart_with_full_stage values(3788, 'name3788', 3798.111, 378800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3788]'); insert into test_proxima_be_restart_with_full_stage values(3789, 'name3789', 3799.111, 378900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3789]'); insert into test_proxima_be_restart_with_full_stage values(3790, 'name3790', 3800.111, 379000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3790]'); insert into test_proxima_be_restart_with_full_stage values(3791, 'name3791', 3801.111, 379100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3791]'); insert into test_proxima_be_restart_with_full_stage values(3792, 'name3792', 3802.111, 379200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3792]'); insert into test_proxima_be_restart_with_full_stage values(3793, 'name3793', 3803.111, 379300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3793]'); insert into test_proxima_be_restart_with_full_stage values(3794, 'name3794', 3804.111, 379400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3794]'); insert into test_proxima_be_restart_with_full_stage values(3795, 'name3795', 3805.111, 379500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3795]'); insert into test_proxima_be_restart_with_full_stage values(3796, 'name3796', 3806.111, 379600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3796]'); insert into test_proxima_be_restart_with_full_stage values(3797, 'name3797', 3807.111, 379700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3797]'); insert into test_proxima_be_restart_with_full_stage values(3798, 'name3798', 3808.111, 379800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3798]'); insert into test_proxima_be_restart_with_full_stage values(3799, 'name3799', 3809.111, 379900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3799]'); insert into test_proxima_be_restart_with_full_stage values(3800, 'name3800', 3810.111, 380000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3800]'); insert into test_proxima_be_restart_with_full_stage values(3801, 'name3801', 3811.111, 380100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3801]'); insert into test_proxima_be_restart_with_full_stage values(3802, 'name3802', 3812.111, 380200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3802]'); insert into test_proxima_be_restart_with_full_stage values(3803, 'name3803', 3813.111, 380300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3803]'); insert into test_proxima_be_restart_with_full_stage values(3804, 'name3804', 3814.111, 380400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3804]'); insert into test_proxima_be_restart_with_full_stage values(3805, 'name3805', 3815.111, 380500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3805]'); insert into test_proxima_be_restart_with_full_stage values(3806, 'name3806', 3816.111, 380600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3806]'); insert into test_proxima_be_restart_with_full_stage values(3807, 'name3807', 3817.111, 380700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3807]'); insert into test_proxima_be_restart_with_full_stage values(3808, 'name3808', 3818.111, 380800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3808]'); insert into test_proxima_be_restart_with_full_stage values(3809, 'name3809', 3819.111, 380900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3809]'); insert into test_proxima_be_restart_with_full_stage values(3810, 'name3810', 3820.111, 381000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3810]'); insert into test_proxima_be_restart_with_full_stage values(3811, 'name3811', 3821.111, 381100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3811]'); insert into test_proxima_be_restart_with_full_stage values(3812, 'name3812', 3822.111, 381200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3812]'); insert into test_proxima_be_restart_with_full_stage values(3813, 'name3813', 3823.111, 381300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3813]'); insert into test_proxima_be_restart_with_full_stage values(3814, 'name3814', 3824.111, 381400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3814]'); insert into test_proxima_be_restart_with_full_stage values(3815, 'name3815', 3825.111, 381500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3815]'); insert into test_proxima_be_restart_with_full_stage values(3816, 'name3816', 3826.111, 381600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3816]'); insert into test_proxima_be_restart_with_full_stage values(3817, 'name3817', 3827.111, 381700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3817]'); insert into test_proxima_be_restart_with_full_stage values(3818, 'name3818', 3828.111, 381800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3818]'); insert into test_proxima_be_restart_with_full_stage values(3819, 'name3819', 3829.111, 381900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3819]'); insert into test_proxima_be_restart_with_full_stage values(3820, 'name3820', 3830.111, 382000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3820]'); insert into test_proxima_be_restart_with_full_stage values(3821, 'name3821', 3831.111, 382100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3821]'); insert into test_proxima_be_restart_with_full_stage values(3822, 'name3822', 3832.111, 382200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3822]'); insert into test_proxima_be_restart_with_full_stage values(3823, 'name3823', 3833.111, 382300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3823]'); insert into test_proxima_be_restart_with_full_stage values(3824, 'name3824', 3834.111, 382400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3824]'); insert into test_proxima_be_restart_with_full_stage values(3825, 'name3825', 3835.111, 382500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3825]'); insert into test_proxima_be_restart_with_full_stage values(3826, 'name3826', 3836.111, 382600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3826]'); insert into test_proxima_be_restart_with_full_stage values(3827, 'name3827', 3837.111, 382700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3827]'); insert into test_proxima_be_restart_with_full_stage values(3828, 'name3828', 3838.111, 382800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3828]'); insert into test_proxima_be_restart_with_full_stage values(3829, 'name3829', 3839.111, 382900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3829]'); insert into test_proxima_be_restart_with_full_stage values(3830, 'name3830', 3840.111, 383000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3830]'); insert into test_proxima_be_restart_with_full_stage values(3831, 'name3831', 3841.111, 383100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3831]'); insert into test_proxima_be_restart_with_full_stage values(3832, 'name3832', 3842.111, 383200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3832]'); insert into test_proxima_be_restart_with_full_stage values(3833, 'name3833', 3843.111, 383300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3833]'); insert into test_proxima_be_restart_with_full_stage values(3834, 'name3834', 3844.111, 383400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3834]'); insert into test_proxima_be_restart_with_full_stage values(3835, 'name3835', 3845.111, 383500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3835]'); insert into test_proxima_be_restart_with_full_stage values(3836, 'name3836', 3846.111, 383600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3836]'); insert into test_proxima_be_restart_with_full_stage values(3837, 'name3837', 3847.111, 383700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3837]'); insert into test_proxima_be_restart_with_full_stage values(3838, 'name3838', 3848.111, 383800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3838]'); insert into test_proxima_be_restart_with_full_stage values(3839, 'name3839', 3849.111, 383900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3839]'); insert into test_proxima_be_restart_with_full_stage values(3840, 'name3840', 3850.111, 384000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3840]'); insert into test_proxima_be_restart_with_full_stage values(3841, 'name3841', 3851.111, 384100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3841]'); insert into test_proxima_be_restart_with_full_stage values(3842, 'name3842', 3852.111, 384200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3842]'); insert into test_proxima_be_restart_with_full_stage values(3843, 'name3843', 3853.111, 384300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3843]'); insert into test_proxima_be_restart_with_full_stage values(3844, 'name3844', 3854.111, 384400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3844]'); insert into test_proxima_be_restart_with_full_stage values(3845, 'name3845', 3855.111, 384500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3845]'); insert into test_proxima_be_restart_with_full_stage values(3846, 'name3846', 3856.111, 384600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3846]'); insert into test_proxima_be_restart_with_full_stage values(3847, 'name3847', 3857.111, 384700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3847]'); insert into test_proxima_be_restart_with_full_stage values(3848, 'name3848', 3858.111, 384800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3848]'); insert into test_proxima_be_restart_with_full_stage values(3849, 'name3849', 3859.111, 384900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3849]'); insert into test_proxima_be_restart_with_full_stage values(3850, 'name3850', 3860.111, 385000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3850]'); insert into test_proxima_be_restart_with_full_stage values(3851, 'name3851', 3861.111, 385100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3851]'); insert into test_proxima_be_restart_with_full_stage values(3852, 'name3852', 3862.111, 385200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3852]'); insert into test_proxima_be_restart_with_full_stage values(3853, 'name3853', 3863.111, 385300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3853]'); insert into test_proxima_be_restart_with_full_stage values(3854, 'name3854', 3864.111, 385400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3854]'); insert into test_proxima_be_restart_with_full_stage values(3855, 'name3855', 3865.111, 385500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3855]'); insert into test_proxima_be_restart_with_full_stage values(3856, 'name3856', 3866.111, 385600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3856]'); insert into test_proxima_be_restart_with_full_stage values(3857, 'name3857', 3867.111, 385700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3857]'); insert into test_proxima_be_restart_with_full_stage values(3858, 'name3858', 3868.111, 385800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3858]'); insert into test_proxima_be_restart_with_full_stage values(3859, 'name3859', 3869.111, 385900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3859]'); insert into test_proxima_be_restart_with_full_stage values(3860, 'name3860', 3870.111, 386000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3860]'); insert into test_proxima_be_restart_with_full_stage values(3861, 'name3861', 3871.111, 386100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3861]'); insert into test_proxima_be_restart_with_full_stage values(3862, 'name3862', 3872.111, 386200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3862]'); insert into test_proxima_be_restart_with_full_stage values(3863, 'name3863', 3873.111, 386300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3863]'); insert into test_proxima_be_restart_with_full_stage values(3864, 'name3864', 3874.111, 386400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3864]'); insert into test_proxima_be_restart_with_full_stage values(3865, 'name3865', 3875.111, 386500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3865]'); insert into test_proxima_be_restart_with_full_stage values(3866, 'name3866', 3876.111, 386600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3866]'); insert into test_proxima_be_restart_with_full_stage values(3867, 'name3867', 3877.111, 386700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3867]'); insert into test_proxima_be_restart_with_full_stage values(3868, 'name3868', 3878.111, 386800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3868]'); insert into test_proxima_be_restart_with_full_stage values(3869, 'name3869', 3879.111, 386900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3869]'); insert into test_proxima_be_restart_with_full_stage values(3870, 'name3870', 3880.111, 387000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3870]'); insert into test_proxima_be_restart_with_full_stage values(3871, 'name3871', 3881.111, 387100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3871]'); insert into test_proxima_be_restart_with_full_stage values(3872, 'name3872', 3882.111, 387200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3872]'); insert into test_proxima_be_restart_with_full_stage values(3873, 'name3873', 3883.111, 387300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3873]'); insert into test_proxima_be_restart_with_full_stage values(3874, 'name3874', 3884.111, 387400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3874]'); insert into test_proxima_be_restart_with_full_stage values(3875, 'name3875', 3885.111, 387500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3875]'); insert into test_proxima_be_restart_with_full_stage values(3876, 'name3876', 3886.111, 387600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3876]'); insert into test_proxima_be_restart_with_full_stage values(3877, 'name3877', 3887.111, 387700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3877]'); insert into test_proxima_be_restart_with_full_stage values(3878, 'name3878', 3888.111, 387800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3878]'); insert into test_proxima_be_restart_with_full_stage values(3879, 'name3879', 3889.111, 387900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3879]'); insert into test_proxima_be_restart_with_full_stage values(3880, 'name3880', 3890.111, 388000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3880]'); insert into test_proxima_be_restart_with_full_stage values(3881, 'name3881', 3891.111, 388100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3881]'); insert into test_proxima_be_restart_with_full_stage values(3882, 'name3882', 3892.111, 388200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3882]'); insert into test_proxima_be_restart_with_full_stage values(3883, 'name3883', 3893.111, 388300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3883]'); insert into test_proxima_be_restart_with_full_stage values(3884, 'name3884', 3894.111, 388400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3884]'); insert into test_proxima_be_restart_with_full_stage values(3885, 'name3885', 3895.111, 388500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3885]'); insert into test_proxima_be_restart_with_full_stage values(3886, 'name3886', 3896.111, 388600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3886]'); insert into test_proxima_be_restart_with_full_stage values(3887, 'name3887', 3897.111, 388700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3887]'); insert into test_proxima_be_restart_with_full_stage values(3888, 'name3888', 3898.111, 388800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3888]'); insert into test_proxima_be_restart_with_full_stage values(3889, 'name3889', 3899.111, 388900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3889]'); insert into test_proxima_be_restart_with_full_stage values(3890, 'name3890', 3900.111, 389000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3890]'); insert into test_proxima_be_restart_with_full_stage values(3891, 'name3891', 3901.111, 389100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3891]'); insert into test_proxima_be_restart_with_full_stage values(3892, 'name3892', 3902.111, 389200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3892]'); insert into test_proxima_be_restart_with_full_stage values(3893, 'name3893', 3903.111, 389300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3893]'); insert into test_proxima_be_restart_with_full_stage values(3894, 'name3894', 3904.111, 389400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3894]'); insert into test_proxima_be_restart_with_full_stage values(3895, 'name3895', 3905.111, 389500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3895]'); insert into test_proxima_be_restart_with_full_stage values(3896, 'name3896', 3906.111, 389600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3896]'); insert into test_proxima_be_restart_with_full_stage values(3897, 'name3897', 3907.111, 389700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3897]'); insert into test_proxima_be_restart_with_full_stage values(3898, 'name3898', 3908.111, 389800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3898]'); insert into test_proxima_be_restart_with_full_stage values(3899, 'name3899', 3909.111, 389900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3899]'); insert into test_proxima_be_restart_with_full_stage values(3900, 'name3900', 3910.111, 390000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3900]'); insert into test_proxima_be_restart_with_full_stage values(3901, 'name3901', 3911.111, 390100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3901]'); insert into test_proxima_be_restart_with_full_stage values(3902, 'name3902', 3912.111, 390200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3902]'); insert into test_proxima_be_restart_with_full_stage values(3903, 'name3903', 3913.111, 390300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3903]'); insert into test_proxima_be_restart_with_full_stage values(3904, 'name3904', 3914.111, 390400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3904]'); insert into test_proxima_be_restart_with_full_stage values(3905, 'name3905', 3915.111, 390500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3905]'); insert into test_proxima_be_restart_with_full_stage values(3906, 'name3906', 3916.111, 390600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3906]'); insert into test_proxima_be_restart_with_full_stage values(3907, 'name3907', 3917.111, 390700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3907]'); insert into test_proxima_be_restart_with_full_stage values(3908, 'name3908', 3918.111, 390800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3908]'); insert into test_proxima_be_restart_with_full_stage values(3909, 'name3909', 3919.111, 390900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3909]'); insert into test_proxima_be_restart_with_full_stage values(3910, 'name3910', 3920.111, 391000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3910]'); insert into test_proxima_be_restart_with_full_stage values(3911, 'name3911', 3921.111, 391100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3911]'); insert into test_proxima_be_restart_with_full_stage values(3912, 'name3912', 3922.111, 391200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3912]'); insert into test_proxima_be_restart_with_full_stage values(3913, 'name3913', 3923.111, 391300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3913]'); insert into test_proxima_be_restart_with_full_stage values(3914, 'name3914', 3924.111, 391400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3914]'); insert into test_proxima_be_restart_with_full_stage values(3915, 'name3915', 3925.111, 391500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3915]'); insert into test_proxima_be_restart_with_full_stage values(3916, 'name3916', 3926.111, 391600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3916]'); insert into test_proxima_be_restart_with_full_stage values(3917, 'name3917', 3927.111, 391700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3917]'); insert into test_proxima_be_restart_with_full_stage values(3918, 'name3918', 3928.111, 391800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3918]'); insert into test_proxima_be_restart_with_full_stage values(3919, 'name3919', 3929.111, 391900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3919]'); insert into test_proxima_be_restart_with_full_stage values(3920, 'name3920', 3930.111, 392000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3920]'); insert into test_proxima_be_restart_with_full_stage values(3921, 'name3921', 3931.111, 392100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3921]'); insert into test_proxima_be_restart_with_full_stage values(3922, 'name3922', 3932.111, 392200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3922]'); insert into test_proxima_be_restart_with_full_stage values(3923, 'name3923', 3933.111, 392300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3923]'); insert into test_proxima_be_restart_with_full_stage values(3924, 'name3924', 3934.111, 392400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3924]'); insert into test_proxima_be_restart_with_full_stage values(3925, 'name3925', 3935.111, 392500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3925]'); insert into test_proxima_be_restart_with_full_stage values(3926, 'name3926', 3936.111, 392600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3926]'); insert into test_proxima_be_restart_with_full_stage values(3927, 'name3927', 3937.111, 392700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3927]'); insert into test_proxima_be_restart_with_full_stage values(3928, 'name3928', 3938.111, 392800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3928]'); insert into test_proxima_be_restart_with_full_stage values(3929, 'name3929', 3939.111, 392900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3929]'); insert into test_proxima_be_restart_with_full_stage values(3930, 'name3930', 3940.111, 393000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3930]'); insert into test_proxima_be_restart_with_full_stage values(3931, 'name3931', 3941.111, 393100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3931]'); insert into test_proxima_be_restart_with_full_stage values(3932, 'name3932', 3942.111, 393200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3932]'); insert into test_proxima_be_restart_with_full_stage values(3933, 'name3933', 3943.111, 393300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3933]'); insert into test_proxima_be_restart_with_full_stage values(3934, 'name3934', 3944.111, 393400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3934]'); insert into test_proxima_be_restart_with_full_stage values(3935, 'name3935', 3945.111, 393500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3935]'); insert into test_proxima_be_restart_with_full_stage values(3936, 'name3936', 3946.111, 393600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3936]'); insert into test_proxima_be_restart_with_full_stage values(3937, 'name3937', 3947.111, 393700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3937]'); insert into test_proxima_be_restart_with_full_stage values(3938, 'name3938', 3948.111, 393800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3938]'); insert into test_proxima_be_restart_with_full_stage values(3939, 'name3939', 3949.111, 393900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3939]'); insert into test_proxima_be_restart_with_full_stage values(3940, 'name3940', 3950.111, 394000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3940]'); insert into test_proxima_be_restart_with_full_stage values(3941, 'name3941', 3951.111, 394100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3941]'); insert into test_proxima_be_restart_with_full_stage values(3942, 'name3942', 3952.111, 394200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3942]'); insert into test_proxima_be_restart_with_full_stage values(3943, 'name3943', 3953.111, 394300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3943]'); insert into test_proxima_be_restart_with_full_stage values(3944, 'name3944', 3954.111, 394400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3944]'); insert into test_proxima_be_restart_with_full_stage values(3945, 'name3945', 3955.111, 394500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3945]'); insert into test_proxima_be_restart_with_full_stage values(3946, 'name3946', 3956.111, 394600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3946]'); insert into test_proxima_be_restart_with_full_stage values(3947, 'name3947', 3957.111, 394700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3947]'); insert into test_proxima_be_restart_with_full_stage values(3948, 'name3948', 3958.111, 394800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3948]'); insert into test_proxima_be_restart_with_full_stage values(3949, 'name3949', 3959.111, 394900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3949]'); insert into test_proxima_be_restart_with_full_stage values(3950, 'name3950', 3960.111, 395000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3950]'); insert into test_proxima_be_restart_with_full_stage values(3951, 'name3951', 3961.111, 395100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3951]'); insert into test_proxima_be_restart_with_full_stage values(3952, 'name3952', 3962.111, 395200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3952]'); insert into test_proxima_be_restart_with_full_stage values(3953, 'name3953', 3963.111, 395300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3953]'); insert into test_proxima_be_restart_with_full_stage values(3954, 'name3954', 3964.111, 395400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3954]'); insert into test_proxima_be_restart_with_full_stage values(3955, 'name3955', 3965.111, 395500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3955]'); insert into test_proxima_be_restart_with_full_stage values(3956, 'name3956', 3966.111, 395600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3956]'); insert into test_proxima_be_restart_with_full_stage values(3957, 'name3957', 3967.111, 395700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3957]'); insert into test_proxima_be_restart_with_full_stage values(3958, 'name3958', 3968.111, 395800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3958]'); insert into test_proxima_be_restart_with_full_stage values(3959, 'name3959', 3969.111, 395900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3959]'); insert into test_proxima_be_restart_with_full_stage values(3960, 'name3960', 3970.111, 396000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3960]'); insert into test_proxima_be_restart_with_full_stage values(3961, 'name3961', 3971.111, 396100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3961]'); insert into test_proxima_be_restart_with_full_stage values(3962, 'name3962', 3972.111, 396200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3962]'); insert into test_proxima_be_restart_with_full_stage values(3963, 'name3963', 3973.111, 396300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3963]'); insert into test_proxima_be_restart_with_full_stage values(3964, 'name3964', 3974.111, 396400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3964]'); insert into test_proxima_be_restart_with_full_stage values(3965, 'name3965', 3975.111, 396500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3965]'); insert into test_proxima_be_restart_with_full_stage values(3966, 'name3966', 3976.111, 396600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3966]'); insert into test_proxima_be_restart_with_full_stage values(3967, 'name3967', 3977.111, 396700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3967]'); insert into test_proxima_be_restart_with_full_stage values(3968, 'name3968', 3978.111, 396800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3968]'); insert into test_proxima_be_restart_with_full_stage values(3969, 'name3969', 3979.111, 396900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3969]'); insert into test_proxima_be_restart_with_full_stage values(3970, 'name3970', 3980.111, 397000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3970]'); insert into test_proxima_be_restart_with_full_stage values(3971, 'name3971', 3981.111, 397100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3971]'); insert into test_proxima_be_restart_with_full_stage values(3972, 'name3972', 3982.111, 397200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3972]'); insert into test_proxima_be_restart_with_full_stage values(3973, 'name3973', 3983.111, 397300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3973]'); insert into test_proxima_be_restart_with_full_stage values(3974, 'name3974', 3984.111, 397400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3974]'); insert into test_proxima_be_restart_with_full_stage values(3975, 'name3975', 3985.111, 397500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3975]'); insert into test_proxima_be_restart_with_full_stage values(3976, 'name3976', 3986.111, 397600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3976]'); insert into test_proxima_be_restart_with_full_stage values(3977, 'name3977', 3987.111, 397700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3977]'); insert into test_proxima_be_restart_with_full_stage values(3978, 'name3978', 3988.111, 397800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3978]'); insert into test_proxima_be_restart_with_full_stage values(3979, 'name3979', 3989.111, 397900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3979]'); insert into test_proxima_be_restart_with_full_stage values(3980, 'name3980', 3990.111, 398000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3980]'); insert into test_proxima_be_restart_with_full_stage values(3981, 'name3981', 3991.111, 398100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3981]'); insert into test_proxima_be_restart_with_full_stage values(3982, 'name3982', 3992.111, 398200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3982]'); insert into test_proxima_be_restart_with_full_stage values(3983, 'name3983', 3993.111, 398300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3983]'); insert into test_proxima_be_restart_with_full_stage values(3984, 'name3984', 3994.111, 398400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3984]'); insert into test_proxima_be_restart_with_full_stage values(3985, 'name3985', 3995.111, 398500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3985]'); insert into test_proxima_be_restart_with_full_stage values(3986, 'name3986', 3996.111, 398600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3986]'); insert into test_proxima_be_restart_with_full_stage values(3987, 'name3987', 3997.111, 398700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3987]'); insert into test_proxima_be_restart_with_full_stage values(3988, 'name3988', 3998.111, 398800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3988]'); insert into test_proxima_be_restart_with_full_stage values(3989, 'name3989', 3999.111, 398900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3989]'); insert into test_proxima_be_restart_with_full_stage values(3990, 'name3990', 4000.111, 399000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3990]'); insert into test_proxima_be_restart_with_full_stage values(3991, 'name3991', 4001.111, 399100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3991]'); insert into test_proxima_be_restart_with_full_stage values(3992, 'name3992', 4002.111, 399200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3992]'); insert into test_proxima_be_restart_with_full_stage values(3993, 'name3993', 4003.111, 399300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3993]'); insert into test_proxima_be_restart_with_full_stage values(3994, 'name3994', 4004.111, 399400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3994]'); insert into test_proxima_be_restart_with_full_stage values(3995, 'name3995', 4005.111, 399500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3995]'); insert into test_proxima_be_restart_with_full_stage values(3996, 'name3996', 4006.111, 399600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3996]'); insert into test_proxima_be_restart_with_full_stage values(3997, 'name3997', 4007.111, 399700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3997]'); insert into test_proxima_be_restart_with_full_stage values(3998, 'name3998', 4008.111, 399800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3998]'); insert into test_proxima_be_restart_with_full_stage values(3999, 'name3999', 4009.111, 399900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3999]'); insert into test_proxima_be_restart_with_full_stage values(4000, 'name4000', 4010.111, 400000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4000]'); insert into test_proxima_be_restart_with_full_stage values(4001, 'name4001', 4011.111, 400100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4001]'); insert into test_proxima_be_restart_with_full_stage values(4002, 'name4002', 4012.111, 400200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4002]'); insert into test_proxima_be_restart_with_full_stage values(4003, 'name4003', 4013.111, 400300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4003]'); insert into test_proxima_be_restart_with_full_stage values(4004, 'name4004', 4014.111, 400400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4004]'); insert into test_proxima_be_restart_with_full_stage values(4005, 'name4005', 4015.111, 400500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4005]'); insert into test_proxima_be_restart_with_full_stage values(4006, 'name4006', 4016.111, 400600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4006]'); insert into test_proxima_be_restart_with_full_stage values(4007, 'name4007', 4017.111, 400700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4007]'); insert into test_proxima_be_restart_with_full_stage values(4008, 'name4008', 4018.111, 400800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4008]'); insert into test_proxima_be_restart_with_full_stage values(4009, 'name4009', 4019.111, 400900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4009]'); insert into test_proxima_be_restart_with_full_stage values(4010, 'name4010', 4020.111, 401000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4010]'); insert into test_proxima_be_restart_with_full_stage values(4011, 'name4011', 4021.111, 401100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4011]'); insert into test_proxima_be_restart_with_full_stage values(4012, 'name4012', 4022.111, 401200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4012]'); insert into test_proxima_be_restart_with_full_stage values(4013, 'name4013', 4023.111, 401300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4013]'); insert into test_proxima_be_restart_with_full_stage values(4014, 'name4014', 4024.111, 401400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4014]'); insert into test_proxima_be_restart_with_full_stage values(4015, 'name4015', 4025.111, 401500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4015]'); insert into test_proxima_be_restart_with_full_stage values(4016, 'name4016', 4026.111, 401600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4016]'); insert into test_proxima_be_restart_with_full_stage values(4017, 'name4017', 4027.111, 401700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4017]'); insert into test_proxima_be_restart_with_full_stage values(4018, 'name4018', 4028.111, 401800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4018]'); insert into test_proxima_be_restart_with_full_stage values(4019, 'name4019', 4029.111, 401900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4019]'); insert into test_proxima_be_restart_with_full_stage values(4020, 'name4020', 4030.111, 402000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4020]'); insert into test_proxima_be_restart_with_full_stage values(4021, 'name4021', 4031.111, 402100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4021]'); insert into test_proxima_be_restart_with_full_stage values(4022, 'name4022', 4032.111, 402200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4022]'); insert into test_proxima_be_restart_with_full_stage values(4023, 'name4023', 4033.111, 402300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4023]'); insert into test_proxima_be_restart_with_full_stage values(4024, 'name4024', 4034.111, 402400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4024]'); insert into test_proxima_be_restart_with_full_stage values(4025, 'name4025', 4035.111, 402500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4025]'); insert into test_proxima_be_restart_with_full_stage values(4026, 'name4026', 4036.111, 402600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4026]'); insert into test_proxima_be_restart_with_full_stage values(4027, 'name4027', 4037.111, 402700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4027]'); insert into test_proxima_be_restart_with_full_stage values(4028, 'name4028', 4038.111, 402800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4028]'); insert into test_proxima_be_restart_with_full_stage values(4029, 'name4029', 4039.111, 402900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4029]'); insert into test_proxima_be_restart_with_full_stage values(4030, 'name4030', 4040.111, 403000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4030]'); insert into test_proxima_be_restart_with_full_stage values(4031, 'name4031', 4041.111, 403100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4031]'); insert into test_proxima_be_restart_with_full_stage values(4032, 'name4032', 4042.111, 403200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4032]'); insert into test_proxima_be_restart_with_full_stage values(4033, 'name4033', 4043.111, 403300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4033]'); insert into test_proxima_be_restart_with_full_stage values(4034, 'name4034', 4044.111, 403400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4034]'); insert into test_proxima_be_restart_with_full_stage values(4035, 'name4035', 4045.111, 403500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4035]'); insert into test_proxima_be_restart_with_full_stage values(4036, 'name4036', 4046.111, 403600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4036]'); insert into test_proxima_be_restart_with_full_stage values(4037, 'name4037', 4047.111, 403700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4037]'); insert into test_proxima_be_restart_with_full_stage values(4038, 'name4038', 4048.111, 403800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4038]'); insert into test_proxima_be_restart_with_full_stage values(4039, 'name4039', 4049.111, 403900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4039]'); insert into test_proxima_be_restart_with_full_stage values(4040, 'name4040', 4050.111, 404000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4040]'); insert into test_proxima_be_restart_with_full_stage values(4041, 'name4041', 4051.111, 404100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4041]'); insert into test_proxima_be_restart_with_full_stage values(4042, 'name4042', 4052.111, 404200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4042]'); insert into test_proxima_be_restart_with_full_stage values(4043, 'name4043', 4053.111, 404300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4043]'); insert into test_proxima_be_restart_with_full_stage values(4044, 'name4044', 4054.111, 404400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4044]'); insert into test_proxima_be_restart_with_full_stage values(4045, 'name4045', 4055.111, 404500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4045]'); insert into test_proxima_be_restart_with_full_stage values(4046, 'name4046', 4056.111, 404600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4046]'); insert into test_proxima_be_restart_with_full_stage values(4047, 'name4047', 4057.111, 404700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4047]'); insert into test_proxima_be_restart_with_full_stage values(4048, 'name4048', 4058.111, 404800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4048]'); insert into test_proxima_be_restart_with_full_stage values(4049, 'name4049', 4059.111, 404900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4049]'); insert into test_proxima_be_restart_with_full_stage values(4050, 'name4050', 4060.111, 405000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4050]'); insert into test_proxima_be_restart_with_full_stage values(4051, 'name4051', 4061.111, 405100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4051]'); insert into test_proxima_be_restart_with_full_stage values(4052, 'name4052', 4062.111, 405200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4052]'); insert into test_proxima_be_restart_with_full_stage values(4053, 'name4053', 4063.111, 405300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4053]'); insert into test_proxima_be_restart_with_full_stage values(4054, 'name4054', 4064.111, 405400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4054]'); insert into test_proxima_be_restart_with_full_stage values(4055, 'name4055', 4065.111, 405500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4055]'); insert into test_proxima_be_restart_with_full_stage values(4056, 'name4056', 4066.111, 405600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4056]'); insert into test_proxima_be_restart_with_full_stage values(4057, 'name4057', 4067.111, 405700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4057]'); insert into test_proxima_be_restart_with_full_stage values(4058, 'name4058', 4068.111, 405800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4058]'); insert into test_proxima_be_restart_with_full_stage values(4059, 'name4059', 4069.111, 405900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4059]'); insert into test_proxima_be_restart_with_full_stage values(4060, 'name4060', 4070.111, 406000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4060]'); insert into test_proxima_be_restart_with_full_stage values(4061, 'name4061', 4071.111, 406100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4061]'); insert into test_proxima_be_restart_with_full_stage values(4062, 'name4062', 4072.111, 406200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4062]'); insert into test_proxima_be_restart_with_full_stage values(4063, 'name4063', 4073.111, 406300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4063]'); insert into test_proxima_be_restart_with_full_stage values(4064, 'name4064', 4074.111, 406400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4064]'); insert into test_proxima_be_restart_with_full_stage values(4065, 'name4065', 4075.111, 406500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4065]'); insert into test_proxima_be_restart_with_full_stage values(4066, 'name4066', 4076.111, 406600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4066]'); insert into test_proxima_be_restart_with_full_stage values(4067, 'name4067', 4077.111, 406700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4067]'); insert into test_proxima_be_restart_with_full_stage values(4068, 'name4068', 4078.111, 406800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4068]'); insert into test_proxima_be_restart_with_full_stage values(4069, 'name4069', 4079.111, 406900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4069]'); insert into test_proxima_be_restart_with_full_stage values(4070, 'name4070', 4080.111, 407000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4070]'); insert into test_proxima_be_restart_with_full_stage values(4071, 'name4071', 4081.111, 407100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4071]'); insert into test_proxima_be_restart_with_full_stage values(4072, 'name4072', 4082.111, 407200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4072]'); insert into test_proxima_be_restart_with_full_stage values(4073, 'name4073', 4083.111, 407300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4073]'); insert into test_proxima_be_restart_with_full_stage values(4074, 'name4074', 4084.111, 407400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4074]'); insert into test_proxima_be_restart_with_full_stage values(4075, 'name4075', 4085.111, 407500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4075]'); insert into test_proxima_be_restart_with_full_stage values(4076, 'name4076', 4086.111, 407600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4076]'); insert into test_proxima_be_restart_with_full_stage values(4077, 'name4077', 4087.111, 407700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4077]'); insert into test_proxima_be_restart_with_full_stage values(4078, 'name4078', 4088.111, 407800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4078]'); insert into test_proxima_be_restart_with_full_stage values(4079, 'name4079', 4089.111, 407900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4079]'); insert into test_proxima_be_restart_with_full_stage values(4080, 'name4080', 4090.111, 408000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4080]'); insert into test_proxima_be_restart_with_full_stage values(4081, 'name4081', 4091.111, 408100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4081]'); insert into test_proxima_be_restart_with_full_stage values(4082, 'name4082', 4092.111, 408200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4082]'); insert into test_proxima_be_restart_with_full_stage values(4083, 'name4083', 4093.111, 408300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4083]'); insert into test_proxima_be_restart_with_full_stage values(4084, 'name4084', 4094.111, 408400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4084]'); insert into test_proxima_be_restart_with_full_stage values(4085, 'name4085', 4095.111, 408500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4085]'); insert into test_proxima_be_restart_with_full_stage values(4086, 'name4086', 4096.111, 408600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4086]'); insert into test_proxima_be_restart_with_full_stage values(4087, 'name4087', 4097.111, 408700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4087]'); insert into test_proxima_be_restart_with_full_stage values(4088, 'name4088', 4098.111, 408800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4088]'); insert into test_proxima_be_restart_with_full_stage values(4089, 'name4089', 4099.111, 408900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4089]'); insert into test_proxima_be_restart_with_full_stage values(4090, 'name4090', 4100.111, 409000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4090]'); insert into test_proxima_be_restart_with_full_stage values(4091, 'name4091', 4101.111, 409100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4091]'); insert into test_proxima_be_restart_with_full_stage values(4092, 'name4092', 4102.111, 409200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4092]'); insert into test_proxima_be_restart_with_full_stage values(4093, 'name4093', 4103.111, 409300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4093]'); insert into test_proxima_be_restart_with_full_stage values(4094, 'name4094', 4104.111, 409400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4094]'); insert into test_proxima_be_restart_with_full_stage values(4095, 'name4095', 4105.111, 409500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4095]'); insert into test_proxima_be_restart_with_full_stage values(4096, 'name4096', 4106.111, 409600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4096]'); insert into test_proxima_be_restart_with_full_stage values(4097, 'name4097', 4107.111, 409700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4097]'); insert into test_proxima_be_restart_with_full_stage values(4098, 'name4098', 4108.111, 409800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4098]'); insert into test_proxima_be_restart_with_full_stage values(4099, 'name4099', 4109.111, 409900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4099]'); insert into test_proxima_be_restart_with_full_stage values(4100, 'name4100', 4110.111, 410000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4100]'); insert into test_proxima_be_restart_with_full_stage values(4101, 'name4101', 4111.111, 410100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4101]'); insert into test_proxima_be_restart_with_full_stage values(4102, 'name4102', 4112.111, 410200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4102]'); insert into test_proxima_be_restart_with_full_stage values(4103, 'name4103', 4113.111, 410300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4103]'); insert into test_proxima_be_restart_with_full_stage values(4104, 'name4104', 4114.111, 410400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4104]'); insert into test_proxima_be_restart_with_full_stage values(4105, 'name4105', 4115.111, 410500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4105]'); insert into test_proxima_be_restart_with_full_stage values(4106, 'name4106', 4116.111, 410600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4106]'); insert into test_proxima_be_restart_with_full_stage values(4107, 'name4107', 4117.111, 410700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4107]'); insert into test_proxima_be_restart_with_full_stage values(4108, 'name4108', 4118.111, 410800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4108]'); insert into test_proxima_be_restart_with_full_stage values(4109, 'name4109', 4119.111, 410900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4109]'); insert into test_proxima_be_restart_with_full_stage values(4110, 'name4110', 4120.111, 411000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4110]'); insert into test_proxima_be_restart_with_full_stage values(4111, 'name4111', 4121.111, 411100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4111]'); insert into test_proxima_be_restart_with_full_stage values(4112, 'name4112', 4122.111, 411200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4112]'); insert into test_proxima_be_restart_with_full_stage values(4113, 'name4113', 4123.111, 411300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4113]'); insert into test_proxima_be_restart_with_full_stage values(4114, 'name4114', 4124.111, 411400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4114]'); insert into test_proxima_be_restart_with_full_stage values(4115, 'name4115', 4125.111, 411500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4115]'); insert into test_proxima_be_restart_with_full_stage values(4116, 'name4116', 4126.111, 411600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4116]'); insert into test_proxima_be_restart_with_full_stage values(4117, 'name4117', 4127.111, 411700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4117]'); insert into test_proxima_be_restart_with_full_stage values(4118, 'name4118', 4128.111, 411800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4118]'); insert into test_proxima_be_restart_with_full_stage values(4119, 'name4119', 4129.111, 411900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4119]'); insert into test_proxima_be_restart_with_full_stage values(4120, 'name4120', 4130.111, 412000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4120]'); insert into test_proxima_be_restart_with_full_stage values(4121, 'name4121', 4131.111, 412100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4121]'); insert into test_proxima_be_restart_with_full_stage values(4122, 'name4122', 4132.111, 412200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4122]'); insert into test_proxima_be_restart_with_full_stage values(4123, 'name4123', 4133.111, 412300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4123]'); insert into test_proxima_be_restart_with_full_stage values(4124, 'name4124', 4134.111, 412400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4124]'); insert into test_proxima_be_restart_with_full_stage values(4125, 'name4125', 4135.111, 412500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4125]'); insert into test_proxima_be_restart_with_full_stage values(4126, 'name4126', 4136.111, 412600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4126]'); insert into test_proxima_be_restart_with_full_stage values(4127, 'name4127', 4137.111, 412700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4127]'); insert into test_proxima_be_restart_with_full_stage values(4128, 'name4128', 4138.111, 412800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4128]'); insert into test_proxima_be_restart_with_full_stage values(4129, 'name4129', 4139.111, 412900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4129]'); insert into test_proxima_be_restart_with_full_stage values(4130, 'name4130', 4140.111, 413000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4130]'); insert into test_proxima_be_restart_with_full_stage values(4131, 'name4131', 4141.111, 413100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4131]'); insert into test_proxima_be_restart_with_full_stage values(4132, 'name4132', 4142.111, 413200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4132]'); insert into test_proxima_be_restart_with_full_stage values(4133, 'name4133', 4143.111, 413300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4133]'); insert into test_proxima_be_restart_with_full_stage values(4134, 'name4134', 4144.111, 413400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4134]'); insert into test_proxima_be_restart_with_full_stage values(4135, 'name4135', 4145.111, 413500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4135]'); insert into test_proxima_be_restart_with_full_stage values(4136, 'name4136', 4146.111, 413600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4136]'); insert into test_proxima_be_restart_with_full_stage values(4137, 'name4137', 4147.111, 413700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4137]'); insert into test_proxima_be_restart_with_full_stage values(4138, 'name4138', 4148.111, 413800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4138]'); insert into test_proxima_be_restart_with_full_stage values(4139, 'name4139', 4149.111, 413900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4139]'); insert into test_proxima_be_restart_with_full_stage values(4140, 'name4140', 4150.111, 414000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4140]'); insert into test_proxima_be_restart_with_full_stage values(4141, 'name4141', 4151.111, 414100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4141]'); insert into test_proxima_be_restart_with_full_stage values(4142, 'name4142', 4152.111, 414200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4142]'); insert into test_proxima_be_restart_with_full_stage values(4143, 'name4143', 4153.111, 414300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4143]'); insert into test_proxima_be_restart_with_full_stage values(4144, 'name4144', 4154.111, 414400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4144]'); insert into test_proxima_be_restart_with_full_stage values(4145, 'name4145', 4155.111, 414500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4145]'); insert into test_proxima_be_restart_with_full_stage values(4146, 'name4146', 4156.111, 414600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4146]'); insert into test_proxima_be_restart_with_full_stage values(4147, 'name4147', 4157.111, 414700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4147]'); insert into test_proxima_be_restart_with_full_stage values(4148, 'name4148', 4158.111, 414800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4148]'); insert into test_proxima_be_restart_with_full_stage values(4149, 'name4149', 4159.111, 414900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4149]'); insert into test_proxima_be_restart_with_full_stage values(4150, 'name4150', 4160.111, 415000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4150]'); insert into test_proxima_be_restart_with_full_stage values(4151, 'name4151', 4161.111, 415100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4151]'); insert into test_proxima_be_restart_with_full_stage values(4152, 'name4152', 4162.111, 415200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4152]'); insert into test_proxima_be_restart_with_full_stage values(4153, 'name4153', 4163.111, 415300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4153]'); insert into test_proxima_be_restart_with_full_stage values(4154, 'name4154', 4164.111, 415400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4154]'); insert into test_proxima_be_restart_with_full_stage values(4155, 'name4155', 4165.111, 415500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4155]'); insert into test_proxima_be_restart_with_full_stage values(4156, 'name4156', 4166.111, 415600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4156]'); insert into test_proxima_be_restart_with_full_stage values(4157, 'name4157', 4167.111, 415700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4157]'); insert into test_proxima_be_restart_with_full_stage values(4158, 'name4158', 4168.111, 415800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4158]'); insert into test_proxima_be_restart_with_full_stage values(4159, 'name4159', 4169.111, 415900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4159]'); insert into test_proxima_be_restart_with_full_stage values(4160, 'name4160', 4170.111, 416000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4160]'); insert into test_proxima_be_restart_with_full_stage values(4161, 'name4161', 4171.111, 416100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4161]'); insert into test_proxima_be_restart_with_full_stage values(4162, 'name4162', 4172.111, 416200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4162]'); insert into test_proxima_be_restart_with_full_stage values(4163, 'name4163', 4173.111, 416300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4163]'); insert into test_proxima_be_restart_with_full_stage values(4164, 'name4164', 4174.111, 416400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4164]'); insert into test_proxima_be_restart_with_full_stage values(4165, 'name4165', 4175.111, 416500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4165]'); insert into test_proxima_be_restart_with_full_stage values(4166, 'name4166', 4176.111, 416600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4166]'); insert into test_proxima_be_restart_with_full_stage values(4167, 'name4167', 4177.111, 416700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4167]'); insert into test_proxima_be_restart_with_full_stage values(4168, 'name4168', 4178.111, 416800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4168]'); insert into test_proxima_be_restart_with_full_stage values(4169, 'name4169', 4179.111, 416900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4169]'); insert into test_proxima_be_restart_with_full_stage values(4170, 'name4170', 4180.111, 417000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4170]'); insert into test_proxima_be_restart_with_full_stage values(4171, 'name4171', 4181.111, 417100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4171]'); insert into test_proxima_be_restart_with_full_stage values(4172, 'name4172', 4182.111, 417200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4172]'); insert into test_proxima_be_restart_with_full_stage values(4173, 'name4173', 4183.111, 417300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4173]'); insert into test_proxima_be_restart_with_full_stage values(4174, 'name4174', 4184.111, 417400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4174]'); insert into test_proxima_be_restart_with_full_stage values(4175, 'name4175', 4185.111, 417500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4175]'); insert into test_proxima_be_restart_with_full_stage values(4176, 'name4176', 4186.111, 417600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4176]'); insert into test_proxima_be_restart_with_full_stage values(4177, 'name4177', 4187.111, 417700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4177]'); insert into test_proxima_be_restart_with_full_stage values(4178, 'name4178', 4188.111, 417800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4178]'); insert into test_proxima_be_restart_with_full_stage values(4179, 'name4179', 4189.111, 417900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4179]'); insert into test_proxima_be_restart_with_full_stage values(4180, 'name4180', 4190.111, 418000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4180]'); insert into test_proxima_be_restart_with_full_stage values(4181, 'name4181', 4191.111, 418100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4181]'); insert into test_proxima_be_restart_with_full_stage values(4182, 'name4182', 4192.111, 418200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4182]'); insert into test_proxima_be_restart_with_full_stage values(4183, 'name4183', 4193.111, 418300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4183]'); insert into test_proxima_be_restart_with_full_stage values(4184, 'name4184', 4194.111, 418400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4184]'); insert into test_proxima_be_restart_with_full_stage values(4185, 'name4185', 4195.111, 418500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4185]'); insert into test_proxima_be_restart_with_full_stage values(4186, 'name4186', 4196.111, 418600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4186]'); insert into test_proxima_be_restart_with_full_stage values(4187, 'name4187', 4197.111, 418700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4187]'); insert into test_proxima_be_restart_with_full_stage values(4188, 'name4188', 4198.111, 418800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4188]'); insert into test_proxima_be_restart_with_full_stage values(4189, 'name4189', 4199.111, 418900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4189]'); insert into test_proxima_be_restart_with_full_stage values(4190, 'name4190', 4200.111, 419000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4190]'); insert into test_proxima_be_restart_with_full_stage values(4191, 'name4191', 4201.111, 419100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4191]'); insert into test_proxima_be_restart_with_full_stage values(4192, 'name4192', 4202.111, 419200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4192]'); insert into test_proxima_be_restart_with_full_stage values(4193, 'name4193', 4203.111, 419300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4193]'); insert into test_proxima_be_restart_with_full_stage values(4194, 'name4194', 4204.111, 419400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4194]'); insert into test_proxima_be_restart_with_full_stage values(4195, 'name4195', 4205.111, 419500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4195]'); insert into test_proxima_be_restart_with_full_stage values(4196, 'name4196', 4206.111, 419600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4196]'); insert into test_proxima_be_restart_with_full_stage values(4197, 'name4197', 4207.111, 419700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4197]'); insert into test_proxima_be_restart_with_full_stage values(4198, 'name4198', 4208.111, 419800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4198]'); insert into test_proxima_be_restart_with_full_stage values(4199, 'name4199', 4209.111, 419900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4199]'); insert into test_proxima_be_restart_with_full_stage values(4200, 'name4200', 4210.111, 420000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4200]'); insert into test_proxima_be_restart_with_full_stage values(4201, 'name4201', 4211.111, 420100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4201]'); insert into test_proxima_be_restart_with_full_stage values(4202, 'name4202', 4212.111, 420200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4202]'); insert into test_proxima_be_restart_with_full_stage values(4203, 'name4203', 4213.111, 420300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4203]'); insert into test_proxima_be_restart_with_full_stage values(4204, 'name4204', 4214.111, 420400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4204]'); insert into test_proxima_be_restart_with_full_stage values(4205, 'name4205', 4215.111, 420500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4205]'); insert into test_proxima_be_restart_with_full_stage values(4206, 'name4206', 4216.111, 420600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4206]'); insert into test_proxima_be_restart_with_full_stage values(4207, 'name4207', 4217.111, 420700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4207]'); insert into test_proxima_be_restart_with_full_stage values(4208, 'name4208', 4218.111, 420800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4208]'); insert into test_proxima_be_restart_with_full_stage values(4209, 'name4209', 4219.111, 420900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4209]'); insert into test_proxima_be_restart_with_full_stage values(4210, 'name4210', 4220.111, 421000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4210]'); insert into test_proxima_be_restart_with_full_stage values(4211, 'name4211', 4221.111, 421100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4211]'); insert into test_proxima_be_restart_with_full_stage values(4212, 'name4212', 4222.111, 421200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4212]'); insert into test_proxima_be_restart_with_full_stage values(4213, 'name4213', 4223.111, 421300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4213]'); insert into test_proxima_be_restart_with_full_stage values(4214, 'name4214', 4224.111, 421400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4214]'); insert into test_proxima_be_restart_with_full_stage values(4215, 'name4215', 4225.111, 421500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4215]'); insert into test_proxima_be_restart_with_full_stage values(4216, 'name4216', 4226.111, 421600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4216]'); insert into test_proxima_be_restart_with_full_stage values(4217, 'name4217', 4227.111, 421700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4217]'); insert into test_proxima_be_restart_with_full_stage values(4218, 'name4218', 4228.111, 421800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4218]'); insert into test_proxima_be_restart_with_full_stage values(4219, 'name4219', 4229.111, 421900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4219]'); insert into test_proxima_be_restart_with_full_stage values(4220, 'name4220', 4230.111, 422000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4220]'); insert into test_proxima_be_restart_with_full_stage values(4221, 'name4221', 4231.111, 422100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4221]'); insert into test_proxima_be_restart_with_full_stage values(4222, 'name4222', 4232.111, 422200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4222]'); insert into test_proxima_be_restart_with_full_stage values(4223, 'name4223', 4233.111, 422300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4223]'); insert into test_proxima_be_restart_with_full_stage values(4224, 'name4224', 4234.111, 422400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4224]'); insert into test_proxima_be_restart_with_full_stage values(4225, 'name4225', 4235.111, 422500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4225]'); insert into test_proxima_be_restart_with_full_stage values(4226, 'name4226', 4236.111, 422600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4226]'); insert into test_proxima_be_restart_with_full_stage values(4227, 'name4227', 4237.111, 422700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4227]'); insert into test_proxima_be_restart_with_full_stage values(4228, 'name4228', 4238.111, 422800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4228]'); insert into test_proxima_be_restart_with_full_stage values(4229, 'name4229', 4239.111, 422900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4229]'); insert into test_proxima_be_restart_with_full_stage values(4230, 'name4230', 4240.111, 423000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4230]'); insert into test_proxima_be_restart_with_full_stage values(4231, 'name4231', 4241.111, 423100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4231]'); insert into test_proxima_be_restart_with_full_stage values(4232, 'name4232', 4242.111, 423200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4232]'); insert into test_proxima_be_restart_with_full_stage values(4233, 'name4233', 4243.111, 423300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4233]'); insert into test_proxima_be_restart_with_full_stage values(4234, 'name4234', 4244.111, 423400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4234]'); insert into test_proxima_be_restart_with_full_stage values(4235, 'name4235', 4245.111, 423500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4235]'); insert into test_proxima_be_restart_with_full_stage values(4236, 'name4236', 4246.111, 423600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4236]'); insert into test_proxima_be_restart_with_full_stage values(4237, 'name4237', 4247.111, 423700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4237]'); insert into test_proxima_be_restart_with_full_stage values(4238, 'name4238', 4248.111, 423800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4238]'); insert into test_proxima_be_restart_with_full_stage values(4239, 'name4239', 4249.111, 423900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4239]'); insert into test_proxima_be_restart_with_full_stage values(4240, 'name4240', 4250.111, 424000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4240]'); insert into test_proxima_be_restart_with_full_stage values(4241, 'name4241', 4251.111, 424100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4241]'); insert into test_proxima_be_restart_with_full_stage values(4242, 'name4242', 4252.111, 424200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4242]'); insert into test_proxima_be_restart_with_full_stage values(4243, 'name4243', 4253.111, 424300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4243]'); insert into test_proxima_be_restart_with_full_stage values(4244, 'name4244', 4254.111, 424400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4244]'); insert into test_proxima_be_restart_with_full_stage values(4245, 'name4245', 4255.111, 424500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4245]'); insert into test_proxima_be_restart_with_full_stage values(4246, 'name4246', 4256.111, 424600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4246]'); insert into test_proxima_be_restart_with_full_stage values(4247, 'name4247', 4257.111, 424700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4247]'); insert into test_proxima_be_restart_with_full_stage values(4248, 'name4248', 4258.111, 424800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4248]'); insert into test_proxima_be_restart_with_full_stage values(4249, 'name4249', 4259.111, 424900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4249]'); insert into test_proxima_be_restart_with_full_stage values(4250, 'name4250', 4260.111, 425000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4250]'); insert into test_proxima_be_restart_with_full_stage values(4251, 'name4251', 4261.111, 425100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4251]'); insert into test_proxima_be_restart_with_full_stage values(4252, 'name4252', 4262.111, 425200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4252]'); insert into test_proxima_be_restart_with_full_stage values(4253, 'name4253', 4263.111, 425300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4253]'); insert into test_proxima_be_restart_with_full_stage values(4254, 'name4254', 4264.111, 425400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4254]'); insert into test_proxima_be_restart_with_full_stage values(4255, 'name4255', 4265.111, 425500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4255]'); insert into test_proxima_be_restart_with_full_stage values(4256, 'name4256', 4266.111, 425600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4256]'); insert into test_proxima_be_restart_with_full_stage values(4257, 'name4257', 4267.111, 425700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4257]'); insert into test_proxima_be_restart_with_full_stage values(4258, 'name4258', 4268.111, 425800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4258]'); insert into test_proxima_be_restart_with_full_stage values(4259, 'name4259', 4269.111, 425900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4259]'); insert into test_proxima_be_restart_with_full_stage values(4260, 'name4260', 4270.111, 426000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4260]'); insert into test_proxima_be_restart_with_full_stage values(4261, 'name4261', 4271.111, 426100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4261]'); insert into test_proxima_be_restart_with_full_stage values(4262, 'name4262', 4272.111, 426200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4262]'); insert into test_proxima_be_restart_with_full_stage values(4263, 'name4263', 4273.111, 426300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4263]'); insert into test_proxima_be_restart_with_full_stage values(4264, 'name4264', 4274.111, 426400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4264]'); insert into test_proxima_be_restart_with_full_stage values(4265, 'name4265', 4275.111, 426500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4265]'); insert into test_proxima_be_restart_with_full_stage values(4266, 'name4266', 4276.111, 426600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4266]'); insert into test_proxima_be_restart_with_full_stage values(4267, 'name4267', 4277.111, 426700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4267]'); insert into test_proxima_be_restart_with_full_stage values(4268, 'name4268', 4278.111, 426800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4268]'); insert into test_proxima_be_restart_with_full_stage values(4269, 'name4269', 4279.111, 426900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4269]'); insert into test_proxima_be_restart_with_full_stage values(4270, 'name4270', 4280.111, 427000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4270]'); insert into test_proxima_be_restart_with_full_stage values(4271, 'name4271', 4281.111, 427100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4271]'); insert into test_proxima_be_restart_with_full_stage values(4272, 'name4272', 4282.111, 427200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4272]'); insert into test_proxima_be_restart_with_full_stage values(4273, 'name4273', 4283.111, 427300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4273]'); insert into test_proxima_be_restart_with_full_stage values(4274, 'name4274', 4284.111, 427400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4274]'); insert into test_proxima_be_restart_with_full_stage values(4275, 'name4275', 4285.111, 427500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4275]'); insert into test_proxima_be_restart_with_full_stage values(4276, 'name4276', 4286.111, 427600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4276]'); insert into test_proxima_be_restart_with_full_stage values(4277, 'name4277', 4287.111, 427700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4277]'); insert into test_proxima_be_restart_with_full_stage values(4278, 'name4278', 4288.111, 427800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4278]'); insert into test_proxima_be_restart_with_full_stage values(4279, 'name4279', 4289.111, 427900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4279]'); insert into test_proxima_be_restart_with_full_stage values(4280, 'name4280', 4290.111, 428000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4280]'); insert into test_proxima_be_restart_with_full_stage values(4281, 'name4281', 4291.111, 428100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4281]'); insert into test_proxima_be_restart_with_full_stage values(4282, 'name4282', 4292.111, 428200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4282]'); insert into test_proxima_be_restart_with_full_stage values(4283, 'name4283', 4293.111, 428300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4283]'); insert into test_proxima_be_restart_with_full_stage values(4284, 'name4284', 4294.111, 428400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4284]'); insert into test_proxima_be_restart_with_full_stage values(4285, 'name4285', 4295.111, 428500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4285]'); insert into test_proxima_be_restart_with_full_stage values(4286, 'name4286', 4296.111, 428600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4286]'); insert into test_proxima_be_restart_with_full_stage values(4287, 'name4287', 4297.111, 428700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4287]'); insert into test_proxima_be_restart_with_full_stage values(4288, 'name4288', 4298.111, 428800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4288]'); insert into test_proxima_be_restart_with_full_stage values(4289, 'name4289', 4299.111, 428900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4289]'); insert into test_proxima_be_restart_with_full_stage values(4290, 'name4290', 4300.111, 429000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4290]'); insert into test_proxima_be_restart_with_full_stage values(4291, 'name4291', 4301.111, 429100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4291]'); insert into test_proxima_be_restart_with_full_stage values(4292, 'name4292', 4302.111, 429200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4292]'); insert into test_proxima_be_restart_with_full_stage values(4293, 'name4293', 4303.111, 429300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4293]'); insert into test_proxima_be_restart_with_full_stage values(4294, 'name4294', 4304.111, 429400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4294]'); insert into test_proxima_be_restart_with_full_stage values(4295, 'name4295', 4305.111, 429500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4295]'); insert into test_proxima_be_restart_with_full_stage values(4296, 'name4296', 4306.111, 429600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4296]'); insert into test_proxima_be_restart_with_full_stage values(4297, 'name4297', 4307.111, 429700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4297]'); insert into test_proxima_be_restart_with_full_stage values(4298, 'name4298', 4308.111, 429800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4298]'); insert into test_proxima_be_restart_with_full_stage values(4299, 'name4299', 4309.111, 429900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4299]'); insert into test_proxima_be_restart_with_full_stage values(4300, 'name4300', 4310.111, 430000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4300]'); insert into test_proxima_be_restart_with_full_stage values(4301, 'name4301', 4311.111, 430100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4301]'); insert into test_proxima_be_restart_with_full_stage values(4302, 'name4302', 4312.111, 430200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4302]'); insert into test_proxima_be_restart_with_full_stage values(4303, 'name4303', 4313.111, 430300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4303]'); insert into test_proxima_be_restart_with_full_stage values(4304, 'name4304', 4314.111, 430400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4304]'); insert into test_proxima_be_restart_with_full_stage values(4305, 'name4305', 4315.111, 430500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4305]'); insert into test_proxima_be_restart_with_full_stage values(4306, 'name4306', 4316.111, 430600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4306]'); insert into test_proxima_be_restart_with_full_stage values(4307, 'name4307', 4317.111, 430700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4307]'); insert into test_proxima_be_restart_with_full_stage values(4308, 'name4308', 4318.111, 430800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4308]'); insert into test_proxima_be_restart_with_full_stage values(4309, 'name4309', 4319.111, 430900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4309]'); insert into test_proxima_be_restart_with_full_stage values(4310, 'name4310', 4320.111, 431000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4310]'); insert into test_proxima_be_restart_with_full_stage values(4311, 'name4311', 4321.111, 431100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4311]'); insert into test_proxima_be_restart_with_full_stage values(4312, 'name4312', 4322.111, 431200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4312]'); insert into test_proxima_be_restart_with_full_stage values(4313, 'name4313', 4323.111, 431300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4313]'); insert into test_proxima_be_restart_with_full_stage values(4314, 'name4314', 4324.111, 431400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4314]'); insert into test_proxima_be_restart_with_full_stage values(4315, 'name4315', 4325.111, 431500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4315]'); insert into test_proxima_be_restart_with_full_stage values(4316, 'name4316', 4326.111, 431600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4316]'); insert into test_proxima_be_restart_with_full_stage values(4317, 'name4317', 4327.111, 431700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4317]'); insert into test_proxima_be_restart_with_full_stage values(4318, 'name4318', 4328.111, 431800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4318]'); insert into test_proxima_be_restart_with_full_stage values(4319, 'name4319', 4329.111, 431900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4319]'); insert into test_proxima_be_restart_with_full_stage values(4320, 'name4320', 4330.111, 432000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4320]'); insert into test_proxima_be_restart_with_full_stage values(4321, 'name4321', 4331.111, 432100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4321]'); insert into test_proxima_be_restart_with_full_stage values(4322, 'name4322', 4332.111, 432200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4322]'); insert into test_proxima_be_restart_with_full_stage values(4323, 'name4323', 4333.111, 432300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4323]'); insert into test_proxima_be_restart_with_full_stage values(4324, 'name4324', 4334.111, 432400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4324]'); insert into test_proxima_be_restart_with_full_stage values(4325, 'name4325', 4335.111, 432500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4325]'); insert into test_proxima_be_restart_with_full_stage values(4326, 'name4326', 4336.111, 432600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4326]'); insert into test_proxima_be_restart_with_full_stage values(4327, 'name4327', 4337.111, 432700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4327]'); insert into test_proxima_be_restart_with_full_stage values(4328, 'name4328', 4338.111, 432800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4328]'); insert into test_proxima_be_restart_with_full_stage values(4329, 'name4329', 4339.111, 432900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4329]'); insert into test_proxima_be_restart_with_full_stage values(4330, 'name4330', 4340.111, 433000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4330]'); insert into test_proxima_be_restart_with_full_stage values(4331, 'name4331', 4341.111, 433100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4331]'); insert into test_proxima_be_restart_with_full_stage values(4332, 'name4332', 4342.111, 433200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4332]'); insert into test_proxima_be_restart_with_full_stage values(4333, 'name4333', 4343.111, 433300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4333]'); insert into test_proxima_be_restart_with_full_stage values(4334, 'name4334', 4344.111, 433400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4334]'); insert into test_proxima_be_restart_with_full_stage values(4335, 'name4335', 4345.111, 433500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4335]'); insert into test_proxima_be_restart_with_full_stage values(4336, 'name4336', 4346.111, 433600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4336]'); insert into test_proxima_be_restart_with_full_stage values(4337, 'name4337', 4347.111, 433700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4337]'); insert into test_proxima_be_restart_with_full_stage values(4338, 'name4338', 4348.111, 433800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4338]'); insert into test_proxima_be_restart_with_full_stage values(4339, 'name4339', 4349.111, 433900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4339]'); insert into test_proxima_be_restart_with_full_stage values(4340, 'name4340', 4350.111, 434000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4340]'); insert into test_proxima_be_restart_with_full_stage values(4341, 'name4341', 4351.111, 434100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4341]'); insert into test_proxima_be_restart_with_full_stage values(4342, 'name4342', 4352.111, 434200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4342]'); insert into test_proxima_be_restart_with_full_stage values(4343, 'name4343', 4353.111, 434300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4343]'); insert into test_proxima_be_restart_with_full_stage values(4344, 'name4344', 4354.111, 434400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4344]'); insert into test_proxima_be_restart_with_full_stage values(4345, 'name4345', 4355.111, 434500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4345]'); insert into test_proxima_be_restart_with_full_stage values(4346, 'name4346', 4356.111, 434600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4346]'); insert into test_proxima_be_restart_with_full_stage values(4347, 'name4347', 4357.111, 434700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4347]'); insert into test_proxima_be_restart_with_full_stage values(4348, 'name4348', 4358.111, 434800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4348]'); insert into test_proxima_be_restart_with_full_stage values(4349, 'name4349', 4359.111, 434900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4349]'); insert into test_proxima_be_restart_with_full_stage values(4350, 'name4350', 4360.111, 435000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4350]'); insert into test_proxima_be_restart_with_full_stage values(4351, 'name4351', 4361.111, 435100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4351]'); insert into test_proxima_be_restart_with_full_stage values(4352, 'name4352', 4362.111, 435200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4352]'); insert into test_proxima_be_restart_with_full_stage values(4353, 'name4353', 4363.111, 435300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4353]'); insert into test_proxima_be_restart_with_full_stage values(4354, 'name4354', 4364.111, 435400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4354]'); insert into test_proxima_be_restart_with_full_stage values(4355, 'name4355', 4365.111, 435500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4355]'); insert into test_proxima_be_restart_with_full_stage values(4356, 'name4356', 4366.111, 435600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4356]'); insert into test_proxima_be_restart_with_full_stage values(4357, 'name4357', 4367.111, 435700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4357]'); insert into test_proxima_be_restart_with_full_stage values(4358, 'name4358', 4368.111, 435800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4358]'); insert into test_proxima_be_restart_with_full_stage values(4359, 'name4359', 4369.111, 435900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4359]'); insert into test_proxima_be_restart_with_full_stage values(4360, 'name4360', 4370.111, 436000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4360]'); insert into test_proxima_be_restart_with_full_stage values(4361, 'name4361', 4371.111, 436100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4361]'); insert into test_proxima_be_restart_with_full_stage values(4362, 'name4362', 4372.111, 436200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4362]'); insert into test_proxima_be_restart_with_full_stage values(4363, 'name4363', 4373.111, 436300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4363]'); insert into test_proxima_be_restart_with_full_stage values(4364, 'name4364', 4374.111, 436400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4364]'); insert into test_proxima_be_restart_with_full_stage values(4365, 'name4365', 4375.111, 436500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4365]'); insert into test_proxima_be_restart_with_full_stage values(4366, 'name4366', 4376.111, 436600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4366]'); insert into test_proxima_be_restart_with_full_stage values(4367, 'name4367', 4377.111, 436700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4367]'); insert into test_proxima_be_restart_with_full_stage values(4368, 'name4368', 4378.111, 436800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4368]'); insert into test_proxima_be_restart_with_full_stage values(4369, 'name4369', 4379.111, 436900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4369]'); insert into test_proxima_be_restart_with_full_stage values(4370, 'name4370', 4380.111, 437000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4370]'); insert into test_proxima_be_restart_with_full_stage values(4371, 'name4371', 4381.111, 437100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4371]'); insert into test_proxima_be_restart_with_full_stage values(4372, 'name4372', 4382.111, 437200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4372]'); insert into test_proxima_be_restart_with_full_stage values(4373, 'name4373', 4383.111, 437300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4373]'); insert into test_proxima_be_restart_with_full_stage values(4374, 'name4374', 4384.111, 437400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4374]'); insert into test_proxima_be_restart_with_full_stage values(4375, 'name4375', 4385.111, 437500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4375]'); insert into test_proxima_be_restart_with_full_stage values(4376, 'name4376', 4386.111, 437600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4376]'); insert into test_proxima_be_restart_with_full_stage values(4377, 'name4377', 4387.111, 437700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4377]'); insert into test_proxima_be_restart_with_full_stage values(4378, 'name4378', 4388.111, 437800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4378]'); insert into test_proxima_be_restart_with_full_stage values(4379, 'name4379', 4389.111, 437900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4379]'); insert into test_proxima_be_restart_with_full_stage values(4380, 'name4380', 4390.111, 438000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4380]'); insert into test_proxima_be_restart_with_full_stage values(4381, 'name4381', 4391.111, 438100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4381]'); insert into test_proxima_be_restart_with_full_stage values(4382, 'name4382', 4392.111, 438200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4382]'); insert into test_proxima_be_restart_with_full_stage values(4383, 'name4383', 4393.111, 438300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4383]'); insert into test_proxima_be_restart_with_full_stage values(4384, 'name4384', 4394.111, 438400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4384]'); insert into test_proxima_be_restart_with_full_stage values(4385, 'name4385', 4395.111, 438500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4385]'); insert into test_proxima_be_restart_with_full_stage values(4386, 'name4386', 4396.111, 438600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4386]'); insert into test_proxima_be_restart_with_full_stage values(4387, 'name4387', 4397.111, 438700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4387]'); insert into test_proxima_be_restart_with_full_stage values(4388, 'name4388', 4398.111, 438800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4388]'); insert into test_proxima_be_restart_with_full_stage values(4389, 'name4389', 4399.111, 438900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4389]'); insert into test_proxima_be_restart_with_full_stage values(4390, 'name4390', 4400.111, 439000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4390]'); insert into test_proxima_be_restart_with_full_stage values(4391, 'name4391', 4401.111, 439100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4391]'); insert into test_proxima_be_restart_with_full_stage values(4392, 'name4392', 4402.111, 439200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4392]'); insert into test_proxima_be_restart_with_full_stage values(4393, 'name4393', 4403.111, 439300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4393]'); insert into test_proxima_be_restart_with_full_stage values(4394, 'name4394', 4404.111, 439400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4394]'); insert into test_proxima_be_restart_with_full_stage values(4395, 'name4395', 4405.111, 439500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4395]'); insert into test_proxima_be_restart_with_full_stage values(4396, 'name4396', 4406.111, 439600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4396]'); insert into test_proxima_be_restart_with_full_stage values(4397, 'name4397', 4407.111, 439700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4397]'); insert into test_proxima_be_restart_with_full_stage values(4398, 'name4398', 4408.111, 439800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4398]'); insert into test_proxima_be_restart_with_full_stage values(4399, 'name4399', 4409.111, 439900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4399]'); insert into test_proxima_be_restart_with_full_stage values(4400, 'name4400', 4410.111, 440000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4400]'); insert into test_proxima_be_restart_with_full_stage values(4401, 'name4401', 4411.111, 440100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4401]'); insert into test_proxima_be_restart_with_full_stage values(4402, 'name4402', 4412.111, 440200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4402]'); insert into test_proxima_be_restart_with_full_stage values(4403, 'name4403', 4413.111, 440300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4403]'); insert into test_proxima_be_restart_with_full_stage values(4404, 'name4404', 4414.111, 440400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4404]'); insert into test_proxima_be_restart_with_full_stage values(4405, 'name4405', 4415.111, 440500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4405]'); insert into test_proxima_be_restart_with_full_stage values(4406, 'name4406', 4416.111, 440600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4406]'); insert into test_proxima_be_restart_with_full_stage values(4407, 'name4407', 4417.111, 440700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4407]'); insert into test_proxima_be_restart_with_full_stage values(4408, 'name4408', 4418.111, 440800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4408]'); insert into test_proxima_be_restart_with_full_stage values(4409, 'name4409', 4419.111, 440900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4409]'); insert into test_proxima_be_restart_with_full_stage values(4410, 'name4410', 4420.111, 441000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4410]'); insert into test_proxima_be_restart_with_full_stage values(4411, 'name4411', 4421.111, 441100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4411]'); insert into test_proxima_be_restart_with_full_stage values(4412, 'name4412', 4422.111, 441200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4412]'); insert into test_proxima_be_restart_with_full_stage values(4413, 'name4413', 4423.111, 441300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4413]'); insert into test_proxima_be_restart_with_full_stage values(4414, 'name4414', 4424.111, 441400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4414]'); insert into test_proxima_be_restart_with_full_stage values(4415, 'name4415', 4425.111, 441500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4415]'); insert into test_proxima_be_restart_with_full_stage values(4416, 'name4416', 4426.111, 441600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4416]'); insert into test_proxima_be_restart_with_full_stage values(4417, 'name4417', 4427.111, 441700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4417]'); insert into test_proxima_be_restart_with_full_stage values(4418, 'name4418', 4428.111, 441800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4418]'); insert into test_proxima_be_restart_with_full_stage values(4419, 'name4419', 4429.111, 441900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4419]'); insert into test_proxima_be_restart_with_full_stage values(4420, 'name4420', 4430.111, 442000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4420]'); insert into test_proxima_be_restart_with_full_stage values(4421, 'name4421', 4431.111, 442100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4421]'); insert into test_proxima_be_restart_with_full_stage values(4422, 'name4422', 4432.111, 442200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4422]'); insert into test_proxima_be_restart_with_full_stage values(4423, 'name4423', 4433.111, 442300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4423]'); insert into test_proxima_be_restart_with_full_stage values(4424, 'name4424', 4434.111, 442400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4424]'); insert into test_proxima_be_restart_with_full_stage values(4425, 'name4425', 4435.111, 442500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4425]'); insert into test_proxima_be_restart_with_full_stage values(4426, 'name4426', 4436.111, 442600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4426]'); insert into test_proxima_be_restart_with_full_stage values(4427, 'name4427', 4437.111, 442700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4427]'); insert into test_proxima_be_restart_with_full_stage values(4428, 'name4428', 4438.111, 442800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4428]'); insert into test_proxima_be_restart_with_full_stage values(4429, 'name4429', 4439.111, 442900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4429]'); insert into test_proxima_be_restart_with_full_stage values(4430, 'name4430', 4440.111, 443000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4430]'); insert into test_proxima_be_restart_with_full_stage values(4431, 'name4431', 4441.111, 443100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4431]'); insert into test_proxima_be_restart_with_full_stage values(4432, 'name4432', 4442.111, 443200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4432]'); insert into test_proxima_be_restart_with_full_stage values(4433, 'name4433', 4443.111, 443300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4433]'); insert into test_proxima_be_restart_with_full_stage values(4434, 'name4434', 4444.111, 443400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4434]'); insert into test_proxima_be_restart_with_full_stage values(4435, 'name4435', 4445.111, 443500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4435]'); insert into test_proxima_be_restart_with_full_stage values(4436, 'name4436', 4446.111, 443600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4436]'); insert into test_proxima_be_restart_with_full_stage values(4437, 'name4437', 4447.111, 443700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4437]'); insert into test_proxima_be_restart_with_full_stage values(4438, 'name4438', 4448.111, 443800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4438]'); insert into test_proxima_be_restart_with_full_stage values(4439, 'name4439', 4449.111, 443900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4439]'); insert into test_proxima_be_restart_with_full_stage values(4440, 'name4440', 4450.111, 444000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4440]'); insert into test_proxima_be_restart_with_full_stage values(4441, 'name4441', 4451.111, 444100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4441]'); insert into test_proxima_be_restart_with_full_stage values(4442, 'name4442', 4452.111, 444200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4442]'); insert into test_proxima_be_restart_with_full_stage values(4443, 'name4443', 4453.111, 444300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4443]'); insert into test_proxima_be_restart_with_full_stage values(4444, 'name4444', 4454.111, 444400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4444]'); insert into test_proxima_be_restart_with_full_stage values(4445, 'name4445', 4455.111, 444500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4445]'); insert into test_proxima_be_restart_with_full_stage values(4446, 'name4446', 4456.111, 444600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4446]'); insert into test_proxima_be_restart_with_full_stage values(4447, 'name4447', 4457.111, 444700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4447]'); insert into test_proxima_be_restart_with_full_stage values(4448, 'name4448', 4458.111, 444800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4448]'); insert into test_proxima_be_restart_with_full_stage values(4449, 'name4449', 4459.111, 444900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4449]'); insert into test_proxima_be_restart_with_full_stage values(4450, 'name4450', 4460.111, 445000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4450]'); insert into test_proxima_be_restart_with_full_stage values(4451, 'name4451', 4461.111, 445100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4451]'); insert into test_proxima_be_restart_with_full_stage values(4452, 'name4452', 4462.111, 445200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4452]'); insert into test_proxima_be_restart_with_full_stage values(4453, 'name4453', 4463.111, 445300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4453]'); insert into test_proxima_be_restart_with_full_stage values(4454, 'name4454', 4464.111, 445400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4454]'); insert into test_proxima_be_restart_with_full_stage values(4455, 'name4455', 4465.111, 445500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4455]'); insert into test_proxima_be_restart_with_full_stage values(4456, 'name4456', 4466.111, 445600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4456]'); insert into test_proxima_be_restart_with_full_stage values(4457, 'name4457', 4467.111, 445700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4457]'); insert into test_proxima_be_restart_with_full_stage values(4458, 'name4458', 4468.111, 445800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4458]'); insert into test_proxima_be_restart_with_full_stage values(4459, 'name4459', 4469.111, 445900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4459]'); insert into test_proxima_be_restart_with_full_stage values(4460, 'name4460', 4470.111, 446000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4460]'); insert into test_proxima_be_restart_with_full_stage values(4461, 'name4461', 4471.111, 446100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4461]'); insert into test_proxima_be_restart_with_full_stage values(4462, 'name4462', 4472.111, 446200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4462]'); insert into test_proxima_be_restart_with_full_stage values(4463, 'name4463', 4473.111, 446300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4463]'); insert into test_proxima_be_restart_with_full_stage values(4464, 'name4464', 4474.111, 446400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4464]'); insert into test_proxima_be_restart_with_full_stage values(4465, 'name4465', 4475.111, 446500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4465]'); insert into test_proxima_be_restart_with_full_stage values(4466, 'name4466', 4476.111, 446600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4466]'); insert into test_proxima_be_restart_with_full_stage values(4467, 'name4467', 4477.111, 446700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4467]'); insert into test_proxima_be_restart_with_full_stage values(4468, 'name4468', 4478.111, 446800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4468]'); insert into test_proxima_be_restart_with_full_stage values(4469, 'name4469', 4479.111, 446900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4469]'); insert into test_proxima_be_restart_with_full_stage values(4470, 'name4470', 4480.111, 447000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4470]'); insert into test_proxima_be_restart_with_full_stage values(4471, 'name4471', 4481.111, 447100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4471]'); insert into test_proxima_be_restart_with_full_stage values(4472, 'name4472', 4482.111, 447200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4472]'); insert into test_proxima_be_restart_with_full_stage values(4473, 'name4473', 4483.111, 447300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4473]'); insert into test_proxima_be_restart_with_full_stage values(4474, 'name4474', 4484.111, 447400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4474]'); insert into test_proxima_be_restart_with_full_stage values(4475, 'name4475', 4485.111, 447500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4475]'); insert into test_proxima_be_restart_with_full_stage values(4476, 'name4476', 4486.111, 447600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4476]'); insert into test_proxima_be_restart_with_full_stage values(4477, 'name4477', 4487.111, 447700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4477]'); insert into test_proxima_be_restart_with_full_stage values(4478, 'name4478', 4488.111, 447800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4478]'); insert into test_proxima_be_restart_with_full_stage values(4479, 'name4479', 4489.111, 447900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4479]'); insert into test_proxima_be_restart_with_full_stage values(4480, 'name4480', 4490.111, 448000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4480]'); insert into test_proxima_be_restart_with_full_stage values(4481, 'name4481', 4491.111, 448100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4481]'); insert into test_proxima_be_restart_with_full_stage values(4482, 'name4482', 4492.111, 448200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4482]'); insert into test_proxima_be_restart_with_full_stage values(4483, 'name4483', 4493.111, 448300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4483]'); insert into test_proxima_be_restart_with_full_stage values(4484, 'name4484', 4494.111, 448400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4484]'); insert into test_proxima_be_restart_with_full_stage values(4485, 'name4485', 4495.111, 448500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4485]'); insert into test_proxima_be_restart_with_full_stage values(4486, 'name4486', 4496.111, 448600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4486]'); insert into test_proxima_be_restart_with_full_stage values(4487, 'name4487', 4497.111, 448700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4487]'); insert into test_proxima_be_restart_with_full_stage values(4488, 'name4488', 4498.111, 448800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4488]'); insert into test_proxima_be_restart_with_full_stage values(4489, 'name4489', 4499.111, 448900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4489]'); insert into test_proxima_be_restart_with_full_stage values(4490, 'name4490', 4500.111, 449000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4490]'); insert into test_proxima_be_restart_with_full_stage values(4491, 'name4491', 4501.111, 449100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4491]'); insert into test_proxima_be_restart_with_full_stage values(4492, 'name4492', 4502.111, 449200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4492]'); insert into test_proxima_be_restart_with_full_stage values(4493, 'name4493', 4503.111, 449300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4493]'); insert into test_proxima_be_restart_with_full_stage values(4494, 'name4494', 4504.111, 449400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4494]'); insert into test_proxima_be_restart_with_full_stage values(4495, 'name4495', 4505.111, 449500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4495]'); insert into test_proxima_be_restart_with_full_stage values(4496, 'name4496', 4506.111, 449600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4496]'); insert into test_proxima_be_restart_with_full_stage values(4497, 'name4497', 4507.111, 449700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4497]'); insert into test_proxima_be_restart_with_full_stage values(4498, 'name4498', 4508.111, 449800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4498]'); insert into test_proxima_be_restart_with_full_stage values(4499, 'name4499', 4509.111, 449900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4499]'); insert into test_proxima_be_restart_with_full_stage values(4500, 'name4500', 4510.111, 450000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4500]'); insert into test_proxima_be_restart_with_full_stage values(4501, 'name4501', 4511.111, 450100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4501]'); insert into test_proxima_be_restart_with_full_stage values(4502, 'name4502', 4512.111, 450200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4502]'); insert into test_proxima_be_restart_with_full_stage values(4503, 'name4503', 4513.111, 450300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4503]'); insert into test_proxima_be_restart_with_full_stage values(4504, 'name4504', 4514.111, 450400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4504]'); insert into test_proxima_be_restart_with_full_stage values(4505, 'name4505', 4515.111, 450500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4505]'); insert into test_proxima_be_restart_with_full_stage values(4506, 'name4506', 4516.111, 450600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4506]'); insert into test_proxima_be_restart_with_full_stage values(4507, 'name4507', 4517.111, 450700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4507]'); insert into test_proxima_be_restart_with_full_stage values(4508, 'name4508', 4518.111, 450800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4508]'); insert into test_proxima_be_restart_with_full_stage values(4509, 'name4509', 4519.111, 450900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4509]'); insert into test_proxima_be_restart_with_full_stage values(4510, 'name4510', 4520.111, 451000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4510]'); insert into test_proxima_be_restart_with_full_stage values(4511, 'name4511', 4521.111, 451100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4511]'); insert into test_proxima_be_restart_with_full_stage values(4512, 'name4512', 4522.111, 451200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4512]'); insert into test_proxima_be_restart_with_full_stage values(4513, 'name4513', 4523.111, 451300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4513]'); insert into test_proxima_be_restart_with_full_stage values(4514, 'name4514', 4524.111, 451400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4514]'); insert into test_proxima_be_restart_with_full_stage values(4515, 'name4515', 4525.111, 451500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4515]'); insert into test_proxima_be_restart_with_full_stage values(4516, 'name4516', 4526.111, 451600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4516]'); insert into test_proxima_be_restart_with_full_stage values(4517, 'name4517', 4527.111, 451700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4517]'); insert into test_proxima_be_restart_with_full_stage values(4518, 'name4518', 4528.111, 451800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4518]'); insert into test_proxima_be_restart_with_full_stage values(4519, 'name4519', 4529.111, 451900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4519]'); insert into test_proxima_be_restart_with_full_stage values(4520, 'name4520', 4530.111, 452000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4520]'); insert into test_proxima_be_restart_with_full_stage values(4521, 'name4521', 4531.111, 452100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4521]'); insert into test_proxima_be_restart_with_full_stage values(4522, 'name4522', 4532.111, 452200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4522]'); insert into test_proxima_be_restart_with_full_stage values(4523, 'name4523', 4533.111, 452300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4523]'); insert into test_proxima_be_restart_with_full_stage values(4524, 'name4524', 4534.111, 452400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4524]'); insert into test_proxima_be_restart_with_full_stage values(4525, 'name4525', 4535.111, 452500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4525]'); insert into test_proxima_be_restart_with_full_stage values(4526, 'name4526', 4536.111, 452600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4526]'); insert into test_proxima_be_restart_with_full_stage values(4527, 'name4527', 4537.111, 452700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4527]'); insert into test_proxima_be_restart_with_full_stage values(4528, 'name4528', 4538.111, 452800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4528]'); insert into test_proxima_be_restart_with_full_stage values(4529, 'name4529', 4539.111, 452900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4529]'); insert into test_proxima_be_restart_with_full_stage values(4530, 'name4530', 4540.111, 453000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4530]'); insert into test_proxima_be_restart_with_full_stage values(4531, 'name4531', 4541.111, 453100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4531]'); insert into test_proxima_be_restart_with_full_stage values(4532, 'name4532', 4542.111, 453200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4532]'); insert into test_proxima_be_restart_with_full_stage values(4533, 'name4533', 4543.111, 453300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4533]'); insert into test_proxima_be_restart_with_full_stage values(4534, 'name4534', 4544.111, 453400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4534]'); insert into test_proxima_be_restart_with_full_stage values(4535, 'name4535', 4545.111, 453500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4535]'); insert into test_proxima_be_restart_with_full_stage values(4536, 'name4536', 4546.111, 453600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4536]'); insert into test_proxima_be_restart_with_full_stage values(4537, 'name4537', 4547.111, 453700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4537]'); insert into test_proxima_be_restart_with_full_stage values(4538, 'name4538', 4548.111, 453800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4538]'); insert into test_proxima_be_restart_with_full_stage values(4539, 'name4539', 4549.111, 453900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4539]'); insert into test_proxima_be_restart_with_full_stage values(4540, 'name4540', 4550.111, 454000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4540]'); insert into test_proxima_be_restart_with_full_stage values(4541, 'name4541', 4551.111, 454100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4541]'); insert into test_proxima_be_restart_with_full_stage values(4542, 'name4542', 4552.111, 454200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4542]'); insert into test_proxima_be_restart_with_full_stage values(4543, 'name4543', 4553.111, 454300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4543]'); insert into test_proxima_be_restart_with_full_stage values(4544, 'name4544', 4554.111, 454400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4544]'); insert into test_proxima_be_restart_with_full_stage values(4545, 'name4545', 4555.111, 454500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4545]'); insert into test_proxima_be_restart_with_full_stage values(4546, 'name4546', 4556.111, 454600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4546]'); insert into test_proxima_be_restart_with_full_stage values(4547, 'name4547', 4557.111, 454700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4547]'); insert into test_proxima_be_restart_with_full_stage values(4548, 'name4548', 4558.111, 454800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4548]'); insert into test_proxima_be_restart_with_full_stage values(4549, 'name4549', 4559.111, 454900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4549]'); insert into test_proxima_be_restart_with_full_stage values(4550, 'name4550', 4560.111, 455000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4550]'); insert into test_proxima_be_restart_with_full_stage values(4551, 'name4551', 4561.111, 455100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4551]'); insert into test_proxima_be_restart_with_full_stage values(4552, 'name4552', 4562.111, 455200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4552]'); insert into test_proxima_be_restart_with_full_stage values(4553, 'name4553', 4563.111, 455300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4553]'); insert into test_proxima_be_restart_with_full_stage values(4554, 'name4554', 4564.111, 455400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4554]'); insert into test_proxima_be_restart_with_full_stage values(4555, 'name4555', 4565.111, 455500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4555]'); insert into test_proxima_be_restart_with_full_stage values(4556, 'name4556', 4566.111, 455600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4556]'); insert into test_proxima_be_restart_with_full_stage values(4557, 'name4557', 4567.111, 455700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4557]'); insert into test_proxima_be_restart_with_full_stage values(4558, 'name4558', 4568.111, 455800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4558]'); insert into test_proxima_be_restart_with_full_stage values(4559, 'name4559', 4569.111, 455900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4559]'); insert into test_proxima_be_restart_with_full_stage values(4560, 'name4560', 4570.111, 456000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4560]'); insert into test_proxima_be_restart_with_full_stage values(4561, 'name4561', 4571.111, 456100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4561]'); insert into test_proxima_be_restart_with_full_stage values(4562, 'name4562', 4572.111, 456200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4562]'); insert into test_proxima_be_restart_with_full_stage values(4563, 'name4563', 4573.111, 456300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4563]'); insert into test_proxima_be_restart_with_full_stage values(4564, 'name4564', 4574.111, 456400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4564]'); insert into test_proxima_be_restart_with_full_stage values(4565, 'name4565', 4575.111, 456500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4565]'); insert into test_proxima_be_restart_with_full_stage values(4566, 'name4566', 4576.111, 456600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4566]'); insert into test_proxima_be_restart_with_full_stage values(4567, 'name4567', 4577.111, 456700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4567]'); insert into test_proxima_be_restart_with_full_stage values(4568, 'name4568', 4578.111, 456800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4568]'); insert into test_proxima_be_restart_with_full_stage values(4569, 'name4569', 4579.111, 456900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4569]'); insert into test_proxima_be_restart_with_full_stage values(4570, 'name4570', 4580.111, 457000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4570]'); insert into test_proxima_be_restart_with_full_stage values(4571, 'name4571', 4581.111, 457100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4571]'); insert into test_proxima_be_restart_with_full_stage values(4572, 'name4572', 4582.111, 457200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4572]'); insert into test_proxima_be_restart_with_full_stage values(4573, 'name4573', 4583.111, 457300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4573]'); insert into test_proxima_be_restart_with_full_stage values(4574, 'name4574', 4584.111, 457400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4574]'); insert into test_proxima_be_restart_with_full_stage values(4575, 'name4575', 4585.111, 457500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4575]'); insert into test_proxima_be_restart_with_full_stage values(4576, 'name4576', 4586.111, 457600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4576]'); insert into test_proxima_be_restart_with_full_stage values(4577, 'name4577', 4587.111, 457700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4577]'); insert into test_proxima_be_restart_with_full_stage values(4578, 'name4578', 4588.111, 457800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4578]'); insert into test_proxima_be_restart_with_full_stage values(4579, 'name4579', 4589.111, 457900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4579]'); insert into test_proxima_be_restart_with_full_stage values(4580, 'name4580', 4590.111, 458000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4580]'); insert into test_proxima_be_restart_with_full_stage values(4581, 'name4581', 4591.111, 458100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4581]'); insert into test_proxima_be_restart_with_full_stage values(4582, 'name4582', 4592.111, 458200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4582]'); insert into test_proxima_be_restart_with_full_stage values(4583, 'name4583', 4593.111, 458300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4583]'); insert into test_proxima_be_restart_with_full_stage values(4584, 'name4584', 4594.111, 458400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4584]'); insert into test_proxima_be_restart_with_full_stage values(4585, 'name4585', 4595.111, 458500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4585]'); insert into test_proxima_be_restart_with_full_stage values(4586, 'name4586', 4596.111, 458600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4586]'); insert into test_proxima_be_restart_with_full_stage values(4587, 'name4587', 4597.111, 458700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4587]'); insert into test_proxima_be_restart_with_full_stage values(4588, 'name4588', 4598.111, 458800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4588]'); insert into test_proxima_be_restart_with_full_stage values(4589, 'name4589', 4599.111, 458900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4589]'); insert into test_proxima_be_restart_with_full_stage values(4590, 'name4590', 4600.111, 459000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4590]'); insert into test_proxima_be_restart_with_full_stage values(4591, 'name4591', 4601.111, 459100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4591]'); insert into test_proxima_be_restart_with_full_stage values(4592, 'name4592', 4602.111, 459200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4592]'); insert into test_proxima_be_restart_with_full_stage values(4593, 'name4593', 4603.111, 459300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4593]'); insert into test_proxima_be_restart_with_full_stage values(4594, 'name4594', 4604.111, 459400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4594]'); insert into test_proxima_be_restart_with_full_stage values(4595, 'name4595', 4605.111, 459500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4595]'); insert into test_proxima_be_restart_with_full_stage values(4596, 'name4596', 4606.111, 459600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4596]'); insert into test_proxima_be_restart_with_full_stage values(4597, 'name4597', 4607.111, 459700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4597]'); insert into test_proxima_be_restart_with_full_stage values(4598, 'name4598', 4608.111, 459800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4598]'); insert into test_proxima_be_restart_with_full_stage values(4599, 'name4599', 4609.111, 459900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4599]'); insert into test_proxima_be_restart_with_full_stage values(4600, 'name4600', 4610.111, 460000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4600]'); insert into test_proxima_be_restart_with_full_stage values(4601, 'name4601', 4611.111, 460100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4601]'); insert into test_proxima_be_restart_with_full_stage values(4602, 'name4602', 4612.111, 460200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4602]'); insert into test_proxima_be_restart_with_full_stage values(4603, 'name4603', 4613.111, 460300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4603]'); insert into test_proxima_be_restart_with_full_stage values(4604, 'name4604', 4614.111, 460400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4604]'); insert into test_proxima_be_restart_with_full_stage values(4605, 'name4605', 4615.111, 460500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4605]'); insert into test_proxima_be_restart_with_full_stage values(4606, 'name4606', 4616.111, 460600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4606]'); insert into test_proxima_be_restart_with_full_stage values(4607, 'name4607', 4617.111, 460700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4607]'); insert into test_proxima_be_restart_with_full_stage values(4608, 'name4608', 4618.111, 460800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4608]'); insert into test_proxima_be_restart_with_full_stage values(4609, 'name4609', 4619.111, 460900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4609]'); insert into test_proxima_be_restart_with_full_stage values(4610, 'name4610', 4620.111, 461000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4610]'); insert into test_proxima_be_restart_with_full_stage values(4611, 'name4611', 4621.111, 461100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4611]'); insert into test_proxima_be_restart_with_full_stage values(4612, 'name4612', 4622.111, 461200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4612]'); insert into test_proxima_be_restart_with_full_stage values(4613, 'name4613', 4623.111, 461300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4613]'); insert into test_proxima_be_restart_with_full_stage values(4614, 'name4614', 4624.111, 461400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4614]'); insert into test_proxima_be_restart_with_full_stage values(4615, 'name4615', 4625.111, 461500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4615]'); insert into test_proxima_be_restart_with_full_stage values(4616, 'name4616', 4626.111, 461600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4616]'); insert into test_proxima_be_restart_with_full_stage values(4617, 'name4617', 4627.111, 461700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4617]'); insert into test_proxima_be_restart_with_full_stage values(4618, 'name4618', 4628.111, 461800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4618]'); insert into test_proxima_be_restart_with_full_stage values(4619, 'name4619', 4629.111, 461900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4619]'); insert into test_proxima_be_restart_with_full_stage values(4620, 'name4620', 4630.111, 462000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4620]'); insert into test_proxima_be_restart_with_full_stage values(4621, 'name4621', 4631.111, 462100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4621]'); insert into test_proxima_be_restart_with_full_stage values(4622, 'name4622', 4632.111, 462200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4622]'); insert into test_proxima_be_restart_with_full_stage values(4623, 'name4623', 4633.111, 462300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4623]'); insert into test_proxima_be_restart_with_full_stage values(4624, 'name4624', 4634.111, 462400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4624]'); insert into test_proxima_be_restart_with_full_stage values(4625, 'name4625', 4635.111, 462500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4625]'); insert into test_proxima_be_restart_with_full_stage values(4626, 'name4626', 4636.111, 462600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4626]'); insert into test_proxima_be_restart_with_full_stage values(4627, 'name4627', 4637.111, 462700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4627]'); insert into test_proxima_be_restart_with_full_stage values(4628, 'name4628', 4638.111, 462800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4628]'); insert into test_proxima_be_restart_with_full_stage values(4629, 'name4629', 4639.111, 462900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4629]'); insert into test_proxima_be_restart_with_full_stage values(4630, 'name4630', 4640.111, 463000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4630]'); insert into test_proxima_be_restart_with_full_stage values(4631, 'name4631', 4641.111, 463100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4631]'); insert into test_proxima_be_restart_with_full_stage values(4632, 'name4632', 4642.111, 463200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4632]'); insert into test_proxima_be_restart_with_full_stage values(4633, 'name4633', 4643.111, 463300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4633]'); insert into test_proxima_be_restart_with_full_stage values(4634, 'name4634', 4644.111, 463400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4634]'); insert into test_proxima_be_restart_with_full_stage values(4635, 'name4635', 4645.111, 463500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4635]'); insert into test_proxima_be_restart_with_full_stage values(4636, 'name4636', 4646.111, 463600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4636]'); insert into test_proxima_be_restart_with_full_stage values(4637, 'name4637', 4647.111, 463700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4637]'); insert into test_proxima_be_restart_with_full_stage values(4638, 'name4638', 4648.111, 463800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4638]'); insert into test_proxima_be_restart_with_full_stage values(4639, 'name4639', 4649.111, 463900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4639]'); insert into test_proxima_be_restart_with_full_stage values(4640, 'name4640', 4650.111, 464000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4640]'); insert into test_proxima_be_restart_with_full_stage values(4641, 'name4641', 4651.111, 464100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4641]'); insert into test_proxima_be_restart_with_full_stage values(4642, 'name4642', 4652.111, 464200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4642]'); insert into test_proxima_be_restart_with_full_stage values(4643, 'name4643', 4653.111, 464300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4643]'); insert into test_proxima_be_restart_with_full_stage values(4644, 'name4644', 4654.111, 464400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4644]'); insert into test_proxima_be_restart_with_full_stage values(4645, 'name4645', 4655.111, 464500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4645]'); insert into test_proxima_be_restart_with_full_stage values(4646, 'name4646', 4656.111, 464600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4646]'); insert into test_proxima_be_restart_with_full_stage values(4647, 'name4647', 4657.111, 464700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4647]'); insert into test_proxima_be_restart_with_full_stage values(4648, 'name4648', 4658.111, 464800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4648]'); insert into test_proxima_be_restart_with_full_stage values(4649, 'name4649', 4659.111, 464900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4649]'); insert into test_proxima_be_restart_with_full_stage values(4650, 'name4650', 4660.111, 465000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4650]'); insert into test_proxima_be_restart_with_full_stage values(4651, 'name4651', 4661.111, 465100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4651]'); insert into test_proxima_be_restart_with_full_stage values(4652, 'name4652', 4662.111, 465200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4652]'); insert into test_proxima_be_restart_with_full_stage values(4653, 'name4653', 4663.111, 465300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4653]'); insert into test_proxima_be_restart_with_full_stage values(4654, 'name4654', 4664.111, 465400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4654]'); insert into test_proxima_be_restart_with_full_stage values(4655, 'name4655', 4665.111, 465500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4655]'); insert into test_proxima_be_restart_with_full_stage values(4656, 'name4656', 4666.111, 465600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4656]'); insert into test_proxima_be_restart_with_full_stage values(4657, 'name4657', 4667.111, 465700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4657]'); insert into test_proxima_be_restart_with_full_stage values(4658, 'name4658', 4668.111, 465800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4658]'); insert into test_proxima_be_restart_with_full_stage values(4659, 'name4659', 4669.111, 465900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4659]'); insert into test_proxima_be_restart_with_full_stage values(4660, 'name4660', 4670.111, 466000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4660]'); insert into test_proxima_be_restart_with_full_stage values(4661, 'name4661', 4671.111, 466100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4661]'); insert into test_proxima_be_restart_with_full_stage values(4662, 'name4662', 4672.111, 466200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4662]'); insert into test_proxima_be_restart_with_full_stage values(4663, 'name4663', 4673.111, 466300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4663]'); insert into test_proxima_be_restart_with_full_stage values(4664, 'name4664', 4674.111, 466400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4664]'); insert into test_proxima_be_restart_with_full_stage values(4665, 'name4665', 4675.111, 466500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4665]'); insert into test_proxima_be_restart_with_full_stage values(4666, 'name4666', 4676.111, 466600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4666]'); insert into test_proxima_be_restart_with_full_stage values(4667, 'name4667', 4677.111, 466700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4667]'); insert into test_proxima_be_restart_with_full_stage values(4668, 'name4668', 4678.111, 466800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4668]'); insert into test_proxima_be_restart_with_full_stage values(4669, 'name4669', 4679.111, 466900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4669]'); insert into test_proxima_be_restart_with_full_stage values(4670, 'name4670', 4680.111, 467000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4670]'); insert into test_proxima_be_restart_with_full_stage values(4671, 'name4671', 4681.111, 467100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4671]'); insert into test_proxima_be_restart_with_full_stage values(4672, 'name4672', 4682.111, 467200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4672]'); insert into test_proxima_be_restart_with_full_stage values(4673, 'name4673', 4683.111, 467300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4673]'); insert into test_proxima_be_restart_with_full_stage values(4674, 'name4674', 4684.111, 467400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4674]'); insert into test_proxima_be_restart_with_full_stage values(4675, 'name4675', 4685.111, 467500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4675]'); insert into test_proxima_be_restart_with_full_stage values(4676, 'name4676', 4686.111, 467600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4676]'); insert into test_proxima_be_restart_with_full_stage values(4677, 'name4677', 4687.111, 467700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4677]'); insert into test_proxima_be_restart_with_full_stage values(4678, 'name4678', 4688.111, 467800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4678]'); insert into test_proxima_be_restart_with_full_stage values(4679, 'name4679', 4689.111, 467900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4679]'); insert into test_proxima_be_restart_with_full_stage values(4680, 'name4680', 4690.111, 468000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4680]'); insert into test_proxima_be_restart_with_full_stage values(4681, 'name4681', 4691.111, 468100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4681]'); insert into test_proxima_be_restart_with_full_stage values(4682, 'name4682', 4692.111, 468200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4682]'); insert into test_proxima_be_restart_with_full_stage values(4683, 'name4683', 4693.111, 468300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4683]'); insert into test_proxima_be_restart_with_full_stage values(4684, 'name4684', 4694.111, 468400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4684]'); insert into test_proxima_be_restart_with_full_stage values(4685, 'name4685', 4695.111, 468500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4685]'); insert into test_proxima_be_restart_with_full_stage values(4686, 'name4686', 4696.111, 468600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4686]'); insert into test_proxima_be_restart_with_full_stage values(4687, 'name4687', 4697.111, 468700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4687]'); insert into test_proxima_be_restart_with_full_stage values(4688, 'name4688', 4698.111, 468800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4688]'); insert into test_proxima_be_restart_with_full_stage values(4689, 'name4689', 4699.111, 468900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4689]'); insert into test_proxima_be_restart_with_full_stage values(4690, 'name4690', 4700.111, 469000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4690]'); insert into test_proxima_be_restart_with_full_stage values(4691, 'name4691', 4701.111, 469100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4691]'); insert into test_proxima_be_restart_with_full_stage values(4692, 'name4692', 4702.111, 469200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4692]'); insert into test_proxima_be_restart_with_full_stage values(4693, 'name4693', 4703.111, 469300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4693]'); insert into test_proxima_be_restart_with_full_stage values(4694, 'name4694', 4704.111, 469400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4694]'); insert into test_proxima_be_restart_with_full_stage values(4695, 'name4695', 4705.111, 469500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4695]'); insert into test_proxima_be_restart_with_full_stage values(4696, 'name4696', 4706.111, 469600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4696]'); insert into test_proxima_be_restart_with_full_stage values(4697, 'name4697', 4707.111, 469700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4697]'); insert into test_proxima_be_restart_with_full_stage values(4698, 'name4698', 4708.111, 469800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4698]'); insert into test_proxima_be_restart_with_full_stage values(4699, 'name4699', 4709.111, 469900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4699]'); insert into test_proxima_be_restart_with_full_stage values(4700, 'name4700', 4710.111, 470000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4700]'); insert into test_proxima_be_restart_with_full_stage values(4701, 'name4701', 4711.111, 470100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4701]'); insert into test_proxima_be_restart_with_full_stage values(4702, 'name4702', 4712.111, 470200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4702]'); insert into test_proxima_be_restart_with_full_stage values(4703, 'name4703', 4713.111, 470300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4703]'); insert into test_proxima_be_restart_with_full_stage values(4704, 'name4704', 4714.111, 470400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4704]'); insert into test_proxima_be_restart_with_full_stage values(4705, 'name4705', 4715.111, 470500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4705]'); insert into test_proxima_be_restart_with_full_stage values(4706, 'name4706', 4716.111, 470600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4706]'); insert into test_proxima_be_restart_with_full_stage values(4707, 'name4707', 4717.111, 470700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4707]'); insert into test_proxima_be_restart_with_full_stage values(4708, 'name4708', 4718.111, 470800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4708]'); insert into test_proxima_be_restart_with_full_stage values(4709, 'name4709', 4719.111, 470900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4709]'); insert into test_proxima_be_restart_with_full_stage values(4710, 'name4710', 4720.111, 471000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4710]'); insert into test_proxima_be_restart_with_full_stage values(4711, 'name4711', 4721.111, 471100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4711]'); insert into test_proxima_be_restart_with_full_stage values(4712, 'name4712', 4722.111, 471200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4712]'); insert into test_proxima_be_restart_with_full_stage values(4713, 'name4713', 4723.111, 471300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4713]'); insert into test_proxima_be_restart_with_full_stage values(4714, 'name4714', 4724.111, 471400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4714]'); insert into test_proxima_be_restart_with_full_stage values(4715, 'name4715', 4725.111, 471500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4715]'); insert into test_proxima_be_restart_with_full_stage values(4716, 'name4716', 4726.111, 471600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4716]'); insert into test_proxima_be_restart_with_full_stage values(4717, 'name4717', 4727.111, 471700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4717]'); insert into test_proxima_be_restart_with_full_stage values(4718, 'name4718', 4728.111, 471800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4718]'); insert into test_proxima_be_restart_with_full_stage values(4719, 'name4719', 4729.111, 471900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4719]'); insert into test_proxima_be_restart_with_full_stage values(4720, 'name4720', 4730.111, 472000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4720]'); insert into test_proxima_be_restart_with_full_stage values(4721, 'name4721', 4731.111, 472100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4721]'); insert into test_proxima_be_restart_with_full_stage values(4722, 'name4722', 4732.111, 472200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4722]'); insert into test_proxima_be_restart_with_full_stage values(4723, 'name4723', 4733.111, 472300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4723]'); insert into test_proxima_be_restart_with_full_stage values(4724, 'name4724', 4734.111, 472400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4724]'); insert into test_proxima_be_restart_with_full_stage values(4725, 'name4725', 4735.111, 472500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4725]'); insert into test_proxima_be_restart_with_full_stage values(4726, 'name4726', 4736.111, 472600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4726]'); insert into test_proxima_be_restart_with_full_stage values(4727, 'name4727', 4737.111, 472700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4727]'); insert into test_proxima_be_restart_with_full_stage values(4728, 'name4728', 4738.111, 472800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4728]'); insert into test_proxima_be_restart_with_full_stage values(4729, 'name4729', 4739.111, 472900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4729]'); insert into test_proxima_be_restart_with_full_stage values(4730, 'name4730', 4740.111, 473000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4730]'); insert into test_proxima_be_restart_with_full_stage values(4731, 'name4731', 4741.111, 473100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4731]'); insert into test_proxima_be_restart_with_full_stage values(4732, 'name4732', 4742.111, 473200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4732]'); insert into test_proxima_be_restart_with_full_stage values(4733, 'name4733', 4743.111, 473300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4733]'); insert into test_proxima_be_restart_with_full_stage values(4734, 'name4734', 4744.111, 473400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4734]'); insert into test_proxima_be_restart_with_full_stage values(4735, 'name4735', 4745.111, 473500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4735]'); insert into test_proxima_be_restart_with_full_stage values(4736, 'name4736', 4746.111, 473600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4736]'); insert into test_proxima_be_restart_with_full_stage values(4737, 'name4737', 4747.111, 473700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4737]'); insert into test_proxima_be_restart_with_full_stage values(4738, 'name4738', 4748.111, 473800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4738]'); insert into test_proxima_be_restart_with_full_stage values(4739, 'name4739', 4749.111, 473900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4739]'); insert into test_proxima_be_restart_with_full_stage values(4740, 'name4740', 4750.111, 474000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4740]'); insert into test_proxima_be_restart_with_full_stage values(4741, 'name4741', 4751.111, 474100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4741]'); insert into test_proxima_be_restart_with_full_stage values(4742, 'name4742', 4752.111, 474200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4742]'); insert into test_proxima_be_restart_with_full_stage values(4743, 'name4743', 4753.111, 474300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4743]'); insert into test_proxima_be_restart_with_full_stage values(4744, 'name4744', 4754.111, 474400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4744]'); insert into test_proxima_be_restart_with_full_stage values(4745, 'name4745', 4755.111, 474500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4745]'); insert into test_proxima_be_restart_with_full_stage values(4746, 'name4746', 4756.111, 474600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4746]'); insert into test_proxima_be_restart_with_full_stage values(4747, 'name4747', 4757.111, 474700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4747]'); insert into test_proxima_be_restart_with_full_stage values(4748, 'name4748', 4758.111, 474800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4748]'); insert into test_proxima_be_restart_with_full_stage values(4749, 'name4749', 4759.111, 474900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4749]'); insert into test_proxima_be_restart_with_full_stage values(4750, 'name4750', 4760.111, 475000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4750]'); insert into test_proxima_be_restart_with_full_stage values(4751, 'name4751', 4761.111, 475100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4751]'); insert into test_proxima_be_restart_with_full_stage values(4752, 'name4752', 4762.111, 475200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4752]'); insert into test_proxima_be_restart_with_full_stage values(4753, 'name4753', 4763.111, 475300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4753]'); insert into test_proxima_be_restart_with_full_stage values(4754, 'name4754', 4764.111, 475400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4754]'); insert into test_proxima_be_restart_with_full_stage values(4755, 'name4755', 4765.111, 475500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4755]'); insert into test_proxima_be_restart_with_full_stage values(4756, 'name4756', 4766.111, 475600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4756]'); insert into test_proxima_be_restart_with_full_stage values(4757, 'name4757', 4767.111, 475700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4757]'); insert into test_proxima_be_restart_with_full_stage values(4758, 'name4758', 4768.111, 475800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4758]'); insert into test_proxima_be_restart_with_full_stage values(4759, 'name4759', 4769.111, 475900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4759]'); insert into test_proxima_be_restart_with_full_stage values(4760, 'name4760', 4770.111, 476000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4760]'); insert into test_proxima_be_restart_with_full_stage values(4761, 'name4761', 4771.111, 476100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4761]'); insert into test_proxima_be_restart_with_full_stage values(4762, 'name4762', 4772.111, 476200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4762]'); insert into test_proxima_be_restart_with_full_stage values(4763, 'name4763', 4773.111, 476300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4763]'); insert into test_proxima_be_restart_with_full_stage values(4764, 'name4764', 4774.111, 476400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4764]'); insert into test_proxima_be_restart_with_full_stage values(4765, 'name4765', 4775.111, 476500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4765]'); insert into test_proxima_be_restart_with_full_stage values(4766, 'name4766', 4776.111, 476600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4766]'); insert into test_proxima_be_restart_with_full_stage values(4767, 'name4767', 4777.111, 476700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4767]'); insert into test_proxima_be_restart_with_full_stage values(4768, 'name4768', 4778.111, 476800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4768]'); insert into test_proxima_be_restart_with_full_stage values(4769, 'name4769', 4779.111, 476900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4769]'); insert into test_proxima_be_restart_with_full_stage values(4770, 'name4770', 4780.111, 477000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4770]'); insert into test_proxima_be_restart_with_full_stage values(4771, 'name4771', 4781.111, 477100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4771]'); insert into test_proxima_be_restart_with_full_stage values(4772, 'name4772', 4782.111, 477200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4772]'); insert into test_proxima_be_restart_with_full_stage values(4773, 'name4773', 4783.111, 477300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4773]'); insert into test_proxima_be_restart_with_full_stage values(4774, 'name4774', 4784.111, 477400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4774]'); insert into test_proxima_be_restart_with_full_stage values(4775, 'name4775', 4785.111, 477500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4775]'); insert into test_proxima_be_restart_with_full_stage values(4776, 'name4776', 4786.111, 477600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4776]'); insert into test_proxima_be_restart_with_full_stage values(4777, 'name4777', 4787.111, 477700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4777]'); insert into test_proxima_be_restart_with_full_stage values(4778, 'name4778', 4788.111, 477800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4778]'); insert into test_proxima_be_restart_with_full_stage values(4779, 'name4779', 4789.111, 477900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4779]'); insert into test_proxima_be_restart_with_full_stage values(4780, 'name4780', 4790.111, 478000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4780]'); insert into test_proxima_be_restart_with_full_stage values(4781, 'name4781', 4791.111, 478100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4781]'); insert into test_proxima_be_restart_with_full_stage values(4782, 'name4782', 4792.111, 478200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4782]'); insert into test_proxima_be_restart_with_full_stage values(4783, 'name4783', 4793.111, 478300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4783]'); insert into test_proxima_be_restart_with_full_stage values(4784, 'name4784', 4794.111, 478400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4784]'); insert into test_proxima_be_restart_with_full_stage values(4785, 'name4785', 4795.111, 478500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4785]'); insert into test_proxima_be_restart_with_full_stage values(4786, 'name4786', 4796.111, 478600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4786]'); insert into test_proxima_be_restart_with_full_stage values(4787, 'name4787', 4797.111, 478700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4787]'); insert into test_proxima_be_restart_with_full_stage values(4788, 'name4788', 4798.111, 478800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4788]'); insert into test_proxima_be_restart_with_full_stage values(4789, 'name4789', 4799.111, 478900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4789]'); insert into test_proxima_be_restart_with_full_stage values(4790, 'name4790', 4800.111, 479000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4790]'); insert into test_proxima_be_restart_with_full_stage values(4791, 'name4791', 4801.111, 479100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4791]'); insert into test_proxima_be_restart_with_full_stage values(4792, 'name4792', 4802.111, 479200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4792]'); insert into test_proxima_be_restart_with_full_stage values(4793, 'name4793', 4803.111, 479300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4793]'); insert into test_proxima_be_restart_with_full_stage values(4794, 'name4794', 4804.111, 479400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4794]'); insert into test_proxima_be_restart_with_full_stage values(4795, 'name4795', 4805.111, 479500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4795]'); insert into test_proxima_be_restart_with_full_stage values(4796, 'name4796', 4806.111, 479600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4796]'); insert into test_proxima_be_restart_with_full_stage values(4797, 'name4797', 4807.111, 479700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4797]'); insert into test_proxima_be_restart_with_full_stage values(4798, 'name4798', 4808.111, 479800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4798]'); insert into test_proxima_be_restart_with_full_stage values(4799, 'name4799', 4809.111, 479900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4799]'); insert into test_proxima_be_restart_with_full_stage values(4800, 'name4800', 4810.111, 480000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4800]'); insert into test_proxima_be_restart_with_full_stage values(4801, 'name4801', 4811.111, 480100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4801]'); insert into test_proxima_be_restart_with_full_stage values(4802, 'name4802', 4812.111, 480200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4802]'); insert into test_proxima_be_restart_with_full_stage values(4803, 'name4803', 4813.111, 480300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4803]'); insert into test_proxima_be_restart_with_full_stage values(4804, 'name4804', 4814.111, 480400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4804]'); insert into test_proxima_be_restart_with_full_stage values(4805, 'name4805', 4815.111, 480500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4805]'); insert into test_proxima_be_restart_with_full_stage values(4806, 'name4806', 4816.111, 480600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4806]'); insert into test_proxima_be_restart_with_full_stage values(4807, 'name4807', 4817.111, 480700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4807]'); insert into test_proxima_be_restart_with_full_stage values(4808, 'name4808', 4818.111, 480800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4808]'); insert into test_proxima_be_restart_with_full_stage values(4809, 'name4809', 4819.111, 480900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4809]'); insert into test_proxima_be_restart_with_full_stage values(4810, 'name4810', 4820.111, 481000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4810]'); insert into test_proxima_be_restart_with_full_stage values(4811, 'name4811', 4821.111, 481100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4811]'); insert into test_proxima_be_restart_with_full_stage values(4812, 'name4812', 4822.111, 481200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4812]'); insert into test_proxima_be_restart_with_full_stage values(4813, 'name4813', 4823.111, 481300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4813]'); insert into test_proxima_be_restart_with_full_stage values(4814, 'name4814', 4824.111, 481400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4814]'); insert into test_proxima_be_restart_with_full_stage values(4815, 'name4815', 4825.111, 481500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4815]'); insert into test_proxima_be_restart_with_full_stage values(4816, 'name4816', 4826.111, 481600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4816]'); insert into test_proxima_be_restart_with_full_stage values(4817, 'name4817', 4827.111, 481700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4817]'); insert into test_proxima_be_restart_with_full_stage values(4818, 'name4818', 4828.111, 481800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4818]'); insert into test_proxima_be_restart_with_full_stage values(4819, 'name4819', 4829.111, 481900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4819]'); insert into test_proxima_be_restart_with_full_stage values(4820, 'name4820', 4830.111, 482000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4820]'); insert into test_proxima_be_restart_with_full_stage values(4821, 'name4821', 4831.111, 482100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4821]'); insert into test_proxima_be_restart_with_full_stage values(4822, 'name4822', 4832.111, 482200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4822]'); insert into test_proxima_be_restart_with_full_stage values(4823, 'name4823', 4833.111, 482300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4823]'); insert into test_proxima_be_restart_with_full_stage values(4824, 'name4824', 4834.111, 482400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4824]'); insert into test_proxima_be_restart_with_full_stage values(4825, 'name4825', 4835.111, 482500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4825]'); insert into test_proxima_be_restart_with_full_stage values(4826, 'name4826', 4836.111, 482600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4826]'); insert into test_proxima_be_restart_with_full_stage values(4827, 'name4827', 4837.111, 482700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4827]'); insert into test_proxima_be_restart_with_full_stage values(4828, 'name4828', 4838.111, 482800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4828]'); insert into test_proxima_be_restart_with_full_stage values(4829, 'name4829', 4839.111, 482900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4829]'); insert into test_proxima_be_restart_with_full_stage values(4830, 'name4830', 4840.111, 483000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4830]'); insert into test_proxima_be_restart_with_full_stage values(4831, 'name4831', 4841.111, 483100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4831]'); insert into test_proxima_be_restart_with_full_stage values(4832, 'name4832', 4842.111, 483200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4832]'); insert into test_proxima_be_restart_with_full_stage values(4833, 'name4833', 4843.111, 483300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4833]'); insert into test_proxima_be_restart_with_full_stage values(4834, 'name4834', 4844.111, 483400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4834]'); insert into test_proxima_be_restart_with_full_stage values(4835, 'name4835', 4845.111, 483500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4835]'); insert into test_proxima_be_restart_with_full_stage values(4836, 'name4836', 4846.111, 483600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4836]'); insert into test_proxima_be_restart_with_full_stage values(4837, 'name4837', 4847.111, 483700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4837]'); insert into test_proxima_be_restart_with_full_stage values(4838, 'name4838', 4848.111, 483800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4838]'); insert into test_proxima_be_restart_with_full_stage values(4839, 'name4839', 4849.111, 483900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4839]'); insert into test_proxima_be_restart_with_full_stage values(4840, 'name4840', 4850.111, 484000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4840]'); insert into test_proxima_be_restart_with_full_stage values(4841, 'name4841', 4851.111, 484100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4841]'); insert into test_proxima_be_restart_with_full_stage values(4842, 'name4842', 4852.111, 484200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4842]'); insert into test_proxima_be_restart_with_full_stage values(4843, 'name4843', 4853.111, 484300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4843]'); insert into test_proxima_be_restart_with_full_stage values(4844, 'name4844', 4854.111, 484400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4844]'); insert into test_proxima_be_restart_with_full_stage values(4845, 'name4845', 4855.111, 484500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4845]'); insert into test_proxima_be_restart_with_full_stage values(4846, 'name4846', 4856.111, 484600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4846]'); insert into test_proxima_be_restart_with_full_stage values(4847, 'name4847', 4857.111, 484700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4847]'); insert into test_proxima_be_restart_with_full_stage values(4848, 'name4848', 4858.111, 484800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4848]'); insert into test_proxima_be_restart_with_full_stage values(4849, 'name4849', 4859.111, 484900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4849]'); insert into test_proxima_be_restart_with_full_stage values(4850, 'name4850', 4860.111, 485000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4850]'); insert into test_proxima_be_restart_with_full_stage values(4851, 'name4851', 4861.111, 485100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4851]'); insert into test_proxima_be_restart_with_full_stage values(4852, 'name4852', 4862.111, 485200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4852]'); insert into test_proxima_be_restart_with_full_stage values(4853, 'name4853', 4863.111, 485300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4853]'); insert into test_proxima_be_restart_with_full_stage values(4854, 'name4854', 4864.111, 485400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4854]'); insert into test_proxima_be_restart_with_full_stage values(4855, 'name4855', 4865.111, 485500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4855]'); insert into test_proxima_be_restart_with_full_stage values(4856, 'name4856', 4866.111, 485600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4856]'); insert into test_proxima_be_restart_with_full_stage values(4857, 'name4857', 4867.111, 485700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4857]'); insert into test_proxima_be_restart_with_full_stage values(4858, 'name4858', 4868.111, 485800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4858]'); insert into test_proxima_be_restart_with_full_stage values(4859, 'name4859', 4869.111, 485900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4859]'); insert into test_proxima_be_restart_with_full_stage values(4860, 'name4860', 4870.111, 486000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4860]'); insert into test_proxima_be_restart_with_full_stage values(4861, 'name4861', 4871.111, 486100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4861]'); insert into test_proxima_be_restart_with_full_stage values(4862, 'name4862', 4872.111, 486200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4862]'); insert into test_proxima_be_restart_with_full_stage values(4863, 'name4863', 4873.111, 486300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4863]'); insert into test_proxima_be_restart_with_full_stage values(4864, 'name4864', 4874.111, 486400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4864]'); insert into test_proxima_be_restart_with_full_stage values(4865, 'name4865', 4875.111, 486500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4865]'); insert into test_proxima_be_restart_with_full_stage values(4866, 'name4866', 4876.111, 486600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4866]'); insert into test_proxima_be_restart_with_full_stage values(4867, 'name4867', 4877.111, 486700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4867]'); insert into test_proxima_be_restart_with_full_stage values(4868, 'name4868', 4878.111, 486800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4868]'); insert into test_proxima_be_restart_with_full_stage values(4869, 'name4869', 4879.111, 486900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4869]'); insert into test_proxima_be_restart_with_full_stage values(4870, 'name4870', 4880.111, 487000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4870]'); insert into test_proxima_be_restart_with_full_stage values(4871, 'name4871', 4881.111, 487100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4871]'); insert into test_proxima_be_restart_with_full_stage values(4872, 'name4872', 4882.111, 487200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4872]'); insert into test_proxima_be_restart_with_full_stage values(4873, 'name4873', 4883.111, 487300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4873]'); insert into test_proxima_be_restart_with_full_stage values(4874, 'name4874', 4884.111, 487400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4874]'); insert into test_proxima_be_restart_with_full_stage values(4875, 'name4875', 4885.111, 487500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4875]'); insert into test_proxima_be_restart_with_full_stage values(4876, 'name4876', 4886.111, 487600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4876]'); insert into test_proxima_be_restart_with_full_stage values(4877, 'name4877', 4887.111, 487700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4877]'); insert into test_proxima_be_restart_with_full_stage values(4878, 'name4878', 4888.111, 487800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4878]'); insert into test_proxima_be_restart_with_full_stage values(4879, 'name4879', 4889.111, 487900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4879]'); insert into test_proxima_be_restart_with_full_stage values(4880, 'name4880', 4890.111, 488000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4880]'); insert into test_proxima_be_restart_with_full_stage values(4881, 'name4881', 4891.111, 488100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4881]'); insert into test_proxima_be_restart_with_full_stage values(4882, 'name4882', 4892.111, 488200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4882]'); insert into test_proxima_be_restart_with_full_stage values(4883, 'name4883', 4893.111, 488300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4883]'); insert into test_proxima_be_restart_with_full_stage values(4884, 'name4884', 4894.111, 488400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4884]'); insert into test_proxima_be_restart_with_full_stage values(4885, 'name4885', 4895.111, 488500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4885]'); insert into test_proxima_be_restart_with_full_stage values(4886, 'name4886', 4896.111, 488600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4886]'); insert into test_proxima_be_restart_with_full_stage values(4887, 'name4887', 4897.111, 488700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4887]'); insert into test_proxima_be_restart_with_full_stage values(4888, 'name4888', 4898.111, 488800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4888]'); insert into test_proxima_be_restart_with_full_stage values(4889, 'name4889', 4899.111, 488900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4889]'); insert into test_proxima_be_restart_with_full_stage values(4890, 'name4890', 4900.111, 489000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4890]'); insert into test_proxima_be_restart_with_full_stage values(4891, 'name4891', 4901.111, 489100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4891]'); insert into test_proxima_be_restart_with_full_stage values(4892, 'name4892', 4902.111, 489200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4892]'); insert into test_proxima_be_restart_with_full_stage values(4893, 'name4893', 4903.111, 489300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4893]'); insert into test_proxima_be_restart_with_full_stage values(4894, 'name4894', 4904.111, 489400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4894]'); insert into test_proxima_be_restart_with_full_stage values(4895, 'name4895', 4905.111, 489500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4895]'); insert into test_proxima_be_restart_with_full_stage values(4896, 'name4896', 4906.111, 489600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4896]'); insert into test_proxima_be_restart_with_full_stage values(4897, 'name4897', 4907.111, 489700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4897]'); insert into test_proxima_be_restart_with_full_stage values(4898, 'name4898', 4908.111, 489800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4898]'); insert into test_proxima_be_restart_with_full_stage values(4899, 'name4899', 4909.111, 489900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4899]'); insert into test_proxima_be_restart_with_full_stage values(4900, 'name4900', 4910.111, 490000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4900]'); insert into test_proxima_be_restart_with_full_stage values(4901, 'name4901', 4911.111, 490100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4901]'); insert into test_proxima_be_restart_with_full_stage values(4902, 'name4902', 4912.111, 490200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4902]'); insert into test_proxima_be_restart_with_full_stage values(4903, 'name4903', 4913.111, 490300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4903]'); insert into test_proxima_be_restart_with_full_stage values(4904, 'name4904', 4914.111, 490400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4904]'); insert into test_proxima_be_restart_with_full_stage values(4905, 'name4905', 4915.111, 490500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4905]'); insert into test_proxima_be_restart_with_full_stage values(4906, 'name4906', 4916.111, 490600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4906]'); insert into test_proxima_be_restart_with_full_stage values(4907, 'name4907', 4917.111, 490700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4907]'); insert into test_proxima_be_restart_with_full_stage values(4908, 'name4908', 4918.111, 490800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4908]'); insert into test_proxima_be_restart_with_full_stage values(4909, 'name4909', 4919.111, 490900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4909]'); insert into test_proxima_be_restart_with_full_stage values(4910, 'name4910', 4920.111, 491000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4910]'); insert into test_proxima_be_restart_with_full_stage values(4911, 'name4911', 4921.111, 491100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4911]'); insert into test_proxima_be_restart_with_full_stage values(4912, 'name4912', 4922.111, 491200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4912]'); insert into test_proxima_be_restart_with_full_stage values(4913, 'name4913', 4923.111, 491300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4913]'); insert into test_proxima_be_restart_with_full_stage values(4914, 'name4914', 4924.111, 491400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4914]'); insert into test_proxima_be_restart_with_full_stage values(4915, 'name4915', 4925.111, 491500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4915]'); insert into test_proxima_be_restart_with_full_stage values(4916, 'name4916', 4926.111, 491600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4916]'); insert into test_proxima_be_restart_with_full_stage values(4917, 'name4917', 4927.111, 491700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4917]'); insert into test_proxima_be_restart_with_full_stage values(4918, 'name4918', 4928.111, 491800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4918]'); insert into test_proxima_be_restart_with_full_stage values(4919, 'name4919', 4929.111, 491900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4919]'); insert into test_proxima_be_restart_with_full_stage values(4920, 'name4920', 4930.111, 492000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4920]'); insert into test_proxima_be_restart_with_full_stage values(4921, 'name4921', 4931.111, 492100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4921]'); insert into test_proxima_be_restart_with_full_stage values(4922, 'name4922', 4932.111, 492200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4922]'); insert into test_proxima_be_restart_with_full_stage values(4923, 'name4923', 4933.111, 492300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4923]'); insert into test_proxima_be_restart_with_full_stage values(4924, 'name4924', 4934.111, 492400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4924]'); insert into test_proxima_be_restart_with_full_stage values(4925, 'name4925', 4935.111, 492500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4925]'); insert into test_proxima_be_restart_with_full_stage values(4926, 'name4926', 4936.111, 492600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4926]'); insert into test_proxima_be_restart_with_full_stage values(4927, 'name4927', 4937.111, 492700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4927]'); insert into test_proxima_be_restart_with_full_stage values(4928, 'name4928', 4938.111, 492800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4928]'); insert into test_proxima_be_restart_with_full_stage values(4929, 'name4929', 4939.111, 492900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4929]'); insert into test_proxima_be_restart_with_full_stage values(4930, 'name4930', 4940.111, 493000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4930]'); insert into test_proxima_be_restart_with_full_stage values(4931, 'name4931', 4941.111, 493100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4931]'); insert into test_proxima_be_restart_with_full_stage values(4932, 'name4932', 4942.111, 493200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4932]'); insert into test_proxima_be_restart_with_full_stage values(4933, 'name4933', 4943.111, 493300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4933]'); insert into test_proxima_be_restart_with_full_stage values(4934, 'name4934', 4944.111, 493400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4934]'); insert into test_proxima_be_restart_with_full_stage values(4935, 'name4935', 4945.111, 493500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4935]'); insert into test_proxima_be_restart_with_full_stage values(4936, 'name4936', 4946.111, 493600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4936]'); insert into test_proxima_be_restart_with_full_stage values(4937, 'name4937', 4947.111, 493700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4937]'); insert into test_proxima_be_restart_with_full_stage values(4938, 'name4938', 4948.111, 493800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4938]'); insert into test_proxima_be_restart_with_full_stage values(4939, 'name4939', 4949.111, 493900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4939]'); insert into test_proxima_be_restart_with_full_stage values(4940, 'name4940', 4950.111, 494000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4940]'); insert into test_proxima_be_restart_with_full_stage values(4941, 'name4941', 4951.111, 494100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4941]'); insert into test_proxima_be_restart_with_full_stage values(4942, 'name4942', 4952.111, 494200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4942]'); insert into test_proxima_be_restart_with_full_stage values(4943, 'name4943', 4953.111, 494300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4943]'); insert into test_proxima_be_restart_with_full_stage values(4944, 'name4944', 4954.111, 494400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4944]'); insert into test_proxima_be_restart_with_full_stage values(4945, 'name4945', 4955.111, 494500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4945]'); insert into test_proxima_be_restart_with_full_stage values(4946, 'name4946', 4956.111, 494600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4946]'); insert into test_proxima_be_restart_with_full_stage values(4947, 'name4947', 4957.111, 494700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4947]'); insert into test_proxima_be_restart_with_full_stage values(4948, 'name4948', 4958.111, 494800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4948]'); insert into test_proxima_be_restart_with_full_stage values(4949, 'name4949', 4959.111, 494900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4949]'); insert into test_proxima_be_restart_with_full_stage values(4950, 'name4950', 4960.111, 495000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4950]'); insert into test_proxima_be_restart_with_full_stage values(4951, 'name4951', 4961.111, 495100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4951]'); insert into test_proxima_be_restart_with_full_stage values(4952, 'name4952', 4962.111, 495200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4952]'); insert into test_proxima_be_restart_with_full_stage values(4953, 'name4953', 4963.111, 495300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4953]'); insert into test_proxima_be_restart_with_full_stage values(4954, 'name4954', 4964.111, 495400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4954]'); insert into test_proxima_be_restart_with_full_stage values(4955, 'name4955', 4965.111, 495500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4955]'); insert into test_proxima_be_restart_with_full_stage values(4956, 'name4956', 4966.111, 495600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4956]'); insert into test_proxima_be_restart_with_full_stage values(4957, 'name4957', 4967.111, 495700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4957]'); insert into test_proxima_be_restart_with_full_stage values(4958, 'name4958', 4968.111, 495800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4958]'); insert into test_proxima_be_restart_with_full_stage values(4959, 'name4959', 4969.111, 495900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4959]'); insert into test_proxima_be_restart_with_full_stage values(4960, 'name4960', 4970.111, 496000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4960]'); insert into test_proxima_be_restart_with_full_stage values(4961, 'name4961', 4971.111, 496100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4961]'); insert into test_proxima_be_restart_with_full_stage values(4962, 'name4962', 4972.111, 496200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4962]'); insert into test_proxima_be_restart_with_full_stage values(4963, 'name4963', 4973.111, 496300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4963]'); insert into test_proxima_be_restart_with_full_stage values(4964, 'name4964', 4974.111, 496400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4964]'); insert into test_proxima_be_restart_with_full_stage values(4965, 'name4965', 4975.111, 496500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4965]'); insert into test_proxima_be_restart_with_full_stage values(4966, 'name4966', 4976.111, 496600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4966]'); insert into test_proxima_be_restart_with_full_stage values(4967, 'name4967', 4977.111, 496700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4967]'); insert into test_proxima_be_restart_with_full_stage values(4968, 'name4968', 4978.111, 496800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4968]'); insert into test_proxima_be_restart_with_full_stage values(4969, 'name4969', 4979.111, 496900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4969]'); insert into test_proxima_be_restart_with_full_stage values(4970, 'name4970', 4980.111, 497000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4970]'); insert into test_proxima_be_restart_with_full_stage values(4971, 'name4971', 4981.111, 497100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4971]'); insert into test_proxima_be_restart_with_full_stage values(4972, 'name4972', 4982.111, 497200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4972]'); insert into test_proxima_be_restart_with_full_stage values(4973, 'name4973', 4983.111, 497300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4973]'); insert into test_proxima_be_restart_with_full_stage values(4974, 'name4974', 4984.111, 497400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4974]'); insert into test_proxima_be_restart_with_full_stage values(4975, 'name4975', 4985.111, 497500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4975]'); insert into test_proxima_be_restart_with_full_stage values(4976, 'name4976', 4986.111, 497600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4976]'); insert into test_proxima_be_restart_with_full_stage values(4977, 'name4977', 4987.111, 497700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4977]'); insert into test_proxima_be_restart_with_full_stage values(4978, 'name4978', 4988.111, 497800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4978]'); insert into test_proxima_be_restart_with_full_stage values(4979, 'name4979', 4989.111, 497900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4979]'); insert into test_proxima_be_restart_with_full_stage values(4980, 'name4980', 4990.111, 498000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4980]'); insert into test_proxima_be_restart_with_full_stage values(4981, 'name4981', 4991.111, 498100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4981]'); insert into test_proxima_be_restart_with_full_stage values(4982, 'name4982', 4992.111, 498200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4982]'); insert into test_proxima_be_restart_with_full_stage values(4983, 'name4983', 4993.111, 498300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4983]'); insert into test_proxima_be_restart_with_full_stage values(4984, 'name4984', 4994.111, 498400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4984]'); insert into test_proxima_be_restart_with_full_stage values(4985, 'name4985', 4995.111, 498500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4985]'); insert into test_proxima_be_restart_with_full_stage values(4986, 'name4986', 4996.111, 498600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4986]'); insert into test_proxima_be_restart_with_full_stage values(4987, 'name4987', 4997.111, 498700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4987]'); insert into test_proxima_be_restart_with_full_stage values(4988, 'name4988', 4998.111, 498800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4988]'); insert into test_proxima_be_restart_with_full_stage values(4989, 'name4989', 4999.111, 498900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4989]'); insert into test_proxima_be_restart_with_full_stage values(4990, 'name4990', 5000.111, 499000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4990]'); insert into test_proxima_be_restart_with_full_stage values(4991, 'name4991', 5001.111, 499100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4991]'); insert into test_proxima_be_restart_with_full_stage values(4992, 'name4992', 5002.111, 499200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4992]'); insert into test_proxima_be_restart_with_full_stage values(4993, 'name4993', 5003.111, 499300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4993]'); insert into test_proxima_be_restart_with_full_stage values(4994, 'name4994', 5004.111, 499400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4994]'); insert into test_proxima_be_restart_with_full_stage values(4995, 'name4995', 5005.111, 499500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4995]'); insert into test_proxima_be_restart_with_full_stage values(4996, 'name4996', 5006.111, 499600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4996]'); insert into test_proxima_be_restart_with_full_stage values(4997, 'name4997', 5007.111, 499700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4997]'); insert into test_proxima_be_restart_with_full_stage values(4998, 'name4998', 5008.111, 499800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4998]'); insert into test_proxima_be_restart_with_full_stage values(4999, 'name4999', 5009.111, 499900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4999]'); insert into test_proxima_be_restart_with_full_stage values(5000, 'name5000', 5010.111, 500000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5000]'); insert into test_proxima_be_restart_with_full_stage values(5001, 'name5001', 5011.111, 500100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5001]'); insert into test_proxima_be_restart_with_full_stage values(5002, 'name5002', 5012.111, 500200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5002]'); insert into test_proxima_be_restart_with_full_stage values(5003, 'name5003', 5013.111, 500300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5003]'); insert into test_proxima_be_restart_with_full_stage values(5004, 'name5004', 5014.111, 500400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5004]'); insert into test_proxima_be_restart_with_full_stage values(5005, 'name5005', 5015.111, 500500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5005]'); insert into test_proxima_be_restart_with_full_stage values(5006, 'name5006', 5016.111, 500600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5006]'); insert into test_proxima_be_restart_with_full_stage values(5007, 'name5007', 5017.111, 500700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5007]'); insert into test_proxima_be_restart_with_full_stage values(5008, 'name5008', 5018.111, 500800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5008]'); insert into test_proxima_be_restart_with_full_stage values(5009, 'name5009', 5019.111, 500900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5009]'); insert into test_proxima_be_restart_with_full_stage values(5010, 'name5010', 5020.111, 501000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5010]'); insert into test_proxima_be_restart_with_full_stage values(5011, 'name5011', 5021.111, 501100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5011]'); insert into test_proxima_be_restart_with_full_stage values(5012, 'name5012', 5022.111, 501200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5012]'); insert into test_proxima_be_restart_with_full_stage values(5013, 'name5013', 5023.111, 501300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5013]'); insert into test_proxima_be_restart_with_full_stage values(5014, 'name5014', 5024.111, 501400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5014]'); insert into test_proxima_be_restart_with_full_stage values(5015, 'name5015', 5025.111, 501500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5015]'); insert into test_proxima_be_restart_with_full_stage values(5016, 'name5016', 5026.111, 501600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5016]'); insert into test_proxima_be_restart_with_full_stage values(5017, 'name5017', 5027.111, 501700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5017]'); insert into test_proxima_be_restart_with_full_stage values(5018, 'name5018', 5028.111, 501800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5018]'); insert into test_proxima_be_restart_with_full_stage values(5019, 'name5019', 5029.111, 501900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5019]'); insert into test_proxima_be_restart_with_full_stage values(5020, 'name5020', 5030.111, 502000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5020]'); insert into test_proxima_be_restart_with_full_stage values(5021, 'name5021', 5031.111, 502100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5021]'); insert into test_proxima_be_restart_with_full_stage values(5022, 'name5022', 5032.111, 502200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5022]'); insert into test_proxima_be_restart_with_full_stage values(5023, 'name5023', 5033.111, 502300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5023]'); insert into test_proxima_be_restart_with_full_stage values(5024, 'name5024', 5034.111, 502400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5024]'); insert into test_proxima_be_restart_with_full_stage values(5025, 'name5025', 5035.111, 502500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5025]'); insert into test_proxima_be_restart_with_full_stage values(5026, 'name5026', 5036.111, 502600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5026]'); insert into test_proxima_be_restart_with_full_stage values(5027, 'name5027', 5037.111, 502700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5027]'); insert into test_proxima_be_restart_with_full_stage values(5028, 'name5028', 5038.111, 502800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5028]'); insert into test_proxima_be_restart_with_full_stage values(5029, 'name5029', 5039.111, 502900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5029]'); insert into test_proxima_be_restart_with_full_stage values(5030, 'name5030', 5040.111, 503000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5030]'); insert into test_proxima_be_restart_with_full_stage values(5031, 'name5031', 5041.111, 503100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5031]'); insert into test_proxima_be_restart_with_full_stage values(5032, 'name5032', 5042.111, 503200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5032]'); insert into test_proxima_be_restart_with_full_stage values(5033, 'name5033', 5043.111, 503300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5033]'); insert into test_proxima_be_restart_with_full_stage values(5034, 'name5034', 5044.111, 503400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5034]'); insert into test_proxima_be_restart_with_full_stage values(5035, 'name5035', 5045.111, 503500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5035]'); insert into test_proxima_be_restart_with_full_stage values(5036, 'name5036', 5046.111, 503600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5036]'); insert into test_proxima_be_restart_with_full_stage values(5037, 'name5037', 5047.111, 503700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5037]'); insert into test_proxima_be_restart_with_full_stage values(5038, 'name5038', 5048.111, 503800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5038]'); insert into test_proxima_be_restart_with_full_stage values(5039, 'name5039', 5049.111, 503900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5039]'); insert into test_proxima_be_restart_with_full_stage values(5040, 'name5040', 5050.111, 504000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5040]'); insert into test_proxima_be_restart_with_full_stage values(5041, 'name5041', 5051.111, 504100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5041]'); insert into test_proxima_be_restart_with_full_stage values(5042, 'name5042', 5052.111, 504200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5042]'); insert into test_proxima_be_restart_with_full_stage values(5043, 'name5043', 5053.111, 504300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5043]'); insert into test_proxima_be_restart_with_full_stage values(5044, 'name5044', 5054.111, 504400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5044]'); insert into test_proxima_be_restart_with_full_stage values(5045, 'name5045', 5055.111, 504500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5045]'); insert into test_proxima_be_restart_with_full_stage values(5046, 'name5046', 5056.111, 504600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5046]'); insert into test_proxima_be_restart_with_full_stage values(5047, 'name5047', 5057.111, 504700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5047]'); insert into test_proxima_be_restart_with_full_stage values(5048, 'name5048', 5058.111, 504800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5048]'); insert into test_proxima_be_restart_with_full_stage values(5049, 'name5049', 5059.111, 504900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5049]'); insert into test_proxima_be_restart_with_full_stage values(5050, 'name5050', 5060.111, 505000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5050]'); insert into test_proxima_be_restart_with_full_stage values(5051, 'name5051', 5061.111, 505100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5051]'); insert into test_proxima_be_restart_with_full_stage values(5052, 'name5052', 5062.111, 505200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5052]'); insert into test_proxima_be_restart_with_full_stage values(5053, 'name5053', 5063.111, 505300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5053]'); insert into test_proxima_be_restart_with_full_stage values(5054, 'name5054', 5064.111, 505400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5054]'); insert into test_proxima_be_restart_with_full_stage values(5055, 'name5055', 5065.111, 505500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5055]'); insert into test_proxima_be_restart_with_full_stage values(5056, 'name5056', 5066.111, 505600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5056]'); insert into test_proxima_be_restart_with_full_stage values(5057, 'name5057', 5067.111, 505700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5057]'); insert into test_proxima_be_restart_with_full_stage values(5058, 'name5058', 5068.111, 505800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5058]'); insert into test_proxima_be_restart_with_full_stage values(5059, 'name5059', 5069.111, 505900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5059]'); insert into test_proxima_be_restart_with_full_stage values(5060, 'name5060', 5070.111, 506000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5060]'); insert into test_proxima_be_restart_with_full_stage values(5061, 'name5061', 5071.111, 506100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5061]'); insert into test_proxima_be_restart_with_full_stage values(5062, 'name5062', 5072.111, 506200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5062]'); insert into test_proxima_be_restart_with_full_stage values(5063, 'name5063', 5073.111, 506300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5063]'); insert into test_proxima_be_restart_with_full_stage values(5064, 'name5064', 5074.111, 506400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5064]'); insert into test_proxima_be_restart_with_full_stage values(5065, 'name5065', 5075.111, 506500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5065]'); insert into test_proxima_be_restart_with_full_stage values(5066, 'name5066', 5076.111, 506600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5066]'); insert into test_proxima_be_restart_with_full_stage values(5067, 'name5067', 5077.111, 506700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5067]'); insert into test_proxima_be_restart_with_full_stage values(5068, 'name5068', 5078.111, 506800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5068]'); insert into test_proxima_be_restart_with_full_stage values(5069, 'name5069', 5079.111, 506900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5069]'); insert into test_proxima_be_restart_with_full_stage values(5070, 'name5070', 5080.111, 507000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5070]'); insert into test_proxima_be_restart_with_full_stage values(5071, 'name5071', 5081.111, 507100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5071]'); insert into test_proxima_be_restart_with_full_stage values(5072, 'name5072', 5082.111, 507200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5072]'); insert into test_proxima_be_restart_with_full_stage values(5073, 'name5073', 5083.111, 507300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5073]'); insert into test_proxima_be_restart_with_full_stage values(5074, 'name5074', 5084.111, 507400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5074]'); insert into test_proxima_be_restart_with_full_stage values(5075, 'name5075', 5085.111, 507500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5075]'); insert into test_proxima_be_restart_with_full_stage values(5076, 'name5076', 5086.111, 507600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5076]'); insert into test_proxima_be_restart_with_full_stage values(5077, 'name5077', 5087.111, 507700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5077]'); insert into test_proxima_be_restart_with_full_stage values(5078, 'name5078', 5088.111, 507800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5078]'); insert into test_proxima_be_restart_with_full_stage values(5079, 'name5079', 5089.111, 507900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5079]'); insert into test_proxima_be_restart_with_full_stage values(5080, 'name5080', 5090.111, 508000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5080]'); insert into test_proxima_be_restart_with_full_stage values(5081, 'name5081', 5091.111, 508100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5081]'); insert into test_proxima_be_restart_with_full_stage values(5082, 'name5082', 5092.111, 508200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5082]'); insert into test_proxima_be_restart_with_full_stage values(5083, 'name5083', 5093.111, 508300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5083]'); insert into test_proxima_be_restart_with_full_stage values(5084, 'name5084', 5094.111, 508400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5084]'); insert into test_proxima_be_restart_with_full_stage values(5085, 'name5085', 5095.111, 508500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5085]'); insert into test_proxima_be_restart_with_full_stage values(5086, 'name5086', 5096.111, 508600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5086]'); insert into test_proxima_be_restart_with_full_stage values(5087, 'name5087', 5097.111, 508700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5087]'); insert into test_proxima_be_restart_with_full_stage values(5088, 'name5088', 5098.111, 508800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5088]'); insert into test_proxima_be_restart_with_full_stage values(5089, 'name5089', 5099.111, 508900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5089]'); insert into test_proxima_be_restart_with_full_stage values(5090, 'name5090', 5100.111, 509000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5090]'); insert into test_proxima_be_restart_with_full_stage values(5091, 'name5091', 5101.111, 509100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5091]'); insert into test_proxima_be_restart_with_full_stage values(5092, 'name5092', 5102.111, 509200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5092]'); insert into test_proxima_be_restart_with_full_stage values(5093, 'name5093', 5103.111, 509300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5093]'); insert into test_proxima_be_restart_with_full_stage values(5094, 'name5094', 5104.111, 509400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5094]'); insert into test_proxima_be_restart_with_full_stage values(5095, 'name5095', 5105.111, 509500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5095]'); insert into test_proxima_be_restart_with_full_stage values(5096, 'name5096', 5106.111, 509600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5096]'); insert into test_proxima_be_restart_with_full_stage values(5097, 'name5097', 5107.111, 509700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5097]'); insert into test_proxima_be_restart_with_full_stage values(5098, 'name5098', 5108.111, 509800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5098]'); insert into test_proxima_be_restart_with_full_stage values(5099, 'name5099', 5109.111, 509900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5099]'); insert into test_proxima_be_restart_with_full_stage values(5100, 'name5100', 5110.111, 510000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5100]'); insert into test_proxima_be_restart_with_full_stage values(5101, 'name5101', 5111.111, 510100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5101]'); insert into test_proxima_be_restart_with_full_stage values(5102, 'name5102', 5112.111, 510200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5102]'); insert into test_proxima_be_restart_with_full_stage values(5103, 'name5103', 5113.111, 510300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5103]'); insert into test_proxima_be_restart_with_full_stage values(5104, 'name5104', 5114.111, 510400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5104]'); insert into test_proxima_be_restart_with_full_stage values(5105, 'name5105', 5115.111, 510500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5105]'); insert into test_proxima_be_restart_with_full_stage values(5106, 'name5106', 5116.111, 510600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5106]'); insert into test_proxima_be_restart_with_full_stage values(5107, 'name5107', 5117.111, 510700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5107]'); insert into test_proxima_be_restart_with_full_stage values(5108, 'name5108', 5118.111, 510800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5108]'); insert into test_proxima_be_restart_with_full_stage values(5109, 'name5109', 5119.111, 510900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5109]'); insert into test_proxima_be_restart_with_full_stage values(5110, 'name5110', 5120.111, 511000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5110]'); insert into test_proxima_be_restart_with_full_stage values(5111, 'name5111', 5121.111, 511100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5111]'); insert into test_proxima_be_restart_with_full_stage values(5112, 'name5112', 5122.111, 511200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5112]'); insert into test_proxima_be_restart_with_full_stage values(5113, 'name5113', 5123.111, 511300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5113]'); insert into test_proxima_be_restart_with_full_stage values(5114, 'name5114', 5124.111, 511400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5114]'); insert into test_proxima_be_restart_with_full_stage values(5115, 'name5115', 5125.111, 511500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5115]'); insert into test_proxima_be_restart_with_full_stage values(5116, 'name5116', 5126.111, 511600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5116]'); insert into test_proxima_be_restart_with_full_stage values(5117, 'name5117', 5127.111, 511700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5117]'); insert into test_proxima_be_restart_with_full_stage values(5118, 'name5118', 5128.111, 511800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5118]'); insert into test_proxima_be_restart_with_full_stage values(5119, 'name5119', 5129.111, 511900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5119]'); insert into test_proxima_be_restart_with_full_stage values(5120, 'name5120', 5130.111, 512000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5120]'); insert into test_proxima_be_restart_with_full_stage values(5121, 'name5121', 5131.111, 512100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5121]'); insert into test_proxima_be_restart_with_full_stage values(5122, 'name5122', 5132.111, 512200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5122]'); insert into test_proxima_be_restart_with_full_stage values(5123, 'name5123', 5133.111, 512300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5123]'); insert into test_proxima_be_restart_with_full_stage values(5124, 'name5124', 5134.111, 512400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5124]'); insert into test_proxima_be_restart_with_full_stage values(5125, 'name5125', 5135.111, 512500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5125]'); insert into test_proxima_be_restart_with_full_stage values(5126, 'name5126', 5136.111, 512600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5126]'); insert into test_proxima_be_restart_with_full_stage values(5127, 'name5127', 5137.111, 512700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5127]'); insert into test_proxima_be_restart_with_full_stage values(5128, 'name5128', 5138.111, 512800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5128]'); insert into test_proxima_be_restart_with_full_stage values(5129, 'name5129', 5139.111, 512900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5129]'); insert into test_proxima_be_restart_with_full_stage values(5130, 'name5130', 5140.111, 513000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5130]'); insert into test_proxima_be_restart_with_full_stage values(5131, 'name5131', 5141.111, 513100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5131]'); insert into test_proxima_be_restart_with_full_stage values(5132, 'name5132', 5142.111, 513200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5132]'); insert into test_proxima_be_restart_with_full_stage values(5133, 'name5133', 5143.111, 513300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5133]'); insert into test_proxima_be_restart_with_full_stage values(5134, 'name5134', 5144.111, 513400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5134]'); insert into test_proxima_be_restart_with_full_stage values(5135, 'name5135', 5145.111, 513500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5135]'); insert into test_proxima_be_restart_with_full_stage values(5136, 'name5136', 5146.111, 513600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5136]'); insert into test_proxima_be_restart_with_full_stage values(5137, 'name5137', 5147.111, 513700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5137]'); insert into test_proxima_be_restart_with_full_stage values(5138, 'name5138', 5148.111, 513800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5138]'); insert into test_proxima_be_restart_with_full_stage values(5139, 'name5139', 5149.111, 513900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5139]'); insert into test_proxima_be_restart_with_full_stage values(5140, 'name5140', 5150.111, 514000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5140]'); insert into test_proxima_be_restart_with_full_stage values(5141, 'name5141', 5151.111, 514100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5141]'); insert into test_proxima_be_restart_with_full_stage values(5142, 'name5142', 5152.111, 514200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5142]'); insert into test_proxima_be_restart_with_full_stage values(5143, 'name5143', 5153.111, 514300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5143]'); insert into test_proxima_be_restart_with_full_stage values(5144, 'name5144', 5154.111, 514400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5144]'); insert into test_proxima_be_restart_with_full_stage values(5145, 'name5145', 5155.111, 514500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5145]'); insert into test_proxima_be_restart_with_full_stage values(5146, 'name5146', 5156.111, 514600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5146]'); insert into test_proxima_be_restart_with_full_stage values(5147, 'name5147', 5157.111, 514700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5147]'); insert into test_proxima_be_restart_with_full_stage values(5148, 'name5148', 5158.111, 514800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5148]'); insert into test_proxima_be_restart_with_full_stage values(5149, 'name5149', 5159.111, 514900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5149]'); insert into test_proxima_be_restart_with_full_stage values(5150, 'name5150', 5160.111, 515000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5150]'); insert into test_proxima_be_restart_with_full_stage values(5151, 'name5151', 5161.111, 515100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5151]'); insert into test_proxima_be_restart_with_full_stage values(5152, 'name5152', 5162.111, 515200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5152]'); insert into test_proxima_be_restart_with_full_stage values(5153, 'name5153', 5163.111, 515300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5153]'); insert into test_proxima_be_restart_with_full_stage values(5154, 'name5154', 5164.111, 515400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5154]'); insert into test_proxima_be_restart_with_full_stage values(5155, 'name5155', 5165.111, 515500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5155]'); insert into test_proxima_be_restart_with_full_stage values(5156, 'name5156', 5166.111, 515600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5156]'); insert into test_proxima_be_restart_with_full_stage values(5157, 'name5157', 5167.111, 515700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5157]'); insert into test_proxima_be_restart_with_full_stage values(5158, 'name5158', 5168.111, 515800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5158]'); insert into test_proxima_be_restart_with_full_stage values(5159, 'name5159', 5169.111, 515900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5159]'); insert into test_proxima_be_restart_with_full_stage values(5160, 'name5160', 5170.111, 516000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5160]'); insert into test_proxima_be_restart_with_full_stage values(5161, 'name5161', 5171.111, 516100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5161]'); insert into test_proxima_be_restart_with_full_stage values(5162, 'name5162', 5172.111, 516200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5162]'); insert into test_proxima_be_restart_with_full_stage values(5163, 'name5163', 5173.111, 516300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5163]'); insert into test_proxima_be_restart_with_full_stage values(5164, 'name5164', 5174.111, 516400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5164]'); insert into test_proxima_be_restart_with_full_stage values(5165, 'name5165', 5175.111, 516500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5165]'); insert into test_proxima_be_restart_with_full_stage values(5166, 'name5166', 5176.111, 516600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5166]'); insert into test_proxima_be_restart_with_full_stage values(5167, 'name5167', 5177.111, 516700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5167]'); insert into test_proxima_be_restart_with_full_stage values(5168, 'name5168', 5178.111, 516800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5168]'); insert into test_proxima_be_restart_with_full_stage values(5169, 'name5169', 5179.111, 516900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5169]'); insert into test_proxima_be_restart_with_full_stage values(5170, 'name5170', 5180.111, 517000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5170]'); insert into test_proxima_be_restart_with_full_stage values(5171, 'name5171', 5181.111, 517100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5171]'); insert into test_proxima_be_restart_with_full_stage values(5172, 'name5172', 5182.111, 517200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5172]'); insert into test_proxima_be_restart_with_full_stage values(5173, 'name5173', 5183.111, 517300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5173]'); insert into test_proxima_be_restart_with_full_stage values(5174, 'name5174', 5184.111, 517400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5174]'); insert into test_proxima_be_restart_with_full_stage values(5175, 'name5175', 5185.111, 517500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5175]'); insert into test_proxima_be_restart_with_full_stage values(5176, 'name5176', 5186.111, 517600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5176]'); insert into test_proxima_be_restart_with_full_stage values(5177, 'name5177', 5187.111, 517700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5177]'); insert into test_proxima_be_restart_with_full_stage values(5178, 'name5178', 5188.111, 517800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5178]'); insert into test_proxima_be_restart_with_full_stage values(5179, 'name5179', 5189.111, 517900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5179]'); insert into test_proxima_be_restart_with_full_stage values(5180, 'name5180', 5190.111, 518000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5180]'); insert into test_proxima_be_restart_with_full_stage values(5181, 'name5181', 5191.111, 518100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5181]'); insert into test_proxima_be_restart_with_full_stage values(5182, 'name5182', 5192.111, 518200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5182]'); insert into test_proxima_be_restart_with_full_stage values(5183, 'name5183', 5193.111, 518300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5183]'); insert into test_proxima_be_restart_with_full_stage values(5184, 'name5184', 5194.111, 518400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5184]'); insert into test_proxima_be_restart_with_full_stage values(5185, 'name5185', 5195.111, 518500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5185]'); insert into test_proxima_be_restart_with_full_stage values(5186, 'name5186', 5196.111, 518600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5186]'); insert into test_proxima_be_restart_with_full_stage values(5187, 'name5187', 5197.111, 518700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5187]'); insert into test_proxima_be_restart_with_full_stage values(5188, 'name5188', 5198.111, 518800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5188]'); insert into test_proxima_be_restart_with_full_stage values(5189, 'name5189', 5199.111, 518900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5189]'); insert into test_proxima_be_restart_with_full_stage values(5190, 'name5190', 5200.111, 519000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5190]'); insert into test_proxima_be_restart_with_full_stage values(5191, 'name5191', 5201.111, 519100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5191]'); insert into test_proxima_be_restart_with_full_stage values(5192, 'name5192', 5202.111, 519200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5192]'); insert into test_proxima_be_restart_with_full_stage values(5193, 'name5193', 5203.111, 519300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5193]'); insert into test_proxima_be_restart_with_full_stage values(5194, 'name5194', 5204.111, 519400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5194]'); insert into test_proxima_be_restart_with_full_stage values(5195, 'name5195', 5205.111, 519500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5195]'); insert into test_proxima_be_restart_with_full_stage values(5196, 'name5196', 5206.111, 519600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5196]'); insert into test_proxima_be_restart_with_full_stage values(5197, 'name5197', 5207.111, 519700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5197]'); insert into test_proxima_be_restart_with_full_stage values(5198, 'name5198', 5208.111, 519800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5198]'); insert into test_proxima_be_restart_with_full_stage values(5199, 'name5199', 5209.111, 519900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5199]'); insert into test_proxima_be_restart_with_full_stage values(5200, 'name5200', 5210.111, 520000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5200]'); insert into test_proxima_be_restart_with_full_stage values(5201, 'name5201', 5211.111, 520100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5201]'); insert into test_proxima_be_restart_with_full_stage values(5202, 'name5202', 5212.111, 520200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5202]'); insert into test_proxima_be_restart_with_full_stage values(5203, 'name5203', 5213.111, 520300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5203]'); insert into test_proxima_be_restart_with_full_stage values(5204, 'name5204', 5214.111, 520400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5204]'); insert into test_proxima_be_restart_with_full_stage values(5205, 'name5205', 5215.111, 520500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5205]'); insert into test_proxima_be_restart_with_full_stage values(5206, 'name5206', 5216.111, 520600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5206]'); insert into test_proxima_be_restart_with_full_stage values(5207, 'name5207', 5217.111, 520700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5207]'); insert into test_proxima_be_restart_with_full_stage values(5208, 'name5208', 5218.111, 520800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5208]'); insert into test_proxima_be_restart_with_full_stage values(5209, 'name5209', 5219.111, 520900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5209]'); insert into test_proxima_be_restart_with_full_stage values(5210, 'name5210', 5220.111, 521000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5210]'); insert into test_proxima_be_restart_with_full_stage values(5211, 'name5211', 5221.111, 521100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5211]'); insert into test_proxima_be_restart_with_full_stage values(5212, 'name5212', 5222.111, 521200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5212]'); insert into test_proxima_be_restart_with_full_stage values(5213, 'name5213', 5223.111, 521300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5213]'); insert into test_proxima_be_restart_with_full_stage values(5214, 'name5214', 5224.111, 521400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5214]'); insert into test_proxima_be_restart_with_full_stage values(5215, 'name5215', 5225.111, 521500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5215]'); insert into test_proxima_be_restart_with_full_stage values(5216, 'name5216', 5226.111, 521600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5216]'); insert into test_proxima_be_restart_with_full_stage values(5217, 'name5217', 5227.111, 521700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5217]'); insert into test_proxima_be_restart_with_full_stage values(5218, 'name5218', 5228.111, 521800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5218]'); insert into test_proxima_be_restart_with_full_stage values(5219, 'name5219', 5229.111, 521900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5219]'); insert into test_proxima_be_restart_with_full_stage values(5220, 'name5220', 5230.111, 522000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5220]'); insert into test_proxima_be_restart_with_full_stage values(5221, 'name5221', 5231.111, 522100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5221]'); insert into test_proxima_be_restart_with_full_stage values(5222, 'name5222', 5232.111, 522200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5222]'); insert into test_proxima_be_restart_with_full_stage values(5223, 'name5223', 5233.111, 522300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5223]'); insert into test_proxima_be_restart_with_full_stage values(5224, 'name5224', 5234.111, 522400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5224]'); insert into test_proxima_be_restart_with_full_stage values(5225, 'name5225', 5235.111, 522500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5225]'); insert into test_proxima_be_restart_with_full_stage values(5226, 'name5226', 5236.111, 522600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5226]'); insert into test_proxima_be_restart_with_full_stage values(5227, 'name5227', 5237.111, 522700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5227]'); insert into test_proxima_be_restart_with_full_stage values(5228, 'name5228', 5238.111, 522800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5228]'); insert into test_proxima_be_restart_with_full_stage values(5229, 'name5229', 5239.111, 522900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5229]'); insert into test_proxima_be_restart_with_full_stage values(5230, 'name5230', 5240.111, 523000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5230]'); insert into test_proxima_be_restart_with_full_stage values(5231, 'name5231', 5241.111, 523100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5231]'); insert into test_proxima_be_restart_with_full_stage values(5232, 'name5232', 5242.111, 523200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5232]'); insert into test_proxima_be_restart_with_full_stage values(5233, 'name5233', 5243.111, 523300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5233]'); insert into test_proxima_be_restart_with_full_stage values(5234, 'name5234', 5244.111, 523400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5234]'); insert into test_proxima_be_restart_with_full_stage values(5235, 'name5235', 5245.111, 523500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5235]'); insert into test_proxima_be_restart_with_full_stage values(5236, 'name5236', 5246.111, 523600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5236]'); insert into test_proxima_be_restart_with_full_stage values(5237, 'name5237', 5247.111, 523700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5237]'); insert into test_proxima_be_restart_with_full_stage values(5238, 'name5238', 5248.111, 523800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5238]'); insert into test_proxima_be_restart_with_full_stage values(5239, 'name5239', 5249.111, 523900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5239]'); insert into test_proxima_be_restart_with_full_stage values(5240, 'name5240', 5250.111, 524000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5240]'); insert into test_proxima_be_restart_with_full_stage values(5241, 'name5241', 5251.111, 524100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5241]'); insert into test_proxima_be_restart_with_full_stage values(5242, 'name5242', 5252.111, 524200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5242]'); insert into test_proxima_be_restart_with_full_stage values(5243, 'name5243', 5253.111, 524300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5243]'); insert into test_proxima_be_restart_with_full_stage values(5244, 'name5244', 5254.111, 524400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5244]'); insert into test_proxima_be_restart_with_full_stage values(5245, 'name5245', 5255.111, 524500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5245]'); insert into test_proxima_be_restart_with_full_stage values(5246, 'name5246', 5256.111, 524600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5246]'); insert into test_proxima_be_restart_with_full_stage values(5247, 'name5247', 5257.111, 524700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5247]'); insert into test_proxima_be_restart_with_full_stage values(5248, 'name5248', 5258.111, 524800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5248]'); insert into test_proxima_be_restart_with_full_stage values(5249, 'name5249', 5259.111, 524900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5249]'); insert into test_proxima_be_restart_with_full_stage values(5250, 'name5250', 5260.111, 525000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5250]'); insert into test_proxima_be_restart_with_full_stage values(5251, 'name5251', 5261.111, 525100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5251]'); insert into test_proxima_be_restart_with_full_stage values(5252, 'name5252', 5262.111, 525200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5252]'); insert into test_proxima_be_restart_with_full_stage values(5253, 'name5253', 5263.111, 525300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5253]'); insert into test_proxima_be_restart_with_full_stage values(5254, 'name5254', 5264.111, 525400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5254]'); insert into test_proxima_be_restart_with_full_stage values(5255, 'name5255', 5265.111, 525500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5255]'); insert into test_proxima_be_restart_with_full_stage values(5256, 'name5256', 5266.111, 525600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5256]'); insert into test_proxima_be_restart_with_full_stage values(5257, 'name5257', 5267.111, 525700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5257]'); insert into test_proxima_be_restart_with_full_stage values(5258, 'name5258', 5268.111, 525800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5258]'); insert into test_proxima_be_restart_with_full_stage values(5259, 'name5259', 5269.111, 525900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5259]'); insert into test_proxima_be_restart_with_full_stage values(5260, 'name5260', 5270.111, 526000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5260]'); insert into test_proxima_be_restart_with_full_stage values(5261, 'name5261', 5271.111, 526100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5261]'); insert into test_proxima_be_restart_with_full_stage values(5262, 'name5262', 5272.111, 526200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5262]'); insert into test_proxima_be_restart_with_full_stage values(5263, 'name5263', 5273.111, 526300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5263]'); insert into test_proxima_be_restart_with_full_stage values(5264, 'name5264', 5274.111, 526400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5264]'); insert into test_proxima_be_restart_with_full_stage values(5265, 'name5265', 5275.111, 526500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5265]'); insert into test_proxima_be_restart_with_full_stage values(5266, 'name5266', 5276.111, 526600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5266]'); insert into test_proxima_be_restart_with_full_stage values(5267, 'name5267', 5277.111, 526700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5267]'); insert into test_proxima_be_restart_with_full_stage values(5268, 'name5268', 5278.111, 526800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5268]'); insert into test_proxima_be_restart_with_full_stage values(5269, 'name5269', 5279.111, 526900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5269]'); insert into test_proxima_be_restart_with_full_stage values(5270, 'name5270', 5280.111, 527000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5270]'); insert into test_proxima_be_restart_with_full_stage values(5271, 'name5271', 5281.111, 527100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5271]'); insert into test_proxima_be_restart_with_full_stage values(5272, 'name5272', 5282.111, 527200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5272]'); insert into test_proxima_be_restart_with_full_stage values(5273, 'name5273', 5283.111, 527300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5273]'); insert into test_proxima_be_restart_with_full_stage values(5274, 'name5274', 5284.111, 527400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5274]'); insert into test_proxima_be_restart_with_full_stage values(5275, 'name5275', 5285.111, 527500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5275]'); insert into test_proxima_be_restart_with_full_stage values(5276, 'name5276', 5286.111, 527600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5276]'); insert into test_proxima_be_restart_with_full_stage values(5277, 'name5277', 5287.111, 527700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5277]'); insert into test_proxima_be_restart_with_full_stage values(5278, 'name5278', 5288.111, 527800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5278]'); insert into test_proxima_be_restart_with_full_stage values(5279, 'name5279', 5289.111, 527900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5279]'); insert into test_proxima_be_restart_with_full_stage values(5280, 'name5280', 5290.111, 528000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5280]'); insert into test_proxima_be_restart_with_full_stage values(5281, 'name5281', 5291.111, 528100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5281]'); insert into test_proxima_be_restart_with_full_stage values(5282, 'name5282', 5292.111, 528200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5282]'); insert into test_proxima_be_restart_with_full_stage values(5283, 'name5283', 5293.111, 528300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5283]'); insert into test_proxima_be_restart_with_full_stage values(5284, 'name5284', 5294.111, 528400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5284]'); insert into test_proxima_be_restart_with_full_stage values(5285, 'name5285', 5295.111, 528500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5285]'); insert into test_proxima_be_restart_with_full_stage values(5286, 'name5286', 5296.111, 528600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5286]'); insert into test_proxima_be_restart_with_full_stage values(5287, 'name5287', 5297.111, 528700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5287]'); insert into test_proxima_be_restart_with_full_stage values(5288, 'name5288', 5298.111, 528800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5288]'); insert into test_proxima_be_restart_with_full_stage values(5289, 'name5289', 5299.111, 528900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5289]'); insert into test_proxima_be_restart_with_full_stage values(5290, 'name5290', 5300.111, 529000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5290]'); insert into test_proxima_be_restart_with_full_stage values(5291, 'name5291', 5301.111, 529100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5291]'); insert into test_proxima_be_restart_with_full_stage values(5292, 'name5292', 5302.111, 529200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5292]'); insert into test_proxima_be_restart_with_full_stage values(5293, 'name5293', 5303.111, 529300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5293]'); insert into test_proxima_be_restart_with_full_stage values(5294, 'name5294', 5304.111, 529400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5294]'); insert into test_proxima_be_restart_with_full_stage values(5295, 'name5295', 5305.111, 529500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5295]'); insert into test_proxima_be_restart_with_full_stage values(5296, 'name5296', 5306.111, 529600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5296]'); insert into test_proxima_be_restart_with_full_stage values(5297, 'name5297', 5307.111, 529700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5297]'); insert into test_proxima_be_restart_with_full_stage values(5298, 'name5298', 5308.111, 529800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5298]'); insert into test_proxima_be_restart_with_full_stage values(5299, 'name5299', 5309.111, 529900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5299]'); insert into test_proxima_be_restart_with_full_stage values(5300, 'name5300', 5310.111, 530000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5300]'); insert into test_proxima_be_restart_with_full_stage values(5301, 'name5301', 5311.111, 530100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5301]'); insert into test_proxima_be_restart_with_full_stage values(5302, 'name5302', 5312.111, 530200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5302]'); insert into test_proxima_be_restart_with_full_stage values(5303, 'name5303', 5313.111, 530300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5303]'); insert into test_proxima_be_restart_with_full_stage values(5304, 'name5304', 5314.111, 530400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5304]'); insert into test_proxima_be_restart_with_full_stage values(5305, 'name5305', 5315.111, 530500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5305]'); insert into test_proxima_be_restart_with_full_stage values(5306, 'name5306', 5316.111, 530600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5306]'); insert into test_proxima_be_restart_with_full_stage values(5307, 'name5307', 5317.111, 530700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5307]'); insert into test_proxima_be_restart_with_full_stage values(5308, 'name5308', 5318.111, 530800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5308]'); insert into test_proxima_be_restart_with_full_stage values(5309, 'name5309', 5319.111, 530900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5309]'); insert into test_proxima_be_restart_with_full_stage values(5310, 'name5310', 5320.111, 531000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5310]'); insert into test_proxima_be_restart_with_full_stage values(5311, 'name5311', 5321.111, 531100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5311]'); insert into test_proxima_be_restart_with_full_stage values(5312, 'name5312', 5322.111, 531200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5312]'); insert into test_proxima_be_restart_with_full_stage values(5313, 'name5313', 5323.111, 531300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5313]'); insert into test_proxima_be_restart_with_full_stage values(5314, 'name5314', 5324.111, 531400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5314]'); insert into test_proxima_be_restart_with_full_stage values(5315, 'name5315', 5325.111, 531500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5315]'); insert into test_proxima_be_restart_with_full_stage values(5316, 'name5316', 5326.111, 531600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5316]'); insert into test_proxima_be_restart_with_full_stage values(5317, 'name5317', 5327.111, 531700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5317]'); insert into test_proxima_be_restart_with_full_stage values(5318, 'name5318', 5328.111, 531800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5318]'); insert into test_proxima_be_restart_with_full_stage values(5319, 'name5319', 5329.111, 531900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5319]'); insert into test_proxima_be_restart_with_full_stage values(5320, 'name5320', 5330.111, 532000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5320]'); insert into test_proxima_be_restart_with_full_stage values(5321, 'name5321', 5331.111, 532100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5321]'); insert into test_proxima_be_restart_with_full_stage values(5322, 'name5322', 5332.111, 532200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5322]'); insert into test_proxima_be_restart_with_full_stage values(5323, 'name5323', 5333.111, 532300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5323]'); insert into test_proxima_be_restart_with_full_stage values(5324, 'name5324', 5334.111, 532400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5324]'); insert into test_proxima_be_restart_with_full_stage values(5325, 'name5325', 5335.111, 532500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5325]'); insert into test_proxima_be_restart_with_full_stage values(5326, 'name5326', 5336.111, 532600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5326]'); insert into test_proxima_be_restart_with_full_stage values(5327, 'name5327', 5337.111, 532700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5327]'); insert into test_proxima_be_restart_with_full_stage values(5328, 'name5328', 5338.111, 532800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5328]'); insert into test_proxima_be_restart_with_full_stage values(5329, 'name5329', 5339.111, 532900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5329]'); insert into test_proxima_be_restart_with_full_stage values(5330, 'name5330', 5340.111, 533000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5330]'); insert into test_proxima_be_restart_with_full_stage values(5331, 'name5331', 5341.111, 533100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5331]'); insert into test_proxima_be_restart_with_full_stage values(5332, 'name5332', 5342.111, 533200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5332]'); insert into test_proxima_be_restart_with_full_stage values(5333, 'name5333', 5343.111, 533300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5333]'); insert into test_proxima_be_restart_with_full_stage values(5334, 'name5334', 5344.111, 533400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5334]'); insert into test_proxima_be_restart_with_full_stage values(5335, 'name5335', 5345.111, 533500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5335]'); insert into test_proxima_be_restart_with_full_stage values(5336, 'name5336', 5346.111, 533600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5336]'); insert into test_proxima_be_restart_with_full_stage values(5337, 'name5337', 5347.111, 533700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5337]'); insert into test_proxima_be_restart_with_full_stage values(5338, 'name5338', 5348.111, 533800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5338]'); insert into test_proxima_be_restart_with_full_stage values(5339, 'name5339', 5349.111, 533900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5339]'); insert into test_proxima_be_restart_with_full_stage values(5340, 'name5340', 5350.111, 534000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5340]'); insert into test_proxima_be_restart_with_full_stage values(5341, 'name5341', 5351.111, 534100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5341]'); insert into test_proxima_be_restart_with_full_stage values(5342, 'name5342', 5352.111, 534200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5342]'); insert into test_proxima_be_restart_with_full_stage values(5343, 'name5343', 5353.111, 534300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5343]'); insert into test_proxima_be_restart_with_full_stage values(5344, 'name5344', 5354.111, 534400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5344]'); insert into test_proxima_be_restart_with_full_stage values(5345, 'name5345', 5355.111, 534500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5345]'); insert into test_proxima_be_restart_with_full_stage values(5346, 'name5346', 5356.111, 534600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5346]'); insert into test_proxima_be_restart_with_full_stage values(5347, 'name5347', 5357.111, 534700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5347]'); insert into test_proxima_be_restart_with_full_stage values(5348, 'name5348', 5358.111, 534800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5348]'); insert into test_proxima_be_restart_with_full_stage values(5349, 'name5349', 5359.111, 534900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5349]'); insert into test_proxima_be_restart_with_full_stage values(5350, 'name5350', 5360.111, 535000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5350]'); insert into test_proxima_be_restart_with_full_stage values(5351, 'name5351', 5361.111, 535100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5351]'); insert into test_proxima_be_restart_with_full_stage values(5352, 'name5352', 5362.111, 535200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5352]'); insert into test_proxima_be_restart_with_full_stage values(5353, 'name5353', 5363.111, 535300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5353]'); insert into test_proxima_be_restart_with_full_stage values(5354, 'name5354', 5364.111, 535400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5354]'); insert into test_proxima_be_restart_with_full_stage values(5355, 'name5355', 5365.111, 535500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5355]'); insert into test_proxima_be_restart_with_full_stage values(5356, 'name5356', 5366.111, 535600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5356]'); insert into test_proxima_be_restart_with_full_stage values(5357, 'name5357', 5367.111, 535700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5357]'); insert into test_proxima_be_restart_with_full_stage values(5358, 'name5358', 5368.111, 535800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5358]'); insert into test_proxima_be_restart_with_full_stage values(5359, 'name5359', 5369.111, 535900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5359]'); insert into test_proxima_be_restart_with_full_stage values(5360, 'name5360', 5370.111, 536000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5360]'); insert into test_proxima_be_restart_with_full_stage values(5361, 'name5361', 5371.111, 536100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5361]'); insert into test_proxima_be_restart_with_full_stage values(5362, 'name5362', 5372.111, 536200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5362]'); insert into test_proxima_be_restart_with_full_stage values(5363, 'name5363', 5373.111, 536300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5363]'); insert into test_proxima_be_restart_with_full_stage values(5364, 'name5364', 5374.111, 536400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5364]'); insert into test_proxima_be_restart_with_full_stage values(5365, 'name5365', 5375.111, 536500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5365]'); insert into test_proxima_be_restart_with_full_stage values(5366, 'name5366', 5376.111, 536600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5366]'); insert into test_proxima_be_restart_with_full_stage values(5367, 'name5367', 5377.111, 536700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5367]'); insert into test_proxima_be_restart_with_full_stage values(5368, 'name5368', 5378.111, 536800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5368]'); insert into test_proxima_be_restart_with_full_stage values(5369, 'name5369', 5379.111, 536900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5369]'); insert into test_proxima_be_restart_with_full_stage values(5370, 'name5370', 5380.111, 537000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5370]'); insert into test_proxima_be_restart_with_full_stage values(5371, 'name5371', 5381.111, 537100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5371]'); insert into test_proxima_be_restart_with_full_stage values(5372, 'name5372', 5382.111, 537200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5372]'); insert into test_proxima_be_restart_with_full_stage values(5373, 'name5373', 5383.111, 537300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5373]'); insert into test_proxima_be_restart_with_full_stage values(5374, 'name5374', 5384.111, 537400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5374]'); insert into test_proxima_be_restart_with_full_stage values(5375, 'name5375', 5385.111, 537500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5375]'); insert into test_proxima_be_restart_with_full_stage values(5376, 'name5376', 5386.111, 537600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5376]'); insert into test_proxima_be_restart_with_full_stage values(5377, 'name5377', 5387.111, 537700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5377]'); insert into test_proxima_be_restart_with_full_stage values(5378, 'name5378', 5388.111, 537800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5378]'); insert into test_proxima_be_restart_with_full_stage values(5379, 'name5379', 5389.111, 537900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5379]'); insert into test_proxima_be_restart_with_full_stage values(5380, 'name5380', 5390.111, 538000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5380]'); insert into test_proxima_be_restart_with_full_stage values(5381, 'name5381', 5391.111, 538100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5381]'); insert into test_proxima_be_restart_with_full_stage values(5382, 'name5382', 5392.111, 538200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5382]'); insert into test_proxima_be_restart_with_full_stage values(5383, 'name5383', 5393.111, 538300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5383]'); insert into test_proxima_be_restart_with_full_stage values(5384, 'name5384', 5394.111, 538400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5384]'); insert into test_proxima_be_restart_with_full_stage values(5385, 'name5385', 5395.111, 538500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5385]'); insert into test_proxima_be_restart_with_full_stage values(5386, 'name5386', 5396.111, 538600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5386]'); insert into test_proxima_be_restart_with_full_stage values(5387, 'name5387', 5397.111, 538700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5387]'); insert into test_proxima_be_restart_with_full_stage values(5388, 'name5388', 5398.111, 538800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5388]'); insert into test_proxima_be_restart_with_full_stage values(5389, 'name5389', 5399.111, 538900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5389]'); insert into test_proxima_be_restart_with_full_stage values(5390, 'name5390', 5400.111, 539000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5390]'); insert into test_proxima_be_restart_with_full_stage values(5391, 'name5391', 5401.111, 539100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5391]'); insert into test_proxima_be_restart_with_full_stage values(5392, 'name5392', 5402.111, 539200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5392]'); insert into test_proxima_be_restart_with_full_stage values(5393, 'name5393', 5403.111, 539300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5393]'); insert into test_proxima_be_restart_with_full_stage values(5394, 'name5394', 5404.111, 539400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5394]'); insert into test_proxima_be_restart_with_full_stage values(5395, 'name5395', 5405.111, 539500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5395]'); insert into test_proxima_be_restart_with_full_stage values(5396, 'name5396', 5406.111, 539600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5396]'); insert into test_proxima_be_restart_with_full_stage values(5397, 'name5397', 5407.111, 539700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5397]'); insert into test_proxima_be_restart_with_full_stage values(5398, 'name5398', 5408.111, 539800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5398]'); insert into test_proxima_be_restart_with_full_stage values(5399, 'name5399', 5409.111, 539900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5399]'); insert into test_proxima_be_restart_with_full_stage values(5400, 'name5400', 5410.111, 540000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5400]'); insert into test_proxima_be_restart_with_full_stage values(5401, 'name5401', 5411.111, 540100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5401]'); insert into test_proxima_be_restart_with_full_stage values(5402, 'name5402', 5412.111, 540200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5402]'); insert into test_proxima_be_restart_with_full_stage values(5403, 'name5403', 5413.111, 540300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5403]'); insert into test_proxima_be_restart_with_full_stage values(5404, 'name5404', 5414.111, 540400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5404]'); insert into test_proxima_be_restart_with_full_stage values(5405, 'name5405', 5415.111, 540500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5405]'); insert into test_proxima_be_restart_with_full_stage values(5406, 'name5406', 5416.111, 540600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5406]'); insert into test_proxima_be_restart_with_full_stage values(5407, 'name5407', 5417.111, 540700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5407]'); insert into test_proxima_be_restart_with_full_stage values(5408, 'name5408', 5418.111, 540800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5408]'); insert into test_proxima_be_restart_with_full_stage values(5409, 'name5409', 5419.111, 540900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5409]'); insert into test_proxima_be_restart_with_full_stage values(5410, 'name5410', 5420.111, 541000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5410]'); insert into test_proxima_be_restart_with_full_stage values(5411, 'name5411', 5421.111, 541100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5411]'); insert into test_proxima_be_restart_with_full_stage values(5412, 'name5412', 5422.111, 541200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5412]'); insert into test_proxima_be_restart_with_full_stage values(5413, 'name5413', 5423.111, 541300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5413]'); insert into test_proxima_be_restart_with_full_stage values(5414, 'name5414', 5424.111, 541400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5414]'); insert into test_proxima_be_restart_with_full_stage values(5415, 'name5415', 5425.111, 541500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5415]'); insert into test_proxima_be_restart_with_full_stage values(5416, 'name5416', 5426.111, 541600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5416]'); insert into test_proxima_be_restart_with_full_stage values(5417, 'name5417', 5427.111, 541700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5417]'); insert into test_proxima_be_restart_with_full_stage values(5418, 'name5418', 5428.111, 541800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5418]'); insert into test_proxima_be_restart_with_full_stage values(5419, 'name5419', 5429.111, 541900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5419]'); insert into test_proxima_be_restart_with_full_stage values(5420, 'name5420', 5430.111, 542000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5420]'); insert into test_proxima_be_restart_with_full_stage values(5421, 'name5421', 5431.111, 542100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5421]'); insert into test_proxima_be_restart_with_full_stage values(5422, 'name5422', 5432.111, 542200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5422]'); insert into test_proxima_be_restart_with_full_stage values(5423, 'name5423', 5433.111, 542300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5423]'); insert into test_proxima_be_restart_with_full_stage values(5424, 'name5424', 5434.111, 542400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5424]'); insert into test_proxima_be_restart_with_full_stage values(5425, 'name5425', 5435.111, 542500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5425]'); insert into test_proxima_be_restart_with_full_stage values(5426, 'name5426', 5436.111, 542600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5426]'); insert into test_proxima_be_restart_with_full_stage values(5427, 'name5427', 5437.111, 542700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5427]'); insert into test_proxima_be_restart_with_full_stage values(5428, 'name5428', 5438.111, 542800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5428]'); insert into test_proxima_be_restart_with_full_stage values(5429, 'name5429', 5439.111, 542900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5429]'); insert into test_proxima_be_restart_with_full_stage values(5430, 'name5430', 5440.111, 543000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5430]'); insert into test_proxima_be_restart_with_full_stage values(5431, 'name5431', 5441.111, 543100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5431]'); insert into test_proxima_be_restart_with_full_stage values(5432, 'name5432', 5442.111, 543200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5432]'); insert into test_proxima_be_restart_with_full_stage values(5433, 'name5433', 5443.111, 543300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5433]'); insert into test_proxima_be_restart_with_full_stage values(5434, 'name5434', 5444.111, 543400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5434]'); insert into test_proxima_be_restart_with_full_stage values(5435, 'name5435', 5445.111, 543500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5435]'); insert into test_proxima_be_restart_with_full_stage values(5436, 'name5436', 5446.111, 543600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5436]'); insert into test_proxima_be_restart_with_full_stage values(5437, 'name5437', 5447.111, 543700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5437]'); insert into test_proxima_be_restart_with_full_stage values(5438, 'name5438', 5448.111, 543800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5438]'); insert into test_proxima_be_restart_with_full_stage values(5439, 'name5439', 5449.111, 543900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5439]'); insert into test_proxima_be_restart_with_full_stage values(5440, 'name5440', 5450.111, 544000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5440]'); insert into test_proxima_be_restart_with_full_stage values(5441, 'name5441', 5451.111, 544100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5441]'); insert into test_proxima_be_restart_with_full_stage values(5442, 'name5442', 5452.111, 544200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5442]'); insert into test_proxima_be_restart_with_full_stage values(5443, 'name5443', 5453.111, 544300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5443]'); insert into test_proxima_be_restart_with_full_stage values(5444, 'name5444', 5454.111, 544400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5444]'); insert into test_proxima_be_restart_with_full_stage values(5445, 'name5445', 5455.111, 544500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5445]'); insert into test_proxima_be_restart_with_full_stage values(5446, 'name5446', 5456.111, 544600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5446]'); insert into test_proxima_be_restart_with_full_stage values(5447, 'name5447', 5457.111, 544700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5447]'); insert into test_proxima_be_restart_with_full_stage values(5448, 'name5448', 5458.111, 544800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5448]'); insert into test_proxima_be_restart_with_full_stage values(5449, 'name5449', 5459.111, 544900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5449]'); insert into test_proxima_be_restart_with_full_stage values(5450, 'name5450', 5460.111, 545000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5450]'); insert into test_proxima_be_restart_with_full_stage values(5451, 'name5451', 5461.111, 545100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5451]'); insert into test_proxima_be_restart_with_full_stage values(5452, 'name5452', 5462.111, 545200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5452]'); insert into test_proxima_be_restart_with_full_stage values(5453, 'name5453', 5463.111, 545300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5453]'); insert into test_proxima_be_restart_with_full_stage values(5454, 'name5454', 5464.111, 545400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5454]'); insert into test_proxima_be_restart_with_full_stage values(5455, 'name5455', 5465.111, 545500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5455]'); insert into test_proxima_be_restart_with_full_stage values(5456, 'name5456', 5466.111, 545600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5456]'); insert into test_proxima_be_restart_with_full_stage values(5457, 'name5457', 5467.111, 545700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5457]'); insert into test_proxima_be_restart_with_full_stage values(5458, 'name5458', 5468.111, 545800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5458]'); insert into test_proxima_be_restart_with_full_stage values(5459, 'name5459', 5469.111, 545900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5459]'); insert into test_proxima_be_restart_with_full_stage values(5460, 'name5460', 5470.111, 546000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5460]'); insert into test_proxima_be_restart_with_full_stage values(5461, 'name5461', 5471.111, 546100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5461]'); insert into test_proxima_be_restart_with_full_stage values(5462, 'name5462', 5472.111, 546200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5462]'); insert into test_proxima_be_restart_with_full_stage values(5463, 'name5463', 5473.111, 546300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5463]'); insert into test_proxima_be_restart_with_full_stage values(5464, 'name5464', 5474.111, 546400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5464]'); insert into test_proxima_be_restart_with_full_stage values(5465, 'name5465', 5475.111, 546500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5465]'); insert into test_proxima_be_restart_with_full_stage values(5466, 'name5466', 5476.111, 546600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5466]'); insert into test_proxima_be_restart_with_full_stage values(5467, 'name5467', 5477.111, 546700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5467]'); insert into test_proxima_be_restart_with_full_stage values(5468, 'name5468', 5478.111, 546800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5468]'); insert into test_proxima_be_restart_with_full_stage values(5469, 'name5469', 5479.111, 546900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5469]'); insert into test_proxima_be_restart_with_full_stage values(5470, 'name5470', 5480.111, 547000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5470]'); insert into test_proxima_be_restart_with_full_stage values(5471, 'name5471', 5481.111, 547100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5471]'); insert into test_proxima_be_restart_with_full_stage values(5472, 'name5472', 5482.111, 547200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5472]'); insert into test_proxima_be_restart_with_full_stage values(5473, 'name5473', 5483.111, 547300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5473]'); insert into test_proxima_be_restart_with_full_stage values(5474, 'name5474', 5484.111, 547400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5474]'); insert into test_proxima_be_restart_with_full_stage values(5475, 'name5475', 5485.111, 547500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5475]'); insert into test_proxima_be_restart_with_full_stage values(5476, 'name5476', 5486.111, 547600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5476]'); insert into test_proxima_be_restart_with_full_stage values(5477, 'name5477', 5487.111, 547700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5477]'); insert into test_proxima_be_restart_with_full_stage values(5478, 'name5478', 5488.111, 547800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5478]'); insert into test_proxima_be_restart_with_full_stage values(5479, 'name5479', 5489.111, 547900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5479]'); insert into test_proxima_be_restart_with_full_stage values(5480, 'name5480', 5490.111, 548000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5480]'); insert into test_proxima_be_restart_with_full_stage values(5481, 'name5481', 5491.111, 548100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5481]'); insert into test_proxima_be_restart_with_full_stage values(5482, 'name5482', 5492.111, 548200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5482]'); insert into test_proxima_be_restart_with_full_stage values(5483, 'name5483', 5493.111, 548300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5483]'); insert into test_proxima_be_restart_with_full_stage values(5484, 'name5484', 5494.111, 548400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5484]'); insert into test_proxima_be_restart_with_full_stage values(5485, 'name5485', 5495.111, 548500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5485]'); insert into test_proxima_be_restart_with_full_stage values(5486, 'name5486', 5496.111, 548600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5486]'); insert into test_proxima_be_restart_with_full_stage values(5487, 'name5487', 5497.111, 548700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5487]'); insert into test_proxima_be_restart_with_full_stage values(5488, 'name5488', 5498.111, 548800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5488]'); insert into test_proxima_be_restart_with_full_stage values(5489, 'name5489', 5499.111, 548900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5489]'); insert into test_proxima_be_restart_with_full_stage values(5490, 'name5490', 5500.111, 549000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5490]'); insert into test_proxima_be_restart_with_full_stage values(5491, 'name5491', 5501.111, 549100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5491]'); insert into test_proxima_be_restart_with_full_stage values(5492, 'name5492', 5502.111, 549200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5492]'); insert into test_proxima_be_restart_with_full_stage values(5493, 'name5493', 5503.111, 549300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5493]'); insert into test_proxima_be_restart_with_full_stage values(5494, 'name5494', 5504.111, 549400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5494]'); insert into test_proxima_be_restart_with_full_stage values(5495, 'name5495', 5505.111, 549500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5495]'); insert into test_proxima_be_restart_with_full_stage values(5496, 'name5496', 5506.111, 549600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5496]'); insert into test_proxima_be_restart_with_full_stage values(5497, 'name5497', 5507.111, 549700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5497]'); insert into test_proxima_be_restart_with_full_stage values(5498, 'name5498', 5508.111, 549800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5498]'); insert into test_proxima_be_restart_with_full_stage values(5499, 'name5499', 5509.111, 549900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5499]'); insert into test_proxima_be_restart_with_full_stage values(5500, 'name5500', 5510.111, 550000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5500]'); insert into test_proxima_be_restart_with_full_stage values(5501, 'name5501', 5511.111, 550100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5501]'); insert into test_proxima_be_restart_with_full_stage values(5502, 'name5502', 5512.111, 550200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5502]'); insert into test_proxima_be_restart_with_full_stage values(5503, 'name5503', 5513.111, 550300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5503]'); insert into test_proxima_be_restart_with_full_stage values(5504, 'name5504', 5514.111, 550400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5504]'); insert into test_proxima_be_restart_with_full_stage values(5505, 'name5505', 5515.111, 550500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5505]'); insert into test_proxima_be_restart_with_full_stage values(5506, 'name5506', 5516.111, 550600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5506]'); insert into test_proxima_be_restart_with_full_stage values(5507, 'name5507', 5517.111, 550700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5507]'); insert into test_proxima_be_restart_with_full_stage values(5508, 'name5508', 5518.111, 550800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5508]'); insert into test_proxima_be_restart_with_full_stage values(5509, 'name5509', 5519.111, 550900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5509]'); insert into test_proxima_be_restart_with_full_stage values(5510, 'name5510', 5520.111, 551000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5510]'); insert into test_proxima_be_restart_with_full_stage values(5511, 'name5511', 5521.111, 551100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5511]'); insert into test_proxima_be_restart_with_full_stage values(5512, 'name5512', 5522.111, 551200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5512]'); insert into test_proxima_be_restart_with_full_stage values(5513, 'name5513', 5523.111, 551300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5513]'); insert into test_proxima_be_restart_with_full_stage values(5514, 'name5514', 5524.111, 551400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5514]'); insert into test_proxima_be_restart_with_full_stage values(5515, 'name5515', 5525.111, 551500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5515]'); insert into test_proxima_be_restart_with_full_stage values(5516, 'name5516', 5526.111, 551600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5516]'); insert into test_proxima_be_restart_with_full_stage values(5517, 'name5517', 5527.111, 551700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5517]'); insert into test_proxima_be_restart_with_full_stage values(5518, 'name5518', 5528.111, 551800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5518]'); insert into test_proxima_be_restart_with_full_stage values(5519, 'name5519', 5529.111, 551900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5519]'); insert into test_proxima_be_restart_with_full_stage values(5520, 'name5520', 5530.111, 552000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5520]'); insert into test_proxima_be_restart_with_full_stage values(5521, 'name5521', 5531.111, 552100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5521]'); insert into test_proxima_be_restart_with_full_stage values(5522, 'name5522', 5532.111, 552200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5522]'); insert into test_proxima_be_restart_with_full_stage values(5523, 'name5523', 5533.111, 552300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5523]'); insert into test_proxima_be_restart_with_full_stage values(5524, 'name5524', 5534.111, 552400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5524]'); insert into test_proxima_be_restart_with_full_stage values(5525, 'name5525', 5535.111, 552500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5525]'); insert into test_proxima_be_restart_with_full_stage values(5526, 'name5526', 5536.111, 552600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5526]'); insert into test_proxima_be_restart_with_full_stage values(5527, 'name5527', 5537.111, 552700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5527]'); insert into test_proxima_be_restart_with_full_stage values(5528, 'name5528', 5538.111, 552800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5528]'); insert into test_proxima_be_restart_with_full_stage values(5529, 'name5529', 5539.111, 552900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5529]'); insert into test_proxima_be_restart_with_full_stage values(5530, 'name5530', 5540.111, 553000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5530]'); insert into test_proxima_be_restart_with_full_stage values(5531, 'name5531', 5541.111, 553100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5531]'); insert into test_proxima_be_restart_with_full_stage values(5532, 'name5532', 5542.111, 553200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5532]'); insert into test_proxima_be_restart_with_full_stage values(5533, 'name5533', 5543.111, 553300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5533]'); insert into test_proxima_be_restart_with_full_stage values(5534, 'name5534', 5544.111, 553400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5534]'); insert into test_proxima_be_restart_with_full_stage values(5535, 'name5535', 5545.111, 553500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5535]'); insert into test_proxima_be_restart_with_full_stage values(5536, 'name5536', 5546.111, 553600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5536]'); insert into test_proxima_be_restart_with_full_stage values(5537, 'name5537', 5547.111, 553700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5537]'); insert into test_proxima_be_restart_with_full_stage values(5538, 'name5538', 5548.111, 553800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5538]'); insert into test_proxima_be_restart_with_full_stage values(5539, 'name5539', 5549.111, 553900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5539]'); insert into test_proxima_be_restart_with_full_stage values(5540, 'name5540', 5550.111, 554000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5540]'); insert into test_proxima_be_restart_with_full_stage values(5541, 'name5541', 5551.111, 554100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5541]'); insert into test_proxima_be_restart_with_full_stage values(5542, 'name5542', 5552.111, 554200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5542]'); insert into test_proxima_be_restart_with_full_stage values(5543, 'name5543', 5553.111, 554300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5543]'); insert into test_proxima_be_restart_with_full_stage values(5544, 'name5544', 5554.111, 554400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5544]'); insert into test_proxima_be_restart_with_full_stage values(5545, 'name5545', 5555.111, 554500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5545]'); insert into test_proxima_be_restart_with_full_stage values(5546, 'name5546', 5556.111, 554600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5546]'); insert into test_proxima_be_restart_with_full_stage values(5547, 'name5547', 5557.111, 554700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5547]'); insert into test_proxima_be_restart_with_full_stage values(5548, 'name5548', 5558.111, 554800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5548]'); insert into test_proxima_be_restart_with_full_stage values(5549, 'name5549', 5559.111, 554900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5549]'); insert into test_proxima_be_restart_with_full_stage values(5550, 'name5550', 5560.111, 555000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5550]'); insert into test_proxima_be_restart_with_full_stage values(5551, 'name5551', 5561.111, 555100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5551]'); insert into test_proxima_be_restart_with_full_stage values(5552, 'name5552', 5562.111, 555200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5552]'); insert into test_proxima_be_restart_with_full_stage values(5553, 'name5553', 5563.111, 555300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5553]'); insert into test_proxima_be_restart_with_full_stage values(5554, 'name5554', 5564.111, 555400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5554]'); insert into test_proxima_be_restart_with_full_stage values(5555, 'name5555', 5565.111, 555500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5555]'); insert into test_proxima_be_restart_with_full_stage values(5556, 'name5556', 5566.111, 555600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5556]'); insert into test_proxima_be_restart_with_full_stage values(5557, 'name5557', 5567.111, 555700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5557]'); insert into test_proxima_be_restart_with_full_stage values(5558, 'name5558', 5568.111, 555800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5558]'); insert into test_proxima_be_restart_with_full_stage values(5559, 'name5559', 5569.111, 555900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5559]'); insert into test_proxima_be_restart_with_full_stage values(5560, 'name5560', 5570.111, 556000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5560]'); insert into test_proxima_be_restart_with_full_stage values(5561, 'name5561', 5571.111, 556100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5561]'); insert into test_proxima_be_restart_with_full_stage values(5562, 'name5562', 5572.111, 556200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5562]'); insert into test_proxima_be_restart_with_full_stage values(5563, 'name5563', 5573.111, 556300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5563]'); insert into test_proxima_be_restart_with_full_stage values(5564, 'name5564', 5574.111, 556400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5564]'); insert into test_proxima_be_restart_with_full_stage values(5565, 'name5565', 5575.111, 556500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5565]'); insert into test_proxima_be_restart_with_full_stage values(5566, 'name5566', 5576.111, 556600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5566]'); insert into test_proxima_be_restart_with_full_stage values(5567, 'name5567', 5577.111, 556700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5567]'); insert into test_proxima_be_restart_with_full_stage values(5568, 'name5568', 5578.111, 556800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5568]'); insert into test_proxima_be_restart_with_full_stage values(5569, 'name5569', 5579.111, 556900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5569]'); insert into test_proxima_be_restart_with_full_stage values(5570, 'name5570', 5580.111, 557000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5570]'); insert into test_proxima_be_restart_with_full_stage values(5571, 'name5571', 5581.111, 557100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5571]'); insert into test_proxima_be_restart_with_full_stage values(5572, 'name5572', 5582.111, 557200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5572]'); insert into test_proxima_be_restart_with_full_stage values(5573, 'name5573', 5583.111, 557300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5573]'); insert into test_proxima_be_restart_with_full_stage values(5574, 'name5574', 5584.111, 557400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5574]'); insert into test_proxima_be_restart_with_full_stage values(5575, 'name5575', 5585.111, 557500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5575]'); insert into test_proxima_be_restart_with_full_stage values(5576, 'name5576', 5586.111, 557600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5576]'); insert into test_proxima_be_restart_with_full_stage values(5577, 'name5577', 5587.111, 557700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5577]'); insert into test_proxima_be_restart_with_full_stage values(5578, 'name5578', 5588.111, 557800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5578]'); insert into test_proxima_be_restart_with_full_stage values(5579, 'name5579', 5589.111, 557900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5579]'); insert into test_proxima_be_restart_with_full_stage values(5580, 'name5580', 5590.111, 558000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5580]'); insert into test_proxima_be_restart_with_full_stage values(5581, 'name5581', 5591.111, 558100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5581]'); insert into test_proxima_be_restart_with_full_stage values(5582, 'name5582', 5592.111, 558200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5582]'); insert into test_proxima_be_restart_with_full_stage values(5583, 'name5583', 5593.111, 558300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5583]'); insert into test_proxima_be_restart_with_full_stage values(5584, 'name5584', 5594.111, 558400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5584]'); insert into test_proxima_be_restart_with_full_stage values(5585, 'name5585', 5595.111, 558500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5585]'); insert into test_proxima_be_restart_with_full_stage values(5586, 'name5586', 5596.111, 558600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5586]'); insert into test_proxima_be_restart_with_full_stage values(5587, 'name5587', 5597.111, 558700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5587]'); insert into test_proxima_be_restart_with_full_stage values(5588, 'name5588', 5598.111, 558800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5588]'); insert into test_proxima_be_restart_with_full_stage values(5589, 'name5589', 5599.111, 558900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5589]'); insert into test_proxima_be_restart_with_full_stage values(5590, 'name5590', 5600.111, 559000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5590]'); insert into test_proxima_be_restart_with_full_stage values(5591, 'name5591', 5601.111, 559100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5591]'); insert into test_proxima_be_restart_with_full_stage values(5592, 'name5592', 5602.111, 559200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5592]'); insert into test_proxima_be_restart_with_full_stage values(5593, 'name5593', 5603.111, 559300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5593]'); insert into test_proxima_be_restart_with_full_stage values(5594, 'name5594', 5604.111, 559400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5594]'); insert into test_proxima_be_restart_with_full_stage values(5595, 'name5595', 5605.111, 559500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5595]'); insert into test_proxima_be_restart_with_full_stage values(5596, 'name5596', 5606.111, 559600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5596]'); insert into test_proxima_be_restart_with_full_stage values(5597, 'name5597', 5607.111, 559700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5597]'); insert into test_proxima_be_restart_with_full_stage values(5598, 'name5598', 5608.111, 559800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5598]'); insert into test_proxima_be_restart_with_full_stage values(5599, 'name5599', 5609.111, 559900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5599]'); insert into test_proxima_be_restart_with_full_stage values(5600, 'name5600', 5610.111, 560000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5600]'); insert into test_proxima_be_restart_with_full_stage values(5601, 'name5601', 5611.111, 560100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5601]'); insert into test_proxima_be_restart_with_full_stage values(5602, 'name5602', 5612.111, 560200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5602]'); insert into test_proxima_be_restart_with_full_stage values(5603, 'name5603', 5613.111, 560300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5603]'); insert into test_proxima_be_restart_with_full_stage values(5604, 'name5604', 5614.111, 560400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5604]'); insert into test_proxima_be_restart_with_full_stage values(5605, 'name5605', 5615.111, 560500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5605]'); insert into test_proxima_be_restart_with_full_stage values(5606, 'name5606', 5616.111, 560600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5606]'); insert into test_proxima_be_restart_with_full_stage values(5607, 'name5607', 5617.111, 560700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5607]'); insert into test_proxima_be_restart_with_full_stage values(5608, 'name5608', 5618.111, 560800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5608]'); insert into test_proxima_be_restart_with_full_stage values(5609, 'name5609', 5619.111, 560900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5609]'); insert into test_proxima_be_restart_with_full_stage values(5610, 'name5610', 5620.111, 561000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5610]'); insert into test_proxima_be_restart_with_full_stage values(5611, 'name5611', 5621.111, 561100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5611]'); insert into test_proxima_be_restart_with_full_stage values(5612, 'name5612', 5622.111, 561200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5612]'); insert into test_proxima_be_restart_with_full_stage values(5613, 'name5613', 5623.111, 561300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5613]'); insert into test_proxima_be_restart_with_full_stage values(5614, 'name5614', 5624.111, 561400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5614]'); insert into test_proxima_be_restart_with_full_stage values(5615, 'name5615', 5625.111, 561500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5615]'); insert into test_proxima_be_restart_with_full_stage values(5616, 'name5616', 5626.111, 561600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5616]'); insert into test_proxima_be_restart_with_full_stage values(5617, 'name5617', 5627.111, 561700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5617]'); insert into test_proxima_be_restart_with_full_stage values(5618, 'name5618', 5628.111, 561800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5618]'); insert into test_proxima_be_restart_with_full_stage values(5619, 'name5619', 5629.111, 561900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5619]'); insert into test_proxima_be_restart_with_full_stage values(5620, 'name5620', 5630.111, 562000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5620]'); insert into test_proxima_be_restart_with_full_stage values(5621, 'name5621', 5631.111, 562100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5621]'); insert into test_proxima_be_restart_with_full_stage values(5622, 'name5622', 5632.111, 562200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5622]'); insert into test_proxima_be_restart_with_full_stage values(5623, 'name5623', 5633.111, 562300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5623]'); insert into test_proxima_be_restart_with_full_stage values(5624, 'name5624', 5634.111, 562400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5624]'); insert into test_proxima_be_restart_with_full_stage values(5625, 'name5625', 5635.111, 562500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5625]'); insert into test_proxima_be_restart_with_full_stage values(5626, 'name5626', 5636.111, 562600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5626]'); insert into test_proxima_be_restart_with_full_stage values(5627, 'name5627', 5637.111, 562700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5627]'); insert into test_proxima_be_restart_with_full_stage values(5628, 'name5628', 5638.111, 562800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5628]'); insert into test_proxima_be_restart_with_full_stage values(5629, 'name5629', 5639.111, 562900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5629]'); insert into test_proxima_be_restart_with_full_stage values(5630, 'name5630', 5640.111, 563000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5630]'); insert into test_proxima_be_restart_with_full_stage values(5631, 'name5631', 5641.111, 563100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5631]'); insert into test_proxima_be_restart_with_full_stage values(5632, 'name5632', 5642.111, 563200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5632]'); insert into test_proxima_be_restart_with_full_stage values(5633, 'name5633', 5643.111, 563300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5633]'); insert into test_proxima_be_restart_with_full_stage values(5634, 'name5634', 5644.111, 563400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5634]'); insert into test_proxima_be_restart_with_full_stage values(5635, 'name5635', 5645.111, 563500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5635]'); insert into test_proxima_be_restart_with_full_stage values(5636, 'name5636', 5646.111, 563600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5636]'); insert into test_proxima_be_restart_with_full_stage values(5637, 'name5637', 5647.111, 563700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5637]'); insert into test_proxima_be_restart_with_full_stage values(5638, 'name5638', 5648.111, 563800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5638]'); insert into test_proxima_be_restart_with_full_stage values(5639, 'name5639', 5649.111, 563900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5639]'); insert into test_proxima_be_restart_with_full_stage values(5640, 'name5640', 5650.111, 564000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5640]'); insert into test_proxima_be_restart_with_full_stage values(5641, 'name5641', 5651.111, 564100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5641]'); insert into test_proxima_be_restart_with_full_stage values(5642, 'name5642', 5652.111, 564200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5642]'); insert into test_proxima_be_restart_with_full_stage values(5643, 'name5643', 5653.111, 564300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5643]'); insert into test_proxima_be_restart_with_full_stage values(5644, 'name5644', 5654.111, 564400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5644]'); insert into test_proxima_be_restart_with_full_stage values(5645, 'name5645', 5655.111, 564500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5645]'); insert into test_proxima_be_restart_with_full_stage values(5646, 'name5646', 5656.111, 564600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5646]'); insert into test_proxima_be_restart_with_full_stage values(5647, 'name5647', 5657.111, 564700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5647]'); insert into test_proxima_be_restart_with_full_stage values(5648, 'name5648', 5658.111, 564800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5648]'); insert into test_proxima_be_restart_with_full_stage values(5649, 'name5649', 5659.111, 564900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5649]'); insert into test_proxima_be_restart_with_full_stage values(5650, 'name5650', 5660.111, 565000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5650]'); insert into test_proxima_be_restart_with_full_stage values(5651, 'name5651', 5661.111, 565100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5651]'); insert into test_proxima_be_restart_with_full_stage values(5652, 'name5652', 5662.111, 565200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5652]'); insert into test_proxima_be_restart_with_full_stage values(5653, 'name5653', 5663.111, 565300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5653]'); insert into test_proxima_be_restart_with_full_stage values(5654, 'name5654', 5664.111, 565400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5654]'); insert into test_proxima_be_restart_with_full_stage values(5655, 'name5655', 5665.111, 565500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5655]'); insert into test_proxima_be_restart_with_full_stage values(5656, 'name5656', 5666.111, 565600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5656]'); insert into test_proxima_be_restart_with_full_stage values(5657, 'name5657', 5667.111, 565700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5657]'); insert into test_proxima_be_restart_with_full_stage values(5658, 'name5658', 5668.111, 565800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5658]'); insert into test_proxima_be_restart_with_full_stage values(5659, 'name5659', 5669.111, 565900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5659]'); insert into test_proxima_be_restart_with_full_stage values(5660, 'name5660', 5670.111, 566000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5660]'); insert into test_proxima_be_restart_with_full_stage values(5661, 'name5661', 5671.111, 566100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5661]'); insert into test_proxima_be_restart_with_full_stage values(5662, 'name5662', 5672.111, 566200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5662]'); insert into test_proxima_be_restart_with_full_stage values(5663, 'name5663', 5673.111, 566300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5663]'); insert into test_proxima_be_restart_with_full_stage values(5664, 'name5664', 5674.111, 566400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5664]'); insert into test_proxima_be_restart_with_full_stage values(5665, 'name5665', 5675.111, 566500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5665]'); insert into test_proxima_be_restart_with_full_stage values(5666, 'name5666', 5676.111, 566600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5666]'); insert into test_proxima_be_restart_with_full_stage values(5667, 'name5667', 5677.111, 566700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5667]'); insert into test_proxima_be_restart_with_full_stage values(5668, 'name5668', 5678.111, 566800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5668]'); insert into test_proxima_be_restart_with_full_stage values(5669, 'name5669', 5679.111, 566900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5669]'); insert into test_proxima_be_restart_with_full_stage values(5670, 'name5670', 5680.111, 567000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5670]'); insert into test_proxima_be_restart_with_full_stage values(5671, 'name5671', 5681.111, 567100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5671]'); insert into test_proxima_be_restart_with_full_stage values(5672, 'name5672', 5682.111, 567200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5672]'); insert into test_proxima_be_restart_with_full_stage values(5673, 'name5673', 5683.111, 567300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5673]'); insert into test_proxima_be_restart_with_full_stage values(5674, 'name5674', 5684.111, 567400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5674]'); insert into test_proxima_be_restart_with_full_stage values(5675, 'name5675', 5685.111, 567500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5675]'); insert into test_proxima_be_restart_with_full_stage values(5676, 'name5676', 5686.111, 567600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5676]'); insert into test_proxima_be_restart_with_full_stage values(5677, 'name5677', 5687.111, 567700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5677]'); insert into test_proxima_be_restart_with_full_stage values(5678, 'name5678', 5688.111, 567800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5678]'); insert into test_proxima_be_restart_with_full_stage values(5679, 'name5679', 5689.111, 567900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5679]'); insert into test_proxima_be_restart_with_full_stage values(5680, 'name5680', 5690.111, 568000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5680]'); insert into test_proxima_be_restart_with_full_stage values(5681, 'name5681', 5691.111, 568100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5681]'); insert into test_proxima_be_restart_with_full_stage values(5682, 'name5682', 5692.111, 568200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5682]'); insert into test_proxima_be_restart_with_full_stage values(5683, 'name5683', 5693.111, 568300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5683]'); insert into test_proxima_be_restart_with_full_stage values(5684, 'name5684', 5694.111, 568400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5684]'); insert into test_proxima_be_restart_with_full_stage values(5685, 'name5685', 5695.111, 568500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5685]'); insert into test_proxima_be_restart_with_full_stage values(5686, 'name5686', 5696.111, 568600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5686]'); insert into test_proxima_be_restart_with_full_stage values(5687, 'name5687', 5697.111, 568700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5687]'); insert into test_proxima_be_restart_with_full_stage values(5688, 'name5688', 5698.111, 568800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5688]'); insert into test_proxima_be_restart_with_full_stage values(5689, 'name5689', 5699.111, 568900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5689]'); insert into test_proxima_be_restart_with_full_stage values(5690, 'name5690', 5700.111, 569000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5690]'); insert into test_proxima_be_restart_with_full_stage values(5691, 'name5691', 5701.111, 569100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5691]'); insert into test_proxima_be_restart_with_full_stage values(5692, 'name5692', 5702.111, 569200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5692]'); insert into test_proxima_be_restart_with_full_stage values(5693, 'name5693', 5703.111, 569300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5693]'); insert into test_proxima_be_restart_with_full_stage values(5694, 'name5694', 5704.111, 569400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5694]'); insert into test_proxima_be_restart_with_full_stage values(5695, 'name5695', 5705.111, 569500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5695]'); insert into test_proxima_be_restart_with_full_stage values(5696, 'name5696', 5706.111, 569600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5696]'); insert into test_proxima_be_restart_with_full_stage values(5697, 'name5697', 5707.111, 569700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5697]'); insert into test_proxima_be_restart_with_full_stage values(5698, 'name5698', 5708.111, 569800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5698]'); insert into test_proxima_be_restart_with_full_stage values(5699, 'name5699', 5709.111, 569900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5699]'); insert into test_proxima_be_restart_with_full_stage values(5700, 'name5700', 5710.111, 570000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5700]'); insert into test_proxima_be_restart_with_full_stage values(5701, 'name5701', 5711.111, 570100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5701]'); insert into test_proxima_be_restart_with_full_stage values(5702, 'name5702', 5712.111, 570200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5702]'); insert into test_proxima_be_restart_with_full_stage values(5703, 'name5703', 5713.111, 570300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5703]'); insert into test_proxima_be_restart_with_full_stage values(5704, 'name5704', 5714.111, 570400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5704]'); insert into test_proxima_be_restart_with_full_stage values(5705, 'name5705', 5715.111, 570500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5705]'); insert into test_proxima_be_restart_with_full_stage values(5706, 'name5706', 5716.111, 570600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5706]'); insert into test_proxima_be_restart_with_full_stage values(5707, 'name5707', 5717.111, 570700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5707]'); insert into test_proxima_be_restart_with_full_stage values(5708, 'name5708', 5718.111, 570800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5708]'); insert into test_proxima_be_restart_with_full_stage values(5709, 'name5709', 5719.111, 570900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5709]'); insert into test_proxima_be_restart_with_full_stage values(5710, 'name5710', 5720.111, 571000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5710]'); insert into test_proxima_be_restart_with_full_stage values(5711, 'name5711', 5721.111, 571100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5711]'); insert into test_proxima_be_restart_with_full_stage values(5712, 'name5712', 5722.111, 571200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5712]'); insert into test_proxima_be_restart_with_full_stage values(5713, 'name5713', 5723.111, 571300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5713]'); insert into test_proxima_be_restart_with_full_stage values(5714, 'name5714', 5724.111, 571400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5714]'); insert into test_proxima_be_restart_with_full_stage values(5715, 'name5715', 5725.111, 571500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5715]'); insert into test_proxima_be_restart_with_full_stage values(5716, 'name5716', 5726.111, 571600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5716]'); insert into test_proxima_be_restart_with_full_stage values(5717, 'name5717', 5727.111, 571700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5717]'); insert into test_proxima_be_restart_with_full_stage values(5718, 'name5718', 5728.111, 571800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5718]'); insert into test_proxima_be_restart_with_full_stage values(5719, 'name5719', 5729.111, 571900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5719]'); insert into test_proxima_be_restart_with_full_stage values(5720, 'name5720', 5730.111, 572000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5720]'); insert into test_proxima_be_restart_with_full_stage values(5721, 'name5721', 5731.111, 572100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5721]'); insert into test_proxima_be_restart_with_full_stage values(5722, 'name5722', 5732.111, 572200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5722]'); insert into test_proxima_be_restart_with_full_stage values(5723, 'name5723', 5733.111, 572300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5723]'); insert into test_proxima_be_restart_with_full_stage values(5724, 'name5724', 5734.111, 572400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5724]'); insert into test_proxima_be_restart_with_full_stage values(5725, 'name5725', 5735.111, 572500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5725]'); insert into test_proxima_be_restart_with_full_stage values(5726, 'name5726', 5736.111, 572600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5726]'); insert into test_proxima_be_restart_with_full_stage values(5727, 'name5727', 5737.111, 572700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5727]'); insert into test_proxima_be_restart_with_full_stage values(5728, 'name5728', 5738.111, 572800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5728]'); insert into test_proxima_be_restart_with_full_stage values(5729, 'name5729', 5739.111, 572900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5729]'); insert into test_proxima_be_restart_with_full_stage values(5730, 'name5730', 5740.111, 573000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5730]'); insert into test_proxima_be_restart_with_full_stage values(5731, 'name5731', 5741.111, 573100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5731]'); insert into test_proxima_be_restart_with_full_stage values(5732, 'name5732', 5742.111, 573200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5732]'); insert into test_proxima_be_restart_with_full_stage values(5733, 'name5733', 5743.111, 573300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5733]'); insert into test_proxima_be_restart_with_full_stage values(5734, 'name5734', 5744.111, 573400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5734]'); insert into test_proxima_be_restart_with_full_stage values(5735, 'name5735', 5745.111, 573500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5735]'); insert into test_proxima_be_restart_with_full_stage values(5736, 'name5736', 5746.111, 573600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5736]'); insert into test_proxima_be_restart_with_full_stage values(5737, 'name5737', 5747.111, 573700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5737]'); insert into test_proxima_be_restart_with_full_stage values(5738, 'name5738', 5748.111, 573800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5738]'); insert into test_proxima_be_restart_with_full_stage values(5739, 'name5739', 5749.111, 573900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5739]'); insert into test_proxima_be_restart_with_full_stage values(5740, 'name5740', 5750.111, 574000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5740]'); insert into test_proxima_be_restart_with_full_stage values(5741, 'name5741', 5751.111, 574100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5741]'); insert into test_proxima_be_restart_with_full_stage values(5742, 'name5742', 5752.111, 574200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5742]'); insert into test_proxima_be_restart_with_full_stage values(5743, 'name5743', 5753.111, 574300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5743]'); insert into test_proxima_be_restart_with_full_stage values(5744, 'name5744', 5754.111, 574400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5744]'); insert into test_proxima_be_restart_with_full_stage values(5745, 'name5745', 5755.111, 574500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5745]'); insert into test_proxima_be_restart_with_full_stage values(5746, 'name5746', 5756.111, 574600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5746]'); insert into test_proxima_be_restart_with_full_stage values(5747, 'name5747', 5757.111, 574700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5747]'); insert into test_proxima_be_restart_with_full_stage values(5748, 'name5748', 5758.111, 574800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5748]'); insert into test_proxima_be_restart_with_full_stage values(5749, 'name5749', 5759.111, 574900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5749]'); insert into test_proxima_be_restart_with_full_stage values(5750, 'name5750', 5760.111, 575000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5750]'); insert into test_proxima_be_restart_with_full_stage values(5751, 'name5751', 5761.111, 575100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5751]'); insert into test_proxima_be_restart_with_full_stage values(5752, 'name5752', 5762.111, 575200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5752]'); insert into test_proxima_be_restart_with_full_stage values(5753, 'name5753', 5763.111, 575300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5753]'); insert into test_proxima_be_restart_with_full_stage values(5754, 'name5754', 5764.111, 575400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5754]'); insert into test_proxima_be_restart_with_full_stage values(5755, 'name5755', 5765.111, 575500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5755]'); insert into test_proxima_be_restart_with_full_stage values(5756, 'name5756', 5766.111, 575600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5756]'); insert into test_proxima_be_restart_with_full_stage values(5757, 'name5757', 5767.111, 575700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5757]'); insert into test_proxima_be_restart_with_full_stage values(5758, 'name5758', 5768.111, 575800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5758]'); insert into test_proxima_be_restart_with_full_stage values(5759, 'name5759', 5769.111, 575900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5759]'); insert into test_proxima_be_restart_with_full_stage values(5760, 'name5760', 5770.111, 576000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5760]'); insert into test_proxima_be_restart_with_full_stage values(5761, 'name5761', 5771.111, 576100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5761]'); insert into test_proxima_be_restart_with_full_stage values(5762, 'name5762', 5772.111, 576200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5762]'); insert into test_proxima_be_restart_with_full_stage values(5763, 'name5763', 5773.111, 576300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5763]'); insert into test_proxima_be_restart_with_full_stage values(5764, 'name5764', 5774.111, 576400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5764]'); insert into test_proxima_be_restart_with_full_stage values(5765, 'name5765', 5775.111, 576500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5765]'); insert into test_proxima_be_restart_with_full_stage values(5766, 'name5766', 5776.111, 576600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5766]'); insert into test_proxima_be_restart_with_full_stage values(5767, 'name5767', 5777.111, 576700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5767]'); insert into test_proxima_be_restart_with_full_stage values(5768, 'name5768', 5778.111, 576800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5768]'); insert into test_proxima_be_restart_with_full_stage values(5769, 'name5769', 5779.111, 576900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5769]'); insert into test_proxima_be_restart_with_full_stage values(5770, 'name5770', 5780.111, 577000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5770]'); insert into test_proxima_be_restart_with_full_stage values(5771, 'name5771', 5781.111, 577100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5771]'); insert into test_proxima_be_restart_with_full_stage values(5772, 'name5772', 5782.111, 577200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5772]'); insert into test_proxima_be_restart_with_full_stage values(5773, 'name5773', 5783.111, 577300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5773]'); insert into test_proxima_be_restart_with_full_stage values(5774, 'name5774', 5784.111, 577400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5774]'); insert into test_proxima_be_restart_with_full_stage values(5775, 'name5775', 5785.111, 577500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5775]'); insert into test_proxima_be_restart_with_full_stage values(5776, 'name5776', 5786.111, 577600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5776]'); insert into test_proxima_be_restart_with_full_stage values(5777, 'name5777', 5787.111, 577700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5777]'); insert into test_proxima_be_restart_with_full_stage values(5778, 'name5778', 5788.111, 577800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5778]'); insert into test_proxima_be_restart_with_full_stage values(5779, 'name5779', 5789.111, 577900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5779]'); insert into test_proxima_be_restart_with_full_stage values(5780, 'name5780', 5790.111, 578000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5780]'); insert into test_proxima_be_restart_with_full_stage values(5781, 'name5781', 5791.111, 578100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5781]'); insert into test_proxima_be_restart_with_full_stage values(5782, 'name5782', 5792.111, 578200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5782]'); insert into test_proxima_be_restart_with_full_stage values(5783, 'name5783', 5793.111, 578300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5783]'); insert into test_proxima_be_restart_with_full_stage values(5784, 'name5784', 5794.111, 578400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5784]'); insert into test_proxima_be_restart_with_full_stage values(5785, 'name5785', 5795.111, 578500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5785]'); insert into test_proxima_be_restart_with_full_stage values(5786, 'name5786', 5796.111, 578600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5786]'); insert into test_proxima_be_restart_with_full_stage values(5787, 'name5787', 5797.111, 578700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5787]'); insert into test_proxima_be_restart_with_full_stage values(5788, 'name5788', 5798.111, 578800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5788]'); insert into test_proxima_be_restart_with_full_stage values(5789, 'name5789', 5799.111, 578900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5789]'); insert into test_proxima_be_restart_with_full_stage values(5790, 'name5790', 5800.111, 579000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5790]'); insert into test_proxima_be_restart_with_full_stage values(5791, 'name5791', 5801.111, 579100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5791]'); insert into test_proxima_be_restart_with_full_stage values(5792, 'name5792', 5802.111, 579200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5792]'); insert into test_proxima_be_restart_with_full_stage values(5793, 'name5793', 5803.111, 579300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5793]'); insert into test_proxima_be_restart_with_full_stage values(5794, 'name5794', 5804.111, 579400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5794]'); insert into test_proxima_be_restart_with_full_stage values(5795, 'name5795', 5805.111, 579500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5795]'); insert into test_proxima_be_restart_with_full_stage values(5796, 'name5796', 5806.111, 579600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5796]'); insert into test_proxima_be_restart_with_full_stage values(5797, 'name5797', 5807.111, 579700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5797]'); insert into test_proxima_be_restart_with_full_stage values(5798, 'name5798', 5808.111, 579800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5798]'); insert into test_proxima_be_restart_with_full_stage values(5799, 'name5799', 5809.111, 579900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5799]'); insert into test_proxima_be_restart_with_full_stage values(5800, 'name5800', 5810.111, 580000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5800]'); insert into test_proxima_be_restart_with_full_stage values(5801, 'name5801', 5811.111, 580100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5801]'); insert into test_proxima_be_restart_with_full_stage values(5802, 'name5802', 5812.111, 580200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5802]'); insert into test_proxima_be_restart_with_full_stage values(5803, 'name5803', 5813.111, 580300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5803]'); insert into test_proxima_be_restart_with_full_stage values(5804, 'name5804', 5814.111, 580400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5804]'); insert into test_proxima_be_restart_with_full_stage values(5805, 'name5805', 5815.111, 580500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5805]'); insert into test_proxima_be_restart_with_full_stage values(5806, 'name5806', 5816.111, 580600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5806]'); insert into test_proxima_be_restart_with_full_stage values(5807, 'name5807', 5817.111, 580700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5807]'); insert into test_proxima_be_restart_with_full_stage values(5808, 'name5808', 5818.111, 580800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5808]'); insert into test_proxima_be_restart_with_full_stage values(5809, 'name5809', 5819.111, 580900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5809]'); insert into test_proxima_be_restart_with_full_stage values(5810, 'name5810', 5820.111, 581000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5810]'); insert into test_proxima_be_restart_with_full_stage values(5811, 'name5811', 5821.111, 581100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5811]'); insert into test_proxima_be_restart_with_full_stage values(5812, 'name5812', 5822.111, 581200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5812]'); insert into test_proxima_be_restart_with_full_stage values(5813, 'name5813', 5823.111, 581300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5813]'); insert into test_proxima_be_restart_with_full_stage values(5814, 'name5814', 5824.111, 581400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5814]'); insert into test_proxima_be_restart_with_full_stage values(5815, 'name5815', 5825.111, 581500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5815]'); insert into test_proxima_be_restart_with_full_stage values(5816, 'name5816', 5826.111, 581600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5816]'); insert into test_proxima_be_restart_with_full_stage values(5817, 'name5817', 5827.111, 581700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5817]'); insert into test_proxima_be_restart_with_full_stage values(5818, 'name5818', 5828.111, 581800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5818]'); insert into test_proxima_be_restart_with_full_stage values(5819, 'name5819', 5829.111, 581900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5819]'); insert into test_proxima_be_restart_with_full_stage values(5820, 'name5820', 5830.111, 582000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5820]'); insert into test_proxima_be_restart_with_full_stage values(5821, 'name5821', 5831.111, 582100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5821]'); insert into test_proxima_be_restart_with_full_stage values(5822, 'name5822', 5832.111, 582200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5822]'); insert into test_proxima_be_restart_with_full_stage values(5823, 'name5823', 5833.111, 582300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5823]'); insert into test_proxima_be_restart_with_full_stage values(5824, 'name5824', 5834.111, 582400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5824]'); insert into test_proxima_be_restart_with_full_stage values(5825, 'name5825', 5835.111, 582500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5825]'); insert into test_proxima_be_restart_with_full_stage values(5826, 'name5826', 5836.111, 582600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5826]'); insert into test_proxima_be_restart_with_full_stage values(5827, 'name5827', 5837.111, 582700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5827]'); insert into test_proxima_be_restart_with_full_stage values(5828, 'name5828', 5838.111, 582800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5828]'); insert into test_proxima_be_restart_with_full_stage values(5829, 'name5829', 5839.111, 582900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5829]'); insert into test_proxima_be_restart_with_full_stage values(5830, 'name5830', 5840.111, 583000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5830]'); insert into test_proxima_be_restart_with_full_stage values(5831, 'name5831', 5841.111, 583100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5831]'); insert into test_proxima_be_restart_with_full_stage values(5832, 'name5832', 5842.111, 583200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5832]'); insert into test_proxima_be_restart_with_full_stage values(5833, 'name5833', 5843.111, 583300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5833]'); insert into test_proxima_be_restart_with_full_stage values(5834, 'name5834', 5844.111, 583400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5834]'); insert into test_proxima_be_restart_with_full_stage values(5835, 'name5835', 5845.111, 583500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5835]'); insert into test_proxima_be_restart_with_full_stage values(5836, 'name5836', 5846.111, 583600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5836]'); insert into test_proxima_be_restart_with_full_stage values(5837, 'name5837', 5847.111, 583700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5837]'); insert into test_proxima_be_restart_with_full_stage values(5838, 'name5838', 5848.111, 583800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5838]'); insert into test_proxima_be_restart_with_full_stage values(5839, 'name5839', 5849.111, 583900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5839]'); insert into test_proxima_be_restart_with_full_stage values(5840, 'name5840', 5850.111, 584000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5840]'); insert into test_proxima_be_restart_with_full_stage values(5841, 'name5841', 5851.111, 584100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5841]'); insert into test_proxima_be_restart_with_full_stage values(5842, 'name5842', 5852.111, 584200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5842]'); insert into test_proxima_be_restart_with_full_stage values(5843, 'name5843', 5853.111, 584300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5843]'); insert into test_proxima_be_restart_with_full_stage values(5844, 'name5844', 5854.111, 584400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5844]'); insert into test_proxima_be_restart_with_full_stage values(5845, 'name5845', 5855.111, 584500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5845]'); insert into test_proxima_be_restart_with_full_stage values(5846, 'name5846', 5856.111, 584600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5846]'); insert into test_proxima_be_restart_with_full_stage values(5847, 'name5847', 5857.111, 584700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5847]'); insert into test_proxima_be_restart_with_full_stage values(5848, 'name5848', 5858.111, 584800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5848]'); insert into test_proxima_be_restart_with_full_stage values(5849, 'name5849', 5859.111, 584900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5849]'); insert into test_proxima_be_restart_with_full_stage values(5850, 'name5850', 5860.111, 585000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5850]'); insert into test_proxima_be_restart_with_full_stage values(5851, 'name5851', 5861.111, 585100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5851]'); insert into test_proxima_be_restart_with_full_stage values(5852, 'name5852', 5862.111, 585200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5852]'); insert into test_proxima_be_restart_with_full_stage values(5853, 'name5853', 5863.111, 585300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5853]'); insert into test_proxima_be_restart_with_full_stage values(5854, 'name5854', 5864.111, 585400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5854]'); insert into test_proxima_be_restart_with_full_stage values(5855, 'name5855', 5865.111, 585500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5855]'); insert into test_proxima_be_restart_with_full_stage values(5856, 'name5856', 5866.111, 585600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5856]'); insert into test_proxima_be_restart_with_full_stage values(5857, 'name5857', 5867.111, 585700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5857]'); insert into test_proxima_be_restart_with_full_stage values(5858, 'name5858', 5868.111, 585800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5858]'); insert into test_proxima_be_restart_with_full_stage values(5859, 'name5859', 5869.111, 585900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5859]'); insert into test_proxima_be_restart_with_full_stage values(5860, 'name5860', 5870.111, 586000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5860]'); insert into test_proxima_be_restart_with_full_stage values(5861, 'name5861', 5871.111, 586100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5861]'); insert into test_proxima_be_restart_with_full_stage values(5862, 'name5862', 5872.111, 586200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5862]'); insert into test_proxima_be_restart_with_full_stage values(5863, 'name5863', 5873.111, 586300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5863]'); insert into test_proxima_be_restart_with_full_stage values(5864, 'name5864', 5874.111, 586400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5864]'); insert into test_proxima_be_restart_with_full_stage values(5865, 'name5865', 5875.111, 586500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5865]'); insert into test_proxima_be_restart_with_full_stage values(5866, 'name5866', 5876.111, 586600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5866]'); insert into test_proxima_be_restart_with_full_stage values(5867, 'name5867', 5877.111, 586700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5867]'); insert into test_proxima_be_restart_with_full_stage values(5868, 'name5868', 5878.111, 586800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5868]'); insert into test_proxima_be_restart_with_full_stage values(5869, 'name5869', 5879.111, 586900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5869]'); insert into test_proxima_be_restart_with_full_stage values(5870, 'name5870', 5880.111, 587000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5870]'); insert into test_proxima_be_restart_with_full_stage values(5871, 'name5871', 5881.111, 587100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5871]'); insert into test_proxima_be_restart_with_full_stage values(5872, 'name5872', 5882.111, 587200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5872]'); insert into test_proxima_be_restart_with_full_stage values(5873, 'name5873', 5883.111, 587300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5873]'); insert into test_proxima_be_restart_with_full_stage values(5874, 'name5874', 5884.111, 587400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5874]'); insert into test_proxima_be_restart_with_full_stage values(5875, 'name5875', 5885.111, 587500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5875]'); insert into test_proxima_be_restart_with_full_stage values(5876, 'name5876', 5886.111, 587600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5876]'); insert into test_proxima_be_restart_with_full_stage values(5877, 'name5877', 5887.111, 587700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5877]'); insert into test_proxima_be_restart_with_full_stage values(5878, 'name5878', 5888.111, 587800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5878]'); insert into test_proxima_be_restart_with_full_stage values(5879, 'name5879', 5889.111, 587900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5879]'); insert into test_proxima_be_restart_with_full_stage values(5880, 'name5880', 5890.111, 588000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5880]'); insert into test_proxima_be_restart_with_full_stage values(5881, 'name5881', 5891.111, 588100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5881]'); insert into test_proxima_be_restart_with_full_stage values(5882, 'name5882', 5892.111, 588200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5882]'); insert into test_proxima_be_restart_with_full_stage values(5883, 'name5883', 5893.111, 588300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5883]'); insert into test_proxima_be_restart_with_full_stage values(5884, 'name5884', 5894.111, 588400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5884]'); insert into test_proxima_be_restart_with_full_stage values(5885, 'name5885', 5895.111, 588500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5885]'); insert into test_proxima_be_restart_with_full_stage values(5886, 'name5886', 5896.111, 588600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5886]'); insert into test_proxima_be_restart_with_full_stage values(5887, 'name5887', 5897.111, 588700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5887]'); insert into test_proxima_be_restart_with_full_stage values(5888, 'name5888', 5898.111, 588800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5888]'); insert into test_proxima_be_restart_with_full_stage values(5889, 'name5889', 5899.111, 588900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5889]'); insert into test_proxima_be_restart_with_full_stage values(5890, 'name5890', 5900.111, 589000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5890]'); insert into test_proxima_be_restart_with_full_stage values(5891, 'name5891', 5901.111, 589100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5891]'); insert into test_proxima_be_restart_with_full_stage values(5892, 'name5892', 5902.111, 589200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5892]'); insert into test_proxima_be_restart_with_full_stage values(5893, 'name5893', 5903.111, 589300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5893]'); insert into test_proxima_be_restart_with_full_stage values(5894, 'name5894', 5904.111, 589400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5894]'); insert into test_proxima_be_restart_with_full_stage values(5895, 'name5895', 5905.111, 589500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5895]'); insert into test_proxima_be_restart_with_full_stage values(5896, 'name5896', 5906.111, 589600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5896]'); insert into test_proxima_be_restart_with_full_stage values(5897, 'name5897', 5907.111, 589700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5897]'); insert into test_proxima_be_restart_with_full_stage values(5898, 'name5898', 5908.111, 589800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5898]'); insert into test_proxima_be_restart_with_full_stage values(5899, 'name5899', 5909.111, 589900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5899]'); insert into test_proxima_be_restart_with_full_stage values(5900, 'name5900', 5910.111, 590000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5900]'); insert into test_proxima_be_restart_with_full_stage values(5901, 'name5901', 5911.111, 590100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5901]'); insert into test_proxima_be_restart_with_full_stage values(5902, 'name5902', 5912.111, 590200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5902]'); insert into test_proxima_be_restart_with_full_stage values(5903, 'name5903', 5913.111, 590300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5903]'); insert into test_proxima_be_restart_with_full_stage values(5904, 'name5904', 5914.111, 590400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5904]'); insert into test_proxima_be_restart_with_full_stage values(5905, 'name5905', 5915.111, 590500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5905]'); insert into test_proxima_be_restart_with_full_stage values(5906, 'name5906', 5916.111, 590600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5906]'); insert into test_proxima_be_restart_with_full_stage values(5907, 'name5907', 5917.111, 590700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5907]'); insert into test_proxima_be_restart_with_full_stage values(5908, 'name5908', 5918.111, 590800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5908]'); insert into test_proxima_be_restart_with_full_stage values(5909, 'name5909', 5919.111, 590900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5909]'); insert into test_proxima_be_restart_with_full_stage values(5910, 'name5910', 5920.111, 591000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5910]'); insert into test_proxima_be_restart_with_full_stage values(5911, 'name5911', 5921.111, 591100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5911]'); insert into test_proxima_be_restart_with_full_stage values(5912, 'name5912', 5922.111, 591200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5912]'); insert into test_proxima_be_restart_with_full_stage values(5913, 'name5913', 5923.111, 591300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5913]'); insert into test_proxima_be_restart_with_full_stage values(5914, 'name5914', 5924.111, 591400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5914]'); insert into test_proxima_be_restart_with_full_stage values(5915, 'name5915', 5925.111, 591500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5915]'); insert into test_proxima_be_restart_with_full_stage values(5916, 'name5916', 5926.111, 591600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5916]'); insert into test_proxima_be_restart_with_full_stage values(5917, 'name5917', 5927.111, 591700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5917]'); insert into test_proxima_be_restart_with_full_stage values(5918, 'name5918', 5928.111, 591800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5918]'); insert into test_proxima_be_restart_with_full_stage values(5919, 'name5919', 5929.111, 591900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5919]'); insert into test_proxima_be_restart_with_full_stage values(5920, 'name5920', 5930.111, 592000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5920]'); insert into test_proxima_be_restart_with_full_stage values(5921, 'name5921', 5931.111, 592100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5921]'); insert into test_proxima_be_restart_with_full_stage values(5922, 'name5922', 5932.111, 592200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5922]'); insert into test_proxima_be_restart_with_full_stage values(5923, 'name5923', 5933.111, 592300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5923]'); insert into test_proxima_be_restart_with_full_stage values(5924, 'name5924', 5934.111, 592400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5924]'); insert into test_proxima_be_restart_with_full_stage values(5925, 'name5925', 5935.111, 592500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5925]'); insert into test_proxima_be_restart_with_full_stage values(5926, 'name5926', 5936.111, 592600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5926]'); insert into test_proxima_be_restart_with_full_stage values(5927, 'name5927', 5937.111, 592700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5927]'); insert into test_proxima_be_restart_with_full_stage values(5928, 'name5928', 5938.111, 592800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5928]'); insert into test_proxima_be_restart_with_full_stage values(5929, 'name5929', 5939.111, 592900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5929]'); insert into test_proxima_be_restart_with_full_stage values(5930, 'name5930', 5940.111, 593000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5930]'); insert into test_proxima_be_restart_with_full_stage values(5931, 'name5931', 5941.111, 593100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5931]'); insert into test_proxima_be_restart_with_full_stage values(5932, 'name5932', 5942.111, 593200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5932]'); insert into test_proxima_be_restart_with_full_stage values(5933, 'name5933', 5943.111, 593300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5933]'); insert into test_proxima_be_restart_with_full_stage values(5934, 'name5934', 5944.111, 593400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5934]'); insert into test_proxima_be_restart_with_full_stage values(5935, 'name5935', 5945.111, 593500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5935]'); insert into test_proxima_be_restart_with_full_stage values(5936, 'name5936', 5946.111, 593600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5936]'); insert into test_proxima_be_restart_with_full_stage values(5937, 'name5937', 5947.111, 593700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5937]'); insert into test_proxima_be_restart_with_full_stage values(5938, 'name5938', 5948.111, 593800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5938]'); insert into test_proxima_be_restart_with_full_stage values(5939, 'name5939', 5949.111, 593900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5939]'); insert into test_proxima_be_restart_with_full_stage values(5940, 'name5940', 5950.111, 594000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5940]'); insert into test_proxima_be_restart_with_full_stage values(5941, 'name5941', 5951.111, 594100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5941]'); insert into test_proxima_be_restart_with_full_stage values(5942, 'name5942', 5952.111, 594200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5942]'); insert into test_proxima_be_restart_with_full_stage values(5943, 'name5943', 5953.111, 594300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5943]'); insert into test_proxima_be_restart_with_full_stage values(5944, 'name5944', 5954.111, 594400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5944]'); insert into test_proxima_be_restart_with_full_stage values(5945, 'name5945', 5955.111, 594500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5945]'); insert into test_proxima_be_restart_with_full_stage values(5946, 'name5946', 5956.111, 594600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5946]'); insert into test_proxima_be_restart_with_full_stage values(5947, 'name5947', 5957.111, 594700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5947]'); insert into test_proxima_be_restart_with_full_stage values(5948, 'name5948', 5958.111, 594800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5948]'); insert into test_proxima_be_restart_with_full_stage values(5949, 'name5949', 5959.111, 594900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5949]'); insert into test_proxima_be_restart_with_full_stage values(5950, 'name5950', 5960.111, 595000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5950]'); insert into test_proxima_be_restart_with_full_stage values(5951, 'name5951', 5961.111, 595100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5951]'); insert into test_proxima_be_restart_with_full_stage values(5952, 'name5952', 5962.111, 595200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5952]'); insert into test_proxima_be_restart_with_full_stage values(5953, 'name5953', 5963.111, 595300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5953]'); insert into test_proxima_be_restart_with_full_stage values(5954, 'name5954', 5964.111, 595400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5954]'); insert into test_proxima_be_restart_with_full_stage values(5955, 'name5955', 5965.111, 595500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5955]'); insert into test_proxima_be_restart_with_full_stage values(5956, 'name5956', 5966.111, 595600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5956]'); insert into test_proxima_be_restart_with_full_stage values(5957, 'name5957', 5967.111, 595700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5957]'); insert into test_proxima_be_restart_with_full_stage values(5958, 'name5958', 5968.111, 595800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5958]'); insert into test_proxima_be_restart_with_full_stage values(5959, 'name5959', 5969.111, 595900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5959]'); insert into test_proxima_be_restart_with_full_stage values(5960, 'name5960', 5970.111, 596000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5960]'); insert into test_proxima_be_restart_with_full_stage values(5961, 'name5961', 5971.111, 596100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5961]'); insert into test_proxima_be_restart_with_full_stage values(5962, 'name5962', 5972.111, 596200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5962]'); insert into test_proxima_be_restart_with_full_stage values(5963, 'name5963', 5973.111, 596300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5963]'); insert into test_proxima_be_restart_with_full_stage values(5964, 'name5964', 5974.111, 596400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5964]'); insert into test_proxima_be_restart_with_full_stage values(5965, 'name5965', 5975.111, 596500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5965]'); insert into test_proxima_be_restart_with_full_stage values(5966, 'name5966', 5976.111, 596600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5966]'); insert into test_proxima_be_restart_with_full_stage values(5967, 'name5967', 5977.111, 596700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5967]'); insert into test_proxima_be_restart_with_full_stage values(5968, 'name5968', 5978.111, 596800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5968]'); insert into test_proxima_be_restart_with_full_stage values(5969, 'name5969', 5979.111, 596900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5969]'); insert into test_proxima_be_restart_with_full_stage values(5970, 'name5970', 5980.111, 597000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5970]'); insert into test_proxima_be_restart_with_full_stage values(5971, 'name5971', 5981.111, 597100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5971]'); insert into test_proxima_be_restart_with_full_stage values(5972, 'name5972', 5982.111, 597200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5972]'); insert into test_proxima_be_restart_with_full_stage values(5973, 'name5973', 5983.111, 597300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5973]'); insert into test_proxima_be_restart_with_full_stage values(5974, 'name5974', 5984.111, 597400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5974]'); insert into test_proxima_be_restart_with_full_stage values(5975, 'name5975', 5985.111, 597500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5975]'); insert into test_proxima_be_restart_with_full_stage values(5976, 'name5976', 5986.111, 597600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5976]'); insert into test_proxima_be_restart_with_full_stage values(5977, 'name5977', 5987.111, 597700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5977]'); insert into test_proxima_be_restart_with_full_stage values(5978, 'name5978', 5988.111, 597800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5978]'); insert into test_proxima_be_restart_with_full_stage values(5979, 'name5979', 5989.111, 597900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5979]'); insert into test_proxima_be_restart_with_full_stage values(5980, 'name5980', 5990.111, 598000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5980]'); insert into test_proxima_be_restart_with_full_stage values(5981, 'name5981', 5991.111, 598100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5981]'); insert into test_proxima_be_restart_with_full_stage values(5982, 'name5982', 5992.111, 598200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5982]'); insert into test_proxima_be_restart_with_full_stage values(5983, 'name5983', 5993.111, 598300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5983]'); insert into test_proxima_be_restart_with_full_stage values(5984, 'name5984', 5994.111, 598400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5984]'); insert into test_proxima_be_restart_with_full_stage values(5985, 'name5985', 5995.111, 598500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5985]'); insert into test_proxima_be_restart_with_full_stage values(5986, 'name5986', 5996.111, 598600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5986]'); insert into test_proxima_be_restart_with_full_stage values(5987, 'name5987', 5997.111, 598700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5987]'); insert into test_proxima_be_restart_with_full_stage values(5988, 'name5988', 5998.111, 598800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5988]'); insert into test_proxima_be_restart_with_full_stage values(5989, 'name5989', 5999.111, 598900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5989]'); insert into test_proxima_be_restart_with_full_stage values(5990, 'name5990', 6000.111, 599000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5990]'); insert into test_proxima_be_restart_with_full_stage values(5991, 'name5991', 6001.111, 599100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5991]'); insert into test_proxima_be_restart_with_full_stage values(5992, 'name5992', 6002.111, 599200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5992]'); insert into test_proxima_be_restart_with_full_stage values(5993, 'name5993', 6003.111, 599300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5993]'); insert into test_proxima_be_restart_with_full_stage values(5994, 'name5994', 6004.111, 599400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5994]'); insert into test_proxima_be_restart_with_full_stage values(5995, 'name5995', 6005.111, 599500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5995]'); insert into test_proxima_be_restart_with_full_stage values(5996, 'name5996', 6006.111, 599600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5996]'); insert into test_proxima_be_restart_with_full_stage values(5997, 'name5997', 6007.111, 599700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5997]'); insert into test_proxima_be_restart_with_full_stage values(5998, 'name5998', 6008.111, 599800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5998]'); insert into test_proxima_be_restart_with_full_stage values(5999, 'name5999', 6009.111, 599900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5999]'); insert into test_proxima_be_restart_with_full_stage values(6000, 'name6000', 6010.111, 600000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6000]'); insert into test_proxima_be_restart_with_full_stage values(6001, 'name6001', 6011.111, 600100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6001]'); insert into test_proxima_be_restart_with_full_stage values(6002, 'name6002', 6012.111, 600200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6002]'); insert into test_proxima_be_restart_with_full_stage values(6003, 'name6003', 6013.111, 600300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6003]'); insert into test_proxima_be_restart_with_full_stage values(6004, 'name6004', 6014.111, 600400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6004]'); insert into test_proxima_be_restart_with_full_stage values(6005, 'name6005', 6015.111, 600500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6005]'); insert into test_proxima_be_restart_with_full_stage values(6006, 'name6006', 6016.111, 600600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6006]'); insert into test_proxima_be_restart_with_full_stage values(6007, 'name6007', 6017.111, 600700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6007]'); insert into test_proxima_be_restart_with_full_stage values(6008, 'name6008', 6018.111, 600800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6008]'); insert into test_proxima_be_restart_with_full_stage values(6009, 'name6009', 6019.111, 600900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6009]'); insert into test_proxima_be_restart_with_full_stage values(6010, 'name6010', 6020.111, 601000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6010]'); insert into test_proxima_be_restart_with_full_stage values(6011, 'name6011', 6021.111, 601100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6011]'); insert into test_proxima_be_restart_with_full_stage values(6012, 'name6012', 6022.111, 601200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6012]'); insert into test_proxima_be_restart_with_full_stage values(6013, 'name6013', 6023.111, 601300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6013]'); insert into test_proxima_be_restart_with_full_stage values(6014, 'name6014', 6024.111, 601400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6014]'); insert into test_proxima_be_restart_with_full_stage values(6015, 'name6015', 6025.111, 601500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6015]'); insert into test_proxima_be_restart_with_full_stage values(6016, 'name6016', 6026.111, 601600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6016]'); insert into test_proxima_be_restart_with_full_stage values(6017, 'name6017', 6027.111, 601700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6017]'); insert into test_proxima_be_restart_with_full_stage values(6018, 'name6018', 6028.111, 601800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6018]'); insert into test_proxima_be_restart_with_full_stage values(6019, 'name6019', 6029.111, 601900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6019]'); insert into test_proxima_be_restart_with_full_stage values(6020, 'name6020', 6030.111, 602000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6020]'); insert into test_proxima_be_restart_with_full_stage values(6021, 'name6021', 6031.111, 602100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6021]'); insert into test_proxima_be_restart_with_full_stage values(6022, 'name6022', 6032.111, 602200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6022]'); insert into test_proxima_be_restart_with_full_stage values(6023, 'name6023', 6033.111, 602300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6023]'); insert into test_proxima_be_restart_with_full_stage values(6024, 'name6024', 6034.111, 602400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6024]'); insert into test_proxima_be_restart_with_full_stage values(6025, 'name6025', 6035.111, 602500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6025]'); insert into test_proxima_be_restart_with_full_stage values(6026, 'name6026', 6036.111, 602600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6026]'); insert into test_proxima_be_restart_with_full_stage values(6027, 'name6027', 6037.111, 602700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6027]'); insert into test_proxima_be_restart_with_full_stage values(6028, 'name6028', 6038.111, 602800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6028]'); insert into test_proxima_be_restart_with_full_stage values(6029, 'name6029', 6039.111, 602900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6029]'); insert into test_proxima_be_restart_with_full_stage values(6030, 'name6030', 6040.111, 603000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6030]'); insert into test_proxima_be_restart_with_full_stage values(6031, 'name6031', 6041.111, 603100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6031]'); insert into test_proxima_be_restart_with_full_stage values(6032, 'name6032', 6042.111, 603200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6032]'); insert into test_proxima_be_restart_with_full_stage values(6033, 'name6033', 6043.111, 603300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6033]'); insert into test_proxima_be_restart_with_full_stage values(6034, 'name6034', 6044.111, 603400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6034]'); insert into test_proxima_be_restart_with_full_stage values(6035, 'name6035', 6045.111, 603500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6035]'); insert into test_proxima_be_restart_with_full_stage values(6036, 'name6036', 6046.111, 603600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6036]'); insert into test_proxima_be_restart_with_full_stage values(6037, 'name6037', 6047.111, 603700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6037]'); insert into test_proxima_be_restart_with_full_stage values(6038, 'name6038', 6048.111, 603800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6038]'); insert into test_proxima_be_restart_with_full_stage values(6039, 'name6039', 6049.111, 603900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6039]'); insert into test_proxima_be_restart_with_full_stage values(6040, 'name6040', 6050.111, 604000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6040]'); insert into test_proxima_be_restart_with_full_stage values(6041, 'name6041', 6051.111, 604100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6041]'); insert into test_proxima_be_restart_with_full_stage values(6042, 'name6042', 6052.111, 604200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6042]'); insert into test_proxima_be_restart_with_full_stage values(6043, 'name6043', 6053.111, 604300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6043]'); insert into test_proxima_be_restart_with_full_stage values(6044, 'name6044', 6054.111, 604400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6044]'); insert into test_proxima_be_restart_with_full_stage values(6045, 'name6045', 6055.111, 604500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6045]'); insert into test_proxima_be_restart_with_full_stage values(6046, 'name6046', 6056.111, 604600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6046]'); insert into test_proxima_be_restart_with_full_stage values(6047, 'name6047', 6057.111, 604700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6047]'); insert into test_proxima_be_restart_with_full_stage values(6048, 'name6048', 6058.111, 604800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6048]'); insert into test_proxima_be_restart_with_full_stage values(6049, 'name6049', 6059.111, 604900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6049]'); insert into test_proxima_be_restart_with_full_stage values(6050, 'name6050', 6060.111, 605000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6050]'); insert into test_proxima_be_restart_with_full_stage values(6051, 'name6051', 6061.111, 605100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6051]'); insert into test_proxima_be_restart_with_full_stage values(6052, 'name6052', 6062.111, 605200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6052]'); insert into test_proxima_be_restart_with_full_stage values(6053, 'name6053', 6063.111, 605300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6053]'); insert into test_proxima_be_restart_with_full_stage values(6054, 'name6054', 6064.111, 605400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6054]'); insert into test_proxima_be_restart_with_full_stage values(6055, 'name6055', 6065.111, 605500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6055]'); insert into test_proxima_be_restart_with_full_stage values(6056, 'name6056', 6066.111, 605600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6056]'); insert into test_proxima_be_restart_with_full_stage values(6057, 'name6057', 6067.111, 605700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6057]'); insert into test_proxima_be_restart_with_full_stage values(6058, 'name6058', 6068.111, 605800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6058]'); insert into test_proxima_be_restart_with_full_stage values(6059, 'name6059', 6069.111, 605900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6059]'); insert into test_proxima_be_restart_with_full_stage values(6060, 'name6060', 6070.111, 606000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6060]'); insert into test_proxima_be_restart_with_full_stage values(6061, 'name6061', 6071.111, 606100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6061]'); insert into test_proxima_be_restart_with_full_stage values(6062, 'name6062', 6072.111, 606200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6062]'); insert into test_proxima_be_restart_with_full_stage values(6063, 'name6063', 6073.111, 606300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6063]'); insert into test_proxima_be_restart_with_full_stage values(6064, 'name6064', 6074.111, 606400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6064]'); insert into test_proxima_be_restart_with_full_stage values(6065, 'name6065', 6075.111, 606500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6065]'); insert into test_proxima_be_restart_with_full_stage values(6066, 'name6066', 6076.111, 606600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6066]'); insert into test_proxima_be_restart_with_full_stage values(6067, 'name6067', 6077.111, 606700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6067]'); insert into test_proxima_be_restart_with_full_stage values(6068, 'name6068', 6078.111, 606800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6068]'); insert into test_proxima_be_restart_with_full_stage values(6069, 'name6069', 6079.111, 606900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6069]'); insert into test_proxima_be_restart_with_full_stage values(6070, 'name6070', 6080.111, 607000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6070]'); insert into test_proxima_be_restart_with_full_stage values(6071, 'name6071', 6081.111, 607100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6071]'); insert into test_proxima_be_restart_with_full_stage values(6072, 'name6072', 6082.111, 607200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6072]'); insert into test_proxima_be_restart_with_full_stage values(6073, 'name6073', 6083.111, 607300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6073]'); insert into test_proxima_be_restart_with_full_stage values(6074, 'name6074', 6084.111, 607400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6074]'); insert into test_proxima_be_restart_with_full_stage values(6075, 'name6075', 6085.111, 607500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6075]'); insert into test_proxima_be_restart_with_full_stage values(6076, 'name6076', 6086.111, 607600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6076]'); insert into test_proxima_be_restart_with_full_stage values(6077, 'name6077', 6087.111, 607700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6077]'); insert into test_proxima_be_restart_with_full_stage values(6078, 'name6078', 6088.111, 607800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6078]'); insert into test_proxima_be_restart_with_full_stage values(6079, 'name6079', 6089.111, 607900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6079]'); insert into test_proxima_be_restart_with_full_stage values(6080, 'name6080', 6090.111, 608000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6080]'); insert into test_proxima_be_restart_with_full_stage values(6081, 'name6081', 6091.111, 608100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6081]'); insert into test_proxima_be_restart_with_full_stage values(6082, 'name6082', 6092.111, 608200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6082]'); insert into test_proxima_be_restart_with_full_stage values(6083, 'name6083', 6093.111, 608300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6083]'); insert into test_proxima_be_restart_with_full_stage values(6084, 'name6084', 6094.111, 608400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6084]'); insert into test_proxima_be_restart_with_full_stage values(6085, 'name6085', 6095.111, 608500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6085]'); insert into test_proxima_be_restart_with_full_stage values(6086, 'name6086', 6096.111, 608600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6086]'); insert into test_proxima_be_restart_with_full_stage values(6087, 'name6087', 6097.111, 608700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6087]'); insert into test_proxima_be_restart_with_full_stage values(6088, 'name6088', 6098.111, 608800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6088]'); insert into test_proxima_be_restart_with_full_stage values(6089, 'name6089', 6099.111, 608900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6089]'); insert into test_proxima_be_restart_with_full_stage values(6090, 'name6090', 6100.111, 609000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6090]'); insert into test_proxima_be_restart_with_full_stage values(6091, 'name6091', 6101.111, 609100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6091]'); insert into test_proxima_be_restart_with_full_stage values(6092, 'name6092', 6102.111, 609200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6092]'); insert into test_proxima_be_restart_with_full_stage values(6093, 'name6093', 6103.111, 609300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6093]'); insert into test_proxima_be_restart_with_full_stage values(6094, 'name6094', 6104.111, 609400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6094]'); insert into test_proxima_be_restart_with_full_stage values(6095, 'name6095', 6105.111, 609500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6095]'); insert into test_proxima_be_restart_with_full_stage values(6096, 'name6096', 6106.111, 609600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6096]'); insert into test_proxima_be_restart_with_full_stage values(6097, 'name6097', 6107.111, 609700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6097]'); insert into test_proxima_be_restart_with_full_stage values(6098, 'name6098', 6108.111, 609800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6098]'); insert into test_proxima_be_restart_with_full_stage values(6099, 'name6099', 6109.111, 609900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6099]'); insert into test_proxima_be_restart_with_full_stage values(6100, 'name6100', 6110.111, 610000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6100]'); insert into test_proxima_be_restart_with_full_stage values(6101, 'name6101', 6111.111, 610100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6101]'); insert into test_proxima_be_restart_with_full_stage values(6102, 'name6102', 6112.111, 610200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6102]'); insert into test_proxima_be_restart_with_full_stage values(6103, 'name6103', 6113.111, 610300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6103]'); insert into test_proxima_be_restart_with_full_stage values(6104, 'name6104', 6114.111, 610400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6104]'); insert into test_proxima_be_restart_with_full_stage values(6105, 'name6105', 6115.111, 610500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6105]'); insert into test_proxima_be_restart_with_full_stage values(6106, 'name6106', 6116.111, 610600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6106]'); insert into test_proxima_be_restart_with_full_stage values(6107, 'name6107', 6117.111, 610700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6107]'); insert into test_proxima_be_restart_with_full_stage values(6108, 'name6108', 6118.111, 610800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6108]'); insert into test_proxima_be_restart_with_full_stage values(6109, 'name6109', 6119.111, 610900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6109]'); insert into test_proxima_be_restart_with_full_stage values(6110, 'name6110', 6120.111, 611000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6110]'); insert into test_proxima_be_restart_with_full_stage values(6111, 'name6111', 6121.111, 611100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6111]'); insert into test_proxima_be_restart_with_full_stage values(6112, 'name6112', 6122.111, 611200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6112]'); insert into test_proxima_be_restart_with_full_stage values(6113, 'name6113', 6123.111, 611300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6113]'); insert into test_proxima_be_restart_with_full_stage values(6114, 'name6114', 6124.111, 611400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6114]'); insert into test_proxima_be_restart_with_full_stage values(6115, 'name6115', 6125.111, 611500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6115]'); insert into test_proxima_be_restart_with_full_stage values(6116, 'name6116', 6126.111, 611600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6116]'); insert into test_proxima_be_restart_with_full_stage values(6117, 'name6117', 6127.111, 611700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6117]'); insert into test_proxima_be_restart_with_full_stage values(6118, 'name6118', 6128.111, 611800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6118]'); insert into test_proxima_be_restart_with_full_stage values(6119, 'name6119', 6129.111, 611900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6119]'); insert into test_proxima_be_restart_with_full_stage values(6120, 'name6120', 6130.111, 612000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6120]'); insert into test_proxima_be_restart_with_full_stage values(6121, 'name6121', 6131.111, 612100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6121]'); insert into test_proxima_be_restart_with_full_stage values(6122, 'name6122', 6132.111, 612200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6122]'); insert into test_proxima_be_restart_with_full_stage values(6123, 'name6123', 6133.111, 612300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6123]'); insert into test_proxima_be_restart_with_full_stage values(6124, 'name6124', 6134.111, 612400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6124]'); insert into test_proxima_be_restart_with_full_stage values(6125, 'name6125', 6135.111, 612500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6125]'); insert into test_proxima_be_restart_with_full_stage values(6126, 'name6126', 6136.111, 612600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6126]'); insert into test_proxima_be_restart_with_full_stage values(6127, 'name6127', 6137.111, 612700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6127]'); insert into test_proxima_be_restart_with_full_stage values(6128, 'name6128', 6138.111, 612800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6128]'); insert into test_proxima_be_restart_with_full_stage values(6129, 'name6129', 6139.111, 612900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6129]'); insert into test_proxima_be_restart_with_full_stage values(6130, 'name6130', 6140.111, 613000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6130]'); insert into test_proxima_be_restart_with_full_stage values(6131, 'name6131', 6141.111, 613100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6131]'); insert into test_proxima_be_restart_with_full_stage values(6132, 'name6132', 6142.111, 613200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6132]'); insert into test_proxima_be_restart_with_full_stage values(6133, 'name6133', 6143.111, 613300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6133]'); insert into test_proxima_be_restart_with_full_stage values(6134, 'name6134', 6144.111, 613400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6134]'); insert into test_proxima_be_restart_with_full_stage values(6135, 'name6135', 6145.111, 613500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6135]'); insert into test_proxima_be_restart_with_full_stage values(6136, 'name6136', 6146.111, 613600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6136]'); insert into test_proxima_be_restart_with_full_stage values(6137, 'name6137', 6147.111, 613700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6137]'); insert into test_proxima_be_restart_with_full_stage values(6138, 'name6138', 6148.111, 613800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6138]'); insert into test_proxima_be_restart_with_full_stage values(6139, 'name6139', 6149.111, 613900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6139]'); insert into test_proxima_be_restart_with_full_stage values(6140, 'name6140', 6150.111, 614000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6140]'); insert into test_proxima_be_restart_with_full_stage values(6141, 'name6141', 6151.111, 614100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6141]'); insert into test_proxima_be_restart_with_full_stage values(6142, 'name6142', 6152.111, 614200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6142]'); insert into test_proxima_be_restart_with_full_stage values(6143, 'name6143', 6153.111, 614300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6143]'); insert into test_proxima_be_restart_with_full_stage values(6144, 'name6144', 6154.111, 614400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6144]'); insert into test_proxima_be_restart_with_full_stage values(6145, 'name6145', 6155.111, 614500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6145]'); insert into test_proxima_be_restart_with_full_stage values(6146, 'name6146', 6156.111, 614600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6146]'); insert into test_proxima_be_restart_with_full_stage values(6147, 'name6147', 6157.111, 614700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6147]'); insert into test_proxima_be_restart_with_full_stage values(6148, 'name6148', 6158.111, 614800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6148]'); insert into test_proxima_be_restart_with_full_stage values(6149, 'name6149', 6159.111, 614900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6149]'); insert into test_proxima_be_restart_with_full_stage values(6150, 'name6150', 6160.111, 615000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6150]'); insert into test_proxima_be_restart_with_full_stage values(6151, 'name6151', 6161.111, 615100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6151]'); insert into test_proxima_be_restart_with_full_stage values(6152, 'name6152', 6162.111, 615200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6152]'); insert into test_proxima_be_restart_with_full_stage values(6153, 'name6153', 6163.111, 615300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6153]'); insert into test_proxima_be_restart_with_full_stage values(6154, 'name6154', 6164.111, 615400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6154]'); insert into test_proxima_be_restart_with_full_stage values(6155, 'name6155', 6165.111, 615500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6155]'); insert into test_proxima_be_restart_with_full_stage values(6156, 'name6156', 6166.111, 615600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6156]'); insert into test_proxima_be_restart_with_full_stage values(6157, 'name6157', 6167.111, 615700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6157]'); insert into test_proxima_be_restart_with_full_stage values(6158, 'name6158', 6168.111, 615800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6158]'); insert into test_proxima_be_restart_with_full_stage values(6159, 'name6159', 6169.111, 615900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6159]'); insert into test_proxima_be_restart_with_full_stage values(6160, 'name6160', 6170.111, 616000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6160]'); insert into test_proxima_be_restart_with_full_stage values(6161, 'name6161', 6171.111, 616100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6161]'); insert into test_proxima_be_restart_with_full_stage values(6162, 'name6162', 6172.111, 616200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6162]'); insert into test_proxima_be_restart_with_full_stage values(6163, 'name6163', 6173.111, 616300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6163]'); insert into test_proxima_be_restart_with_full_stage values(6164, 'name6164', 6174.111, 616400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6164]'); insert into test_proxima_be_restart_with_full_stage values(6165, 'name6165', 6175.111, 616500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6165]'); insert into test_proxima_be_restart_with_full_stage values(6166, 'name6166', 6176.111, 616600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6166]'); insert into test_proxima_be_restart_with_full_stage values(6167, 'name6167', 6177.111, 616700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6167]'); insert into test_proxima_be_restart_with_full_stage values(6168, 'name6168', 6178.111, 616800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6168]'); insert into test_proxima_be_restart_with_full_stage values(6169, 'name6169', 6179.111, 616900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6169]'); insert into test_proxima_be_restart_with_full_stage values(6170, 'name6170', 6180.111, 617000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6170]'); insert into test_proxima_be_restart_with_full_stage values(6171, 'name6171', 6181.111, 617100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6171]'); insert into test_proxima_be_restart_with_full_stage values(6172, 'name6172', 6182.111, 617200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6172]'); insert into test_proxima_be_restart_with_full_stage values(6173, 'name6173', 6183.111, 617300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6173]'); insert into test_proxima_be_restart_with_full_stage values(6174, 'name6174', 6184.111, 617400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6174]'); insert into test_proxima_be_restart_with_full_stage values(6175, 'name6175', 6185.111, 617500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6175]'); insert into test_proxima_be_restart_with_full_stage values(6176, 'name6176', 6186.111, 617600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6176]'); insert into test_proxima_be_restart_with_full_stage values(6177, 'name6177', 6187.111, 617700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6177]'); insert into test_proxima_be_restart_with_full_stage values(6178, 'name6178', 6188.111, 617800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6178]'); insert into test_proxima_be_restart_with_full_stage values(6179, 'name6179', 6189.111, 617900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6179]'); insert into test_proxima_be_restart_with_full_stage values(6180, 'name6180', 6190.111, 618000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6180]'); insert into test_proxima_be_restart_with_full_stage values(6181, 'name6181', 6191.111, 618100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6181]'); insert into test_proxima_be_restart_with_full_stage values(6182, 'name6182', 6192.111, 618200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6182]'); insert into test_proxima_be_restart_with_full_stage values(6183, 'name6183', 6193.111, 618300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6183]'); insert into test_proxima_be_restart_with_full_stage values(6184, 'name6184', 6194.111, 618400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6184]'); insert into test_proxima_be_restart_with_full_stage values(6185, 'name6185', 6195.111, 618500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6185]'); insert into test_proxima_be_restart_with_full_stage values(6186, 'name6186', 6196.111, 618600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6186]'); insert into test_proxima_be_restart_with_full_stage values(6187, 'name6187', 6197.111, 618700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6187]'); insert into test_proxima_be_restart_with_full_stage values(6188, 'name6188', 6198.111, 618800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6188]'); insert into test_proxima_be_restart_with_full_stage values(6189, 'name6189', 6199.111, 618900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6189]'); insert into test_proxima_be_restart_with_full_stage values(6190, 'name6190', 6200.111, 619000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6190]'); insert into test_proxima_be_restart_with_full_stage values(6191, 'name6191', 6201.111, 619100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6191]'); insert into test_proxima_be_restart_with_full_stage values(6192, 'name6192', 6202.111, 619200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6192]'); insert into test_proxima_be_restart_with_full_stage values(6193, 'name6193', 6203.111, 619300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6193]'); insert into test_proxima_be_restart_with_full_stage values(6194, 'name6194', 6204.111, 619400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6194]'); insert into test_proxima_be_restart_with_full_stage values(6195, 'name6195', 6205.111, 619500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6195]'); insert into test_proxima_be_restart_with_full_stage values(6196, 'name6196', 6206.111, 619600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6196]'); insert into test_proxima_be_restart_with_full_stage values(6197, 'name6197', 6207.111, 619700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6197]'); insert into test_proxima_be_restart_with_full_stage values(6198, 'name6198', 6208.111, 619800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6198]'); insert into test_proxima_be_restart_with_full_stage values(6199, 'name6199', 6209.111, 619900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6199]'); insert into test_proxima_be_restart_with_full_stage values(6200, 'name6200', 6210.111, 620000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6200]'); insert into test_proxima_be_restart_with_full_stage values(6201, 'name6201', 6211.111, 620100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6201]'); insert into test_proxima_be_restart_with_full_stage values(6202, 'name6202', 6212.111, 620200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6202]'); insert into test_proxima_be_restart_with_full_stage values(6203, 'name6203', 6213.111, 620300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6203]'); insert into test_proxima_be_restart_with_full_stage values(6204, 'name6204', 6214.111, 620400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6204]'); insert into test_proxima_be_restart_with_full_stage values(6205, 'name6205', 6215.111, 620500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6205]'); insert into test_proxima_be_restart_with_full_stage values(6206, 'name6206', 6216.111, 620600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6206]'); insert into test_proxima_be_restart_with_full_stage values(6207, 'name6207', 6217.111, 620700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6207]'); insert into test_proxima_be_restart_with_full_stage values(6208, 'name6208', 6218.111, 620800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6208]'); insert into test_proxima_be_restart_with_full_stage values(6209, 'name6209', 6219.111, 620900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6209]'); insert into test_proxima_be_restart_with_full_stage values(6210, 'name6210', 6220.111, 621000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6210]'); insert into test_proxima_be_restart_with_full_stage values(6211, 'name6211', 6221.111, 621100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6211]'); insert into test_proxima_be_restart_with_full_stage values(6212, 'name6212', 6222.111, 621200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6212]'); insert into test_proxima_be_restart_with_full_stage values(6213, 'name6213', 6223.111, 621300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6213]'); insert into test_proxima_be_restart_with_full_stage values(6214, 'name6214', 6224.111, 621400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6214]'); insert into test_proxima_be_restart_with_full_stage values(6215, 'name6215', 6225.111, 621500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6215]'); insert into test_proxima_be_restart_with_full_stage values(6216, 'name6216', 6226.111, 621600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6216]'); insert into test_proxima_be_restart_with_full_stage values(6217, 'name6217', 6227.111, 621700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6217]'); insert into test_proxima_be_restart_with_full_stage values(6218, 'name6218', 6228.111, 621800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6218]'); insert into test_proxima_be_restart_with_full_stage values(6219, 'name6219', 6229.111, 621900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6219]'); insert into test_proxima_be_restart_with_full_stage values(6220, 'name6220', 6230.111, 622000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6220]'); insert into test_proxima_be_restart_with_full_stage values(6221, 'name6221', 6231.111, 622100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6221]'); insert into test_proxima_be_restart_with_full_stage values(6222, 'name6222', 6232.111, 622200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6222]'); insert into test_proxima_be_restart_with_full_stage values(6223, 'name6223', 6233.111, 622300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6223]'); insert into test_proxima_be_restart_with_full_stage values(6224, 'name6224', 6234.111, 622400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6224]'); insert into test_proxima_be_restart_with_full_stage values(6225, 'name6225', 6235.111, 622500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6225]'); insert into test_proxima_be_restart_with_full_stage values(6226, 'name6226', 6236.111, 622600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6226]'); insert into test_proxima_be_restart_with_full_stage values(6227, 'name6227', 6237.111, 622700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6227]'); insert into test_proxima_be_restart_with_full_stage values(6228, 'name6228', 6238.111, 622800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6228]'); insert into test_proxima_be_restart_with_full_stage values(6229, 'name6229', 6239.111, 622900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6229]'); insert into test_proxima_be_restart_with_full_stage values(6230, 'name6230', 6240.111, 623000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6230]'); insert into test_proxima_be_restart_with_full_stage values(6231, 'name6231', 6241.111, 623100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6231]'); insert into test_proxima_be_restart_with_full_stage values(6232, 'name6232', 6242.111, 623200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6232]'); insert into test_proxima_be_restart_with_full_stage values(6233, 'name6233', 6243.111, 623300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6233]'); insert into test_proxima_be_restart_with_full_stage values(6234, 'name6234', 6244.111, 623400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6234]'); insert into test_proxima_be_restart_with_full_stage values(6235, 'name6235', 6245.111, 623500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6235]'); insert into test_proxima_be_restart_with_full_stage values(6236, 'name6236', 6246.111, 623600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6236]'); insert into test_proxima_be_restart_with_full_stage values(6237, 'name6237', 6247.111, 623700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6237]'); insert into test_proxima_be_restart_with_full_stage values(6238, 'name6238', 6248.111, 623800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6238]'); insert into test_proxima_be_restart_with_full_stage values(6239, 'name6239', 6249.111, 623900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6239]'); insert into test_proxima_be_restart_with_full_stage values(6240, 'name6240', 6250.111, 624000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6240]'); insert into test_proxima_be_restart_with_full_stage values(6241, 'name6241', 6251.111, 624100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6241]'); insert into test_proxima_be_restart_with_full_stage values(6242, 'name6242', 6252.111, 624200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6242]'); insert into test_proxima_be_restart_with_full_stage values(6243, 'name6243', 6253.111, 624300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6243]'); insert into test_proxima_be_restart_with_full_stage values(6244, 'name6244', 6254.111, 624400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6244]'); insert into test_proxima_be_restart_with_full_stage values(6245, 'name6245', 6255.111, 624500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6245]'); insert into test_proxima_be_restart_with_full_stage values(6246, 'name6246', 6256.111, 624600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6246]'); insert into test_proxima_be_restart_with_full_stage values(6247, 'name6247', 6257.111, 624700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6247]'); insert into test_proxima_be_restart_with_full_stage values(6248, 'name6248', 6258.111, 624800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6248]'); insert into test_proxima_be_restart_with_full_stage values(6249, 'name6249', 6259.111, 624900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6249]'); insert into test_proxima_be_restart_with_full_stage values(6250, 'name6250', 6260.111, 625000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6250]'); insert into test_proxima_be_restart_with_full_stage values(6251, 'name6251', 6261.111, 625100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6251]'); insert into test_proxima_be_restart_with_full_stage values(6252, 'name6252', 6262.111, 625200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6252]'); insert into test_proxima_be_restart_with_full_stage values(6253, 'name6253', 6263.111, 625300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6253]'); insert into test_proxima_be_restart_with_full_stage values(6254, 'name6254', 6264.111, 625400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6254]'); insert into test_proxima_be_restart_with_full_stage values(6255, 'name6255', 6265.111, 625500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6255]'); insert into test_proxima_be_restart_with_full_stage values(6256, 'name6256', 6266.111, 625600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6256]'); insert into test_proxima_be_restart_with_full_stage values(6257, 'name6257', 6267.111, 625700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6257]'); insert into test_proxima_be_restart_with_full_stage values(6258, 'name6258', 6268.111, 625800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6258]'); insert into test_proxima_be_restart_with_full_stage values(6259, 'name6259', 6269.111, 625900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6259]'); insert into test_proxima_be_restart_with_full_stage values(6260, 'name6260', 6270.111, 626000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6260]'); insert into test_proxima_be_restart_with_full_stage values(6261, 'name6261', 6271.111, 626100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6261]'); insert into test_proxima_be_restart_with_full_stage values(6262, 'name6262', 6272.111, 626200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6262]'); insert into test_proxima_be_restart_with_full_stage values(6263, 'name6263', 6273.111, 626300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6263]'); insert into test_proxima_be_restart_with_full_stage values(6264, 'name6264', 6274.111, 626400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6264]'); insert into test_proxima_be_restart_with_full_stage values(6265, 'name6265', 6275.111, 626500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6265]'); insert into test_proxima_be_restart_with_full_stage values(6266, 'name6266', 6276.111, 626600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6266]'); insert into test_proxima_be_restart_with_full_stage values(6267, 'name6267', 6277.111, 626700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6267]'); insert into test_proxima_be_restart_with_full_stage values(6268, 'name6268', 6278.111, 626800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6268]'); insert into test_proxima_be_restart_with_full_stage values(6269, 'name6269', 6279.111, 626900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6269]'); insert into test_proxima_be_restart_with_full_stage values(6270, 'name6270', 6280.111, 627000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6270]'); insert into test_proxima_be_restart_with_full_stage values(6271, 'name6271', 6281.111, 627100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6271]'); insert into test_proxima_be_restart_with_full_stage values(6272, 'name6272', 6282.111, 627200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6272]'); insert into test_proxima_be_restart_with_full_stage values(6273, 'name6273', 6283.111, 627300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6273]'); insert into test_proxima_be_restart_with_full_stage values(6274, 'name6274', 6284.111, 627400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6274]'); insert into test_proxima_be_restart_with_full_stage values(6275, 'name6275', 6285.111, 627500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6275]'); insert into test_proxima_be_restart_with_full_stage values(6276, 'name6276', 6286.111, 627600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6276]'); insert into test_proxima_be_restart_with_full_stage values(6277, 'name6277', 6287.111, 627700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6277]'); insert into test_proxima_be_restart_with_full_stage values(6278, 'name6278', 6288.111, 627800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6278]'); insert into test_proxima_be_restart_with_full_stage values(6279, 'name6279', 6289.111, 627900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6279]'); insert into test_proxima_be_restart_with_full_stage values(6280, 'name6280', 6290.111, 628000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6280]'); insert into test_proxima_be_restart_with_full_stage values(6281, 'name6281', 6291.111, 628100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6281]'); insert into test_proxima_be_restart_with_full_stage values(6282, 'name6282', 6292.111, 628200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6282]'); insert into test_proxima_be_restart_with_full_stage values(6283, 'name6283', 6293.111, 628300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6283]'); insert into test_proxima_be_restart_with_full_stage values(6284, 'name6284', 6294.111, 628400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6284]'); insert into test_proxima_be_restart_with_full_stage values(6285, 'name6285', 6295.111, 628500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6285]'); insert into test_proxima_be_restart_with_full_stage values(6286, 'name6286', 6296.111, 628600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6286]'); insert into test_proxima_be_restart_with_full_stage values(6287, 'name6287', 6297.111, 628700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6287]'); insert into test_proxima_be_restart_with_full_stage values(6288, 'name6288', 6298.111, 628800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6288]'); insert into test_proxima_be_restart_with_full_stage values(6289, 'name6289', 6299.111, 628900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6289]'); insert into test_proxima_be_restart_with_full_stage values(6290, 'name6290', 6300.111, 629000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6290]'); insert into test_proxima_be_restart_with_full_stage values(6291, 'name6291', 6301.111, 629100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6291]'); insert into test_proxima_be_restart_with_full_stage values(6292, 'name6292', 6302.111, 629200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6292]'); insert into test_proxima_be_restart_with_full_stage values(6293, 'name6293', 6303.111, 629300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6293]'); insert into test_proxima_be_restart_with_full_stage values(6294, 'name6294', 6304.111, 629400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6294]'); insert into test_proxima_be_restart_with_full_stage values(6295, 'name6295', 6305.111, 629500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6295]'); insert into test_proxima_be_restart_with_full_stage values(6296, 'name6296', 6306.111, 629600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6296]'); insert into test_proxima_be_restart_with_full_stage values(6297, 'name6297', 6307.111, 629700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6297]'); insert into test_proxima_be_restart_with_full_stage values(6298, 'name6298', 6308.111, 629800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6298]'); insert into test_proxima_be_restart_with_full_stage values(6299, 'name6299', 6309.111, 629900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6299]'); insert into test_proxima_be_restart_with_full_stage values(6300, 'name6300', 6310.111, 630000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6300]'); insert into test_proxima_be_restart_with_full_stage values(6301, 'name6301', 6311.111, 630100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6301]'); insert into test_proxima_be_restart_with_full_stage values(6302, 'name6302', 6312.111, 630200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6302]'); insert into test_proxima_be_restart_with_full_stage values(6303, 'name6303', 6313.111, 630300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6303]'); insert into test_proxima_be_restart_with_full_stage values(6304, 'name6304', 6314.111, 630400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6304]'); insert into test_proxima_be_restart_with_full_stage values(6305, 'name6305', 6315.111, 630500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6305]'); insert into test_proxima_be_restart_with_full_stage values(6306, 'name6306', 6316.111, 630600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6306]'); insert into test_proxima_be_restart_with_full_stage values(6307, 'name6307', 6317.111, 630700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6307]'); insert into test_proxima_be_restart_with_full_stage values(6308, 'name6308', 6318.111, 630800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6308]'); insert into test_proxima_be_restart_with_full_stage values(6309, 'name6309', 6319.111, 630900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6309]'); insert into test_proxima_be_restart_with_full_stage values(6310, 'name6310', 6320.111, 631000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6310]'); insert into test_proxima_be_restart_with_full_stage values(6311, 'name6311', 6321.111, 631100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6311]'); insert into test_proxima_be_restart_with_full_stage values(6312, 'name6312', 6322.111, 631200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6312]'); insert into test_proxima_be_restart_with_full_stage values(6313, 'name6313', 6323.111, 631300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6313]'); insert into test_proxima_be_restart_with_full_stage values(6314, 'name6314', 6324.111, 631400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6314]'); insert into test_proxima_be_restart_with_full_stage values(6315, 'name6315', 6325.111, 631500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6315]'); insert into test_proxima_be_restart_with_full_stage values(6316, 'name6316', 6326.111, 631600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6316]'); insert into test_proxima_be_restart_with_full_stage values(6317, 'name6317', 6327.111, 631700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6317]'); insert into test_proxima_be_restart_with_full_stage values(6318, 'name6318', 6328.111, 631800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6318]'); insert into test_proxima_be_restart_with_full_stage values(6319, 'name6319', 6329.111, 631900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6319]'); insert into test_proxima_be_restart_with_full_stage values(6320, 'name6320', 6330.111, 632000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6320]'); insert into test_proxima_be_restart_with_full_stage values(6321, 'name6321', 6331.111, 632100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6321]'); insert into test_proxima_be_restart_with_full_stage values(6322, 'name6322', 6332.111, 632200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6322]'); insert into test_proxima_be_restart_with_full_stage values(6323, 'name6323', 6333.111, 632300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6323]'); insert into test_proxima_be_restart_with_full_stage values(6324, 'name6324', 6334.111, 632400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6324]'); insert into test_proxima_be_restart_with_full_stage values(6325, 'name6325', 6335.111, 632500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6325]'); insert into test_proxima_be_restart_with_full_stage values(6326, 'name6326', 6336.111, 632600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6326]'); insert into test_proxima_be_restart_with_full_stage values(6327, 'name6327', 6337.111, 632700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6327]'); insert into test_proxima_be_restart_with_full_stage values(6328, 'name6328', 6338.111, 632800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6328]'); insert into test_proxima_be_restart_with_full_stage values(6329, 'name6329', 6339.111, 632900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6329]'); insert into test_proxima_be_restart_with_full_stage values(6330, 'name6330', 6340.111, 633000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6330]'); insert into test_proxima_be_restart_with_full_stage values(6331, 'name6331', 6341.111, 633100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6331]'); insert into test_proxima_be_restart_with_full_stage values(6332, 'name6332', 6342.111, 633200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6332]'); insert into test_proxima_be_restart_with_full_stage values(6333, 'name6333', 6343.111, 633300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6333]'); insert into test_proxima_be_restart_with_full_stage values(6334, 'name6334', 6344.111, 633400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6334]'); insert into test_proxima_be_restart_with_full_stage values(6335, 'name6335', 6345.111, 633500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6335]'); insert into test_proxima_be_restart_with_full_stage values(6336, 'name6336', 6346.111, 633600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6336]'); insert into test_proxima_be_restart_with_full_stage values(6337, 'name6337', 6347.111, 633700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6337]'); insert into test_proxima_be_restart_with_full_stage values(6338, 'name6338', 6348.111, 633800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6338]'); insert into test_proxima_be_restart_with_full_stage values(6339, 'name6339', 6349.111, 633900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6339]'); insert into test_proxima_be_restart_with_full_stage values(6340, 'name6340', 6350.111, 634000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6340]'); insert into test_proxima_be_restart_with_full_stage values(6341, 'name6341', 6351.111, 634100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6341]'); insert into test_proxima_be_restart_with_full_stage values(6342, 'name6342', 6352.111, 634200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6342]'); insert into test_proxima_be_restart_with_full_stage values(6343, 'name6343', 6353.111, 634300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6343]'); insert into test_proxima_be_restart_with_full_stage values(6344, 'name6344', 6354.111, 634400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6344]'); insert into test_proxima_be_restart_with_full_stage values(6345, 'name6345', 6355.111, 634500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6345]'); insert into test_proxima_be_restart_with_full_stage values(6346, 'name6346', 6356.111, 634600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6346]'); insert into test_proxima_be_restart_with_full_stage values(6347, 'name6347', 6357.111, 634700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6347]'); insert into test_proxima_be_restart_with_full_stage values(6348, 'name6348', 6358.111, 634800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6348]'); insert into test_proxima_be_restart_with_full_stage values(6349, 'name6349', 6359.111, 634900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6349]'); insert into test_proxima_be_restart_with_full_stage values(6350, 'name6350', 6360.111, 635000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6350]'); insert into test_proxima_be_restart_with_full_stage values(6351, 'name6351', 6361.111, 635100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6351]'); insert into test_proxima_be_restart_with_full_stage values(6352, 'name6352', 6362.111, 635200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6352]'); insert into test_proxima_be_restart_with_full_stage values(6353, 'name6353', 6363.111, 635300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6353]'); insert into test_proxima_be_restart_with_full_stage values(6354, 'name6354', 6364.111, 635400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6354]'); insert into test_proxima_be_restart_with_full_stage values(6355, 'name6355', 6365.111, 635500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6355]'); insert into test_proxima_be_restart_with_full_stage values(6356, 'name6356', 6366.111, 635600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6356]'); insert into test_proxima_be_restart_with_full_stage values(6357, 'name6357', 6367.111, 635700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6357]'); insert into test_proxima_be_restart_with_full_stage values(6358, 'name6358', 6368.111, 635800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6358]'); insert into test_proxima_be_restart_with_full_stage values(6359, 'name6359', 6369.111, 635900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6359]'); insert into test_proxima_be_restart_with_full_stage values(6360, 'name6360', 6370.111, 636000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6360]'); insert into test_proxima_be_restart_with_full_stage values(6361, 'name6361', 6371.111, 636100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6361]'); insert into test_proxima_be_restart_with_full_stage values(6362, 'name6362', 6372.111, 636200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6362]'); insert into test_proxima_be_restart_with_full_stage values(6363, 'name6363', 6373.111, 636300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6363]'); insert into test_proxima_be_restart_with_full_stage values(6364, 'name6364', 6374.111, 636400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6364]'); insert into test_proxima_be_restart_with_full_stage values(6365, 'name6365', 6375.111, 636500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6365]'); insert into test_proxima_be_restart_with_full_stage values(6366, 'name6366', 6376.111, 636600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6366]'); insert into test_proxima_be_restart_with_full_stage values(6367, 'name6367', 6377.111, 636700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6367]'); insert into test_proxima_be_restart_with_full_stage values(6368, 'name6368', 6378.111, 636800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6368]'); insert into test_proxima_be_restart_with_full_stage values(6369, 'name6369', 6379.111, 636900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6369]'); insert into test_proxima_be_restart_with_full_stage values(6370, 'name6370', 6380.111, 637000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6370]'); insert into test_proxima_be_restart_with_full_stage values(6371, 'name6371', 6381.111, 637100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6371]'); insert into test_proxima_be_restart_with_full_stage values(6372, 'name6372', 6382.111, 637200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6372]'); insert into test_proxima_be_restart_with_full_stage values(6373, 'name6373', 6383.111, 637300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6373]'); insert into test_proxima_be_restart_with_full_stage values(6374, 'name6374', 6384.111, 637400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6374]'); insert into test_proxima_be_restart_with_full_stage values(6375, 'name6375', 6385.111, 637500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6375]'); insert into test_proxima_be_restart_with_full_stage values(6376, 'name6376', 6386.111, 637600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6376]'); insert into test_proxima_be_restart_with_full_stage values(6377, 'name6377', 6387.111, 637700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6377]'); insert into test_proxima_be_restart_with_full_stage values(6378, 'name6378', 6388.111, 637800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6378]'); insert into test_proxima_be_restart_with_full_stage values(6379, 'name6379', 6389.111, 637900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6379]'); insert into test_proxima_be_restart_with_full_stage values(6380, 'name6380', 6390.111, 638000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6380]'); insert into test_proxima_be_restart_with_full_stage values(6381, 'name6381', 6391.111, 638100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6381]'); insert into test_proxima_be_restart_with_full_stage values(6382, 'name6382', 6392.111, 638200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6382]'); insert into test_proxima_be_restart_with_full_stage values(6383, 'name6383', 6393.111, 638300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6383]'); insert into test_proxima_be_restart_with_full_stage values(6384, 'name6384', 6394.111, 638400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6384]'); insert into test_proxima_be_restart_with_full_stage values(6385, 'name6385', 6395.111, 638500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6385]'); insert into test_proxima_be_restart_with_full_stage values(6386, 'name6386', 6396.111, 638600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6386]'); insert into test_proxima_be_restart_with_full_stage values(6387, 'name6387', 6397.111, 638700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6387]'); insert into test_proxima_be_restart_with_full_stage values(6388, 'name6388', 6398.111, 638800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6388]'); insert into test_proxima_be_restart_with_full_stage values(6389, 'name6389', 6399.111, 638900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6389]'); insert into test_proxima_be_restart_with_full_stage values(6390, 'name6390', 6400.111, 639000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6390]'); insert into test_proxima_be_restart_with_full_stage values(6391, 'name6391', 6401.111, 639100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6391]'); insert into test_proxima_be_restart_with_full_stage values(6392, 'name6392', 6402.111, 639200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6392]'); insert into test_proxima_be_restart_with_full_stage values(6393, 'name6393', 6403.111, 639300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6393]'); insert into test_proxima_be_restart_with_full_stage values(6394, 'name6394', 6404.111, 639400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6394]'); insert into test_proxima_be_restart_with_full_stage values(6395, 'name6395', 6405.111, 639500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6395]'); insert into test_proxima_be_restart_with_full_stage values(6396, 'name6396', 6406.111, 639600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6396]'); insert into test_proxima_be_restart_with_full_stage values(6397, 'name6397', 6407.111, 639700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6397]'); insert into test_proxima_be_restart_with_full_stage values(6398, 'name6398', 6408.111, 639800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6398]'); insert into test_proxima_be_restart_with_full_stage values(6399, 'name6399', 6409.111, 639900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6399]'); insert into test_proxima_be_restart_with_full_stage values(6400, 'name6400', 6410.111, 640000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6400]'); insert into test_proxima_be_restart_with_full_stage values(6401, 'name6401', 6411.111, 640100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6401]'); insert into test_proxima_be_restart_with_full_stage values(6402, 'name6402', 6412.111, 640200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6402]'); insert into test_proxima_be_restart_with_full_stage values(6403, 'name6403', 6413.111, 640300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6403]'); insert into test_proxima_be_restart_with_full_stage values(6404, 'name6404', 6414.111, 640400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6404]'); insert into test_proxima_be_restart_with_full_stage values(6405, 'name6405', 6415.111, 640500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6405]'); insert into test_proxima_be_restart_with_full_stage values(6406, 'name6406', 6416.111, 640600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6406]'); insert into test_proxima_be_restart_with_full_stage values(6407, 'name6407', 6417.111, 640700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6407]'); insert into test_proxima_be_restart_with_full_stage values(6408, 'name6408', 6418.111, 640800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6408]'); insert into test_proxima_be_restart_with_full_stage values(6409, 'name6409', 6419.111, 640900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6409]'); insert into test_proxima_be_restart_with_full_stage values(6410, 'name6410', 6420.111, 641000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6410]'); insert into test_proxima_be_restart_with_full_stage values(6411, 'name6411', 6421.111, 641100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6411]'); insert into test_proxima_be_restart_with_full_stage values(6412, 'name6412', 6422.111, 641200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6412]'); insert into test_proxima_be_restart_with_full_stage values(6413, 'name6413', 6423.111, 641300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6413]'); insert into test_proxima_be_restart_with_full_stage values(6414, 'name6414', 6424.111, 641400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6414]'); insert into test_proxima_be_restart_with_full_stage values(6415, 'name6415', 6425.111, 641500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6415]'); insert into test_proxima_be_restart_with_full_stage values(6416, 'name6416', 6426.111, 641600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6416]'); insert into test_proxima_be_restart_with_full_stage values(6417, 'name6417', 6427.111, 641700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6417]'); insert into test_proxima_be_restart_with_full_stage values(6418, 'name6418', 6428.111, 641800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6418]'); insert into test_proxima_be_restart_with_full_stage values(6419, 'name6419', 6429.111, 641900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6419]'); insert into test_proxima_be_restart_with_full_stage values(6420, 'name6420', 6430.111, 642000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6420]'); insert into test_proxima_be_restart_with_full_stage values(6421, 'name6421', 6431.111, 642100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6421]'); insert into test_proxima_be_restart_with_full_stage values(6422, 'name6422', 6432.111, 642200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6422]'); insert into test_proxima_be_restart_with_full_stage values(6423, 'name6423', 6433.111, 642300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6423]'); insert into test_proxima_be_restart_with_full_stage values(6424, 'name6424', 6434.111, 642400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6424]'); insert into test_proxima_be_restart_with_full_stage values(6425, 'name6425', 6435.111, 642500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6425]'); insert into test_proxima_be_restart_with_full_stage values(6426, 'name6426', 6436.111, 642600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6426]'); insert into test_proxima_be_restart_with_full_stage values(6427, 'name6427', 6437.111, 642700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6427]'); insert into test_proxima_be_restart_with_full_stage values(6428, 'name6428', 6438.111, 642800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6428]'); insert into test_proxima_be_restart_with_full_stage values(6429, 'name6429', 6439.111, 642900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6429]'); insert into test_proxima_be_restart_with_full_stage values(6430, 'name6430', 6440.111, 643000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6430]'); insert into test_proxima_be_restart_with_full_stage values(6431, 'name6431', 6441.111, 643100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6431]'); insert into test_proxima_be_restart_with_full_stage values(6432, 'name6432', 6442.111, 643200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6432]'); insert into test_proxima_be_restart_with_full_stage values(6433, 'name6433', 6443.111, 643300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6433]'); insert into test_proxima_be_restart_with_full_stage values(6434, 'name6434', 6444.111, 643400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6434]'); insert into test_proxima_be_restart_with_full_stage values(6435, 'name6435', 6445.111, 643500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6435]'); insert into test_proxima_be_restart_with_full_stage values(6436, 'name6436', 6446.111, 643600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6436]'); insert into test_proxima_be_restart_with_full_stage values(6437, 'name6437', 6447.111, 643700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6437]'); insert into test_proxima_be_restart_with_full_stage values(6438, 'name6438', 6448.111, 643800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6438]'); insert into test_proxima_be_restart_with_full_stage values(6439, 'name6439', 6449.111, 643900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6439]'); insert into test_proxima_be_restart_with_full_stage values(6440, 'name6440', 6450.111, 644000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6440]'); insert into test_proxima_be_restart_with_full_stage values(6441, 'name6441', 6451.111, 644100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6441]'); insert into test_proxima_be_restart_with_full_stage values(6442, 'name6442', 6452.111, 644200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6442]'); insert into test_proxima_be_restart_with_full_stage values(6443, 'name6443', 6453.111, 644300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6443]'); insert into test_proxima_be_restart_with_full_stage values(6444, 'name6444', 6454.111, 644400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6444]'); insert into test_proxima_be_restart_with_full_stage values(6445, 'name6445', 6455.111, 644500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6445]'); insert into test_proxima_be_restart_with_full_stage values(6446, 'name6446', 6456.111, 644600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6446]'); insert into test_proxima_be_restart_with_full_stage values(6447, 'name6447', 6457.111, 644700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6447]'); insert into test_proxima_be_restart_with_full_stage values(6448, 'name6448', 6458.111, 644800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6448]'); insert into test_proxima_be_restart_with_full_stage values(6449, 'name6449', 6459.111, 644900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6449]'); insert into test_proxima_be_restart_with_full_stage values(6450, 'name6450', 6460.111, 645000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6450]'); insert into test_proxima_be_restart_with_full_stage values(6451, 'name6451', 6461.111, 645100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6451]'); insert into test_proxima_be_restart_with_full_stage values(6452, 'name6452', 6462.111, 645200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6452]'); insert into test_proxima_be_restart_with_full_stage values(6453, 'name6453', 6463.111, 645300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6453]'); insert into test_proxima_be_restart_with_full_stage values(6454, 'name6454', 6464.111, 645400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6454]'); insert into test_proxima_be_restart_with_full_stage values(6455, 'name6455', 6465.111, 645500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6455]'); insert into test_proxima_be_restart_with_full_stage values(6456, 'name6456', 6466.111, 645600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6456]'); insert into test_proxima_be_restart_with_full_stage values(6457, 'name6457', 6467.111, 645700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6457]'); insert into test_proxima_be_restart_with_full_stage values(6458, 'name6458', 6468.111, 645800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6458]'); insert into test_proxima_be_restart_with_full_stage values(6459, 'name6459', 6469.111, 645900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6459]'); insert into test_proxima_be_restart_with_full_stage values(6460, 'name6460', 6470.111, 646000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6460]'); insert into test_proxima_be_restart_with_full_stage values(6461, 'name6461', 6471.111, 646100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6461]'); insert into test_proxima_be_restart_with_full_stage values(6462, 'name6462', 6472.111, 646200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6462]'); insert into test_proxima_be_restart_with_full_stage values(6463, 'name6463', 6473.111, 646300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6463]'); insert into test_proxima_be_restart_with_full_stage values(6464, 'name6464', 6474.111, 646400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6464]'); insert into test_proxima_be_restart_with_full_stage values(6465, 'name6465', 6475.111, 646500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6465]'); insert into test_proxima_be_restart_with_full_stage values(6466, 'name6466', 6476.111, 646600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6466]'); insert into test_proxima_be_restart_with_full_stage values(6467, 'name6467', 6477.111, 646700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6467]'); insert into test_proxima_be_restart_with_full_stage values(6468, 'name6468', 6478.111, 646800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6468]'); insert into test_proxima_be_restart_with_full_stage values(6469, 'name6469', 6479.111, 646900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6469]'); insert into test_proxima_be_restart_with_full_stage values(6470, 'name6470', 6480.111, 647000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6470]'); insert into test_proxima_be_restart_with_full_stage values(6471, 'name6471', 6481.111, 647100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6471]'); insert into test_proxima_be_restart_with_full_stage values(6472, 'name6472', 6482.111, 647200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6472]'); insert into test_proxima_be_restart_with_full_stage values(6473, 'name6473', 6483.111, 647300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6473]'); insert into test_proxima_be_restart_with_full_stage values(6474, 'name6474', 6484.111, 647400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6474]'); insert into test_proxima_be_restart_with_full_stage values(6475, 'name6475', 6485.111, 647500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6475]'); insert into test_proxima_be_restart_with_full_stage values(6476, 'name6476', 6486.111, 647600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6476]'); insert into test_proxima_be_restart_with_full_stage values(6477, 'name6477', 6487.111, 647700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6477]'); insert into test_proxima_be_restart_with_full_stage values(6478, 'name6478', 6488.111, 647800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6478]'); insert into test_proxima_be_restart_with_full_stage values(6479, 'name6479', 6489.111, 647900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6479]'); insert into test_proxima_be_restart_with_full_stage values(6480, 'name6480', 6490.111, 648000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6480]'); insert into test_proxima_be_restart_with_full_stage values(6481, 'name6481', 6491.111, 648100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6481]'); insert into test_proxima_be_restart_with_full_stage values(6482, 'name6482', 6492.111, 648200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6482]'); insert into test_proxima_be_restart_with_full_stage values(6483, 'name6483', 6493.111, 648300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6483]'); insert into test_proxima_be_restart_with_full_stage values(6484, 'name6484', 6494.111, 648400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6484]'); insert into test_proxima_be_restart_with_full_stage values(6485, 'name6485', 6495.111, 648500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6485]'); insert into test_proxima_be_restart_with_full_stage values(6486, 'name6486', 6496.111, 648600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6486]'); insert into test_proxima_be_restart_with_full_stage values(6487, 'name6487', 6497.111, 648700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6487]'); insert into test_proxima_be_restart_with_full_stage values(6488, 'name6488', 6498.111, 648800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6488]'); insert into test_proxima_be_restart_with_full_stage values(6489, 'name6489', 6499.111, 648900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6489]'); insert into test_proxima_be_restart_with_full_stage values(6490, 'name6490', 6500.111, 649000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6490]'); insert into test_proxima_be_restart_with_full_stage values(6491, 'name6491', 6501.111, 649100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6491]'); insert into test_proxima_be_restart_with_full_stage values(6492, 'name6492', 6502.111, 649200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6492]'); insert into test_proxima_be_restart_with_full_stage values(6493, 'name6493', 6503.111, 649300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6493]'); insert into test_proxima_be_restart_with_full_stage values(6494, 'name6494', 6504.111, 649400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6494]'); insert into test_proxima_be_restart_with_full_stage values(6495, 'name6495', 6505.111, 649500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6495]'); insert into test_proxima_be_restart_with_full_stage values(6496, 'name6496', 6506.111, 649600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6496]'); insert into test_proxima_be_restart_with_full_stage values(6497, 'name6497', 6507.111, 649700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6497]'); insert into test_proxima_be_restart_with_full_stage values(6498, 'name6498', 6508.111, 649800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6498]'); insert into test_proxima_be_restart_with_full_stage values(6499, 'name6499', 6509.111, 649900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6499]'); insert into test_proxima_be_restart_with_full_stage values(6500, 'name6500', 6510.111, 650000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6500]'); insert into test_proxima_be_restart_with_full_stage values(6501, 'name6501', 6511.111, 650100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6501]'); insert into test_proxima_be_restart_with_full_stage values(6502, 'name6502', 6512.111, 650200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6502]'); insert into test_proxima_be_restart_with_full_stage values(6503, 'name6503', 6513.111, 650300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6503]'); insert into test_proxima_be_restart_with_full_stage values(6504, 'name6504', 6514.111, 650400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6504]'); insert into test_proxima_be_restart_with_full_stage values(6505, 'name6505', 6515.111, 650500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6505]'); insert into test_proxima_be_restart_with_full_stage values(6506, 'name6506', 6516.111, 650600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6506]'); insert into test_proxima_be_restart_with_full_stage values(6507, 'name6507', 6517.111, 650700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6507]'); insert into test_proxima_be_restart_with_full_stage values(6508, 'name6508', 6518.111, 650800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6508]'); insert into test_proxima_be_restart_with_full_stage values(6509, 'name6509', 6519.111, 650900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6509]'); insert into test_proxima_be_restart_with_full_stage values(6510, 'name6510', 6520.111, 651000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6510]'); insert into test_proxima_be_restart_with_full_stage values(6511, 'name6511', 6521.111, 651100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6511]'); insert into test_proxima_be_restart_with_full_stage values(6512, 'name6512', 6522.111, 651200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6512]'); insert into test_proxima_be_restart_with_full_stage values(6513, 'name6513', 6523.111, 651300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6513]'); insert into test_proxima_be_restart_with_full_stage values(6514, 'name6514', 6524.111, 651400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6514]'); insert into test_proxima_be_restart_with_full_stage values(6515, 'name6515', 6525.111, 651500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6515]'); insert into test_proxima_be_restart_with_full_stage values(6516, 'name6516', 6526.111, 651600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6516]'); insert into test_proxima_be_restart_with_full_stage values(6517, 'name6517', 6527.111, 651700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6517]'); insert into test_proxima_be_restart_with_full_stage values(6518, 'name6518', 6528.111, 651800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6518]'); insert into test_proxima_be_restart_with_full_stage values(6519, 'name6519', 6529.111, 651900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6519]'); insert into test_proxima_be_restart_with_full_stage values(6520, 'name6520', 6530.111, 652000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6520]'); insert into test_proxima_be_restart_with_full_stage values(6521, 'name6521', 6531.111, 652100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6521]'); insert into test_proxima_be_restart_with_full_stage values(6522, 'name6522', 6532.111, 652200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6522]'); insert into test_proxima_be_restart_with_full_stage values(6523, 'name6523', 6533.111, 652300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6523]'); insert into test_proxima_be_restart_with_full_stage values(6524, 'name6524', 6534.111, 652400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6524]'); insert into test_proxima_be_restart_with_full_stage values(6525, 'name6525', 6535.111, 652500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6525]'); insert into test_proxima_be_restart_with_full_stage values(6526, 'name6526', 6536.111, 652600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6526]'); insert into test_proxima_be_restart_with_full_stage values(6527, 'name6527', 6537.111, 652700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6527]'); insert into test_proxima_be_restart_with_full_stage values(6528, 'name6528', 6538.111, 652800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6528]'); insert into test_proxima_be_restart_with_full_stage values(6529, 'name6529', 6539.111, 652900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6529]'); insert into test_proxima_be_restart_with_full_stage values(6530, 'name6530', 6540.111, 653000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6530]'); insert into test_proxima_be_restart_with_full_stage values(6531, 'name6531', 6541.111, 653100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6531]'); insert into test_proxima_be_restart_with_full_stage values(6532, 'name6532', 6542.111, 653200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6532]'); insert into test_proxima_be_restart_with_full_stage values(6533, 'name6533', 6543.111, 653300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6533]'); insert into test_proxima_be_restart_with_full_stage values(6534, 'name6534', 6544.111, 653400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6534]'); insert into test_proxima_be_restart_with_full_stage values(6535, 'name6535', 6545.111, 653500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6535]'); insert into test_proxima_be_restart_with_full_stage values(6536, 'name6536', 6546.111, 653600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6536]'); insert into test_proxima_be_restart_with_full_stage values(6537, 'name6537', 6547.111, 653700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6537]'); insert into test_proxima_be_restart_with_full_stage values(6538, 'name6538', 6548.111, 653800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6538]'); insert into test_proxima_be_restart_with_full_stage values(6539, 'name6539', 6549.111, 653900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6539]'); insert into test_proxima_be_restart_with_full_stage values(6540, 'name6540', 6550.111, 654000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6540]'); insert into test_proxima_be_restart_with_full_stage values(6541, 'name6541', 6551.111, 654100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6541]'); insert into test_proxima_be_restart_with_full_stage values(6542, 'name6542', 6552.111, 654200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6542]'); insert into test_proxima_be_restart_with_full_stage values(6543, 'name6543', 6553.111, 654300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6543]'); insert into test_proxima_be_restart_with_full_stage values(6544, 'name6544', 6554.111, 654400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6544]'); insert into test_proxima_be_restart_with_full_stage values(6545, 'name6545', 6555.111, 654500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6545]'); insert into test_proxima_be_restart_with_full_stage values(6546, 'name6546', 6556.111, 654600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6546]'); insert into test_proxima_be_restart_with_full_stage values(6547, 'name6547', 6557.111, 654700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6547]'); insert into test_proxima_be_restart_with_full_stage values(6548, 'name6548', 6558.111, 654800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6548]'); insert into test_proxima_be_restart_with_full_stage values(6549, 'name6549', 6559.111, 654900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6549]'); insert into test_proxima_be_restart_with_full_stage values(6550, 'name6550', 6560.111, 655000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6550]'); insert into test_proxima_be_restart_with_full_stage values(6551, 'name6551', 6561.111, 655100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6551]'); insert into test_proxima_be_restart_with_full_stage values(6552, 'name6552', 6562.111, 655200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6552]'); insert into test_proxima_be_restart_with_full_stage values(6553, 'name6553', 6563.111, 655300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6553]'); insert into test_proxima_be_restart_with_full_stage values(6554, 'name6554', 6564.111, 655400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6554]'); insert into test_proxima_be_restart_with_full_stage values(6555, 'name6555', 6565.111, 655500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6555]'); insert into test_proxima_be_restart_with_full_stage values(6556, 'name6556', 6566.111, 655600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6556]'); insert into test_proxima_be_restart_with_full_stage values(6557, 'name6557', 6567.111, 655700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6557]'); insert into test_proxima_be_restart_with_full_stage values(6558, 'name6558', 6568.111, 655800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6558]'); insert into test_proxima_be_restart_with_full_stage values(6559, 'name6559', 6569.111, 655900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6559]'); insert into test_proxima_be_restart_with_full_stage values(6560, 'name6560', 6570.111, 656000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6560]'); insert into test_proxima_be_restart_with_full_stage values(6561, 'name6561', 6571.111, 656100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6561]'); insert into test_proxima_be_restart_with_full_stage values(6562, 'name6562', 6572.111, 656200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6562]'); insert into test_proxima_be_restart_with_full_stage values(6563, 'name6563', 6573.111, 656300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6563]'); insert into test_proxima_be_restart_with_full_stage values(6564, 'name6564', 6574.111, 656400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6564]'); insert into test_proxima_be_restart_with_full_stage values(6565, 'name6565', 6575.111, 656500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6565]'); insert into test_proxima_be_restart_with_full_stage values(6566, 'name6566', 6576.111, 656600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6566]'); insert into test_proxima_be_restart_with_full_stage values(6567, 'name6567', 6577.111, 656700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6567]'); insert into test_proxima_be_restart_with_full_stage values(6568, 'name6568', 6578.111, 656800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6568]'); insert into test_proxima_be_restart_with_full_stage values(6569, 'name6569', 6579.111, 656900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6569]'); insert into test_proxima_be_restart_with_full_stage values(6570, 'name6570', 6580.111, 657000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6570]'); insert into test_proxima_be_restart_with_full_stage values(6571, 'name6571', 6581.111, 657100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6571]'); insert into test_proxima_be_restart_with_full_stage values(6572, 'name6572', 6582.111, 657200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6572]'); insert into test_proxima_be_restart_with_full_stage values(6573, 'name6573', 6583.111, 657300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6573]'); insert into test_proxima_be_restart_with_full_stage values(6574, 'name6574', 6584.111, 657400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6574]'); insert into test_proxima_be_restart_with_full_stage values(6575, 'name6575', 6585.111, 657500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6575]'); insert into test_proxima_be_restart_with_full_stage values(6576, 'name6576', 6586.111, 657600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6576]'); insert into test_proxima_be_restart_with_full_stage values(6577, 'name6577', 6587.111, 657700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6577]'); insert into test_proxima_be_restart_with_full_stage values(6578, 'name6578', 6588.111, 657800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6578]'); insert into test_proxima_be_restart_with_full_stage values(6579, 'name6579', 6589.111, 657900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6579]'); insert into test_proxima_be_restart_with_full_stage values(6580, 'name6580', 6590.111, 658000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6580]'); insert into test_proxima_be_restart_with_full_stage values(6581, 'name6581', 6591.111, 658100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6581]'); insert into test_proxima_be_restart_with_full_stage values(6582, 'name6582', 6592.111, 658200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6582]'); insert into test_proxima_be_restart_with_full_stage values(6583, 'name6583', 6593.111, 658300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6583]'); insert into test_proxima_be_restart_with_full_stage values(6584, 'name6584', 6594.111, 658400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6584]'); insert into test_proxima_be_restart_with_full_stage values(6585, 'name6585', 6595.111, 658500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6585]'); insert into test_proxima_be_restart_with_full_stage values(6586, 'name6586', 6596.111, 658600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6586]'); insert into test_proxima_be_restart_with_full_stage values(6587, 'name6587', 6597.111, 658700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6587]'); insert into test_proxima_be_restart_with_full_stage values(6588, 'name6588', 6598.111, 658800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6588]'); insert into test_proxima_be_restart_with_full_stage values(6589, 'name6589', 6599.111, 658900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6589]'); insert into test_proxima_be_restart_with_full_stage values(6590, 'name6590', 6600.111, 659000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6590]'); insert into test_proxima_be_restart_with_full_stage values(6591, 'name6591', 6601.111, 659100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6591]'); insert into test_proxima_be_restart_with_full_stage values(6592, 'name6592', 6602.111, 659200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6592]'); insert into test_proxima_be_restart_with_full_stage values(6593, 'name6593', 6603.111, 659300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6593]'); insert into test_proxima_be_restart_with_full_stage values(6594, 'name6594', 6604.111, 659400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6594]'); insert into test_proxima_be_restart_with_full_stage values(6595, 'name6595', 6605.111, 659500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6595]'); insert into test_proxima_be_restart_with_full_stage values(6596, 'name6596', 6606.111, 659600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6596]'); insert into test_proxima_be_restart_with_full_stage values(6597, 'name6597', 6607.111, 659700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6597]'); insert into test_proxima_be_restart_with_full_stage values(6598, 'name6598', 6608.111, 659800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6598]'); insert into test_proxima_be_restart_with_full_stage values(6599, 'name6599', 6609.111, 659900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6599]'); insert into test_proxima_be_restart_with_full_stage values(6600, 'name6600', 6610.111, 660000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6600]'); insert into test_proxima_be_restart_with_full_stage values(6601, 'name6601', 6611.111, 660100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6601]'); insert into test_proxima_be_restart_with_full_stage values(6602, 'name6602', 6612.111, 660200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6602]'); insert into test_proxima_be_restart_with_full_stage values(6603, 'name6603', 6613.111, 660300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6603]'); insert into test_proxima_be_restart_with_full_stage values(6604, 'name6604', 6614.111, 660400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6604]'); insert into test_proxima_be_restart_with_full_stage values(6605, 'name6605', 6615.111, 660500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6605]'); insert into test_proxima_be_restart_with_full_stage values(6606, 'name6606', 6616.111, 660600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6606]'); insert into test_proxima_be_restart_with_full_stage values(6607, 'name6607', 6617.111, 660700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6607]'); insert into test_proxima_be_restart_with_full_stage values(6608, 'name6608', 6618.111, 660800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6608]'); insert into test_proxima_be_restart_with_full_stage values(6609, 'name6609', 6619.111, 660900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6609]'); insert into test_proxima_be_restart_with_full_stage values(6610, 'name6610', 6620.111, 661000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6610]'); insert into test_proxima_be_restart_with_full_stage values(6611, 'name6611', 6621.111, 661100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6611]'); insert into test_proxima_be_restart_with_full_stage values(6612, 'name6612', 6622.111, 661200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6612]'); insert into test_proxima_be_restart_with_full_stage values(6613, 'name6613', 6623.111, 661300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6613]'); insert into test_proxima_be_restart_with_full_stage values(6614, 'name6614', 6624.111, 661400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6614]'); insert into test_proxima_be_restart_with_full_stage values(6615, 'name6615', 6625.111, 661500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6615]'); insert into test_proxima_be_restart_with_full_stage values(6616, 'name6616', 6626.111, 661600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6616]'); insert into test_proxima_be_restart_with_full_stage values(6617, 'name6617', 6627.111, 661700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6617]'); insert into test_proxima_be_restart_with_full_stage values(6618, 'name6618', 6628.111, 661800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6618]'); insert into test_proxima_be_restart_with_full_stage values(6619, 'name6619', 6629.111, 661900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6619]'); insert into test_proxima_be_restart_with_full_stage values(6620, 'name6620', 6630.111, 662000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6620]'); insert into test_proxima_be_restart_with_full_stage values(6621, 'name6621', 6631.111, 662100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6621]'); insert into test_proxima_be_restart_with_full_stage values(6622, 'name6622', 6632.111, 662200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6622]'); insert into test_proxima_be_restart_with_full_stage values(6623, 'name6623', 6633.111, 662300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6623]'); insert into test_proxima_be_restart_with_full_stage values(6624, 'name6624', 6634.111, 662400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6624]'); insert into test_proxima_be_restart_with_full_stage values(6625, 'name6625', 6635.111, 662500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6625]'); insert into test_proxima_be_restart_with_full_stage values(6626, 'name6626', 6636.111, 662600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6626]'); insert into test_proxima_be_restart_with_full_stage values(6627, 'name6627', 6637.111, 662700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6627]'); insert into test_proxima_be_restart_with_full_stage values(6628, 'name6628', 6638.111, 662800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6628]'); insert into test_proxima_be_restart_with_full_stage values(6629, 'name6629', 6639.111, 662900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6629]'); insert into test_proxima_be_restart_with_full_stage values(6630, 'name6630', 6640.111, 663000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6630]'); insert into test_proxima_be_restart_with_full_stage values(6631, 'name6631', 6641.111, 663100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6631]'); insert into test_proxima_be_restart_with_full_stage values(6632, 'name6632', 6642.111, 663200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6632]'); insert into test_proxima_be_restart_with_full_stage values(6633, 'name6633', 6643.111, 663300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6633]'); insert into test_proxima_be_restart_with_full_stage values(6634, 'name6634', 6644.111, 663400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6634]'); insert into test_proxima_be_restart_with_full_stage values(6635, 'name6635', 6645.111, 663500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6635]'); insert into test_proxima_be_restart_with_full_stage values(6636, 'name6636', 6646.111, 663600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6636]'); insert into test_proxima_be_restart_with_full_stage values(6637, 'name6637', 6647.111, 663700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6637]'); insert into test_proxima_be_restart_with_full_stage values(6638, 'name6638', 6648.111, 663800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6638]'); insert into test_proxima_be_restart_with_full_stage values(6639, 'name6639', 6649.111, 663900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6639]'); insert into test_proxima_be_restart_with_full_stage values(6640, 'name6640', 6650.111, 664000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6640]'); insert into test_proxima_be_restart_with_full_stage values(6641, 'name6641', 6651.111, 664100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6641]'); insert into test_proxima_be_restart_with_full_stage values(6642, 'name6642', 6652.111, 664200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6642]'); insert into test_proxima_be_restart_with_full_stage values(6643, 'name6643', 6653.111, 664300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6643]'); insert into test_proxima_be_restart_with_full_stage values(6644, 'name6644', 6654.111, 664400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6644]'); insert into test_proxima_be_restart_with_full_stage values(6645, 'name6645', 6655.111, 664500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6645]'); insert into test_proxima_be_restart_with_full_stage values(6646, 'name6646', 6656.111, 664600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6646]'); insert into test_proxima_be_restart_with_full_stage values(6647, 'name6647', 6657.111, 664700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6647]'); insert into test_proxima_be_restart_with_full_stage values(6648, 'name6648', 6658.111, 664800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6648]'); insert into test_proxima_be_restart_with_full_stage values(6649, 'name6649', 6659.111, 664900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6649]'); insert into test_proxima_be_restart_with_full_stage values(6650, 'name6650', 6660.111, 665000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6650]'); insert into test_proxima_be_restart_with_full_stage values(6651, 'name6651', 6661.111, 665100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6651]'); insert into test_proxima_be_restart_with_full_stage values(6652, 'name6652', 6662.111, 665200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6652]'); insert into test_proxima_be_restart_with_full_stage values(6653, 'name6653', 6663.111, 665300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6653]'); insert into test_proxima_be_restart_with_full_stage values(6654, 'name6654', 6664.111, 665400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6654]'); insert into test_proxima_be_restart_with_full_stage values(6655, 'name6655', 6665.111, 665500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6655]'); insert into test_proxima_be_restart_with_full_stage values(6656, 'name6656', 6666.111, 665600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6656]'); insert into test_proxima_be_restart_with_full_stage values(6657, 'name6657', 6667.111, 665700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6657]'); insert into test_proxima_be_restart_with_full_stage values(6658, 'name6658', 6668.111, 665800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6658]'); insert into test_proxima_be_restart_with_full_stage values(6659, 'name6659', 6669.111, 665900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6659]'); insert into test_proxima_be_restart_with_full_stage values(6660, 'name6660', 6670.111, 666000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6660]'); insert into test_proxima_be_restart_with_full_stage values(6661, 'name6661', 6671.111, 666100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6661]'); insert into test_proxima_be_restart_with_full_stage values(6662, 'name6662', 6672.111, 666200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6662]'); insert into test_proxima_be_restart_with_full_stage values(6663, 'name6663', 6673.111, 666300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6663]'); insert into test_proxima_be_restart_with_full_stage values(6664, 'name6664', 6674.111, 666400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6664]'); insert into test_proxima_be_restart_with_full_stage values(6665, 'name6665', 6675.111, 666500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6665]'); insert into test_proxima_be_restart_with_full_stage values(6666, 'name6666', 6676.111, 666600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6666]'); insert into test_proxima_be_restart_with_full_stage values(6667, 'name6667', 6677.111, 666700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6667]'); insert into test_proxima_be_restart_with_full_stage values(6668, 'name6668', 6678.111, 666800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6668]'); insert into test_proxima_be_restart_with_full_stage values(6669, 'name6669', 6679.111, 666900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6669]'); insert into test_proxima_be_restart_with_full_stage values(6670, 'name6670', 6680.111, 667000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6670]'); insert into test_proxima_be_restart_with_full_stage values(6671, 'name6671', 6681.111, 667100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6671]'); insert into test_proxima_be_restart_with_full_stage values(6672, 'name6672', 6682.111, 667200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6672]'); insert into test_proxima_be_restart_with_full_stage values(6673, 'name6673', 6683.111, 667300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6673]'); insert into test_proxima_be_restart_with_full_stage values(6674, 'name6674', 6684.111, 667400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6674]'); insert into test_proxima_be_restart_with_full_stage values(6675, 'name6675', 6685.111, 667500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6675]'); insert into test_proxima_be_restart_with_full_stage values(6676, 'name6676', 6686.111, 667600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6676]'); insert into test_proxima_be_restart_with_full_stage values(6677, 'name6677', 6687.111, 667700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6677]'); insert into test_proxima_be_restart_with_full_stage values(6678, 'name6678', 6688.111, 667800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6678]'); insert into test_proxima_be_restart_with_full_stage values(6679, 'name6679', 6689.111, 667900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6679]'); insert into test_proxima_be_restart_with_full_stage values(6680, 'name6680', 6690.111, 668000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6680]'); insert into test_proxima_be_restart_with_full_stage values(6681, 'name6681', 6691.111, 668100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6681]'); insert into test_proxima_be_restart_with_full_stage values(6682, 'name6682', 6692.111, 668200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6682]'); insert into test_proxima_be_restart_with_full_stage values(6683, 'name6683', 6693.111, 668300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6683]'); insert into test_proxima_be_restart_with_full_stage values(6684, 'name6684', 6694.111, 668400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6684]'); insert into test_proxima_be_restart_with_full_stage values(6685, 'name6685', 6695.111, 668500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6685]'); insert into test_proxima_be_restart_with_full_stage values(6686, 'name6686', 6696.111, 668600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6686]'); insert into test_proxima_be_restart_with_full_stage values(6687, 'name6687', 6697.111, 668700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6687]'); insert into test_proxima_be_restart_with_full_stage values(6688, 'name6688', 6698.111, 668800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6688]'); insert into test_proxima_be_restart_with_full_stage values(6689, 'name6689', 6699.111, 668900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6689]'); insert into test_proxima_be_restart_with_full_stage values(6690, 'name6690', 6700.111, 669000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6690]'); insert into test_proxima_be_restart_with_full_stage values(6691, 'name6691', 6701.111, 669100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6691]'); insert into test_proxima_be_restart_with_full_stage values(6692, 'name6692', 6702.111, 669200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6692]'); insert into test_proxima_be_restart_with_full_stage values(6693, 'name6693', 6703.111, 669300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6693]'); insert into test_proxima_be_restart_with_full_stage values(6694, 'name6694', 6704.111, 669400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6694]'); insert into test_proxima_be_restart_with_full_stage values(6695, 'name6695', 6705.111, 669500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6695]'); insert into test_proxima_be_restart_with_full_stage values(6696, 'name6696', 6706.111, 669600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6696]'); insert into test_proxima_be_restart_with_full_stage values(6697, 'name6697', 6707.111, 669700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6697]'); insert into test_proxima_be_restart_with_full_stage values(6698, 'name6698', 6708.111, 669800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6698]'); insert into test_proxima_be_restart_with_full_stage values(6699, 'name6699', 6709.111, 669900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6699]'); insert into test_proxima_be_restart_with_full_stage values(6700, 'name6700', 6710.111, 670000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6700]'); insert into test_proxima_be_restart_with_full_stage values(6701, 'name6701', 6711.111, 670100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6701]'); insert into test_proxima_be_restart_with_full_stage values(6702, 'name6702', 6712.111, 670200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6702]'); insert into test_proxima_be_restart_with_full_stage values(6703, 'name6703', 6713.111, 670300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6703]'); insert into test_proxima_be_restart_with_full_stage values(6704, 'name6704', 6714.111, 670400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6704]'); insert into test_proxima_be_restart_with_full_stage values(6705, 'name6705', 6715.111, 670500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6705]'); insert into test_proxima_be_restart_with_full_stage values(6706, 'name6706', 6716.111, 670600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6706]'); insert into test_proxima_be_restart_with_full_stage values(6707, 'name6707', 6717.111, 670700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6707]'); insert into test_proxima_be_restart_with_full_stage values(6708, 'name6708', 6718.111, 670800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6708]'); insert into test_proxima_be_restart_with_full_stage values(6709, 'name6709', 6719.111, 670900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6709]'); insert into test_proxima_be_restart_with_full_stage values(6710, 'name6710', 6720.111, 671000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6710]'); insert into test_proxima_be_restart_with_full_stage values(6711, 'name6711', 6721.111, 671100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6711]'); insert into test_proxima_be_restart_with_full_stage values(6712, 'name6712', 6722.111, 671200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6712]'); insert into test_proxima_be_restart_with_full_stage values(6713, 'name6713', 6723.111, 671300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6713]'); insert into test_proxima_be_restart_with_full_stage values(6714, 'name6714', 6724.111, 671400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6714]'); insert into test_proxima_be_restart_with_full_stage values(6715, 'name6715', 6725.111, 671500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6715]'); insert into test_proxima_be_restart_with_full_stage values(6716, 'name6716', 6726.111, 671600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6716]'); insert into test_proxima_be_restart_with_full_stage values(6717, 'name6717', 6727.111, 671700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6717]'); insert into test_proxima_be_restart_with_full_stage values(6718, 'name6718', 6728.111, 671800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6718]'); insert into test_proxima_be_restart_with_full_stage values(6719, 'name6719', 6729.111, 671900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6719]'); insert into test_proxima_be_restart_with_full_stage values(6720, 'name6720', 6730.111, 672000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6720]'); insert into test_proxima_be_restart_with_full_stage values(6721, 'name6721', 6731.111, 672100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6721]'); insert into test_proxima_be_restart_with_full_stage values(6722, 'name6722', 6732.111, 672200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6722]'); insert into test_proxima_be_restart_with_full_stage values(6723, 'name6723', 6733.111, 672300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6723]'); insert into test_proxima_be_restart_with_full_stage values(6724, 'name6724', 6734.111, 672400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6724]'); insert into test_proxima_be_restart_with_full_stage values(6725, 'name6725', 6735.111, 672500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6725]'); insert into test_proxima_be_restart_with_full_stage values(6726, 'name6726', 6736.111, 672600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6726]'); insert into test_proxima_be_restart_with_full_stage values(6727, 'name6727', 6737.111, 672700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6727]'); insert into test_proxima_be_restart_with_full_stage values(6728, 'name6728', 6738.111, 672800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6728]'); insert into test_proxima_be_restart_with_full_stage values(6729, 'name6729', 6739.111, 672900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6729]'); insert into test_proxima_be_restart_with_full_stage values(6730, 'name6730', 6740.111, 673000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6730]'); insert into test_proxima_be_restart_with_full_stage values(6731, 'name6731', 6741.111, 673100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6731]'); insert into test_proxima_be_restart_with_full_stage values(6732, 'name6732', 6742.111, 673200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6732]'); insert into test_proxima_be_restart_with_full_stage values(6733, 'name6733', 6743.111, 673300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6733]'); insert into test_proxima_be_restart_with_full_stage values(6734, 'name6734', 6744.111, 673400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6734]'); insert into test_proxima_be_restart_with_full_stage values(6735, 'name6735', 6745.111, 673500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6735]'); insert into test_proxima_be_restart_with_full_stage values(6736, 'name6736', 6746.111, 673600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6736]'); insert into test_proxima_be_restart_with_full_stage values(6737, 'name6737', 6747.111, 673700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6737]'); insert into test_proxima_be_restart_with_full_stage values(6738, 'name6738', 6748.111, 673800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6738]'); insert into test_proxima_be_restart_with_full_stage values(6739, 'name6739', 6749.111, 673900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6739]'); insert into test_proxima_be_restart_with_full_stage values(6740, 'name6740', 6750.111, 674000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6740]'); insert into test_proxima_be_restart_with_full_stage values(6741, 'name6741', 6751.111, 674100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6741]'); insert into test_proxima_be_restart_with_full_stage values(6742, 'name6742', 6752.111, 674200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6742]'); insert into test_proxima_be_restart_with_full_stage values(6743, 'name6743', 6753.111, 674300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6743]'); insert into test_proxima_be_restart_with_full_stage values(6744, 'name6744', 6754.111, 674400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6744]'); insert into test_proxima_be_restart_with_full_stage values(6745, 'name6745', 6755.111, 674500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6745]'); insert into test_proxima_be_restart_with_full_stage values(6746, 'name6746', 6756.111, 674600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6746]'); insert into test_proxima_be_restart_with_full_stage values(6747, 'name6747', 6757.111, 674700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6747]'); insert into test_proxima_be_restart_with_full_stage values(6748, 'name6748', 6758.111, 674800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6748]'); insert into test_proxima_be_restart_with_full_stage values(6749, 'name6749', 6759.111, 674900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6749]'); insert into test_proxima_be_restart_with_full_stage values(6750, 'name6750', 6760.111, 675000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6750]'); insert into test_proxima_be_restart_with_full_stage values(6751, 'name6751', 6761.111, 675100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6751]'); insert into test_proxima_be_restart_with_full_stage values(6752, 'name6752', 6762.111, 675200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6752]'); insert into test_proxima_be_restart_with_full_stage values(6753, 'name6753', 6763.111, 675300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6753]'); insert into test_proxima_be_restart_with_full_stage values(6754, 'name6754', 6764.111, 675400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6754]'); insert into test_proxima_be_restart_with_full_stage values(6755, 'name6755', 6765.111, 675500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6755]'); insert into test_proxima_be_restart_with_full_stage values(6756, 'name6756', 6766.111, 675600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6756]'); insert into test_proxima_be_restart_with_full_stage values(6757, 'name6757', 6767.111, 675700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6757]'); insert into test_proxima_be_restart_with_full_stage values(6758, 'name6758', 6768.111, 675800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6758]'); insert into test_proxima_be_restart_with_full_stage values(6759, 'name6759', 6769.111, 675900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6759]'); insert into test_proxima_be_restart_with_full_stage values(6760, 'name6760', 6770.111, 676000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6760]'); insert into test_proxima_be_restart_with_full_stage values(6761, 'name6761', 6771.111, 676100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6761]'); insert into test_proxima_be_restart_with_full_stage values(6762, 'name6762', 6772.111, 676200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6762]'); insert into test_proxima_be_restart_with_full_stage values(6763, 'name6763', 6773.111, 676300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6763]'); insert into test_proxima_be_restart_with_full_stage values(6764, 'name6764', 6774.111, 676400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6764]'); insert into test_proxima_be_restart_with_full_stage values(6765, 'name6765', 6775.111, 676500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6765]'); insert into test_proxima_be_restart_with_full_stage values(6766, 'name6766', 6776.111, 676600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6766]'); insert into test_proxima_be_restart_with_full_stage values(6767, 'name6767', 6777.111, 676700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6767]'); insert into test_proxima_be_restart_with_full_stage values(6768, 'name6768', 6778.111, 676800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6768]'); insert into test_proxima_be_restart_with_full_stage values(6769, 'name6769', 6779.111, 676900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6769]'); insert into test_proxima_be_restart_with_full_stage values(6770, 'name6770', 6780.111, 677000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6770]'); insert into test_proxima_be_restart_with_full_stage values(6771, 'name6771', 6781.111, 677100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6771]'); insert into test_proxima_be_restart_with_full_stage values(6772, 'name6772', 6782.111, 677200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6772]'); insert into test_proxima_be_restart_with_full_stage values(6773, 'name6773', 6783.111, 677300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6773]'); insert into test_proxima_be_restart_with_full_stage values(6774, 'name6774', 6784.111, 677400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6774]'); insert into test_proxima_be_restart_with_full_stage values(6775, 'name6775', 6785.111, 677500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6775]'); insert into test_proxima_be_restart_with_full_stage values(6776, 'name6776', 6786.111, 677600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6776]'); insert into test_proxima_be_restart_with_full_stage values(6777, 'name6777', 6787.111, 677700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6777]'); insert into test_proxima_be_restart_with_full_stage values(6778, 'name6778', 6788.111, 677800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6778]'); insert into test_proxima_be_restart_with_full_stage values(6779, 'name6779', 6789.111, 677900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6779]'); insert into test_proxima_be_restart_with_full_stage values(6780, 'name6780', 6790.111, 678000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6780]'); insert into test_proxima_be_restart_with_full_stage values(6781, 'name6781', 6791.111, 678100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6781]'); insert into test_proxima_be_restart_with_full_stage values(6782, 'name6782', 6792.111, 678200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6782]'); insert into test_proxima_be_restart_with_full_stage values(6783, 'name6783', 6793.111, 678300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6783]'); insert into test_proxima_be_restart_with_full_stage values(6784, 'name6784', 6794.111, 678400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6784]'); insert into test_proxima_be_restart_with_full_stage values(6785, 'name6785', 6795.111, 678500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6785]'); insert into test_proxima_be_restart_with_full_stage values(6786, 'name6786', 6796.111, 678600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6786]'); insert into test_proxima_be_restart_with_full_stage values(6787, 'name6787', 6797.111, 678700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6787]'); insert into test_proxima_be_restart_with_full_stage values(6788, 'name6788', 6798.111, 678800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6788]'); insert into test_proxima_be_restart_with_full_stage values(6789, 'name6789', 6799.111, 678900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6789]'); insert into test_proxima_be_restart_with_full_stage values(6790, 'name6790', 6800.111, 679000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6790]'); insert into test_proxima_be_restart_with_full_stage values(6791, 'name6791', 6801.111, 679100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6791]'); insert into test_proxima_be_restart_with_full_stage values(6792, 'name6792', 6802.111, 679200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6792]'); insert into test_proxima_be_restart_with_full_stage values(6793, 'name6793', 6803.111, 679300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6793]'); insert into test_proxima_be_restart_with_full_stage values(6794, 'name6794', 6804.111, 679400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6794]'); insert into test_proxima_be_restart_with_full_stage values(6795, 'name6795', 6805.111, 679500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6795]'); insert into test_proxima_be_restart_with_full_stage values(6796, 'name6796', 6806.111, 679600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6796]'); insert into test_proxima_be_restart_with_full_stage values(6797, 'name6797', 6807.111, 679700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6797]'); insert into test_proxima_be_restart_with_full_stage values(6798, 'name6798', 6808.111, 679800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6798]'); insert into test_proxima_be_restart_with_full_stage values(6799, 'name6799', 6809.111, 679900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6799]'); insert into test_proxima_be_restart_with_full_stage values(6800, 'name6800', 6810.111, 680000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6800]'); insert into test_proxima_be_restart_with_full_stage values(6801, 'name6801', 6811.111, 680100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6801]'); insert into test_proxima_be_restart_with_full_stage values(6802, 'name6802', 6812.111, 680200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6802]'); insert into test_proxima_be_restart_with_full_stage values(6803, 'name6803', 6813.111, 680300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6803]'); insert into test_proxima_be_restart_with_full_stage values(6804, 'name6804', 6814.111, 680400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6804]'); insert into test_proxima_be_restart_with_full_stage values(6805, 'name6805', 6815.111, 680500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6805]'); insert into test_proxima_be_restart_with_full_stage values(6806, 'name6806', 6816.111, 680600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6806]'); insert into test_proxima_be_restart_with_full_stage values(6807, 'name6807', 6817.111, 680700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6807]'); insert into test_proxima_be_restart_with_full_stage values(6808, 'name6808', 6818.111, 680800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6808]'); insert into test_proxima_be_restart_with_full_stage values(6809, 'name6809', 6819.111, 680900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6809]'); insert into test_proxima_be_restart_with_full_stage values(6810, 'name6810', 6820.111, 681000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6810]'); insert into test_proxima_be_restart_with_full_stage values(6811, 'name6811', 6821.111, 681100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6811]'); insert into test_proxima_be_restart_with_full_stage values(6812, 'name6812', 6822.111, 681200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6812]'); insert into test_proxima_be_restart_with_full_stage values(6813, 'name6813', 6823.111, 681300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6813]'); insert into test_proxima_be_restart_with_full_stage values(6814, 'name6814', 6824.111, 681400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6814]'); insert into test_proxima_be_restart_with_full_stage values(6815, 'name6815', 6825.111, 681500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6815]'); insert into test_proxima_be_restart_with_full_stage values(6816, 'name6816', 6826.111, 681600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6816]'); insert into test_proxima_be_restart_with_full_stage values(6817, 'name6817', 6827.111, 681700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6817]'); insert into test_proxima_be_restart_with_full_stage values(6818, 'name6818', 6828.111, 681800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6818]'); insert into test_proxima_be_restart_with_full_stage values(6819, 'name6819', 6829.111, 681900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6819]'); insert into test_proxima_be_restart_with_full_stage values(6820, 'name6820', 6830.111, 682000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6820]'); insert into test_proxima_be_restart_with_full_stage values(6821, 'name6821', 6831.111, 682100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6821]'); insert into test_proxima_be_restart_with_full_stage values(6822, 'name6822', 6832.111, 682200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6822]'); insert into test_proxima_be_restart_with_full_stage values(6823, 'name6823', 6833.111, 682300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6823]'); insert into test_proxima_be_restart_with_full_stage values(6824, 'name6824', 6834.111, 682400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6824]'); insert into test_proxima_be_restart_with_full_stage values(6825, 'name6825', 6835.111, 682500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6825]'); insert into test_proxima_be_restart_with_full_stage values(6826, 'name6826', 6836.111, 682600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6826]'); insert into test_proxima_be_restart_with_full_stage values(6827, 'name6827', 6837.111, 682700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6827]'); insert into test_proxima_be_restart_with_full_stage values(6828, 'name6828', 6838.111, 682800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6828]'); insert into test_proxima_be_restart_with_full_stage values(6829, 'name6829', 6839.111, 682900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6829]'); insert into test_proxima_be_restart_with_full_stage values(6830, 'name6830', 6840.111, 683000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6830]'); insert into test_proxima_be_restart_with_full_stage values(6831, 'name6831', 6841.111, 683100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6831]'); insert into test_proxima_be_restart_with_full_stage values(6832, 'name6832', 6842.111, 683200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6832]'); insert into test_proxima_be_restart_with_full_stage values(6833, 'name6833', 6843.111, 683300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6833]'); insert into test_proxima_be_restart_with_full_stage values(6834, 'name6834', 6844.111, 683400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6834]'); insert into test_proxima_be_restart_with_full_stage values(6835, 'name6835', 6845.111, 683500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6835]'); insert into test_proxima_be_restart_with_full_stage values(6836, 'name6836', 6846.111, 683600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6836]'); insert into test_proxima_be_restart_with_full_stage values(6837, 'name6837', 6847.111, 683700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6837]'); insert into test_proxima_be_restart_with_full_stage values(6838, 'name6838', 6848.111, 683800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6838]'); insert into test_proxima_be_restart_with_full_stage values(6839, 'name6839', 6849.111, 683900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6839]'); insert into test_proxima_be_restart_with_full_stage values(6840, 'name6840', 6850.111, 684000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6840]'); insert into test_proxima_be_restart_with_full_stage values(6841, 'name6841', 6851.111, 684100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6841]'); insert into test_proxima_be_restart_with_full_stage values(6842, 'name6842', 6852.111, 684200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6842]'); insert into test_proxima_be_restart_with_full_stage values(6843, 'name6843', 6853.111, 684300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6843]'); insert into test_proxima_be_restart_with_full_stage values(6844, 'name6844', 6854.111, 684400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6844]'); insert into test_proxima_be_restart_with_full_stage values(6845, 'name6845', 6855.111, 684500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6845]'); insert into test_proxima_be_restart_with_full_stage values(6846, 'name6846', 6856.111, 684600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6846]'); insert into test_proxima_be_restart_with_full_stage values(6847, 'name6847', 6857.111, 684700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6847]'); insert into test_proxima_be_restart_with_full_stage values(6848, 'name6848', 6858.111, 684800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6848]'); insert into test_proxima_be_restart_with_full_stage values(6849, 'name6849', 6859.111, 684900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6849]'); insert into test_proxima_be_restart_with_full_stage values(6850, 'name6850', 6860.111, 685000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6850]'); insert into test_proxima_be_restart_with_full_stage values(6851, 'name6851', 6861.111, 685100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6851]'); insert into test_proxima_be_restart_with_full_stage values(6852, 'name6852', 6862.111, 685200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6852]'); insert into test_proxima_be_restart_with_full_stage values(6853, 'name6853', 6863.111, 685300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6853]'); insert into test_proxima_be_restart_with_full_stage values(6854, 'name6854', 6864.111, 685400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6854]'); insert into test_proxima_be_restart_with_full_stage values(6855, 'name6855', 6865.111, 685500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6855]'); insert into test_proxima_be_restart_with_full_stage values(6856, 'name6856', 6866.111, 685600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6856]'); insert into test_proxima_be_restart_with_full_stage values(6857, 'name6857', 6867.111, 685700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6857]'); insert into test_proxima_be_restart_with_full_stage values(6858, 'name6858', 6868.111, 685800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6858]'); insert into test_proxima_be_restart_with_full_stage values(6859, 'name6859', 6869.111, 685900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6859]'); insert into test_proxima_be_restart_with_full_stage values(6860, 'name6860', 6870.111, 686000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6860]'); insert into test_proxima_be_restart_with_full_stage values(6861, 'name6861', 6871.111, 686100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6861]'); insert into test_proxima_be_restart_with_full_stage values(6862, 'name6862', 6872.111, 686200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6862]'); insert into test_proxima_be_restart_with_full_stage values(6863, 'name6863', 6873.111, 686300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6863]'); insert into test_proxima_be_restart_with_full_stage values(6864, 'name6864', 6874.111, 686400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6864]'); insert into test_proxima_be_restart_with_full_stage values(6865, 'name6865', 6875.111, 686500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6865]'); insert into test_proxima_be_restart_with_full_stage values(6866, 'name6866', 6876.111, 686600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6866]'); insert into test_proxima_be_restart_with_full_stage values(6867, 'name6867', 6877.111, 686700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6867]'); insert into test_proxima_be_restart_with_full_stage values(6868, 'name6868', 6878.111, 686800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6868]'); insert into test_proxima_be_restart_with_full_stage values(6869, 'name6869', 6879.111, 686900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6869]'); insert into test_proxima_be_restart_with_full_stage values(6870, 'name6870', 6880.111, 687000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6870]'); insert into test_proxima_be_restart_with_full_stage values(6871, 'name6871', 6881.111, 687100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6871]'); insert into test_proxima_be_restart_with_full_stage values(6872, 'name6872', 6882.111, 687200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6872]'); insert into test_proxima_be_restart_with_full_stage values(6873, 'name6873', 6883.111, 687300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6873]'); insert into test_proxima_be_restart_with_full_stage values(6874, 'name6874', 6884.111, 687400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6874]'); insert into test_proxima_be_restart_with_full_stage values(6875, 'name6875', 6885.111, 687500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6875]'); insert into test_proxima_be_restart_with_full_stage values(6876, 'name6876', 6886.111, 687600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6876]'); insert into test_proxima_be_restart_with_full_stage values(6877, 'name6877', 6887.111, 687700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6877]'); insert into test_proxima_be_restart_with_full_stage values(6878, 'name6878', 6888.111, 687800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6878]'); insert into test_proxima_be_restart_with_full_stage values(6879, 'name6879', 6889.111, 687900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6879]'); insert into test_proxima_be_restart_with_full_stage values(6880, 'name6880', 6890.111, 688000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6880]'); insert into test_proxima_be_restart_with_full_stage values(6881, 'name6881', 6891.111, 688100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6881]'); insert into test_proxima_be_restart_with_full_stage values(6882, 'name6882', 6892.111, 688200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6882]'); insert into test_proxima_be_restart_with_full_stage values(6883, 'name6883', 6893.111, 688300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6883]'); insert into test_proxima_be_restart_with_full_stage values(6884, 'name6884', 6894.111, 688400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6884]'); insert into test_proxima_be_restart_with_full_stage values(6885, 'name6885', 6895.111, 688500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6885]'); insert into test_proxima_be_restart_with_full_stage values(6886, 'name6886', 6896.111, 688600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6886]'); insert into test_proxima_be_restart_with_full_stage values(6887, 'name6887', 6897.111, 688700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6887]'); insert into test_proxima_be_restart_with_full_stage values(6888, 'name6888', 6898.111, 688800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6888]'); insert into test_proxima_be_restart_with_full_stage values(6889, 'name6889', 6899.111, 688900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6889]'); insert into test_proxima_be_restart_with_full_stage values(6890, 'name6890', 6900.111, 689000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6890]'); insert into test_proxima_be_restart_with_full_stage values(6891, 'name6891', 6901.111, 689100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6891]'); insert into test_proxima_be_restart_with_full_stage values(6892, 'name6892', 6902.111, 689200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6892]'); insert into test_proxima_be_restart_with_full_stage values(6893, 'name6893', 6903.111, 689300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6893]'); insert into test_proxima_be_restart_with_full_stage values(6894, 'name6894', 6904.111, 689400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6894]'); insert into test_proxima_be_restart_with_full_stage values(6895, 'name6895', 6905.111, 689500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6895]'); insert into test_proxima_be_restart_with_full_stage values(6896, 'name6896', 6906.111, 689600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6896]'); insert into test_proxima_be_restart_with_full_stage values(6897, 'name6897', 6907.111, 689700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6897]'); insert into test_proxima_be_restart_with_full_stage values(6898, 'name6898', 6908.111, 689800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6898]'); insert into test_proxima_be_restart_with_full_stage values(6899, 'name6899', 6909.111, 689900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6899]'); insert into test_proxima_be_restart_with_full_stage values(6900, 'name6900', 6910.111, 690000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6900]'); insert into test_proxima_be_restart_with_full_stage values(6901, 'name6901', 6911.111, 690100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6901]'); insert into test_proxima_be_restart_with_full_stage values(6902, 'name6902', 6912.111, 690200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6902]'); insert into test_proxima_be_restart_with_full_stage values(6903, 'name6903', 6913.111, 690300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6903]'); insert into test_proxima_be_restart_with_full_stage values(6904, 'name6904', 6914.111, 690400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6904]'); insert into test_proxima_be_restart_with_full_stage values(6905, 'name6905', 6915.111, 690500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6905]'); insert into test_proxima_be_restart_with_full_stage values(6906, 'name6906', 6916.111, 690600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6906]'); insert into test_proxima_be_restart_with_full_stage values(6907, 'name6907', 6917.111, 690700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6907]'); insert into test_proxima_be_restart_with_full_stage values(6908, 'name6908', 6918.111, 690800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6908]'); insert into test_proxima_be_restart_with_full_stage values(6909, 'name6909', 6919.111, 690900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6909]'); insert into test_proxima_be_restart_with_full_stage values(6910, 'name6910', 6920.111, 691000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6910]'); insert into test_proxima_be_restart_with_full_stage values(6911, 'name6911', 6921.111, 691100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6911]'); insert into test_proxima_be_restart_with_full_stage values(6912, 'name6912', 6922.111, 691200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6912]'); insert into test_proxima_be_restart_with_full_stage values(6913, 'name6913', 6923.111, 691300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6913]'); insert into test_proxima_be_restart_with_full_stage values(6914, 'name6914', 6924.111, 691400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6914]'); insert into test_proxima_be_restart_with_full_stage values(6915, 'name6915', 6925.111, 691500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6915]'); insert into test_proxima_be_restart_with_full_stage values(6916, 'name6916', 6926.111, 691600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6916]'); insert into test_proxima_be_restart_with_full_stage values(6917, 'name6917', 6927.111, 691700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6917]'); insert into test_proxima_be_restart_with_full_stage values(6918, 'name6918', 6928.111, 691800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6918]'); insert into test_proxima_be_restart_with_full_stage values(6919, 'name6919', 6929.111, 691900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6919]'); insert into test_proxima_be_restart_with_full_stage values(6920, 'name6920', 6930.111, 692000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6920]'); insert into test_proxima_be_restart_with_full_stage values(6921, 'name6921', 6931.111, 692100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6921]'); insert into test_proxima_be_restart_with_full_stage values(6922, 'name6922', 6932.111, 692200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6922]'); insert into test_proxima_be_restart_with_full_stage values(6923, 'name6923', 6933.111, 692300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6923]'); insert into test_proxima_be_restart_with_full_stage values(6924, 'name6924', 6934.111, 692400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6924]'); insert into test_proxima_be_restart_with_full_stage values(6925, 'name6925', 6935.111, 692500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6925]'); insert into test_proxima_be_restart_with_full_stage values(6926, 'name6926', 6936.111, 692600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6926]'); insert into test_proxima_be_restart_with_full_stage values(6927, 'name6927', 6937.111, 692700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6927]'); insert into test_proxima_be_restart_with_full_stage values(6928, 'name6928', 6938.111, 692800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6928]'); insert into test_proxima_be_restart_with_full_stage values(6929, 'name6929', 6939.111, 692900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6929]'); insert into test_proxima_be_restart_with_full_stage values(6930, 'name6930', 6940.111, 693000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6930]'); insert into test_proxima_be_restart_with_full_stage values(6931, 'name6931', 6941.111, 693100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6931]'); insert into test_proxima_be_restart_with_full_stage values(6932, 'name6932', 6942.111, 693200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6932]'); insert into test_proxima_be_restart_with_full_stage values(6933, 'name6933', 6943.111, 693300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6933]'); insert into test_proxima_be_restart_with_full_stage values(6934, 'name6934', 6944.111, 693400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6934]'); insert into test_proxima_be_restart_with_full_stage values(6935, 'name6935', 6945.111, 693500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6935]'); insert into test_proxima_be_restart_with_full_stage values(6936, 'name6936', 6946.111, 693600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6936]'); insert into test_proxima_be_restart_with_full_stage values(6937, 'name6937', 6947.111, 693700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6937]'); insert into test_proxima_be_restart_with_full_stage values(6938, 'name6938', 6948.111, 693800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6938]'); insert into test_proxima_be_restart_with_full_stage values(6939, 'name6939', 6949.111, 693900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6939]'); insert into test_proxima_be_restart_with_full_stage values(6940, 'name6940', 6950.111, 694000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6940]'); insert into test_proxima_be_restart_with_full_stage values(6941, 'name6941', 6951.111, 694100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6941]'); insert into test_proxima_be_restart_with_full_stage values(6942, 'name6942', 6952.111, 694200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6942]'); insert into test_proxima_be_restart_with_full_stage values(6943, 'name6943', 6953.111, 694300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6943]'); insert into test_proxima_be_restart_with_full_stage values(6944, 'name6944', 6954.111, 694400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6944]'); insert into test_proxima_be_restart_with_full_stage values(6945, 'name6945', 6955.111, 694500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6945]'); insert into test_proxima_be_restart_with_full_stage values(6946, 'name6946', 6956.111, 694600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6946]'); insert into test_proxima_be_restart_with_full_stage values(6947, 'name6947', 6957.111, 694700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6947]'); insert into test_proxima_be_restart_with_full_stage values(6948, 'name6948', 6958.111, 694800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6948]'); insert into test_proxima_be_restart_with_full_stage values(6949, 'name6949', 6959.111, 694900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6949]'); insert into test_proxima_be_restart_with_full_stage values(6950, 'name6950', 6960.111, 695000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6950]'); insert into test_proxima_be_restart_with_full_stage values(6951, 'name6951', 6961.111, 695100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6951]'); insert into test_proxima_be_restart_with_full_stage values(6952, 'name6952', 6962.111, 695200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6952]'); insert into test_proxima_be_restart_with_full_stage values(6953, 'name6953', 6963.111, 695300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6953]'); insert into test_proxima_be_restart_with_full_stage values(6954, 'name6954', 6964.111, 695400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6954]'); insert into test_proxima_be_restart_with_full_stage values(6955, 'name6955', 6965.111, 695500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6955]'); insert into test_proxima_be_restart_with_full_stage values(6956, 'name6956', 6966.111, 695600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6956]'); insert into test_proxima_be_restart_with_full_stage values(6957, 'name6957', 6967.111, 695700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6957]'); insert into test_proxima_be_restart_with_full_stage values(6958, 'name6958', 6968.111, 695800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6958]'); insert into test_proxima_be_restart_with_full_stage values(6959, 'name6959', 6969.111, 695900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6959]'); insert into test_proxima_be_restart_with_full_stage values(6960, 'name6960', 6970.111, 696000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6960]'); insert into test_proxima_be_restart_with_full_stage values(6961, 'name6961', 6971.111, 696100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6961]'); insert into test_proxima_be_restart_with_full_stage values(6962, 'name6962', 6972.111, 696200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6962]'); insert into test_proxima_be_restart_with_full_stage values(6963, 'name6963', 6973.111, 696300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6963]'); insert into test_proxima_be_restart_with_full_stage values(6964, 'name6964', 6974.111, 696400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6964]'); insert into test_proxima_be_restart_with_full_stage values(6965, 'name6965', 6975.111, 696500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6965]'); insert into test_proxima_be_restart_with_full_stage values(6966, 'name6966', 6976.111, 696600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6966]'); insert into test_proxima_be_restart_with_full_stage values(6967, 'name6967', 6977.111, 696700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6967]'); insert into test_proxima_be_restart_with_full_stage values(6968, 'name6968', 6978.111, 696800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6968]'); insert into test_proxima_be_restart_with_full_stage values(6969, 'name6969', 6979.111, 696900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6969]'); insert into test_proxima_be_restart_with_full_stage values(6970, 'name6970', 6980.111, 697000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6970]'); insert into test_proxima_be_restart_with_full_stage values(6971, 'name6971', 6981.111, 697100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6971]'); insert into test_proxima_be_restart_with_full_stage values(6972, 'name6972', 6982.111, 697200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6972]'); insert into test_proxima_be_restart_with_full_stage values(6973, 'name6973', 6983.111, 697300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6973]'); insert into test_proxima_be_restart_with_full_stage values(6974, 'name6974', 6984.111, 697400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6974]'); insert into test_proxima_be_restart_with_full_stage values(6975, 'name6975', 6985.111, 697500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6975]'); insert into test_proxima_be_restart_with_full_stage values(6976, 'name6976', 6986.111, 697600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6976]'); insert into test_proxima_be_restart_with_full_stage values(6977, 'name6977', 6987.111, 697700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6977]'); insert into test_proxima_be_restart_with_full_stage values(6978, 'name6978', 6988.111, 697800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6978]'); insert into test_proxima_be_restart_with_full_stage values(6979, 'name6979', 6989.111, 697900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6979]'); insert into test_proxima_be_restart_with_full_stage values(6980, 'name6980', 6990.111, 698000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6980]'); insert into test_proxima_be_restart_with_full_stage values(6981, 'name6981', 6991.111, 698100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6981]'); insert into test_proxima_be_restart_with_full_stage values(6982, 'name6982', 6992.111, 698200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6982]'); insert into test_proxima_be_restart_with_full_stage values(6983, 'name6983', 6993.111, 698300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6983]'); insert into test_proxima_be_restart_with_full_stage values(6984, 'name6984', 6994.111, 698400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6984]'); insert into test_proxima_be_restart_with_full_stage values(6985, 'name6985', 6995.111, 698500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6985]'); insert into test_proxima_be_restart_with_full_stage values(6986, 'name6986', 6996.111, 698600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6986]'); insert into test_proxima_be_restart_with_full_stage values(6987, 'name6987', 6997.111, 698700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6987]'); insert into test_proxima_be_restart_with_full_stage values(6988, 'name6988', 6998.111, 698800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6988]'); insert into test_proxima_be_restart_with_full_stage values(6989, 'name6989', 6999.111, 698900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6989]'); insert into test_proxima_be_restart_with_full_stage values(6990, 'name6990', 7000.111, 699000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6990]'); insert into test_proxima_be_restart_with_full_stage values(6991, 'name6991', 7001.111, 699100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6991]'); insert into test_proxima_be_restart_with_full_stage values(6992, 'name6992', 7002.111, 699200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6992]'); insert into test_proxima_be_restart_with_full_stage values(6993, 'name6993', 7003.111, 699300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6993]'); insert into test_proxima_be_restart_with_full_stage values(6994, 'name6994', 7004.111, 699400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6994]'); insert into test_proxima_be_restart_with_full_stage values(6995, 'name6995', 7005.111, 699500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6995]'); insert into test_proxima_be_restart_with_full_stage values(6996, 'name6996', 7006.111, 699600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6996]'); insert into test_proxima_be_restart_with_full_stage values(6997, 'name6997', 7007.111, 699700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6997]'); insert into test_proxima_be_restart_with_full_stage values(6998, 'name6998', 7008.111, 699800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6998]'); insert into test_proxima_be_restart_with_full_stage values(6999, 'name6999', 7009.111, 699900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6999]'); insert into test_proxima_be_restart_with_full_stage values(7000, 'name7000', 7010.111, 700000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7000]'); insert into test_proxima_be_restart_with_full_stage values(7001, 'name7001', 7011.111, 700100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7001]'); insert into test_proxima_be_restart_with_full_stage values(7002, 'name7002', 7012.111, 700200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7002]'); insert into test_proxima_be_restart_with_full_stage values(7003, 'name7003', 7013.111, 700300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7003]'); insert into test_proxima_be_restart_with_full_stage values(7004, 'name7004', 7014.111, 700400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7004]'); insert into test_proxima_be_restart_with_full_stage values(7005, 'name7005', 7015.111, 700500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7005]'); insert into test_proxima_be_restart_with_full_stage values(7006, 'name7006', 7016.111, 700600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7006]'); insert into test_proxima_be_restart_with_full_stage values(7007, 'name7007', 7017.111, 700700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7007]'); insert into test_proxima_be_restart_with_full_stage values(7008, 'name7008', 7018.111, 700800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7008]'); insert into test_proxima_be_restart_with_full_stage values(7009, 'name7009', 7019.111, 700900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7009]'); insert into test_proxima_be_restart_with_full_stage values(7010, 'name7010', 7020.111, 701000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7010]'); insert into test_proxima_be_restart_with_full_stage values(7011, 'name7011', 7021.111, 701100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7011]'); insert into test_proxima_be_restart_with_full_stage values(7012, 'name7012', 7022.111, 701200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7012]'); insert into test_proxima_be_restart_with_full_stage values(7013, 'name7013', 7023.111, 701300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7013]'); insert into test_proxima_be_restart_with_full_stage values(7014, 'name7014', 7024.111, 701400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7014]'); insert into test_proxima_be_restart_with_full_stage values(7015, 'name7015', 7025.111, 701500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7015]'); insert into test_proxima_be_restart_with_full_stage values(7016, 'name7016', 7026.111, 701600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7016]'); insert into test_proxima_be_restart_with_full_stage values(7017, 'name7017', 7027.111, 701700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7017]'); insert into test_proxima_be_restart_with_full_stage values(7018, 'name7018', 7028.111, 701800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7018]'); insert into test_proxima_be_restart_with_full_stage values(7019, 'name7019', 7029.111, 701900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7019]'); insert into test_proxima_be_restart_with_full_stage values(7020, 'name7020', 7030.111, 702000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7020]'); insert into test_proxima_be_restart_with_full_stage values(7021, 'name7021', 7031.111, 702100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7021]'); insert into test_proxima_be_restart_with_full_stage values(7022, 'name7022', 7032.111, 702200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7022]'); insert into test_proxima_be_restart_with_full_stage values(7023, 'name7023', 7033.111, 702300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7023]'); insert into test_proxima_be_restart_with_full_stage values(7024, 'name7024', 7034.111, 702400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7024]'); insert into test_proxima_be_restart_with_full_stage values(7025, 'name7025', 7035.111, 702500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7025]'); insert into test_proxima_be_restart_with_full_stage values(7026, 'name7026', 7036.111, 702600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7026]'); insert into test_proxima_be_restart_with_full_stage values(7027, 'name7027', 7037.111, 702700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7027]'); insert into test_proxima_be_restart_with_full_stage values(7028, 'name7028', 7038.111, 702800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7028]'); insert into test_proxima_be_restart_with_full_stage values(7029, 'name7029', 7039.111, 702900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7029]'); insert into test_proxima_be_restart_with_full_stage values(7030, 'name7030', 7040.111, 703000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7030]'); insert into test_proxima_be_restart_with_full_stage values(7031, 'name7031', 7041.111, 703100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7031]'); insert into test_proxima_be_restart_with_full_stage values(7032, 'name7032', 7042.111, 703200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7032]'); insert into test_proxima_be_restart_with_full_stage values(7033, 'name7033', 7043.111, 703300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7033]'); insert into test_proxima_be_restart_with_full_stage values(7034, 'name7034', 7044.111, 703400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7034]'); insert into test_proxima_be_restart_with_full_stage values(7035, 'name7035', 7045.111, 703500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7035]'); insert into test_proxima_be_restart_with_full_stage values(7036, 'name7036', 7046.111, 703600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7036]'); insert into test_proxima_be_restart_with_full_stage values(7037, 'name7037', 7047.111, 703700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7037]'); insert into test_proxima_be_restart_with_full_stage values(7038, 'name7038', 7048.111, 703800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7038]'); insert into test_proxima_be_restart_with_full_stage values(7039, 'name7039', 7049.111, 703900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7039]'); insert into test_proxima_be_restart_with_full_stage values(7040, 'name7040', 7050.111, 704000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7040]'); insert into test_proxima_be_restart_with_full_stage values(7041, 'name7041', 7051.111, 704100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7041]'); insert into test_proxima_be_restart_with_full_stage values(7042, 'name7042', 7052.111, 704200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7042]'); insert into test_proxima_be_restart_with_full_stage values(7043, 'name7043', 7053.111, 704300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7043]'); insert into test_proxima_be_restart_with_full_stage values(7044, 'name7044', 7054.111, 704400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7044]'); insert into test_proxima_be_restart_with_full_stage values(7045, 'name7045', 7055.111, 704500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7045]'); insert into test_proxima_be_restart_with_full_stage values(7046, 'name7046', 7056.111, 704600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7046]'); insert into test_proxima_be_restart_with_full_stage values(7047, 'name7047', 7057.111, 704700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7047]'); insert into test_proxima_be_restart_with_full_stage values(7048, 'name7048', 7058.111, 704800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7048]'); insert into test_proxima_be_restart_with_full_stage values(7049, 'name7049', 7059.111, 704900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7049]'); insert into test_proxima_be_restart_with_full_stage values(7050, 'name7050', 7060.111, 705000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7050]'); insert into test_proxima_be_restart_with_full_stage values(7051, 'name7051', 7061.111, 705100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7051]'); insert into test_proxima_be_restart_with_full_stage values(7052, 'name7052', 7062.111, 705200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7052]'); insert into test_proxima_be_restart_with_full_stage values(7053, 'name7053', 7063.111, 705300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7053]'); insert into test_proxima_be_restart_with_full_stage values(7054, 'name7054', 7064.111, 705400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7054]'); insert into test_proxima_be_restart_with_full_stage values(7055, 'name7055', 7065.111, 705500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7055]'); insert into test_proxima_be_restart_with_full_stage values(7056, 'name7056', 7066.111, 705600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7056]'); insert into test_proxima_be_restart_with_full_stage values(7057, 'name7057', 7067.111, 705700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7057]'); insert into test_proxima_be_restart_with_full_stage values(7058, 'name7058', 7068.111, 705800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7058]'); insert into test_proxima_be_restart_with_full_stage values(7059, 'name7059', 7069.111, 705900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7059]'); insert into test_proxima_be_restart_with_full_stage values(7060, 'name7060', 7070.111, 706000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7060]'); insert into test_proxima_be_restart_with_full_stage values(7061, 'name7061', 7071.111, 706100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7061]'); insert into test_proxima_be_restart_with_full_stage values(7062, 'name7062', 7072.111, 706200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7062]'); insert into test_proxima_be_restart_with_full_stage values(7063, 'name7063', 7073.111, 706300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7063]'); insert into test_proxima_be_restart_with_full_stage values(7064, 'name7064', 7074.111, 706400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7064]'); insert into test_proxima_be_restart_with_full_stage values(7065, 'name7065', 7075.111, 706500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7065]'); insert into test_proxima_be_restart_with_full_stage values(7066, 'name7066', 7076.111, 706600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7066]'); insert into test_proxima_be_restart_with_full_stage values(7067, 'name7067', 7077.111, 706700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7067]'); insert into test_proxima_be_restart_with_full_stage values(7068, 'name7068', 7078.111, 706800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7068]'); insert into test_proxima_be_restart_with_full_stage values(7069, 'name7069', 7079.111, 706900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7069]'); insert into test_proxima_be_restart_with_full_stage values(7070, 'name7070', 7080.111, 707000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7070]'); insert into test_proxima_be_restart_with_full_stage values(7071, 'name7071', 7081.111, 707100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7071]'); insert into test_proxima_be_restart_with_full_stage values(7072, 'name7072', 7082.111, 707200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7072]'); insert into test_proxima_be_restart_with_full_stage values(7073, 'name7073', 7083.111, 707300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7073]'); insert into test_proxima_be_restart_with_full_stage values(7074, 'name7074', 7084.111, 707400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7074]'); insert into test_proxima_be_restart_with_full_stage values(7075, 'name7075', 7085.111, 707500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7075]'); insert into test_proxima_be_restart_with_full_stage values(7076, 'name7076', 7086.111, 707600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7076]'); insert into test_proxima_be_restart_with_full_stage values(7077, 'name7077', 7087.111, 707700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7077]'); insert into test_proxima_be_restart_with_full_stage values(7078, 'name7078', 7088.111, 707800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7078]'); insert into test_proxima_be_restart_with_full_stage values(7079, 'name7079', 7089.111, 707900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7079]'); insert into test_proxima_be_restart_with_full_stage values(7080, 'name7080', 7090.111, 708000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7080]'); insert into test_proxima_be_restart_with_full_stage values(7081, 'name7081', 7091.111, 708100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7081]'); insert into test_proxima_be_restart_with_full_stage values(7082, 'name7082', 7092.111, 708200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7082]'); insert into test_proxima_be_restart_with_full_stage values(7083, 'name7083', 7093.111, 708300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7083]'); insert into test_proxima_be_restart_with_full_stage values(7084, 'name7084', 7094.111, 708400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7084]'); insert into test_proxima_be_restart_with_full_stage values(7085, 'name7085', 7095.111, 708500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7085]'); insert into test_proxima_be_restart_with_full_stage values(7086, 'name7086', 7096.111, 708600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7086]'); insert into test_proxima_be_restart_with_full_stage values(7087, 'name7087', 7097.111, 708700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7087]'); insert into test_proxima_be_restart_with_full_stage values(7088, 'name7088', 7098.111, 708800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7088]'); insert into test_proxima_be_restart_with_full_stage values(7089, 'name7089', 7099.111, 708900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7089]'); insert into test_proxima_be_restart_with_full_stage values(7090, 'name7090', 7100.111, 709000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7090]'); insert into test_proxima_be_restart_with_full_stage values(7091, 'name7091', 7101.111, 709100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7091]'); insert into test_proxima_be_restart_with_full_stage values(7092, 'name7092', 7102.111, 709200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7092]'); insert into test_proxima_be_restart_with_full_stage values(7093, 'name7093', 7103.111, 709300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7093]'); insert into test_proxima_be_restart_with_full_stage values(7094, 'name7094', 7104.111, 709400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7094]'); insert into test_proxima_be_restart_with_full_stage values(7095, 'name7095', 7105.111, 709500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7095]'); insert into test_proxima_be_restart_with_full_stage values(7096, 'name7096', 7106.111, 709600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7096]'); insert into test_proxima_be_restart_with_full_stage values(7097, 'name7097', 7107.111, 709700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7097]'); insert into test_proxima_be_restart_with_full_stage values(7098, 'name7098', 7108.111, 709800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7098]'); insert into test_proxima_be_restart_with_full_stage values(7099, 'name7099', 7109.111, 709900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7099]'); insert into test_proxima_be_restart_with_full_stage values(7100, 'name7100', 7110.111, 710000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7100]'); insert into test_proxima_be_restart_with_full_stage values(7101, 'name7101', 7111.111, 710100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7101]'); insert into test_proxima_be_restart_with_full_stage values(7102, 'name7102', 7112.111, 710200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7102]'); insert into test_proxima_be_restart_with_full_stage values(7103, 'name7103', 7113.111, 710300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7103]'); insert into test_proxima_be_restart_with_full_stage values(7104, 'name7104', 7114.111, 710400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7104]'); insert into test_proxima_be_restart_with_full_stage values(7105, 'name7105', 7115.111, 710500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7105]'); insert into test_proxima_be_restart_with_full_stage values(7106, 'name7106', 7116.111, 710600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7106]'); insert into test_proxima_be_restart_with_full_stage values(7107, 'name7107', 7117.111, 710700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7107]'); insert into test_proxima_be_restart_with_full_stage values(7108, 'name7108', 7118.111, 710800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7108]'); insert into test_proxima_be_restart_with_full_stage values(7109, 'name7109', 7119.111, 710900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7109]'); insert into test_proxima_be_restart_with_full_stage values(7110, 'name7110', 7120.111, 711000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7110]'); insert into test_proxima_be_restart_with_full_stage values(7111, 'name7111', 7121.111, 711100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7111]'); insert into test_proxima_be_restart_with_full_stage values(7112, 'name7112', 7122.111, 711200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7112]'); insert into test_proxima_be_restart_with_full_stage values(7113, 'name7113', 7123.111, 711300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7113]'); insert into test_proxima_be_restart_with_full_stage values(7114, 'name7114', 7124.111, 711400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7114]'); insert into test_proxima_be_restart_with_full_stage values(7115, 'name7115', 7125.111, 711500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7115]'); insert into test_proxima_be_restart_with_full_stage values(7116, 'name7116', 7126.111, 711600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7116]'); insert into test_proxima_be_restart_with_full_stage values(7117, 'name7117', 7127.111, 711700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7117]'); insert into test_proxima_be_restart_with_full_stage values(7118, 'name7118', 7128.111, 711800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7118]'); insert into test_proxima_be_restart_with_full_stage values(7119, 'name7119', 7129.111, 711900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7119]'); insert into test_proxima_be_restart_with_full_stage values(7120, 'name7120', 7130.111, 712000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7120]'); insert into test_proxima_be_restart_with_full_stage values(7121, 'name7121', 7131.111, 712100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7121]'); insert into test_proxima_be_restart_with_full_stage values(7122, 'name7122', 7132.111, 712200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7122]'); insert into test_proxima_be_restart_with_full_stage values(7123, 'name7123', 7133.111, 712300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7123]'); insert into test_proxima_be_restart_with_full_stage values(7124, 'name7124', 7134.111, 712400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7124]'); insert into test_proxima_be_restart_with_full_stage values(7125, 'name7125', 7135.111, 712500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7125]'); insert into test_proxima_be_restart_with_full_stage values(7126, 'name7126', 7136.111, 712600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7126]'); insert into test_proxima_be_restart_with_full_stage values(7127, 'name7127', 7137.111, 712700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7127]'); insert into test_proxima_be_restart_with_full_stage values(7128, 'name7128', 7138.111, 712800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7128]'); insert into test_proxima_be_restart_with_full_stage values(7129, 'name7129', 7139.111, 712900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7129]'); insert into test_proxima_be_restart_with_full_stage values(7130, 'name7130', 7140.111, 713000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7130]'); insert into test_proxima_be_restart_with_full_stage values(7131, 'name7131', 7141.111, 713100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7131]'); insert into test_proxima_be_restart_with_full_stage values(7132, 'name7132', 7142.111, 713200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7132]'); insert into test_proxima_be_restart_with_full_stage values(7133, 'name7133', 7143.111, 713300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7133]'); insert into test_proxima_be_restart_with_full_stage values(7134, 'name7134', 7144.111, 713400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7134]'); insert into test_proxima_be_restart_with_full_stage values(7135, 'name7135', 7145.111, 713500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7135]'); insert into test_proxima_be_restart_with_full_stage values(7136, 'name7136', 7146.111, 713600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7136]'); insert into test_proxima_be_restart_with_full_stage values(7137, 'name7137', 7147.111, 713700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7137]'); insert into test_proxima_be_restart_with_full_stage values(7138, 'name7138', 7148.111, 713800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7138]'); insert into test_proxima_be_restart_with_full_stage values(7139, 'name7139', 7149.111, 713900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7139]'); insert into test_proxima_be_restart_with_full_stage values(7140, 'name7140', 7150.111, 714000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7140]'); insert into test_proxima_be_restart_with_full_stage values(7141, 'name7141', 7151.111, 714100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7141]'); insert into test_proxima_be_restart_with_full_stage values(7142, 'name7142', 7152.111, 714200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7142]'); insert into test_proxima_be_restart_with_full_stage values(7143, 'name7143', 7153.111, 714300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7143]'); insert into test_proxima_be_restart_with_full_stage values(7144, 'name7144', 7154.111, 714400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7144]'); insert into test_proxima_be_restart_with_full_stage values(7145, 'name7145', 7155.111, 714500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7145]'); insert into test_proxima_be_restart_with_full_stage values(7146, 'name7146', 7156.111, 714600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7146]'); insert into test_proxima_be_restart_with_full_stage values(7147, 'name7147', 7157.111, 714700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7147]'); insert into test_proxima_be_restart_with_full_stage values(7148, 'name7148', 7158.111, 714800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7148]'); insert into test_proxima_be_restart_with_full_stage values(7149, 'name7149', 7159.111, 714900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7149]'); insert into test_proxima_be_restart_with_full_stage values(7150, 'name7150', 7160.111, 715000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7150]'); insert into test_proxima_be_restart_with_full_stage values(7151, 'name7151', 7161.111, 715100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7151]'); insert into test_proxima_be_restart_with_full_stage values(7152, 'name7152', 7162.111, 715200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7152]'); insert into test_proxima_be_restart_with_full_stage values(7153, 'name7153', 7163.111, 715300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7153]'); insert into test_proxima_be_restart_with_full_stage values(7154, 'name7154', 7164.111, 715400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7154]'); insert into test_proxima_be_restart_with_full_stage values(7155, 'name7155', 7165.111, 715500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7155]'); insert into test_proxima_be_restart_with_full_stage values(7156, 'name7156', 7166.111, 715600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7156]'); insert into test_proxima_be_restart_with_full_stage values(7157, 'name7157', 7167.111, 715700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7157]'); insert into test_proxima_be_restart_with_full_stage values(7158, 'name7158', 7168.111, 715800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7158]'); insert into test_proxima_be_restart_with_full_stage values(7159, 'name7159', 7169.111, 715900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7159]'); insert into test_proxima_be_restart_with_full_stage values(7160, 'name7160', 7170.111, 716000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7160]'); insert into test_proxima_be_restart_with_full_stage values(7161, 'name7161', 7171.111, 716100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7161]'); insert into test_proxima_be_restart_with_full_stage values(7162, 'name7162', 7172.111, 716200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7162]'); insert into test_proxima_be_restart_with_full_stage values(7163, 'name7163', 7173.111, 716300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7163]'); insert into test_proxima_be_restart_with_full_stage values(7164, 'name7164', 7174.111, 716400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7164]'); insert into test_proxima_be_restart_with_full_stage values(7165, 'name7165', 7175.111, 716500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7165]'); insert into test_proxima_be_restart_with_full_stage values(7166, 'name7166', 7176.111, 716600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7166]'); insert into test_proxima_be_restart_with_full_stage values(7167, 'name7167', 7177.111, 716700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7167]'); insert into test_proxima_be_restart_with_full_stage values(7168, 'name7168', 7178.111, 716800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7168]'); insert into test_proxima_be_restart_with_full_stage values(7169, 'name7169', 7179.111, 716900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7169]'); insert into test_proxima_be_restart_with_full_stage values(7170, 'name7170', 7180.111, 717000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7170]'); insert into test_proxima_be_restart_with_full_stage values(7171, 'name7171', 7181.111, 717100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7171]'); insert into test_proxima_be_restart_with_full_stage values(7172, 'name7172', 7182.111, 717200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7172]'); insert into test_proxima_be_restart_with_full_stage values(7173, 'name7173', 7183.111, 717300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7173]'); insert into test_proxima_be_restart_with_full_stage values(7174, 'name7174', 7184.111, 717400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7174]'); insert into test_proxima_be_restart_with_full_stage values(7175, 'name7175', 7185.111, 717500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7175]'); insert into test_proxima_be_restart_with_full_stage values(7176, 'name7176', 7186.111, 717600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7176]'); insert into test_proxima_be_restart_with_full_stage values(7177, 'name7177', 7187.111, 717700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7177]'); insert into test_proxima_be_restart_with_full_stage values(7178, 'name7178', 7188.111, 717800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7178]'); insert into test_proxima_be_restart_with_full_stage values(7179, 'name7179', 7189.111, 717900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7179]'); insert into test_proxima_be_restart_with_full_stage values(7180, 'name7180', 7190.111, 718000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7180]'); insert into test_proxima_be_restart_with_full_stage values(7181, 'name7181', 7191.111, 718100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7181]'); insert into test_proxima_be_restart_with_full_stage values(7182, 'name7182', 7192.111, 718200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7182]'); insert into test_proxima_be_restart_with_full_stage values(7183, 'name7183', 7193.111, 718300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7183]'); insert into test_proxima_be_restart_with_full_stage values(7184, 'name7184', 7194.111, 718400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7184]'); insert into test_proxima_be_restart_with_full_stage values(7185, 'name7185', 7195.111, 718500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7185]'); insert into test_proxima_be_restart_with_full_stage values(7186, 'name7186', 7196.111, 718600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7186]'); insert into test_proxima_be_restart_with_full_stage values(7187, 'name7187', 7197.111, 718700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7187]'); insert into test_proxima_be_restart_with_full_stage values(7188, 'name7188', 7198.111, 718800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7188]'); insert into test_proxima_be_restart_with_full_stage values(7189, 'name7189', 7199.111, 718900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7189]'); insert into test_proxima_be_restart_with_full_stage values(7190, 'name7190', 7200.111, 719000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7190]'); insert into test_proxima_be_restart_with_full_stage values(7191, 'name7191', 7201.111, 719100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7191]'); insert into test_proxima_be_restart_with_full_stage values(7192, 'name7192', 7202.111, 719200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7192]'); insert into test_proxima_be_restart_with_full_stage values(7193, 'name7193', 7203.111, 719300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7193]'); insert into test_proxima_be_restart_with_full_stage values(7194, 'name7194', 7204.111, 719400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7194]'); insert into test_proxima_be_restart_with_full_stage values(7195, 'name7195', 7205.111, 719500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7195]'); insert into test_proxima_be_restart_with_full_stage values(7196, 'name7196', 7206.111, 719600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7196]'); insert into test_proxima_be_restart_with_full_stage values(7197, 'name7197', 7207.111, 719700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7197]'); insert into test_proxima_be_restart_with_full_stage values(7198, 'name7198', 7208.111, 719800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7198]'); insert into test_proxima_be_restart_with_full_stage values(7199, 'name7199', 7209.111, 719900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7199]'); insert into test_proxima_be_restart_with_full_stage values(7200, 'name7200', 7210.111, 720000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7200]'); insert into test_proxima_be_restart_with_full_stage values(7201, 'name7201', 7211.111, 720100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7201]'); insert into test_proxima_be_restart_with_full_stage values(7202, 'name7202', 7212.111, 720200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7202]'); insert into test_proxima_be_restart_with_full_stage values(7203, 'name7203', 7213.111, 720300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7203]'); insert into test_proxima_be_restart_with_full_stage values(7204, 'name7204', 7214.111, 720400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7204]'); insert into test_proxima_be_restart_with_full_stage values(7205, 'name7205', 7215.111, 720500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7205]'); insert into test_proxima_be_restart_with_full_stage values(7206, 'name7206', 7216.111, 720600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7206]'); insert into test_proxima_be_restart_with_full_stage values(7207, 'name7207', 7217.111, 720700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7207]'); insert into test_proxima_be_restart_with_full_stage values(7208, 'name7208', 7218.111, 720800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7208]'); insert into test_proxima_be_restart_with_full_stage values(7209, 'name7209', 7219.111, 720900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7209]'); insert into test_proxima_be_restart_with_full_stage values(7210, 'name7210', 7220.111, 721000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7210]'); insert into test_proxima_be_restart_with_full_stage values(7211, 'name7211', 7221.111, 721100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7211]'); insert into test_proxima_be_restart_with_full_stage values(7212, 'name7212', 7222.111, 721200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7212]'); insert into test_proxima_be_restart_with_full_stage values(7213, 'name7213', 7223.111, 721300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7213]'); insert into test_proxima_be_restart_with_full_stage values(7214, 'name7214', 7224.111, 721400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7214]'); insert into test_proxima_be_restart_with_full_stage values(7215, 'name7215', 7225.111, 721500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7215]'); insert into test_proxima_be_restart_with_full_stage values(7216, 'name7216', 7226.111, 721600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7216]'); insert into test_proxima_be_restart_with_full_stage values(7217, 'name7217', 7227.111, 721700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7217]'); insert into test_proxima_be_restart_with_full_stage values(7218, 'name7218', 7228.111, 721800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7218]'); insert into test_proxima_be_restart_with_full_stage values(7219, 'name7219', 7229.111, 721900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7219]'); insert into test_proxima_be_restart_with_full_stage values(7220, 'name7220', 7230.111, 722000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7220]'); insert into test_proxima_be_restart_with_full_stage values(7221, 'name7221', 7231.111, 722100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7221]'); insert into test_proxima_be_restart_with_full_stage values(7222, 'name7222', 7232.111, 722200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7222]'); insert into test_proxima_be_restart_with_full_stage values(7223, 'name7223', 7233.111, 722300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7223]'); insert into test_proxima_be_restart_with_full_stage values(7224, 'name7224', 7234.111, 722400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7224]'); insert into test_proxima_be_restart_with_full_stage values(7225, 'name7225', 7235.111, 722500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7225]'); insert into test_proxima_be_restart_with_full_stage values(7226, 'name7226', 7236.111, 722600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7226]'); insert into test_proxima_be_restart_with_full_stage values(7227, 'name7227', 7237.111, 722700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7227]'); insert into test_proxima_be_restart_with_full_stage values(7228, 'name7228', 7238.111, 722800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7228]'); insert into test_proxima_be_restart_with_full_stage values(7229, 'name7229', 7239.111, 722900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7229]'); insert into test_proxima_be_restart_with_full_stage values(7230, 'name7230', 7240.111, 723000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7230]'); insert into test_proxima_be_restart_with_full_stage values(7231, 'name7231', 7241.111, 723100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7231]'); insert into test_proxima_be_restart_with_full_stage values(7232, 'name7232', 7242.111, 723200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7232]'); insert into test_proxima_be_restart_with_full_stage values(7233, 'name7233', 7243.111, 723300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7233]'); insert into test_proxima_be_restart_with_full_stage values(7234, 'name7234', 7244.111, 723400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7234]'); insert into test_proxima_be_restart_with_full_stage values(7235, 'name7235', 7245.111, 723500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7235]'); insert into test_proxima_be_restart_with_full_stage values(7236, 'name7236', 7246.111, 723600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7236]'); insert into test_proxima_be_restart_with_full_stage values(7237, 'name7237', 7247.111, 723700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7237]'); insert into test_proxima_be_restart_with_full_stage values(7238, 'name7238', 7248.111, 723800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7238]'); insert into test_proxima_be_restart_with_full_stage values(7239, 'name7239', 7249.111, 723900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7239]'); insert into test_proxima_be_restart_with_full_stage values(7240, 'name7240', 7250.111, 724000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7240]'); insert into test_proxima_be_restart_with_full_stage values(7241, 'name7241', 7251.111, 724100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7241]'); insert into test_proxima_be_restart_with_full_stage values(7242, 'name7242', 7252.111, 724200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7242]'); insert into test_proxima_be_restart_with_full_stage values(7243, 'name7243', 7253.111, 724300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7243]'); insert into test_proxima_be_restart_with_full_stage values(7244, 'name7244', 7254.111, 724400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7244]'); insert into test_proxima_be_restart_with_full_stage values(7245, 'name7245', 7255.111, 724500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7245]'); insert into test_proxima_be_restart_with_full_stage values(7246, 'name7246', 7256.111, 724600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7246]'); insert into test_proxima_be_restart_with_full_stage values(7247, 'name7247', 7257.111, 724700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7247]'); insert into test_proxima_be_restart_with_full_stage values(7248, 'name7248', 7258.111, 724800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7248]'); insert into test_proxima_be_restart_with_full_stage values(7249, 'name7249', 7259.111, 724900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7249]'); insert into test_proxima_be_restart_with_full_stage values(7250, 'name7250', 7260.111, 725000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7250]'); insert into test_proxima_be_restart_with_full_stage values(7251, 'name7251', 7261.111, 725100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7251]'); insert into test_proxima_be_restart_with_full_stage values(7252, 'name7252', 7262.111, 725200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7252]'); insert into test_proxima_be_restart_with_full_stage values(7253, 'name7253', 7263.111, 725300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7253]'); insert into test_proxima_be_restart_with_full_stage values(7254, 'name7254', 7264.111, 725400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7254]'); insert into test_proxima_be_restart_with_full_stage values(7255, 'name7255', 7265.111, 725500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7255]'); insert into test_proxima_be_restart_with_full_stage values(7256, 'name7256', 7266.111, 725600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7256]'); insert into test_proxima_be_restart_with_full_stage values(7257, 'name7257', 7267.111, 725700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7257]'); insert into test_proxima_be_restart_with_full_stage values(7258, 'name7258', 7268.111, 725800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7258]'); insert into test_proxima_be_restart_with_full_stage values(7259, 'name7259', 7269.111, 725900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7259]'); insert into test_proxima_be_restart_with_full_stage values(7260, 'name7260', 7270.111, 726000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7260]'); insert into test_proxima_be_restart_with_full_stage values(7261, 'name7261', 7271.111, 726100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7261]'); insert into test_proxima_be_restart_with_full_stage values(7262, 'name7262', 7272.111, 726200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7262]'); insert into test_proxima_be_restart_with_full_stage values(7263, 'name7263', 7273.111, 726300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7263]'); insert into test_proxima_be_restart_with_full_stage values(7264, 'name7264', 7274.111, 726400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7264]'); insert into test_proxima_be_restart_with_full_stage values(7265, 'name7265', 7275.111, 726500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7265]'); insert into test_proxima_be_restart_with_full_stage values(7266, 'name7266', 7276.111, 726600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7266]'); insert into test_proxima_be_restart_with_full_stage values(7267, 'name7267', 7277.111, 726700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7267]'); insert into test_proxima_be_restart_with_full_stage values(7268, 'name7268', 7278.111, 726800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7268]'); insert into test_proxima_be_restart_with_full_stage values(7269, 'name7269', 7279.111, 726900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7269]'); insert into test_proxima_be_restart_with_full_stage values(7270, 'name7270', 7280.111, 727000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7270]'); insert into test_proxima_be_restart_with_full_stage values(7271, 'name7271', 7281.111, 727100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7271]'); insert into test_proxima_be_restart_with_full_stage values(7272, 'name7272', 7282.111, 727200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7272]'); insert into test_proxima_be_restart_with_full_stage values(7273, 'name7273', 7283.111, 727300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7273]'); insert into test_proxima_be_restart_with_full_stage values(7274, 'name7274', 7284.111, 727400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7274]'); insert into test_proxima_be_restart_with_full_stage values(7275, 'name7275', 7285.111, 727500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7275]'); insert into test_proxima_be_restart_with_full_stage values(7276, 'name7276', 7286.111, 727600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7276]'); insert into test_proxima_be_restart_with_full_stage values(7277, 'name7277', 7287.111, 727700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7277]'); insert into test_proxima_be_restart_with_full_stage values(7278, 'name7278', 7288.111, 727800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7278]'); insert into test_proxima_be_restart_with_full_stage values(7279, 'name7279', 7289.111, 727900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7279]'); insert into test_proxima_be_restart_with_full_stage values(7280, 'name7280', 7290.111, 728000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7280]'); insert into test_proxima_be_restart_with_full_stage values(7281, 'name7281', 7291.111, 728100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7281]'); insert into test_proxima_be_restart_with_full_stage values(7282, 'name7282', 7292.111, 728200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7282]'); insert into test_proxima_be_restart_with_full_stage values(7283, 'name7283', 7293.111, 728300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7283]'); insert into test_proxima_be_restart_with_full_stage values(7284, 'name7284', 7294.111, 728400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7284]'); insert into test_proxima_be_restart_with_full_stage values(7285, 'name7285', 7295.111, 728500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7285]'); insert into test_proxima_be_restart_with_full_stage values(7286, 'name7286', 7296.111, 728600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7286]'); insert into test_proxima_be_restart_with_full_stage values(7287, 'name7287', 7297.111, 728700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7287]'); insert into test_proxima_be_restart_with_full_stage values(7288, 'name7288', 7298.111, 728800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7288]'); insert into test_proxima_be_restart_with_full_stage values(7289, 'name7289', 7299.111, 728900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7289]'); insert into test_proxima_be_restart_with_full_stage values(7290, 'name7290', 7300.111, 729000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7290]'); insert into test_proxima_be_restart_with_full_stage values(7291, 'name7291', 7301.111, 729100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7291]'); insert into test_proxima_be_restart_with_full_stage values(7292, 'name7292', 7302.111, 729200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7292]'); insert into test_proxima_be_restart_with_full_stage values(7293, 'name7293', 7303.111, 729300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7293]'); insert into test_proxima_be_restart_with_full_stage values(7294, 'name7294', 7304.111, 729400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7294]'); insert into test_proxima_be_restart_with_full_stage values(7295, 'name7295', 7305.111, 729500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7295]'); insert into test_proxima_be_restart_with_full_stage values(7296, 'name7296', 7306.111, 729600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7296]'); insert into test_proxima_be_restart_with_full_stage values(7297, 'name7297', 7307.111, 729700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7297]'); insert into test_proxima_be_restart_with_full_stage values(7298, 'name7298', 7308.111, 729800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7298]'); insert into test_proxima_be_restart_with_full_stage values(7299, 'name7299', 7309.111, 729900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7299]'); insert into test_proxima_be_restart_with_full_stage values(7300, 'name7300', 7310.111, 730000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7300]'); insert into test_proxima_be_restart_with_full_stage values(7301, 'name7301', 7311.111, 730100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7301]'); insert into test_proxima_be_restart_with_full_stage values(7302, 'name7302', 7312.111, 730200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7302]'); insert into test_proxima_be_restart_with_full_stage values(7303, 'name7303', 7313.111, 730300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7303]'); insert into test_proxima_be_restart_with_full_stage values(7304, 'name7304', 7314.111, 730400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7304]'); insert into test_proxima_be_restart_with_full_stage values(7305, 'name7305', 7315.111, 730500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7305]'); insert into test_proxima_be_restart_with_full_stage values(7306, 'name7306', 7316.111, 730600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7306]'); insert into test_proxima_be_restart_with_full_stage values(7307, 'name7307', 7317.111, 730700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7307]'); insert into test_proxima_be_restart_with_full_stage values(7308, 'name7308', 7318.111, 730800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7308]'); insert into test_proxima_be_restart_with_full_stage values(7309, 'name7309', 7319.111, 730900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7309]'); insert into test_proxima_be_restart_with_full_stage values(7310, 'name7310', 7320.111, 731000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7310]'); insert into test_proxima_be_restart_with_full_stage values(7311, 'name7311', 7321.111, 731100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7311]'); insert into test_proxima_be_restart_with_full_stage values(7312, 'name7312', 7322.111, 731200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7312]'); insert into test_proxima_be_restart_with_full_stage values(7313, 'name7313', 7323.111, 731300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7313]'); insert into test_proxima_be_restart_with_full_stage values(7314, 'name7314', 7324.111, 731400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7314]'); insert into test_proxima_be_restart_with_full_stage values(7315, 'name7315', 7325.111, 731500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7315]'); insert into test_proxima_be_restart_with_full_stage values(7316, 'name7316', 7326.111, 731600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7316]'); insert into test_proxima_be_restart_with_full_stage values(7317, 'name7317', 7327.111, 731700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7317]'); insert into test_proxima_be_restart_with_full_stage values(7318, 'name7318', 7328.111, 731800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7318]'); insert into test_proxima_be_restart_with_full_stage values(7319, 'name7319', 7329.111, 731900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7319]'); insert into test_proxima_be_restart_with_full_stage values(7320, 'name7320', 7330.111, 732000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7320]'); insert into test_proxima_be_restart_with_full_stage values(7321, 'name7321', 7331.111, 732100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7321]'); insert into test_proxima_be_restart_with_full_stage values(7322, 'name7322', 7332.111, 732200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7322]'); insert into test_proxima_be_restart_with_full_stage values(7323, 'name7323', 7333.111, 732300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7323]'); insert into test_proxima_be_restart_with_full_stage values(7324, 'name7324', 7334.111, 732400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7324]'); insert into test_proxima_be_restart_with_full_stage values(7325, 'name7325', 7335.111, 732500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7325]'); insert into test_proxima_be_restart_with_full_stage values(7326, 'name7326', 7336.111, 732600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7326]'); insert into test_proxima_be_restart_with_full_stage values(7327, 'name7327', 7337.111, 732700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7327]'); insert into test_proxima_be_restart_with_full_stage values(7328, 'name7328', 7338.111, 732800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7328]'); insert into test_proxima_be_restart_with_full_stage values(7329, 'name7329', 7339.111, 732900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7329]'); insert into test_proxima_be_restart_with_full_stage values(7330, 'name7330', 7340.111, 733000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7330]'); insert into test_proxima_be_restart_with_full_stage values(7331, 'name7331', 7341.111, 733100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7331]'); insert into test_proxima_be_restart_with_full_stage values(7332, 'name7332', 7342.111, 733200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7332]'); insert into test_proxima_be_restart_with_full_stage values(7333, 'name7333', 7343.111, 733300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7333]'); insert into test_proxima_be_restart_with_full_stage values(7334, 'name7334', 7344.111, 733400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7334]'); insert into test_proxima_be_restart_with_full_stage values(7335, 'name7335', 7345.111, 733500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7335]'); insert into test_proxima_be_restart_with_full_stage values(7336, 'name7336', 7346.111, 733600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7336]'); insert into test_proxima_be_restart_with_full_stage values(7337, 'name7337', 7347.111, 733700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7337]'); insert into test_proxima_be_restart_with_full_stage values(7338, 'name7338', 7348.111, 733800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7338]'); insert into test_proxima_be_restart_with_full_stage values(7339, 'name7339', 7349.111, 733900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7339]'); insert into test_proxima_be_restart_with_full_stage values(7340, 'name7340', 7350.111, 734000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7340]'); insert into test_proxima_be_restart_with_full_stage values(7341, 'name7341', 7351.111, 734100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7341]'); insert into test_proxima_be_restart_with_full_stage values(7342, 'name7342', 7352.111, 734200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7342]'); insert into test_proxima_be_restart_with_full_stage values(7343, 'name7343', 7353.111, 734300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7343]'); insert into test_proxima_be_restart_with_full_stage values(7344, 'name7344', 7354.111, 734400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7344]'); insert into test_proxima_be_restart_with_full_stage values(7345, 'name7345', 7355.111, 734500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7345]'); insert into test_proxima_be_restart_with_full_stage values(7346, 'name7346', 7356.111, 734600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7346]'); insert into test_proxima_be_restart_with_full_stage values(7347, 'name7347', 7357.111, 734700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7347]'); insert into test_proxima_be_restart_with_full_stage values(7348, 'name7348', 7358.111, 734800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7348]'); insert into test_proxima_be_restart_with_full_stage values(7349, 'name7349', 7359.111, 734900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7349]'); insert into test_proxima_be_restart_with_full_stage values(7350, 'name7350', 7360.111, 735000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7350]'); insert into test_proxima_be_restart_with_full_stage values(7351, 'name7351', 7361.111, 735100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7351]'); insert into test_proxima_be_restart_with_full_stage values(7352, 'name7352', 7362.111, 735200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7352]'); insert into test_proxima_be_restart_with_full_stage values(7353, 'name7353', 7363.111, 735300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7353]'); insert into test_proxima_be_restart_with_full_stage values(7354, 'name7354', 7364.111, 735400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7354]'); insert into test_proxima_be_restart_with_full_stage values(7355, 'name7355', 7365.111, 735500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7355]'); insert into test_proxima_be_restart_with_full_stage values(7356, 'name7356', 7366.111, 735600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7356]'); insert into test_proxima_be_restart_with_full_stage values(7357, 'name7357', 7367.111, 735700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7357]'); insert into test_proxima_be_restart_with_full_stage values(7358, 'name7358', 7368.111, 735800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7358]'); insert into test_proxima_be_restart_with_full_stage values(7359, 'name7359', 7369.111, 735900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7359]'); insert into test_proxima_be_restart_with_full_stage values(7360, 'name7360', 7370.111, 736000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7360]'); insert into test_proxima_be_restart_with_full_stage values(7361, 'name7361', 7371.111, 736100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7361]'); insert into test_proxima_be_restart_with_full_stage values(7362, 'name7362', 7372.111, 736200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7362]'); insert into test_proxima_be_restart_with_full_stage values(7363, 'name7363', 7373.111, 736300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7363]'); insert into test_proxima_be_restart_with_full_stage values(7364, 'name7364', 7374.111, 736400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7364]'); insert into test_proxima_be_restart_with_full_stage values(7365, 'name7365', 7375.111, 736500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7365]'); insert into test_proxima_be_restart_with_full_stage values(7366, 'name7366', 7376.111, 736600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7366]'); insert into test_proxima_be_restart_with_full_stage values(7367, 'name7367', 7377.111, 736700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7367]'); insert into test_proxima_be_restart_with_full_stage values(7368, 'name7368', 7378.111, 736800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7368]'); insert into test_proxima_be_restart_with_full_stage values(7369, 'name7369', 7379.111, 736900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7369]'); insert into test_proxima_be_restart_with_full_stage values(7370, 'name7370', 7380.111, 737000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7370]'); insert into test_proxima_be_restart_with_full_stage values(7371, 'name7371', 7381.111, 737100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7371]'); insert into test_proxima_be_restart_with_full_stage values(7372, 'name7372', 7382.111, 737200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7372]'); insert into test_proxima_be_restart_with_full_stage values(7373, 'name7373', 7383.111, 737300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7373]'); insert into test_proxima_be_restart_with_full_stage values(7374, 'name7374', 7384.111, 737400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7374]'); insert into test_proxima_be_restart_with_full_stage values(7375, 'name7375', 7385.111, 737500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7375]'); insert into test_proxima_be_restart_with_full_stage values(7376, 'name7376', 7386.111, 737600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7376]'); insert into test_proxima_be_restart_with_full_stage values(7377, 'name7377', 7387.111, 737700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7377]'); insert into test_proxima_be_restart_with_full_stage values(7378, 'name7378', 7388.111, 737800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7378]'); insert into test_proxima_be_restart_with_full_stage values(7379, 'name7379', 7389.111, 737900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7379]'); insert into test_proxima_be_restart_with_full_stage values(7380, 'name7380', 7390.111, 738000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7380]'); insert into test_proxima_be_restart_with_full_stage values(7381, 'name7381', 7391.111, 738100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7381]'); insert into test_proxima_be_restart_with_full_stage values(7382, 'name7382', 7392.111, 738200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7382]'); insert into test_proxima_be_restart_with_full_stage values(7383, 'name7383', 7393.111, 738300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7383]'); insert into test_proxima_be_restart_with_full_stage values(7384, 'name7384', 7394.111, 738400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7384]'); insert into test_proxima_be_restart_with_full_stage values(7385, 'name7385', 7395.111, 738500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7385]'); insert into test_proxima_be_restart_with_full_stage values(7386, 'name7386', 7396.111, 738600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7386]'); insert into test_proxima_be_restart_with_full_stage values(7387, 'name7387', 7397.111, 738700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7387]'); insert into test_proxima_be_restart_with_full_stage values(7388, 'name7388', 7398.111, 738800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7388]'); insert into test_proxima_be_restart_with_full_stage values(7389, 'name7389', 7399.111, 738900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7389]'); insert into test_proxima_be_restart_with_full_stage values(7390, 'name7390', 7400.111, 739000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7390]'); insert into test_proxima_be_restart_with_full_stage values(7391, 'name7391', 7401.111, 739100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7391]'); insert into test_proxima_be_restart_with_full_stage values(7392, 'name7392', 7402.111, 739200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7392]'); insert into test_proxima_be_restart_with_full_stage values(7393, 'name7393', 7403.111, 739300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7393]'); insert into test_proxima_be_restart_with_full_stage values(7394, 'name7394', 7404.111, 739400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7394]'); insert into test_proxima_be_restart_with_full_stage values(7395, 'name7395', 7405.111, 739500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7395]'); insert into test_proxima_be_restart_with_full_stage values(7396, 'name7396', 7406.111, 739600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7396]'); insert into test_proxima_be_restart_with_full_stage values(7397, 'name7397', 7407.111, 739700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7397]'); insert into test_proxima_be_restart_with_full_stage values(7398, 'name7398', 7408.111, 739800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7398]'); insert into test_proxima_be_restart_with_full_stage values(7399, 'name7399', 7409.111, 739900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7399]'); insert into test_proxima_be_restart_with_full_stage values(7400, 'name7400', 7410.111, 740000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7400]'); insert into test_proxima_be_restart_with_full_stage values(7401, 'name7401', 7411.111, 740100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7401]'); insert into test_proxima_be_restart_with_full_stage values(7402, 'name7402', 7412.111, 740200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7402]'); insert into test_proxima_be_restart_with_full_stage values(7403, 'name7403', 7413.111, 740300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7403]'); insert into test_proxima_be_restart_with_full_stage values(7404, 'name7404', 7414.111, 740400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7404]'); insert into test_proxima_be_restart_with_full_stage values(7405, 'name7405', 7415.111, 740500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7405]'); insert into test_proxima_be_restart_with_full_stage values(7406, 'name7406', 7416.111, 740600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7406]'); insert into test_proxima_be_restart_with_full_stage values(7407, 'name7407', 7417.111, 740700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7407]'); insert into test_proxima_be_restart_with_full_stage values(7408, 'name7408', 7418.111, 740800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7408]'); insert into test_proxima_be_restart_with_full_stage values(7409, 'name7409', 7419.111, 740900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7409]'); insert into test_proxima_be_restart_with_full_stage values(7410, 'name7410', 7420.111, 741000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7410]'); insert into test_proxima_be_restart_with_full_stage values(7411, 'name7411', 7421.111, 741100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7411]'); insert into test_proxima_be_restart_with_full_stage values(7412, 'name7412', 7422.111, 741200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7412]'); insert into test_proxima_be_restart_with_full_stage values(7413, 'name7413', 7423.111, 741300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7413]'); insert into test_proxima_be_restart_with_full_stage values(7414, 'name7414', 7424.111, 741400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7414]'); insert into test_proxima_be_restart_with_full_stage values(7415, 'name7415', 7425.111, 741500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7415]'); insert into test_proxima_be_restart_with_full_stage values(7416, 'name7416', 7426.111, 741600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7416]'); insert into test_proxima_be_restart_with_full_stage values(7417, 'name7417', 7427.111, 741700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7417]'); insert into test_proxima_be_restart_with_full_stage values(7418, 'name7418', 7428.111, 741800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7418]'); insert into test_proxima_be_restart_with_full_stage values(7419, 'name7419', 7429.111, 741900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7419]'); insert into test_proxima_be_restart_with_full_stage values(7420, 'name7420', 7430.111, 742000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7420]'); insert into test_proxima_be_restart_with_full_stage values(7421, 'name7421', 7431.111, 742100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7421]'); insert into test_proxima_be_restart_with_full_stage values(7422, 'name7422', 7432.111, 742200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7422]'); insert into test_proxima_be_restart_with_full_stage values(7423, 'name7423', 7433.111, 742300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7423]'); insert into test_proxima_be_restart_with_full_stage values(7424, 'name7424', 7434.111, 742400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7424]'); insert into test_proxima_be_restart_with_full_stage values(7425, 'name7425', 7435.111, 742500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7425]'); insert into test_proxima_be_restart_with_full_stage values(7426, 'name7426', 7436.111, 742600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7426]'); insert into test_proxima_be_restart_with_full_stage values(7427, 'name7427', 7437.111, 742700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7427]'); insert into test_proxima_be_restart_with_full_stage values(7428, 'name7428', 7438.111, 742800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7428]'); insert into test_proxima_be_restart_with_full_stage values(7429, 'name7429', 7439.111, 742900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7429]'); insert into test_proxima_be_restart_with_full_stage values(7430, 'name7430', 7440.111, 743000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7430]'); insert into test_proxima_be_restart_with_full_stage values(7431, 'name7431', 7441.111, 743100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7431]'); insert into test_proxima_be_restart_with_full_stage values(7432, 'name7432', 7442.111, 743200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7432]'); insert into test_proxima_be_restart_with_full_stage values(7433, 'name7433', 7443.111, 743300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7433]'); insert into test_proxima_be_restart_with_full_stage values(7434, 'name7434', 7444.111, 743400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7434]'); insert into test_proxima_be_restart_with_full_stage values(7435, 'name7435', 7445.111, 743500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7435]'); insert into test_proxima_be_restart_with_full_stage values(7436, 'name7436', 7446.111, 743600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7436]'); insert into test_proxima_be_restart_with_full_stage values(7437, 'name7437', 7447.111, 743700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7437]'); insert into test_proxima_be_restart_with_full_stage values(7438, 'name7438', 7448.111, 743800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7438]'); insert into test_proxima_be_restart_with_full_stage values(7439, 'name7439', 7449.111, 743900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7439]'); insert into test_proxima_be_restart_with_full_stage values(7440, 'name7440', 7450.111, 744000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7440]'); insert into test_proxima_be_restart_with_full_stage values(7441, 'name7441', 7451.111, 744100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7441]'); insert into test_proxima_be_restart_with_full_stage values(7442, 'name7442', 7452.111, 744200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7442]'); insert into test_proxima_be_restart_with_full_stage values(7443, 'name7443', 7453.111, 744300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7443]'); insert into test_proxima_be_restart_with_full_stage values(7444, 'name7444', 7454.111, 744400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7444]'); insert into test_proxima_be_restart_with_full_stage values(7445, 'name7445', 7455.111, 744500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7445]'); insert into test_proxima_be_restart_with_full_stage values(7446, 'name7446', 7456.111, 744600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7446]'); insert into test_proxima_be_restart_with_full_stage values(7447, 'name7447', 7457.111, 744700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7447]'); insert into test_proxima_be_restart_with_full_stage values(7448, 'name7448', 7458.111, 744800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7448]'); insert into test_proxima_be_restart_with_full_stage values(7449, 'name7449', 7459.111, 744900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7449]'); insert into test_proxima_be_restart_with_full_stage values(7450, 'name7450', 7460.111, 745000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7450]'); insert into test_proxima_be_restart_with_full_stage values(7451, 'name7451', 7461.111, 745100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7451]'); insert into test_proxima_be_restart_with_full_stage values(7452, 'name7452', 7462.111, 745200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7452]'); insert into test_proxima_be_restart_with_full_stage values(7453, 'name7453', 7463.111, 745300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7453]'); insert into test_proxima_be_restart_with_full_stage values(7454, 'name7454', 7464.111, 745400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7454]'); insert into test_proxima_be_restart_with_full_stage values(7455, 'name7455', 7465.111, 745500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7455]'); insert into test_proxima_be_restart_with_full_stage values(7456, 'name7456', 7466.111, 745600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7456]'); insert into test_proxima_be_restart_with_full_stage values(7457, 'name7457', 7467.111, 745700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7457]'); insert into test_proxima_be_restart_with_full_stage values(7458, 'name7458', 7468.111, 745800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7458]'); insert into test_proxima_be_restart_with_full_stage values(7459, 'name7459', 7469.111, 745900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7459]'); insert into test_proxima_be_restart_with_full_stage values(7460, 'name7460', 7470.111, 746000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7460]'); insert into test_proxima_be_restart_with_full_stage values(7461, 'name7461', 7471.111, 746100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7461]'); insert into test_proxima_be_restart_with_full_stage values(7462, 'name7462', 7472.111, 746200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7462]'); insert into test_proxima_be_restart_with_full_stage values(7463, 'name7463', 7473.111, 746300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7463]'); insert into test_proxima_be_restart_with_full_stage values(7464, 'name7464', 7474.111, 746400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7464]'); insert into test_proxima_be_restart_with_full_stage values(7465, 'name7465', 7475.111, 746500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7465]'); insert into test_proxima_be_restart_with_full_stage values(7466, 'name7466', 7476.111, 746600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7466]'); insert into test_proxima_be_restart_with_full_stage values(7467, 'name7467', 7477.111, 746700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7467]'); insert into test_proxima_be_restart_with_full_stage values(7468, 'name7468', 7478.111, 746800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7468]'); insert into test_proxima_be_restart_with_full_stage values(7469, 'name7469', 7479.111, 746900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7469]'); insert into test_proxima_be_restart_with_full_stage values(7470, 'name7470', 7480.111, 747000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7470]'); insert into test_proxima_be_restart_with_full_stage values(7471, 'name7471', 7481.111, 747100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7471]'); insert into test_proxima_be_restart_with_full_stage values(7472, 'name7472', 7482.111, 747200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7472]'); insert into test_proxima_be_restart_with_full_stage values(7473, 'name7473', 7483.111, 747300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7473]'); insert into test_proxima_be_restart_with_full_stage values(7474, 'name7474', 7484.111, 747400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7474]'); insert into test_proxima_be_restart_with_full_stage values(7475, 'name7475', 7485.111, 747500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7475]'); insert into test_proxima_be_restart_with_full_stage values(7476, 'name7476', 7486.111, 747600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7476]'); insert into test_proxima_be_restart_with_full_stage values(7477, 'name7477', 7487.111, 747700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7477]'); insert into test_proxima_be_restart_with_full_stage values(7478, 'name7478', 7488.111, 747800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7478]'); insert into test_proxima_be_restart_with_full_stage values(7479, 'name7479', 7489.111, 747900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7479]'); insert into test_proxima_be_restart_with_full_stage values(7480, 'name7480', 7490.111, 748000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7480]'); insert into test_proxima_be_restart_with_full_stage values(7481, 'name7481', 7491.111, 748100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7481]'); insert into test_proxima_be_restart_with_full_stage values(7482, 'name7482', 7492.111, 748200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7482]'); insert into test_proxima_be_restart_with_full_stage values(7483, 'name7483', 7493.111, 748300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7483]'); insert into test_proxima_be_restart_with_full_stage values(7484, 'name7484', 7494.111, 748400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7484]'); insert into test_proxima_be_restart_with_full_stage values(7485, 'name7485', 7495.111, 748500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7485]'); insert into test_proxima_be_restart_with_full_stage values(7486, 'name7486', 7496.111, 748600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7486]'); insert into test_proxima_be_restart_with_full_stage values(7487, 'name7487', 7497.111, 748700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7487]'); insert into test_proxima_be_restart_with_full_stage values(7488, 'name7488', 7498.111, 748800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7488]'); insert into test_proxima_be_restart_with_full_stage values(7489, 'name7489', 7499.111, 748900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7489]'); insert into test_proxima_be_restart_with_full_stage values(7490, 'name7490', 7500.111, 749000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7490]'); insert into test_proxima_be_restart_with_full_stage values(7491, 'name7491', 7501.111, 749100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7491]'); insert into test_proxima_be_restart_with_full_stage values(7492, 'name7492', 7502.111, 749200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7492]'); insert into test_proxima_be_restart_with_full_stage values(7493, 'name7493', 7503.111, 749300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7493]'); insert into test_proxima_be_restart_with_full_stage values(7494, 'name7494', 7504.111, 749400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7494]'); insert into test_proxima_be_restart_with_full_stage values(7495, 'name7495', 7505.111, 749500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7495]'); insert into test_proxima_be_restart_with_full_stage values(7496, 'name7496', 7506.111, 749600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7496]'); insert into test_proxima_be_restart_with_full_stage values(7497, 'name7497', 7507.111, 749700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7497]'); insert into test_proxima_be_restart_with_full_stage values(7498, 'name7498', 7508.111, 749800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7498]'); insert into test_proxima_be_restart_with_full_stage values(7499, 'name7499', 7509.111, 749900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7499]'); insert into test_proxima_be_restart_with_full_stage values(7500, 'name7500', 7510.111, 750000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7500]'); insert into test_proxima_be_restart_with_full_stage values(7501, 'name7501', 7511.111, 750100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7501]'); insert into test_proxima_be_restart_with_full_stage values(7502, 'name7502', 7512.111, 750200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7502]'); insert into test_proxima_be_restart_with_full_stage values(7503, 'name7503', 7513.111, 750300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7503]'); insert into test_proxima_be_restart_with_full_stage values(7504, 'name7504', 7514.111, 750400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7504]'); insert into test_proxima_be_restart_with_full_stage values(7505, 'name7505', 7515.111, 750500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7505]'); insert into test_proxima_be_restart_with_full_stage values(7506, 'name7506', 7516.111, 750600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7506]'); insert into test_proxima_be_restart_with_full_stage values(7507, 'name7507', 7517.111, 750700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7507]'); insert into test_proxima_be_restart_with_full_stage values(7508, 'name7508', 7518.111, 750800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7508]'); insert into test_proxima_be_restart_with_full_stage values(7509, 'name7509', 7519.111, 750900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7509]'); insert into test_proxima_be_restart_with_full_stage values(7510, 'name7510', 7520.111, 751000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7510]'); insert into test_proxima_be_restart_with_full_stage values(7511, 'name7511', 7521.111, 751100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7511]'); insert into test_proxima_be_restart_with_full_stage values(7512, 'name7512', 7522.111, 751200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7512]'); insert into test_proxima_be_restart_with_full_stage values(7513, 'name7513', 7523.111, 751300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7513]'); insert into test_proxima_be_restart_with_full_stage values(7514, 'name7514', 7524.111, 751400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7514]'); insert into test_proxima_be_restart_with_full_stage values(7515, 'name7515', 7525.111, 751500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7515]'); insert into test_proxima_be_restart_with_full_stage values(7516, 'name7516', 7526.111, 751600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7516]'); insert into test_proxima_be_restart_with_full_stage values(7517, 'name7517', 7527.111, 751700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7517]'); insert into test_proxima_be_restart_with_full_stage values(7518, 'name7518', 7528.111, 751800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7518]'); insert into test_proxima_be_restart_with_full_stage values(7519, 'name7519', 7529.111, 751900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7519]'); insert into test_proxima_be_restart_with_full_stage values(7520, 'name7520', 7530.111, 752000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7520]'); insert into test_proxima_be_restart_with_full_stage values(7521, 'name7521', 7531.111, 752100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7521]'); insert into test_proxima_be_restart_with_full_stage values(7522, 'name7522', 7532.111, 752200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7522]'); insert into test_proxima_be_restart_with_full_stage values(7523, 'name7523', 7533.111, 752300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7523]'); insert into test_proxima_be_restart_with_full_stage values(7524, 'name7524', 7534.111, 752400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7524]'); insert into test_proxima_be_restart_with_full_stage values(7525, 'name7525', 7535.111, 752500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7525]'); insert into test_proxima_be_restart_with_full_stage values(7526, 'name7526', 7536.111, 752600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7526]'); insert into test_proxima_be_restart_with_full_stage values(7527, 'name7527', 7537.111, 752700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7527]'); insert into test_proxima_be_restart_with_full_stage values(7528, 'name7528', 7538.111, 752800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7528]'); insert into test_proxima_be_restart_with_full_stage values(7529, 'name7529', 7539.111, 752900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7529]'); insert into test_proxima_be_restart_with_full_stage values(7530, 'name7530', 7540.111, 753000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7530]'); insert into test_proxima_be_restart_with_full_stage values(7531, 'name7531', 7541.111, 753100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7531]'); insert into test_proxima_be_restart_with_full_stage values(7532, 'name7532', 7542.111, 753200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7532]'); insert into test_proxima_be_restart_with_full_stage values(7533, 'name7533', 7543.111, 753300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7533]'); insert into test_proxima_be_restart_with_full_stage values(7534, 'name7534', 7544.111, 753400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7534]'); insert into test_proxima_be_restart_with_full_stage values(7535, 'name7535', 7545.111, 753500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7535]'); insert into test_proxima_be_restart_with_full_stage values(7536, 'name7536', 7546.111, 753600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7536]'); insert into test_proxima_be_restart_with_full_stage values(7537, 'name7537', 7547.111, 753700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7537]'); insert into test_proxima_be_restart_with_full_stage values(7538, 'name7538', 7548.111, 753800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7538]'); insert into test_proxima_be_restart_with_full_stage values(7539, 'name7539', 7549.111, 753900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7539]'); insert into test_proxima_be_restart_with_full_stage values(7540, 'name7540', 7550.111, 754000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7540]'); insert into test_proxima_be_restart_with_full_stage values(7541, 'name7541', 7551.111, 754100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7541]'); insert into test_proxima_be_restart_with_full_stage values(7542, 'name7542', 7552.111, 754200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7542]'); insert into test_proxima_be_restart_with_full_stage values(7543, 'name7543', 7553.111, 754300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7543]'); insert into test_proxima_be_restart_with_full_stage values(7544, 'name7544', 7554.111, 754400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7544]'); insert into test_proxima_be_restart_with_full_stage values(7545, 'name7545', 7555.111, 754500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7545]'); insert into test_proxima_be_restart_with_full_stage values(7546, 'name7546', 7556.111, 754600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7546]'); insert into test_proxima_be_restart_with_full_stage values(7547, 'name7547', 7557.111, 754700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7547]'); insert into test_proxima_be_restart_with_full_stage values(7548, 'name7548', 7558.111, 754800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7548]'); insert into test_proxima_be_restart_with_full_stage values(7549, 'name7549', 7559.111, 754900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7549]'); insert into test_proxima_be_restart_with_full_stage values(7550, 'name7550', 7560.111, 755000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7550]'); insert into test_proxima_be_restart_with_full_stage values(7551, 'name7551', 7561.111, 755100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7551]'); insert into test_proxima_be_restart_with_full_stage values(7552, 'name7552', 7562.111, 755200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7552]'); insert into test_proxima_be_restart_with_full_stage values(7553, 'name7553', 7563.111, 755300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7553]'); insert into test_proxima_be_restart_with_full_stage values(7554, 'name7554', 7564.111, 755400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7554]'); insert into test_proxima_be_restart_with_full_stage values(7555, 'name7555', 7565.111, 755500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7555]'); insert into test_proxima_be_restart_with_full_stage values(7556, 'name7556', 7566.111, 755600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7556]'); insert into test_proxima_be_restart_with_full_stage values(7557, 'name7557', 7567.111, 755700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7557]'); insert into test_proxima_be_restart_with_full_stage values(7558, 'name7558', 7568.111, 755800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7558]'); insert into test_proxima_be_restart_with_full_stage values(7559, 'name7559', 7569.111, 755900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7559]'); insert into test_proxima_be_restart_with_full_stage values(7560, 'name7560', 7570.111, 756000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7560]'); insert into test_proxima_be_restart_with_full_stage values(7561, 'name7561', 7571.111, 756100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7561]'); insert into test_proxima_be_restart_with_full_stage values(7562, 'name7562', 7572.111, 756200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7562]'); insert into test_proxima_be_restart_with_full_stage values(7563, 'name7563', 7573.111, 756300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7563]'); insert into test_proxima_be_restart_with_full_stage values(7564, 'name7564', 7574.111, 756400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7564]'); insert into test_proxima_be_restart_with_full_stage values(7565, 'name7565', 7575.111, 756500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7565]'); insert into test_proxima_be_restart_with_full_stage values(7566, 'name7566', 7576.111, 756600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7566]'); insert into test_proxima_be_restart_with_full_stage values(7567, 'name7567', 7577.111, 756700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7567]'); insert into test_proxima_be_restart_with_full_stage values(7568, 'name7568', 7578.111, 756800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7568]'); insert into test_proxima_be_restart_with_full_stage values(7569, 'name7569', 7579.111, 756900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7569]'); insert into test_proxima_be_restart_with_full_stage values(7570, 'name7570', 7580.111, 757000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7570]'); insert into test_proxima_be_restart_with_full_stage values(7571, 'name7571', 7581.111, 757100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7571]'); insert into test_proxima_be_restart_with_full_stage values(7572, 'name7572', 7582.111, 757200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7572]'); insert into test_proxima_be_restart_with_full_stage values(7573, 'name7573', 7583.111, 757300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7573]'); insert into test_proxima_be_restart_with_full_stage values(7574, 'name7574', 7584.111, 757400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7574]'); insert into test_proxima_be_restart_with_full_stage values(7575, 'name7575', 7585.111, 757500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7575]'); insert into test_proxima_be_restart_with_full_stage values(7576, 'name7576', 7586.111, 757600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7576]'); insert into test_proxima_be_restart_with_full_stage values(7577, 'name7577', 7587.111, 757700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7577]'); insert into test_proxima_be_restart_with_full_stage values(7578, 'name7578', 7588.111, 757800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7578]'); insert into test_proxima_be_restart_with_full_stage values(7579, 'name7579', 7589.111, 757900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7579]'); insert into test_proxima_be_restart_with_full_stage values(7580, 'name7580', 7590.111, 758000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7580]'); insert into test_proxima_be_restart_with_full_stage values(7581, 'name7581', 7591.111, 758100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7581]'); insert into test_proxima_be_restart_with_full_stage values(7582, 'name7582', 7592.111, 758200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7582]'); insert into test_proxima_be_restart_with_full_stage values(7583, 'name7583', 7593.111, 758300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7583]'); insert into test_proxima_be_restart_with_full_stage values(7584, 'name7584', 7594.111, 758400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7584]'); insert into test_proxima_be_restart_with_full_stage values(7585, 'name7585', 7595.111, 758500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7585]'); insert into test_proxima_be_restart_with_full_stage values(7586, 'name7586', 7596.111, 758600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7586]'); insert into test_proxima_be_restart_with_full_stage values(7587, 'name7587', 7597.111, 758700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7587]'); insert into test_proxima_be_restart_with_full_stage values(7588, 'name7588', 7598.111, 758800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7588]'); insert into test_proxima_be_restart_with_full_stage values(7589, 'name7589', 7599.111, 758900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7589]'); insert into test_proxima_be_restart_with_full_stage values(7590, 'name7590', 7600.111, 759000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7590]'); insert into test_proxima_be_restart_with_full_stage values(7591, 'name7591', 7601.111, 759100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7591]'); insert into test_proxima_be_restart_with_full_stage values(7592, 'name7592', 7602.111, 759200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7592]'); insert into test_proxima_be_restart_with_full_stage values(7593, 'name7593', 7603.111, 759300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7593]'); insert into test_proxima_be_restart_with_full_stage values(7594, 'name7594', 7604.111, 759400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7594]'); insert into test_proxima_be_restart_with_full_stage values(7595, 'name7595', 7605.111, 759500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7595]'); insert into test_proxima_be_restart_with_full_stage values(7596, 'name7596', 7606.111, 759600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7596]'); insert into test_proxima_be_restart_with_full_stage values(7597, 'name7597', 7607.111, 759700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7597]'); insert into test_proxima_be_restart_with_full_stage values(7598, 'name7598', 7608.111, 759800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7598]'); insert into test_proxima_be_restart_with_full_stage values(7599, 'name7599', 7609.111, 759900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7599]'); insert into test_proxima_be_restart_with_full_stage values(7600, 'name7600', 7610.111, 760000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7600]'); insert into test_proxima_be_restart_with_full_stage values(7601, 'name7601', 7611.111, 760100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7601]'); insert into test_proxima_be_restart_with_full_stage values(7602, 'name7602', 7612.111, 760200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7602]'); insert into test_proxima_be_restart_with_full_stage values(7603, 'name7603', 7613.111, 760300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7603]'); insert into test_proxima_be_restart_with_full_stage values(7604, 'name7604', 7614.111, 760400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7604]'); insert into test_proxima_be_restart_with_full_stage values(7605, 'name7605', 7615.111, 760500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7605]'); insert into test_proxima_be_restart_with_full_stage values(7606, 'name7606', 7616.111, 760600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7606]'); insert into test_proxima_be_restart_with_full_stage values(7607, 'name7607', 7617.111, 760700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7607]'); insert into test_proxima_be_restart_with_full_stage values(7608, 'name7608', 7618.111, 760800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7608]'); insert into test_proxima_be_restart_with_full_stage values(7609, 'name7609', 7619.111, 760900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7609]'); insert into test_proxima_be_restart_with_full_stage values(7610, 'name7610', 7620.111, 761000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7610]'); insert into test_proxima_be_restart_with_full_stage values(7611, 'name7611', 7621.111, 761100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7611]'); insert into test_proxima_be_restart_with_full_stage values(7612, 'name7612', 7622.111, 761200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7612]'); insert into test_proxima_be_restart_with_full_stage values(7613, 'name7613', 7623.111, 761300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7613]'); insert into test_proxima_be_restart_with_full_stage values(7614, 'name7614', 7624.111, 761400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7614]'); insert into test_proxima_be_restart_with_full_stage values(7615, 'name7615', 7625.111, 761500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7615]'); insert into test_proxima_be_restart_with_full_stage values(7616, 'name7616', 7626.111, 761600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7616]'); insert into test_proxima_be_restart_with_full_stage values(7617, 'name7617', 7627.111, 761700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7617]'); insert into test_proxima_be_restart_with_full_stage values(7618, 'name7618', 7628.111, 761800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7618]'); insert into test_proxima_be_restart_with_full_stage values(7619, 'name7619', 7629.111, 761900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7619]'); insert into test_proxima_be_restart_with_full_stage values(7620, 'name7620', 7630.111, 762000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7620]'); insert into test_proxima_be_restart_with_full_stage values(7621, 'name7621', 7631.111, 762100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7621]'); insert into test_proxima_be_restart_with_full_stage values(7622, 'name7622', 7632.111, 762200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7622]'); insert into test_proxima_be_restart_with_full_stage values(7623, 'name7623', 7633.111, 762300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7623]'); insert into test_proxima_be_restart_with_full_stage values(7624, 'name7624', 7634.111, 762400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7624]'); insert into test_proxima_be_restart_with_full_stage values(7625, 'name7625', 7635.111, 762500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7625]'); insert into test_proxima_be_restart_with_full_stage values(7626, 'name7626', 7636.111, 762600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7626]'); insert into test_proxima_be_restart_with_full_stage values(7627, 'name7627', 7637.111, 762700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7627]'); insert into test_proxima_be_restart_with_full_stage values(7628, 'name7628', 7638.111, 762800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7628]'); insert into test_proxima_be_restart_with_full_stage values(7629, 'name7629', 7639.111, 762900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7629]'); insert into test_proxima_be_restart_with_full_stage values(7630, 'name7630', 7640.111, 763000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7630]'); insert into test_proxima_be_restart_with_full_stage values(7631, 'name7631', 7641.111, 763100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7631]'); insert into test_proxima_be_restart_with_full_stage values(7632, 'name7632', 7642.111, 763200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7632]'); insert into test_proxima_be_restart_with_full_stage values(7633, 'name7633', 7643.111, 763300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7633]'); insert into test_proxima_be_restart_with_full_stage values(7634, 'name7634', 7644.111, 763400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7634]'); insert into test_proxima_be_restart_with_full_stage values(7635, 'name7635', 7645.111, 763500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7635]'); insert into test_proxima_be_restart_with_full_stage values(7636, 'name7636', 7646.111, 763600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7636]'); insert into test_proxima_be_restart_with_full_stage values(7637, 'name7637', 7647.111, 763700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7637]'); insert into test_proxima_be_restart_with_full_stage values(7638, 'name7638', 7648.111, 763800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7638]'); insert into test_proxima_be_restart_with_full_stage values(7639, 'name7639', 7649.111, 763900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7639]'); insert into test_proxima_be_restart_with_full_stage values(7640, 'name7640', 7650.111, 764000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7640]'); insert into test_proxima_be_restart_with_full_stage values(7641, 'name7641', 7651.111, 764100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7641]'); insert into test_proxima_be_restart_with_full_stage values(7642, 'name7642', 7652.111, 764200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7642]'); insert into test_proxima_be_restart_with_full_stage values(7643, 'name7643', 7653.111, 764300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7643]'); insert into test_proxima_be_restart_with_full_stage values(7644, 'name7644', 7654.111, 764400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7644]'); insert into test_proxima_be_restart_with_full_stage values(7645, 'name7645', 7655.111, 764500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7645]'); insert into test_proxima_be_restart_with_full_stage values(7646, 'name7646', 7656.111, 764600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7646]'); insert into test_proxima_be_restart_with_full_stage values(7647, 'name7647', 7657.111, 764700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7647]'); insert into test_proxima_be_restart_with_full_stage values(7648, 'name7648', 7658.111, 764800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7648]'); insert into test_proxima_be_restart_with_full_stage values(7649, 'name7649', 7659.111, 764900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7649]'); insert into test_proxima_be_restart_with_full_stage values(7650, 'name7650', 7660.111, 765000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7650]'); insert into test_proxima_be_restart_with_full_stage values(7651, 'name7651', 7661.111, 765100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7651]'); insert into test_proxima_be_restart_with_full_stage values(7652, 'name7652', 7662.111, 765200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7652]'); insert into test_proxima_be_restart_with_full_stage values(7653, 'name7653', 7663.111, 765300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7653]'); insert into test_proxima_be_restart_with_full_stage values(7654, 'name7654', 7664.111, 765400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7654]'); insert into test_proxima_be_restart_with_full_stage values(7655, 'name7655', 7665.111, 765500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7655]'); insert into test_proxima_be_restart_with_full_stage values(7656, 'name7656', 7666.111, 765600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7656]'); insert into test_proxima_be_restart_with_full_stage values(7657, 'name7657', 7667.111, 765700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7657]'); insert into test_proxima_be_restart_with_full_stage values(7658, 'name7658', 7668.111, 765800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7658]'); insert into test_proxima_be_restart_with_full_stage values(7659, 'name7659', 7669.111, 765900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7659]'); insert into test_proxima_be_restart_with_full_stage values(7660, 'name7660', 7670.111, 766000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7660]'); insert into test_proxima_be_restart_with_full_stage values(7661, 'name7661', 7671.111, 766100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7661]'); insert into test_proxima_be_restart_with_full_stage values(7662, 'name7662', 7672.111, 766200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7662]'); insert into test_proxima_be_restart_with_full_stage values(7663, 'name7663', 7673.111, 766300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7663]'); insert into test_proxima_be_restart_with_full_stage values(7664, 'name7664', 7674.111, 766400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7664]'); insert into test_proxima_be_restart_with_full_stage values(7665, 'name7665', 7675.111, 766500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7665]'); insert into test_proxima_be_restart_with_full_stage values(7666, 'name7666', 7676.111, 766600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7666]'); insert into test_proxima_be_restart_with_full_stage values(7667, 'name7667', 7677.111, 766700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7667]'); insert into test_proxima_be_restart_with_full_stage values(7668, 'name7668', 7678.111, 766800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7668]'); insert into test_proxima_be_restart_with_full_stage values(7669, 'name7669', 7679.111, 766900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7669]'); insert into test_proxima_be_restart_with_full_stage values(7670, 'name7670', 7680.111, 767000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7670]'); insert into test_proxima_be_restart_with_full_stage values(7671, 'name7671', 7681.111, 767100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7671]'); insert into test_proxima_be_restart_with_full_stage values(7672, 'name7672', 7682.111, 767200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7672]'); insert into test_proxima_be_restart_with_full_stage values(7673, 'name7673', 7683.111, 767300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7673]'); insert into test_proxima_be_restart_with_full_stage values(7674, 'name7674', 7684.111, 767400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7674]'); insert into test_proxima_be_restart_with_full_stage values(7675, 'name7675', 7685.111, 767500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7675]'); insert into test_proxima_be_restart_with_full_stage values(7676, 'name7676', 7686.111, 767600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7676]'); insert into test_proxima_be_restart_with_full_stage values(7677, 'name7677', 7687.111, 767700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7677]'); insert into test_proxima_be_restart_with_full_stage values(7678, 'name7678', 7688.111, 767800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7678]'); insert into test_proxima_be_restart_with_full_stage values(7679, 'name7679', 7689.111, 767900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7679]'); insert into test_proxima_be_restart_with_full_stage values(7680, 'name7680', 7690.111, 768000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7680]'); insert into test_proxima_be_restart_with_full_stage values(7681, 'name7681', 7691.111, 768100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7681]'); insert into test_proxima_be_restart_with_full_stage values(7682, 'name7682', 7692.111, 768200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7682]'); insert into test_proxima_be_restart_with_full_stage values(7683, 'name7683', 7693.111, 768300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7683]'); insert into test_proxima_be_restart_with_full_stage values(7684, 'name7684', 7694.111, 768400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7684]'); insert into test_proxima_be_restart_with_full_stage values(7685, 'name7685', 7695.111, 768500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7685]'); insert into test_proxima_be_restart_with_full_stage values(7686, 'name7686', 7696.111, 768600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7686]'); insert into test_proxima_be_restart_with_full_stage values(7687, 'name7687', 7697.111, 768700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7687]'); insert into test_proxima_be_restart_with_full_stage values(7688, 'name7688', 7698.111, 768800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7688]'); insert into test_proxima_be_restart_with_full_stage values(7689, 'name7689', 7699.111, 768900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7689]'); insert into test_proxima_be_restart_with_full_stage values(7690, 'name7690', 7700.111, 769000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7690]'); insert into test_proxima_be_restart_with_full_stage values(7691, 'name7691', 7701.111, 769100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7691]'); insert into test_proxima_be_restart_with_full_stage values(7692, 'name7692', 7702.111, 769200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7692]'); insert into test_proxima_be_restart_with_full_stage values(7693, 'name7693', 7703.111, 769300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7693]'); insert into test_proxima_be_restart_with_full_stage values(7694, 'name7694', 7704.111, 769400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7694]'); insert into test_proxima_be_restart_with_full_stage values(7695, 'name7695', 7705.111, 769500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7695]'); insert into test_proxima_be_restart_with_full_stage values(7696, 'name7696', 7706.111, 769600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7696]'); insert into test_proxima_be_restart_with_full_stage values(7697, 'name7697', 7707.111, 769700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7697]'); insert into test_proxima_be_restart_with_full_stage values(7698, 'name7698', 7708.111, 769800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7698]'); insert into test_proxima_be_restart_with_full_stage values(7699, 'name7699', 7709.111, 769900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7699]'); insert into test_proxima_be_restart_with_full_stage values(7700, 'name7700', 7710.111, 770000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7700]'); insert into test_proxima_be_restart_with_full_stage values(7701, 'name7701', 7711.111, 770100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7701]'); insert into test_proxima_be_restart_with_full_stage values(7702, 'name7702', 7712.111, 770200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7702]'); insert into test_proxima_be_restart_with_full_stage values(7703, 'name7703', 7713.111, 770300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7703]'); insert into test_proxima_be_restart_with_full_stage values(7704, 'name7704', 7714.111, 770400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7704]'); insert into test_proxima_be_restart_with_full_stage values(7705, 'name7705', 7715.111, 770500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7705]'); insert into test_proxima_be_restart_with_full_stage values(7706, 'name7706', 7716.111, 770600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7706]'); insert into test_proxima_be_restart_with_full_stage values(7707, 'name7707', 7717.111, 770700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7707]'); insert into test_proxima_be_restart_with_full_stage values(7708, 'name7708', 7718.111, 770800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7708]'); insert into test_proxima_be_restart_with_full_stage values(7709, 'name7709', 7719.111, 770900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7709]'); insert into test_proxima_be_restart_with_full_stage values(7710, 'name7710', 7720.111, 771000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7710]'); insert into test_proxima_be_restart_with_full_stage values(7711, 'name7711', 7721.111, 771100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7711]'); insert into test_proxima_be_restart_with_full_stage values(7712, 'name7712', 7722.111, 771200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7712]'); insert into test_proxima_be_restart_with_full_stage values(7713, 'name7713', 7723.111, 771300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7713]'); insert into test_proxima_be_restart_with_full_stage values(7714, 'name7714', 7724.111, 771400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7714]'); insert into test_proxima_be_restart_with_full_stage values(7715, 'name7715', 7725.111, 771500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7715]'); insert into test_proxima_be_restart_with_full_stage values(7716, 'name7716', 7726.111, 771600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7716]'); insert into test_proxima_be_restart_with_full_stage values(7717, 'name7717', 7727.111, 771700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7717]'); insert into test_proxima_be_restart_with_full_stage values(7718, 'name7718', 7728.111, 771800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7718]'); insert into test_proxima_be_restart_with_full_stage values(7719, 'name7719', 7729.111, 771900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7719]'); insert into test_proxima_be_restart_with_full_stage values(7720, 'name7720', 7730.111, 772000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7720]'); insert into test_proxima_be_restart_with_full_stage values(7721, 'name7721', 7731.111, 772100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7721]'); insert into test_proxima_be_restart_with_full_stage values(7722, 'name7722', 7732.111, 772200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7722]'); insert into test_proxima_be_restart_with_full_stage values(7723, 'name7723', 7733.111, 772300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7723]'); insert into test_proxima_be_restart_with_full_stage values(7724, 'name7724', 7734.111, 772400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7724]'); insert into test_proxima_be_restart_with_full_stage values(7725, 'name7725', 7735.111, 772500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7725]'); insert into test_proxima_be_restart_with_full_stage values(7726, 'name7726', 7736.111, 772600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7726]'); insert into test_proxima_be_restart_with_full_stage values(7727, 'name7727', 7737.111, 772700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7727]'); insert into test_proxima_be_restart_with_full_stage values(7728, 'name7728', 7738.111, 772800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7728]'); insert into test_proxima_be_restart_with_full_stage values(7729, 'name7729', 7739.111, 772900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7729]'); insert into test_proxima_be_restart_with_full_stage values(7730, 'name7730', 7740.111, 773000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7730]'); insert into test_proxima_be_restart_with_full_stage values(7731, 'name7731', 7741.111, 773100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7731]'); insert into test_proxima_be_restart_with_full_stage values(7732, 'name7732', 7742.111, 773200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7732]'); insert into test_proxima_be_restart_with_full_stage values(7733, 'name7733', 7743.111, 773300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7733]'); insert into test_proxima_be_restart_with_full_stage values(7734, 'name7734', 7744.111, 773400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7734]'); insert into test_proxima_be_restart_with_full_stage values(7735, 'name7735', 7745.111, 773500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7735]'); insert into test_proxima_be_restart_with_full_stage values(7736, 'name7736', 7746.111, 773600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7736]'); insert into test_proxima_be_restart_with_full_stage values(7737, 'name7737', 7747.111, 773700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7737]'); insert into test_proxima_be_restart_with_full_stage values(7738, 'name7738', 7748.111, 773800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7738]'); insert into test_proxima_be_restart_with_full_stage values(7739, 'name7739', 7749.111, 773900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7739]'); insert into test_proxima_be_restart_with_full_stage values(7740, 'name7740', 7750.111, 774000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7740]'); insert into test_proxima_be_restart_with_full_stage values(7741, 'name7741', 7751.111, 774100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7741]'); insert into test_proxima_be_restart_with_full_stage values(7742, 'name7742', 7752.111, 774200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7742]'); insert into test_proxima_be_restart_with_full_stage values(7743, 'name7743', 7753.111, 774300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7743]'); insert into test_proxima_be_restart_with_full_stage values(7744, 'name7744', 7754.111, 774400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7744]'); insert into test_proxima_be_restart_with_full_stage values(7745, 'name7745', 7755.111, 774500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7745]'); insert into test_proxima_be_restart_with_full_stage values(7746, 'name7746', 7756.111, 774600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7746]'); insert into test_proxima_be_restart_with_full_stage values(7747, 'name7747', 7757.111, 774700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7747]'); insert into test_proxima_be_restart_with_full_stage values(7748, 'name7748', 7758.111, 774800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7748]'); insert into test_proxima_be_restart_with_full_stage values(7749, 'name7749', 7759.111, 774900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7749]'); insert into test_proxima_be_restart_with_full_stage values(7750, 'name7750', 7760.111, 775000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7750]'); insert into test_proxima_be_restart_with_full_stage values(7751, 'name7751', 7761.111, 775100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7751]'); insert into test_proxima_be_restart_with_full_stage values(7752, 'name7752', 7762.111, 775200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7752]'); insert into test_proxima_be_restart_with_full_stage values(7753, 'name7753', 7763.111, 775300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7753]'); insert into test_proxima_be_restart_with_full_stage values(7754, 'name7754', 7764.111, 775400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7754]'); insert into test_proxima_be_restart_with_full_stage values(7755, 'name7755', 7765.111, 775500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7755]'); insert into test_proxima_be_restart_with_full_stage values(7756, 'name7756', 7766.111, 775600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7756]'); insert into test_proxima_be_restart_with_full_stage values(7757, 'name7757', 7767.111, 775700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7757]'); insert into test_proxima_be_restart_with_full_stage values(7758, 'name7758', 7768.111, 775800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7758]'); insert into test_proxima_be_restart_with_full_stage values(7759, 'name7759', 7769.111, 775900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7759]'); insert into test_proxima_be_restart_with_full_stage values(7760, 'name7760', 7770.111, 776000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7760]'); insert into test_proxima_be_restart_with_full_stage values(7761, 'name7761', 7771.111, 776100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7761]'); insert into test_proxima_be_restart_with_full_stage values(7762, 'name7762', 7772.111, 776200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7762]'); insert into test_proxima_be_restart_with_full_stage values(7763, 'name7763', 7773.111, 776300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7763]'); insert into test_proxima_be_restart_with_full_stage values(7764, 'name7764', 7774.111, 776400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7764]'); insert into test_proxima_be_restart_with_full_stage values(7765, 'name7765', 7775.111, 776500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7765]'); insert into test_proxima_be_restart_with_full_stage values(7766, 'name7766', 7776.111, 776600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7766]'); insert into test_proxima_be_restart_with_full_stage values(7767, 'name7767', 7777.111, 776700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7767]'); insert into test_proxima_be_restart_with_full_stage values(7768, 'name7768', 7778.111, 776800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7768]'); insert into test_proxima_be_restart_with_full_stage values(7769, 'name7769', 7779.111, 776900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7769]'); insert into test_proxima_be_restart_with_full_stage values(7770, 'name7770', 7780.111, 777000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7770]'); insert into test_proxima_be_restart_with_full_stage values(7771, 'name7771', 7781.111, 777100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7771]'); insert into test_proxima_be_restart_with_full_stage values(7772, 'name7772', 7782.111, 777200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7772]'); insert into test_proxima_be_restart_with_full_stage values(7773, 'name7773', 7783.111, 777300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7773]'); insert into test_proxima_be_restart_with_full_stage values(7774, 'name7774', 7784.111, 777400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7774]'); insert into test_proxima_be_restart_with_full_stage values(7775, 'name7775', 7785.111, 777500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7775]'); insert into test_proxima_be_restart_with_full_stage values(7776, 'name7776', 7786.111, 777600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7776]'); insert into test_proxima_be_restart_with_full_stage values(7777, 'name7777', 7787.111, 777700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7777]'); insert into test_proxima_be_restart_with_full_stage values(7778, 'name7778', 7788.111, 777800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7778]'); insert into test_proxima_be_restart_with_full_stage values(7779, 'name7779', 7789.111, 777900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7779]'); insert into test_proxima_be_restart_with_full_stage values(7780, 'name7780', 7790.111, 778000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7780]'); insert into test_proxima_be_restart_with_full_stage values(7781, 'name7781', 7791.111, 778100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7781]'); insert into test_proxima_be_restart_with_full_stage values(7782, 'name7782', 7792.111, 778200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7782]'); insert into test_proxima_be_restart_with_full_stage values(7783, 'name7783', 7793.111, 778300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7783]'); insert into test_proxima_be_restart_with_full_stage values(7784, 'name7784', 7794.111, 778400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7784]'); insert into test_proxima_be_restart_with_full_stage values(7785, 'name7785', 7795.111, 778500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7785]'); insert into test_proxima_be_restart_with_full_stage values(7786, 'name7786', 7796.111, 778600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7786]'); insert into test_proxima_be_restart_with_full_stage values(7787, 'name7787', 7797.111, 778700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7787]'); insert into test_proxima_be_restart_with_full_stage values(7788, 'name7788', 7798.111, 778800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7788]'); insert into test_proxima_be_restart_with_full_stage values(7789, 'name7789', 7799.111, 778900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7789]'); insert into test_proxima_be_restart_with_full_stage values(7790, 'name7790', 7800.111, 779000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7790]'); insert into test_proxima_be_restart_with_full_stage values(7791, 'name7791', 7801.111, 779100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7791]'); insert into test_proxima_be_restart_with_full_stage values(7792, 'name7792', 7802.111, 779200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7792]'); insert into test_proxima_be_restart_with_full_stage values(7793, 'name7793', 7803.111, 779300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7793]'); insert into test_proxima_be_restart_with_full_stage values(7794, 'name7794', 7804.111, 779400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7794]'); insert into test_proxima_be_restart_with_full_stage values(7795, 'name7795', 7805.111, 779500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7795]'); insert into test_proxima_be_restart_with_full_stage values(7796, 'name7796', 7806.111, 779600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7796]'); insert into test_proxima_be_restart_with_full_stage values(7797, 'name7797', 7807.111, 779700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7797]'); insert into test_proxima_be_restart_with_full_stage values(7798, 'name7798', 7808.111, 779800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7798]'); insert into test_proxima_be_restart_with_full_stage values(7799, 'name7799', 7809.111, 779900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7799]'); insert into test_proxima_be_restart_with_full_stage values(7800, 'name7800', 7810.111, 780000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7800]'); insert into test_proxima_be_restart_with_full_stage values(7801, 'name7801', 7811.111, 780100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7801]'); insert into test_proxima_be_restart_with_full_stage values(7802, 'name7802', 7812.111, 780200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7802]'); insert into test_proxima_be_restart_with_full_stage values(7803, 'name7803', 7813.111, 780300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7803]'); insert into test_proxima_be_restart_with_full_stage values(7804, 'name7804', 7814.111, 780400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7804]'); insert into test_proxima_be_restart_with_full_stage values(7805, 'name7805', 7815.111, 780500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7805]'); insert into test_proxima_be_restart_with_full_stage values(7806, 'name7806', 7816.111, 780600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7806]'); insert into test_proxima_be_restart_with_full_stage values(7807, 'name7807', 7817.111, 780700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7807]'); insert into test_proxima_be_restart_with_full_stage values(7808, 'name7808', 7818.111, 780800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7808]'); insert into test_proxima_be_restart_with_full_stage values(7809, 'name7809', 7819.111, 780900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7809]'); insert into test_proxima_be_restart_with_full_stage values(7810, 'name7810', 7820.111, 781000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7810]'); insert into test_proxima_be_restart_with_full_stage values(7811, 'name7811', 7821.111, 781100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7811]'); insert into test_proxima_be_restart_with_full_stage values(7812, 'name7812', 7822.111, 781200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7812]'); insert into test_proxima_be_restart_with_full_stage values(7813, 'name7813', 7823.111, 781300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7813]'); insert into test_proxima_be_restart_with_full_stage values(7814, 'name7814', 7824.111, 781400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7814]'); insert into test_proxima_be_restart_with_full_stage values(7815, 'name7815', 7825.111, 781500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7815]'); insert into test_proxima_be_restart_with_full_stage values(7816, 'name7816', 7826.111, 781600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7816]'); insert into test_proxima_be_restart_with_full_stage values(7817, 'name7817', 7827.111, 781700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7817]'); insert into test_proxima_be_restart_with_full_stage values(7818, 'name7818', 7828.111, 781800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7818]'); insert into test_proxima_be_restart_with_full_stage values(7819, 'name7819', 7829.111, 781900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7819]'); insert into test_proxima_be_restart_with_full_stage values(7820, 'name7820', 7830.111, 782000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7820]'); insert into test_proxima_be_restart_with_full_stage values(7821, 'name7821', 7831.111, 782100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7821]'); insert into test_proxima_be_restart_with_full_stage values(7822, 'name7822', 7832.111, 782200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7822]'); insert into test_proxima_be_restart_with_full_stage values(7823, 'name7823', 7833.111, 782300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7823]'); insert into test_proxima_be_restart_with_full_stage values(7824, 'name7824', 7834.111, 782400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7824]'); insert into test_proxima_be_restart_with_full_stage values(7825, 'name7825', 7835.111, 782500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7825]'); insert into test_proxima_be_restart_with_full_stage values(7826, 'name7826', 7836.111, 782600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7826]'); insert into test_proxima_be_restart_with_full_stage values(7827, 'name7827', 7837.111, 782700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7827]'); insert into test_proxima_be_restart_with_full_stage values(7828, 'name7828', 7838.111, 782800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7828]'); insert into test_proxima_be_restart_with_full_stage values(7829, 'name7829', 7839.111, 782900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7829]'); insert into test_proxima_be_restart_with_full_stage values(7830, 'name7830', 7840.111, 783000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7830]'); insert into test_proxima_be_restart_with_full_stage values(7831, 'name7831', 7841.111, 783100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7831]'); insert into test_proxima_be_restart_with_full_stage values(7832, 'name7832', 7842.111, 783200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7832]'); insert into test_proxima_be_restart_with_full_stage values(7833, 'name7833', 7843.111, 783300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7833]'); insert into test_proxima_be_restart_with_full_stage values(7834, 'name7834', 7844.111, 783400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7834]'); insert into test_proxima_be_restart_with_full_stage values(7835, 'name7835', 7845.111, 783500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7835]'); insert into test_proxima_be_restart_with_full_stage values(7836, 'name7836', 7846.111, 783600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7836]'); insert into test_proxima_be_restart_with_full_stage values(7837, 'name7837', 7847.111, 783700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7837]'); insert into test_proxima_be_restart_with_full_stage values(7838, 'name7838', 7848.111, 783800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7838]'); insert into test_proxima_be_restart_with_full_stage values(7839, 'name7839', 7849.111, 783900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7839]'); insert into test_proxima_be_restart_with_full_stage values(7840, 'name7840', 7850.111, 784000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7840]'); insert into test_proxima_be_restart_with_full_stage values(7841, 'name7841', 7851.111, 784100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7841]'); insert into test_proxima_be_restart_with_full_stage values(7842, 'name7842', 7852.111, 784200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7842]'); insert into test_proxima_be_restart_with_full_stage values(7843, 'name7843', 7853.111, 784300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7843]'); insert into test_proxima_be_restart_with_full_stage values(7844, 'name7844', 7854.111, 784400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7844]'); insert into test_proxima_be_restart_with_full_stage values(7845, 'name7845', 7855.111, 784500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7845]'); insert into test_proxima_be_restart_with_full_stage values(7846, 'name7846', 7856.111, 784600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7846]'); insert into test_proxima_be_restart_with_full_stage values(7847, 'name7847', 7857.111, 784700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7847]'); insert into test_proxima_be_restart_with_full_stage values(7848, 'name7848', 7858.111, 784800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7848]'); insert into test_proxima_be_restart_with_full_stage values(7849, 'name7849', 7859.111, 784900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7849]'); insert into test_proxima_be_restart_with_full_stage values(7850, 'name7850', 7860.111, 785000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7850]'); insert into test_proxima_be_restart_with_full_stage values(7851, 'name7851', 7861.111, 785100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7851]'); insert into test_proxima_be_restart_with_full_stage values(7852, 'name7852', 7862.111, 785200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7852]'); insert into test_proxima_be_restart_with_full_stage values(7853, 'name7853', 7863.111, 785300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7853]'); insert into test_proxima_be_restart_with_full_stage values(7854, 'name7854', 7864.111, 785400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7854]'); insert into test_proxima_be_restart_with_full_stage values(7855, 'name7855', 7865.111, 785500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7855]'); insert into test_proxima_be_restart_with_full_stage values(7856, 'name7856', 7866.111, 785600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7856]'); insert into test_proxima_be_restart_with_full_stage values(7857, 'name7857', 7867.111, 785700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7857]'); insert into test_proxima_be_restart_with_full_stage values(7858, 'name7858', 7868.111, 785800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7858]'); insert into test_proxima_be_restart_with_full_stage values(7859, 'name7859', 7869.111, 785900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7859]'); insert into test_proxima_be_restart_with_full_stage values(7860, 'name7860', 7870.111, 786000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7860]'); insert into test_proxima_be_restart_with_full_stage values(7861, 'name7861', 7871.111, 786100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7861]'); insert into test_proxima_be_restart_with_full_stage values(7862, 'name7862', 7872.111, 786200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7862]'); insert into test_proxima_be_restart_with_full_stage values(7863, 'name7863', 7873.111, 786300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7863]'); insert into test_proxima_be_restart_with_full_stage values(7864, 'name7864', 7874.111, 786400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7864]'); insert into test_proxima_be_restart_with_full_stage values(7865, 'name7865', 7875.111, 786500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7865]'); insert into test_proxima_be_restart_with_full_stage values(7866, 'name7866', 7876.111, 786600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7866]'); insert into test_proxima_be_restart_with_full_stage values(7867, 'name7867', 7877.111, 786700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7867]'); insert into test_proxima_be_restart_with_full_stage values(7868, 'name7868', 7878.111, 786800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7868]'); insert into test_proxima_be_restart_with_full_stage values(7869, 'name7869', 7879.111, 786900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7869]'); insert into test_proxima_be_restart_with_full_stage values(7870, 'name7870', 7880.111, 787000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7870]'); insert into test_proxima_be_restart_with_full_stage values(7871, 'name7871', 7881.111, 787100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7871]'); insert into test_proxima_be_restart_with_full_stage values(7872, 'name7872', 7882.111, 787200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7872]'); insert into test_proxima_be_restart_with_full_stage values(7873, 'name7873', 7883.111, 787300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7873]'); insert into test_proxima_be_restart_with_full_stage values(7874, 'name7874', 7884.111, 787400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7874]'); insert into test_proxima_be_restart_with_full_stage values(7875, 'name7875', 7885.111, 787500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7875]'); insert into test_proxima_be_restart_with_full_stage values(7876, 'name7876', 7886.111, 787600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7876]'); insert into test_proxima_be_restart_with_full_stage values(7877, 'name7877', 7887.111, 787700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7877]'); insert into test_proxima_be_restart_with_full_stage values(7878, 'name7878', 7888.111, 787800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7878]'); insert into test_proxima_be_restart_with_full_stage values(7879, 'name7879', 7889.111, 787900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7879]'); insert into test_proxima_be_restart_with_full_stage values(7880, 'name7880', 7890.111, 788000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7880]'); insert into test_proxima_be_restart_with_full_stage values(7881, 'name7881', 7891.111, 788100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7881]'); insert into test_proxima_be_restart_with_full_stage values(7882, 'name7882', 7892.111, 788200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7882]'); insert into test_proxima_be_restart_with_full_stage values(7883, 'name7883', 7893.111, 788300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7883]'); insert into test_proxima_be_restart_with_full_stage values(7884, 'name7884', 7894.111, 788400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7884]'); insert into test_proxima_be_restart_with_full_stage values(7885, 'name7885', 7895.111, 788500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7885]'); insert into test_proxima_be_restart_with_full_stage values(7886, 'name7886', 7896.111, 788600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7886]'); insert into test_proxima_be_restart_with_full_stage values(7887, 'name7887', 7897.111, 788700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7887]'); insert into test_proxima_be_restart_with_full_stage values(7888, 'name7888', 7898.111, 788800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7888]'); insert into test_proxima_be_restart_with_full_stage values(7889, 'name7889', 7899.111, 788900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7889]'); insert into test_proxima_be_restart_with_full_stage values(7890, 'name7890', 7900.111, 789000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7890]'); insert into test_proxima_be_restart_with_full_stage values(7891, 'name7891', 7901.111, 789100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7891]'); insert into test_proxima_be_restart_with_full_stage values(7892, 'name7892', 7902.111, 789200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7892]'); insert into test_proxima_be_restart_with_full_stage values(7893, 'name7893', 7903.111, 789300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7893]'); insert into test_proxima_be_restart_with_full_stage values(7894, 'name7894', 7904.111, 789400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7894]'); insert into test_proxima_be_restart_with_full_stage values(7895, 'name7895', 7905.111, 789500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7895]'); insert into test_proxima_be_restart_with_full_stage values(7896, 'name7896', 7906.111, 789600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7896]'); insert into test_proxima_be_restart_with_full_stage values(7897, 'name7897', 7907.111, 789700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7897]'); insert into test_proxima_be_restart_with_full_stage values(7898, 'name7898', 7908.111, 789800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7898]'); insert into test_proxima_be_restart_with_full_stage values(7899, 'name7899', 7909.111, 789900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7899]'); insert into test_proxima_be_restart_with_full_stage values(7900, 'name7900', 7910.111, 790000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7900]'); insert into test_proxima_be_restart_with_full_stage values(7901, 'name7901', 7911.111, 790100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7901]'); insert into test_proxima_be_restart_with_full_stage values(7902, 'name7902', 7912.111, 790200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7902]'); insert into test_proxima_be_restart_with_full_stage values(7903, 'name7903', 7913.111, 790300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7903]'); insert into test_proxima_be_restart_with_full_stage values(7904, 'name7904', 7914.111, 790400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7904]'); insert into test_proxima_be_restart_with_full_stage values(7905, 'name7905', 7915.111, 790500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7905]'); insert into test_proxima_be_restart_with_full_stage values(7906, 'name7906', 7916.111, 790600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7906]'); insert into test_proxima_be_restart_with_full_stage values(7907, 'name7907', 7917.111, 790700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7907]'); insert into test_proxima_be_restart_with_full_stage values(7908, 'name7908', 7918.111, 790800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7908]'); insert into test_proxima_be_restart_with_full_stage values(7909, 'name7909', 7919.111, 790900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7909]'); insert into test_proxima_be_restart_with_full_stage values(7910, 'name7910', 7920.111, 791000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7910]'); insert into test_proxima_be_restart_with_full_stage values(7911, 'name7911', 7921.111, 791100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7911]'); insert into test_proxima_be_restart_with_full_stage values(7912, 'name7912', 7922.111, 791200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7912]'); insert into test_proxima_be_restart_with_full_stage values(7913, 'name7913', 7923.111, 791300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7913]'); insert into test_proxima_be_restart_with_full_stage values(7914, 'name7914', 7924.111, 791400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7914]'); insert into test_proxima_be_restart_with_full_stage values(7915, 'name7915', 7925.111, 791500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7915]'); insert into test_proxima_be_restart_with_full_stage values(7916, 'name7916', 7926.111, 791600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7916]'); insert into test_proxima_be_restart_with_full_stage values(7917, 'name7917', 7927.111, 791700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7917]'); insert into test_proxima_be_restart_with_full_stage values(7918, 'name7918', 7928.111, 791800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7918]'); insert into test_proxima_be_restart_with_full_stage values(7919, 'name7919', 7929.111, 791900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7919]'); insert into test_proxima_be_restart_with_full_stage values(7920, 'name7920', 7930.111, 792000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7920]'); insert into test_proxima_be_restart_with_full_stage values(7921, 'name7921', 7931.111, 792100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7921]'); insert into test_proxima_be_restart_with_full_stage values(7922, 'name7922', 7932.111, 792200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7922]'); insert into test_proxima_be_restart_with_full_stage values(7923, 'name7923', 7933.111, 792300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7923]'); insert into test_proxima_be_restart_with_full_stage values(7924, 'name7924', 7934.111, 792400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7924]'); insert into test_proxima_be_restart_with_full_stage values(7925, 'name7925', 7935.111, 792500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7925]'); insert into test_proxima_be_restart_with_full_stage values(7926, 'name7926', 7936.111, 792600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7926]'); insert into test_proxima_be_restart_with_full_stage values(7927, 'name7927', 7937.111, 792700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7927]'); insert into test_proxima_be_restart_with_full_stage values(7928, 'name7928', 7938.111, 792800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7928]'); insert into test_proxima_be_restart_with_full_stage values(7929, 'name7929', 7939.111, 792900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7929]'); insert into test_proxima_be_restart_with_full_stage values(7930, 'name7930', 7940.111, 793000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7930]'); insert into test_proxima_be_restart_with_full_stage values(7931, 'name7931', 7941.111, 793100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7931]'); insert into test_proxima_be_restart_with_full_stage values(7932, 'name7932', 7942.111, 793200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7932]'); insert into test_proxima_be_restart_with_full_stage values(7933, 'name7933', 7943.111, 793300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7933]'); insert into test_proxima_be_restart_with_full_stage values(7934, 'name7934', 7944.111, 793400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7934]'); insert into test_proxima_be_restart_with_full_stage values(7935, 'name7935', 7945.111, 793500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7935]'); insert into test_proxima_be_restart_with_full_stage values(7936, 'name7936', 7946.111, 793600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7936]'); insert into test_proxima_be_restart_with_full_stage values(7937, 'name7937', 7947.111, 793700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7937]'); insert into test_proxima_be_restart_with_full_stage values(7938, 'name7938', 7948.111, 793800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7938]'); insert into test_proxima_be_restart_with_full_stage values(7939, 'name7939', 7949.111, 793900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7939]'); insert into test_proxima_be_restart_with_full_stage values(7940, 'name7940', 7950.111, 794000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7940]'); insert into test_proxima_be_restart_with_full_stage values(7941, 'name7941', 7951.111, 794100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7941]'); insert into test_proxima_be_restart_with_full_stage values(7942, 'name7942', 7952.111, 794200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7942]'); insert into test_proxima_be_restart_with_full_stage values(7943, 'name7943', 7953.111, 794300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7943]'); insert into test_proxima_be_restart_with_full_stage values(7944, 'name7944', 7954.111, 794400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7944]'); insert into test_proxima_be_restart_with_full_stage values(7945, 'name7945', 7955.111, 794500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7945]'); insert into test_proxima_be_restart_with_full_stage values(7946, 'name7946', 7956.111, 794600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7946]'); insert into test_proxima_be_restart_with_full_stage values(7947, 'name7947', 7957.111, 794700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7947]'); insert into test_proxima_be_restart_with_full_stage values(7948, 'name7948', 7958.111, 794800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7948]'); insert into test_proxima_be_restart_with_full_stage values(7949, 'name7949', 7959.111, 794900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7949]'); insert into test_proxima_be_restart_with_full_stage values(7950, 'name7950', 7960.111, 795000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7950]'); insert into test_proxima_be_restart_with_full_stage values(7951, 'name7951', 7961.111, 795100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7951]'); insert into test_proxima_be_restart_with_full_stage values(7952, 'name7952', 7962.111, 795200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7952]'); insert into test_proxima_be_restart_with_full_stage values(7953, 'name7953', 7963.111, 795300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7953]'); insert into test_proxima_be_restart_with_full_stage values(7954, 'name7954', 7964.111, 795400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7954]'); insert into test_proxima_be_restart_with_full_stage values(7955, 'name7955', 7965.111, 795500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7955]'); insert into test_proxima_be_restart_with_full_stage values(7956, 'name7956', 7966.111, 795600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7956]'); insert into test_proxima_be_restart_with_full_stage values(7957, 'name7957', 7967.111, 795700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7957]'); insert into test_proxima_be_restart_with_full_stage values(7958, 'name7958', 7968.111, 795800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7958]'); insert into test_proxima_be_restart_with_full_stage values(7959, 'name7959', 7969.111, 795900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7959]'); insert into test_proxima_be_restart_with_full_stage values(7960, 'name7960', 7970.111, 796000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7960]'); insert into test_proxima_be_restart_with_full_stage values(7961, 'name7961', 7971.111, 796100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7961]'); insert into test_proxima_be_restart_with_full_stage values(7962, 'name7962', 7972.111, 796200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7962]'); insert into test_proxima_be_restart_with_full_stage values(7963, 'name7963', 7973.111, 796300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7963]'); insert into test_proxima_be_restart_with_full_stage values(7964, 'name7964', 7974.111, 796400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7964]'); insert into test_proxima_be_restart_with_full_stage values(7965, 'name7965', 7975.111, 796500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7965]'); insert into test_proxima_be_restart_with_full_stage values(7966, 'name7966', 7976.111, 796600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7966]'); insert into test_proxima_be_restart_with_full_stage values(7967, 'name7967', 7977.111, 796700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7967]'); insert into test_proxima_be_restart_with_full_stage values(7968, 'name7968', 7978.111, 796800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7968]'); insert into test_proxima_be_restart_with_full_stage values(7969, 'name7969', 7979.111, 796900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7969]'); insert into test_proxima_be_restart_with_full_stage values(7970, 'name7970', 7980.111, 797000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7970]'); insert into test_proxima_be_restart_with_full_stage values(7971, 'name7971', 7981.111, 797100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7971]'); insert into test_proxima_be_restart_with_full_stage values(7972, 'name7972', 7982.111, 797200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7972]'); insert into test_proxima_be_restart_with_full_stage values(7973, 'name7973', 7983.111, 797300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7973]'); insert into test_proxima_be_restart_with_full_stage values(7974, 'name7974', 7984.111, 797400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7974]'); insert into test_proxima_be_restart_with_full_stage values(7975, 'name7975', 7985.111, 797500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7975]'); insert into test_proxima_be_restart_with_full_stage values(7976, 'name7976', 7986.111, 797600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7976]'); insert into test_proxima_be_restart_with_full_stage values(7977, 'name7977', 7987.111, 797700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7977]'); insert into test_proxima_be_restart_with_full_stage values(7978, 'name7978', 7988.111, 797800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7978]'); insert into test_proxima_be_restart_with_full_stage values(7979, 'name7979', 7989.111, 797900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7979]'); insert into test_proxima_be_restart_with_full_stage values(7980, 'name7980', 7990.111, 798000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7980]'); insert into test_proxima_be_restart_with_full_stage values(7981, 'name7981', 7991.111, 798100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7981]'); insert into test_proxima_be_restart_with_full_stage values(7982, 'name7982', 7992.111, 798200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7982]'); insert into test_proxima_be_restart_with_full_stage values(7983, 'name7983', 7993.111, 798300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7983]'); insert into test_proxima_be_restart_with_full_stage values(7984, 'name7984', 7994.111, 798400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7984]'); insert into test_proxima_be_restart_with_full_stage values(7985, 'name7985', 7995.111, 798500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7985]'); insert into test_proxima_be_restart_with_full_stage values(7986, 'name7986', 7996.111, 798600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7986]'); insert into test_proxima_be_restart_with_full_stage values(7987, 'name7987', 7997.111, 798700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7987]'); insert into test_proxima_be_restart_with_full_stage values(7988, 'name7988', 7998.111, 798800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7988]'); insert into test_proxima_be_restart_with_full_stage values(7989, 'name7989', 7999.111, 798900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7989]'); insert into test_proxima_be_restart_with_full_stage values(7990, 'name7990', 8000.111, 799000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7990]'); insert into test_proxima_be_restart_with_full_stage values(7991, 'name7991', 8001.111, 799100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7991]'); insert into test_proxima_be_restart_with_full_stage values(7992, 'name7992', 8002.111, 799200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7992]'); insert into test_proxima_be_restart_with_full_stage values(7993, 'name7993', 8003.111, 799300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7993]'); insert into test_proxima_be_restart_with_full_stage values(7994, 'name7994', 8004.111, 799400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7994]'); insert into test_proxima_be_restart_with_full_stage values(7995, 'name7995', 8005.111, 799500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7995]'); insert into test_proxima_be_restart_with_full_stage values(7996, 'name7996', 8006.111, 799600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7996]'); insert into test_proxima_be_restart_with_full_stage values(7997, 'name7997', 8007.111, 799700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7997]'); insert into test_proxima_be_restart_with_full_stage values(7998, 'name7998', 8008.111, 799800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7998]'); insert into test_proxima_be_restart_with_full_stage values(7999, 'name7999', 8009.111, 799900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7999]'); insert into test_proxima_be_restart_with_full_stage values(8000, 'name8000', 8010.111, 800000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8000]'); insert into test_proxima_be_restart_with_full_stage values(8001, 'name8001', 8011.111, 800100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8001]'); insert into test_proxima_be_restart_with_full_stage values(8002, 'name8002', 8012.111, 800200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8002]'); insert into test_proxima_be_restart_with_full_stage values(8003, 'name8003', 8013.111, 800300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8003]'); insert into test_proxima_be_restart_with_full_stage values(8004, 'name8004', 8014.111, 800400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8004]'); insert into test_proxima_be_restart_with_full_stage values(8005, 'name8005', 8015.111, 800500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8005]'); insert into test_proxima_be_restart_with_full_stage values(8006, 'name8006', 8016.111, 800600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8006]'); insert into test_proxima_be_restart_with_full_stage values(8007, 'name8007', 8017.111, 800700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8007]'); insert into test_proxima_be_restart_with_full_stage values(8008, 'name8008', 8018.111, 800800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8008]'); insert into test_proxima_be_restart_with_full_stage values(8009, 'name8009', 8019.111, 800900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8009]'); insert into test_proxima_be_restart_with_full_stage values(8010, 'name8010', 8020.111, 801000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8010]'); insert into test_proxima_be_restart_with_full_stage values(8011, 'name8011', 8021.111, 801100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8011]'); insert into test_proxima_be_restart_with_full_stage values(8012, 'name8012', 8022.111, 801200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8012]'); insert into test_proxima_be_restart_with_full_stage values(8013, 'name8013', 8023.111, 801300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8013]'); insert into test_proxima_be_restart_with_full_stage values(8014, 'name8014', 8024.111, 801400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8014]'); insert into test_proxima_be_restart_with_full_stage values(8015, 'name8015', 8025.111, 801500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8015]'); insert into test_proxima_be_restart_with_full_stage values(8016, 'name8016', 8026.111, 801600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8016]'); insert into test_proxima_be_restart_with_full_stage values(8017, 'name8017', 8027.111, 801700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8017]'); insert into test_proxima_be_restart_with_full_stage values(8018, 'name8018', 8028.111, 801800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8018]'); insert into test_proxima_be_restart_with_full_stage values(8019, 'name8019', 8029.111, 801900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8019]'); insert into test_proxima_be_restart_with_full_stage values(8020, 'name8020', 8030.111, 802000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8020]'); insert into test_proxima_be_restart_with_full_stage values(8021, 'name8021', 8031.111, 802100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8021]'); insert into test_proxima_be_restart_with_full_stage values(8022, 'name8022', 8032.111, 802200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8022]'); insert into test_proxima_be_restart_with_full_stage values(8023, 'name8023', 8033.111, 802300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8023]'); insert into test_proxima_be_restart_with_full_stage values(8024, 'name8024', 8034.111, 802400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8024]'); insert into test_proxima_be_restart_with_full_stage values(8025, 'name8025', 8035.111, 802500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8025]'); insert into test_proxima_be_restart_with_full_stage values(8026, 'name8026', 8036.111, 802600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8026]'); insert into test_proxima_be_restart_with_full_stage values(8027, 'name8027', 8037.111, 802700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8027]'); insert into test_proxima_be_restart_with_full_stage values(8028, 'name8028', 8038.111, 802800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8028]'); insert into test_proxima_be_restart_with_full_stage values(8029, 'name8029', 8039.111, 802900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8029]'); insert into test_proxima_be_restart_with_full_stage values(8030, 'name8030', 8040.111, 803000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8030]'); insert into test_proxima_be_restart_with_full_stage values(8031, 'name8031', 8041.111, 803100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8031]'); insert into test_proxima_be_restart_with_full_stage values(8032, 'name8032', 8042.111, 803200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8032]'); insert into test_proxima_be_restart_with_full_stage values(8033, 'name8033', 8043.111, 803300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8033]'); insert into test_proxima_be_restart_with_full_stage values(8034, 'name8034', 8044.111, 803400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8034]'); insert into test_proxima_be_restart_with_full_stage values(8035, 'name8035', 8045.111, 803500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8035]'); insert into test_proxima_be_restart_with_full_stage values(8036, 'name8036', 8046.111, 803600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8036]'); insert into test_proxima_be_restart_with_full_stage values(8037, 'name8037', 8047.111, 803700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8037]'); insert into test_proxima_be_restart_with_full_stage values(8038, 'name8038', 8048.111, 803800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8038]'); insert into test_proxima_be_restart_with_full_stage values(8039, 'name8039', 8049.111, 803900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8039]'); insert into test_proxima_be_restart_with_full_stage values(8040, 'name8040', 8050.111, 804000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8040]'); insert into test_proxima_be_restart_with_full_stage values(8041, 'name8041', 8051.111, 804100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8041]'); insert into test_proxima_be_restart_with_full_stage values(8042, 'name8042', 8052.111, 804200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8042]'); insert into test_proxima_be_restart_with_full_stage values(8043, 'name8043', 8053.111, 804300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8043]'); insert into test_proxima_be_restart_with_full_stage values(8044, 'name8044', 8054.111, 804400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8044]'); insert into test_proxima_be_restart_with_full_stage values(8045, 'name8045', 8055.111, 804500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8045]'); insert into test_proxima_be_restart_with_full_stage values(8046, 'name8046', 8056.111, 804600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8046]'); insert into test_proxima_be_restart_with_full_stage values(8047, 'name8047', 8057.111, 804700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8047]'); insert into test_proxima_be_restart_with_full_stage values(8048, 'name8048', 8058.111, 804800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8048]'); insert into test_proxima_be_restart_with_full_stage values(8049, 'name8049', 8059.111, 804900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8049]'); insert into test_proxima_be_restart_with_full_stage values(8050, 'name8050', 8060.111, 805000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8050]'); insert into test_proxima_be_restart_with_full_stage values(8051, 'name8051', 8061.111, 805100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8051]'); insert into test_proxima_be_restart_with_full_stage values(8052, 'name8052', 8062.111, 805200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8052]'); insert into test_proxima_be_restart_with_full_stage values(8053, 'name8053', 8063.111, 805300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8053]'); insert into test_proxima_be_restart_with_full_stage values(8054, 'name8054', 8064.111, 805400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8054]'); insert into test_proxima_be_restart_with_full_stage values(8055, 'name8055', 8065.111, 805500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8055]'); insert into test_proxima_be_restart_with_full_stage values(8056, 'name8056', 8066.111, 805600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8056]'); insert into test_proxima_be_restart_with_full_stage values(8057, 'name8057', 8067.111, 805700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8057]'); insert into test_proxima_be_restart_with_full_stage values(8058, 'name8058', 8068.111, 805800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8058]'); insert into test_proxima_be_restart_with_full_stage values(8059, 'name8059', 8069.111, 805900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8059]'); insert into test_proxima_be_restart_with_full_stage values(8060, 'name8060', 8070.111, 806000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8060]'); insert into test_proxima_be_restart_with_full_stage values(8061, 'name8061', 8071.111, 806100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8061]'); insert into test_proxima_be_restart_with_full_stage values(8062, 'name8062', 8072.111, 806200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8062]'); insert into test_proxima_be_restart_with_full_stage values(8063, 'name8063', 8073.111, 806300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8063]'); insert into test_proxima_be_restart_with_full_stage values(8064, 'name8064', 8074.111, 806400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8064]'); insert into test_proxima_be_restart_with_full_stage values(8065, 'name8065', 8075.111, 806500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8065]'); insert into test_proxima_be_restart_with_full_stage values(8066, 'name8066', 8076.111, 806600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8066]'); insert into test_proxima_be_restart_with_full_stage values(8067, 'name8067', 8077.111, 806700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8067]'); insert into test_proxima_be_restart_with_full_stage values(8068, 'name8068', 8078.111, 806800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8068]'); insert into test_proxima_be_restart_with_full_stage values(8069, 'name8069', 8079.111, 806900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8069]'); insert into test_proxima_be_restart_with_full_stage values(8070, 'name8070', 8080.111, 807000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8070]'); insert into test_proxima_be_restart_with_full_stage values(8071, 'name8071', 8081.111, 807100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8071]'); insert into test_proxima_be_restart_with_full_stage values(8072, 'name8072', 8082.111, 807200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8072]'); insert into test_proxima_be_restart_with_full_stage values(8073, 'name8073', 8083.111, 807300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8073]'); insert into test_proxima_be_restart_with_full_stage values(8074, 'name8074', 8084.111, 807400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8074]'); insert into test_proxima_be_restart_with_full_stage values(8075, 'name8075', 8085.111, 807500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8075]'); insert into test_proxima_be_restart_with_full_stage values(8076, 'name8076', 8086.111, 807600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8076]'); insert into test_proxima_be_restart_with_full_stage values(8077, 'name8077', 8087.111, 807700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8077]'); insert into test_proxima_be_restart_with_full_stage values(8078, 'name8078', 8088.111, 807800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8078]'); insert into test_proxima_be_restart_with_full_stage values(8079, 'name8079', 8089.111, 807900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8079]'); insert into test_proxima_be_restart_with_full_stage values(8080, 'name8080', 8090.111, 808000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8080]'); insert into test_proxima_be_restart_with_full_stage values(8081, 'name8081', 8091.111, 808100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8081]'); insert into test_proxima_be_restart_with_full_stage values(8082, 'name8082', 8092.111, 808200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8082]'); insert into test_proxima_be_restart_with_full_stage values(8083, 'name8083', 8093.111, 808300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8083]'); insert into test_proxima_be_restart_with_full_stage values(8084, 'name8084', 8094.111, 808400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8084]'); insert into test_proxima_be_restart_with_full_stage values(8085, 'name8085', 8095.111, 808500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8085]'); insert into test_proxima_be_restart_with_full_stage values(8086, 'name8086', 8096.111, 808600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8086]'); insert into test_proxima_be_restart_with_full_stage values(8087, 'name8087', 8097.111, 808700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8087]'); insert into test_proxima_be_restart_with_full_stage values(8088, 'name8088', 8098.111, 808800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8088]'); insert into test_proxima_be_restart_with_full_stage values(8089, 'name8089', 8099.111, 808900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8089]'); insert into test_proxima_be_restart_with_full_stage values(8090, 'name8090', 8100.111, 809000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8090]'); insert into test_proxima_be_restart_with_full_stage values(8091, 'name8091', 8101.111, 809100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8091]'); insert into test_proxima_be_restart_with_full_stage values(8092, 'name8092', 8102.111, 809200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8092]'); insert into test_proxima_be_restart_with_full_stage values(8093, 'name8093', 8103.111, 809300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8093]'); insert into test_proxima_be_restart_with_full_stage values(8094, 'name8094', 8104.111, 809400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8094]'); insert into test_proxima_be_restart_with_full_stage values(8095, 'name8095', 8105.111, 809500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8095]'); insert into test_proxima_be_restart_with_full_stage values(8096, 'name8096', 8106.111, 809600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8096]'); insert into test_proxima_be_restart_with_full_stage values(8097, 'name8097', 8107.111, 809700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8097]'); insert into test_proxima_be_restart_with_full_stage values(8098, 'name8098', 8108.111, 809800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8098]'); insert into test_proxima_be_restart_with_full_stage values(8099, 'name8099', 8109.111, 809900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8099]'); insert into test_proxima_be_restart_with_full_stage values(8100, 'name8100', 8110.111, 810000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8100]'); insert into test_proxima_be_restart_with_full_stage values(8101, 'name8101', 8111.111, 810100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8101]'); insert into test_proxima_be_restart_with_full_stage values(8102, 'name8102', 8112.111, 810200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8102]'); insert into test_proxima_be_restart_with_full_stage values(8103, 'name8103', 8113.111, 810300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8103]'); insert into test_proxima_be_restart_with_full_stage values(8104, 'name8104', 8114.111, 810400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8104]'); insert into test_proxima_be_restart_with_full_stage values(8105, 'name8105', 8115.111, 810500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8105]'); insert into test_proxima_be_restart_with_full_stage values(8106, 'name8106', 8116.111, 810600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8106]'); insert into test_proxima_be_restart_with_full_stage values(8107, 'name8107', 8117.111, 810700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8107]'); insert into test_proxima_be_restart_with_full_stage values(8108, 'name8108', 8118.111, 810800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8108]'); insert into test_proxima_be_restart_with_full_stage values(8109, 'name8109', 8119.111, 810900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8109]'); insert into test_proxima_be_restart_with_full_stage values(8110, 'name8110', 8120.111, 811000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8110]'); insert into test_proxima_be_restart_with_full_stage values(8111, 'name8111', 8121.111, 811100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8111]'); insert into test_proxima_be_restart_with_full_stage values(8112, 'name8112', 8122.111, 811200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8112]'); insert into test_proxima_be_restart_with_full_stage values(8113, 'name8113', 8123.111, 811300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8113]'); insert into test_proxima_be_restart_with_full_stage values(8114, 'name8114', 8124.111, 811400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8114]'); insert into test_proxima_be_restart_with_full_stage values(8115, 'name8115', 8125.111, 811500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8115]'); insert into test_proxima_be_restart_with_full_stage values(8116, 'name8116', 8126.111, 811600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8116]'); insert into test_proxima_be_restart_with_full_stage values(8117, 'name8117', 8127.111, 811700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8117]'); insert into test_proxima_be_restart_with_full_stage values(8118, 'name8118', 8128.111, 811800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8118]'); insert into test_proxima_be_restart_with_full_stage values(8119, 'name8119', 8129.111, 811900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8119]'); insert into test_proxima_be_restart_with_full_stage values(8120, 'name8120', 8130.111, 812000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8120]'); insert into test_proxima_be_restart_with_full_stage values(8121, 'name8121', 8131.111, 812100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8121]'); insert into test_proxima_be_restart_with_full_stage values(8122, 'name8122', 8132.111, 812200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8122]'); insert into test_proxima_be_restart_with_full_stage values(8123, 'name8123', 8133.111, 812300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8123]'); insert into test_proxima_be_restart_with_full_stage values(8124, 'name8124', 8134.111, 812400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8124]'); insert into test_proxima_be_restart_with_full_stage values(8125, 'name8125', 8135.111, 812500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8125]'); insert into test_proxima_be_restart_with_full_stage values(8126, 'name8126', 8136.111, 812600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8126]'); insert into test_proxima_be_restart_with_full_stage values(8127, 'name8127', 8137.111, 812700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8127]'); insert into test_proxima_be_restart_with_full_stage values(8128, 'name8128', 8138.111, 812800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8128]'); insert into test_proxima_be_restart_with_full_stage values(8129, 'name8129', 8139.111, 812900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8129]'); insert into test_proxima_be_restart_with_full_stage values(8130, 'name8130', 8140.111, 813000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8130]'); insert into test_proxima_be_restart_with_full_stage values(8131, 'name8131', 8141.111, 813100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8131]'); insert into test_proxima_be_restart_with_full_stage values(8132, 'name8132', 8142.111, 813200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8132]'); insert into test_proxima_be_restart_with_full_stage values(8133, 'name8133', 8143.111, 813300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8133]'); insert into test_proxima_be_restart_with_full_stage values(8134, 'name8134', 8144.111, 813400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8134]'); insert into test_proxima_be_restart_with_full_stage values(8135, 'name8135', 8145.111, 813500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8135]'); insert into test_proxima_be_restart_with_full_stage values(8136, 'name8136', 8146.111, 813600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8136]'); insert into test_proxima_be_restart_with_full_stage values(8137, 'name8137', 8147.111, 813700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8137]'); insert into test_proxima_be_restart_with_full_stage values(8138, 'name8138', 8148.111, 813800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8138]'); insert into test_proxima_be_restart_with_full_stage values(8139, 'name8139', 8149.111, 813900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8139]'); insert into test_proxima_be_restart_with_full_stage values(8140, 'name8140', 8150.111, 814000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8140]'); insert into test_proxima_be_restart_with_full_stage values(8141, 'name8141', 8151.111, 814100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8141]'); insert into test_proxima_be_restart_with_full_stage values(8142, 'name8142', 8152.111, 814200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8142]'); insert into test_proxima_be_restart_with_full_stage values(8143, 'name8143', 8153.111, 814300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8143]'); insert into test_proxima_be_restart_with_full_stage values(8144, 'name8144', 8154.111, 814400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8144]'); insert into test_proxima_be_restart_with_full_stage values(8145, 'name8145', 8155.111, 814500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8145]'); insert into test_proxima_be_restart_with_full_stage values(8146, 'name8146', 8156.111, 814600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8146]'); insert into test_proxima_be_restart_with_full_stage values(8147, 'name8147', 8157.111, 814700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8147]'); insert into test_proxima_be_restart_with_full_stage values(8148, 'name8148', 8158.111, 814800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8148]'); insert into test_proxima_be_restart_with_full_stage values(8149, 'name8149', 8159.111, 814900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8149]'); insert into test_proxima_be_restart_with_full_stage values(8150, 'name8150', 8160.111, 815000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8150]'); insert into test_proxima_be_restart_with_full_stage values(8151, 'name8151', 8161.111, 815100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8151]'); insert into test_proxima_be_restart_with_full_stage values(8152, 'name8152', 8162.111, 815200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8152]'); insert into test_proxima_be_restart_with_full_stage values(8153, 'name8153', 8163.111, 815300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8153]'); insert into test_proxima_be_restart_with_full_stage values(8154, 'name8154', 8164.111, 815400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8154]'); insert into test_proxima_be_restart_with_full_stage values(8155, 'name8155', 8165.111, 815500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8155]'); insert into test_proxima_be_restart_with_full_stage values(8156, 'name8156', 8166.111, 815600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8156]'); insert into test_proxima_be_restart_with_full_stage values(8157, 'name8157', 8167.111, 815700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8157]'); insert into test_proxima_be_restart_with_full_stage values(8158, 'name8158', 8168.111, 815800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8158]'); insert into test_proxima_be_restart_with_full_stage values(8159, 'name8159', 8169.111, 815900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8159]'); insert into test_proxima_be_restart_with_full_stage values(8160, 'name8160', 8170.111, 816000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8160]'); insert into test_proxima_be_restart_with_full_stage values(8161, 'name8161', 8171.111, 816100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8161]'); insert into test_proxima_be_restart_with_full_stage values(8162, 'name8162', 8172.111, 816200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8162]'); insert into test_proxima_be_restart_with_full_stage values(8163, 'name8163', 8173.111, 816300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8163]'); insert into test_proxima_be_restart_with_full_stage values(8164, 'name8164', 8174.111, 816400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8164]'); insert into test_proxima_be_restart_with_full_stage values(8165, 'name8165', 8175.111, 816500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8165]'); insert into test_proxima_be_restart_with_full_stage values(8166, 'name8166', 8176.111, 816600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8166]'); insert into test_proxima_be_restart_with_full_stage values(8167, 'name8167', 8177.111, 816700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8167]'); insert into test_proxima_be_restart_with_full_stage values(8168, 'name8168', 8178.111, 816800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8168]'); insert into test_proxima_be_restart_with_full_stage values(8169, 'name8169', 8179.111, 816900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8169]'); insert into test_proxima_be_restart_with_full_stage values(8170, 'name8170', 8180.111, 817000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8170]'); insert into test_proxima_be_restart_with_full_stage values(8171, 'name8171', 8181.111, 817100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8171]'); insert into test_proxima_be_restart_with_full_stage values(8172, 'name8172', 8182.111, 817200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8172]'); insert into test_proxima_be_restart_with_full_stage values(8173, 'name8173', 8183.111, 817300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8173]'); insert into test_proxima_be_restart_with_full_stage values(8174, 'name8174', 8184.111, 817400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8174]'); insert into test_proxima_be_restart_with_full_stage values(8175, 'name8175', 8185.111, 817500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8175]'); insert into test_proxima_be_restart_with_full_stage values(8176, 'name8176', 8186.111, 817600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8176]'); insert into test_proxima_be_restart_with_full_stage values(8177, 'name8177', 8187.111, 817700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8177]'); insert into test_proxima_be_restart_with_full_stage values(8178, 'name8178', 8188.111, 817800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8178]'); insert into test_proxima_be_restart_with_full_stage values(8179, 'name8179', 8189.111, 817900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8179]'); insert into test_proxima_be_restart_with_full_stage values(8180, 'name8180', 8190.111, 818000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8180]'); insert into test_proxima_be_restart_with_full_stage values(8181, 'name8181', 8191.111, 818100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8181]'); insert into test_proxima_be_restart_with_full_stage values(8182, 'name8182', 8192.111, 818200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8182]'); insert into test_proxima_be_restart_with_full_stage values(8183, 'name8183', 8193.111, 818300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8183]'); insert into test_proxima_be_restart_with_full_stage values(8184, 'name8184', 8194.111, 818400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8184]'); insert into test_proxima_be_restart_with_full_stage values(8185, 'name8185', 8195.111, 818500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8185]'); insert into test_proxima_be_restart_with_full_stage values(8186, 'name8186', 8196.111, 818600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8186]'); insert into test_proxima_be_restart_with_full_stage values(8187, 'name8187', 8197.111, 818700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8187]'); insert into test_proxima_be_restart_with_full_stage values(8188, 'name8188', 8198.111, 818800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8188]'); insert into test_proxima_be_restart_with_full_stage values(8189, 'name8189', 8199.111, 818900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8189]'); insert into test_proxima_be_restart_with_full_stage values(8190, 'name8190', 8200.111, 819000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8190]'); insert into test_proxima_be_restart_with_full_stage values(8191, 'name8191', 8201.111, 819100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8191]'); insert into test_proxima_be_restart_with_full_stage values(8192, 'name8192', 8202.111, 819200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8192]'); insert into test_proxima_be_restart_with_full_stage values(8193, 'name8193', 8203.111, 819300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8193]'); insert into test_proxima_be_restart_with_full_stage values(8194, 'name8194', 8204.111, 819400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8194]'); insert into test_proxima_be_restart_with_full_stage values(8195, 'name8195', 8205.111, 819500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8195]'); insert into test_proxima_be_restart_with_full_stage values(8196, 'name8196', 8206.111, 819600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8196]'); insert into test_proxima_be_restart_with_full_stage values(8197, 'name8197', 8207.111, 819700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8197]'); insert into test_proxima_be_restart_with_full_stage values(8198, 'name8198', 8208.111, 819800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8198]'); insert into test_proxima_be_restart_with_full_stage values(8199, 'name8199', 8209.111, 819900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8199]'); insert into test_proxima_be_restart_with_full_stage values(8200, 'name8200', 8210.111, 820000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8200]'); insert into test_proxima_be_restart_with_full_stage values(8201, 'name8201', 8211.111, 820100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8201]'); insert into test_proxima_be_restart_with_full_stage values(8202, 'name8202', 8212.111, 820200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8202]'); insert into test_proxima_be_restart_with_full_stage values(8203, 'name8203', 8213.111, 820300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8203]'); insert into test_proxima_be_restart_with_full_stage values(8204, 'name8204', 8214.111, 820400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8204]'); insert into test_proxima_be_restart_with_full_stage values(8205, 'name8205', 8215.111, 820500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8205]'); insert into test_proxima_be_restart_with_full_stage values(8206, 'name8206', 8216.111, 820600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8206]'); insert into test_proxima_be_restart_with_full_stage values(8207, 'name8207', 8217.111, 820700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8207]'); insert into test_proxima_be_restart_with_full_stage values(8208, 'name8208', 8218.111, 820800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8208]'); insert into test_proxima_be_restart_with_full_stage values(8209, 'name8209', 8219.111, 820900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8209]'); insert into test_proxima_be_restart_with_full_stage values(8210, 'name8210', 8220.111, 821000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8210]'); insert into test_proxima_be_restart_with_full_stage values(8211, 'name8211', 8221.111, 821100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8211]'); insert into test_proxima_be_restart_with_full_stage values(8212, 'name8212', 8222.111, 821200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8212]'); insert into test_proxima_be_restart_with_full_stage values(8213, 'name8213', 8223.111, 821300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8213]'); insert into test_proxima_be_restart_with_full_stage values(8214, 'name8214', 8224.111, 821400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8214]'); insert into test_proxima_be_restart_with_full_stage values(8215, 'name8215', 8225.111, 821500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8215]'); insert into test_proxima_be_restart_with_full_stage values(8216, 'name8216', 8226.111, 821600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8216]'); insert into test_proxima_be_restart_with_full_stage values(8217, 'name8217', 8227.111, 821700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8217]'); insert into test_proxima_be_restart_with_full_stage values(8218, 'name8218', 8228.111, 821800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8218]'); insert into test_proxima_be_restart_with_full_stage values(8219, 'name8219', 8229.111, 821900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8219]'); insert into test_proxima_be_restart_with_full_stage values(8220, 'name8220', 8230.111, 822000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8220]'); insert into test_proxima_be_restart_with_full_stage values(8221, 'name8221', 8231.111, 822100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8221]'); insert into test_proxima_be_restart_with_full_stage values(8222, 'name8222', 8232.111, 822200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8222]'); insert into test_proxima_be_restart_with_full_stage values(8223, 'name8223', 8233.111, 822300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8223]'); insert into test_proxima_be_restart_with_full_stage values(8224, 'name8224', 8234.111, 822400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8224]'); insert into test_proxima_be_restart_with_full_stage values(8225, 'name8225', 8235.111, 822500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8225]'); insert into test_proxima_be_restart_with_full_stage values(8226, 'name8226', 8236.111, 822600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8226]'); insert into test_proxima_be_restart_with_full_stage values(8227, 'name8227', 8237.111, 822700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8227]'); insert into test_proxima_be_restart_with_full_stage values(8228, 'name8228', 8238.111, 822800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8228]'); insert into test_proxima_be_restart_with_full_stage values(8229, 'name8229', 8239.111, 822900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8229]'); insert into test_proxima_be_restart_with_full_stage values(8230, 'name8230', 8240.111, 823000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8230]'); insert into test_proxima_be_restart_with_full_stage values(8231, 'name8231', 8241.111, 823100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8231]'); insert into test_proxima_be_restart_with_full_stage values(8232, 'name8232', 8242.111, 823200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8232]'); insert into test_proxima_be_restart_with_full_stage values(8233, 'name8233', 8243.111, 823300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8233]'); insert into test_proxima_be_restart_with_full_stage values(8234, 'name8234', 8244.111, 823400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8234]'); insert into test_proxima_be_restart_with_full_stage values(8235, 'name8235', 8245.111, 823500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8235]'); insert into test_proxima_be_restart_with_full_stage values(8236, 'name8236', 8246.111, 823600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8236]'); insert into test_proxima_be_restart_with_full_stage values(8237, 'name8237', 8247.111, 823700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8237]'); insert into test_proxima_be_restart_with_full_stage values(8238, 'name8238', 8248.111, 823800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8238]'); insert into test_proxima_be_restart_with_full_stage values(8239, 'name8239', 8249.111, 823900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8239]'); insert into test_proxima_be_restart_with_full_stage values(8240, 'name8240', 8250.111, 824000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8240]'); insert into test_proxima_be_restart_with_full_stage values(8241, 'name8241', 8251.111, 824100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8241]'); insert into test_proxima_be_restart_with_full_stage values(8242, 'name8242', 8252.111, 824200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8242]'); insert into test_proxima_be_restart_with_full_stage values(8243, 'name8243', 8253.111, 824300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8243]'); insert into test_proxima_be_restart_with_full_stage values(8244, 'name8244', 8254.111, 824400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8244]'); insert into test_proxima_be_restart_with_full_stage values(8245, 'name8245', 8255.111, 824500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8245]'); insert into test_proxima_be_restart_with_full_stage values(8246, 'name8246', 8256.111, 824600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8246]'); insert into test_proxima_be_restart_with_full_stage values(8247, 'name8247', 8257.111, 824700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8247]'); insert into test_proxima_be_restart_with_full_stage values(8248, 'name8248', 8258.111, 824800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8248]'); insert into test_proxima_be_restart_with_full_stage values(8249, 'name8249', 8259.111, 824900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8249]'); insert into test_proxima_be_restart_with_full_stage values(8250, 'name8250', 8260.111, 825000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8250]'); insert into test_proxima_be_restart_with_full_stage values(8251, 'name8251', 8261.111, 825100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8251]'); insert into test_proxima_be_restart_with_full_stage values(8252, 'name8252', 8262.111, 825200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8252]'); insert into test_proxima_be_restart_with_full_stage values(8253, 'name8253', 8263.111, 825300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8253]'); insert into test_proxima_be_restart_with_full_stage values(8254, 'name8254', 8264.111, 825400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8254]'); insert into test_proxima_be_restart_with_full_stage values(8255, 'name8255', 8265.111, 825500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8255]'); insert into test_proxima_be_restart_with_full_stage values(8256, 'name8256', 8266.111, 825600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8256]'); insert into test_proxima_be_restart_with_full_stage values(8257, 'name8257', 8267.111, 825700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8257]'); insert into test_proxima_be_restart_with_full_stage values(8258, 'name8258', 8268.111, 825800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8258]'); insert into test_proxima_be_restart_with_full_stage values(8259, 'name8259', 8269.111, 825900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8259]'); insert into test_proxima_be_restart_with_full_stage values(8260, 'name8260', 8270.111, 826000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8260]'); insert into test_proxima_be_restart_with_full_stage values(8261, 'name8261', 8271.111, 826100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8261]'); insert into test_proxima_be_restart_with_full_stage values(8262, 'name8262', 8272.111, 826200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8262]'); insert into test_proxima_be_restart_with_full_stage values(8263, 'name8263', 8273.111, 826300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8263]'); insert into test_proxima_be_restart_with_full_stage values(8264, 'name8264', 8274.111, 826400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8264]'); insert into test_proxima_be_restart_with_full_stage values(8265, 'name8265', 8275.111, 826500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8265]'); insert into test_proxima_be_restart_with_full_stage values(8266, 'name8266', 8276.111, 826600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8266]'); insert into test_proxima_be_restart_with_full_stage values(8267, 'name8267', 8277.111, 826700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8267]'); insert into test_proxima_be_restart_with_full_stage values(8268, 'name8268', 8278.111, 826800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8268]'); insert into test_proxima_be_restart_with_full_stage values(8269, 'name8269', 8279.111, 826900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8269]'); insert into test_proxima_be_restart_with_full_stage values(8270, 'name8270', 8280.111, 827000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8270]'); insert into test_proxima_be_restart_with_full_stage values(8271, 'name8271', 8281.111, 827100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8271]'); insert into test_proxima_be_restart_with_full_stage values(8272, 'name8272', 8282.111, 827200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8272]'); insert into test_proxima_be_restart_with_full_stage values(8273, 'name8273', 8283.111, 827300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8273]'); insert into test_proxima_be_restart_with_full_stage values(8274, 'name8274', 8284.111, 827400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8274]'); insert into test_proxima_be_restart_with_full_stage values(8275, 'name8275', 8285.111, 827500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8275]'); insert into test_proxima_be_restart_with_full_stage values(8276, 'name8276', 8286.111, 827600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8276]'); insert into test_proxima_be_restart_with_full_stage values(8277, 'name8277', 8287.111, 827700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8277]'); insert into test_proxima_be_restart_with_full_stage values(8278, 'name8278', 8288.111, 827800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8278]'); insert into test_proxima_be_restart_with_full_stage values(8279, 'name8279', 8289.111, 827900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8279]'); insert into test_proxima_be_restart_with_full_stage values(8280, 'name8280', 8290.111, 828000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8280]'); insert into test_proxima_be_restart_with_full_stage values(8281, 'name8281', 8291.111, 828100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8281]'); insert into test_proxima_be_restart_with_full_stage values(8282, 'name8282', 8292.111, 828200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8282]'); insert into test_proxima_be_restart_with_full_stage values(8283, 'name8283', 8293.111, 828300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8283]'); insert into test_proxima_be_restart_with_full_stage values(8284, 'name8284', 8294.111, 828400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8284]'); insert into test_proxima_be_restart_with_full_stage values(8285, 'name8285', 8295.111, 828500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8285]'); insert into test_proxima_be_restart_with_full_stage values(8286, 'name8286', 8296.111, 828600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8286]'); insert into test_proxima_be_restart_with_full_stage values(8287, 'name8287', 8297.111, 828700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8287]'); insert into test_proxima_be_restart_with_full_stage values(8288, 'name8288', 8298.111, 828800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8288]'); insert into test_proxima_be_restart_with_full_stage values(8289, 'name8289', 8299.111, 828900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8289]'); insert into test_proxima_be_restart_with_full_stage values(8290, 'name8290', 8300.111, 829000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8290]'); insert into test_proxima_be_restart_with_full_stage values(8291, 'name8291', 8301.111, 829100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8291]'); insert into test_proxima_be_restart_with_full_stage values(8292, 'name8292', 8302.111, 829200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8292]'); insert into test_proxima_be_restart_with_full_stage values(8293, 'name8293', 8303.111, 829300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8293]'); insert into test_proxima_be_restart_with_full_stage values(8294, 'name8294', 8304.111, 829400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8294]'); insert into test_proxima_be_restart_with_full_stage values(8295, 'name8295', 8305.111, 829500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8295]'); insert into test_proxima_be_restart_with_full_stage values(8296, 'name8296', 8306.111, 829600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8296]'); insert into test_proxima_be_restart_with_full_stage values(8297, 'name8297', 8307.111, 829700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8297]'); insert into test_proxima_be_restart_with_full_stage values(8298, 'name8298', 8308.111, 829800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8298]'); insert into test_proxima_be_restart_with_full_stage values(8299, 'name8299', 8309.111, 829900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8299]'); insert into test_proxima_be_restart_with_full_stage values(8300, 'name8300', 8310.111, 830000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8300]'); insert into test_proxima_be_restart_with_full_stage values(8301, 'name8301', 8311.111, 830100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8301]'); insert into test_proxima_be_restart_with_full_stage values(8302, 'name8302', 8312.111, 830200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8302]'); insert into test_proxima_be_restart_with_full_stage values(8303, 'name8303', 8313.111, 830300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8303]'); insert into test_proxima_be_restart_with_full_stage values(8304, 'name8304', 8314.111, 830400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8304]'); insert into test_proxima_be_restart_with_full_stage values(8305, 'name8305', 8315.111, 830500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8305]'); insert into test_proxima_be_restart_with_full_stage values(8306, 'name8306', 8316.111, 830600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8306]'); insert into test_proxima_be_restart_with_full_stage values(8307, 'name8307', 8317.111, 830700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8307]'); insert into test_proxima_be_restart_with_full_stage values(8308, 'name8308', 8318.111, 830800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8308]'); insert into test_proxima_be_restart_with_full_stage values(8309, 'name8309', 8319.111, 830900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8309]'); insert into test_proxima_be_restart_with_full_stage values(8310, 'name8310', 8320.111, 831000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8310]'); insert into test_proxima_be_restart_with_full_stage values(8311, 'name8311', 8321.111, 831100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8311]'); insert into test_proxima_be_restart_with_full_stage values(8312, 'name8312', 8322.111, 831200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8312]'); insert into test_proxima_be_restart_with_full_stage values(8313, 'name8313', 8323.111, 831300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8313]'); insert into test_proxima_be_restart_with_full_stage values(8314, 'name8314', 8324.111, 831400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8314]'); insert into test_proxima_be_restart_with_full_stage values(8315, 'name8315', 8325.111, 831500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8315]'); insert into test_proxima_be_restart_with_full_stage values(8316, 'name8316', 8326.111, 831600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8316]'); insert into test_proxima_be_restart_with_full_stage values(8317, 'name8317', 8327.111, 831700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8317]'); insert into test_proxima_be_restart_with_full_stage values(8318, 'name8318', 8328.111, 831800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8318]'); insert into test_proxima_be_restart_with_full_stage values(8319, 'name8319', 8329.111, 831900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8319]'); insert into test_proxima_be_restart_with_full_stage values(8320, 'name8320', 8330.111, 832000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8320]'); insert into test_proxima_be_restart_with_full_stage values(8321, 'name8321', 8331.111, 832100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8321]'); insert into test_proxima_be_restart_with_full_stage values(8322, 'name8322', 8332.111, 832200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8322]'); insert into test_proxima_be_restart_with_full_stage values(8323, 'name8323', 8333.111, 832300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8323]'); insert into test_proxima_be_restart_with_full_stage values(8324, 'name8324', 8334.111, 832400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8324]'); insert into test_proxima_be_restart_with_full_stage values(8325, 'name8325', 8335.111, 832500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8325]'); insert into test_proxima_be_restart_with_full_stage values(8326, 'name8326', 8336.111, 832600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8326]'); insert into test_proxima_be_restart_with_full_stage values(8327, 'name8327', 8337.111, 832700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8327]'); insert into test_proxima_be_restart_with_full_stage values(8328, 'name8328', 8338.111, 832800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8328]'); insert into test_proxima_be_restart_with_full_stage values(8329, 'name8329', 8339.111, 832900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8329]'); insert into test_proxima_be_restart_with_full_stage values(8330, 'name8330', 8340.111, 833000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8330]'); insert into test_proxima_be_restart_with_full_stage values(8331, 'name8331', 8341.111, 833100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8331]'); insert into test_proxima_be_restart_with_full_stage values(8332, 'name8332', 8342.111, 833200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8332]'); insert into test_proxima_be_restart_with_full_stage values(8333, 'name8333', 8343.111, 833300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8333]'); insert into test_proxima_be_restart_with_full_stage values(8334, 'name8334', 8344.111, 833400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8334]'); insert into test_proxima_be_restart_with_full_stage values(8335, 'name8335', 8345.111, 833500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8335]'); insert into test_proxima_be_restart_with_full_stage values(8336, 'name8336', 8346.111, 833600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8336]'); insert into test_proxima_be_restart_with_full_stage values(8337, 'name8337', 8347.111, 833700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8337]'); insert into test_proxima_be_restart_with_full_stage values(8338, 'name8338', 8348.111, 833800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8338]'); insert into test_proxima_be_restart_with_full_stage values(8339, 'name8339', 8349.111, 833900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8339]'); insert into test_proxima_be_restart_with_full_stage values(8340, 'name8340', 8350.111, 834000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8340]'); insert into test_proxima_be_restart_with_full_stage values(8341, 'name8341', 8351.111, 834100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8341]'); insert into test_proxima_be_restart_with_full_stage values(8342, 'name8342', 8352.111, 834200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8342]'); insert into test_proxima_be_restart_with_full_stage values(8343, 'name8343', 8353.111, 834300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8343]'); insert into test_proxima_be_restart_with_full_stage values(8344, 'name8344', 8354.111, 834400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8344]'); insert into test_proxima_be_restart_with_full_stage values(8345, 'name8345', 8355.111, 834500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8345]'); insert into test_proxima_be_restart_with_full_stage values(8346, 'name8346', 8356.111, 834600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8346]'); insert into test_proxima_be_restart_with_full_stage values(8347, 'name8347', 8357.111, 834700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8347]'); insert into test_proxima_be_restart_with_full_stage values(8348, 'name8348', 8358.111, 834800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8348]'); insert into test_proxima_be_restart_with_full_stage values(8349, 'name8349', 8359.111, 834900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8349]'); insert into test_proxima_be_restart_with_full_stage values(8350, 'name8350', 8360.111, 835000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8350]'); insert into test_proxima_be_restart_with_full_stage values(8351, 'name8351', 8361.111, 835100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8351]'); insert into test_proxima_be_restart_with_full_stage values(8352, 'name8352', 8362.111, 835200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8352]'); insert into test_proxima_be_restart_with_full_stage values(8353, 'name8353', 8363.111, 835300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8353]'); insert into test_proxima_be_restart_with_full_stage values(8354, 'name8354', 8364.111, 835400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8354]'); insert into test_proxima_be_restart_with_full_stage values(8355, 'name8355', 8365.111, 835500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8355]'); insert into test_proxima_be_restart_with_full_stage values(8356, 'name8356', 8366.111, 835600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8356]'); insert into test_proxima_be_restart_with_full_stage values(8357, 'name8357', 8367.111, 835700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8357]'); insert into test_proxima_be_restart_with_full_stage values(8358, 'name8358', 8368.111, 835800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8358]'); insert into test_proxima_be_restart_with_full_stage values(8359, 'name8359', 8369.111, 835900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8359]'); insert into test_proxima_be_restart_with_full_stage values(8360, 'name8360', 8370.111, 836000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8360]'); insert into test_proxima_be_restart_with_full_stage values(8361, 'name8361', 8371.111, 836100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8361]'); insert into test_proxima_be_restart_with_full_stage values(8362, 'name8362', 8372.111, 836200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8362]'); insert into test_proxima_be_restart_with_full_stage values(8363, 'name8363', 8373.111, 836300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8363]'); insert into test_proxima_be_restart_with_full_stage values(8364, 'name8364', 8374.111, 836400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8364]'); insert into test_proxima_be_restart_with_full_stage values(8365, 'name8365', 8375.111, 836500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8365]'); insert into test_proxima_be_restart_with_full_stage values(8366, 'name8366', 8376.111, 836600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8366]'); insert into test_proxima_be_restart_with_full_stage values(8367, 'name8367', 8377.111, 836700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8367]'); insert into test_proxima_be_restart_with_full_stage values(8368, 'name8368', 8378.111, 836800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8368]'); insert into test_proxima_be_restart_with_full_stage values(8369, 'name8369', 8379.111, 836900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8369]'); insert into test_proxima_be_restart_with_full_stage values(8370, 'name8370', 8380.111, 837000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8370]'); insert into test_proxima_be_restart_with_full_stage values(8371, 'name8371', 8381.111, 837100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8371]'); insert into test_proxima_be_restart_with_full_stage values(8372, 'name8372', 8382.111, 837200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8372]'); insert into test_proxima_be_restart_with_full_stage values(8373, 'name8373', 8383.111, 837300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8373]'); insert into test_proxima_be_restart_with_full_stage values(8374, 'name8374', 8384.111, 837400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8374]'); insert into test_proxima_be_restart_with_full_stage values(8375, 'name8375', 8385.111, 837500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8375]'); insert into test_proxima_be_restart_with_full_stage values(8376, 'name8376', 8386.111, 837600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8376]'); insert into test_proxima_be_restart_with_full_stage values(8377, 'name8377', 8387.111, 837700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8377]'); insert into test_proxima_be_restart_with_full_stage values(8378, 'name8378', 8388.111, 837800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8378]'); insert into test_proxima_be_restart_with_full_stage values(8379, 'name8379', 8389.111, 837900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8379]'); insert into test_proxima_be_restart_with_full_stage values(8380, 'name8380', 8390.111, 838000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8380]'); insert into test_proxima_be_restart_with_full_stage values(8381, 'name8381', 8391.111, 838100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8381]'); insert into test_proxima_be_restart_with_full_stage values(8382, 'name8382', 8392.111, 838200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8382]'); insert into test_proxima_be_restart_with_full_stage values(8383, 'name8383', 8393.111, 838300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8383]'); insert into test_proxima_be_restart_with_full_stage values(8384, 'name8384', 8394.111, 838400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8384]'); insert into test_proxima_be_restart_with_full_stage values(8385, 'name8385', 8395.111, 838500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8385]'); insert into test_proxima_be_restart_with_full_stage values(8386, 'name8386', 8396.111, 838600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8386]'); insert into test_proxima_be_restart_with_full_stage values(8387, 'name8387', 8397.111, 838700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8387]'); insert into test_proxima_be_restart_with_full_stage values(8388, 'name8388', 8398.111, 838800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8388]'); insert into test_proxima_be_restart_with_full_stage values(8389, 'name8389', 8399.111, 838900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8389]'); insert into test_proxima_be_restart_with_full_stage values(8390, 'name8390', 8400.111, 839000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8390]'); insert into test_proxima_be_restart_with_full_stage values(8391, 'name8391', 8401.111, 839100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8391]'); insert into test_proxima_be_restart_with_full_stage values(8392, 'name8392', 8402.111, 839200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8392]'); insert into test_proxima_be_restart_with_full_stage values(8393, 'name8393', 8403.111, 839300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8393]'); insert into test_proxima_be_restart_with_full_stage values(8394, 'name8394', 8404.111, 839400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8394]'); insert into test_proxima_be_restart_with_full_stage values(8395, 'name8395', 8405.111, 839500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8395]'); insert into test_proxima_be_restart_with_full_stage values(8396, 'name8396', 8406.111, 839600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8396]'); insert into test_proxima_be_restart_with_full_stage values(8397, 'name8397', 8407.111, 839700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8397]'); insert into test_proxima_be_restart_with_full_stage values(8398, 'name8398', 8408.111, 839800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8398]'); insert into test_proxima_be_restart_with_full_stage values(8399, 'name8399', 8409.111, 839900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8399]'); insert into test_proxima_be_restart_with_full_stage values(8400, 'name8400', 8410.111, 840000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8400]'); insert into test_proxima_be_restart_with_full_stage values(8401, 'name8401', 8411.111, 840100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8401]'); insert into test_proxima_be_restart_with_full_stage values(8402, 'name8402', 8412.111, 840200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8402]'); insert into test_proxima_be_restart_with_full_stage values(8403, 'name8403', 8413.111, 840300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8403]'); insert into test_proxima_be_restart_with_full_stage values(8404, 'name8404', 8414.111, 840400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8404]'); insert into test_proxima_be_restart_with_full_stage values(8405, 'name8405', 8415.111, 840500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8405]'); insert into test_proxima_be_restart_with_full_stage values(8406, 'name8406', 8416.111, 840600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8406]'); insert into test_proxima_be_restart_with_full_stage values(8407, 'name8407', 8417.111, 840700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8407]'); insert into test_proxima_be_restart_with_full_stage values(8408, 'name8408', 8418.111, 840800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8408]'); insert into test_proxima_be_restart_with_full_stage values(8409, 'name8409', 8419.111, 840900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8409]'); insert into test_proxima_be_restart_with_full_stage values(8410, 'name8410', 8420.111, 841000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8410]'); insert into test_proxima_be_restart_with_full_stage values(8411, 'name8411', 8421.111, 841100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8411]'); insert into test_proxima_be_restart_with_full_stage values(8412, 'name8412', 8422.111, 841200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8412]'); insert into test_proxima_be_restart_with_full_stage values(8413, 'name8413', 8423.111, 841300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8413]'); insert into test_proxima_be_restart_with_full_stage values(8414, 'name8414', 8424.111, 841400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8414]'); insert into test_proxima_be_restart_with_full_stage values(8415, 'name8415', 8425.111, 841500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8415]'); insert into test_proxima_be_restart_with_full_stage values(8416, 'name8416', 8426.111, 841600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8416]'); insert into test_proxima_be_restart_with_full_stage values(8417, 'name8417', 8427.111, 841700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8417]'); insert into test_proxima_be_restart_with_full_stage values(8418, 'name8418', 8428.111, 841800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8418]'); insert into test_proxima_be_restart_with_full_stage values(8419, 'name8419', 8429.111, 841900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8419]'); insert into test_proxima_be_restart_with_full_stage values(8420, 'name8420', 8430.111, 842000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8420]'); insert into test_proxima_be_restart_with_full_stage values(8421, 'name8421', 8431.111, 842100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8421]'); insert into test_proxima_be_restart_with_full_stage values(8422, 'name8422', 8432.111, 842200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8422]'); insert into test_proxima_be_restart_with_full_stage values(8423, 'name8423', 8433.111, 842300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8423]'); insert into test_proxima_be_restart_with_full_stage values(8424, 'name8424', 8434.111, 842400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8424]'); insert into test_proxima_be_restart_with_full_stage values(8425, 'name8425', 8435.111, 842500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8425]'); insert into test_proxima_be_restart_with_full_stage values(8426, 'name8426', 8436.111, 842600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8426]'); insert into test_proxima_be_restart_with_full_stage values(8427, 'name8427', 8437.111, 842700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8427]'); insert into test_proxima_be_restart_with_full_stage values(8428, 'name8428', 8438.111, 842800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8428]'); insert into test_proxima_be_restart_with_full_stage values(8429, 'name8429', 8439.111, 842900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8429]'); insert into test_proxima_be_restart_with_full_stage values(8430, 'name8430', 8440.111, 843000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8430]'); insert into test_proxima_be_restart_with_full_stage values(8431, 'name8431', 8441.111, 843100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8431]'); insert into test_proxima_be_restart_with_full_stage values(8432, 'name8432', 8442.111, 843200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8432]'); insert into test_proxima_be_restart_with_full_stage values(8433, 'name8433', 8443.111, 843300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8433]'); insert into test_proxima_be_restart_with_full_stage values(8434, 'name8434', 8444.111, 843400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8434]'); insert into test_proxima_be_restart_with_full_stage values(8435, 'name8435', 8445.111, 843500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8435]'); insert into test_proxima_be_restart_with_full_stage values(8436, 'name8436', 8446.111, 843600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8436]'); insert into test_proxima_be_restart_with_full_stage values(8437, 'name8437', 8447.111, 843700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8437]'); insert into test_proxima_be_restart_with_full_stage values(8438, 'name8438', 8448.111, 843800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8438]'); insert into test_proxima_be_restart_with_full_stage values(8439, 'name8439', 8449.111, 843900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8439]'); insert into test_proxima_be_restart_with_full_stage values(8440, 'name8440', 8450.111, 844000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8440]'); insert into test_proxima_be_restart_with_full_stage values(8441, 'name8441', 8451.111, 844100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8441]'); insert into test_proxima_be_restart_with_full_stage values(8442, 'name8442', 8452.111, 844200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8442]'); insert into test_proxima_be_restart_with_full_stage values(8443, 'name8443', 8453.111, 844300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8443]'); insert into test_proxima_be_restart_with_full_stage values(8444, 'name8444', 8454.111, 844400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8444]'); insert into test_proxima_be_restart_with_full_stage values(8445, 'name8445', 8455.111, 844500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8445]'); insert into test_proxima_be_restart_with_full_stage values(8446, 'name8446', 8456.111, 844600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8446]'); insert into test_proxima_be_restart_with_full_stage values(8447, 'name8447', 8457.111, 844700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8447]'); insert into test_proxima_be_restart_with_full_stage values(8448, 'name8448', 8458.111, 844800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8448]'); insert into test_proxima_be_restart_with_full_stage values(8449, 'name8449', 8459.111, 844900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8449]'); insert into test_proxima_be_restart_with_full_stage values(8450, 'name8450', 8460.111, 845000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8450]'); insert into test_proxima_be_restart_with_full_stage values(8451, 'name8451', 8461.111, 845100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8451]'); insert into test_proxima_be_restart_with_full_stage values(8452, 'name8452', 8462.111, 845200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8452]'); insert into test_proxima_be_restart_with_full_stage values(8453, 'name8453', 8463.111, 845300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8453]'); insert into test_proxima_be_restart_with_full_stage values(8454, 'name8454', 8464.111, 845400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8454]'); insert into test_proxima_be_restart_with_full_stage values(8455, 'name8455', 8465.111, 845500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8455]'); insert into test_proxima_be_restart_with_full_stage values(8456, 'name8456', 8466.111, 845600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8456]'); insert into test_proxima_be_restart_with_full_stage values(8457, 'name8457', 8467.111, 845700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8457]'); insert into test_proxima_be_restart_with_full_stage values(8458, 'name8458', 8468.111, 845800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8458]'); insert into test_proxima_be_restart_with_full_stage values(8459, 'name8459', 8469.111, 845900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8459]'); insert into test_proxima_be_restart_with_full_stage values(8460, 'name8460', 8470.111, 846000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8460]'); insert into test_proxima_be_restart_with_full_stage values(8461, 'name8461', 8471.111, 846100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8461]'); insert into test_proxima_be_restart_with_full_stage values(8462, 'name8462', 8472.111, 846200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8462]'); insert into test_proxima_be_restart_with_full_stage values(8463, 'name8463', 8473.111, 846300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8463]'); insert into test_proxima_be_restart_with_full_stage values(8464, 'name8464', 8474.111, 846400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8464]'); insert into test_proxima_be_restart_with_full_stage values(8465, 'name8465', 8475.111, 846500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8465]'); insert into test_proxima_be_restart_with_full_stage values(8466, 'name8466', 8476.111, 846600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8466]'); insert into test_proxima_be_restart_with_full_stage values(8467, 'name8467', 8477.111, 846700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8467]'); insert into test_proxima_be_restart_with_full_stage values(8468, 'name8468', 8478.111, 846800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8468]'); insert into test_proxima_be_restart_with_full_stage values(8469, 'name8469', 8479.111, 846900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8469]'); insert into test_proxima_be_restart_with_full_stage values(8470, 'name8470', 8480.111, 847000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8470]'); insert into test_proxima_be_restart_with_full_stage values(8471, 'name8471', 8481.111, 847100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8471]'); insert into test_proxima_be_restart_with_full_stage values(8472, 'name8472', 8482.111, 847200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8472]'); insert into test_proxima_be_restart_with_full_stage values(8473, 'name8473', 8483.111, 847300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8473]'); insert into test_proxima_be_restart_with_full_stage values(8474, 'name8474', 8484.111, 847400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8474]'); insert into test_proxima_be_restart_with_full_stage values(8475, 'name8475', 8485.111, 847500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8475]'); insert into test_proxima_be_restart_with_full_stage values(8476, 'name8476', 8486.111, 847600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8476]'); insert into test_proxima_be_restart_with_full_stage values(8477, 'name8477', 8487.111, 847700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8477]'); insert into test_proxima_be_restart_with_full_stage values(8478, 'name8478', 8488.111, 847800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8478]'); insert into test_proxima_be_restart_with_full_stage values(8479, 'name8479', 8489.111, 847900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8479]'); insert into test_proxima_be_restart_with_full_stage values(8480, 'name8480', 8490.111, 848000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8480]'); insert into test_proxima_be_restart_with_full_stage values(8481, 'name8481', 8491.111, 848100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8481]'); insert into test_proxima_be_restart_with_full_stage values(8482, 'name8482', 8492.111, 848200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8482]'); insert into test_proxima_be_restart_with_full_stage values(8483, 'name8483', 8493.111, 848300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8483]'); insert into test_proxima_be_restart_with_full_stage values(8484, 'name8484', 8494.111, 848400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8484]'); insert into test_proxima_be_restart_with_full_stage values(8485, 'name8485', 8495.111, 848500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8485]'); insert into test_proxima_be_restart_with_full_stage values(8486, 'name8486', 8496.111, 848600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8486]'); insert into test_proxima_be_restart_with_full_stage values(8487, 'name8487', 8497.111, 848700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8487]'); insert into test_proxima_be_restart_with_full_stage values(8488, 'name8488', 8498.111, 848800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8488]'); insert into test_proxima_be_restart_with_full_stage values(8489, 'name8489', 8499.111, 848900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8489]'); insert into test_proxima_be_restart_with_full_stage values(8490, 'name8490', 8500.111, 849000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8490]'); insert into test_proxima_be_restart_with_full_stage values(8491, 'name8491', 8501.111, 849100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8491]'); insert into test_proxima_be_restart_with_full_stage values(8492, 'name8492', 8502.111, 849200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8492]'); insert into test_proxima_be_restart_with_full_stage values(8493, 'name8493', 8503.111, 849300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8493]'); insert into test_proxima_be_restart_with_full_stage values(8494, 'name8494', 8504.111, 849400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8494]'); insert into test_proxima_be_restart_with_full_stage values(8495, 'name8495', 8505.111, 849500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8495]'); insert into test_proxima_be_restart_with_full_stage values(8496, 'name8496', 8506.111, 849600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8496]'); insert into test_proxima_be_restart_with_full_stage values(8497, 'name8497', 8507.111, 849700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8497]'); insert into test_proxima_be_restart_with_full_stage values(8498, 'name8498', 8508.111, 849800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8498]'); insert into test_proxima_be_restart_with_full_stage values(8499, 'name8499', 8509.111, 849900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8499]'); insert into test_proxima_be_restart_with_full_stage values(8500, 'name8500', 8510.111, 850000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8500]'); insert into test_proxima_be_restart_with_full_stage values(8501, 'name8501', 8511.111, 850100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8501]'); insert into test_proxima_be_restart_with_full_stage values(8502, 'name8502', 8512.111, 850200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8502]'); insert into test_proxima_be_restart_with_full_stage values(8503, 'name8503', 8513.111, 850300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8503]'); insert into test_proxima_be_restart_with_full_stage values(8504, 'name8504', 8514.111, 850400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8504]'); insert into test_proxima_be_restart_with_full_stage values(8505, 'name8505', 8515.111, 850500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8505]'); insert into test_proxima_be_restart_with_full_stage values(8506, 'name8506', 8516.111, 850600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8506]'); insert into test_proxima_be_restart_with_full_stage values(8507, 'name8507', 8517.111, 850700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8507]'); insert into test_proxima_be_restart_with_full_stage values(8508, 'name8508', 8518.111, 850800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8508]'); insert into test_proxima_be_restart_with_full_stage values(8509, 'name8509', 8519.111, 850900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8509]'); insert into test_proxima_be_restart_with_full_stage values(8510, 'name8510', 8520.111, 851000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8510]'); insert into test_proxima_be_restart_with_full_stage values(8511, 'name8511', 8521.111, 851100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8511]'); insert into test_proxima_be_restart_with_full_stage values(8512, 'name8512', 8522.111, 851200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8512]'); insert into test_proxima_be_restart_with_full_stage values(8513, 'name8513', 8523.111, 851300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8513]'); insert into test_proxima_be_restart_with_full_stage values(8514, 'name8514', 8524.111, 851400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8514]'); insert into test_proxima_be_restart_with_full_stage values(8515, 'name8515', 8525.111, 851500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8515]'); insert into test_proxima_be_restart_with_full_stage values(8516, 'name8516', 8526.111, 851600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8516]'); insert into test_proxima_be_restart_with_full_stage values(8517, 'name8517', 8527.111, 851700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8517]'); insert into test_proxima_be_restart_with_full_stage values(8518, 'name8518', 8528.111, 851800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8518]'); insert into test_proxima_be_restart_with_full_stage values(8519, 'name8519', 8529.111, 851900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8519]'); insert into test_proxima_be_restart_with_full_stage values(8520, 'name8520', 8530.111, 852000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8520]'); insert into test_proxima_be_restart_with_full_stage values(8521, 'name8521', 8531.111, 852100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8521]'); insert into test_proxima_be_restart_with_full_stage values(8522, 'name8522', 8532.111, 852200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8522]'); insert into test_proxima_be_restart_with_full_stage values(8523, 'name8523', 8533.111, 852300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8523]'); insert into test_proxima_be_restart_with_full_stage values(8524, 'name8524', 8534.111, 852400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8524]'); insert into test_proxima_be_restart_with_full_stage values(8525, 'name8525', 8535.111, 852500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8525]'); insert into test_proxima_be_restart_with_full_stage values(8526, 'name8526', 8536.111, 852600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8526]'); insert into test_proxima_be_restart_with_full_stage values(8527, 'name8527', 8537.111, 852700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8527]'); insert into test_proxima_be_restart_with_full_stage values(8528, 'name8528', 8538.111, 852800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8528]'); insert into test_proxima_be_restart_with_full_stage values(8529, 'name8529', 8539.111, 852900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8529]'); insert into test_proxima_be_restart_with_full_stage values(8530, 'name8530', 8540.111, 853000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8530]'); insert into test_proxima_be_restart_with_full_stage values(8531, 'name8531', 8541.111, 853100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8531]'); insert into test_proxima_be_restart_with_full_stage values(8532, 'name8532', 8542.111, 853200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8532]'); insert into test_proxima_be_restart_with_full_stage values(8533, 'name8533', 8543.111, 853300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8533]'); insert into test_proxima_be_restart_with_full_stage values(8534, 'name8534', 8544.111, 853400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8534]'); insert into test_proxima_be_restart_with_full_stage values(8535, 'name8535', 8545.111, 853500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8535]'); insert into test_proxima_be_restart_with_full_stage values(8536, 'name8536', 8546.111, 853600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8536]'); insert into test_proxima_be_restart_with_full_stage values(8537, 'name8537', 8547.111, 853700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8537]'); insert into test_proxima_be_restart_with_full_stage values(8538, 'name8538', 8548.111, 853800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8538]'); insert into test_proxima_be_restart_with_full_stage values(8539, 'name8539', 8549.111, 853900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8539]'); insert into test_proxima_be_restart_with_full_stage values(8540, 'name8540', 8550.111, 854000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8540]'); insert into test_proxima_be_restart_with_full_stage values(8541, 'name8541', 8551.111, 854100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8541]'); insert into test_proxima_be_restart_with_full_stage values(8542, 'name8542', 8552.111, 854200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8542]'); insert into test_proxima_be_restart_with_full_stage values(8543, 'name8543', 8553.111, 854300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8543]'); insert into test_proxima_be_restart_with_full_stage values(8544, 'name8544', 8554.111, 854400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8544]'); insert into test_proxima_be_restart_with_full_stage values(8545, 'name8545', 8555.111, 854500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8545]'); insert into test_proxima_be_restart_with_full_stage values(8546, 'name8546', 8556.111, 854600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8546]'); insert into test_proxima_be_restart_with_full_stage values(8547, 'name8547', 8557.111, 854700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8547]'); insert into test_proxima_be_restart_with_full_stage values(8548, 'name8548', 8558.111, 854800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8548]'); insert into test_proxima_be_restart_with_full_stage values(8549, 'name8549', 8559.111, 854900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8549]'); insert into test_proxima_be_restart_with_full_stage values(8550, 'name8550', 8560.111, 855000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8550]'); insert into test_proxima_be_restart_with_full_stage values(8551, 'name8551', 8561.111, 855100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8551]'); insert into test_proxima_be_restart_with_full_stage values(8552, 'name8552', 8562.111, 855200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8552]'); insert into test_proxima_be_restart_with_full_stage values(8553, 'name8553', 8563.111, 855300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8553]'); insert into test_proxima_be_restart_with_full_stage values(8554, 'name8554', 8564.111, 855400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8554]'); insert into test_proxima_be_restart_with_full_stage values(8555, 'name8555', 8565.111, 855500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8555]'); insert into test_proxima_be_restart_with_full_stage values(8556, 'name8556', 8566.111, 855600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8556]'); insert into test_proxima_be_restart_with_full_stage values(8557, 'name8557', 8567.111, 855700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8557]'); insert into test_proxima_be_restart_with_full_stage values(8558, 'name8558', 8568.111, 855800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8558]'); insert into test_proxima_be_restart_with_full_stage values(8559, 'name8559', 8569.111, 855900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8559]'); insert into test_proxima_be_restart_with_full_stage values(8560, 'name8560', 8570.111, 856000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8560]'); insert into test_proxima_be_restart_with_full_stage values(8561, 'name8561', 8571.111, 856100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8561]'); insert into test_proxima_be_restart_with_full_stage values(8562, 'name8562', 8572.111, 856200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8562]'); insert into test_proxima_be_restart_with_full_stage values(8563, 'name8563', 8573.111, 856300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8563]'); insert into test_proxima_be_restart_with_full_stage values(8564, 'name8564', 8574.111, 856400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8564]'); insert into test_proxima_be_restart_with_full_stage values(8565, 'name8565', 8575.111, 856500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8565]'); insert into test_proxima_be_restart_with_full_stage values(8566, 'name8566', 8576.111, 856600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8566]'); insert into test_proxima_be_restart_with_full_stage values(8567, 'name8567', 8577.111, 856700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8567]'); insert into test_proxima_be_restart_with_full_stage values(8568, 'name8568', 8578.111, 856800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8568]'); insert into test_proxima_be_restart_with_full_stage values(8569, 'name8569', 8579.111, 856900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8569]'); insert into test_proxima_be_restart_with_full_stage values(8570, 'name8570', 8580.111, 857000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8570]'); insert into test_proxima_be_restart_with_full_stage values(8571, 'name8571', 8581.111, 857100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8571]'); insert into test_proxima_be_restart_with_full_stage values(8572, 'name8572', 8582.111, 857200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8572]'); insert into test_proxima_be_restart_with_full_stage values(8573, 'name8573', 8583.111, 857300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8573]'); insert into test_proxima_be_restart_with_full_stage values(8574, 'name8574', 8584.111, 857400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8574]'); insert into test_proxima_be_restart_with_full_stage values(8575, 'name8575', 8585.111, 857500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8575]'); insert into test_proxima_be_restart_with_full_stage values(8576, 'name8576', 8586.111, 857600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8576]'); insert into test_proxima_be_restart_with_full_stage values(8577, 'name8577', 8587.111, 857700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8577]'); insert into test_proxima_be_restart_with_full_stage values(8578, 'name8578', 8588.111, 857800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8578]'); insert into test_proxima_be_restart_with_full_stage values(8579, 'name8579', 8589.111, 857900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8579]'); insert into test_proxima_be_restart_with_full_stage values(8580, 'name8580', 8590.111, 858000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8580]'); insert into test_proxima_be_restart_with_full_stage values(8581, 'name8581', 8591.111, 858100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8581]'); insert into test_proxima_be_restart_with_full_stage values(8582, 'name8582', 8592.111, 858200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8582]'); insert into test_proxima_be_restart_with_full_stage values(8583, 'name8583', 8593.111, 858300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8583]'); insert into test_proxima_be_restart_with_full_stage values(8584, 'name8584', 8594.111, 858400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8584]'); insert into test_proxima_be_restart_with_full_stage values(8585, 'name8585', 8595.111, 858500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8585]'); insert into test_proxima_be_restart_with_full_stage values(8586, 'name8586', 8596.111, 858600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8586]'); insert into test_proxima_be_restart_with_full_stage values(8587, 'name8587', 8597.111, 858700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8587]'); insert into test_proxima_be_restart_with_full_stage values(8588, 'name8588', 8598.111, 858800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8588]'); insert into test_proxima_be_restart_with_full_stage values(8589, 'name8589', 8599.111, 858900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8589]'); insert into test_proxima_be_restart_with_full_stage values(8590, 'name8590', 8600.111, 859000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8590]'); insert into test_proxima_be_restart_with_full_stage values(8591, 'name8591', 8601.111, 859100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8591]'); insert into test_proxima_be_restart_with_full_stage values(8592, 'name8592', 8602.111, 859200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8592]'); insert into test_proxima_be_restart_with_full_stage values(8593, 'name8593', 8603.111, 859300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8593]'); insert into test_proxima_be_restart_with_full_stage values(8594, 'name8594', 8604.111, 859400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8594]'); insert into test_proxima_be_restart_with_full_stage values(8595, 'name8595', 8605.111, 859500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8595]'); insert into test_proxima_be_restart_with_full_stage values(8596, 'name8596', 8606.111, 859600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8596]'); insert into test_proxima_be_restart_with_full_stage values(8597, 'name8597', 8607.111, 859700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8597]'); insert into test_proxima_be_restart_with_full_stage values(8598, 'name8598', 8608.111, 859800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8598]'); insert into test_proxima_be_restart_with_full_stage values(8599, 'name8599', 8609.111, 859900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8599]'); insert into test_proxima_be_restart_with_full_stage values(8600, 'name8600', 8610.111, 860000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8600]'); insert into test_proxima_be_restart_with_full_stage values(8601, 'name8601', 8611.111, 860100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8601]'); insert into test_proxima_be_restart_with_full_stage values(8602, 'name8602', 8612.111, 860200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8602]'); insert into test_proxima_be_restart_with_full_stage values(8603, 'name8603', 8613.111, 860300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8603]'); insert into test_proxima_be_restart_with_full_stage values(8604, 'name8604', 8614.111, 860400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8604]'); insert into test_proxima_be_restart_with_full_stage values(8605, 'name8605', 8615.111, 860500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8605]'); insert into test_proxima_be_restart_with_full_stage values(8606, 'name8606', 8616.111, 860600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8606]'); insert into test_proxima_be_restart_with_full_stage values(8607, 'name8607', 8617.111, 860700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8607]'); insert into test_proxima_be_restart_with_full_stage values(8608, 'name8608', 8618.111, 860800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8608]'); insert into test_proxima_be_restart_with_full_stage values(8609, 'name8609', 8619.111, 860900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8609]'); insert into test_proxima_be_restart_with_full_stage values(8610, 'name8610', 8620.111, 861000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8610]'); insert into test_proxima_be_restart_with_full_stage values(8611, 'name8611', 8621.111, 861100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8611]'); insert into test_proxima_be_restart_with_full_stage values(8612, 'name8612', 8622.111, 861200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8612]'); insert into test_proxima_be_restart_with_full_stage values(8613, 'name8613', 8623.111, 861300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8613]'); insert into test_proxima_be_restart_with_full_stage values(8614, 'name8614', 8624.111, 861400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8614]'); insert into test_proxima_be_restart_with_full_stage values(8615, 'name8615', 8625.111, 861500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8615]'); insert into test_proxima_be_restart_with_full_stage values(8616, 'name8616', 8626.111, 861600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8616]'); insert into test_proxima_be_restart_with_full_stage values(8617, 'name8617', 8627.111, 861700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8617]'); insert into test_proxima_be_restart_with_full_stage values(8618, 'name8618', 8628.111, 861800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8618]'); insert into test_proxima_be_restart_with_full_stage values(8619, 'name8619', 8629.111, 861900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8619]'); insert into test_proxima_be_restart_with_full_stage values(8620, 'name8620', 8630.111, 862000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8620]'); insert into test_proxima_be_restart_with_full_stage values(8621, 'name8621', 8631.111, 862100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8621]'); insert into test_proxima_be_restart_with_full_stage values(8622, 'name8622', 8632.111, 862200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8622]'); insert into test_proxima_be_restart_with_full_stage values(8623, 'name8623', 8633.111, 862300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8623]'); insert into test_proxima_be_restart_with_full_stage values(8624, 'name8624', 8634.111, 862400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8624]'); insert into test_proxima_be_restart_with_full_stage values(8625, 'name8625', 8635.111, 862500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8625]'); insert into test_proxima_be_restart_with_full_stage values(8626, 'name8626', 8636.111, 862600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8626]'); insert into test_proxima_be_restart_with_full_stage values(8627, 'name8627', 8637.111, 862700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8627]'); insert into test_proxima_be_restart_with_full_stage values(8628, 'name8628', 8638.111, 862800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8628]'); insert into test_proxima_be_restart_with_full_stage values(8629, 'name8629', 8639.111, 862900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8629]'); insert into test_proxima_be_restart_with_full_stage values(8630, 'name8630', 8640.111, 863000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8630]'); insert into test_proxima_be_restart_with_full_stage values(8631, 'name8631', 8641.111, 863100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8631]'); insert into test_proxima_be_restart_with_full_stage values(8632, 'name8632', 8642.111, 863200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8632]'); insert into test_proxima_be_restart_with_full_stage values(8633, 'name8633', 8643.111, 863300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8633]'); insert into test_proxima_be_restart_with_full_stage values(8634, 'name8634', 8644.111, 863400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8634]'); insert into test_proxima_be_restart_with_full_stage values(8635, 'name8635', 8645.111, 863500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8635]'); insert into test_proxima_be_restart_with_full_stage values(8636, 'name8636', 8646.111, 863600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8636]'); insert into test_proxima_be_restart_with_full_stage values(8637, 'name8637', 8647.111, 863700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8637]'); insert into test_proxima_be_restart_with_full_stage values(8638, 'name8638', 8648.111, 863800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8638]'); insert into test_proxima_be_restart_with_full_stage values(8639, 'name8639', 8649.111, 863900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8639]'); insert into test_proxima_be_restart_with_full_stage values(8640, 'name8640', 8650.111, 864000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8640]'); insert into test_proxima_be_restart_with_full_stage values(8641, 'name8641', 8651.111, 864100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8641]'); insert into test_proxima_be_restart_with_full_stage values(8642, 'name8642', 8652.111, 864200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8642]'); insert into test_proxima_be_restart_with_full_stage values(8643, 'name8643', 8653.111, 864300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8643]'); insert into test_proxima_be_restart_with_full_stage values(8644, 'name8644', 8654.111, 864400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8644]'); insert into test_proxima_be_restart_with_full_stage values(8645, 'name8645', 8655.111, 864500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8645]'); insert into test_proxima_be_restart_with_full_stage values(8646, 'name8646', 8656.111, 864600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8646]'); insert into test_proxima_be_restart_with_full_stage values(8647, 'name8647', 8657.111, 864700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8647]'); insert into test_proxima_be_restart_with_full_stage values(8648, 'name8648', 8658.111, 864800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8648]'); insert into test_proxima_be_restart_with_full_stage values(8649, 'name8649', 8659.111, 864900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8649]'); insert into test_proxima_be_restart_with_full_stage values(8650, 'name8650', 8660.111, 865000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8650]'); insert into test_proxima_be_restart_with_full_stage values(8651, 'name8651', 8661.111, 865100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8651]'); insert into test_proxima_be_restart_with_full_stage values(8652, 'name8652', 8662.111, 865200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8652]'); insert into test_proxima_be_restart_with_full_stage values(8653, 'name8653', 8663.111, 865300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8653]'); insert into test_proxima_be_restart_with_full_stage values(8654, 'name8654', 8664.111, 865400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8654]'); insert into test_proxima_be_restart_with_full_stage values(8655, 'name8655', 8665.111, 865500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8655]'); insert into test_proxima_be_restart_with_full_stage values(8656, 'name8656', 8666.111, 865600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8656]'); insert into test_proxima_be_restart_with_full_stage values(8657, 'name8657', 8667.111, 865700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8657]'); insert into test_proxima_be_restart_with_full_stage values(8658, 'name8658', 8668.111, 865800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8658]'); insert into test_proxima_be_restart_with_full_stage values(8659, 'name8659', 8669.111, 865900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8659]'); insert into test_proxima_be_restart_with_full_stage values(8660, 'name8660', 8670.111, 866000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8660]'); insert into test_proxima_be_restart_with_full_stage values(8661, 'name8661', 8671.111, 866100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8661]'); insert into test_proxima_be_restart_with_full_stage values(8662, 'name8662', 8672.111, 866200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8662]'); insert into test_proxima_be_restart_with_full_stage values(8663, 'name8663', 8673.111, 866300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8663]'); insert into test_proxima_be_restart_with_full_stage values(8664, 'name8664', 8674.111, 866400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8664]'); insert into test_proxima_be_restart_with_full_stage values(8665, 'name8665', 8675.111, 866500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8665]'); insert into test_proxima_be_restart_with_full_stage values(8666, 'name8666', 8676.111, 866600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8666]'); insert into test_proxima_be_restart_with_full_stage values(8667, 'name8667', 8677.111, 866700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8667]'); insert into test_proxima_be_restart_with_full_stage values(8668, 'name8668', 8678.111, 866800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8668]'); insert into test_proxima_be_restart_with_full_stage values(8669, 'name8669', 8679.111, 866900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8669]'); insert into test_proxima_be_restart_with_full_stage values(8670, 'name8670', 8680.111, 867000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8670]'); insert into test_proxima_be_restart_with_full_stage values(8671, 'name8671', 8681.111, 867100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8671]'); insert into test_proxima_be_restart_with_full_stage values(8672, 'name8672', 8682.111, 867200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8672]'); insert into test_proxima_be_restart_with_full_stage values(8673, 'name8673', 8683.111, 867300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8673]'); insert into test_proxima_be_restart_with_full_stage values(8674, 'name8674', 8684.111, 867400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8674]'); insert into test_proxima_be_restart_with_full_stage values(8675, 'name8675', 8685.111, 867500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8675]'); insert into test_proxima_be_restart_with_full_stage values(8676, 'name8676', 8686.111, 867600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8676]'); insert into test_proxima_be_restart_with_full_stage values(8677, 'name8677', 8687.111, 867700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8677]'); insert into test_proxima_be_restart_with_full_stage values(8678, 'name8678', 8688.111, 867800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8678]'); insert into test_proxima_be_restart_with_full_stage values(8679, 'name8679', 8689.111, 867900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8679]'); insert into test_proxima_be_restart_with_full_stage values(8680, 'name8680', 8690.111, 868000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8680]'); insert into test_proxima_be_restart_with_full_stage values(8681, 'name8681', 8691.111, 868100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8681]'); insert into test_proxima_be_restart_with_full_stage values(8682, 'name8682', 8692.111, 868200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8682]'); insert into test_proxima_be_restart_with_full_stage values(8683, 'name8683', 8693.111, 868300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8683]'); insert into test_proxima_be_restart_with_full_stage values(8684, 'name8684', 8694.111, 868400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8684]'); insert into test_proxima_be_restart_with_full_stage values(8685, 'name8685', 8695.111, 868500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8685]'); insert into test_proxima_be_restart_with_full_stage values(8686, 'name8686', 8696.111, 868600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8686]'); insert into test_proxima_be_restart_with_full_stage values(8687, 'name8687', 8697.111, 868700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8687]'); insert into test_proxima_be_restart_with_full_stage values(8688, 'name8688', 8698.111, 868800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8688]'); insert into test_proxima_be_restart_with_full_stage values(8689, 'name8689', 8699.111, 868900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8689]'); insert into test_proxima_be_restart_with_full_stage values(8690, 'name8690', 8700.111, 869000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8690]'); insert into test_proxima_be_restart_with_full_stage values(8691, 'name8691', 8701.111, 869100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8691]'); insert into test_proxima_be_restart_with_full_stage values(8692, 'name8692', 8702.111, 869200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8692]'); insert into test_proxima_be_restart_with_full_stage values(8693, 'name8693', 8703.111, 869300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8693]'); insert into test_proxima_be_restart_with_full_stage values(8694, 'name8694', 8704.111, 869400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8694]'); insert into test_proxima_be_restart_with_full_stage values(8695, 'name8695', 8705.111, 869500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8695]'); insert into test_proxima_be_restart_with_full_stage values(8696, 'name8696', 8706.111, 869600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8696]'); insert into test_proxima_be_restart_with_full_stage values(8697, 'name8697', 8707.111, 869700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8697]'); insert into test_proxima_be_restart_with_full_stage values(8698, 'name8698', 8708.111, 869800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8698]'); insert into test_proxima_be_restart_with_full_stage values(8699, 'name8699', 8709.111, 869900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8699]'); insert into test_proxima_be_restart_with_full_stage values(8700, 'name8700', 8710.111, 870000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8700]'); insert into test_proxima_be_restart_with_full_stage values(8701, 'name8701', 8711.111, 870100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8701]'); insert into test_proxima_be_restart_with_full_stage values(8702, 'name8702', 8712.111, 870200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8702]'); insert into test_proxima_be_restart_with_full_stage values(8703, 'name8703', 8713.111, 870300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8703]'); insert into test_proxima_be_restart_with_full_stage values(8704, 'name8704', 8714.111, 870400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8704]'); insert into test_proxima_be_restart_with_full_stage values(8705, 'name8705', 8715.111, 870500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8705]'); insert into test_proxima_be_restart_with_full_stage values(8706, 'name8706', 8716.111, 870600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8706]'); insert into test_proxima_be_restart_with_full_stage values(8707, 'name8707', 8717.111, 870700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8707]'); insert into test_proxima_be_restart_with_full_stage values(8708, 'name8708', 8718.111, 870800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8708]'); insert into test_proxima_be_restart_with_full_stage values(8709, 'name8709', 8719.111, 870900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8709]'); insert into test_proxima_be_restart_with_full_stage values(8710, 'name8710', 8720.111, 871000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8710]'); insert into test_proxima_be_restart_with_full_stage values(8711, 'name8711', 8721.111, 871100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8711]'); insert into test_proxima_be_restart_with_full_stage values(8712, 'name8712', 8722.111, 871200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8712]'); insert into test_proxima_be_restart_with_full_stage values(8713, 'name8713', 8723.111, 871300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8713]'); insert into test_proxima_be_restart_with_full_stage values(8714, 'name8714', 8724.111, 871400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8714]'); insert into test_proxima_be_restart_with_full_stage values(8715, 'name8715', 8725.111, 871500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8715]'); insert into test_proxima_be_restart_with_full_stage values(8716, 'name8716', 8726.111, 871600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8716]'); insert into test_proxima_be_restart_with_full_stage values(8717, 'name8717', 8727.111, 871700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8717]'); insert into test_proxima_be_restart_with_full_stage values(8718, 'name8718', 8728.111, 871800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8718]'); insert into test_proxima_be_restart_with_full_stage values(8719, 'name8719', 8729.111, 871900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8719]'); insert into test_proxima_be_restart_with_full_stage values(8720, 'name8720', 8730.111, 872000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8720]'); insert into test_proxima_be_restart_with_full_stage values(8721, 'name8721', 8731.111, 872100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8721]'); insert into test_proxima_be_restart_with_full_stage values(8722, 'name8722', 8732.111, 872200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8722]'); insert into test_proxima_be_restart_with_full_stage values(8723, 'name8723', 8733.111, 872300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8723]'); insert into test_proxima_be_restart_with_full_stage values(8724, 'name8724', 8734.111, 872400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8724]'); insert into test_proxima_be_restart_with_full_stage values(8725, 'name8725', 8735.111, 872500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8725]'); insert into test_proxima_be_restart_with_full_stage values(8726, 'name8726', 8736.111, 872600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8726]'); insert into test_proxima_be_restart_with_full_stage values(8727, 'name8727', 8737.111, 872700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8727]'); insert into test_proxima_be_restart_with_full_stage values(8728, 'name8728', 8738.111, 872800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8728]'); insert into test_proxima_be_restart_with_full_stage values(8729, 'name8729', 8739.111, 872900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8729]'); insert into test_proxima_be_restart_with_full_stage values(8730, 'name8730', 8740.111, 873000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8730]'); insert into test_proxima_be_restart_with_full_stage values(8731, 'name8731', 8741.111, 873100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8731]'); insert into test_proxima_be_restart_with_full_stage values(8732, 'name8732', 8742.111, 873200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8732]'); insert into test_proxima_be_restart_with_full_stage values(8733, 'name8733', 8743.111, 873300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8733]'); insert into test_proxima_be_restart_with_full_stage values(8734, 'name8734', 8744.111, 873400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8734]'); insert into test_proxima_be_restart_with_full_stage values(8735, 'name8735', 8745.111, 873500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8735]'); insert into test_proxima_be_restart_with_full_stage values(8736, 'name8736', 8746.111, 873600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8736]'); insert into test_proxima_be_restart_with_full_stage values(8737, 'name8737', 8747.111, 873700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8737]'); insert into test_proxima_be_restart_with_full_stage values(8738, 'name8738', 8748.111, 873800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8738]'); insert into test_proxima_be_restart_with_full_stage values(8739, 'name8739', 8749.111, 873900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8739]'); insert into test_proxima_be_restart_with_full_stage values(8740, 'name8740', 8750.111, 874000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8740]'); insert into test_proxima_be_restart_with_full_stage values(8741, 'name8741', 8751.111, 874100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8741]'); insert into test_proxima_be_restart_with_full_stage values(8742, 'name8742', 8752.111, 874200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8742]'); insert into test_proxima_be_restart_with_full_stage values(8743, 'name8743', 8753.111, 874300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8743]'); insert into test_proxima_be_restart_with_full_stage values(8744, 'name8744', 8754.111, 874400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8744]'); insert into test_proxima_be_restart_with_full_stage values(8745, 'name8745', 8755.111, 874500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8745]'); insert into test_proxima_be_restart_with_full_stage values(8746, 'name8746', 8756.111, 874600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8746]'); insert into test_proxima_be_restart_with_full_stage values(8747, 'name8747', 8757.111, 874700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8747]'); insert into test_proxima_be_restart_with_full_stage values(8748, 'name8748', 8758.111, 874800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8748]'); insert into test_proxima_be_restart_with_full_stage values(8749, 'name8749', 8759.111, 874900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8749]'); insert into test_proxima_be_restart_with_full_stage values(8750, 'name8750', 8760.111, 875000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8750]'); insert into test_proxima_be_restart_with_full_stage values(8751, 'name8751', 8761.111, 875100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8751]'); insert into test_proxima_be_restart_with_full_stage values(8752, 'name8752', 8762.111, 875200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8752]'); insert into test_proxima_be_restart_with_full_stage values(8753, 'name8753', 8763.111, 875300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8753]'); insert into test_proxima_be_restart_with_full_stage values(8754, 'name8754', 8764.111, 875400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8754]'); insert into test_proxima_be_restart_with_full_stage values(8755, 'name8755', 8765.111, 875500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8755]'); insert into test_proxima_be_restart_with_full_stage values(8756, 'name8756', 8766.111, 875600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8756]'); insert into test_proxima_be_restart_with_full_stage values(8757, 'name8757', 8767.111, 875700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8757]'); insert into test_proxima_be_restart_with_full_stage values(8758, 'name8758', 8768.111, 875800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8758]'); insert into test_proxima_be_restart_with_full_stage values(8759, 'name8759', 8769.111, 875900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8759]'); insert into test_proxima_be_restart_with_full_stage values(8760, 'name8760', 8770.111, 876000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8760]'); insert into test_proxima_be_restart_with_full_stage values(8761, 'name8761', 8771.111, 876100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8761]'); insert into test_proxima_be_restart_with_full_stage values(8762, 'name8762', 8772.111, 876200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8762]'); insert into test_proxima_be_restart_with_full_stage values(8763, 'name8763', 8773.111, 876300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8763]'); insert into test_proxima_be_restart_with_full_stage values(8764, 'name8764', 8774.111, 876400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8764]'); insert into test_proxima_be_restart_with_full_stage values(8765, 'name8765', 8775.111, 876500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8765]'); insert into test_proxima_be_restart_with_full_stage values(8766, 'name8766', 8776.111, 876600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8766]'); insert into test_proxima_be_restart_with_full_stage values(8767, 'name8767', 8777.111, 876700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8767]'); insert into test_proxima_be_restart_with_full_stage values(8768, 'name8768', 8778.111, 876800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8768]'); insert into test_proxima_be_restart_with_full_stage values(8769, 'name8769', 8779.111, 876900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8769]'); insert into test_proxima_be_restart_with_full_stage values(8770, 'name8770', 8780.111, 877000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8770]'); insert into test_proxima_be_restart_with_full_stage values(8771, 'name8771', 8781.111, 877100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8771]'); insert into test_proxima_be_restart_with_full_stage values(8772, 'name8772', 8782.111, 877200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8772]'); insert into test_proxima_be_restart_with_full_stage values(8773, 'name8773', 8783.111, 877300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8773]'); insert into test_proxima_be_restart_with_full_stage values(8774, 'name8774', 8784.111, 877400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8774]'); insert into test_proxima_be_restart_with_full_stage values(8775, 'name8775', 8785.111, 877500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8775]'); insert into test_proxima_be_restart_with_full_stage values(8776, 'name8776', 8786.111, 877600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8776]'); insert into test_proxima_be_restart_with_full_stage values(8777, 'name8777', 8787.111, 877700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8777]'); insert into test_proxima_be_restart_with_full_stage values(8778, 'name8778', 8788.111, 877800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8778]'); insert into test_proxima_be_restart_with_full_stage values(8779, 'name8779', 8789.111, 877900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8779]'); insert into test_proxima_be_restart_with_full_stage values(8780, 'name8780', 8790.111, 878000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8780]'); insert into test_proxima_be_restart_with_full_stage values(8781, 'name8781', 8791.111, 878100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8781]'); insert into test_proxima_be_restart_with_full_stage values(8782, 'name8782', 8792.111, 878200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8782]'); insert into test_proxima_be_restart_with_full_stage values(8783, 'name8783', 8793.111, 878300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8783]'); insert into test_proxima_be_restart_with_full_stage values(8784, 'name8784', 8794.111, 878400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8784]'); insert into test_proxima_be_restart_with_full_stage values(8785, 'name8785', 8795.111, 878500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8785]'); insert into test_proxima_be_restart_with_full_stage values(8786, 'name8786', 8796.111, 878600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8786]'); insert into test_proxima_be_restart_with_full_stage values(8787, 'name8787', 8797.111, 878700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8787]'); insert into test_proxima_be_restart_with_full_stage values(8788, 'name8788', 8798.111, 878800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8788]'); insert into test_proxima_be_restart_with_full_stage values(8789, 'name8789', 8799.111, 878900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8789]'); insert into test_proxima_be_restart_with_full_stage values(8790, 'name8790', 8800.111, 879000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8790]'); insert into test_proxima_be_restart_with_full_stage values(8791, 'name8791', 8801.111, 879100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8791]'); insert into test_proxima_be_restart_with_full_stage values(8792, 'name8792', 8802.111, 879200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8792]'); insert into test_proxima_be_restart_with_full_stage values(8793, 'name8793', 8803.111, 879300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8793]'); insert into test_proxima_be_restart_with_full_stage values(8794, 'name8794', 8804.111, 879400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8794]'); insert into test_proxima_be_restart_with_full_stage values(8795, 'name8795', 8805.111, 879500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8795]'); insert into test_proxima_be_restart_with_full_stage values(8796, 'name8796', 8806.111, 879600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8796]'); insert into test_proxima_be_restart_with_full_stage values(8797, 'name8797', 8807.111, 879700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8797]'); insert into test_proxima_be_restart_with_full_stage values(8798, 'name8798', 8808.111, 879800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8798]'); insert into test_proxima_be_restart_with_full_stage values(8799, 'name8799', 8809.111, 879900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8799]'); insert into test_proxima_be_restart_with_full_stage values(8800, 'name8800', 8810.111, 880000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8800]'); insert into test_proxima_be_restart_with_full_stage values(8801, 'name8801', 8811.111, 880100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8801]'); insert into test_proxima_be_restart_with_full_stage values(8802, 'name8802', 8812.111, 880200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8802]'); insert into test_proxima_be_restart_with_full_stage values(8803, 'name8803', 8813.111, 880300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8803]'); insert into test_proxima_be_restart_with_full_stage values(8804, 'name8804', 8814.111, 880400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8804]'); insert into test_proxima_be_restart_with_full_stage values(8805, 'name8805', 8815.111, 880500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8805]'); insert into test_proxima_be_restart_with_full_stage values(8806, 'name8806', 8816.111, 880600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8806]'); insert into test_proxima_be_restart_with_full_stage values(8807, 'name8807', 8817.111, 880700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8807]'); insert into test_proxima_be_restart_with_full_stage values(8808, 'name8808', 8818.111, 880800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8808]'); insert into test_proxima_be_restart_with_full_stage values(8809, 'name8809', 8819.111, 880900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8809]'); insert into test_proxima_be_restart_with_full_stage values(8810, 'name8810', 8820.111, 881000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8810]'); insert into test_proxima_be_restart_with_full_stage values(8811, 'name8811', 8821.111, 881100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8811]'); insert into test_proxima_be_restart_with_full_stage values(8812, 'name8812', 8822.111, 881200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8812]'); insert into test_proxima_be_restart_with_full_stage values(8813, 'name8813', 8823.111, 881300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8813]'); insert into test_proxima_be_restart_with_full_stage values(8814, 'name8814', 8824.111, 881400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8814]'); insert into test_proxima_be_restart_with_full_stage values(8815, 'name8815', 8825.111, 881500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8815]'); insert into test_proxima_be_restart_with_full_stage values(8816, 'name8816', 8826.111, 881600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8816]'); insert into test_proxima_be_restart_with_full_stage values(8817, 'name8817', 8827.111, 881700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8817]'); insert into test_proxima_be_restart_with_full_stage values(8818, 'name8818', 8828.111, 881800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8818]'); insert into test_proxima_be_restart_with_full_stage values(8819, 'name8819', 8829.111, 881900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8819]'); insert into test_proxima_be_restart_with_full_stage values(8820, 'name8820', 8830.111, 882000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8820]'); insert into test_proxima_be_restart_with_full_stage values(8821, 'name8821', 8831.111, 882100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8821]'); insert into test_proxima_be_restart_with_full_stage values(8822, 'name8822', 8832.111, 882200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8822]'); insert into test_proxima_be_restart_with_full_stage values(8823, 'name8823', 8833.111, 882300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8823]'); insert into test_proxima_be_restart_with_full_stage values(8824, 'name8824', 8834.111, 882400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8824]'); insert into test_proxima_be_restart_with_full_stage values(8825, 'name8825', 8835.111, 882500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8825]'); insert into test_proxima_be_restart_with_full_stage values(8826, 'name8826', 8836.111, 882600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8826]'); insert into test_proxima_be_restart_with_full_stage values(8827, 'name8827', 8837.111, 882700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8827]'); insert into test_proxima_be_restart_with_full_stage values(8828, 'name8828', 8838.111, 882800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8828]'); insert into test_proxima_be_restart_with_full_stage values(8829, 'name8829', 8839.111, 882900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8829]'); insert into test_proxima_be_restart_with_full_stage values(8830, 'name8830', 8840.111, 883000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8830]'); insert into test_proxima_be_restart_with_full_stage values(8831, 'name8831', 8841.111, 883100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8831]'); insert into test_proxima_be_restart_with_full_stage values(8832, 'name8832', 8842.111, 883200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8832]'); insert into test_proxima_be_restart_with_full_stage values(8833, 'name8833', 8843.111, 883300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8833]'); insert into test_proxima_be_restart_with_full_stage values(8834, 'name8834', 8844.111, 883400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8834]'); insert into test_proxima_be_restart_with_full_stage values(8835, 'name8835', 8845.111, 883500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8835]'); insert into test_proxima_be_restart_with_full_stage values(8836, 'name8836', 8846.111, 883600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8836]'); insert into test_proxima_be_restart_with_full_stage values(8837, 'name8837', 8847.111, 883700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8837]'); insert into test_proxima_be_restart_with_full_stage values(8838, 'name8838', 8848.111, 883800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8838]'); insert into test_proxima_be_restart_with_full_stage values(8839, 'name8839', 8849.111, 883900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8839]'); insert into test_proxima_be_restart_with_full_stage values(8840, 'name8840', 8850.111, 884000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8840]'); insert into test_proxima_be_restart_with_full_stage values(8841, 'name8841', 8851.111, 884100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8841]'); insert into test_proxima_be_restart_with_full_stage values(8842, 'name8842', 8852.111, 884200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8842]'); insert into test_proxima_be_restart_with_full_stage values(8843, 'name8843', 8853.111, 884300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8843]'); insert into test_proxima_be_restart_with_full_stage values(8844, 'name8844', 8854.111, 884400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8844]'); insert into test_proxima_be_restart_with_full_stage values(8845, 'name8845', 8855.111, 884500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8845]'); insert into test_proxima_be_restart_with_full_stage values(8846, 'name8846', 8856.111, 884600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8846]'); insert into test_proxima_be_restart_with_full_stage values(8847, 'name8847', 8857.111, 884700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8847]'); insert into test_proxima_be_restart_with_full_stage values(8848, 'name8848', 8858.111, 884800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8848]'); insert into test_proxima_be_restart_with_full_stage values(8849, 'name8849', 8859.111, 884900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8849]'); insert into test_proxima_be_restart_with_full_stage values(8850, 'name8850', 8860.111, 885000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8850]'); insert into test_proxima_be_restart_with_full_stage values(8851, 'name8851', 8861.111, 885100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8851]'); insert into test_proxima_be_restart_with_full_stage values(8852, 'name8852', 8862.111, 885200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8852]'); insert into test_proxima_be_restart_with_full_stage values(8853, 'name8853', 8863.111, 885300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8853]'); insert into test_proxima_be_restart_with_full_stage values(8854, 'name8854', 8864.111, 885400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8854]'); insert into test_proxima_be_restart_with_full_stage values(8855, 'name8855', 8865.111, 885500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8855]'); insert into test_proxima_be_restart_with_full_stage values(8856, 'name8856', 8866.111, 885600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8856]'); insert into test_proxima_be_restart_with_full_stage values(8857, 'name8857', 8867.111, 885700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8857]'); insert into test_proxima_be_restart_with_full_stage values(8858, 'name8858', 8868.111, 885800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8858]'); insert into test_proxima_be_restart_with_full_stage values(8859, 'name8859', 8869.111, 885900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8859]'); insert into test_proxima_be_restart_with_full_stage values(8860, 'name8860', 8870.111, 886000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8860]'); insert into test_proxima_be_restart_with_full_stage values(8861, 'name8861', 8871.111, 886100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8861]'); insert into test_proxima_be_restart_with_full_stage values(8862, 'name8862', 8872.111, 886200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8862]'); insert into test_proxima_be_restart_with_full_stage values(8863, 'name8863', 8873.111, 886300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8863]'); insert into test_proxima_be_restart_with_full_stage values(8864, 'name8864', 8874.111, 886400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8864]'); insert into test_proxima_be_restart_with_full_stage values(8865, 'name8865', 8875.111, 886500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8865]'); insert into test_proxima_be_restart_with_full_stage values(8866, 'name8866', 8876.111, 886600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8866]'); insert into test_proxima_be_restart_with_full_stage values(8867, 'name8867', 8877.111, 886700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8867]'); insert into test_proxima_be_restart_with_full_stage values(8868, 'name8868', 8878.111, 886800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8868]'); insert into test_proxima_be_restart_with_full_stage values(8869, 'name8869', 8879.111, 886900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8869]'); insert into test_proxima_be_restart_with_full_stage values(8870, 'name8870', 8880.111, 887000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8870]'); insert into test_proxima_be_restart_with_full_stage values(8871, 'name8871', 8881.111, 887100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8871]'); insert into test_proxima_be_restart_with_full_stage values(8872, 'name8872', 8882.111, 887200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8872]'); insert into test_proxima_be_restart_with_full_stage values(8873, 'name8873', 8883.111, 887300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8873]'); insert into test_proxima_be_restart_with_full_stage values(8874, 'name8874', 8884.111, 887400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8874]'); insert into test_proxima_be_restart_with_full_stage values(8875, 'name8875', 8885.111, 887500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8875]'); insert into test_proxima_be_restart_with_full_stage values(8876, 'name8876', 8886.111, 887600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8876]'); insert into test_proxima_be_restart_with_full_stage values(8877, 'name8877', 8887.111, 887700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8877]'); insert into test_proxima_be_restart_with_full_stage values(8878, 'name8878', 8888.111, 887800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8878]'); insert into test_proxima_be_restart_with_full_stage values(8879, 'name8879', 8889.111, 887900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8879]'); insert into test_proxima_be_restart_with_full_stage values(8880, 'name8880', 8890.111, 888000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8880]'); insert into test_proxima_be_restart_with_full_stage values(8881, 'name8881', 8891.111, 888100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8881]'); insert into test_proxima_be_restart_with_full_stage values(8882, 'name8882', 8892.111, 888200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8882]'); insert into test_proxima_be_restart_with_full_stage values(8883, 'name8883', 8893.111, 888300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8883]'); insert into test_proxima_be_restart_with_full_stage values(8884, 'name8884', 8894.111, 888400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8884]'); insert into test_proxima_be_restart_with_full_stage values(8885, 'name8885', 8895.111, 888500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8885]'); insert into test_proxima_be_restart_with_full_stage values(8886, 'name8886', 8896.111, 888600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8886]'); insert into test_proxima_be_restart_with_full_stage values(8887, 'name8887', 8897.111, 888700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8887]'); insert into test_proxima_be_restart_with_full_stage values(8888, 'name8888', 8898.111, 888800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8888]'); insert into test_proxima_be_restart_with_full_stage values(8889, 'name8889', 8899.111, 888900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8889]'); insert into test_proxima_be_restart_with_full_stage values(8890, 'name8890', 8900.111, 889000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8890]'); insert into test_proxima_be_restart_with_full_stage values(8891, 'name8891', 8901.111, 889100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8891]'); insert into test_proxima_be_restart_with_full_stage values(8892, 'name8892', 8902.111, 889200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8892]'); insert into test_proxima_be_restart_with_full_stage values(8893, 'name8893', 8903.111, 889300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8893]'); insert into test_proxima_be_restart_with_full_stage values(8894, 'name8894', 8904.111, 889400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8894]'); insert into test_proxima_be_restart_with_full_stage values(8895, 'name8895', 8905.111, 889500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8895]'); insert into test_proxima_be_restart_with_full_stage values(8896, 'name8896', 8906.111, 889600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8896]'); insert into test_proxima_be_restart_with_full_stage values(8897, 'name8897', 8907.111, 889700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8897]'); insert into test_proxima_be_restart_with_full_stage values(8898, 'name8898', 8908.111, 889800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8898]'); insert into test_proxima_be_restart_with_full_stage values(8899, 'name8899', 8909.111, 889900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8899]'); insert into test_proxima_be_restart_with_full_stage values(8900, 'name8900', 8910.111, 890000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8900]'); insert into test_proxima_be_restart_with_full_stage values(8901, 'name8901', 8911.111, 890100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8901]'); insert into test_proxima_be_restart_with_full_stage values(8902, 'name8902', 8912.111, 890200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8902]'); insert into test_proxima_be_restart_with_full_stage values(8903, 'name8903', 8913.111, 890300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8903]'); insert into test_proxima_be_restart_with_full_stage values(8904, 'name8904', 8914.111, 890400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8904]'); insert into test_proxima_be_restart_with_full_stage values(8905, 'name8905', 8915.111, 890500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8905]'); insert into test_proxima_be_restart_with_full_stage values(8906, 'name8906', 8916.111, 890600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8906]'); insert into test_proxima_be_restart_with_full_stage values(8907, 'name8907', 8917.111, 890700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8907]'); insert into test_proxima_be_restart_with_full_stage values(8908, 'name8908', 8918.111, 890800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8908]'); insert into test_proxima_be_restart_with_full_stage values(8909, 'name8909', 8919.111, 890900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8909]'); insert into test_proxima_be_restart_with_full_stage values(8910, 'name8910', 8920.111, 891000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8910]'); insert into test_proxima_be_restart_with_full_stage values(8911, 'name8911', 8921.111, 891100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8911]'); insert into test_proxima_be_restart_with_full_stage values(8912, 'name8912', 8922.111, 891200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8912]'); insert into test_proxima_be_restart_with_full_stage values(8913, 'name8913', 8923.111, 891300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8913]'); insert into test_proxima_be_restart_with_full_stage values(8914, 'name8914', 8924.111, 891400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8914]'); insert into test_proxima_be_restart_with_full_stage values(8915, 'name8915', 8925.111, 891500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8915]'); insert into test_proxima_be_restart_with_full_stage values(8916, 'name8916', 8926.111, 891600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8916]'); insert into test_proxima_be_restart_with_full_stage values(8917, 'name8917', 8927.111, 891700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8917]'); insert into test_proxima_be_restart_with_full_stage values(8918, 'name8918', 8928.111, 891800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8918]'); insert into test_proxima_be_restart_with_full_stage values(8919, 'name8919', 8929.111, 891900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8919]'); insert into test_proxima_be_restart_with_full_stage values(8920, 'name8920', 8930.111, 892000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8920]'); insert into test_proxima_be_restart_with_full_stage values(8921, 'name8921', 8931.111, 892100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8921]'); insert into test_proxima_be_restart_with_full_stage values(8922, 'name8922', 8932.111, 892200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8922]'); insert into test_proxima_be_restart_with_full_stage values(8923, 'name8923', 8933.111, 892300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8923]'); insert into test_proxima_be_restart_with_full_stage values(8924, 'name8924', 8934.111, 892400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8924]'); insert into test_proxima_be_restart_with_full_stage values(8925, 'name8925', 8935.111, 892500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8925]'); insert into test_proxima_be_restart_with_full_stage values(8926, 'name8926', 8936.111, 892600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8926]'); insert into test_proxima_be_restart_with_full_stage values(8927, 'name8927', 8937.111, 892700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8927]'); insert into test_proxima_be_restart_with_full_stage values(8928, 'name8928', 8938.111, 892800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8928]'); insert into test_proxima_be_restart_with_full_stage values(8929, 'name8929', 8939.111, 892900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8929]'); insert into test_proxima_be_restart_with_full_stage values(8930, 'name8930', 8940.111, 893000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8930]'); insert into test_proxima_be_restart_with_full_stage values(8931, 'name8931', 8941.111, 893100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8931]'); insert into test_proxima_be_restart_with_full_stage values(8932, 'name8932', 8942.111, 893200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8932]'); insert into test_proxima_be_restart_with_full_stage values(8933, 'name8933', 8943.111, 893300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8933]'); insert into test_proxima_be_restart_with_full_stage values(8934, 'name8934', 8944.111, 893400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8934]'); insert into test_proxima_be_restart_with_full_stage values(8935, 'name8935', 8945.111, 893500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8935]'); insert into test_proxima_be_restart_with_full_stage values(8936, 'name8936', 8946.111, 893600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8936]'); insert into test_proxima_be_restart_with_full_stage values(8937, 'name8937', 8947.111, 893700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8937]'); insert into test_proxima_be_restart_with_full_stage values(8938, 'name8938', 8948.111, 893800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8938]'); insert into test_proxima_be_restart_with_full_stage values(8939, 'name8939', 8949.111, 893900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8939]'); insert into test_proxima_be_restart_with_full_stage values(8940, 'name8940', 8950.111, 894000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8940]'); insert into test_proxima_be_restart_with_full_stage values(8941, 'name8941', 8951.111, 894100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8941]'); insert into test_proxima_be_restart_with_full_stage values(8942, 'name8942', 8952.111, 894200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8942]'); insert into test_proxima_be_restart_with_full_stage values(8943, 'name8943', 8953.111, 894300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8943]'); insert into test_proxima_be_restart_with_full_stage values(8944, 'name8944', 8954.111, 894400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8944]'); insert into test_proxima_be_restart_with_full_stage values(8945, 'name8945', 8955.111, 894500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8945]'); insert into test_proxima_be_restart_with_full_stage values(8946, 'name8946', 8956.111, 894600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8946]'); insert into test_proxima_be_restart_with_full_stage values(8947, 'name8947', 8957.111, 894700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8947]'); insert into test_proxima_be_restart_with_full_stage values(8948, 'name8948', 8958.111, 894800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8948]'); insert into test_proxima_be_restart_with_full_stage values(8949, 'name8949', 8959.111, 894900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8949]'); insert into test_proxima_be_restart_with_full_stage values(8950, 'name8950', 8960.111, 895000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8950]'); insert into test_proxima_be_restart_with_full_stage values(8951, 'name8951', 8961.111, 895100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8951]'); insert into test_proxima_be_restart_with_full_stage values(8952, 'name8952', 8962.111, 895200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8952]'); insert into test_proxima_be_restart_with_full_stage values(8953, 'name8953', 8963.111, 895300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8953]'); insert into test_proxima_be_restart_with_full_stage values(8954, 'name8954', 8964.111, 895400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8954]'); insert into test_proxima_be_restart_with_full_stage values(8955, 'name8955', 8965.111, 895500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8955]'); insert into test_proxima_be_restart_with_full_stage values(8956, 'name8956', 8966.111, 895600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8956]'); insert into test_proxima_be_restart_with_full_stage values(8957, 'name8957', 8967.111, 895700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8957]'); insert into test_proxima_be_restart_with_full_stage values(8958, 'name8958', 8968.111, 895800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8958]'); insert into test_proxima_be_restart_with_full_stage values(8959, 'name8959', 8969.111, 895900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8959]'); insert into test_proxima_be_restart_with_full_stage values(8960, 'name8960', 8970.111, 896000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8960]'); insert into test_proxima_be_restart_with_full_stage values(8961, 'name8961', 8971.111, 896100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8961]'); insert into test_proxima_be_restart_with_full_stage values(8962, 'name8962', 8972.111, 896200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8962]'); insert into test_proxima_be_restart_with_full_stage values(8963, 'name8963', 8973.111, 896300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8963]'); insert into test_proxima_be_restart_with_full_stage values(8964, 'name8964', 8974.111, 896400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8964]'); insert into test_proxima_be_restart_with_full_stage values(8965, 'name8965', 8975.111, 896500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8965]'); insert into test_proxima_be_restart_with_full_stage values(8966, 'name8966', 8976.111, 896600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8966]'); insert into test_proxima_be_restart_with_full_stage values(8967, 'name8967', 8977.111, 896700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8967]'); insert into test_proxima_be_restart_with_full_stage values(8968, 'name8968', 8978.111, 896800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8968]'); insert into test_proxima_be_restart_with_full_stage values(8969, 'name8969', 8979.111, 896900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8969]'); insert into test_proxima_be_restart_with_full_stage values(8970, 'name8970', 8980.111, 897000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8970]'); insert into test_proxima_be_restart_with_full_stage values(8971, 'name8971', 8981.111, 897100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8971]'); insert into test_proxima_be_restart_with_full_stage values(8972, 'name8972', 8982.111, 897200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8972]'); insert into test_proxima_be_restart_with_full_stage values(8973, 'name8973', 8983.111, 897300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8973]'); insert into test_proxima_be_restart_with_full_stage values(8974, 'name8974', 8984.111, 897400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8974]'); insert into test_proxima_be_restart_with_full_stage values(8975, 'name8975', 8985.111, 897500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8975]'); insert into test_proxima_be_restart_with_full_stage values(8976, 'name8976', 8986.111, 897600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8976]'); insert into test_proxima_be_restart_with_full_stage values(8977, 'name8977', 8987.111, 897700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8977]'); insert into test_proxima_be_restart_with_full_stage values(8978, 'name8978', 8988.111, 897800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8978]'); insert into test_proxima_be_restart_with_full_stage values(8979, 'name8979', 8989.111, 897900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8979]'); insert into test_proxima_be_restart_with_full_stage values(8980, 'name8980', 8990.111, 898000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8980]'); insert into test_proxima_be_restart_with_full_stage values(8981, 'name8981', 8991.111, 898100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8981]'); insert into test_proxima_be_restart_with_full_stage values(8982, 'name8982', 8992.111, 898200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8982]'); insert into test_proxima_be_restart_with_full_stage values(8983, 'name8983', 8993.111, 898300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8983]'); insert into test_proxima_be_restart_with_full_stage values(8984, 'name8984', 8994.111, 898400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8984]'); insert into test_proxima_be_restart_with_full_stage values(8985, 'name8985', 8995.111, 898500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8985]'); insert into test_proxima_be_restart_with_full_stage values(8986, 'name8986', 8996.111, 898600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8986]'); insert into test_proxima_be_restart_with_full_stage values(8987, 'name8987', 8997.111, 898700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8987]'); insert into test_proxima_be_restart_with_full_stage values(8988, 'name8988', 8998.111, 898800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8988]'); insert into test_proxima_be_restart_with_full_stage values(8989, 'name8989', 8999.111, 898900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8989]'); insert into test_proxima_be_restart_with_full_stage values(8990, 'name8990', 9000.111, 899000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8990]'); insert into test_proxima_be_restart_with_full_stage values(8991, 'name8991', 9001.111, 899100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8991]'); insert into test_proxima_be_restart_with_full_stage values(8992, 'name8992', 9002.111, 899200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8992]'); insert into test_proxima_be_restart_with_full_stage values(8993, 'name8993', 9003.111, 899300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8993]'); insert into test_proxima_be_restart_with_full_stage values(8994, 'name8994', 9004.111, 899400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8994]'); insert into test_proxima_be_restart_with_full_stage values(8995, 'name8995', 9005.111, 899500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8995]'); insert into test_proxima_be_restart_with_full_stage values(8996, 'name8996', 9006.111, 899600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8996]'); insert into test_proxima_be_restart_with_full_stage values(8997, 'name8997', 9007.111, 899700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8997]'); insert into test_proxima_be_restart_with_full_stage values(8998, 'name8998', 9008.111, 899800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8998]'); insert into test_proxima_be_restart_with_full_stage values(8999, 'name8999', 9009.111, 899900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8999]'); insert into test_proxima_be_restart_with_full_stage values(9000, 'name9000', 9010.111, 900000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9000]'); insert into test_proxima_be_restart_with_full_stage values(9001, 'name9001', 9011.111, 900100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9001]'); insert into test_proxima_be_restart_with_full_stage values(9002, 'name9002', 9012.111, 900200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9002]'); insert into test_proxima_be_restart_with_full_stage values(9003, 'name9003', 9013.111, 900300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9003]'); insert into test_proxima_be_restart_with_full_stage values(9004, 'name9004', 9014.111, 900400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9004]'); insert into test_proxima_be_restart_with_full_stage values(9005, 'name9005', 9015.111, 900500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9005]'); insert into test_proxima_be_restart_with_full_stage values(9006, 'name9006', 9016.111, 900600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9006]'); insert into test_proxima_be_restart_with_full_stage values(9007, 'name9007', 9017.111, 900700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9007]'); insert into test_proxima_be_restart_with_full_stage values(9008, 'name9008', 9018.111, 900800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9008]'); insert into test_proxima_be_restart_with_full_stage values(9009, 'name9009', 9019.111, 900900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9009]'); insert into test_proxima_be_restart_with_full_stage values(9010, 'name9010', 9020.111, 901000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9010]'); insert into test_proxima_be_restart_with_full_stage values(9011, 'name9011', 9021.111, 901100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9011]'); insert into test_proxima_be_restart_with_full_stage values(9012, 'name9012', 9022.111, 901200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9012]'); insert into test_proxima_be_restart_with_full_stage values(9013, 'name9013', 9023.111, 901300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9013]'); insert into test_proxima_be_restart_with_full_stage values(9014, 'name9014', 9024.111, 901400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9014]'); insert into test_proxima_be_restart_with_full_stage values(9015, 'name9015', 9025.111, 901500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9015]'); insert into test_proxima_be_restart_with_full_stage values(9016, 'name9016', 9026.111, 901600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9016]'); insert into test_proxima_be_restart_with_full_stage values(9017, 'name9017', 9027.111, 901700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9017]'); insert into test_proxima_be_restart_with_full_stage values(9018, 'name9018', 9028.111, 901800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9018]'); insert into test_proxima_be_restart_with_full_stage values(9019, 'name9019', 9029.111, 901900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9019]'); insert into test_proxima_be_restart_with_full_stage values(9020, 'name9020', 9030.111, 902000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9020]'); insert into test_proxima_be_restart_with_full_stage values(9021, 'name9021', 9031.111, 902100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9021]'); insert into test_proxima_be_restart_with_full_stage values(9022, 'name9022', 9032.111, 902200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9022]'); insert into test_proxima_be_restart_with_full_stage values(9023, 'name9023', 9033.111, 902300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9023]'); insert into test_proxima_be_restart_with_full_stage values(9024, 'name9024', 9034.111, 902400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9024]'); insert into test_proxima_be_restart_with_full_stage values(9025, 'name9025', 9035.111, 902500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9025]'); insert into test_proxima_be_restart_with_full_stage values(9026, 'name9026', 9036.111, 902600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9026]'); insert into test_proxima_be_restart_with_full_stage values(9027, 'name9027', 9037.111, 902700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9027]'); insert into test_proxima_be_restart_with_full_stage values(9028, 'name9028', 9038.111, 902800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9028]'); insert into test_proxima_be_restart_with_full_stage values(9029, 'name9029', 9039.111, 902900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9029]'); insert into test_proxima_be_restart_with_full_stage values(9030, 'name9030', 9040.111, 903000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9030]'); insert into test_proxima_be_restart_with_full_stage values(9031, 'name9031', 9041.111, 903100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9031]'); insert into test_proxima_be_restart_with_full_stage values(9032, 'name9032', 9042.111, 903200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9032]'); insert into test_proxima_be_restart_with_full_stage values(9033, 'name9033', 9043.111, 903300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9033]'); insert into test_proxima_be_restart_with_full_stage values(9034, 'name9034', 9044.111, 903400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9034]'); insert into test_proxima_be_restart_with_full_stage values(9035, 'name9035', 9045.111, 903500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9035]'); insert into test_proxima_be_restart_with_full_stage values(9036, 'name9036', 9046.111, 903600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9036]'); insert into test_proxima_be_restart_with_full_stage values(9037, 'name9037', 9047.111, 903700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9037]'); insert into test_proxima_be_restart_with_full_stage values(9038, 'name9038', 9048.111, 903800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9038]'); insert into test_proxima_be_restart_with_full_stage values(9039, 'name9039', 9049.111, 903900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9039]'); insert into test_proxima_be_restart_with_full_stage values(9040, 'name9040', 9050.111, 904000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9040]'); insert into test_proxima_be_restart_with_full_stage values(9041, 'name9041', 9051.111, 904100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9041]'); insert into test_proxima_be_restart_with_full_stage values(9042, 'name9042', 9052.111, 904200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9042]'); insert into test_proxima_be_restart_with_full_stage values(9043, 'name9043', 9053.111, 904300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9043]'); insert into test_proxima_be_restart_with_full_stage values(9044, 'name9044', 9054.111, 904400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9044]'); insert into test_proxima_be_restart_with_full_stage values(9045, 'name9045', 9055.111, 904500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9045]'); insert into test_proxima_be_restart_with_full_stage values(9046, 'name9046', 9056.111, 904600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9046]'); insert into test_proxima_be_restart_with_full_stage values(9047, 'name9047', 9057.111, 904700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9047]'); insert into test_proxima_be_restart_with_full_stage values(9048, 'name9048', 9058.111, 904800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9048]'); insert into test_proxima_be_restart_with_full_stage values(9049, 'name9049', 9059.111, 904900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9049]'); insert into test_proxima_be_restart_with_full_stage values(9050, 'name9050', 9060.111, 905000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9050]'); insert into test_proxima_be_restart_with_full_stage values(9051, 'name9051', 9061.111, 905100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9051]'); insert into test_proxima_be_restart_with_full_stage values(9052, 'name9052', 9062.111, 905200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9052]'); insert into test_proxima_be_restart_with_full_stage values(9053, 'name9053', 9063.111, 905300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9053]'); insert into test_proxima_be_restart_with_full_stage values(9054, 'name9054', 9064.111, 905400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9054]'); insert into test_proxima_be_restart_with_full_stage values(9055, 'name9055', 9065.111, 905500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9055]'); insert into test_proxima_be_restart_with_full_stage values(9056, 'name9056', 9066.111, 905600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9056]'); insert into test_proxima_be_restart_with_full_stage values(9057, 'name9057', 9067.111, 905700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9057]'); insert into test_proxima_be_restart_with_full_stage values(9058, 'name9058', 9068.111, 905800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9058]'); insert into test_proxima_be_restart_with_full_stage values(9059, 'name9059', 9069.111, 905900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9059]'); insert into test_proxima_be_restart_with_full_stage values(9060, 'name9060', 9070.111, 906000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9060]'); insert into test_proxima_be_restart_with_full_stage values(9061, 'name9061', 9071.111, 906100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9061]'); insert into test_proxima_be_restart_with_full_stage values(9062, 'name9062', 9072.111, 906200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9062]'); insert into test_proxima_be_restart_with_full_stage values(9063, 'name9063', 9073.111, 906300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9063]'); insert into test_proxima_be_restart_with_full_stage values(9064, 'name9064', 9074.111, 906400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9064]'); insert into test_proxima_be_restart_with_full_stage values(9065, 'name9065', 9075.111, 906500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9065]'); insert into test_proxima_be_restart_with_full_stage values(9066, 'name9066', 9076.111, 906600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9066]'); insert into test_proxima_be_restart_with_full_stage values(9067, 'name9067', 9077.111, 906700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9067]'); insert into test_proxima_be_restart_with_full_stage values(9068, 'name9068', 9078.111, 906800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9068]'); insert into test_proxima_be_restart_with_full_stage values(9069, 'name9069', 9079.111, 906900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9069]'); insert into test_proxima_be_restart_with_full_stage values(9070, 'name9070', 9080.111, 907000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9070]'); insert into test_proxima_be_restart_with_full_stage values(9071, 'name9071', 9081.111, 907100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9071]'); insert into test_proxima_be_restart_with_full_stage values(9072, 'name9072', 9082.111, 907200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9072]'); insert into test_proxima_be_restart_with_full_stage values(9073, 'name9073', 9083.111, 907300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9073]'); insert into test_proxima_be_restart_with_full_stage values(9074, 'name9074', 9084.111, 907400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9074]'); insert into test_proxima_be_restart_with_full_stage values(9075, 'name9075', 9085.111, 907500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9075]'); insert into test_proxima_be_restart_with_full_stage values(9076, 'name9076', 9086.111, 907600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9076]'); insert into test_proxima_be_restart_with_full_stage values(9077, 'name9077', 9087.111, 907700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9077]'); insert into test_proxima_be_restart_with_full_stage values(9078, 'name9078', 9088.111, 907800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9078]'); insert into test_proxima_be_restart_with_full_stage values(9079, 'name9079', 9089.111, 907900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9079]'); insert into test_proxima_be_restart_with_full_stage values(9080, 'name9080', 9090.111, 908000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9080]'); insert into test_proxima_be_restart_with_full_stage values(9081, 'name9081', 9091.111, 908100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9081]'); insert into test_proxima_be_restart_with_full_stage values(9082, 'name9082', 9092.111, 908200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9082]'); insert into test_proxima_be_restart_with_full_stage values(9083, 'name9083', 9093.111, 908300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9083]'); insert into test_proxima_be_restart_with_full_stage values(9084, 'name9084', 9094.111, 908400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9084]'); insert into test_proxima_be_restart_with_full_stage values(9085, 'name9085', 9095.111, 908500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9085]'); insert into test_proxima_be_restart_with_full_stage values(9086, 'name9086', 9096.111, 908600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9086]'); insert into test_proxima_be_restart_with_full_stage values(9087, 'name9087', 9097.111, 908700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9087]'); insert into test_proxima_be_restart_with_full_stage values(9088, 'name9088', 9098.111, 908800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9088]'); insert into test_proxima_be_restart_with_full_stage values(9089, 'name9089', 9099.111, 908900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9089]'); insert into test_proxima_be_restart_with_full_stage values(9090, 'name9090', 9100.111, 909000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9090]'); insert into test_proxima_be_restart_with_full_stage values(9091, 'name9091', 9101.111, 909100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9091]'); insert into test_proxima_be_restart_with_full_stage values(9092, 'name9092', 9102.111, 909200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9092]'); insert into test_proxima_be_restart_with_full_stage values(9093, 'name9093', 9103.111, 909300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9093]'); insert into test_proxima_be_restart_with_full_stage values(9094, 'name9094', 9104.111, 909400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9094]'); insert into test_proxima_be_restart_with_full_stage values(9095, 'name9095', 9105.111, 909500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9095]'); insert into test_proxima_be_restart_with_full_stage values(9096, 'name9096', 9106.111, 909600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9096]'); insert into test_proxima_be_restart_with_full_stage values(9097, 'name9097', 9107.111, 909700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9097]'); insert into test_proxima_be_restart_with_full_stage values(9098, 'name9098', 9108.111, 909800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9098]'); insert into test_proxima_be_restart_with_full_stage values(9099, 'name9099', 9109.111, 909900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9099]'); insert into test_proxima_be_restart_with_full_stage values(9100, 'name9100', 9110.111, 910000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9100]'); insert into test_proxima_be_restart_with_full_stage values(9101, 'name9101', 9111.111, 910100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9101]'); insert into test_proxima_be_restart_with_full_stage values(9102, 'name9102', 9112.111, 910200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9102]'); insert into test_proxima_be_restart_with_full_stage values(9103, 'name9103', 9113.111, 910300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9103]'); insert into test_proxima_be_restart_with_full_stage values(9104, 'name9104', 9114.111, 910400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9104]'); insert into test_proxima_be_restart_with_full_stage values(9105, 'name9105', 9115.111, 910500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9105]'); insert into test_proxima_be_restart_with_full_stage values(9106, 'name9106', 9116.111, 910600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9106]'); insert into test_proxima_be_restart_with_full_stage values(9107, 'name9107', 9117.111, 910700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9107]'); insert into test_proxima_be_restart_with_full_stage values(9108, 'name9108', 9118.111, 910800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9108]'); insert into test_proxima_be_restart_with_full_stage values(9109, 'name9109', 9119.111, 910900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9109]'); insert into test_proxima_be_restart_with_full_stage values(9110, 'name9110', 9120.111, 911000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9110]'); insert into test_proxima_be_restart_with_full_stage values(9111, 'name9111', 9121.111, 911100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9111]'); insert into test_proxima_be_restart_with_full_stage values(9112, 'name9112', 9122.111, 911200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9112]'); insert into test_proxima_be_restart_with_full_stage values(9113, 'name9113', 9123.111, 911300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9113]'); insert into test_proxima_be_restart_with_full_stage values(9114, 'name9114', 9124.111, 911400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9114]'); insert into test_proxima_be_restart_with_full_stage values(9115, 'name9115', 9125.111, 911500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9115]'); insert into test_proxima_be_restart_with_full_stage values(9116, 'name9116', 9126.111, 911600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9116]'); insert into test_proxima_be_restart_with_full_stage values(9117, 'name9117', 9127.111, 911700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9117]'); insert into test_proxima_be_restart_with_full_stage values(9118, 'name9118', 9128.111, 911800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9118]'); insert into test_proxima_be_restart_with_full_stage values(9119, 'name9119', 9129.111, 911900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9119]'); insert into test_proxima_be_restart_with_full_stage values(9120, 'name9120', 9130.111, 912000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9120]'); insert into test_proxima_be_restart_with_full_stage values(9121, 'name9121', 9131.111, 912100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9121]'); insert into test_proxima_be_restart_with_full_stage values(9122, 'name9122', 9132.111, 912200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9122]'); insert into test_proxima_be_restart_with_full_stage values(9123, 'name9123', 9133.111, 912300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9123]'); insert into test_proxima_be_restart_with_full_stage values(9124, 'name9124', 9134.111, 912400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9124]'); insert into test_proxima_be_restart_with_full_stage values(9125, 'name9125', 9135.111, 912500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9125]'); insert into test_proxima_be_restart_with_full_stage values(9126, 'name9126', 9136.111, 912600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9126]'); insert into test_proxima_be_restart_with_full_stage values(9127, 'name9127', 9137.111, 912700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9127]'); insert into test_proxima_be_restart_with_full_stage values(9128, 'name9128', 9138.111, 912800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9128]'); insert into test_proxima_be_restart_with_full_stage values(9129, 'name9129', 9139.111, 912900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9129]'); insert into test_proxima_be_restart_with_full_stage values(9130, 'name9130', 9140.111, 913000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9130]'); insert into test_proxima_be_restart_with_full_stage values(9131, 'name9131', 9141.111, 913100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9131]'); insert into test_proxima_be_restart_with_full_stage values(9132, 'name9132', 9142.111, 913200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9132]'); insert into test_proxima_be_restart_with_full_stage values(9133, 'name9133', 9143.111, 913300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9133]'); insert into test_proxima_be_restart_with_full_stage values(9134, 'name9134', 9144.111, 913400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9134]'); insert into test_proxima_be_restart_with_full_stage values(9135, 'name9135', 9145.111, 913500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9135]'); insert into test_proxima_be_restart_with_full_stage values(9136, 'name9136', 9146.111, 913600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9136]'); insert into test_proxima_be_restart_with_full_stage values(9137, 'name9137', 9147.111, 913700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9137]'); insert into test_proxima_be_restart_with_full_stage values(9138, 'name9138', 9148.111, 913800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9138]'); insert into test_proxima_be_restart_with_full_stage values(9139, 'name9139', 9149.111, 913900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9139]'); insert into test_proxima_be_restart_with_full_stage values(9140, 'name9140', 9150.111, 914000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9140]'); insert into test_proxima_be_restart_with_full_stage values(9141, 'name9141', 9151.111, 914100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9141]'); insert into test_proxima_be_restart_with_full_stage values(9142, 'name9142', 9152.111, 914200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9142]'); insert into test_proxima_be_restart_with_full_stage values(9143, 'name9143', 9153.111, 914300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9143]'); insert into test_proxima_be_restart_with_full_stage values(9144, 'name9144', 9154.111, 914400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9144]'); insert into test_proxima_be_restart_with_full_stage values(9145, 'name9145', 9155.111, 914500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9145]'); insert into test_proxima_be_restart_with_full_stage values(9146, 'name9146', 9156.111, 914600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9146]'); insert into test_proxima_be_restart_with_full_stage values(9147, 'name9147', 9157.111, 914700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9147]'); insert into test_proxima_be_restart_with_full_stage values(9148, 'name9148', 9158.111, 914800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9148]'); insert into test_proxima_be_restart_with_full_stage values(9149, 'name9149', 9159.111, 914900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9149]'); insert into test_proxima_be_restart_with_full_stage values(9150, 'name9150', 9160.111, 915000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9150]'); insert into test_proxima_be_restart_with_full_stage values(9151, 'name9151', 9161.111, 915100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9151]'); insert into test_proxima_be_restart_with_full_stage values(9152, 'name9152', 9162.111, 915200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9152]'); insert into test_proxima_be_restart_with_full_stage values(9153, 'name9153', 9163.111, 915300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9153]'); insert into test_proxima_be_restart_with_full_stage values(9154, 'name9154', 9164.111, 915400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9154]'); insert into test_proxima_be_restart_with_full_stage values(9155, 'name9155', 9165.111, 915500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9155]'); insert into test_proxima_be_restart_with_full_stage values(9156, 'name9156', 9166.111, 915600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9156]'); insert into test_proxima_be_restart_with_full_stage values(9157, 'name9157', 9167.111, 915700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9157]'); insert into test_proxima_be_restart_with_full_stage values(9158, 'name9158', 9168.111, 915800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9158]'); insert into test_proxima_be_restart_with_full_stage values(9159, 'name9159', 9169.111, 915900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9159]'); insert into test_proxima_be_restart_with_full_stage values(9160, 'name9160', 9170.111, 916000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9160]'); insert into test_proxima_be_restart_with_full_stage values(9161, 'name9161', 9171.111, 916100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9161]'); insert into test_proxima_be_restart_with_full_stage values(9162, 'name9162', 9172.111, 916200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9162]'); insert into test_proxima_be_restart_with_full_stage values(9163, 'name9163', 9173.111, 916300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9163]'); insert into test_proxima_be_restart_with_full_stage values(9164, 'name9164', 9174.111, 916400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9164]'); insert into test_proxima_be_restart_with_full_stage values(9165, 'name9165', 9175.111, 916500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9165]'); insert into test_proxima_be_restart_with_full_stage values(9166, 'name9166', 9176.111, 916600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9166]'); insert into test_proxima_be_restart_with_full_stage values(9167, 'name9167', 9177.111, 916700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9167]'); insert into test_proxima_be_restart_with_full_stage values(9168, 'name9168', 9178.111, 916800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9168]'); insert into test_proxima_be_restart_with_full_stage values(9169, 'name9169', 9179.111, 916900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9169]'); insert into test_proxima_be_restart_with_full_stage values(9170, 'name9170', 9180.111, 917000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9170]'); insert into test_proxima_be_restart_with_full_stage values(9171, 'name9171', 9181.111, 917100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9171]'); insert into test_proxima_be_restart_with_full_stage values(9172, 'name9172', 9182.111, 917200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9172]'); insert into test_proxima_be_restart_with_full_stage values(9173, 'name9173', 9183.111, 917300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9173]'); insert into test_proxima_be_restart_with_full_stage values(9174, 'name9174', 9184.111, 917400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9174]'); insert into test_proxima_be_restart_with_full_stage values(9175, 'name9175', 9185.111, 917500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9175]'); insert into test_proxima_be_restart_with_full_stage values(9176, 'name9176', 9186.111, 917600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9176]'); insert into test_proxima_be_restart_with_full_stage values(9177, 'name9177', 9187.111, 917700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9177]'); insert into test_proxima_be_restart_with_full_stage values(9178, 'name9178', 9188.111, 917800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9178]'); insert into test_proxima_be_restart_with_full_stage values(9179, 'name9179', 9189.111, 917900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9179]'); insert into test_proxima_be_restart_with_full_stage values(9180, 'name9180', 9190.111, 918000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9180]'); insert into test_proxima_be_restart_with_full_stage values(9181, 'name9181', 9191.111, 918100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9181]'); insert into test_proxima_be_restart_with_full_stage values(9182, 'name9182', 9192.111, 918200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9182]'); insert into test_proxima_be_restart_with_full_stage values(9183, 'name9183', 9193.111, 918300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9183]'); insert into test_proxima_be_restart_with_full_stage values(9184, 'name9184', 9194.111, 918400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9184]'); insert into test_proxima_be_restart_with_full_stage values(9185, 'name9185', 9195.111, 918500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9185]'); insert into test_proxima_be_restart_with_full_stage values(9186, 'name9186', 9196.111, 918600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9186]'); insert into test_proxima_be_restart_with_full_stage values(9187, 'name9187', 9197.111, 918700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9187]'); insert into test_proxima_be_restart_with_full_stage values(9188, 'name9188', 9198.111, 918800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9188]'); insert into test_proxima_be_restart_with_full_stage values(9189, 'name9189', 9199.111, 918900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9189]'); insert into test_proxima_be_restart_with_full_stage values(9190, 'name9190', 9200.111, 919000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9190]'); insert into test_proxima_be_restart_with_full_stage values(9191, 'name9191', 9201.111, 919100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9191]'); insert into test_proxima_be_restart_with_full_stage values(9192, 'name9192', 9202.111, 919200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9192]'); insert into test_proxima_be_restart_with_full_stage values(9193, 'name9193', 9203.111, 919300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9193]'); insert into test_proxima_be_restart_with_full_stage values(9194, 'name9194', 9204.111, 919400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9194]'); insert into test_proxima_be_restart_with_full_stage values(9195, 'name9195', 9205.111, 919500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9195]'); insert into test_proxima_be_restart_with_full_stage values(9196, 'name9196', 9206.111, 919600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9196]'); insert into test_proxima_be_restart_with_full_stage values(9197, 'name9197', 9207.111, 919700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9197]'); insert into test_proxima_be_restart_with_full_stage values(9198, 'name9198', 9208.111, 919800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9198]'); insert into test_proxima_be_restart_with_full_stage values(9199, 'name9199', 9209.111, 919900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9199]'); insert into test_proxima_be_restart_with_full_stage values(9200, 'name9200', 9210.111, 920000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9200]'); insert into test_proxima_be_restart_with_full_stage values(9201, 'name9201', 9211.111, 920100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9201]'); insert into test_proxima_be_restart_with_full_stage values(9202, 'name9202', 9212.111, 920200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9202]'); insert into test_proxima_be_restart_with_full_stage values(9203, 'name9203', 9213.111, 920300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9203]'); insert into test_proxima_be_restart_with_full_stage values(9204, 'name9204', 9214.111, 920400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9204]'); insert into test_proxima_be_restart_with_full_stage values(9205, 'name9205', 9215.111, 920500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9205]'); insert into test_proxima_be_restart_with_full_stage values(9206, 'name9206', 9216.111, 920600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9206]'); insert into test_proxima_be_restart_with_full_stage values(9207, 'name9207', 9217.111, 920700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9207]'); insert into test_proxima_be_restart_with_full_stage values(9208, 'name9208', 9218.111, 920800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9208]'); insert into test_proxima_be_restart_with_full_stage values(9209, 'name9209', 9219.111, 920900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9209]'); insert into test_proxima_be_restart_with_full_stage values(9210, 'name9210', 9220.111, 921000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9210]'); insert into test_proxima_be_restart_with_full_stage values(9211, 'name9211', 9221.111, 921100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9211]'); insert into test_proxima_be_restart_with_full_stage values(9212, 'name9212', 9222.111, 921200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9212]'); insert into test_proxima_be_restart_with_full_stage values(9213, 'name9213', 9223.111, 921300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9213]'); insert into test_proxima_be_restart_with_full_stage values(9214, 'name9214', 9224.111, 921400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9214]'); insert into test_proxima_be_restart_with_full_stage values(9215, 'name9215', 9225.111, 921500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9215]'); insert into test_proxima_be_restart_with_full_stage values(9216, 'name9216', 9226.111, 921600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9216]'); insert into test_proxima_be_restart_with_full_stage values(9217, 'name9217', 9227.111, 921700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9217]'); insert into test_proxima_be_restart_with_full_stage values(9218, 'name9218', 9228.111, 921800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9218]'); insert into test_proxima_be_restart_with_full_stage values(9219, 'name9219', 9229.111, 921900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9219]'); insert into test_proxima_be_restart_with_full_stage values(9220, 'name9220', 9230.111, 922000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9220]'); insert into test_proxima_be_restart_with_full_stage values(9221, 'name9221', 9231.111, 922100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9221]'); insert into test_proxima_be_restart_with_full_stage values(9222, 'name9222', 9232.111, 922200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9222]'); insert into test_proxima_be_restart_with_full_stage values(9223, 'name9223', 9233.111, 922300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9223]'); insert into test_proxima_be_restart_with_full_stage values(9224, 'name9224', 9234.111, 922400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9224]'); insert into test_proxima_be_restart_with_full_stage values(9225, 'name9225', 9235.111, 922500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9225]'); insert into test_proxima_be_restart_with_full_stage values(9226, 'name9226', 9236.111, 922600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9226]'); insert into test_proxima_be_restart_with_full_stage values(9227, 'name9227', 9237.111, 922700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9227]'); insert into test_proxima_be_restart_with_full_stage values(9228, 'name9228', 9238.111, 922800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9228]'); insert into test_proxima_be_restart_with_full_stage values(9229, 'name9229', 9239.111, 922900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9229]'); insert into test_proxima_be_restart_with_full_stage values(9230, 'name9230', 9240.111, 923000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9230]'); insert into test_proxima_be_restart_with_full_stage values(9231, 'name9231', 9241.111, 923100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9231]'); insert into test_proxima_be_restart_with_full_stage values(9232, 'name9232', 9242.111, 923200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9232]'); insert into test_proxima_be_restart_with_full_stage values(9233, 'name9233', 9243.111, 923300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9233]'); insert into test_proxima_be_restart_with_full_stage values(9234, 'name9234', 9244.111, 923400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9234]'); insert into test_proxima_be_restart_with_full_stage values(9235, 'name9235', 9245.111, 923500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9235]'); insert into test_proxima_be_restart_with_full_stage values(9236, 'name9236', 9246.111, 923600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9236]'); insert into test_proxima_be_restart_with_full_stage values(9237, 'name9237', 9247.111, 923700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9237]'); insert into test_proxima_be_restart_with_full_stage values(9238, 'name9238', 9248.111, 923800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9238]'); insert into test_proxima_be_restart_with_full_stage values(9239, 'name9239', 9249.111, 923900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9239]'); insert into test_proxima_be_restart_with_full_stage values(9240, 'name9240', 9250.111, 924000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9240]'); insert into test_proxima_be_restart_with_full_stage values(9241, 'name9241', 9251.111, 924100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9241]'); insert into test_proxima_be_restart_with_full_stage values(9242, 'name9242', 9252.111, 924200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9242]'); insert into test_proxima_be_restart_with_full_stage values(9243, 'name9243', 9253.111, 924300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9243]'); insert into test_proxima_be_restart_with_full_stage values(9244, 'name9244', 9254.111, 924400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9244]'); insert into test_proxima_be_restart_with_full_stage values(9245, 'name9245', 9255.111, 924500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9245]'); insert into test_proxima_be_restart_with_full_stage values(9246, 'name9246', 9256.111, 924600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9246]'); insert into test_proxima_be_restart_with_full_stage values(9247, 'name9247', 9257.111, 924700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9247]'); insert into test_proxima_be_restart_with_full_stage values(9248, 'name9248', 9258.111, 924800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9248]'); insert into test_proxima_be_restart_with_full_stage values(9249, 'name9249', 9259.111, 924900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9249]'); insert into test_proxima_be_restart_with_full_stage values(9250, 'name9250', 9260.111, 925000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9250]'); insert into test_proxima_be_restart_with_full_stage values(9251, 'name9251', 9261.111, 925100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9251]'); insert into test_proxima_be_restart_with_full_stage values(9252, 'name9252', 9262.111, 925200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9252]'); insert into test_proxima_be_restart_with_full_stage values(9253, 'name9253', 9263.111, 925300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9253]'); insert into test_proxima_be_restart_with_full_stage values(9254, 'name9254', 9264.111, 925400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9254]'); insert into test_proxima_be_restart_with_full_stage values(9255, 'name9255', 9265.111, 925500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9255]'); insert into test_proxima_be_restart_with_full_stage values(9256, 'name9256', 9266.111, 925600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9256]'); insert into test_proxima_be_restart_with_full_stage values(9257, 'name9257', 9267.111, 925700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9257]'); insert into test_proxima_be_restart_with_full_stage values(9258, 'name9258', 9268.111, 925800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9258]'); insert into test_proxima_be_restart_with_full_stage values(9259, 'name9259', 9269.111, 925900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9259]'); insert into test_proxima_be_restart_with_full_stage values(9260, 'name9260', 9270.111, 926000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9260]'); insert into test_proxima_be_restart_with_full_stage values(9261, 'name9261', 9271.111, 926100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9261]'); insert into test_proxima_be_restart_with_full_stage values(9262, 'name9262', 9272.111, 926200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9262]'); insert into test_proxima_be_restart_with_full_stage values(9263, 'name9263', 9273.111, 926300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9263]'); insert into test_proxima_be_restart_with_full_stage values(9264, 'name9264', 9274.111, 926400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9264]'); insert into test_proxima_be_restart_with_full_stage values(9265, 'name9265', 9275.111, 926500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9265]'); insert into test_proxima_be_restart_with_full_stage values(9266, 'name9266', 9276.111, 926600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9266]'); insert into test_proxima_be_restart_with_full_stage values(9267, 'name9267', 9277.111, 926700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9267]'); insert into test_proxima_be_restart_with_full_stage values(9268, 'name9268', 9278.111, 926800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9268]'); insert into test_proxima_be_restart_with_full_stage values(9269, 'name9269', 9279.111, 926900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9269]'); insert into test_proxima_be_restart_with_full_stage values(9270, 'name9270', 9280.111, 927000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9270]'); insert into test_proxima_be_restart_with_full_stage values(9271, 'name9271', 9281.111, 927100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9271]'); insert into test_proxima_be_restart_with_full_stage values(9272, 'name9272', 9282.111, 927200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9272]'); insert into test_proxima_be_restart_with_full_stage values(9273, 'name9273', 9283.111, 927300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9273]'); insert into test_proxima_be_restart_with_full_stage values(9274, 'name9274', 9284.111, 927400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9274]'); insert into test_proxima_be_restart_with_full_stage values(9275, 'name9275', 9285.111, 927500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9275]'); insert into test_proxima_be_restart_with_full_stage values(9276, 'name9276', 9286.111, 927600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9276]'); insert into test_proxima_be_restart_with_full_stage values(9277, 'name9277', 9287.111, 927700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9277]'); insert into test_proxima_be_restart_with_full_stage values(9278, 'name9278', 9288.111, 927800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9278]'); insert into test_proxima_be_restart_with_full_stage values(9279, 'name9279', 9289.111, 927900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9279]'); insert into test_proxima_be_restart_with_full_stage values(9280, 'name9280', 9290.111, 928000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9280]'); insert into test_proxima_be_restart_with_full_stage values(9281, 'name9281', 9291.111, 928100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9281]'); insert into test_proxima_be_restart_with_full_stage values(9282, 'name9282', 9292.111, 928200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9282]'); insert into test_proxima_be_restart_with_full_stage values(9283, 'name9283', 9293.111, 928300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9283]'); insert into test_proxima_be_restart_with_full_stage values(9284, 'name9284', 9294.111, 928400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9284]'); insert into test_proxima_be_restart_with_full_stage values(9285, 'name9285', 9295.111, 928500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9285]'); insert into test_proxima_be_restart_with_full_stage values(9286, 'name9286', 9296.111, 928600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9286]'); insert into test_proxima_be_restart_with_full_stage values(9287, 'name9287', 9297.111, 928700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9287]'); insert into test_proxima_be_restart_with_full_stage values(9288, 'name9288', 9298.111, 928800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9288]'); insert into test_proxima_be_restart_with_full_stage values(9289, 'name9289', 9299.111, 928900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9289]'); insert into test_proxima_be_restart_with_full_stage values(9290, 'name9290', 9300.111, 929000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9290]'); insert into test_proxima_be_restart_with_full_stage values(9291, 'name9291', 9301.111, 929100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9291]'); insert into test_proxima_be_restart_with_full_stage values(9292, 'name9292', 9302.111, 929200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9292]'); insert into test_proxima_be_restart_with_full_stage values(9293, 'name9293', 9303.111, 929300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9293]'); insert into test_proxima_be_restart_with_full_stage values(9294, 'name9294', 9304.111, 929400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9294]'); insert into test_proxima_be_restart_with_full_stage values(9295, 'name9295', 9305.111, 929500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9295]'); insert into test_proxima_be_restart_with_full_stage values(9296, 'name9296', 9306.111, 929600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9296]'); insert into test_proxima_be_restart_with_full_stage values(9297, 'name9297', 9307.111, 929700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9297]'); insert into test_proxima_be_restart_with_full_stage values(9298, 'name9298', 9308.111, 929800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9298]'); insert into test_proxima_be_restart_with_full_stage values(9299, 'name9299', 9309.111, 929900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9299]'); insert into test_proxima_be_restart_with_full_stage values(9300, 'name9300', 9310.111, 930000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9300]'); insert into test_proxima_be_restart_with_full_stage values(9301, 'name9301', 9311.111, 930100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9301]'); insert into test_proxima_be_restart_with_full_stage values(9302, 'name9302', 9312.111, 930200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9302]'); insert into test_proxima_be_restart_with_full_stage values(9303, 'name9303', 9313.111, 930300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9303]'); insert into test_proxima_be_restart_with_full_stage values(9304, 'name9304', 9314.111, 930400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9304]'); insert into test_proxima_be_restart_with_full_stage values(9305, 'name9305', 9315.111, 930500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9305]'); insert into test_proxima_be_restart_with_full_stage values(9306, 'name9306', 9316.111, 930600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9306]'); insert into test_proxima_be_restart_with_full_stage values(9307, 'name9307', 9317.111, 930700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9307]'); insert into test_proxima_be_restart_with_full_stage values(9308, 'name9308', 9318.111, 930800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9308]'); insert into test_proxima_be_restart_with_full_stage values(9309, 'name9309', 9319.111, 930900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9309]'); insert into test_proxima_be_restart_with_full_stage values(9310, 'name9310', 9320.111, 931000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9310]'); insert into test_proxima_be_restart_with_full_stage values(9311, 'name9311', 9321.111, 931100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9311]'); insert into test_proxima_be_restart_with_full_stage values(9312, 'name9312', 9322.111, 931200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9312]'); insert into test_proxima_be_restart_with_full_stage values(9313, 'name9313', 9323.111, 931300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9313]'); insert into test_proxima_be_restart_with_full_stage values(9314, 'name9314', 9324.111, 931400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9314]'); insert into test_proxima_be_restart_with_full_stage values(9315, 'name9315', 9325.111, 931500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9315]'); insert into test_proxima_be_restart_with_full_stage values(9316, 'name9316', 9326.111, 931600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9316]'); insert into test_proxima_be_restart_with_full_stage values(9317, 'name9317', 9327.111, 931700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9317]'); insert into test_proxima_be_restart_with_full_stage values(9318, 'name9318', 9328.111, 931800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9318]'); insert into test_proxima_be_restart_with_full_stage values(9319, 'name9319', 9329.111, 931900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9319]'); insert into test_proxima_be_restart_with_full_stage values(9320, 'name9320', 9330.111, 932000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9320]'); insert into test_proxima_be_restart_with_full_stage values(9321, 'name9321', 9331.111, 932100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9321]'); insert into test_proxima_be_restart_with_full_stage values(9322, 'name9322', 9332.111, 932200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9322]'); insert into test_proxima_be_restart_with_full_stage values(9323, 'name9323', 9333.111, 932300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9323]'); insert into test_proxima_be_restart_with_full_stage values(9324, 'name9324', 9334.111, 932400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9324]'); insert into test_proxima_be_restart_with_full_stage values(9325, 'name9325', 9335.111, 932500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9325]'); insert into test_proxima_be_restart_with_full_stage values(9326, 'name9326', 9336.111, 932600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9326]'); insert into test_proxima_be_restart_with_full_stage values(9327, 'name9327', 9337.111, 932700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9327]'); insert into test_proxima_be_restart_with_full_stage values(9328, 'name9328', 9338.111, 932800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9328]'); insert into test_proxima_be_restart_with_full_stage values(9329, 'name9329', 9339.111, 932900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9329]'); insert into test_proxima_be_restart_with_full_stage values(9330, 'name9330', 9340.111, 933000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9330]'); insert into test_proxima_be_restart_with_full_stage values(9331, 'name9331', 9341.111, 933100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9331]'); insert into test_proxima_be_restart_with_full_stage values(9332, 'name9332', 9342.111, 933200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9332]'); insert into test_proxima_be_restart_with_full_stage values(9333, 'name9333', 9343.111, 933300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9333]'); insert into test_proxima_be_restart_with_full_stage values(9334, 'name9334', 9344.111, 933400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9334]'); insert into test_proxima_be_restart_with_full_stage values(9335, 'name9335', 9345.111, 933500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9335]'); insert into test_proxima_be_restart_with_full_stage values(9336, 'name9336', 9346.111, 933600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9336]'); insert into test_proxima_be_restart_with_full_stage values(9337, 'name9337', 9347.111, 933700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9337]'); insert into test_proxima_be_restart_with_full_stage values(9338, 'name9338', 9348.111, 933800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9338]'); insert into test_proxima_be_restart_with_full_stage values(9339, 'name9339', 9349.111, 933900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9339]'); insert into test_proxima_be_restart_with_full_stage values(9340, 'name9340', 9350.111, 934000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9340]'); insert into test_proxima_be_restart_with_full_stage values(9341, 'name9341', 9351.111, 934100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9341]'); insert into test_proxima_be_restart_with_full_stage values(9342, 'name9342', 9352.111, 934200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9342]'); insert into test_proxima_be_restart_with_full_stage values(9343, 'name9343', 9353.111, 934300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9343]'); insert into test_proxima_be_restart_with_full_stage values(9344, 'name9344', 9354.111, 934400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9344]'); insert into test_proxima_be_restart_with_full_stage values(9345, 'name9345', 9355.111, 934500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9345]'); insert into test_proxima_be_restart_with_full_stage values(9346, 'name9346', 9356.111, 934600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9346]'); insert into test_proxima_be_restart_with_full_stage values(9347, 'name9347', 9357.111, 934700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9347]'); insert into test_proxima_be_restart_with_full_stage values(9348, 'name9348', 9358.111, 934800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9348]'); insert into test_proxima_be_restart_with_full_stage values(9349, 'name9349', 9359.111, 934900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9349]'); insert into test_proxima_be_restart_with_full_stage values(9350, 'name9350', 9360.111, 935000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9350]'); insert into test_proxima_be_restart_with_full_stage values(9351, 'name9351', 9361.111, 935100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9351]'); insert into test_proxima_be_restart_with_full_stage values(9352, 'name9352', 9362.111, 935200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9352]'); insert into test_proxima_be_restart_with_full_stage values(9353, 'name9353', 9363.111, 935300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9353]'); insert into test_proxima_be_restart_with_full_stage values(9354, 'name9354', 9364.111, 935400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9354]'); insert into test_proxima_be_restart_with_full_stage values(9355, 'name9355', 9365.111, 935500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9355]'); insert into test_proxima_be_restart_with_full_stage values(9356, 'name9356', 9366.111, 935600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9356]'); insert into test_proxima_be_restart_with_full_stage values(9357, 'name9357', 9367.111, 935700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9357]'); insert into test_proxima_be_restart_with_full_stage values(9358, 'name9358', 9368.111, 935800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9358]'); insert into test_proxima_be_restart_with_full_stage values(9359, 'name9359', 9369.111, 935900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9359]'); insert into test_proxima_be_restart_with_full_stage values(9360, 'name9360', 9370.111, 936000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9360]'); insert into test_proxima_be_restart_with_full_stage values(9361, 'name9361', 9371.111, 936100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9361]'); insert into test_proxima_be_restart_with_full_stage values(9362, 'name9362', 9372.111, 936200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9362]'); insert into test_proxima_be_restart_with_full_stage values(9363, 'name9363', 9373.111, 936300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9363]'); insert into test_proxima_be_restart_with_full_stage values(9364, 'name9364', 9374.111, 936400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9364]'); insert into test_proxima_be_restart_with_full_stage values(9365, 'name9365', 9375.111, 936500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9365]'); insert into test_proxima_be_restart_with_full_stage values(9366, 'name9366', 9376.111, 936600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9366]'); insert into test_proxima_be_restart_with_full_stage values(9367, 'name9367', 9377.111, 936700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9367]'); insert into test_proxima_be_restart_with_full_stage values(9368, 'name9368', 9378.111, 936800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9368]'); insert into test_proxima_be_restart_with_full_stage values(9369, 'name9369', 9379.111, 936900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9369]'); insert into test_proxima_be_restart_with_full_stage values(9370, 'name9370', 9380.111, 937000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9370]'); insert into test_proxima_be_restart_with_full_stage values(9371, 'name9371', 9381.111, 937100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9371]'); insert into test_proxima_be_restart_with_full_stage values(9372, 'name9372', 9382.111, 937200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9372]'); insert into test_proxima_be_restart_with_full_stage values(9373, 'name9373', 9383.111, 937300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9373]'); insert into test_proxima_be_restart_with_full_stage values(9374, 'name9374', 9384.111, 937400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9374]'); insert into test_proxima_be_restart_with_full_stage values(9375, 'name9375', 9385.111, 937500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9375]'); insert into test_proxima_be_restart_with_full_stage values(9376, 'name9376', 9386.111, 937600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9376]'); insert into test_proxima_be_restart_with_full_stage values(9377, 'name9377', 9387.111, 937700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9377]'); insert into test_proxima_be_restart_with_full_stage values(9378, 'name9378', 9388.111, 937800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9378]'); insert into test_proxima_be_restart_with_full_stage values(9379, 'name9379', 9389.111, 937900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9379]'); insert into test_proxima_be_restart_with_full_stage values(9380, 'name9380', 9390.111, 938000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9380]'); insert into test_proxima_be_restart_with_full_stage values(9381, 'name9381', 9391.111, 938100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9381]'); insert into test_proxima_be_restart_with_full_stage values(9382, 'name9382', 9392.111, 938200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9382]'); insert into test_proxima_be_restart_with_full_stage values(9383, 'name9383', 9393.111, 938300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9383]'); insert into test_proxima_be_restart_with_full_stage values(9384, 'name9384', 9394.111, 938400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9384]'); insert into test_proxima_be_restart_with_full_stage values(9385, 'name9385', 9395.111, 938500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9385]'); insert into test_proxima_be_restart_with_full_stage values(9386, 'name9386', 9396.111, 938600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9386]'); insert into test_proxima_be_restart_with_full_stage values(9387, 'name9387', 9397.111, 938700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9387]'); insert into test_proxima_be_restart_with_full_stage values(9388, 'name9388', 9398.111, 938800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9388]'); insert into test_proxima_be_restart_with_full_stage values(9389, 'name9389', 9399.111, 938900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9389]'); insert into test_proxima_be_restart_with_full_stage values(9390, 'name9390', 9400.111, 939000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9390]'); insert into test_proxima_be_restart_with_full_stage values(9391, 'name9391', 9401.111, 939100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9391]'); insert into test_proxima_be_restart_with_full_stage values(9392, 'name9392', 9402.111, 939200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9392]'); insert into test_proxima_be_restart_with_full_stage values(9393, 'name9393', 9403.111, 939300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9393]'); insert into test_proxima_be_restart_with_full_stage values(9394, 'name9394', 9404.111, 939400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9394]'); insert into test_proxima_be_restart_with_full_stage values(9395, 'name9395', 9405.111, 939500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9395]'); insert into test_proxima_be_restart_with_full_stage values(9396, 'name9396', 9406.111, 939600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9396]'); insert into test_proxima_be_restart_with_full_stage values(9397, 'name9397', 9407.111, 939700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9397]'); insert into test_proxima_be_restart_with_full_stage values(9398, 'name9398', 9408.111, 939800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9398]'); insert into test_proxima_be_restart_with_full_stage values(9399, 'name9399', 9409.111, 939900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9399]'); insert into test_proxima_be_restart_with_full_stage values(9400, 'name9400', 9410.111, 940000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9400]'); insert into test_proxima_be_restart_with_full_stage values(9401, 'name9401', 9411.111, 940100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9401]'); insert into test_proxima_be_restart_with_full_stage values(9402, 'name9402', 9412.111, 940200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9402]'); insert into test_proxima_be_restart_with_full_stage values(9403, 'name9403', 9413.111, 940300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9403]'); insert into test_proxima_be_restart_with_full_stage values(9404, 'name9404', 9414.111, 940400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9404]'); insert into test_proxima_be_restart_with_full_stage values(9405, 'name9405', 9415.111, 940500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9405]'); insert into test_proxima_be_restart_with_full_stage values(9406, 'name9406', 9416.111, 940600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9406]'); insert into test_proxima_be_restart_with_full_stage values(9407, 'name9407', 9417.111, 940700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9407]'); insert into test_proxima_be_restart_with_full_stage values(9408, 'name9408', 9418.111, 940800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9408]'); insert into test_proxima_be_restart_with_full_stage values(9409, 'name9409', 9419.111, 940900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9409]'); insert into test_proxima_be_restart_with_full_stage values(9410, 'name9410', 9420.111, 941000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9410]'); insert into test_proxima_be_restart_with_full_stage values(9411, 'name9411', 9421.111, 941100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9411]'); insert into test_proxima_be_restart_with_full_stage values(9412, 'name9412', 9422.111, 941200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9412]'); insert into test_proxima_be_restart_with_full_stage values(9413, 'name9413', 9423.111, 941300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9413]'); insert into test_proxima_be_restart_with_full_stage values(9414, 'name9414', 9424.111, 941400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9414]'); insert into test_proxima_be_restart_with_full_stage values(9415, 'name9415', 9425.111, 941500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9415]'); insert into test_proxima_be_restart_with_full_stage values(9416, 'name9416', 9426.111, 941600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9416]'); insert into test_proxima_be_restart_with_full_stage values(9417, 'name9417', 9427.111, 941700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9417]'); insert into test_proxima_be_restart_with_full_stage values(9418, 'name9418', 9428.111, 941800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9418]'); insert into test_proxima_be_restart_with_full_stage values(9419, 'name9419', 9429.111, 941900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9419]'); insert into test_proxima_be_restart_with_full_stage values(9420, 'name9420', 9430.111, 942000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9420]'); insert into test_proxima_be_restart_with_full_stage values(9421, 'name9421', 9431.111, 942100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9421]'); insert into test_proxima_be_restart_with_full_stage values(9422, 'name9422', 9432.111, 942200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9422]'); insert into test_proxima_be_restart_with_full_stage values(9423, 'name9423', 9433.111, 942300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9423]'); insert into test_proxima_be_restart_with_full_stage values(9424, 'name9424', 9434.111, 942400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9424]'); insert into test_proxima_be_restart_with_full_stage values(9425, 'name9425', 9435.111, 942500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9425]'); insert into test_proxima_be_restart_with_full_stage values(9426, 'name9426', 9436.111, 942600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9426]'); insert into test_proxima_be_restart_with_full_stage values(9427, 'name9427', 9437.111, 942700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9427]'); insert into test_proxima_be_restart_with_full_stage values(9428, 'name9428', 9438.111, 942800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9428]'); insert into test_proxima_be_restart_with_full_stage values(9429, 'name9429', 9439.111, 942900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9429]'); insert into test_proxima_be_restart_with_full_stage values(9430, 'name9430', 9440.111, 943000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9430]'); insert into test_proxima_be_restart_with_full_stage values(9431, 'name9431', 9441.111, 943100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9431]'); insert into test_proxima_be_restart_with_full_stage values(9432, 'name9432', 9442.111, 943200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9432]'); insert into test_proxima_be_restart_with_full_stage values(9433, 'name9433', 9443.111, 943300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9433]'); insert into test_proxima_be_restart_with_full_stage values(9434, 'name9434', 9444.111, 943400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9434]'); insert into test_proxima_be_restart_with_full_stage values(9435, 'name9435', 9445.111, 943500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9435]'); insert into test_proxima_be_restart_with_full_stage values(9436, 'name9436', 9446.111, 943600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9436]'); insert into test_proxima_be_restart_with_full_stage values(9437, 'name9437', 9447.111, 943700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9437]'); insert into test_proxima_be_restart_with_full_stage values(9438, 'name9438', 9448.111, 943800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9438]'); insert into test_proxima_be_restart_with_full_stage values(9439, 'name9439', 9449.111, 943900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9439]'); insert into test_proxima_be_restart_with_full_stage values(9440, 'name9440', 9450.111, 944000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9440]'); insert into test_proxima_be_restart_with_full_stage values(9441, 'name9441', 9451.111, 944100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9441]'); insert into test_proxima_be_restart_with_full_stage values(9442, 'name9442', 9452.111, 944200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9442]'); insert into test_proxima_be_restart_with_full_stage values(9443, 'name9443', 9453.111, 944300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9443]'); insert into test_proxima_be_restart_with_full_stage values(9444, 'name9444', 9454.111, 944400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9444]'); insert into test_proxima_be_restart_with_full_stage values(9445, 'name9445', 9455.111, 944500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9445]'); insert into test_proxima_be_restart_with_full_stage values(9446, 'name9446', 9456.111, 944600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9446]'); insert into test_proxima_be_restart_with_full_stage values(9447, 'name9447', 9457.111, 944700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9447]'); insert into test_proxima_be_restart_with_full_stage values(9448, 'name9448', 9458.111, 944800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9448]'); insert into test_proxima_be_restart_with_full_stage values(9449, 'name9449', 9459.111, 944900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9449]'); insert into test_proxima_be_restart_with_full_stage values(9450, 'name9450', 9460.111, 945000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9450]'); insert into test_proxima_be_restart_with_full_stage values(9451, 'name9451', 9461.111, 945100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9451]'); insert into test_proxima_be_restart_with_full_stage values(9452, 'name9452', 9462.111, 945200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9452]'); insert into test_proxima_be_restart_with_full_stage values(9453, 'name9453', 9463.111, 945300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9453]'); insert into test_proxima_be_restart_with_full_stage values(9454, 'name9454', 9464.111, 945400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9454]'); insert into test_proxima_be_restart_with_full_stage values(9455, 'name9455', 9465.111, 945500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9455]'); insert into test_proxima_be_restart_with_full_stage values(9456, 'name9456', 9466.111, 945600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9456]'); insert into test_proxima_be_restart_with_full_stage values(9457, 'name9457', 9467.111, 945700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9457]'); insert into test_proxima_be_restart_with_full_stage values(9458, 'name9458', 9468.111, 945800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9458]'); insert into test_proxima_be_restart_with_full_stage values(9459, 'name9459', 9469.111, 945900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9459]'); insert into test_proxima_be_restart_with_full_stage values(9460, 'name9460', 9470.111, 946000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9460]'); insert into test_proxima_be_restart_with_full_stage values(9461, 'name9461', 9471.111, 946100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9461]'); insert into test_proxima_be_restart_with_full_stage values(9462, 'name9462', 9472.111, 946200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9462]'); insert into test_proxima_be_restart_with_full_stage values(9463, 'name9463', 9473.111, 946300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9463]'); insert into test_proxima_be_restart_with_full_stage values(9464, 'name9464', 9474.111, 946400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9464]'); insert into test_proxima_be_restart_with_full_stage values(9465, 'name9465', 9475.111, 946500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9465]'); insert into test_proxima_be_restart_with_full_stage values(9466, 'name9466', 9476.111, 946600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9466]'); insert into test_proxima_be_restart_with_full_stage values(9467, 'name9467', 9477.111, 946700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9467]'); insert into test_proxima_be_restart_with_full_stage values(9468, 'name9468', 9478.111, 946800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9468]'); insert into test_proxima_be_restart_with_full_stage values(9469, 'name9469', 9479.111, 946900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9469]'); insert into test_proxima_be_restart_with_full_stage values(9470, 'name9470', 9480.111, 947000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9470]'); insert into test_proxima_be_restart_with_full_stage values(9471, 'name9471', 9481.111, 947100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9471]'); insert into test_proxima_be_restart_with_full_stage values(9472, 'name9472', 9482.111, 947200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9472]'); insert into test_proxima_be_restart_with_full_stage values(9473, 'name9473', 9483.111, 947300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9473]'); insert into test_proxima_be_restart_with_full_stage values(9474, 'name9474', 9484.111, 947400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9474]'); insert into test_proxima_be_restart_with_full_stage values(9475, 'name9475', 9485.111, 947500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9475]'); insert into test_proxima_be_restart_with_full_stage values(9476, 'name9476', 9486.111, 947600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9476]'); insert into test_proxima_be_restart_with_full_stage values(9477, 'name9477', 9487.111, 947700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9477]'); insert into test_proxima_be_restart_with_full_stage values(9478, 'name9478', 9488.111, 947800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9478]'); insert into test_proxima_be_restart_with_full_stage values(9479, 'name9479', 9489.111, 947900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9479]'); insert into test_proxima_be_restart_with_full_stage values(9480, 'name9480', 9490.111, 948000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9480]'); insert into test_proxima_be_restart_with_full_stage values(9481, 'name9481', 9491.111, 948100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9481]'); insert into test_proxima_be_restart_with_full_stage values(9482, 'name9482', 9492.111, 948200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9482]'); insert into test_proxima_be_restart_with_full_stage values(9483, 'name9483', 9493.111, 948300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9483]'); insert into test_proxima_be_restart_with_full_stage values(9484, 'name9484', 9494.111, 948400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9484]'); insert into test_proxima_be_restart_with_full_stage values(9485, 'name9485', 9495.111, 948500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9485]'); insert into test_proxima_be_restart_with_full_stage values(9486, 'name9486', 9496.111, 948600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9486]'); insert into test_proxima_be_restart_with_full_stage values(9487, 'name9487', 9497.111, 948700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9487]'); insert into test_proxima_be_restart_with_full_stage values(9488, 'name9488', 9498.111, 948800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9488]'); insert into test_proxima_be_restart_with_full_stage values(9489, 'name9489', 9499.111, 948900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9489]'); insert into test_proxima_be_restart_with_full_stage values(9490, 'name9490', 9500.111, 949000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9490]'); insert into test_proxima_be_restart_with_full_stage values(9491, 'name9491', 9501.111, 949100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9491]'); insert into test_proxima_be_restart_with_full_stage values(9492, 'name9492', 9502.111, 949200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9492]'); insert into test_proxima_be_restart_with_full_stage values(9493, 'name9493', 9503.111, 949300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9493]'); insert into test_proxima_be_restart_with_full_stage values(9494, 'name9494', 9504.111, 949400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9494]'); insert into test_proxima_be_restart_with_full_stage values(9495, 'name9495', 9505.111, 949500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9495]'); insert into test_proxima_be_restart_with_full_stage values(9496, 'name9496', 9506.111, 949600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9496]'); insert into test_proxima_be_restart_with_full_stage values(9497, 'name9497', 9507.111, 949700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9497]'); insert into test_proxima_be_restart_with_full_stage values(9498, 'name9498', 9508.111, 949800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9498]'); insert into test_proxima_be_restart_with_full_stage values(9499, 'name9499', 9509.111, 949900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9499]'); insert into test_proxima_be_restart_with_full_stage values(9500, 'name9500', 9510.111, 950000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9500]'); insert into test_proxima_be_restart_with_full_stage values(9501, 'name9501', 9511.111, 950100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9501]'); insert into test_proxima_be_restart_with_full_stage values(9502, 'name9502', 9512.111, 950200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9502]'); insert into test_proxima_be_restart_with_full_stage values(9503, 'name9503', 9513.111, 950300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9503]'); insert into test_proxima_be_restart_with_full_stage values(9504, 'name9504', 9514.111, 950400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9504]'); insert into test_proxima_be_restart_with_full_stage values(9505, 'name9505', 9515.111, 950500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9505]'); insert into test_proxima_be_restart_with_full_stage values(9506, 'name9506', 9516.111, 950600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9506]'); insert into test_proxima_be_restart_with_full_stage values(9507, 'name9507', 9517.111, 950700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9507]'); insert into test_proxima_be_restart_with_full_stage values(9508, 'name9508', 9518.111, 950800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9508]'); insert into test_proxima_be_restart_with_full_stage values(9509, 'name9509', 9519.111, 950900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9509]'); insert into test_proxima_be_restart_with_full_stage values(9510, 'name9510', 9520.111, 951000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9510]'); insert into test_proxima_be_restart_with_full_stage values(9511, 'name9511', 9521.111, 951100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9511]'); insert into test_proxima_be_restart_with_full_stage values(9512, 'name9512', 9522.111, 951200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9512]'); insert into test_proxima_be_restart_with_full_stage values(9513, 'name9513', 9523.111, 951300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9513]'); insert into test_proxima_be_restart_with_full_stage values(9514, 'name9514', 9524.111, 951400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9514]'); insert into test_proxima_be_restart_with_full_stage values(9515, 'name9515', 9525.111, 951500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9515]'); insert into test_proxima_be_restart_with_full_stage values(9516, 'name9516', 9526.111, 951600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9516]'); insert into test_proxima_be_restart_with_full_stage values(9517, 'name9517', 9527.111, 951700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9517]'); insert into test_proxima_be_restart_with_full_stage values(9518, 'name9518', 9528.111, 951800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9518]'); insert into test_proxima_be_restart_with_full_stage values(9519, 'name9519', 9529.111, 951900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9519]'); insert into test_proxima_be_restart_with_full_stage values(9520, 'name9520', 9530.111, 952000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9520]'); insert into test_proxima_be_restart_with_full_stage values(9521, 'name9521', 9531.111, 952100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9521]'); insert into test_proxima_be_restart_with_full_stage values(9522, 'name9522', 9532.111, 952200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9522]'); insert into test_proxima_be_restart_with_full_stage values(9523, 'name9523', 9533.111, 952300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9523]'); insert into test_proxima_be_restart_with_full_stage values(9524, 'name9524', 9534.111, 952400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9524]'); insert into test_proxima_be_restart_with_full_stage values(9525, 'name9525', 9535.111, 952500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9525]'); insert into test_proxima_be_restart_with_full_stage values(9526, 'name9526', 9536.111, 952600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9526]'); insert into test_proxima_be_restart_with_full_stage values(9527, 'name9527', 9537.111, 952700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9527]'); insert into test_proxima_be_restart_with_full_stage values(9528, 'name9528', 9538.111, 952800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9528]'); insert into test_proxima_be_restart_with_full_stage values(9529, 'name9529', 9539.111, 952900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9529]'); insert into test_proxima_be_restart_with_full_stage values(9530, 'name9530', 9540.111, 953000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9530]'); insert into test_proxima_be_restart_with_full_stage values(9531, 'name9531', 9541.111, 953100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9531]'); insert into test_proxima_be_restart_with_full_stage values(9532, 'name9532', 9542.111, 953200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9532]'); insert into test_proxima_be_restart_with_full_stage values(9533, 'name9533', 9543.111, 953300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9533]'); insert into test_proxima_be_restart_with_full_stage values(9534, 'name9534', 9544.111, 953400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9534]'); insert into test_proxima_be_restart_with_full_stage values(9535, 'name9535', 9545.111, 953500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9535]'); insert into test_proxima_be_restart_with_full_stage values(9536, 'name9536', 9546.111, 953600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9536]'); insert into test_proxima_be_restart_with_full_stage values(9537, 'name9537', 9547.111, 953700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9537]'); insert into test_proxima_be_restart_with_full_stage values(9538, 'name9538', 9548.111, 953800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9538]'); insert into test_proxima_be_restart_with_full_stage values(9539, 'name9539', 9549.111, 953900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9539]'); insert into test_proxima_be_restart_with_full_stage values(9540, 'name9540', 9550.111, 954000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9540]'); insert into test_proxima_be_restart_with_full_stage values(9541, 'name9541', 9551.111, 954100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9541]'); insert into test_proxima_be_restart_with_full_stage values(9542, 'name9542', 9552.111, 954200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9542]'); insert into test_proxima_be_restart_with_full_stage values(9543, 'name9543', 9553.111, 954300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9543]'); insert into test_proxima_be_restart_with_full_stage values(9544, 'name9544', 9554.111, 954400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9544]'); insert into test_proxima_be_restart_with_full_stage values(9545, 'name9545', 9555.111, 954500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9545]'); insert into test_proxima_be_restart_with_full_stage values(9546, 'name9546', 9556.111, 954600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9546]'); insert into test_proxima_be_restart_with_full_stage values(9547, 'name9547', 9557.111, 954700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9547]'); insert into test_proxima_be_restart_with_full_stage values(9548, 'name9548', 9558.111, 954800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9548]'); insert into test_proxima_be_restart_with_full_stage values(9549, 'name9549', 9559.111, 954900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9549]'); insert into test_proxima_be_restart_with_full_stage values(9550, 'name9550', 9560.111, 955000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9550]'); insert into test_proxima_be_restart_with_full_stage values(9551, 'name9551', 9561.111, 955100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9551]'); insert into test_proxima_be_restart_with_full_stage values(9552, 'name9552', 9562.111, 955200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9552]'); insert into test_proxima_be_restart_with_full_stage values(9553, 'name9553', 9563.111, 955300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9553]'); insert into test_proxima_be_restart_with_full_stage values(9554, 'name9554', 9564.111, 955400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9554]'); insert into test_proxima_be_restart_with_full_stage values(9555, 'name9555', 9565.111, 955500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9555]'); insert into test_proxima_be_restart_with_full_stage values(9556, 'name9556', 9566.111, 955600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9556]'); insert into test_proxima_be_restart_with_full_stage values(9557, 'name9557', 9567.111, 955700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9557]'); insert into test_proxima_be_restart_with_full_stage values(9558, 'name9558', 9568.111, 955800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9558]'); insert into test_proxima_be_restart_with_full_stage values(9559, 'name9559', 9569.111, 955900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9559]'); insert into test_proxima_be_restart_with_full_stage values(9560, 'name9560', 9570.111, 956000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9560]'); insert into test_proxima_be_restart_with_full_stage values(9561, 'name9561', 9571.111, 956100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9561]'); insert into test_proxima_be_restart_with_full_stage values(9562, 'name9562', 9572.111, 956200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9562]'); insert into test_proxima_be_restart_with_full_stage values(9563, 'name9563', 9573.111, 956300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9563]'); insert into test_proxima_be_restart_with_full_stage values(9564, 'name9564', 9574.111, 956400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9564]'); insert into test_proxima_be_restart_with_full_stage values(9565, 'name9565', 9575.111, 956500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9565]'); insert into test_proxima_be_restart_with_full_stage values(9566, 'name9566', 9576.111, 956600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9566]'); insert into test_proxima_be_restart_with_full_stage values(9567, 'name9567', 9577.111, 956700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9567]'); insert into test_proxima_be_restart_with_full_stage values(9568, 'name9568', 9578.111, 956800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9568]'); insert into test_proxima_be_restart_with_full_stage values(9569, 'name9569', 9579.111, 956900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9569]'); insert into test_proxima_be_restart_with_full_stage values(9570, 'name9570', 9580.111, 957000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9570]'); insert into test_proxima_be_restart_with_full_stage values(9571, 'name9571', 9581.111, 957100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9571]'); insert into test_proxima_be_restart_with_full_stage values(9572, 'name9572', 9582.111, 957200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9572]'); insert into test_proxima_be_restart_with_full_stage values(9573, 'name9573', 9583.111, 957300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9573]'); insert into test_proxima_be_restart_with_full_stage values(9574, 'name9574', 9584.111, 957400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9574]'); insert into test_proxima_be_restart_with_full_stage values(9575, 'name9575', 9585.111, 957500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9575]'); insert into test_proxima_be_restart_with_full_stage values(9576, 'name9576', 9586.111, 957600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9576]'); insert into test_proxima_be_restart_with_full_stage values(9577, 'name9577', 9587.111, 957700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9577]'); insert into test_proxima_be_restart_with_full_stage values(9578, 'name9578', 9588.111, 957800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9578]'); insert into test_proxima_be_restart_with_full_stage values(9579, 'name9579', 9589.111, 957900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9579]'); insert into test_proxima_be_restart_with_full_stage values(9580, 'name9580', 9590.111, 958000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9580]'); insert into test_proxima_be_restart_with_full_stage values(9581, 'name9581', 9591.111, 958100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9581]'); insert into test_proxima_be_restart_with_full_stage values(9582, 'name9582', 9592.111, 958200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9582]'); insert into test_proxima_be_restart_with_full_stage values(9583, 'name9583', 9593.111, 958300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9583]'); insert into test_proxima_be_restart_with_full_stage values(9584, 'name9584', 9594.111, 958400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9584]'); insert into test_proxima_be_restart_with_full_stage values(9585, 'name9585', 9595.111, 958500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9585]'); insert into test_proxima_be_restart_with_full_stage values(9586, 'name9586', 9596.111, 958600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9586]'); insert into test_proxima_be_restart_with_full_stage values(9587, 'name9587', 9597.111, 958700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9587]'); insert into test_proxima_be_restart_with_full_stage values(9588, 'name9588', 9598.111, 958800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9588]'); insert into test_proxima_be_restart_with_full_stage values(9589, 'name9589', 9599.111, 958900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9589]'); insert into test_proxima_be_restart_with_full_stage values(9590, 'name9590', 9600.111, 959000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9590]'); insert into test_proxima_be_restart_with_full_stage values(9591, 'name9591', 9601.111, 959100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9591]'); insert into test_proxima_be_restart_with_full_stage values(9592, 'name9592', 9602.111, 959200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9592]'); insert into test_proxima_be_restart_with_full_stage values(9593, 'name9593', 9603.111, 959300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9593]'); insert into test_proxima_be_restart_with_full_stage values(9594, 'name9594', 9604.111, 959400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9594]'); insert into test_proxima_be_restart_with_full_stage values(9595, 'name9595', 9605.111, 959500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9595]'); insert into test_proxima_be_restart_with_full_stage values(9596, 'name9596', 9606.111, 959600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9596]'); insert into test_proxima_be_restart_with_full_stage values(9597, 'name9597', 9607.111, 959700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9597]'); insert into test_proxima_be_restart_with_full_stage values(9598, 'name9598', 9608.111, 959800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9598]'); insert into test_proxima_be_restart_with_full_stage values(9599, 'name9599', 9609.111, 959900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9599]'); insert into test_proxima_be_restart_with_full_stage values(9600, 'name9600', 9610.111, 960000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9600]'); insert into test_proxima_be_restart_with_full_stage values(9601, 'name9601', 9611.111, 960100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9601]'); insert into test_proxima_be_restart_with_full_stage values(9602, 'name9602', 9612.111, 960200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9602]'); insert into test_proxima_be_restart_with_full_stage values(9603, 'name9603', 9613.111, 960300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9603]'); insert into test_proxima_be_restart_with_full_stage values(9604, 'name9604', 9614.111, 960400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9604]'); insert into test_proxima_be_restart_with_full_stage values(9605, 'name9605', 9615.111, 960500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9605]'); insert into test_proxima_be_restart_with_full_stage values(9606, 'name9606', 9616.111, 960600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9606]'); insert into test_proxima_be_restart_with_full_stage values(9607, 'name9607', 9617.111, 960700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9607]'); insert into test_proxima_be_restart_with_full_stage values(9608, 'name9608', 9618.111, 960800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9608]'); insert into test_proxima_be_restart_with_full_stage values(9609, 'name9609', 9619.111, 960900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9609]'); insert into test_proxima_be_restart_with_full_stage values(9610, 'name9610', 9620.111, 961000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9610]'); insert into test_proxima_be_restart_with_full_stage values(9611, 'name9611', 9621.111, 961100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9611]'); insert into test_proxima_be_restart_with_full_stage values(9612, 'name9612', 9622.111, 961200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9612]'); insert into test_proxima_be_restart_with_full_stage values(9613, 'name9613', 9623.111, 961300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9613]'); insert into test_proxima_be_restart_with_full_stage values(9614, 'name9614', 9624.111, 961400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9614]'); insert into test_proxima_be_restart_with_full_stage values(9615, 'name9615', 9625.111, 961500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9615]'); insert into test_proxima_be_restart_with_full_stage values(9616, 'name9616', 9626.111, 961600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9616]'); insert into test_proxima_be_restart_with_full_stage values(9617, 'name9617', 9627.111, 961700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9617]'); insert into test_proxima_be_restart_with_full_stage values(9618, 'name9618', 9628.111, 961800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9618]'); insert into test_proxima_be_restart_with_full_stage values(9619, 'name9619', 9629.111, 961900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9619]'); insert into test_proxima_be_restart_with_full_stage values(9620, 'name9620', 9630.111, 962000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9620]'); insert into test_proxima_be_restart_with_full_stage values(9621, 'name9621', 9631.111, 962100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9621]'); insert into test_proxima_be_restart_with_full_stage values(9622, 'name9622', 9632.111, 962200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9622]'); insert into test_proxima_be_restart_with_full_stage values(9623, 'name9623', 9633.111, 962300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9623]'); insert into test_proxima_be_restart_with_full_stage values(9624, 'name9624', 9634.111, 962400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9624]'); insert into test_proxima_be_restart_with_full_stage values(9625, 'name9625', 9635.111, 962500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9625]'); insert into test_proxima_be_restart_with_full_stage values(9626, 'name9626', 9636.111, 962600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9626]'); insert into test_proxima_be_restart_with_full_stage values(9627, 'name9627', 9637.111, 962700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9627]'); insert into test_proxima_be_restart_with_full_stage values(9628, 'name9628', 9638.111, 962800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9628]'); insert into test_proxima_be_restart_with_full_stage values(9629, 'name9629', 9639.111, 962900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9629]'); insert into test_proxima_be_restart_with_full_stage values(9630, 'name9630', 9640.111, 963000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9630]'); insert into test_proxima_be_restart_with_full_stage values(9631, 'name9631', 9641.111, 963100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9631]'); insert into test_proxima_be_restart_with_full_stage values(9632, 'name9632', 9642.111, 963200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9632]'); insert into test_proxima_be_restart_with_full_stage values(9633, 'name9633', 9643.111, 963300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9633]'); insert into test_proxima_be_restart_with_full_stage values(9634, 'name9634', 9644.111, 963400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9634]'); insert into test_proxima_be_restart_with_full_stage values(9635, 'name9635', 9645.111, 963500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9635]'); insert into test_proxima_be_restart_with_full_stage values(9636, 'name9636', 9646.111, 963600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9636]'); insert into test_proxima_be_restart_with_full_stage values(9637, 'name9637', 9647.111, 963700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9637]'); insert into test_proxima_be_restart_with_full_stage values(9638, 'name9638', 9648.111, 963800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9638]'); insert into test_proxima_be_restart_with_full_stage values(9639, 'name9639', 9649.111, 963900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9639]'); insert into test_proxima_be_restart_with_full_stage values(9640, 'name9640', 9650.111, 964000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9640]'); insert into test_proxima_be_restart_with_full_stage values(9641, 'name9641', 9651.111, 964100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9641]'); insert into test_proxima_be_restart_with_full_stage values(9642, 'name9642', 9652.111, 964200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9642]'); insert into test_proxima_be_restart_with_full_stage values(9643, 'name9643', 9653.111, 964300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9643]'); insert into test_proxima_be_restart_with_full_stage values(9644, 'name9644', 9654.111, 964400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9644]'); insert into test_proxima_be_restart_with_full_stage values(9645, 'name9645', 9655.111, 964500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9645]'); insert into test_proxima_be_restart_with_full_stage values(9646, 'name9646', 9656.111, 964600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9646]'); insert into test_proxima_be_restart_with_full_stage values(9647, 'name9647', 9657.111, 964700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9647]'); insert into test_proxima_be_restart_with_full_stage values(9648, 'name9648', 9658.111, 964800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9648]'); insert into test_proxima_be_restart_with_full_stage values(9649, 'name9649', 9659.111, 964900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9649]'); insert into test_proxima_be_restart_with_full_stage values(9650, 'name9650', 9660.111, 965000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9650]'); insert into test_proxima_be_restart_with_full_stage values(9651, 'name9651', 9661.111, 965100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9651]'); insert into test_proxima_be_restart_with_full_stage values(9652, 'name9652', 9662.111, 965200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9652]'); insert into test_proxima_be_restart_with_full_stage values(9653, 'name9653', 9663.111, 965300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9653]'); insert into test_proxima_be_restart_with_full_stage values(9654, 'name9654', 9664.111, 965400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9654]'); insert into test_proxima_be_restart_with_full_stage values(9655, 'name9655', 9665.111, 965500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9655]'); insert into test_proxima_be_restart_with_full_stage values(9656, 'name9656', 9666.111, 965600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9656]'); insert into test_proxima_be_restart_with_full_stage values(9657, 'name9657', 9667.111, 965700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9657]'); insert into test_proxima_be_restart_with_full_stage values(9658, 'name9658', 9668.111, 965800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9658]'); insert into test_proxima_be_restart_with_full_stage values(9659, 'name9659', 9669.111, 965900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9659]'); insert into test_proxima_be_restart_with_full_stage values(9660, 'name9660', 9670.111, 966000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9660]'); insert into test_proxima_be_restart_with_full_stage values(9661, 'name9661', 9671.111, 966100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9661]'); insert into test_proxima_be_restart_with_full_stage values(9662, 'name9662', 9672.111, 966200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9662]'); insert into test_proxima_be_restart_with_full_stage values(9663, 'name9663', 9673.111, 966300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9663]'); insert into test_proxima_be_restart_with_full_stage values(9664, 'name9664', 9674.111, 966400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9664]'); insert into test_proxima_be_restart_with_full_stage values(9665, 'name9665', 9675.111, 966500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9665]'); insert into test_proxima_be_restart_with_full_stage values(9666, 'name9666', 9676.111, 966600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9666]'); insert into test_proxima_be_restart_with_full_stage values(9667, 'name9667', 9677.111, 966700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9667]'); insert into test_proxima_be_restart_with_full_stage values(9668, 'name9668', 9678.111, 966800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9668]'); insert into test_proxima_be_restart_with_full_stage values(9669, 'name9669', 9679.111, 966900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9669]'); insert into test_proxima_be_restart_with_full_stage values(9670, 'name9670', 9680.111, 967000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9670]'); insert into test_proxima_be_restart_with_full_stage values(9671, 'name9671', 9681.111, 967100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9671]'); insert into test_proxima_be_restart_with_full_stage values(9672, 'name9672', 9682.111, 967200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9672]'); insert into test_proxima_be_restart_with_full_stage values(9673, 'name9673', 9683.111, 967300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9673]'); insert into test_proxima_be_restart_with_full_stage values(9674, 'name9674', 9684.111, 967400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9674]'); insert into test_proxima_be_restart_with_full_stage values(9675, 'name9675', 9685.111, 967500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9675]'); insert into test_proxima_be_restart_with_full_stage values(9676, 'name9676', 9686.111, 967600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9676]'); insert into test_proxima_be_restart_with_full_stage values(9677, 'name9677', 9687.111, 967700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9677]'); insert into test_proxima_be_restart_with_full_stage values(9678, 'name9678', 9688.111, 967800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9678]'); insert into test_proxima_be_restart_with_full_stage values(9679, 'name9679', 9689.111, 967900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9679]'); insert into test_proxima_be_restart_with_full_stage values(9680, 'name9680', 9690.111, 968000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9680]'); insert into test_proxima_be_restart_with_full_stage values(9681, 'name9681', 9691.111, 968100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9681]'); insert into test_proxima_be_restart_with_full_stage values(9682, 'name9682', 9692.111, 968200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9682]'); insert into test_proxima_be_restart_with_full_stage values(9683, 'name9683', 9693.111, 968300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9683]'); insert into test_proxima_be_restart_with_full_stage values(9684, 'name9684', 9694.111, 968400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9684]'); insert into test_proxima_be_restart_with_full_stage values(9685, 'name9685', 9695.111, 968500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9685]'); insert into test_proxima_be_restart_with_full_stage values(9686, 'name9686', 9696.111, 968600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9686]'); insert into test_proxima_be_restart_with_full_stage values(9687, 'name9687', 9697.111, 968700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9687]'); insert into test_proxima_be_restart_with_full_stage values(9688, 'name9688', 9698.111, 968800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9688]'); insert into test_proxima_be_restart_with_full_stage values(9689, 'name9689', 9699.111, 968900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9689]'); insert into test_proxima_be_restart_with_full_stage values(9690, 'name9690', 9700.111, 969000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9690]'); insert into test_proxima_be_restart_with_full_stage values(9691, 'name9691', 9701.111, 969100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9691]'); insert into test_proxima_be_restart_with_full_stage values(9692, 'name9692', 9702.111, 969200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9692]'); insert into test_proxima_be_restart_with_full_stage values(9693, 'name9693', 9703.111, 969300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9693]'); insert into test_proxima_be_restart_with_full_stage values(9694, 'name9694', 9704.111, 969400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9694]'); insert into test_proxima_be_restart_with_full_stage values(9695, 'name9695', 9705.111, 969500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9695]'); insert into test_proxima_be_restart_with_full_stage values(9696, 'name9696', 9706.111, 969600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9696]'); insert into test_proxima_be_restart_with_full_stage values(9697, 'name9697', 9707.111, 969700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9697]'); insert into test_proxima_be_restart_with_full_stage values(9698, 'name9698', 9708.111, 969800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9698]'); insert into test_proxima_be_restart_with_full_stage values(9699, 'name9699', 9709.111, 969900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9699]'); insert into test_proxima_be_restart_with_full_stage values(9700, 'name9700', 9710.111, 970000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9700]'); insert into test_proxima_be_restart_with_full_stage values(9701, 'name9701', 9711.111, 970100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9701]'); insert into test_proxima_be_restart_with_full_stage values(9702, 'name9702', 9712.111, 970200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9702]'); insert into test_proxima_be_restart_with_full_stage values(9703, 'name9703', 9713.111, 970300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9703]'); insert into test_proxima_be_restart_with_full_stage values(9704, 'name9704', 9714.111, 970400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9704]'); insert into test_proxima_be_restart_with_full_stage values(9705, 'name9705', 9715.111, 970500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9705]'); insert into test_proxima_be_restart_with_full_stage values(9706, 'name9706', 9716.111, 970600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9706]'); insert into test_proxima_be_restart_with_full_stage values(9707, 'name9707', 9717.111, 970700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9707]'); insert into test_proxima_be_restart_with_full_stage values(9708, 'name9708', 9718.111, 970800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9708]'); insert into test_proxima_be_restart_with_full_stage values(9709, 'name9709', 9719.111, 970900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9709]'); insert into test_proxima_be_restart_with_full_stage values(9710, 'name9710', 9720.111, 971000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9710]'); insert into test_proxima_be_restart_with_full_stage values(9711, 'name9711', 9721.111, 971100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9711]'); insert into test_proxima_be_restart_with_full_stage values(9712, 'name9712', 9722.111, 971200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9712]'); insert into test_proxima_be_restart_with_full_stage values(9713, 'name9713', 9723.111, 971300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9713]'); insert into test_proxima_be_restart_with_full_stage values(9714, 'name9714', 9724.111, 971400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9714]'); insert into test_proxima_be_restart_with_full_stage values(9715, 'name9715', 9725.111, 971500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9715]'); insert into test_proxima_be_restart_with_full_stage values(9716, 'name9716', 9726.111, 971600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9716]'); insert into test_proxima_be_restart_with_full_stage values(9717, 'name9717', 9727.111, 971700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9717]'); insert into test_proxima_be_restart_with_full_stage values(9718, 'name9718', 9728.111, 971800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9718]'); insert into test_proxima_be_restart_with_full_stage values(9719, 'name9719', 9729.111, 971900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9719]'); insert into test_proxima_be_restart_with_full_stage values(9720, 'name9720', 9730.111, 972000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9720]'); insert into test_proxima_be_restart_with_full_stage values(9721, 'name9721', 9731.111, 972100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9721]'); insert into test_proxima_be_restart_with_full_stage values(9722, 'name9722', 9732.111, 972200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9722]'); insert into test_proxima_be_restart_with_full_stage values(9723, 'name9723', 9733.111, 972300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9723]'); insert into test_proxima_be_restart_with_full_stage values(9724, 'name9724', 9734.111, 972400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9724]'); insert into test_proxima_be_restart_with_full_stage values(9725, 'name9725', 9735.111, 972500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9725]'); insert into test_proxima_be_restart_with_full_stage values(9726, 'name9726', 9736.111, 972600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9726]'); insert into test_proxima_be_restart_with_full_stage values(9727, 'name9727', 9737.111, 972700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9727]'); insert into test_proxima_be_restart_with_full_stage values(9728, 'name9728', 9738.111, 972800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9728]'); insert into test_proxima_be_restart_with_full_stage values(9729, 'name9729', 9739.111, 972900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9729]'); insert into test_proxima_be_restart_with_full_stage values(9730, 'name9730', 9740.111, 973000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9730]'); insert into test_proxima_be_restart_with_full_stage values(9731, 'name9731', 9741.111, 973100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9731]'); insert into test_proxima_be_restart_with_full_stage values(9732, 'name9732', 9742.111, 973200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9732]'); insert into test_proxima_be_restart_with_full_stage values(9733, 'name9733', 9743.111, 973300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9733]'); insert into test_proxima_be_restart_with_full_stage values(9734, 'name9734', 9744.111, 973400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9734]'); insert into test_proxima_be_restart_with_full_stage values(9735, 'name9735', 9745.111, 973500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9735]'); insert into test_proxima_be_restart_with_full_stage values(9736, 'name9736', 9746.111, 973600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9736]'); insert into test_proxima_be_restart_with_full_stage values(9737, 'name9737', 9747.111, 973700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9737]'); insert into test_proxima_be_restart_with_full_stage values(9738, 'name9738', 9748.111, 973800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9738]'); insert into test_proxima_be_restart_with_full_stage values(9739, 'name9739', 9749.111, 973900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9739]'); insert into test_proxima_be_restart_with_full_stage values(9740, 'name9740', 9750.111, 974000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9740]'); insert into test_proxima_be_restart_with_full_stage values(9741, 'name9741', 9751.111, 974100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9741]'); insert into test_proxima_be_restart_with_full_stage values(9742, 'name9742', 9752.111, 974200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9742]'); insert into test_proxima_be_restart_with_full_stage values(9743, 'name9743', 9753.111, 974300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9743]'); insert into test_proxima_be_restart_with_full_stage values(9744, 'name9744', 9754.111, 974400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9744]'); insert into test_proxima_be_restart_with_full_stage values(9745, 'name9745', 9755.111, 974500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9745]'); insert into test_proxima_be_restart_with_full_stage values(9746, 'name9746', 9756.111, 974600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9746]'); insert into test_proxima_be_restart_with_full_stage values(9747, 'name9747', 9757.111, 974700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9747]'); insert into test_proxima_be_restart_with_full_stage values(9748, 'name9748', 9758.111, 974800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9748]'); insert into test_proxima_be_restart_with_full_stage values(9749, 'name9749', 9759.111, 974900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9749]'); insert into test_proxima_be_restart_with_full_stage values(9750, 'name9750', 9760.111, 975000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9750]'); insert into test_proxima_be_restart_with_full_stage values(9751, 'name9751', 9761.111, 975100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9751]'); insert into test_proxima_be_restart_with_full_stage values(9752, 'name9752', 9762.111, 975200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9752]'); insert into test_proxima_be_restart_with_full_stage values(9753, 'name9753', 9763.111, 975300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9753]'); insert into test_proxima_be_restart_with_full_stage values(9754, 'name9754', 9764.111, 975400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9754]'); insert into test_proxima_be_restart_with_full_stage values(9755, 'name9755', 9765.111, 975500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9755]'); insert into test_proxima_be_restart_with_full_stage values(9756, 'name9756', 9766.111, 975600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9756]'); insert into test_proxima_be_restart_with_full_stage values(9757, 'name9757', 9767.111, 975700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9757]'); insert into test_proxima_be_restart_with_full_stage values(9758, 'name9758', 9768.111, 975800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9758]'); insert into test_proxima_be_restart_with_full_stage values(9759, 'name9759', 9769.111, 975900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9759]'); insert into test_proxima_be_restart_with_full_stage values(9760, 'name9760', 9770.111, 976000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9760]'); insert into test_proxima_be_restart_with_full_stage values(9761, 'name9761', 9771.111, 976100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9761]'); insert into test_proxima_be_restart_with_full_stage values(9762, 'name9762', 9772.111, 976200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9762]'); insert into test_proxima_be_restart_with_full_stage values(9763, 'name9763', 9773.111, 976300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9763]'); insert into test_proxima_be_restart_with_full_stage values(9764, 'name9764', 9774.111, 976400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9764]'); insert into test_proxima_be_restart_with_full_stage values(9765, 'name9765', 9775.111, 976500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9765]'); insert into test_proxima_be_restart_with_full_stage values(9766, 'name9766', 9776.111, 976600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9766]'); insert into test_proxima_be_restart_with_full_stage values(9767, 'name9767', 9777.111, 976700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9767]'); insert into test_proxima_be_restart_with_full_stage values(9768, 'name9768', 9778.111, 976800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9768]'); insert into test_proxima_be_restart_with_full_stage values(9769, 'name9769', 9779.111, 976900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9769]'); insert into test_proxima_be_restart_with_full_stage values(9770, 'name9770', 9780.111, 977000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9770]'); insert into test_proxima_be_restart_with_full_stage values(9771, 'name9771', 9781.111, 977100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9771]'); insert into test_proxima_be_restart_with_full_stage values(9772, 'name9772', 9782.111, 977200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9772]'); insert into test_proxima_be_restart_with_full_stage values(9773, 'name9773', 9783.111, 977300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9773]'); insert into test_proxima_be_restart_with_full_stage values(9774, 'name9774', 9784.111, 977400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9774]'); insert into test_proxima_be_restart_with_full_stage values(9775, 'name9775', 9785.111, 977500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9775]'); insert into test_proxima_be_restart_with_full_stage values(9776, 'name9776', 9786.111, 977600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9776]'); insert into test_proxima_be_restart_with_full_stage values(9777, 'name9777', 9787.111, 977700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9777]'); insert into test_proxima_be_restart_with_full_stage values(9778, 'name9778', 9788.111, 977800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9778]'); insert into test_proxima_be_restart_with_full_stage values(9779, 'name9779', 9789.111, 977900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9779]'); insert into test_proxima_be_restart_with_full_stage values(9780, 'name9780', 9790.111, 978000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9780]'); insert into test_proxima_be_restart_with_full_stage values(9781, 'name9781', 9791.111, 978100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9781]'); insert into test_proxima_be_restart_with_full_stage values(9782, 'name9782', 9792.111, 978200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9782]'); insert into test_proxima_be_restart_with_full_stage values(9783, 'name9783', 9793.111, 978300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9783]'); insert into test_proxima_be_restart_with_full_stage values(9784, 'name9784', 9794.111, 978400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9784]'); insert into test_proxima_be_restart_with_full_stage values(9785, 'name9785', 9795.111, 978500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9785]'); insert into test_proxima_be_restart_with_full_stage values(9786, 'name9786', 9796.111, 978600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9786]'); insert into test_proxima_be_restart_with_full_stage values(9787, 'name9787', 9797.111, 978700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9787]'); insert into test_proxima_be_restart_with_full_stage values(9788, 'name9788', 9798.111, 978800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9788]'); insert into test_proxima_be_restart_with_full_stage values(9789, 'name9789', 9799.111, 978900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9789]'); insert into test_proxima_be_restart_with_full_stage values(9790, 'name9790', 9800.111, 979000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9790]'); insert into test_proxima_be_restart_with_full_stage values(9791, 'name9791', 9801.111, 979100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9791]'); insert into test_proxima_be_restart_with_full_stage values(9792, 'name9792', 9802.111, 979200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9792]'); insert into test_proxima_be_restart_with_full_stage values(9793, 'name9793', 9803.111, 979300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9793]'); insert into test_proxima_be_restart_with_full_stage values(9794, 'name9794', 9804.111, 979400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9794]'); insert into test_proxima_be_restart_with_full_stage values(9795, 'name9795', 9805.111, 979500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9795]'); insert into test_proxima_be_restart_with_full_stage values(9796, 'name9796', 9806.111, 979600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9796]'); insert into test_proxima_be_restart_with_full_stage values(9797, 'name9797', 9807.111, 979700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9797]'); insert into test_proxima_be_restart_with_full_stage values(9798, 'name9798', 9808.111, 979800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9798]'); insert into test_proxima_be_restart_with_full_stage values(9799, 'name9799', 9809.111, 979900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9799]'); insert into test_proxima_be_restart_with_full_stage values(9800, 'name9800', 9810.111, 980000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9800]'); insert into test_proxima_be_restart_with_full_stage values(9801, 'name9801', 9811.111, 980100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9801]'); insert into test_proxima_be_restart_with_full_stage values(9802, 'name9802', 9812.111, 980200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9802]'); insert into test_proxima_be_restart_with_full_stage values(9803, 'name9803', 9813.111, 980300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9803]'); insert into test_proxima_be_restart_with_full_stage values(9804, 'name9804', 9814.111, 980400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9804]'); insert into test_proxima_be_restart_with_full_stage values(9805, 'name9805', 9815.111, 980500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9805]'); insert into test_proxima_be_restart_with_full_stage values(9806, 'name9806', 9816.111, 980600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9806]'); insert into test_proxima_be_restart_with_full_stage values(9807, 'name9807', 9817.111, 980700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9807]'); insert into test_proxima_be_restart_with_full_stage values(9808, 'name9808', 9818.111, 980800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9808]'); insert into test_proxima_be_restart_with_full_stage values(9809, 'name9809', 9819.111, 980900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9809]'); insert into test_proxima_be_restart_with_full_stage values(9810, 'name9810', 9820.111, 981000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9810]'); insert into test_proxima_be_restart_with_full_stage values(9811, 'name9811', 9821.111, 981100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9811]'); insert into test_proxima_be_restart_with_full_stage values(9812, 'name9812', 9822.111, 981200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9812]'); insert into test_proxima_be_restart_with_full_stage values(9813, 'name9813', 9823.111, 981300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9813]'); insert into test_proxima_be_restart_with_full_stage values(9814, 'name9814', 9824.111, 981400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9814]'); insert into test_proxima_be_restart_with_full_stage values(9815, 'name9815', 9825.111, 981500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9815]'); insert into test_proxima_be_restart_with_full_stage values(9816, 'name9816', 9826.111, 981600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9816]'); insert into test_proxima_be_restart_with_full_stage values(9817, 'name9817', 9827.111, 981700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9817]'); insert into test_proxima_be_restart_with_full_stage values(9818, 'name9818', 9828.111, 981800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9818]'); insert into test_proxima_be_restart_with_full_stage values(9819, 'name9819', 9829.111, 981900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9819]'); insert into test_proxima_be_restart_with_full_stage values(9820, 'name9820', 9830.111, 982000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9820]'); insert into test_proxima_be_restart_with_full_stage values(9821, 'name9821', 9831.111, 982100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9821]'); insert into test_proxima_be_restart_with_full_stage values(9822, 'name9822', 9832.111, 982200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9822]'); insert into test_proxima_be_restart_with_full_stage values(9823, 'name9823', 9833.111, 982300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9823]'); insert into test_proxima_be_restart_with_full_stage values(9824, 'name9824', 9834.111, 982400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9824]'); insert into test_proxima_be_restart_with_full_stage values(9825, 'name9825', 9835.111, 982500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9825]'); insert into test_proxima_be_restart_with_full_stage values(9826, 'name9826', 9836.111, 982600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9826]'); insert into test_proxima_be_restart_with_full_stage values(9827, 'name9827', 9837.111, 982700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9827]'); insert into test_proxima_be_restart_with_full_stage values(9828, 'name9828', 9838.111, 982800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9828]'); insert into test_proxima_be_restart_with_full_stage values(9829, 'name9829', 9839.111, 982900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9829]'); insert into test_proxima_be_restart_with_full_stage values(9830, 'name9830', 9840.111, 983000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9830]'); insert into test_proxima_be_restart_with_full_stage values(9831, 'name9831', 9841.111, 983100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9831]'); insert into test_proxima_be_restart_with_full_stage values(9832, 'name9832', 9842.111, 983200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9832]'); insert into test_proxima_be_restart_with_full_stage values(9833, 'name9833', 9843.111, 983300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9833]'); insert into test_proxima_be_restart_with_full_stage values(9834, 'name9834', 9844.111, 983400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9834]'); insert into test_proxima_be_restart_with_full_stage values(9835, 'name9835', 9845.111, 983500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9835]'); insert into test_proxima_be_restart_with_full_stage values(9836, 'name9836', 9846.111, 983600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9836]'); insert into test_proxima_be_restart_with_full_stage values(9837, 'name9837', 9847.111, 983700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9837]'); insert into test_proxima_be_restart_with_full_stage values(9838, 'name9838', 9848.111, 983800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9838]'); insert into test_proxima_be_restart_with_full_stage values(9839, 'name9839', 9849.111, 983900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9839]'); insert into test_proxima_be_restart_with_full_stage values(9840, 'name9840', 9850.111, 984000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9840]'); insert into test_proxima_be_restart_with_full_stage values(9841, 'name9841', 9851.111, 984100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9841]'); insert into test_proxima_be_restart_with_full_stage values(9842, 'name9842', 9852.111, 984200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9842]'); insert into test_proxima_be_restart_with_full_stage values(9843, 'name9843', 9853.111, 984300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9843]'); insert into test_proxima_be_restart_with_full_stage values(9844, 'name9844', 9854.111, 984400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9844]'); insert into test_proxima_be_restart_with_full_stage values(9845, 'name9845', 9855.111, 984500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9845]'); insert into test_proxima_be_restart_with_full_stage values(9846, 'name9846', 9856.111, 984600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9846]'); insert into test_proxima_be_restart_with_full_stage values(9847, 'name9847', 9857.111, 984700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9847]'); insert into test_proxima_be_restart_with_full_stage values(9848, 'name9848', 9858.111, 984800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9848]'); insert into test_proxima_be_restart_with_full_stage values(9849, 'name9849', 9859.111, 984900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9849]'); insert into test_proxima_be_restart_with_full_stage values(9850, 'name9850', 9860.111, 985000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9850]'); insert into test_proxima_be_restart_with_full_stage values(9851, 'name9851', 9861.111, 985100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9851]'); insert into test_proxima_be_restart_with_full_stage values(9852, 'name9852', 9862.111, 985200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9852]'); insert into test_proxima_be_restart_with_full_stage values(9853, 'name9853', 9863.111, 985300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9853]'); insert into test_proxima_be_restart_with_full_stage values(9854, 'name9854', 9864.111, 985400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9854]'); insert into test_proxima_be_restart_with_full_stage values(9855, 'name9855', 9865.111, 985500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9855]'); insert into test_proxima_be_restart_with_full_stage values(9856, 'name9856', 9866.111, 985600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9856]'); insert into test_proxima_be_restart_with_full_stage values(9857, 'name9857', 9867.111, 985700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9857]'); insert into test_proxima_be_restart_with_full_stage values(9858, 'name9858', 9868.111, 985800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9858]'); insert into test_proxima_be_restart_with_full_stage values(9859, 'name9859', 9869.111, 985900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9859]'); insert into test_proxima_be_restart_with_full_stage values(9860, 'name9860', 9870.111, 986000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9860]'); insert into test_proxima_be_restart_with_full_stage values(9861, 'name9861', 9871.111, 986100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9861]'); insert into test_proxima_be_restart_with_full_stage values(9862, 'name9862', 9872.111, 986200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9862]'); insert into test_proxima_be_restart_with_full_stage values(9863, 'name9863', 9873.111, 986300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9863]'); insert into test_proxima_be_restart_with_full_stage values(9864, 'name9864', 9874.111, 986400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9864]'); insert into test_proxima_be_restart_with_full_stage values(9865, 'name9865', 9875.111, 986500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9865]'); insert into test_proxima_be_restart_with_full_stage values(9866, 'name9866', 9876.111, 986600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9866]'); insert into test_proxima_be_restart_with_full_stage values(9867, 'name9867', 9877.111, 986700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9867]'); insert into test_proxima_be_restart_with_full_stage values(9868, 'name9868', 9878.111, 986800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9868]'); insert into test_proxima_be_restart_with_full_stage values(9869, 'name9869', 9879.111, 986900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9869]'); insert into test_proxima_be_restart_with_full_stage values(9870, 'name9870', 9880.111, 987000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9870]'); insert into test_proxima_be_restart_with_full_stage values(9871, 'name9871', 9881.111, 987100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9871]'); insert into test_proxima_be_restart_with_full_stage values(9872, 'name9872', 9882.111, 987200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9872]'); insert into test_proxima_be_restart_with_full_stage values(9873, 'name9873', 9883.111, 987300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9873]'); insert into test_proxima_be_restart_with_full_stage values(9874, 'name9874', 9884.111, 987400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9874]'); insert into test_proxima_be_restart_with_full_stage values(9875, 'name9875', 9885.111, 987500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9875]'); insert into test_proxima_be_restart_with_full_stage values(9876, 'name9876', 9886.111, 987600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9876]'); insert into test_proxima_be_restart_with_full_stage values(9877, 'name9877', 9887.111, 987700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9877]'); insert into test_proxima_be_restart_with_full_stage values(9878, 'name9878', 9888.111, 987800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9878]'); insert into test_proxima_be_restart_with_full_stage values(9879, 'name9879', 9889.111, 987900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9879]'); insert into test_proxima_be_restart_with_full_stage values(9880, 'name9880', 9890.111, 988000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9880]'); insert into test_proxima_be_restart_with_full_stage values(9881, 'name9881', 9891.111, 988100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9881]'); insert into test_proxima_be_restart_with_full_stage values(9882, 'name9882', 9892.111, 988200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9882]'); insert into test_proxima_be_restart_with_full_stage values(9883, 'name9883', 9893.111, 988300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9883]'); insert into test_proxima_be_restart_with_full_stage values(9884, 'name9884', 9894.111, 988400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9884]'); insert into test_proxima_be_restart_with_full_stage values(9885, 'name9885', 9895.111, 988500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9885]'); insert into test_proxima_be_restart_with_full_stage values(9886, 'name9886', 9896.111, 988600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9886]'); insert into test_proxima_be_restart_with_full_stage values(9887, 'name9887', 9897.111, 988700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9887]'); insert into test_proxima_be_restart_with_full_stage values(9888, 'name9888', 9898.111, 988800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9888]'); insert into test_proxima_be_restart_with_full_stage values(9889, 'name9889', 9899.111, 988900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9889]'); insert into test_proxima_be_restart_with_full_stage values(9890, 'name9890', 9900.111, 989000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9890]'); insert into test_proxima_be_restart_with_full_stage values(9891, 'name9891', 9901.111, 989100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9891]'); insert into test_proxima_be_restart_with_full_stage values(9892, 'name9892', 9902.111, 989200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9892]'); insert into test_proxima_be_restart_with_full_stage values(9893, 'name9893', 9903.111, 989300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9893]'); insert into test_proxima_be_restart_with_full_stage values(9894, 'name9894', 9904.111, 989400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9894]'); insert into test_proxima_be_restart_with_full_stage values(9895, 'name9895', 9905.111, 989500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9895]'); insert into test_proxima_be_restart_with_full_stage values(9896, 'name9896', 9906.111, 989600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9896]'); insert into test_proxima_be_restart_with_full_stage values(9897, 'name9897', 9907.111, 989700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9897]'); insert into test_proxima_be_restart_with_full_stage values(9898, 'name9898', 9908.111, 989800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9898]'); insert into test_proxima_be_restart_with_full_stage values(9899, 'name9899', 9909.111, 989900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9899]'); insert into test_proxima_be_restart_with_full_stage values(9900, 'name9900', 9910.111, 990000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9900]'); insert into test_proxima_be_restart_with_full_stage values(9901, 'name9901', 9911.111, 990100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9901]'); insert into test_proxima_be_restart_with_full_stage values(9902, 'name9902', 9912.111, 990200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9902]'); insert into test_proxima_be_restart_with_full_stage values(9903, 'name9903', 9913.111, 990300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9903]'); insert into test_proxima_be_restart_with_full_stage values(9904, 'name9904', 9914.111, 990400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9904]'); insert into test_proxima_be_restart_with_full_stage values(9905, 'name9905', 9915.111, 990500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9905]'); insert into test_proxima_be_restart_with_full_stage values(9906, 'name9906', 9916.111, 990600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9906]'); insert into test_proxima_be_restart_with_full_stage values(9907, 'name9907', 9917.111, 990700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9907]'); insert into test_proxima_be_restart_with_full_stage values(9908, 'name9908', 9918.111, 990800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9908]'); insert into test_proxima_be_restart_with_full_stage values(9909, 'name9909', 9919.111, 990900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9909]'); insert into test_proxima_be_restart_with_full_stage values(9910, 'name9910', 9920.111, 991000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9910]'); insert into test_proxima_be_restart_with_full_stage values(9911, 'name9911', 9921.111, 991100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9911]'); insert into test_proxima_be_restart_with_full_stage values(9912, 'name9912', 9922.111, 991200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9912]'); insert into test_proxima_be_restart_with_full_stage values(9913, 'name9913', 9923.111, 991300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9913]'); insert into test_proxima_be_restart_with_full_stage values(9914, 'name9914', 9924.111, 991400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9914]'); insert into test_proxima_be_restart_with_full_stage values(9915, 'name9915', 9925.111, 991500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9915]'); insert into test_proxima_be_restart_with_full_stage values(9916, 'name9916', 9926.111, 991600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9916]'); insert into test_proxima_be_restart_with_full_stage values(9917, 'name9917', 9927.111, 991700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9917]'); insert into test_proxima_be_restart_with_full_stage values(9918, 'name9918', 9928.111, 991800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9918]'); insert into test_proxima_be_restart_with_full_stage values(9919, 'name9919', 9929.111, 991900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9919]'); insert into test_proxima_be_restart_with_full_stage values(9920, 'name9920', 9930.111, 992000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9920]'); insert into test_proxima_be_restart_with_full_stage values(9921, 'name9921', 9931.111, 992100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9921]'); insert into test_proxima_be_restart_with_full_stage values(9922, 'name9922', 9932.111, 992200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9922]'); insert into test_proxima_be_restart_with_full_stage values(9923, 'name9923', 9933.111, 992300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9923]'); insert into test_proxima_be_restart_with_full_stage values(9924, 'name9924', 9934.111, 992400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9924]'); insert into test_proxima_be_restart_with_full_stage values(9925, 'name9925', 9935.111, 992500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9925]'); insert into test_proxima_be_restart_with_full_stage values(9926, 'name9926', 9936.111, 992600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9926]'); insert into test_proxima_be_restart_with_full_stage values(9927, 'name9927', 9937.111, 992700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9927]'); insert into test_proxima_be_restart_with_full_stage values(9928, 'name9928', 9938.111, 992800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9928]'); insert into test_proxima_be_restart_with_full_stage values(9929, 'name9929', 9939.111, 992900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9929]'); insert into test_proxima_be_restart_with_full_stage values(9930, 'name9930', 9940.111, 993000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9930]'); insert into test_proxima_be_restart_with_full_stage values(9931, 'name9931', 9941.111, 993100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9931]'); insert into test_proxima_be_restart_with_full_stage values(9932, 'name9932', 9942.111, 993200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9932]'); insert into test_proxima_be_restart_with_full_stage values(9933, 'name9933', 9943.111, 993300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9933]'); insert into test_proxima_be_restart_with_full_stage values(9934, 'name9934', 9944.111, 993400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9934]'); insert into test_proxima_be_restart_with_full_stage values(9935, 'name9935', 9945.111, 993500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9935]'); insert into test_proxima_be_restart_with_full_stage values(9936, 'name9936', 9946.111, 993600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9936]'); insert into test_proxima_be_restart_with_full_stage values(9937, 'name9937', 9947.111, 993700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9937]'); insert into test_proxima_be_restart_with_full_stage values(9938, 'name9938', 9948.111, 993800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9938]'); insert into test_proxima_be_restart_with_full_stage values(9939, 'name9939', 9949.111, 993900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9939]'); insert into test_proxima_be_restart_with_full_stage values(9940, 'name9940', 9950.111, 994000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9940]'); insert into test_proxima_be_restart_with_full_stage values(9941, 'name9941', 9951.111, 994100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9941]'); insert into test_proxima_be_restart_with_full_stage values(9942, 'name9942', 9952.111, 994200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9942]'); insert into test_proxima_be_restart_with_full_stage values(9943, 'name9943', 9953.111, 994300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9943]'); insert into test_proxima_be_restart_with_full_stage values(9944, 'name9944', 9954.111, 994400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9944]'); insert into test_proxima_be_restart_with_full_stage values(9945, 'name9945', 9955.111, 994500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9945]'); insert into test_proxima_be_restart_with_full_stage values(9946, 'name9946', 9956.111, 994600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9946]'); insert into test_proxima_be_restart_with_full_stage values(9947, 'name9947', 9957.111, 994700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9947]'); insert into test_proxima_be_restart_with_full_stage values(9948, 'name9948', 9958.111, 994800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9948]'); insert into test_proxima_be_restart_with_full_stage values(9949, 'name9949', 9959.111, 994900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9949]'); insert into test_proxima_be_restart_with_full_stage values(9950, 'name9950', 9960.111, 995000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9950]'); insert into test_proxima_be_restart_with_full_stage values(9951, 'name9951', 9961.111, 995100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9951]'); insert into test_proxima_be_restart_with_full_stage values(9952, 'name9952', 9962.111, 995200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9952]'); insert into test_proxima_be_restart_with_full_stage values(9953, 'name9953', 9963.111, 995300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9953]'); insert into test_proxima_be_restart_with_full_stage values(9954, 'name9954', 9964.111, 995400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9954]'); insert into test_proxima_be_restart_with_full_stage values(9955, 'name9955', 9965.111, 995500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9955]'); insert into test_proxima_be_restart_with_full_stage values(9956, 'name9956', 9966.111, 995600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9956]'); insert into test_proxima_be_restart_with_full_stage values(9957, 'name9957', 9967.111, 995700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9957]'); insert into test_proxima_be_restart_with_full_stage values(9958, 'name9958', 9968.111, 995800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9958]'); insert into test_proxima_be_restart_with_full_stage values(9959, 'name9959', 9969.111, 995900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9959]'); insert into test_proxima_be_restart_with_full_stage values(9960, 'name9960', 9970.111, 996000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9960]'); insert into test_proxima_be_restart_with_full_stage values(9961, 'name9961', 9971.111, 996100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9961]'); insert into test_proxima_be_restart_with_full_stage values(9962, 'name9962', 9972.111, 996200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9962]'); insert into test_proxima_be_restart_with_full_stage values(9963, 'name9963', 9973.111, 996300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9963]'); insert into test_proxima_be_restart_with_full_stage values(9964, 'name9964', 9974.111, 996400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9964]'); insert into test_proxima_be_restart_with_full_stage values(9965, 'name9965', 9975.111, 996500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9965]'); insert into test_proxima_be_restart_with_full_stage values(9966, 'name9966', 9976.111, 996600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9966]'); insert into test_proxima_be_restart_with_full_stage values(9967, 'name9967', 9977.111, 996700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9967]'); insert into test_proxima_be_restart_with_full_stage values(9968, 'name9968', 9978.111, 996800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9968]'); insert into test_proxima_be_restart_with_full_stage values(9969, 'name9969', 9979.111, 996900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9969]'); insert into test_proxima_be_restart_with_full_stage values(9970, 'name9970', 9980.111, 997000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9970]'); insert into test_proxima_be_restart_with_full_stage values(9971, 'name9971', 9981.111, 997100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9971]'); insert into test_proxima_be_restart_with_full_stage values(9972, 'name9972', 9982.111, 997200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9972]'); insert into test_proxima_be_restart_with_full_stage values(9973, 'name9973', 9983.111, 997300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9973]'); insert into test_proxima_be_restart_with_full_stage values(9974, 'name9974', 9984.111, 997400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9974]'); insert into test_proxima_be_restart_with_full_stage values(9975, 'name9975', 9985.111, 997500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9975]'); insert into test_proxima_be_restart_with_full_stage values(9976, 'name9976', 9986.111, 997600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9976]'); insert into test_proxima_be_restart_with_full_stage values(9977, 'name9977', 9987.111, 997700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9977]'); insert into test_proxima_be_restart_with_full_stage values(9978, 'name9978', 9988.111, 997800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9978]'); insert into test_proxima_be_restart_with_full_stage values(9979, 'name9979', 9989.111, 997900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9979]'); insert into test_proxima_be_restart_with_full_stage values(9980, 'name9980', 9990.111, 998000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9980]'); insert into test_proxima_be_restart_with_full_stage values(9981, 'name9981', 9991.111, 998100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9981]'); insert into test_proxima_be_restart_with_full_stage values(9982, 'name9982', 9992.111, 998200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9982]'); insert into test_proxima_be_restart_with_full_stage values(9983, 'name9983', 9993.111, 998300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9983]'); insert into test_proxima_be_restart_with_full_stage values(9984, 'name9984', 9994.111, 998400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9984]'); insert into test_proxima_be_restart_with_full_stage values(9985, 'name9985', 9995.111, 998500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9985]'); insert into test_proxima_be_restart_with_full_stage values(9986, 'name9986', 9996.111, 998600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9986]'); insert into test_proxima_be_restart_with_full_stage values(9987, 'name9987', 9997.111, 998700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9987]'); insert into test_proxima_be_restart_with_full_stage values(9988, 'name9988', 9998.111, 998800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9988]'); insert into test_proxima_be_restart_with_full_stage values(9989, 'name9989', 9999.111, 998900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9989]'); insert into test_proxima_be_restart_with_full_stage values(9990, 'name9990', 10000.111, 999000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9990]'); insert into test_proxima_be_restart_with_full_stage values(9991, 'name9991', 10001.111, 999100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9991]'); insert into test_proxima_be_restart_with_full_stage values(9992, 'name9992', 10002.111, 999200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9992]'); insert into test_proxima_be_restart_with_full_stage values(9993, 'name9993', 10003.111, 999300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9993]'); insert into test_proxima_be_restart_with_full_stage values(9994, 'name9994', 10004.111, 999400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9994]'); insert into test_proxima_be_restart_with_full_stage values(9995, 'name9995', 10005.111, 999500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9995]'); insert into test_proxima_be_restart_with_full_stage values(9996, 'name9996', 10006.111, 999600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9996]'); insert into test_proxima_be_restart_with_full_stage values(9997, 'name9997', 10007.111, 999700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9997]'); insert into test_proxima_be_restart_with_full_stage values(9998, 'name9998', 10008.111, 999800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9998]'); insert into test_proxima_be_restart_with_full_stage values(9999, 'name9999', 10009.111, 999900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9999]'); insert into test_proxima_be_restart_with_full_stage values(10000, 'name10000', 10010.111, 1000000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,10000]'); select count(*) from test_proxima_be_restart_with_full_stage; ================================================ FILE: tests/integration/data/test_proxima_be_restart_with_inc_stage_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_proxima_be_restart_with_inc_stage; create table if not exists test_proxima_be_restart_with_inc_stage(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); insert into test_proxima_be_restart_with_inc_stage values(1, 'name1', 11.111, 100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_proxima_be_restart_with_inc_stage values(2, 'name2', 12.111, 200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_proxima_be_restart_with_inc_stage values(3, 'name3', 13.111, 300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_proxima_be_restart_with_inc_stage values(4, 'name4', 14.111, 400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); insert into test_proxima_be_restart_with_inc_stage values(5, 'name5', 15.111, 500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_proxima_be_restart_with_inc_stage values(6, 'name6', 16.111, 600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_proxima_be_restart_with_inc_stage values(7, 'name7', 17.111, 700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); insert into test_proxima_be_restart_with_inc_stage values(8, 'name8', 18.111, 800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8]'); insert into test_proxima_be_restart_with_inc_stage values(9, 'name9', 19.111, 900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9]'); insert into test_proxima_be_restart_with_inc_stage values(10, 'name10', 20.111, 1000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,10]'); insert into test_proxima_be_restart_with_inc_stage values(11, 'name11', 21.111, 1100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,11]'); insert into test_proxima_be_restart_with_inc_stage values(12, 'name12', 22.111, 1200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,12]'); insert into test_proxima_be_restart_with_inc_stage values(13, 'name13', 23.111, 1300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,13]'); insert into test_proxima_be_restart_with_inc_stage values(14, 'name14', 24.111, 1400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,14]'); insert into test_proxima_be_restart_with_inc_stage values(15, 'name15', 25.111, 1500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,15]'); insert into test_proxima_be_restart_with_inc_stage values(16, 'name16', 26.111, 1600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,16]'); insert into test_proxima_be_restart_with_inc_stage values(17, 'name17', 27.111, 1700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,17]'); insert into test_proxima_be_restart_with_inc_stage values(18, 'name18', 28.111, 1800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,18]'); insert into test_proxima_be_restart_with_inc_stage values(19, 'name19', 29.111, 1900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,19]'); insert into test_proxima_be_restart_with_inc_stage values(20, 'name20', 30.111, 2000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,20]'); insert into test_proxima_be_restart_with_inc_stage values(21, 'name21', 31.111, 2100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,21]'); insert into test_proxima_be_restart_with_inc_stage values(22, 'name22', 32.111, 2200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,22]'); insert into test_proxima_be_restart_with_inc_stage values(23, 'name23', 33.111, 2300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,23]'); insert into test_proxima_be_restart_with_inc_stage values(24, 'name24', 34.111, 2400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,24]'); insert into test_proxima_be_restart_with_inc_stage values(25, 'name25', 35.111, 2500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,25]'); insert into test_proxima_be_restart_with_inc_stage values(26, 'name26', 36.111, 2600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,26]'); insert into test_proxima_be_restart_with_inc_stage values(27, 'name27', 37.111, 2700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,27]'); insert into test_proxima_be_restart_with_inc_stage values(28, 'name28', 38.111, 2800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,28]'); insert into test_proxima_be_restart_with_inc_stage values(29, 'name29', 39.111, 2900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,29]'); insert into test_proxima_be_restart_with_inc_stage values(30, 'name30', 40.111, 3000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,30]'); insert into test_proxima_be_restart_with_inc_stage values(31, 'name31', 41.111, 3100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,31]'); insert into test_proxima_be_restart_with_inc_stage values(32, 'name32', 42.111, 3200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,32]'); insert into test_proxima_be_restart_with_inc_stage values(33, 'name33', 43.111, 3300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,33]'); insert into test_proxima_be_restart_with_inc_stage values(34, 'name34', 44.111, 3400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,34]'); insert into test_proxima_be_restart_with_inc_stage values(35, 'name35', 45.111, 3500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,35]'); insert into test_proxima_be_restart_with_inc_stage values(36, 'name36', 46.111, 3600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,36]'); insert into test_proxima_be_restart_with_inc_stage values(37, 'name37', 47.111, 3700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,37]'); insert into test_proxima_be_restart_with_inc_stage values(38, 'name38', 48.111, 3800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,38]'); insert into test_proxima_be_restart_with_inc_stage values(39, 'name39', 49.111, 3900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,39]'); insert into test_proxima_be_restart_with_inc_stage values(40, 'name40', 50.111, 4000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,40]'); insert into test_proxima_be_restart_with_inc_stage values(41, 'name41', 51.111, 4100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,41]'); insert into test_proxima_be_restart_with_inc_stage values(42, 'name42', 52.111, 4200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,42]'); insert into test_proxima_be_restart_with_inc_stage values(43, 'name43', 53.111, 4300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,43]'); insert into test_proxima_be_restart_with_inc_stage values(44, 'name44', 54.111, 4400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,44]'); insert into test_proxima_be_restart_with_inc_stage values(45, 'name45', 55.111, 4500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,45]'); insert into test_proxima_be_restart_with_inc_stage values(46, 'name46', 56.111, 4600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,46]'); insert into test_proxima_be_restart_with_inc_stage values(47, 'name47', 57.111, 4700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,47]'); insert into test_proxima_be_restart_with_inc_stage values(48, 'name48', 58.111, 4800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,48]'); insert into test_proxima_be_restart_with_inc_stage values(49, 'name49', 59.111, 4900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,49]'); insert into test_proxima_be_restart_with_inc_stage values(50, 'name50', 60.111, 5000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,50]'); insert into test_proxima_be_restart_with_inc_stage values(51, 'name51', 61.111, 5100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,51]'); insert into test_proxima_be_restart_with_inc_stage values(52, 'name52', 62.111, 5200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,52]'); insert into test_proxima_be_restart_with_inc_stage values(53, 'name53', 63.111, 5300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,53]'); insert into test_proxima_be_restart_with_inc_stage values(54, 'name54', 64.111, 5400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,54]'); insert into test_proxima_be_restart_with_inc_stage values(55, 'name55', 65.111, 5500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,55]'); insert into test_proxima_be_restart_with_inc_stage values(56, 'name56', 66.111, 5600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,56]'); insert into test_proxima_be_restart_with_inc_stage values(57, 'name57', 67.111, 5700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,57]'); insert into test_proxima_be_restart_with_inc_stage values(58, 'name58', 68.111, 5800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,58]'); insert into test_proxima_be_restart_with_inc_stage values(59, 'name59', 69.111, 5900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,59]'); insert into test_proxima_be_restart_with_inc_stage values(60, 'name60', 70.111, 6000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,60]'); insert into test_proxima_be_restart_with_inc_stage values(61, 'name61', 71.111, 6100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,61]'); insert into test_proxima_be_restart_with_inc_stage values(62, 'name62', 72.111, 6200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,62]'); insert into test_proxima_be_restart_with_inc_stage values(63, 'name63', 73.111, 6300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,63]'); insert into test_proxima_be_restart_with_inc_stage values(64, 'name64', 74.111, 6400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,64]'); insert into test_proxima_be_restart_with_inc_stage values(65, 'name65', 75.111, 6500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,65]'); insert into test_proxima_be_restart_with_inc_stage values(66, 'name66', 76.111, 6600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,66]'); insert into test_proxima_be_restart_with_inc_stage values(67, 'name67', 77.111, 6700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,67]'); insert into test_proxima_be_restart_with_inc_stage values(68, 'name68', 78.111, 6800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,68]'); insert into test_proxima_be_restart_with_inc_stage values(69, 'name69', 79.111, 6900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,69]'); insert into test_proxima_be_restart_with_inc_stage values(70, 'name70', 80.111, 7000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,70]'); insert into test_proxima_be_restart_with_inc_stage values(71, 'name71', 81.111, 7100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,71]'); insert into test_proxima_be_restart_with_inc_stage values(72, 'name72', 82.111, 7200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,72]'); insert into test_proxima_be_restart_with_inc_stage values(73, 'name73', 83.111, 7300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,73]'); insert into test_proxima_be_restart_with_inc_stage values(74, 'name74', 84.111, 7400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,74]'); insert into test_proxima_be_restart_with_inc_stage values(75, 'name75', 85.111, 7500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,75]'); insert into test_proxima_be_restart_with_inc_stage values(76, 'name76', 86.111, 7600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,76]'); insert into test_proxima_be_restart_with_inc_stage values(77, 'name77', 87.111, 7700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,77]'); insert into test_proxima_be_restart_with_inc_stage values(78, 'name78', 88.111, 7800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,78]'); insert into test_proxima_be_restart_with_inc_stage values(79, 'name79', 89.111, 7900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,79]'); insert into test_proxima_be_restart_with_inc_stage values(80, 'name80', 90.111, 8000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,80]'); insert into test_proxima_be_restart_with_inc_stage values(81, 'name81', 91.111, 8100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,81]'); insert into test_proxima_be_restart_with_inc_stage values(82, 'name82', 92.111, 8200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,82]'); insert into test_proxima_be_restart_with_inc_stage values(83, 'name83', 93.111, 8300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,83]'); insert into test_proxima_be_restart_with_inc_stage values(84, 'name84', 94.111, 8400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,84]'); insert into test_proxima_be_restart_with_inc_stage values(85, 'name85', 95.111, 8500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,85]'); insert into test_proxima_be_restart_with_inc_stage values(86, 'name86', 96.111, 8600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,86]'); insert into test_proxima_be_restart_with_inc_stage values(87, 'name87', 97.111, 8700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,87]'); insert into test_proxima_be_restart_with_inc_stage values(88, 'name88', 98.111, 8800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,88]'); insert into test_proxima_be_restart_with_inc_stage values(89, 'name89', 99.111, 8900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,89]'); insert into test_proxima_be_restart_with_inc_stage values(90, 'name90', 100.111, 9000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,90]'); insert into test_proxima_be_restart_with_inc_stage values(91, 'name91', 101.111, 9100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,91]'); insert into test_proxima_be_restart_with_inc_stage values(92, 'name92', 102.111, 9200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,92]'); insert into test_proxima_be_restart_with_inc_stage values(93, 'name93', 103.111, 9300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,93]'); insert into test_proxima_be_restart_with_inc_stage values(94, 'name94', 104.111, 9400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,94]'); insert into test_proxima_be_restart_with_inc_stage values(95, 'name95', 105.111, 9500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,95]'); insert into test_proxima_be_restart_with_inc_stage values(96, 'name96', 106.111, 9600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,96]'); insert into test_proxima_be_restart_with_inc_stage values(97, 'name97', 107.111, 9700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,97]'); insert into test_proxima_be_restart_with_inc_stage values(98, 'name98', 108.111, 9800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,98]'); insert into test_proxima_be_restart_with_inc_stage values(99, 'name99', 109.111, 9900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,99]'); insert into test_proxima_be_restart_with_inc_stage values(100, 'name100', 110.111, 10000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,100]'); insert into test_proxima_be_restart_with_inc_stage values(101, 'name101', 111.111, 10100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,101]'); insert into test_proxima_be_restart_with_inc_stage values(102, 'name102', 112.111, 10200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,102]'); insert into test_proxima_be_restart_with_inc_stage values(103, 'name103', 113.111, 10300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,103]'); insert into test_proxima_be_restart_with_inc_stage values(104, 'name104', 114.111, 10400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,104]'); insert into test_proxima_be_restart_with_inc_stage values(105, 'name105', 115.111, 10500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,105]'); insert into test_proxima_be_restart_with_inc_stage values(106, 'name106', 116.111, 10600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,106]'); insert into test_proxima_be_restart_with_inc_stage values(107, 'name107', 117.111, 10700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,107]'); insert into test_proxima_be_restart_with_inc_stage values(108, 'name108', 118.111, 10800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,108]'); insert into test_proxima_be_restart_with_inc_stage values(109, 'name109', 119.111, 10900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,109]'); insert into test_proxima_be_restart_with_inc_stage values(110, 'name110', 120.111, 11000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,110]'); insert into test_proxima_be_restart_with_inc_stage values(111, 'name111', 121.111, 11100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,111]'); insert into test_proxima_be_restart_with_inc_stage values(112, 'name112', 122.111, 11200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,112]'); insert into test_proxima_be_restart_with_inc_stage values(113, 'name113', 123.111, 11300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,113]'); insert into test_proxima_be_restart_with_inc_stage values(114, 'name114', 124.111, 11400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,114]'); insert into test_proxima_be_restart_with_inc_stage values(115, 'name115', 125.111, 11500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,115]'); insert into test_proxima_be_restart_with_inc_stage values(116, 'name116', 126.111, 11600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,116]'); insert into test_proxima_be_restart_with_inc_stage values(117, 'name117', 127.111, 11700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,117]'); insert into test_proxima_be_restart_with_inc_stage values(118, 'name118', 128.111, 11800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,118]'); insert into test_proxima_be_restart_with_inc_stage values(119, 'name119', 129.111, 11900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,119]'); insert into test_proxima_be_restart_with_inc_stage values(120, 'name120', 130.111, 12000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,120]'); insert into test_proxima_be_restart_with_inc_stage values(121, 'name121', 131.111, 12100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,121]'); insert into test_proxima_be_restart_with_inc_stage values(122, 'name122', 132.111, 12200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,122]'); insert into test_proxima_be_restart_with_inc_stage values(123, 'name123', 133.111, 12300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,123]'); insert into test_proxima_be_restart_with_inc_stage values(124, 'name124', 134.111, 12400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,124]'); insert into test_proxima_be_restart_with_inc_stage values(125, 'name125', 135.111, 12500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,125]'); insert into test_proxima_be_restart_with_inc_stage values(126, 'name126', 136.111, 12600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,126]'); insert into test_proxima_be_restart_with_inc_stage values(127, 'name127', 137.111, 12700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,127]'); insert into test_proxima_be_restart_with_inc_stage values(128, 'name128', 138.111, 12800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,128]'); insert into test_proxima_be_restart_with_inc_stage values(129, 'name129', 139.111, 12900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,129]'); insert into test_proxima_be_restart_with_inc_stage values(130, 'name130', 140.111, 13000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,130]'); insert into test_proxima_be_restart_with_inc_stage values(131, 'name131', 141.111, 13100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,131]'); insert into test_proxima_be_restart_with_inc_stage values(132, 'name132', 142.111, 13200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,132]'); insert into test_proxima_be_restart_with_inc_stage values(133, 'name133', 143.111, 13300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,133]'); insert into test_proxima_be_restart_with_inc_stage values(134, 'name134', 144.111, 13400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,134]'); insert into test_proxima_be_restart_with_inc_stage values(135, 'name135', 145.111, 13500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,135]'); insert into test_proxima_be_restart_with_inc_stage values(136, 'name136', 146.111, 13600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,136]'); insert into test_proxima_be_restart_with_inc_stage values(137, 'name137', 147.111, 13700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,137]'); insert into test_proxima_be_restart_with_inc_stage values(138, 'name138', 148.111, 13800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,138]'); insert into test_proxima_be_restart_with_inc_stage values(139, 'name139', 149.111, 13900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,139]'); insert into test_proxima_be_restart_with_inc_stage values(140, 'name140', 150.111, 14000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,140]'); insert into test_proxima_be_restart_with_inc_stage values(141, 'name141', 151.111, 14100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,141]'); insert into test_proxima_be_restart_with_inc_stage values(142, 'name142', 152.111, 14200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,142]'); insert into test_proxima_be_restart_with_inc_stage values(143, 'name143', 153.111, 14300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,143]'); insert into test_proxima_be_restart_with_inc_stage values(144, 'name144', 154.111, 14400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,144]'); insert into test_proxima_be_restart_with_inc_stage values(145, 'name145', 155.111, 14500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,145]'); insert into test_proxima_be_restart_with_inc_stage values(146, 'name146', 156.111, 14600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,146]'); insert into test_proxima_be_restart_with_inc_stage values(147, 'name147', 157.111, 14700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,147]'); insert into test_proxima_be_restart_with_inc_stage values(148, 'name148', 158.111, 14800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,148]'); insert into test_proxima_be_restart_with_inc_stage values(149, 'name149', 159.111, 14900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,149]'); insert into test_proxima_be_restart_with_inc_stage values(150, 'name150', 160.111, 15000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,150]'); insert into test_proxima_be_restart_with_inc_stage values(151, 'name151', 161.111, 15100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,151]'); insert into test_proxima_be_restart_with_inc_stage values(152, 'name152', 162.111, 15200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,152]'); insert into test_proxima_be_restart_with_inc_stage values(153, 'name153', 163.111, 15300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,153]'); insert into test_proxima_be_restart_with_inc_stage values(154, 'name154', 164.111, 15400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,154]'); insert into test_proxima_be_restart_with_inc_stage values(155, 'name155', 165.111, 15500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,155]'); insert into test_proxima_be_restart_with_inc_stage values(156, 'name156', 166.111, 15600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,156]'); insert into test_proxima_be_restart_with_inc_stage values(157, 'name157', 167.111, 15700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,157]'); insert into test_proxima_be_restart_with_inc_stage values(158, 'name158', 168.111, 15800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,158]'); insert into test_proxima_be_restart_with_inc_stage values(159, 'name159', 169.111, 15900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,159]'); insert into test_proxima_be_restart_with_inc_stage values(160, 'name160', 170.111, 16000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,160]'); insert into test_proxima_be_restart_with_inc_stage values(161, 'name161', 171.111, 16100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,161]'); insert into test_proxima_be_restart_with_inc_stage values(162, 'name162', 172.111, 16200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,162]'); insert into test_proxima_be_restart_with_inc_stage values(163, 'name163', 173.111, 16300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,163]'); insert into test_proxima_be_restart_with_inc_stage values(164, 'name164', 174.111, 16400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,164]'); insert into test_proxima_be_restart_with_inc_stage values(165, 'name165', 175.111, 16500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,165]'); insert into test_proxima_be_restart_with_inc_stage values(166, 'name166', 176.111, 16600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,166]'); insert into test_proxima_be_restart_with_inc_stage values(167, 'name167', 177.111, 16700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,167]'); insert into test_proxima_be_restart_with_inc_stage values(168, 'name168', 178.111, 16800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,168]'); insert into test_proxima_be_restart_with_inc_stage values(169, 'name169', 179.111, 16900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,169]'); insert into test_proxima_be_restart_with_inc_stage values(170, 'name170', 180.111, 17000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,170]'); insert into test_proxima_be_restart_with_inc_stage values(171, 'name171', 181.111, 17100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,171]'); insert into test_proxima_be_restart_with_inc_stage values(172, 'name172', 182.111, 17200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,172]'); insert into test_proxima_be_restart_with_inc_stage values(173, 'name173', 183.111, 17300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,173]'); insert into test_proxima_be_restart_with_inc_stage values(174, 'name174', 184.111, 17400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,174]'); insert into test_proxima_be_restart_with_inc_stage values(175, 'name175', 185.111, 17500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,175]'); insert into test_proxima_be_restart_with_inc_stage values(176, 'name176', 186.111, 17600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,176]'); insert into test_proxima_be_restart_with_inc_stage values(177, 'name177', 187.111, 17700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,177]'); insert into test_proxima_be_restart_with_inc_stage values(178, 'name178', 188.111, 17800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,178]'); insert into test_proxima_be_restart_with_inc_stage values(179, 'name179', 189.111, 17900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,179]'); insert into test_proxima_be_restart_with_inc_stage values(180, 'name180', 190.111, 18000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,180]'); insert into test_proxima_be_restart_with_inc_stage values(181, 'name181', 191.111, 18100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,181]'); insert into test_proxima_be_restart_with_inc_stage values(182, 'name182', 192.111, 18200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,182]'); insert into test_proxima_be_restart_with_inc_stage values(183, 'name183', 193.111, 18300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,183]'); insert into test_proxima_be_restart_with_inc_stage values(184, 'name184', 194.111, 18400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,184]'); insert into test_proxima_be_restart_with_inc_stage values(185, 'name185', 195.111, 18500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,185]'); insert into test_proxima_be_restart_with_inc_stage values(186, 'name186', 196.111, 18600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,186]'); insert into test_proxima_be_restart_with_inc_stage values(187, 'name187', 197.111, 18700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,187]'); insert into test_proxima_be_restart_with_inc_stage values(188, 'name188', 198.111, 18800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,188]'); insert into test_proxima_be_restart_with_inc_stage values(189, 'name189', 199.111, 18900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,189]'); insert into test_proxima_be_restart_with_inc_stage values(190, 'name190', 200.111, 19000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,190]'); insert into test_proxima_be_restart_with_inc_stage values(191, 'name191', 201.111, 19100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,191]'); insert into test_proxima_be_restart_with_inc_stage values(192, 'name192', 202.111, 19200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,192]'); insert into test_proxima_be_restart_with_inc_stage values(193, 'name193', 203.111, 19300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,193]'); insert into test_proxima_be_restart_with_inc_stage values(194, 'name194', 204.111, 19400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,194]'); insert into test_proxima_be_restart_with_inc_stage values(195, 'name195', 205.111, 19500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,195]'); insert into test_proxima_be_restart_with_inc_stage values(196, 'name196', 206.111, 19600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,196]'); insert into test_proxima_be_restart_with_inc_stage values(197, 'name197', 207.111, 19700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,197]'); insert into test_proxima_be_restart_with_inc_stage values(198, 'name198', 208.111, 19800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,198]'); insert into test_proxima_be_restart_with_inc_stage values(199, 'name199', 209.111, 19900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,199]'); insert into test_proxima_be_restart_with_inc_stage values(200, 'name200', 210.111, 20000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,200]'); insert into test_proxima_be_restart_with_inc_stage values(201, 'name201', 211.111, 20100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,201]'); insert into test_proxima_be_restart_with_inc_stage values(202, 'name202', 212.111, 20200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,202]'); insert into test_proxima_be_restart_with_inc_stage values(203, 'name203', 213.111, 20300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,203]'); insert into test_proxima_be_restart_with_inc_stage values(204, 'name204', 214.111, 20400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,204]'); insert into test_proxima_be_restart_with_inc_stage values(205, 'name205', 215.111, 20500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,205]'); insert into test_proxima_be_restart_with_inc_stage values(206, 'name206', 216.111, 20600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,206]'); insert into test_proxima_be_restart_with_inc_stage values(207, 'name207', 217.111, 20700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,207]'); insert into test_proxima_be_restart_with_inc_stage values(208, 'name208', 218.111, 20800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,208]'); insert into test_proxima_be_restart_with_inc_stage values(209, 'name209', 219.111, 20900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,209]'); insert into test_proxima_be_restart_with_inc_stage values(210, 'name210', 220.111, 21000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,210]'); insert into test_proxima_be_restart_with_inc_stage values(211, 'name211', 221.111, 21100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,211]'); insert into test_proxima_be_restart_with_inc_stage values(212, 'name212', 222.111, 21200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,212]'); insert into test_proxima_be_restart_with_inc_stage values(213, 'name213', 223.111, 21300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,213]'); insert into test_proxima_be_restart_with_inc_stage values(214, 'name214', 224.111, 21400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,214]'); insert into test_proxima_be_restart_with_inc_stage values(215, 'name215', 225.111, 21500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,215]'); insert into test_proxima_be_restart_with_inc_stage values(216, 'name216', 226.111, 21600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,216]'); insert into test_proxima_be_restart_with_inc_stage values(217, 'name217', 227.111, 21700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,217]'); insert into test_proxima_be_restart_with_inc_stage values(218, 'name218', 228.111, 21800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,218]'); insert into test_proxima_be_restart_with_inc_stage values(219, 'name219', 229.111, 21900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,219]'); insert into test_proxima_be_restart_with_inc_stage values(220, 'name220', 230.111, 22000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,220]'); insert into test_proxima_be_restart_with_inc_stage values(221, 'name221', 231.111, 22100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,221]'); insert into test_proxima_be_restart_with_inc_stage values(222, 'name222', 232.111, 22200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,222]'); insert into test_proxima_be_restart_with_inc_stage values(223, 'name223', 233.111, 22300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,223]'); insert into test_proxima_be_restart_with_inc_stage values(224, 'name224', 234.111, 22400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,224]'); insert into test_proxima_be_restart_with_inc_stage values(225, 'name225', 235.111, 22500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,225]'); insert into test_proxima_be_restart_with_inc_stage values(226, 'name226', 236.111, 22600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,226]'); insert into test_proxima_be_restart_with_inc_stage values(227, 'name227', 237.111, 22700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,227]'); insert into test_proxima_be_restart_with_inc_stage values(228, 'name228', 238.111, 22800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,228]'); insert into test_proxima_be_restart_with_inc_stage values(229, 'name229', 239.111, 22900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,229]'); insert into test_proxima_be_restart_with_inc_stage values(230, 'name230', 240.111, 23000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,230]'); insert into test_proxima_be_restart_with_inc_stage values(231, 'name231', 241.111, 23100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,231]'); insert into test_proxima_be_restart_with_inc_stage values(232, 'name232', 242.111, 23200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,232]'); insert into test_proxima_be_restart_with_inc_stage values(233, 'name233', 243.111, 23300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,233]'); insert into test_proxima_be_restart_with_inc_stage values(234, 'name234', 244.111, 23400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,234]'); insert into test_proxima_be_restart_with_inc_stage values(235, 'name235', 245.111, 23500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,235]'); insert into test_proxima_be_restart_with_inc_stage values(236, 'name236', 246.111, 23600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,236]'); insert into test_proxima_be_restart_with_inc_stage values(237, 'name237', 247.111, 23700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,237]'); insert into test_proxima_be_restart_with_inc_stage values(238, 'name238', 248.111, 23800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,238]'); insert into test_proxima_be_restart_with_inc_stage values(239, 'name239', 249.111, 23900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,239]'); insert into test_proxima_be_restart_with_inc_stage values(240, 'name240', 250.111, 24000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,240]'); insert into test_proxima_be_restart_with_inc_stage values(241, 'name241', 251.111, 24100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,241]'); insert into test_proxima_be_restart_with_inc_stage values(242, 'name242', 252.111, 24200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,242]'); insert into test_proxima_be_restart_with_inc_stage values(243, 'name243', 253.111, 24300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,243]'); insert into test_proxima_be_restart_with_inc_stage values(244, 'name244', 254.111, 24400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,244]'); insert into test_proxima_be_restart_with_inc_stage values(245, 'name245', 255.111, 24500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,245]'); insert into test_proxima_be_restart_with_inc_stage values(246, 'name246', 256.111, 24600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,246]'); insert into test_proxima_be_restart_with_inc_stage values(247, 'name247', 257.111, 24700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,247]'); insert into test_proxima_be_restart_with_inc_stage values(248, 'name248', 258.111, 24800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,248]'); insert into test_proxima_be_restart_with_inc_stage values(249, 'name249', 259.111, 24900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,249]'); insert into test_proxima_be_restart_with_inc_stage values(250, 'name250', 260.111, 25000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,250]'); insert into test_proxima_be_restart_with_inc_stage values(251, 'name251', 261.111, 25100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,251]'); insert into test_proxima_be_restart_with_inc_stage values(252, 'name252', 262.111, 25200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,252]'); insert into test_proxima_be_restart_with_inc_stage values(253, 'name253', 263.111, 25300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,253]'); insert into test_proxima_be_restart_with_inc_stage values(254, 'name254', 264.111, 25400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,254]'); insert into test_proxima_be_restart_with_inc_stage values(255, 'name255', 265.111, 25500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,255]'); insert into test_proxima_be_restart_with_inc_stage values(256, 'name256', 266.111, 25600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,256]'); insert into test_proxima_be_restart_with_inc_stage values(257, 'name257', 267.111, 25700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,257]'); insert into test_proxima_be_restart_with_inc_stage values(258, 'name258', 268.111, 25800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,258]'); insert into test_proxima_be_restart_with_inc_stage values(259, 'name259', 269.111, 25900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,259]'); insert into test_proxima_be_restart_with_inc_stage values(260, 'name260', 270.111, 26000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,260]'); insert into test_proxima_be_restart_with_inc_stage values(261, 'name261', 271.111, 26100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,261]'); insert into test_proxima_be_restart_with_inc_stage values(262, 'name262', 272.111, 26200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,262]'); insert into test_proxima_be_restart_with_inc_stage values(263, 'name263', 273.111, 26300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,263]'); insert into test_proxima_be_restart_with_inc_stage values(264, 'name264', 274.111, 26400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,264]'); insert into test_proxima_be_restart_with_inc_stage values(265, 'name265', 275.111, 26500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,265]'); insert into test_proxima_be_restart_with_inc_stage values(266, 'name266', 276.111, 26600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,266]'); insert into test_proxima_be_restart_with_inc_stage values(267, 'name267', 277.111, 26700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,267]'); insert into test_proxima_be_restart_with_inc_stage values(268, 'name268', 278.111, 26800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,268]'); insert into test_proxima_be_restart_with_inc_stage values(269, 'name269', 279.111, 26900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,269]'); insert into test_proxima_be_restart_with_inc_stage values(270, 'name270', 280.111, 27000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,270]'); insert into test_proxima_be_restart_with_inc_stage values(271, 'name271', 281.111, 27100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,271]'); insert into test_proxima_be_restart_with_inc_stage values(272, 'name272', 282.111, 27200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,272]'); insert into test_proxima_be_restart_with_inc_stage values(273, 'name273', 283.111, 27300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,273]'); insert into test_proxima_be_restart_with_inc_stage values(274, 'name274', 284.111, 27400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,274]'); insert into test_proxima_be_restart_with_inc_stage values(275, 'name275', 285.111, 27500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,275]'); insert into test_proxima_be_restart_with_inc_stage values(276, 'name276', 286.111, 27600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,276]'); insert into test_proxima_be_restart_with_inc_stage values(277, 'name277', 287.111, 27700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,277]'); insert into test_proxima_be_restart_with_inc_stage values(278, 'name278', 288.111, 27800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,278]'); insert into test_proxima_be_restart_with_inc_stage values(279, 'name279', 289.111, 27900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,279]'); insert into test_proxima_be_restart_with_inc_stage values(280, 'name280', 290.111, 28000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,280]'); insert into test_proxima_be_restart_with_inc_stage values(281, 'name281', 291.111, 28100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,281]'); insert into test_proxima_be_restart_with_inc_stage values(282, 'name282', 292.111, 28200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,282]'); insert into test_proxima_be_restart_with_inc_stage values(283, 'name283', 293.111, 28300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,283]'); insert into test_proxima_be_restart_with_inc_stage values(284, 'name284', 294.111, 28400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,284]'); insert into test_proxima_be_restart_with_inc_stage values(285, 'name285', 295.111, 28500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,285]'); insert into test_proxima_be_restart_with_inc_stage values(286, 'name286', 296.111, 28600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,286]'); insert into test_proxima_be_restart_with_inc_stage values(287, 'name287', 297.111, 28700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,287]'); insert into test_proxima_be_restart_with_inc_stage values(288, 'name288', 298.111, 28800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,288]'); insert into test_proxima_be_restart_with_inc_stage values(289, 'name289', 299.111, 28900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,289]'); insert into test_proxima_be_restart_with_inc_stage values(290, 'name290', 300.111, 29000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,290]'); insert into test_proxima_be_restart_with_inc_stage values(291, 'name291', 301.111, 29100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,291]'); insert into test_proxima_be_restart_with_inc_stage values(292, 'name292', 302.111, 29200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,292]'); insert into test_proxima_be_restart_with_inc_stage values(293, 'name293', 303.111, 29300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,293]'); insert into test_proxima_be_restart_with_inc_stage values(294, 'name294', 304.111, 29400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,294]'); insert into test_proxima_be_restart_with_inc_stage values(295, 'name295', 305.111, 29500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,295]'); insert into test_proxima_be_restart_with_inc_stage values(296, 'name296', 306.111, 29600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,296]'); insert into test_proxima_be_restart_with_inc_stage values(297, 'name297', 307.111, 29700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,297]'); insert into test_proxima_be_restart_with_inc_stage values(298, 'name298', 308.111, 29800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,298]'); insert into test_proxima_be_restart_with_inc_stage values(299, 'name299', 309.111, 29900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,299]'); insert into test_proxima_be_restart_with_inc_stage values(300, 'name300', 310.111, 30000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,300]'); select count(*) from test_proxima_be_restart_with_inc_stage; ================================================ FILE: tests/integration/data/test_proxima_be_restart_with_inc_stage_inc_1.sql ================================================ use test_db; insert into test_proxima_be_restart_with_inc_stage values(301, 'name301', 311.111, 30100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,301]'); insert into test_proxima_be_restart_with_inc_stage values(302, 'name302', 312.111, 30200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,302]'); insert into test_proxima_be_restart_with_inc_stage values(303, 'name303', 313.111, 30300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,303]'); insert into test_proxima_be_restart_with_inc_stage values(304, 'name304', 314.111, 30400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,304]'); insert into test_proxima_be_restart_with_inc_stage values(305, 'name305', 315.111, 30500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,305]'); insert into test_proxima_be_restart_with_inc_stage values(306, 'name306', 316.111, 30600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,306]'); insert into test_proxima_be_restart_with_inc_stage values(307, 'name307', 317.111, 30700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,307]'); insert into test_proxima_be_restart_with_inc_stage values(308, 'name308', 318.111, 30800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,308]'); insert into test_proxima_be_restart_with_inc_stage values(309, 'name309', 319.111, 30900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,309]'); insert into test_proxima_be_restart_with_inc_stage values(310, 'name310', 320.111, 31000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,310]'); insert into test_proxima_be_restart_with_inc_stage values(311, 'name311', 321.111, 31100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,311]'); insert into test_proxima_be_restart_with_inc_stage values(312, 'name312', 322.111, 31200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,312]'); insert into test_proxima_be_restart_with_inc_stage values(313, 'name313', 323.111, 31300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,313]'); insert into test_proxima_be_restart_with_inc_stage values(314, 'name314', 324.111, 31400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,314]'); insert into test_proxima_be_restart_with_inc_stage values(315, 'name315', 325.111, 31500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,315]'); insert into test_proxima_be_restart_with_inc_stage values(316, 'name316', 326.111, 31600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,316]'); insert into test_proxima_be_restart_with_inc_stage values(317, 'name317', 327.111, 31700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,317]'); insert into test_proxima_be_restart_with_inc_stage values(318, 'name318', 328.111, 31800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,318]'); insert into test_proxima_be_restart_with_inc_stage values(319, 'name319', 329.111, 31900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,319]'); insert into test_proxima_be_restart_with_inc_stage values(320, 'name320', 330.111, 32000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,320]'); insert into test_proxima_be_restart_with_inc_stage values(321, 'name321', 331.111, 32100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,321]'); insert into test_proxima_be_restart_with_inc_stage values(322, 'name322', 332.111, 32200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,322]'); insert into test_proxima_be_restart_with_inc_stage values(323, 'name323', 333.111, 32300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,323]'); insert into test_proxima_be_restart_with_inc_stage values(324, 'name324', 334.111, 32400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,324]'); insert into test_proxima_be_restart_with_inc_stage values(325, 'name325', 335.111, 32500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,325]'); insert into test_proxima_be_restart_with_inc_stage values(326, 'name326', 336.111, 32600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,326]'); insert into test_proxima_be_restart_with_inc_stage values(327, 'name327', 337.111, 32700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,327]'); insert into test_proxima_be_restart_with_inc_stage values(328, 'name328', 338.111, 32800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,328]'); insert into test_proxima_be_restart_with_inc_stage values(329, 'name329', 339.111, 32900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,329]'); insert into test_proxima_be_restart_with_inc_stage values(330, 'name330', 340.111, 33000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,330]'); insert into test_proxima_be_restart_with_inc_stage values(331, 'name331', 341.111, 33100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,331]'); insert into test_proxima_be_restart_with_inc_stage values(332, 'name332', 342.111, 33200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,332]'); insert into test_proxima_be_restart_with_inc_stage values(333, 'name333', 343.111, 33300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,333]'); insert into test_proxima_be_restart_with_inc_stage values(334, 'name334', 344.111, 33400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,334]'); insert into test_proxima_be_restart_with_inc_stage values(335, 'name335', 345.111, 33500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,335]'); insert into test_proxima_be_restart_with_inc_stage values(336, 'name336', 346.111, 33600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,336]'); insert into test_proxima_be_restart_with_inc_stage values(337, 'name337', 347.111, 33700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,337]'); insert into test_proxima_be_restart_with_inc_stage values(338, 'name338', 348.111, 33800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,338]'); insert into test_proxima_be_restart_with_inc_stage values(339, 'name339', 349.111, 33900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,339]'); insert into test_proxima_be_restart_with_inc_stage values(340, 'name340', 350.111, 34000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,340]'); insert into test_proxima_be_restart_with_inc_stage values(341, 'name341', 351.111, 34100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,341]'); insert into test_proxima_be_restart_with_inc_stage values(342, 'name342', 352.111, 34200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,342]'); insert into test_proxima_be_restart_with_inc_stage values(343, 'name343', 353.111, 34300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,343]'); insert into test_proxima_be_restart_with_inc_stage values(344, 'name344', 354.111, 34400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,344]'); insert into test_proxima_be_restart_with_inc_stage values(345, 'name345', 355.111, 34500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,345]'); insert into test_proxima_be_restart_with_inc_stage values(346, 'name346', 356.111, 34600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,346]'); insert into test_proxima_be_restart_with_inc_stage values(347, 'name347', 357.111, 34700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,347]'); insert into test_proxima_be_restart_with_inc_stage values(348, 'name348', 358.111, 34800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,348]'); insert into test_proxima_be_restart_with_inc_stage values(349, 'name349', 359.111, 34900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,349]'); insert into test_proxima_be_restart_with_inc_stage values(350, 'name350', 360.111, 35000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,350]'); insert into test_proxima_be_restart_with_inc_stage values(351, 'name351', 361.111, 35100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,351]'); insert into test_proxima_be_restart_with_inc_stage values(352, 'name352', 362.111, 35200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,352]'); insert into test_proxima_be_restart_with_inc_stage values(353, 'name353', 363.111, 35300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,353]'); insert into test_proxima_be_restart_with_inc_stage values(354, 'name354', 364.111, 35400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,354]'); insert into test_proxima_be_restart_with_inc_stage values(355, 'name355', 365.111, 35500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,355]'); insert into test_proxima_be_restart_with_inc_stage values(356, 'name356', 366.111, 35600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,356]'); insert into test_proxima_be_restart_with_inc_stage values(357, 'name357', 367.111, 35700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,357]'); insert into test_proxima_be_restart_with_inc_stage values(358, 'name358', 368.111, 35800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,358]'); insert into test_proxima_be_restart_with_inc_stage values(359, 'name359', 369.111, 35900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,359]'); insert into test_proxima_be_restart_with_inc_stage values(360, 'name360', 370.111, 36000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,360]'); insert into test_proxima_be_restart_with_inc_stage values(361, 'name361', 371.111, 36100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,361]'); insert into test_proxima_be_restart_with_inc_stage values(362, 'name362', 372.111, 36200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,362]'); insert into test_proxima_be_restart_with_inc_stage values(363, 'name363', 373.111, 36300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,363]'); insert into test_proxima_be_restart_with_inc_stage values(364, 'name364', 374.111, 36400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,364]'); insert into test_proxima_be_restart_with_inc_stage values(365, 'name365', 375.111, 36500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,365]'); insert into test_proxima_be_restart_with_inc_stage values(366, 'name366', 376.111, 36600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,366]'); insert into test_proxima_be_restart_with_inc_stage values(367, 'name367', 377.111, 36700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,367]'); insert into test_proxima_be_restart_with_inc_stage values(368, 'name368', 378.111, 36800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,368]'); insert into test_proxima_be_restart_with_inc_stage values(369, 'name369', 379.111, 36900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,369]'); insert into test_proxima_be_restart_with_inc_stage values(370, 'name370', 380.111, 37000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,370]'); insert into test_proxima_be_restart_with_inc_stage values(371, 'name371', 381.111, 37100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,371]'); insert into test_proxima_be_restart_with_inc_stage values(372, 'name372', 382.111, 37200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,372]'); insert into test_proxima_be_restart_with_inc_stage values(373, 'name373', 383.111, 37300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,373]'); insert into test_proxima_be_restart_with_inc_stage values(374, 'name374', 384.111, 37400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,374]'); insert into test_proxima_be_restart_with_inc_stage values(375, 'name375', 385.111, 37500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,375]'); insert into test_proxima_be_restart_with_inc_stage values(376, 'name376', 386.111, 37600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,376]'); insert into test_proxima_be_restart_with_inc_stage values(377, 'name377', 387.111, 37700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,377]'); insert into test_proxima_be_restart_with_inc_stage values(378, 'name378', 388.111, 37800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,378]'); insert into test_proxima_be_restart_with_inc_stage values(379, 'name379', 389.111, 37900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,379]'); insert into test_proxima_be_restart_with_inc_stage values(380, 'name380', 390.111, 38000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,380]'); insert into test_proxima_be_restart_with_inc_stage values(381, 'name381', 391.111, 38100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,381]'); insert into test_proxima_be_restart_with_inc_stage values(382, 'name382', 392.111, 38200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,382]'); insert into test_proxima_be_restart_with_inc_stage values(383, 'name383', 393.111, 38300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,383]'); insert into test_proxima_be_restart_with_inc_stage values(384, 'name384', 394.111, 38400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,384]'); insert into test_proxima_be_restart_with_inc_stage values(385, 'name385', 395.111, 38500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,385]'); insert into test_proxima_be_restart_with_inc_stage values(386, 'name386', 396.111, 38600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,386]'); insert into test_proxima_be_restart_with_inc_stage values(387, 'name387', 397.111, 38700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,387]'); insert into test_proxima_be_restart_with_inc_stage values(388, 'name388', 398.111, 38800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,388]'); insert into test_proxima_be_restart_with_inc_stage values(389, 'name389', 399.111, 38900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,389]'); insert into test_proxima_be_restart_with_inc_stage values(390, 'name390', 400.111, 39000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,390]'); insert into test_proxima_be_restart_with_inc_stage values(391, 'name391', 401.111, 39100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,391]'); insert into test_proxima_be_restart_with_inc_stage values(392, 'name392', 402.111, 39200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,392]'); insert into test_proxima_be_restart_with_inc_stage values(393, 'name393', 403.111, 39300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,393]'); insert into test_proxima_be_restart_with_inc_stage values(394, 'name394', 404.111, 39400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,394]'); insert into test_proxima_be_restart_with_inc_stage values(395, 'name395', 405.111, 39500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,395]'); insert into test_proxima_be_restart_with_inc_stage values(396, 'name396', 406.111, 39600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,396]'); insert into test_proxima_be_restart_with_inc_stage values(397, 'name397', 407.111, 39700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,397]'); insert into test_proxima_be_restart_with_inc_stage values(398, 'name398', 408.111, 39800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,398]'); insert into test_proxima_be_restart_with_inc_stage values(399, 'name399', 409.111, 39900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,399]'); insert into test_proxima_be_restart_with_inc_stage values(400, 'name400', 410.111, 40000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,400]'); select count(*) from test_proxima_be_restart_with_inc_stage; ================================================ FILE: tests/integration/data/test_proxima_be_restart_with_inc_stage_inc_2.sql ================================================ use test_db; insert into test_proxima_be_restart_with_inc_stage values(401, 'name401', 411.111, 40100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,401]'); insert into test_proxima_be_restart_with_inc_stage values(402, 'name402', 412.111, 40200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,402]'); insert into test_proxima_be_restart_with_inc_stage values(403, 'name403', 413.111, 40300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,403]'); insert into test_proxima_be_restart_with_inc_stage values(404, 'name404', 414.111, 40400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,404]'); insert into test_proxima_be_restart_with_inc_stage values(405, 'name405', 415.111, 40500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,405]'); insert into test_proxima_be_restart_with_inc_stage values(406, 'name406', 416.111, 40600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,406]'); insert into test_proxima_be_restart_with_inc_stage values(407, 'name407', 417.111, 40700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,407]'); insert into test_proxima_be_restart_with_inc_stage values(408, 'name408', 418.111, 40800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,408]'); insert into test_proxima_be_restart_with_inc_stage values(409, 'name409', 419.111, 40900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,409]'); insert into test_proxima_be_restart_with_inc_stage values(410, 'name410', 420.111, 41000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,410]'); insert into test_proxima_be_restart_with_inc_stage values(411, 'name411', 421.111, 41100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,411]'); insert into test_proxima_be_restart_with_inc_stage values(412, 'name412', 422.111, 41200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,412]'); insert into test_proxima_be_restart_with_inc_stage values(413, 'name413', 423.111, 41300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,413]'); insert into test_proxima_be_restart_with_inc_stage values(414, 'name414', 424.111, 41400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,414]'); insert into test_proxima_be_restart_with_inc_stage values(415, 'name415', 425.111, 41500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,415]'); insert into test_proxima_be_restart_with_inc_stage values(416, 'name416', 426.111, 41600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,416]'); insert into test_proxima_be_restart_with_inc_stage values(417, 'name417', 427.111, 41700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,417]'); insert into test_proxima_be_restart_with_inc_stage values(418, 'name418', 428.111, 41800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,418]'); insert into test_proxima_be_restart_with_inc_stage values(419, 'name419', 429.111, 41900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,419]'); insert into test_proxima_be_restart_with_inc_stage values(420, 'name420', 430.111, 42000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,420]'); insert into test_proxima_be_restart_with_inc_stage values(421, 'name421', 431.111, 42100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,421]'); insert into test_proxima_be_restart_with_inc_stage values(422, 'name422', 432.111, 42200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,422]'); insert into test_proxima_be_restart_with_inc_stage values(423, 'name423', 433.111, 42300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,423]'); insert into test_proxima_be_restart_with_inc_stage values(424, 'name424', 434.111, 42400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,424]'); insert into test_proxima_be_restart_with_inc_stage values(425, 'name425', 435.111, 42500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,425]'); insert into test_proxima_be_restart_with_inc_stage values(426, 'name426', 436.111, 42600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,426]'); insert into test_proxima_be_restart_with_inc_stage values(427, 'name427', 437.111, 42700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,427]'); insert into test_proxima_be_restart_with_inc_stage values(428, 'name428', 438.111, 42800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,428]'); insert into test_proxima_be_restart_with_inc_stage values(429, 'name429', 439.111, 42900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,429]'); insert into test_proxima_be_restart_with_inc_stage values(430, 'name430', 440.111, 43000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,430]'); insert into test_proxima_be_restart_with_inc_stage values(431, 'name431', 441.111, 43100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,431]'); insert into test_proxima_be_restart_with_inc_stage values(432, 'name432', 442.111, 43200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,432]'); insert into test_proxima_be_restart_with_inc_stage values(433, 'name433', 443.111, 43300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,433]'); insert into test_proxima_be_restart_with_inc_stage values(434, 'name434', 444.111, 43400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,434]'); insert into test_proxima_be_restart_with_inc_stage values(435, 'name435', 445.111, 43500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,435]'); insert into test_proxima_be_restart_with_inc_stage values(436, 'name436', 446.111, 43600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,436]'); insert into test_proxima_be_restart_with_inc_stage values(437, 'name437', 447.111, 43700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,437]'); insert into test_proxima_be_restart_with_inc_stage values(438, 'name438', 448.111, 43800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,438]'); insert into test_proxima_be_restart_with_inc_stage values(439, 'name439', 449.111, 43900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,439]'); insert into test_proxima_be_restart_with_inc_stage values(440, 'name440', 450.111, 44000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,440]'); insert into test_proxima_be_restart_with_inc_stage values(441, 'name441', 451.111, 44100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,441]'); insert into test_proxima_be_restart_with_inc_stage values(442, 'name442', 452.111, 44200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,442]'); insert into test_proxima_be_restart_with_inc_stage values(443, 'name443', 453.111, 44300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,443]'); insert into test_proxima_be_restart_with_inc_stage values(444, 'name444', 454.111, 44400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,444]'); insert into test_proxima_be_restart_with_inc_stage values(445, 'name445', 455.111, 44500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,445]'); insert into test_proxima_be_restart_with_inc_stage values(446, 'name446', 456.111, 44600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,446]'); insert into test_proxima_be_restart_with_inc_stage values(447, 'name447', 457.111, 44700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,447]'); insert into test_proxima_be_restart_with_inc_stage values(448, 'name448', 458.111, 44800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,448]'); insert into test_proxima_be_restart_with_inc_stage values(449, 'name449', 459.111, 44900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,449]'); insert into test_proxima_be_restart_with_inc_stage values(450, 'name450', 460.111, 45000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,450]'); insert into test_proxima_be_restart_with_inc_stage values(451, 'name451', 461.111, 45100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,451]'); insert into test_proxima_be_restart_with_inc_stage values(452, 'name452', 462.111, 45200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,452]'); insert into test_proxima_be_restart_with_inc_stage values(453, 'name453', 463.111, 45300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,453]'); insert into test_proxima_be_restart_with_inc_stage values(454, 'name454', 464.111, 45400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,454]'); insert into test_proxima_be_restart_with_inc_stage values(455, 'name455', 465.111, 45500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,455]'); insert into test_proxima_be_restart_with_inc_stage values(456, 'name456', 466.111, 45600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,456]'); insert into test_proxima_be_restart_with_inc_stage values(457, 'name457', 467.111, 45700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,457]'); insert into test_proxima_be_restart_with_inc_stage values(458, 'name458', 468.111, 45800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,458]'); insert into test_proxima_be_restart_with_inc_stage values(459, 'name459', 469.111, 45900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,459]'); insert into test_proxima_be_restart_with_inc_stage values(460, 'name460', 470.111, 46000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,460]'); insert into test_proxima_be_restart_with_inc_stage values(461, 'name461', 471.111, 46100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,461]'); insert into test_proxima_be_restart_with_inc_stage values(462, 'name462', 472.111, 46200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,462]'); insert into test_proxima_be_restart_with_inc_stage values(463, 'name463', 473.111, 46300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,463]'); insert into test_proxima_be_restart_with_inc_stage values(464, 'name464', 474.111, 46400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,464]'); insert into test_proxima_be_restart_with_inc_stage values(465, 'name465', 475.111, 46500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,465]'); insert into test_proxima_be_restart_with_inc_stage values(466, 'name466', 476.111, 46600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,466]'); insert into test_proxima_be_restart_with_inc_stage values(467, 'name467', 477.111, 46700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,467]'); insert into test_proxima_be_restart_with_inc_stage values(468, 'name468', 478.111, 46800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,468]'); insert into test_proxima_be_restart_with_inc_stage values(469, 'name469', 479.111, 46900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,469]'); insert into test_proxima_be_restart_with_inc_stage values(470, 'name470', 480.111, 47000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,470]'); insert into test_proxima_be_restart_with_inc_stage values(471, 'name471', 481.111, 47100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,471]'); insert into test_proxima_be_restart_with_inc_stage values(472, 'name472', 482.111, 47200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,472]'); insert into test_proxima_be_restart_with_inc_stage values(473, 'name473', 483.111, 47300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,473]'); insert into test_proxima_be_restart_with_inc_stage values(474, 'name474', 484.111, 47400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,474]'); insert into test_proxima_be_restart_with_inc_stage values(475, 'name475', 485.111, 47500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,475]'); insert into test_proxima_be_restart_with_inc_stage values(476, 'name476', 486.111, 47600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,476]'); insert into test_proxima_be_restart_with_inc_stage values(477, 'name477', 487.111, 47700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,477]'); insert into test_proxima_be_restart_with_inc_stage values(478, 'name478', 488.111, 47800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,478]'); insert into test_proxima_be_restart_with_inc_stage values(479, 'name479', 489.111, 47900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,479]'); insert into test_proxima_be_restart_with_inc_stage values(480, 'name480', 490.111, 48000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,480]'); insert into test_proxima_be_restart_with_inc_stage values(481, 'name481', 491.111, 48100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,481]'); insert into test_proxima_be_restart_with_inc_stage values(482, 'name482', 492.111, 48200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,482]'); insert into test_proxima_be_restart_with_inc_stage values(483, 'name483', 493.111, 48300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,483]'); insert into test_proxima_be_restart_with_inc_stage values(484, 'name484', 494.111, 48400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,484]'); insert into test_proxima_be_restart_with_inc_stage values(485, 'name485', 495.111, 48500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,485]'); insert into test_proxima_be_restart_with_inc_stage values(486, 'name486', 496.111, 48600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,486]'); insert into test_proxima_be_restart_with_inc_stage values(487, 'name487', 497.111, 48700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,487]'); insert into test_proxima_be_restart_with_inc_stage values(488, 'name488', 498.111, 48800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,488]'); insert into test_proxima_be_restart_with_inc_stage values(489, 'name489', 499.111, 48900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,489]'); insert into test_proxima_be_restart_with_inc_stage values(490, 'name490', 500.111, 49000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,490]'); insert into test_proxima_be_restart_with_inc_stage values(491, 'name491', 501.111, 49100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,491]'); insert into test_proxima_be_restart_with_inc_stage values(492, 'name492', 502.111, 49200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,492]'); insert into test_proxima_be_restart_with_inc_stage values(493, 'name493', 503.111, 49300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,493]'); insert into test_proxima_be_restart_with_inc_stage values(494, 'name494', 504.111, 49400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,494]'); insert into test_proxima_be_restart_with_inc_stage values(495, 'name495', 505.111, 49500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,495]'); insert into test_proxima_be_restart_with_inc_stage values(496, 'name496', 506.111, 49600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,496]'); insert into test_proxima_be_restart_with_inc_stage values(497, 'name497', 507.111, 49700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,497]'); insert into test_proxima_be_restart_with_inc_stage values(498, 'name498', 508.111, 49800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,498]'); insert into test_proxima_be_restart_with_inc_stage values(499, 'name499', 509.111, 49900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,499]'); insert into test_proxima_be_restart_with_inc_stage values(500, 'name500', 510.111, 50000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,500]'); insert into test_proxima_be_restart_with_inc_stage values(501, 'name501', 511.111, 50100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,501]'); insert into test_proxima_be_restart_with_inc_stage values(502, 'name502', 512.111, 50200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,502]'); insert into test_proxima_be_restart_with_inc_stage values(503, 'name503', 513.111, 50300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,503]'); insert into test_proxima_be_restart_with_inc_stage values(504, 'name504', 514.111, 50400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,504]'); insert into test_proxima_be_restart_with_inc_stage values(505, 'name505', 515.111, 50500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,505]'); insert into test_proxima_be_restart_with_inc_stage values(506, 'name506', 516.111, 50600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,506]'); insert into test_proxima_be_restart_with_inc_stage values(507, 'name507', 517.111, 50700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,507]'); insert into test_proxima_be_restart_with_inc_stage values(508, 'name508', 518.111, 50800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,508]'); insert into test_proxima_be_restart_with_inc_stage values(509, 'name509', 519.111, 50900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,509]'); insert into test_proxima_be_restart_with_inc_stage values(510, 'name510', 520.111, 51000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,510]'); insert into test_proxima_be_restart_with_inc_stage values(511, 'name511', 521.111, 51100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,511]'); insert into test_proxima_be_restart_with_inc_stage values(512, 'name512', 522.111, 51200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,512]'); insert into test_proxima_be_restart_with_inc_stage values(513, 'name513', 523.111, 51300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,513]'); insert into test_proxima_be_restart_with_inc_stage values(514, 'name514', 524.111, 51400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,514]'); insert into test_proxima_be_restart_with_inc_stage values(515, 'name515', 525.111, 51500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,515]'); insert into test_proxima_be_restart_with_inc_stage values(516, 'name516', 526.111, 51600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,516]'); insert into test_proxima_be_restart_with_inc_stage values(517, 'name517', 527.111, 51700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,517]'); insert into test_proxima_be_restart_with_inc_stage values(518, 'name518', 528.111, 51800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,518]'); insert into test_proxima_be_restart_with_inc_stage values(519, 'name519', 529.111, 51900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,519]'); insert into test_proxima_be_restart_with_inc_stage values(520, 'name520', 530.111, 52000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,520]'); insert into test_proxima_be_restart_with_inc_stage values(521, 'name521', 531.111, 52100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,521]'); insert into test_proxima_be_restart_with_inc_stage values(522, 'name522', 532.111, 52200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,522]'); insert into test_proxima_be_restart_with_inc_stage values(523, 'name523', 533.111, 52300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,523]'); insert into test_proxima_be_restart_with_inc_stage values(524, 'name524', 534.111, 52400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,524]'); insert into test_proxima_be_restart_with_inc_stage values(525, 'name525', 535.111, 52500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,525]'); insert into test_proxima_be_restart_with_inc_stage values(526, 'name526', 536.111, 52600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,526]'); insert into test_proxima_be_restart_with_inc_stage values(527, 'name527', 537.111, 52700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,527]'); insert into test_proxima_be_restart_with_inc_stage values(528, 'name528', 538.111, 52800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,528]'); insert into test_proxima_be_restart_with_inc_stage values(529, 'name529', 539.111, 52900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,529]'); insert into test_proxima_be_restart_with_inc_stage values(530, 'name530', 540.111, 53000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,530]'); insert into test_proxima_be_restart_with_inc_stage values(531, 'name531', 541.111, 53100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,531]'); insert into test_proxima_be_restart_with_inc_stage values(532, 'name532', 542.111, 53200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,532]'); insert into test_proxima_be_restart_with_inc_stage values(533, 'name533', 543.111, 53300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,533]'); insert into test_proxima_be_restart_with_inc_stage values(534, 'name534', 544.111, 53400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,534]'); insert into test_proxima_be_restart_with_inc_stage values(535, 'name535', 545.111, 53500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,535]'); insert into test_proxima_be_restart_with_inc_stage values(536, 'name536', 546.111, 53600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,536]'); insert into test_proxima_be_restart_with_inc_stage values(537, 'name537', 547.111, 53700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,537]'); insert into test_proxima_be_restart_with_inc_stage values(538, 'name538', 548.111, 53800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,538]'); insert into test_proxima_be_restart_with_inc_stage values(539, 'name539', 549.111, 53900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,539]'); insert into test_proxima_be_restart_with_inc_stage values(540, 'name540', 550.111, 54000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,540]'); insert into test_proxima_be_restart_with_inc_stage values(541, 'name541', 551.111, 54100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,541]'); insert into test_proxima_be_restart_with_inc_stage values(542, 'name542', 552.111, 54200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,542]'); insert into test_proxima_be_restart_with_inc_stage values(543, 'name543', 553.111, 54300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,543]'); insert into test_proxima_be_restart_with_inc_stage values(544, 'name544', 554.111, 54400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,544]'); insert into test_proxima_be_restart_with_inc_stage values(545, 'name545', 555.111, 54500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,545]'); insert into test_proxima_be_restart_with_inc_stage values(546, 'name546', 556.111, 54600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,546]'); insert into test_proxima_be_restart_with_inc_stage values(547, 'name547', 557.111, 54700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,547]'); insert into test_proxima_be_restart_with_inc_stage values(548, 'name548', 558.111, 54800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,548]'); insert into test_proxima_be_restart_with_inc_stage values(549, 'name549', 559.111, 54900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,549]'); insert into test_proxima_be_restart_with_inc_stage values(550, 'name550', 560.111, 55000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,550]'); insert into test_proxima_be_restart_with_inc_stage values(551, 'name551', 561.111, 55100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,551]'); insert into test_proxima_be_restart_with_inc_stage values(552, 'name552', 562.111, 55200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,552]'); insert into test_proxima_be_restart_with_inc_stage values(553, 'name553', 563.111, 55300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,553]'); insert into test_proxima_be_restart_with_inc_stage values(554, 'name554', 564.111, 55400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,554]'); insert into test_proxima_be_restart_with_inc_stage values(555, 'name555', 565.111, 55500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,555]'); insert into test_proxima_be_restart_with_inc_stage values(556, 'name556', 566.111, 55600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,556]'); insert into test_proxima_be_restart_with_inc_stage values(557, 'name557', 567.111, 55700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,557]'); insert into test_proxima_be_restart_with_inc_stage values(558, 'name558', 568.111, 55800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,558]'); insert into test_proxima_be_restart_with_inc_stage values(559, 'name559', 569.111, 55900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,559]'); insert into test_proxima_be_restart_with_inc_stage values(560, 'name560', 570.111, 56000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,560]'); insert into test_proxima_be_restart_with_inc_stage values(561, 'name561', 571.111, 56100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,561]'); insert into test_proxima_be_restart_with_inc_stage values(562, 'name562', 572.111, 56200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,562]'); insert into test_proxima_be_restart_with_inc_stage values(563, 'name563', 573.111, 56300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,563]'); insert into test_proxima_be_restart_with_inc_stage values(564, 'name564', 574.111, 56400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,564]'); insert into test_proxima_be_restart_with_inc_stage values(565, 'name565', 575.111, 56500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,565]'); insert into test_proxima_be_restart_with_inc_stage values(566, 'name566', 576.111, 56600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,566]'); insert into test_proxima_be_restart_with_inc_stage values(567, 'name567', 577.111, 56700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,567]'); insert into test_proxima_be_restart_with_inc_stage values(568, 'name568', 578.111, 56800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,568]'); insert into test_proxima_be_restart_with_inc_stage values(569, 'name569', 579.111, 56900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,569]'); insert into test_proxima_be_restart_with_inc_stage values(570, 'name570', 580.111, 57000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,570]'); insert into test_proxima_be_restart_with_inc_stage values(571, 'name571', 581.111, 57100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,571]'); insert into test_proxima_be_restart_with_inc_stage values(572, 'name572', 582.111, 57200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,572]'); insert into test_proxima_be_restart_with_inc_stage values(573, 'name573', 583.111, 57300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,573]'); insert into test_proxima_be_restart_with_inc_stage values(574, 'name574', 584.111, 57400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,574]'); insert into test_proxima_be_restart_with_inc_stage values(575, 'name575', 585.111, 57500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,575]'); insert into test_proxima_be_restart_with_inc_stage values(576, 'name576', 586.111, 57600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,576]'); insert into test_proxima_be_restart_with_inc_stage values(577, 'name577', 587.111, 57700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,577]'); insert into test_proxima_be_restart_with_inc_stage values(578, 'name578', 588.111, 57800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,578]'); insert into test_proxima_be_restart_with_inc_stage values(579, 'name579', 589.111, 57900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,579]'); insert into test_proxima_be_restart_with_inc_stage values(580, 'name580', 590.111, 58000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,580]'); insert into test_proxima_be_restart_with_inc_stage values(581, 'name581', 591.111, 58100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,581]'); insert into test_proxima_be_restart_with_inc_stage values(582, 'name582', 592.111, 58200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,582]'); insert into test_proxima_be_restart_with_inc_stage values(583, 'name583', 593.111, 58300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,583]'); insert into test_proxima_be_restart_with_inc_stage values(584, 'name584', 594.111, 58400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,584]'); insert into test_proxima_be_restart_with_inc_stage values(585, 'name585', 595.111, 58500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,585]'); insert into test_proxima_be_restart_with_inc_stage values(586, 'name586', 596.111, 58600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,586]'); insert into test_proxima_be_restart_with_inc_stage values(587, 'name587', 597.111, 58700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,587]'); insert into test_proxima_be_restart_with_inc_stage values(588, 'name588', 598.111, 58800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,588]'); insert into test_proxima_be_restart_with_inc_stage values(589, 'name589', 599.111, 58900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,589]'); insert into test_proxima_be_restart_with_inc_stage values(590, 'name590', 600.111, 59000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,590]'); insert into test_proxima_be_restart_with_inc_stage values(591, 'name591', 601.111, 59100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,591]'); insert into test_proxima_be_restart_with_inc_stage values(592, 'name592', 602.111, 59200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,592]'); insert into test_proxima_be_restart_with_inc_stage values(593, 'name593', 603.111, 59300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,593]'); insert into test_proxima_be_restart_with_inc_stage values(594, 'name594', 604.111, 59400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,594]'); insert into test_proxima_be_restart_with_inc_stage values(595, 'name595', 605.111, 59500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,595]'); insert into test_proxima_be_restart_with_inc_stage values(596, 'name596', 606.111, 59600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,596]'); insert into test_proxima_be_restart_with_inc_stage values(597, 'name597', 607.111, 59700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,597]'); insert into test_proxima_be_restart_with_inc_stage values(598, 'name598', 608.111, 59800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,598]'); insert into test_proxima_be_restart_with_inc_stage values(599, 'name599', 609.111, 59900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,599]'); insert into test_proxima_be_restart_with_inc_stage values(600, 'name600', 610.111, 60000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,600]'); insert into test_proxima_be_restart_with_inc_stage values(601, 'name601', 611.111, 60100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,601]'); insert into test_proxima_be_restart_with_inc_stage values(602, 'name602', 612.111, 60200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,602]'); insert into test_proxima_be_restart_with_inc_stage values(603, 'name603', 613.111, 60300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,603]'); insert into test_proxima_be_restart_with_inc_stage values(604, 'name604', 614.111, 60400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,604]'); insert into test_proxima_be_restart_with_inc_stage values(605, 'name605', 615.111, 60500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,605]'); insert into test_proxima_be_restart_with_inc_stage values(606, 'name606', 616.111, 60600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,606]'); insert into test_proxima_be_restart_with_inc_stage values(607, 'name607', 617.111, 60700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,607]'); insert into test_proxima_be_restart_with_inc_stage values(608, 'name608', 618.111, 60800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,608]'); insert into test_proxima_be_restart_with_inc_stage values(609, 'name609', 619.111, 60900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,609]'); insert into test_proxima_be_restart_with_inc_stage values(610, 'name610', 620.111, 61000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,610]'); insert into test_proxima_be_restart_with_inc_stage values(611, 'name611', 621.111, 61100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,611]'); insert into test_proxima_be_restart_with_inc_stage values(612, 'name612', 622.111, 61200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,612]'); insert into test_proxima_be_restart_with_inc_stage values(613, 'name613', 623.111, 61300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,613]'); insert into test_proxima_be_restart_with_inc_stage values(614, 'name614', 624.111, 61400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,614]'); insert into test_proxima_be_restart_with_inc_stage values(615, 'name615', 625.111, 61500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,615]'); insert into test_proxima_be_restart_with_inc_stage values(616, 'name616', 626.111, 61600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,616]'); insert into test_proxima_be_restart_with_inc_stage values(617, 'name617', 627.111, 61700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,617]'); insert into test_proxima_be_restart_with_inc_stage values(618, 'name618', 628.111, 61800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,618]'); insert into test_proxima_be_restart_with_inc_stage values(619, 'name619', 629.111, 61900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,619]'); insert into test_proxima_be_restart_with_inc_stage values(620, 'name620', 630.111, 62000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,620]'); insert into test_proxima_be_restart_with_inc_stage values(621, 'name621', 631.111, 62100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,621]'); insert into test_proxima_be_restart_with_inc_stage values(622, 'name622', 632.111, 62200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,622]'); insert into test_proxima_be_restart_with_inc_stage values(623, 'name623', 633.111, 62300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,623]'); insert into test_proxima_be_restart_with_inc_stage values(624, 'name624', 634.111, 62400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,624]'); insert into test_proxima_be_restart_with_inc_stage values(625, 'name625', 635.111, 62500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,625]'); insert into test_proxima_be_restart_with_inc_stage values(626, 'name626', 636.111, 62600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,626]'); insert into test_proxima_be_restart_with_inc_stage values(627, 'name627', 637.111, 62700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,627]'); insert into test_proxima_be_restart_with_inc_stage values(628, 'name628', 638.111, 62800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,628]'); insert into test_proxima_be_restart_with_inc_stage values(629, 'name629', 639.111, 62900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,629]'); insert into test_proxima_be_restart_with_inc_stage values(630, 'name630', 640.111, 63000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,630]'); insert into test_proxima_be_restart_with_inc_stage values(631, 'name631', 641.111, 63100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,631]'); insert into test_proxima_be_restart_with_inc_stage values(632, 'name632', 642.111, 63200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,632]'); insert into test_proxima_be_restart_with_inc_stage values(633, 'name633', 643.111, 63300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,633]'); insert into test_proxima_be_restart_with_inc_stage values(634, 'name634', 644.111, 63400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,634]'); insert into test_proxima_be_restart_with_inc_stage values(635, 'name635', 645.111, 63500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,635]'); insert into test_proxima_be_restart_with_inc_stage values(636, 'name636', 646.111, 63600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,636]'); insert into test_proxima_be_restart_with_inc_stage values(637, 'name637', 647.111, 63700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,637]'); insert into test_proxima_be_restart_with_inc_stage values(638, 'name638', 648.111, 63800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,638]'); insert into test_proxima_be_restart_with_inc_stage values(639, 'name639', 649.111, 63900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,639]'); insert into test_proxima_be_restart_with_inc_stage values(640, 'name640', 650.111, 64000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,640]'); insert into test_proxima_be_restart_with_inc_stage values(641, 'name641', 651.111, 64100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,641]'); insert into test_proxima_be_restart_with_inc_stage values(642, 'name642', 652.111, 64200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,642]'); insert into test_proxima_be_restart_with_inc_stage values(643, 'name643', 653.111, 64300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,643]'); insert into test_proxima_be_restart_with_inc_stage values(644, 'name644', 654.111, 64400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,644]'); insert into test_proxima_be_restart_with_inc_stage values(645, 'name645', 655.111, 64500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,645]'); insert into test_proxima_be_restart_with_inc_stage values(646, 'name646', 656.111, 64600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,646]'); insert into test_proxima_be_restart_with_inc_stage values(647, 'name647', 657.111, 64700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,647]'); insert into test_proxima_be_restart_with_inc_stage values(648, 'name648', 658.111, 64800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,648]'); insert into test_proxima_be_restart_with_inc_stage values(649, 'name649', 659.111, 64900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,649]'); insert into test_proxima_be_restart_with_inc_stage values(650, 'name650', 660.111, 65000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,650]'); insert into test_proxima_be_restart_with_inc_stage values(651, 'name651', 661.111, 65100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,651]'); insert into test_proxima_be_restart_with_inc_stage values(652, 'name652', 662.111, 65200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,652]'); insert into test_proxima_be_restart_with_inc_stage values(653, 'name653', 663.111, 65300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,653]'); insert into test_proxima_be_restart_with_inc_stage values(654, 'name654', 664.111, 65400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,654]'); insert into test_proxima_be_restart_with_inc_stage values(655, 'name655', 665.111, 65500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,655]'); insert into test_proxima_be_restart_with_inc_stage values(656, 'name656', 666.111, 65600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,656]'); insert into test_proxima_be_restart_with_inc_stage values(657, 'name657', 667.111, 65700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,657]'); insert into test_proxima_be_restart_with_inc_stage values(658, 'name658', 668.111, 65800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,658]'); insert into test_proxima_be_restart_with_inc_stage values(659, 'name659', 669.111, 65900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,659]'); insert into test_proxima_be_restart_with_inc_stage values(660, 'name660', 670.111, 66000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,660]'); insert into test_proxima_be_restart_with_inc_stage values(661, 'name661', 671.111, 66100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,661]'); insert into test_proxima_be_restart_with_inc_stage values(662, 'name662', 672.111, 66200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,662]'); insert into test_proxima_be_restart_with_inc_stage values(663, 'name663', 673.111, 66300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,663]'); insert into test_proxima_be_restart_with_inc_stage values(664, 'name664', 674.111, 66400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,664]'); insert into test_proxima_be_restart_with_inc_stage values(665, 'name665', 675.111, 66500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,665]'); insert into test_proxima_be_restart_with_inc_stage values(666, 'name666', 676.111, 66600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,666]'); insert into test_proxima_be_restart_with_inc_stage values(667, 'name667', 677.111, 66700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,667]'); insert into test_proxima_be_restart_with_inc_stage values(668, 'name668', 678.111, 66800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,668]'); insert into test_proxima_be_restart_with_inc_stage values(669, 'name669', 679.111, 66900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,669]'); insert into test_proxima_be_restart_with_inc_stage values(670, 'name670', 680.111, 67000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,670]'); insert into test_proxima_be_restart_with_inc_stage values(671, 'name671', 681.111, 67100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,671]'); insert into test_proxima_be_restart_with_inc_stage values(672, 'name672', 682.111, 67200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,672]'); insert into test_proxima_be_restart_with_inc_stage values(673, 'name673', 683.111, 67300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,673]'); insert into test_proxima_be_restart_with_inc_stage values(674, 'name674', 684.111, 67400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,674]'); insert into test_proxima_be_restart_with_inc_stage values(675, 'name675', 685.111, 67500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,675]'); insert into test_proxima_be_restart_with_inc_stage values(676, 'name676', 686.111, 67600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,676]'); insert into test_proxima_be_restart_with_inc_stage values(677, 'name677', 687.111, 67700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,677]'); insert into test_proxima_be_restart_with_inc_stage values(678, 'name678', 688.111, 67800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,678]'); insert into test_proxima_be_restart_with_inc_stage values(679, 'name679', 689.111, 67900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,679]'); insert into test_proxima_be_restart_with_inc_stage values(680, 'name680', 690.111, 68000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,680]'); insert into test_proxima_be_restart_with_inc_stage values(681, 'name681', 691.111, 68100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,681]'); insert into test_proxima_be_restart_with_inc_stage values(682, 'name682', 692.111, 68200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,682]'); insert into test_proxima_be_restart_with_inc_stage values(683, 'name683', 693.111, 68300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,683]'); insert into test_proxima_be_restart_with_inc_stage values(684, 'name684', 694.111, 68400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,684]'); insert into test_proxima_be_restart_with_inc_stage values(685, 'name685', 695.111, 68500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,685]'); insert into test_proxima_be_restart_with_inc_stage values(686, 'name686', 696.111, 68600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,686]'); insert into test_proxima_be_restart_with_inc_stage values(687, 'name687', 697.111, 68700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,687]'); insert into test_proxima_be_restart_with_inc_stage values(688, 'name688', 698.111, 68800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,688]'); insert into test_proxima_be_restart_with_inc_stage values(689, 'name689', 699.111, 68900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,689]'); insert into test_proxima_be_restart_with_inc_stage values(690, 'name690', 700.111, 69000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,690]'); insert into test_proxima_be_restart_with_inc_stage values(691, 'name691', 701.111, 69100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,691]'); insert into test_proxima_be_restart_with_inc_stage values(692, 'name692', 702.111, 69200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,692]'); insert into test_proxima_be_restart_with_inc_stage values(693, 'name693', 703.111, 69300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,693]'); insert into test_proxima_be_restart_with_inc_stage values(694, 'name694', 704.111, 69400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,694]'); insert into test_proxima_be_restart_with_inc_stage values(695, 'name695', 705.111, 69500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,695]'); insert into test_proxima_be_restart_with_inc_stage values(696, 'name696', 706.111, 69600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,696]'); insert into test_proxima_be_restart_with_inc_stage values(697, 'name697', 707.111, 69700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,697]'); insert into test_proxima_be_restart_with_inc_stage values(698, 'name698', 708.111, 69800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,698]'); insert into test_proxima_be_restart_with_inc_stage values(699, 'name699', 709.111, 69900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,699]'); insert into test_proxima_be_restart_with_inc_stage values(700, 'name700', 710.111, 70000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,700]'); insert into test_proxima_be_restart_with_inc_stage values(701, 'name701', 711.111, 70100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,701]'); insert into test_proxima_be_restart_with_inc_stage values(702, 'name702', 712.111, 70200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,702]'); insert into test_proxima_be_restart_with_inc_stage values(703, 'name703', 713.111, 70300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,703]'); insert into test_proxima_be_restart_with_inc_stage values(704, 'name704', 714.111, 70400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,704]'); insert into test_proxima_be_restart_with_inc_stage values(705, 'name705', 715.111, 70500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,705]'); insert into test_proxima_be_restart_with_inc_stage values(706, 'name706', 716.111, 70600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,706]'); insert into test_proxima_be_restart_with_inc_stage values(707, 'name707', 717.111, 70700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,707]'); insert into test_proxima_be_restart_with_inc_stage values(708, 'name708', 718.111, 70800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,708]'); insert into test_proxima_be_restart_with_inc_stage values(709, 'name709', 719.111, 70900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,709]'); insert into test_proxima_be_restart_with_inc_stage values(710, 'name710', 720.111, 71000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,710]'); insert into test_proxima_be_restart_with_inc_stage values(711, 'name711', 721.111, 71100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,711]'); insert into test_proxima_be_restart_with_inc_stage values(712, 'name712', 722.111, 71200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,712]'); insert into test_proxima_be_restart_with_inc_stage values(713, 'name713', 723.111, 71300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,713]'); insert into test_proxima_be_restart_with_inc_stage values(714, 'name714', 724.111, 71400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,714]'); insert into test_proxima_be_restart_with_inc_stage values(715, 'name715', 725.111, 71500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,715]'); insert into test_proxima_be_restart_with_inc_stage values(716, 'name716', 726.111, 71600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,716]'); insert into test_proxima_be_restart_with_inc_stage values(717, 'name717', 727.111, 71700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,717]'); insert into test_proxima_be_restart_with_inc_stage values(718, 'name718', 728.111, 71800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,718]'); insert into test_proxima_be_restart_with_inc_stage values(719, 'name719', 729.111, 71900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,719]'); insert into test_proxima_be_restart_with_inc_stage values(720, 'name720', 730.111, 72000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,720]'); insert into test_proxima_be_restart_with_inc_stage values(721, 'name721', 731.111, 72100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,721]'); insert into test_proxima_be_restart_with_inc_stage values(722, 'name722', 732.111, 72200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,722]'); insert into test_proxima_be_restart_with_inc_stage values(723, 'name723', 733.111, 72300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,723]'); insert into test_proxima_be_restart_with_inc_stage values(724, 'name724', 734.111, 72400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,724]'); insert into test_proxima_be_restart_with_inc_stage values(725, 'name725', 735.111, 72500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,725]'); insert into test_proxima_be_restart_with_inc_stage values(726, 'name726', 736.111, 72600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,726]'); insert into test_proxima_be_restart_with_inc_stage values(727, 'name727', 737.111, 72700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,727]'); insert into test_proxima_be_restart_with_inc_stage values(728, 'name728', 738.111, 72800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,728]'); insert into test_proxima_be_restart_with_inc_stage values(729, 'name729', 739.111, 72900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,729]'); insert into test_proxima_be_restart_with_inc_stage values(730, 'name730', 740.111, 73000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,730]'); insert into test_proxima_be_restart_with_inc_stage values(731, 'name731', 741.111, 73100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,731]'); insert into test_proxima_be_restart_with_inc_stage values(732, 'name732', 742.111, 73200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,732]'); insert into test_proxima_be_restart_with_inc_stage values(733, 'name733', 743.111, 73300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,733]'); insert into test_proxima_be_restart_with_inc_stage values(734, 'name734', 744.111, 73400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,734]'); insert into test_proxima_be_restart_with_inc_stage values(735, 'name735', 745.111, 73500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,735]'); insert into test_proxima_be_restart_with_inc_stage values(736, 'name736', 746.111, 73600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,736]'); insert into test_proxima_be_restart_with_inc_stage values(737, 'name737', 747.111, 73700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,737]'); insert into test_proxima_be_restart_with_inc_stage values(738, 'name738', 748.111, 73800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,738]'); insert into test_proxima_be_restart_with_inc_stage values(739, 'name739', 749.111, 73900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,739]'); insert into test_proxima_be_restart_with_inc_stage values(740, 'name740', 750.111, 74000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,740]'); insert into test_proxima_be_restart_with_inc_stage values(741, 'name741', 751.111, 74100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,741]'); insert into test_proxima_be_restart_with_inc_stage values(742, 'name742', 752.111, 74200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,742]'); insert into test_proxima_be_restart_with_inc_stage values(743, 'name743', 753.111, 74300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,743]'); insert into test_proxima_be_restart_with_inc_stage values(744, 'name744', 754.111, 74400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,744]'); insert into test_proxima_be_restart_with_inc_stage values(745, 'name745', 755.111, 74500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,745]'); insert into test_proxima_be_restart_with_inc_stage values(746, 'name746', 756.111, 74600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,746]'); insert into test_proxima_be_restart_with_inc_stage values(747, 'name747', 757.111, 74700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,747]'); insert into test_proxima_be_restart_with_inc_stage values(748, 'name748', 758.111, 74800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,748]'); insert into test_proxima_be_restart_with_inc_stage values(749, 'name749', 759.111, 74900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,749]'); insert into test_proxima_be_restart_with_inc_stage values(750, 'name750', 760.111, 75000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,750]'); insert into test_proxima_be_restart_with_inc_stage values(751, 'name751', 761.111, 75100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,751]'); insert into test_proxima_be_restart_with_inc_stage values(752, 'name752', 762.111, 75200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,752]'); insert into test_proxima_be_restart_with_inc_stage values(753, 'name753', 763.111, 75300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,753]'); insert into test_proxima_be_restart_with_inc_stage values(754, 'name754', 764.111, 75400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,754]'); insert into test_proxima_be_restart_with_inc_stage values(755, 'name755', 765.111, 75500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,755]'); insert into test_proxima_be_restart_with_inc_stage values(756, 'name756', 766.111, 75600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,756]'); insert into test_proxima_be_restart_with_inc_stage values(757, 'name757', 767.111, 75700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,757]'); insert into test_proxima_be_restart_with_inc_stage values(758, 'name758', 768.111, 75800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,758]'); insert into test_proxima_be_restart_with_inc_stage values(759, 'name759', 769.111, 75900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,759]'); insert into test_proxima_be_restart_with_inc_stage values(760, 'name760', 770.111, 76000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,760]'); insert into test_proxima_be_restart_with_inc_stage values(761, 'name761', 771.111, 76100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,761]'); insert into test_proxima_be_restart_with_inc_stage values(762, 'name762', 772.111, 76200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,762]'); insert into test_proxima_be_restart_with_inc_stage values(763, 'name763', 773.111, 76300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,763]'); insert into test_proxima_be_restart_with_inc_stage values(764, 'name764', 774.111, 76400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,764]'); insert into test_proxima_be_restart_with_inc_stage values(765, 'name765', 775.111, 76500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,765]'); insert into test_proxima_be_restart_with_inc_stage values(766, 'name766', 776.111, 76600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,766]'); insert into test_proxima_be_restart_with_inc_stage values(767, 'name767', 777.111, 76700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,767]'); insert into test_proxima_be_restart_with_inc_stage values(768, 'name768', 778.111, 76800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,768]'); insert into test_proxima_be_restart_with_inc_stage values(769, 'name769', 779.111, 76900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,769]'); insert into test_proxima_be_restart_with_inc_stage values(770, 'name770', 780.111, 77000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,770]'); insert into test_proxima_be_restart_with_inc_stage values(771, 'name771', 781.111, 77100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,771]'); insert into test_proxima_be_restart_with_inc_stage values(772, 'name772', 782.111, 77200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,772]'); insert into test_proxima_be_restart_with_inc_stage values(773, 'name773', 783.111, 77300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,773]'); insert into test_proxima_be_restart_with_inc_stage values(774, 'name774', 784.111, 77400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,774]'); insert into test_proxima_be_restart_with_inc_stage values(775, 'name775', 785.111, 77500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,775]'); insert into test_proxima_be_restart_with_inc_stage values(776, 'name776', 786.111, 77600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,776]'); insert into test_proxima_be_restart_with_inc_stage values(777, 'name777', 787.111, 77700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,777]'); insert into test_proxima_be_restart_with_inc_stage values(778, 'name778', 788.111, 77800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,778]'); insert into test_proxima_be_restart_with_inc_stage values(779, 'name779', 789.111, 77900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,779]'); insert into test_proxima_be_restart_with_inc_stage values(780, 'name780', 790.111, 78000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,780]'); insert into test_proxima_be_restart_with_inc_stage values(781, 'name781', 791.111, 78100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,781]'); insert into test_proxima_be_restart_with_inc_stage values(782, 'name782', 792.111, 78200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,782]'); insert into test_proxima_be_restart_with_inc_stage values(783, 'name783', 793.111, 78300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,783]'); insert into test_proxima_be_restart_with_inc_stage values(784, 'name784', 794.111, 78400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,784]'); insert into test_proxima_be_restart_with_inc_stage values(785, 'name785', 795.111, 78500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,785]'); insert into test_proxima_be_restart_with_inc_stage values(786, 'name786', 796.111, 78600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,786]'); insert into test_proxima_be_restart_with_inc_stage values(787, 'name787', 797.111, 78700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,787]'); insert into test_proxima_be_restart_with_inc_stage values(788, 'name788', 798.111, 78800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,788]'); insert into test_proxima_be_restart_with_inc_stage values(789, 'name789', 799.111, 78900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,789]'); insert into test_proxima_be_restart_with_inc_stage values(790, 'name790', 800.111, 79000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,790]'); insert into test_proxima_be_restart_with_inc_stage values(791, 'name791', 801.111, 79100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,791]'); insert into test_proxima_be_restart_with_inc_stage values(792, 'name792', 802.111, 79200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,792]'); insert into test_proxima_be_restart_with_inc_stage values(793, 'name793', 803.111, 79300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,793]'); insert into test_proxima_be_restart_with_inc_stage values(794, 'name794', 804.111, 79400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,794]'); insert into test_proxima_be_restart_with_inc_stage values(795, 'name795', 805.111, 79500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,795]'); insert into test_proxima_be_restart_with_inc_stage values(796, 'name796', 806.111, 79600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,796]'); insert into test_proxima_be_restart_with_inc_stage values(797, 'name797', 807.111, 79700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,797]'); insert into test_proxima_be_restart_with_inc_stage values(798, 'name798', 808.111, 79800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,798]'); insert into test_proxima_be_restart_with_inc_stage values(799, 'name799', 809.111, 79900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,799]'); insert into test_proxima_be_restart_with_inc_stage values(800, 'name800', 810.111, 80000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,800]'); insert into test_proxima_be_restart_with_inc_stage values(801, 'name801', 811.111, 80100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,801]'); insert into test_proxima_be_restart_with_inc_stage values(802, 'name802', 812.111, 80200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,802]'); insert into test_proxima_be_restart_with_inc_stage values(803, 'name803', 813.111, 80300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,803]'); insert into test_proxima_be_restart_with_inc_stage values(804, 'name804', 814.111, 80400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,804]'); insert into test_proxima_be_restart_with_inc_stage values(805, 'name805', 815.111, 80500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,805]'); insert into test_proxima_be_restart_with_inc_stage values(806, 'name806', 816.111, 80600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,806]'); insert into test_proxima_be_restart_with_inc_stage values(807, 'name807', 817.111, 80700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,807]'); insert into test_proxima_be_restart_with_inc_stage values(808, 'name808', 818.111, 80800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,808]'); insert into test_proxima_be_restart_with_inc_stage values(809, 'name809', 819.111, 80900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,809]'); insert into test_proxima_be_restart_with_inc_stage values(810, 'name810', 820.111, 81000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,810]'); insert into test_proxima_be_restart_with_inc_stage values(811, 'name811', 821.111, 81100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,811]'); insert into test_proxima_be_restart_with_inc_stage values(812, 'name812', 822.111, 81200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,812]'); insert into test_proxima_be_restart_with_inc_stage values(813, 'name813', 823.111, 81300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,813]'); insert into test_proxima_be_restart_with_inc_stage values(814, 'name814', 824.111, 81400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,814]'); insert into test_proxima_be_restart_with_inc_stage values(815, 'name815', 825.111, 81500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,815]'); insert into test_proxima_be_restart_with_inc_stage values(816, 'name816', 826.111, 81600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,816]'); insert into test_proxima_be_restart_with_inc_stage values(817, 'name817', 827.111, 81700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,817]'); insert into test_proxima_be_restart_with_inc_stage values(818, 'name818', 828.111, 81800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,818]'); insert into test_proxima_be_restart_with_inc_stage values(819, 'name819', 829.111, 81900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,819]'); insert into test_proxima_be_restart_with_inc_stage values(820, 'name820', 830.111, 82000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,820]'); insert into test_proxima_be_restart_with_inc_stage values(821, 'name821', 831.111, 82100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,821]'); insert into test_proxima_be_restart_with_inc_stage values(822, 'name822', 832.111, 82200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,822]'); insert into test_proxima_be_restart_with_inc_stage values(823, 'name823', 833.111, 82300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,823]'); insert into test_proxima_be_restart_with_inc_stage values(824, 'name824', 834.111, 82400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,824]'); insert into test_proxima_be_restart_with_inc_stage values(825, 'name825', 835.111, 82500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,825]'); insert into test_proxima_be_restart_with_inc_stage values(826, 'name826', 836.111, 82600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,826]'); insert into test_proxima_be_restart_with_inc_stage values(827, 'name827', 837.111, 82700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,827]'); insert into test_proxima_be_restart_with_inc_stage values(828, 'name828', 838.111, 82800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,828]'); insert into test_proxima_be_restart_with_inc_stage values(829, 'name829', 839.111, 82900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,829]'); insert into test_proxima_be_restart_with_inc_stage values(830, 'name830', 840.111, 83000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,830]'); insert into test_proxima_be_restart_with_inc_stage values(831, 'name831', 841.111, 83100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,831]'); insert into test_proxima_be_restart_with_inc_stage values(832, 'name832', 842.111, 83200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,832]'); insert into test_proxima_be_restart_with_inc_stage values(833, 'name833', 843.111, 83300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,833]'); insert into test_proxima_be_restart_with_inc_stage values(834, 'name834', 844.111, 83400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,834]'); insert into test_proxima_be_restart_with_inc_stage values(835, 'name835', 845.111, 83500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,835]'); insert into test_proxima_be_restart_with_inc_stage values(836, 'name836', 846.111, 83600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,836]'); insert into test_proxima_be_restart_with_inc_stage values(837, 'name837', 847.111, 83700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,837]'); insert into test_proxima_be_restart_with_inc_stage values(838, 'name838', 848.111, 83800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,838]'); insert into test_proxima_be_restart_with_inc_stage values(839, 'name839', 849.111, 83900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,839]'); insert into test_proxima_be_restart_with_inc_stage values(840, 'name840', 850.111, 84000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,840]'); insert into test_proxima_be_restart_with_inc_stage values(841, 'name841', 851.111, 84100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,841]'); insert into test_proxima_be_restart_with_inc_stage values(842, 'name842', 852.111, 84200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,842]'); insert into test_proxima_be_restart_with_inc_stage values(843, 'name843', 853.111, 84300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,843]'); insert into test_proxima_be_restart_with_inc_stage values(844, 'name844', 854.111, 84400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,844]'); insert into test_proxima_be_restart_with_inc_stage values(845, 'name845', 855.111, 84500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,845]'); insert into test_proxima_be_restart_with_inc_stage values(846, 'name846', 856.111, 84600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,846]'); insert into test_proxima_be_restart_with_inc_stage values(847, 'name847', 857.111, 84700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,847]'); insert into test_proxima_be_restart_with_inc_stage values(848, 'name848', 858.111, 84800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,848]'); insert into test_proxima_be_restart_with_inc_stage values(849, 'name849', 859.111, 84900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,849]'); insert into test_proxima_be_restart_with_inc_stage values(850, 'name850', 860.111, 85000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,850]'); insert into test_proxima_be_restart_with_inc_stage values(851, 'name851', 861.111, 85100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,851]'); insert into test_proxima_be_restart_with_inc_stage values(852, 'name852', 862.111, 85200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,852]'); insert into test_proxima_be_restart_with_inc_stage values(853, 'name853', 863.111, 85300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,853]'); insert into test_proxima_be_restart_with_inc_stage values(854, 'name854', 864.111, 85400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,854]'); insert into test_proxima_be_restart_with_inc_stage values(855, 'name855', 865.111, 85500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,855]'); insert into test_proxima_be_restart_with_inc_stage values(856, 'name856', 866.111, 85600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,856]'); insert into test_proxima_be_restart_with_inc_stage values(857, 'name857', 867.111, 85700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,857]'); insert into test_proxima_be_restart_with_inc_stage values(858, 'name858', 868.111, 85800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,858]'); insert into test_proxima_be_restart_with_inc_stage values(859, 'name859', 869.111, 85900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,859]'); insert into test_proxima_be_restart_with_inc_stage values(860, 'name860', 870.111, 86000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,860]'); insert into test_proxima_be_restart_with_inc_stage values(861, 'name861', 871.111, 86100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,861]'); insert into test_proxima_be_restart_with_inc_stage values(862, 'name862', 872.111, 86200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,862]'); insert into test_proxima_be_restart_with_inc_stage values(863, 'name863', 873.111, 86300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,863]'); insert into test_proxima_be_restart_with_inc_stage values(864, 'name864', 874.111, 86400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,864]'); insert into test_proxima_be_restart_with_inc_stage values(865, 'name865', 875.111, 86500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,865]'); insert into test_proxima_be_restart_with_inc_stage values(866, 'name866', 876.111, 86600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,866]'); insert into test_proxima_be_restart_with_inc_stage values(867, 'name867', 877.111, 86700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,867]'); insert into test_proxima_be_restart_with_inc_stage values(868, 'name868', 878.111, 86800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,868]'); insert into test_proxima_be_restart_with_inc_stage values(869, 'name869', 879.111, 86900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,869]'); insert into test_proxima_be_restart_with_inc_stage values(870, 'name870', 880.111, 87000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,870]'); insert into test_proxima_be_restart_with_inc_stage values(871, 'name871', 881.111, 87100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,871]'); insert into test_proxima_be_restart_with_inc_stage values(872, 'name872', 882.111, 87200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,872]'); insert into test_proxima_be_restart_with_inc_stage values(873, 'name873', 883.111, 87300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,873]'); insert into test_proxima_be_restart_with_inc_stage values(874, 'name874', 884.111, 87400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,874]'); insert into test_proxima_be_restart_with_inc_stage values(875, 'name875', 885.111, 87500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,875]'); insert into test_proxima_be_restart_with_inc_stage values(876, 'name876', 886.111, 87600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,876]'); insert into test_proxima_be_restart_with_inc_stage values(877, 'name877', 887.111, 87700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,877]'); insert into test_proxima_be_restart_with_inc_stage values(878, 'name878', 888.111, 87800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,878]'); insert into test_proxima_be_restart_with_inc_stage values(879, 'name879', 889.111, 87900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,879]'); insert into test_proxima_be_restart_with_inc_stage values(880, 'name880', 890.111, 88000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,880]'); insert into test_proxima_be_restart_with_inc_stage values(881, 'name881', 891.111, 88100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,881]'); insert into test_proxima_be_restart_with_inc_stage values(882, 'name882', 892.111, 88200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,882]'); insert into test_proxima_be_restart_with_inc_stage values(883, 'name883', 893.111, 88300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,883]'); insert into test_proxima_be_restart_with_inc_stage values(884, 'name884', 894.111, 88400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,884]'); insert into test_proxima_be_restart_with_inc_stage values(885, 'name885', 895.111, 88500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,885]'); insert into test_proxima_be_restart_with_inc_stage values(886, 'name886', 896.111, 88600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,886]'); insert into test_proxima_be_restart_with_inc_stage values(887, 'name887', 897.111, 88700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,887]'); insert into test_proxima_be_restart_with_inc_stage values(888, 'name888', 898.111, 88800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,888]'); insert into test_proxima_be_restart_with_inc_stage values(889, 'name889', 899.111, 88900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,889]'); insert into test_proxima_be_restart_with_inc_stage values(890, 'name890', 900.111, 89000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,890]'); insert into test_proxima_be_restart_with_inc_stage values(891, 'name891', 901.111, 89100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,891]'); insert into test_proxima_be_restart_with_inc_stage values(892, 'name892', 902.111, 89200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,892]'); insert into test_proxima_be_restart_with_inc_stage values(893, 'name893', 903.111, 89300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,893]'); insert into test_proxima_be_restart_with_inc_stage values(894, 'name894', 904.111, 89400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,894]'); insert into test_proxima_be_restart_with_inc_stage values(895, 'name895', 905.111, 89500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,895]'); insert into test_proxima_be_restart_with_inc_stage values(896, 'name896', 906.111, 89600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,896]'); insert into test_proxima_be_restart_with_inc_stage values(897, 'name897', 907.111, 89700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,897]'); insert into test_proxima_be_restart_with_inc_stage values(898, 'name898', 908.111, 89800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,898]'); insert into test_proxima_be_restart_with_inc_stage values(899, 'name899', 909.111, 89900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,899]'); insert into test_proxima_be_restart_with_inc_stage values(900, 'name900', 910.111, 90000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,900]'); insert into test_proxima_be_restart_with_inc_stage values(901, 'name901', 911.111, 90100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,901]'); insert into test_proxima_be_restart_with_inc_stage values(902, 'name902', 912.111, 90200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,902]'); insert into test_proxima_be_restart_with_inc_stage values(903, 'name903', 913.111, 90300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,903]'); insert into test_proxima_be_restart_with_inc_stage values(904, 'name904', 914.111, 90400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,904]'); insert into test_proxima_be_restart_with_inc_stage values(905, 'name905', 915.111, 90500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,905]'); insert into test_proxima_be_restart_with_inc_stage values(906, 'name906', 916.111, 90600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,906]'); insert into test_proxima_be_restart_with_inc_stage values(907, 'name907', 917.111, 90700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,907]'); insert into test_proxima_be_restart_with_inc_stage values(908, 'name908', 918.111, 90800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,908]'); insert into test_proxima_be_restart_with_inc_stage values(909, 'name909', 919.111, 90900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,909]'); insert into test_proxima_be_restart_with_inc_stage values(910, 'name910', 920.111, 91000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,910]'); insert into test_proxima_be_restart_with_inc_stage values(911, 'name911', 921.111, 91100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,911]'); insert into test_proxima_be_restart_with_inc_stage values(912, 'name912', 922.111, 91200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,912]'); insert into test_proxima_be_restart_with_inc_stage values(913, 'name913', 923.111, 91300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,913]'); insert into test_proxima_be_restart_with_inc_stage values(914, 'name914', 924.111, 91400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,914]'); insert into test_proxima_be_restart_with_inc_stage values(915, 'name915', 925.111, 91500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,915]'); insert into test_proxima_be_restart_with_inc_stage values(916, 'name916', 926.111, 91600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,916]'); insert into test_proxima_be_restart_with_inc_stage values(917, 'name917', 927.111, 91700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,917]'); insert into test_proxima_be_restart_with_inc_stage values(918, 'name918', 928.111, 91800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,918]'); insert into test_proxima_be_restart_with_inc_stage values(919, 'name919', 929.111, 91900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,919]'); insert into test_proxima_be_restart_with_inc_stage values(920, 'name920', 930.111, 92000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,920]'); insert into test_proxima_be_restart_with_inc_stage values(921, 'name921', 931.111, 92100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,921]'); insert into test_proxima_be_restart_with_inc_stage values(922, 'name922', 932.111, 92200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,922]'); insert into test_proxima_be_restart_with_inc_stage values(923, 'name923', 933.111, 92300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,923]'); insert into test_proxima_be_restart_with_inc_stage values(924, 'name924', 934.111, 92400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,924]'); insert into test_proxima_be_restart_with_inc_stage values(925, 'name925', 935.111, 92500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,925]'); insert into test_proxima_be_restart_with_inc_stage values(926, 'name926', 936.111, 92600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,926]'); insert into test_proxima_be_restart_with_inc_stage values(927, 'name927', 937.111, 92700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,927]'); insert into test_proxima_be_restart_with_inc_stage values(928, 'name928', 938.111, 92800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,928]'); insert into test_proxima_be_restart_with_inc_stage values(929, 'name929', 939.111, 92900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,929]'); insert into test_proxima_be_restart_with_inc_stage values(930, 'name930', 940.111, 93000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,930]'); insert into test_proxima_be_restart_with_inc_stage values(931, 'name931', 941.111, 93100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,931]'); insert into test_proxima_be_restart_with_inc_stage values(932, 'name932', 942.111, 93200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,932]'); insert into test_proxima_be_restart_with_inc_stage values(933, 'name933', 943.111, 93300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,933]'); insert into test_proxima_be_restart_with_inc_stage values(934, 'name934', 944.111, 93400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,934]'); insert into test_proxima_be_restart_with_inc_stage values(935, 'name935', 945.111, 93500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,935]'); insert into test_proxima_be_restart_with_inc_stage values(936, 'name936', 946.111, 93600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,936]'); insert into test_proxima_be_restart_with_inc_stage values(937, 'name937', 947.111, 93700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,937]'); insert into test_proxima_be_restart_with_inc_stage values(938, 'name938', 948.111, 93800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,938]'); insert into test_proxima_be_restart_with_inc_stage values(939, 'name939', 949.111, 93900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,939]'); insert into test_proxima_be_restart_with_inc_stage values(940, 'name940', 950.111, 94000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,940]'); insert into test_proxima_be_restart_with_inc_stage values(941, 'name941', 951.111, 94100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,941]'); insert into test_proxima_be_restart_with_inc_stage values(942, 'name942', 952.111, 94200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,942]'); insert into test_proxima_be_restart_with_inc_stage values(943, 'name943', 953.111, 94300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,943]'); insert into test_proxima_be_restart_with_inc_stage values(944, 'name944', 954.111, 94400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,944]'); insert into test_proxima_be_restart_with_inc_stage values(945, 'name945', 955.111, 94500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,945]'); insert into test_proxima_be_restart_with_inc_stage values(946, 'name946', 956.111, 94600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,946]'); insert into test_proxima_be_restart_with_inc_stage values(947, 'name947', 957.111, 94700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,947]'); insert into test_proxima_be_restart_with_inc_stage values(948, 'name948', 958.111, 94800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,948]'); insert into test_proxima_be_restart_with_inc_stage values(949, 'name949', 959.111, 94900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,949]'); insert into test_proxima_be_restart_with_inc_stage values(950, 'name950', 960.111, 95000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,950]'); insert into test_proxima_be_restart_with_inc_stage values(951, 'name951', 961.111, 95100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,951]'); insert into test_proxima_be_restart_with_inc_stage values(952, 'name952', 962.111, 95200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,952]'); insert into test_proxima_be_restart_with_inc_stage values(953, 'name953', 963.111, 95300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,953]'); insert into test_proxima_be_restart_with_inc_stage values(954, 'name954', 964.111, 95400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,954]'); insert into test_proxima_be_restart_with_inc_stage values(955, 'name955', 965.111, 95500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,955]'); insert into test_proxima_be_restart_with_inc_stage values(956, 'name956', 966.111, 95600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,956]'); insert into test_proxima_be_restart_with_inc_stage values(957, 'name957', 967.111, 95700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,957]'); insert into test_proxima_be_restart_with_inc_stage values(958, 'name958', 968.111, 95800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,958]'); insert into test_proxima_be_restart_with_inc_stage values(959, 'name959', 969.111, 95900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,959]'); insert into test_proxima_be_restart_with_inc_stage values(960, 'name960', 970.111, 96000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,960]'); insert into test_proxima_be_restart_with_inc_stage values(961, 'name961', 971.111, 96100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,961]'); insert into test_proxima_be_restart_with_inc_stage values(962, 'name962', 972.111, 96200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,962]'); insert into test_proxima_be_restart_with_inc_stage values(963, 'name963', 973.111, 96300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,963]'); insert into test_proxima_be_restart_with_inc_stage values(964, 'name964', 974.111, 96400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,964]'); insert into test_proxima_be_restart_with_inc_stage values(965, 'name965', 975.111, 96500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,965]'); insert into test_proxima_be_restart_with_inc_stage values(966, 'name966', 976.111, 96600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,966]'); insert into test_proxima_be_restart_with_inc_stage values(967, 'name967', 977.111, 96700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,967]'); insert into test_proxima_be_restart_with_inc_stage values(968, 'name968', 978.111, 96800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,968]'); insert into test_proxima_be_restart_with_inc_stage values(969, 'name969', 979.111, 96900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,969]'); insert into test_proxima_be_restart_with_inc_stage values(970, 'name970', 980.111, 97000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,970]'); insert into test_proxima_be_restart_with_inc_stage values(971, 'name971', 981.111, 97100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,971]'); insert into test_proxima_be_restart_with_inc_stage values(972, 'name972', 982.111, 97200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,972]'); insert into test_proxima_be_restart_with_inc_stage values(973, 'name973', 983.111, 97300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,973]'); insert into test_proxima_be_restart_with_inc_stage values(974, 'name974', 984.111, 97400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,974]'); insert into test_proxima_be_restart_with_inc_stage values(975, 'name975', 985.111, 97500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,975]'); insert into test_proxima_be_restart_with_inc_stage values(976, 'name976', 986.111, 97600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,976]'); insert into test_proxima_be_restart_with_inc_stage values(977, 'name977', 987.111, 97700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,977]'); insert into test_proxima_be_restart_with_inc_stage values(978, 'name978', 988.111, 97800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,978]'); insert into test_proxima_be_restart_with_inc_stage values(979, 'name979', 989.111, 97900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,979]'); insert into test_proxima_be_restart_with_inc_stage values(980, 'name980', 990.111, 98000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,980]'); insert into test_proxima_be_restart_with_inc_stage values(981, 'name981', 991.111, 98100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,981]'); insert into test_proxima_be_restart_with_inc_stage values(982, 'name982', 992.111, 98200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,982]'); insert into test_proxima_be_restart_with_inc_stage values(983, 'name983', 993.111, 98300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,983]'); insert into test_proxima_be_restart_with_inc_stage values(984, 'name984', 994.111, 98400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,984]'); insert into test_proxima_be_restart_with_inc_stage values(985, 'name985', 995.111, 98500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,985]'); insert into test_proxima_be_restart_with_inc_stage values(986, 'name986', 996.111, 98600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,986]'); insert into test_proxima_be_restart_with_inc_stage values(987, 'name987', 997.111, 98700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,987]'); insert into test_proxima_be_restart_with_inc_stage values(988, 'name988', 998.111, 98800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,988]'); insert into test_proxima_be_restart_with_inc_stage values(989, 'name989', 999.111, 98900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,989]'); insert into test_proxima_be_restart_with_inc_stage values(990, 'name990', 1000.111, 99000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,990]'); insert into test_proxima_be_restart_with_inc_stage values(991, 'name991', 1001.111, 99100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,991]'); insert into test_proxima_be_restart_with_inc_stage values(992, 'name992', 1002.111, 99200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,992]'); insert into test_proxima_be_restart_with_inc_stage values(993, 'name993', 1003.111, 99300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,993]'); insert into test_proxima_be_restart_with_inc_stage values(994, 'name994', 1004.111, 99400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,994]'); insert into test_proxima_be_restart_with_inc_stage values(995, 'name995', 1005.111, 99500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,995]'); insert into test_proxima_be_restart_with_inc_stage values(996, 'name996', 1006.111, 99600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,996]'); insert into test_proxima_be_restart_with_inc_stage values(997, 'name997', 1007.111, 99700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,997]'); insert into test_proxima_be_restart_with_inc_stage values(998, 'name998', 1008.111, 99800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,998]'); insert into test_proxima_be_restart_with_inc_stage values(999, 'name999', 1009.111, 99900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,999]'); insert into test_proxima_be_restart_with_inc_stage values(1000, 'name1000', 1010.111, 100000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1000]'); insert into test_proxima_be_restart_with_inc_stage values(1001, 'name1001', 1011.111, 100100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1001]'); insert into test_proxima_be_restart_with_inc_stage values(1002, 'name1002', 1012.111, 100200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1002]'); insert into test_proxima_be_restart_with_inc_stage values(1003, 'name1003', 1013.111, 100300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1003]'); insert into test_proxima_be_restart_with_inc_stage values(1004, 'name1004', 1014.111, 100400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1004]'); insert into test_proxima_be_restart_with_inc_stage values(1005, 'name1005', 1015.111, 100500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1005]'); insert into test_proxima_be_restart_with_inc_stage values(1006, 'name1006', 1016.111, 100600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1006]'); insert into test_proxima_be_restart_with_inc_stage values(1007, 'name1007', 1017.111, 100700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1007]'); insert into test_proxima_be_restart_with_inc_stage values(1008, 'name1008', 1018.111, 100800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1008]'); insert into test_proxima_be_restart_with_inc_stage values(1009, 'name1009', 1019.111, 100900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1009]'); insert into test_proxima_be_restart_with_inc_stage values(1010, 'name1010', 1020.111, 101000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1010]'); insert into test_proxima_be_restart_with_inc_stage values(1011, 'name1011', 1021.111, 101100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1011]'); insert into test_proxima_be_restart_with_inc_stage values(1012, 'name1012', 1022.111, 101200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1012]'); insert into test_proxima_be_restart_with_inc_stage values(1013, 'name1013', 1023.111, 101300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1013]'); insert into test_proxima_be_restart_with_inc_stage values(1014, 'name1014', 1024.111, 101400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1014]'); insert into test_proxima_be_restart_with_inc_stage values(1015, 'name1015', 1025.111, 101500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1015]'); insert into test_proxima_be_restart_with_inc_stage values(1016, 'name1016', 1026.111, 101600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1016]'); insert into test_proxima_be_restart_with_inc_stage values(1017, 'name1017', 1027.111, 101700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1017]'); insert into test_proxima_be_restart_with_inc_stage values(1018, 'name1018', 1028.111, 101800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1018]'); insert into test_proxima_be_restart_with_inc_stage values(1019, 'name1019', 1029.111, 101900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1019]'); insert into test_proxima_be_restart_with_inc_stage values(1020, 'name1020', 1030.111, 102000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1020]'); insert into test_proxima_be_restart_with_inc_stage values(1021, 'name1021', 1031.111, 102100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1021]'); insert into test_proxima_be_restart_with_inc_stage values(1022, 'name1022', 1032.111, 102200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1022]'); insert into test_proxima_be_restart_with_inc_stage values(1023, 'name1023', 1033.111, 102300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1023]'); insert into test_proxima_be_restart_with_inc_stage values(1024, 'name1024', 1034.111, 102400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1024]'); insert into test_proxima_be_restart_with_inc_stage values(1025, 'name1025', 1035.111, 102500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1025]'); insert into test_proxima_be_restart_with_inc_stage values(1026, 'name1026', 1036.111, 102600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1026]'); insert into test_proxima_be_restart_with_inc_stage values(1027, 'name1027', 1037.111, 102700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1027]'); insert into test_proxima_be_restart_with_inc_stage values(1028, 'name1028', 1038.111, 102800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1028]'); insert into test_proxima_be_restart_with_inc_stage values(1029, 'name1029', 1039.111, 102900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1029]'); insert into test_proxima_be_restart_with_inc_stage values(1030, 'name1030', 1040.111, 103000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1030]'); insert into test_proxima_be_restart_with_inc_stage values(1031, 'name1031', 1041.111, 103100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1031]'); insert into test_proxima_be_restart_with_inc_stage values(1032, 'name1032', 1042.111, 103200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1032]'); insert into test_proxima_be_restart_with_inc_stage values(1033, 'name1033', 1043.111, 103300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1033]'); insert into test_proxima_be_restart_with_inc_stage values(1034, 'name1034', 1044.111, 103400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1034]'); insert into test_proxima_be_restart_with_inc_stage values(1035, 'name1035', 1045.111, 103500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1035]'); insert into test_proxima_be_restart_with_inc_stage values(1036, 'name1036', 1046.111, 103600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1036]'); insert into test_proxima_be_restart_with_inc_stage values(1037, 'name1037', 1047.111, 103700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1037]'); insert into test_proxima_be_restart_with_inc_stage values(1038, 'name1038', 1048.111, 103800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1038]'); insert into test_proxima_be_restart_with_inc_stage values(1039, 'name1039', 1049.111, 103900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1039]'); insert into test_proxima_be_restart_with_inc_stage values(1040, 'name1040', 1050.111, 104000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1040]'); insert into test_proxima_be_restart_with_inc_stage values(1041, 'name1041', 1051.111, 104100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1041]'); insert into test_proxima_be_restart_with_inc_stage values(1042, 'name1042', 1052.111, 104200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1042]'); insert into test_proxima_be_restart_with_inc_stage values(1043, 'name1043', 1053.111, 104300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1043]'); insert into test_proxima_be_restart_with_inc_stage values(1044, 'name1044', 1054.111, 104400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1044]'); insert into test_proxima_be_restart_with_inc_stage values(1045, 'name1045', 1055.111, 104500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1045]'); insert into test_proxima_be_restart_with_inc_stage values(1046, 'name1046', 1056.111, 104600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1046]'); insert into test_proxima_be_restart_with_inc_stage values(1047, 'name1047', 1057.111, 104700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1047]'); insert into test_proxima_be_restart_with_inc_stage values(1048, 'name1048', 1058.111, 104800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1048]'); insert into test_proxima_be_restart_with_inc_stage values(1049, 'name1049', 1059.111, 104900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1049]'); insert into test_proxima_be_restart_with_inc_stage values(1050, 'name1050', 1060.111, 105000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1050]'); insert into test_proxima_be_restart_with_inc_stage values(1051, 'name1051', 1061.111, 105100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1051]'); insert into test_proxima_be_restart_with_inc_stage values(1052, 'name1052', 1062.111, 105200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1052]'); insert into test_proxima_be_restart_with_inc_stage values(1053, 'name1053', 1063.111, 105300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1053]'); insert into test_proxima_be_restart_with_inc_stage values(1054, 'name1054', 1064.111, 105400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1054]'); insert into test_proxima_be_restart_with_inc_stage values(1055, 'name1055', 1065.111, 105500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1055]'); insert into test_proxima_be_restart_with_inc_stage values(1056, 'name1056', 1066.111, 105600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1056]'); insert into test_proxima_be_restart_with_inc_stage values(1057, 'name1057', 1067.111, 105700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1057]'); insert into test_proxima_be_restart_with_inc_stage values(1058, 'name1058', 1068.111, 105800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1058]'); insert into test_proxima_be_restart_with_inc_stage values(1059, 'name1059', 1069.111, 105900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1059]'); insert into test_proxima_be_restart_with_inc_stage values(1060, 'name1060', 1070.111, 106000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1060]'); insert into test_proxima_be_restart_with_inc_stage values(1061, 'name1061', 1071.111, 106100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1061]'); insert into test_proxima_be_restart_with_inc_stage values(1062, 'name1062', 1072.111, 106200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1062]'); insert into test_proxima_be_restart_with_inc_stage values(1063, 'name1063', 1073.111, 106300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1063]'); insert into test_proxima_be_restart_with_inc_stage values(1064, 'name1064', 1074.111, 106400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1064]'); insert into test_proxima_be_restart_with_inc_stage values(1065, 'name1065', 1075.111, 106500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1065]'); insert into test_proxima_be_restart_with_inc_stage values(1066, 'name1066', 1076.111, 106600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1066]'); insert into test_proxima_be_restart_with_inc_stage values(1067, 'name1067', 1077.111, 106700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1067]'); insert into test_proxima_be_restart_with_inc_stage values(1068, 'name1068', 1078.111, 106800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1068]'); insert into test_proxima_be_restart_with_inc_stage values(1069, 'name1069', 1079.111, 106900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1069]'); insert into test_proxima_be_restart_with_inc_stage values(1070, 'name1070', 1080.111, 107000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1070]'); insert into test_proxima_be_restart_with_inc_stage values(1071, 'name1071', 1081.111, 107100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1071]'); insert into test_proxima_be_restart_with_inc_stage values(1072, 'name1072', 1082.111, 107200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1072]'); insert into test_proxima_be_restart_with_inc_stage values(1073, 'name1073', 1083.111, 107300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1073]'); insert into test_proxima_be_restart_with_inc_stage values(1074, 'name1074', 1084.111, 107400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1074]'); insert into test_proxima_be_restart_with_inc_stage values(1075, 'name1075', 1085.111, 107500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1075]'); insert into test_proxima_be_restart_with_inc_stage values(1076, 'name1076', 1086.111, 107600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1076]'); insert into test_proxima_be_restart_with_inc_stage values(1077, 'name1077', 1087.111, 107700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1077]'); insert into test_proxima_be_restart_with_inc_stage values(1078, 'name1078', 1088.111, 107800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1078]'); insert into test_proxima_be_restart_with_inc_stage values(1079, 'name1079', 1089.111, 107900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1079]'); insert into test_proxima_be_restart_with_inc_stage values(1080, 'name1080', 1090.111, 108000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1080]'); insert into test_proxima_be_restart_with_inc_stage values(1081, 'name1081', 1091.111, 108100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1081]'); insert into test_proxima_be_restart_with_inc_stage values(1082, 'name1082', 1092.111, 108200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1082]'); insert into test_proxima_be_restart_with_inc_stage values(1083, 'name1083', 1093.111, 108300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1083]'); insert into test_proxima_be_restart_with_inc_stage values(1084, 'name1084', 1094.111, 108400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1084]'); insert into test_proxima_be_restart_with_inc_stage values(1085, 'name1085', 1095.111, 108500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1085]'); insert into test_proxima_be_restart_with_inc_stage values(1086, 'name1086', 1096.111, 108600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1086]'); insert into test_proxima_be_restart_with_inc_stage values(1087, 'name1087', 1097.111, 108700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1087]'); insert into test_proxima_be_restart_with_inc_stage values(1088, 'name1088', 1098.111, 108800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1088]'); insert into test_proxima_be_restart_with_inc_stage values(1089, 'name1089', 1099.111, 108900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1089]'); insert into test_proxima_be_restart_with_inc_stage values(1090, 'name1090', 1100.111, 109000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1090]'); insert into test_proxima_be_restart_with_inc_stage values(1091, 'name1091', 1101.111, 109100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1091]'); insert into test_proxima_be_restart_with_inc_stage values(1092, 'name1092', 1102.111, 109200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1092]'); insert into test_proxima_be_restart_with_inc_stage values(1093, 'name1093', 1103.111, 109300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1093]'); insert into test_proxima_be_restart_with_inc_stage values(1094, 'name1094', 1104.111, 109400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1094]'); insert into test_proxima_be_restart_with_inc_stage values(1095, 'name1095', 1105.111, 109500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1095]'); insert into test_proxima_be_restart_with_inc_stage values(1096, 'name1096', 1106.111, 109600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1096]'); insert into test_proxima_be_restart_with_inc_stage values(1097, 'name1097', 1107.111, 109700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1097]'); insert into test_proxima_be_restart_with_inc_stage values(1098, 'name1098', 1108.111, 109800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1098]'); insert into test_proxima_be_restart_with_inc_stage values(1099, 'name1099', 1109.111, 109900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1099]'); insert into test_proxima_be_restart_with_inc_stage values(1100, 'name1100', 1110.111, 110000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1100]'); insert into test_proxima_be_restart_with_inc_stage values(1101, 'name1101', 1111.111, 110100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1101]'); insert into test_proxima_be_restart_with_inc_stage values(1102, 'name1102', 1112.111, 110200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1102]'); insert into test_proxima_be_restart_with_inc_stage values(1103, 'name1103', 1113.111, 110300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1103]'); insert into test_proxima_be_restart_with_inc_stage values(1104, 'name1104', 1114.111, 110400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1104]'); insert into test_proxima_be_restart_with_inc_stage values(1105, 'name1105', 1115.111, 110500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1105]'); insert into test_proxima_be_restart_with_inc_stage values(1106, 'name1106', 1116.111, 110600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1106]'); insert into test_proxima_be_restart_with_inc_stage values(1107, 'name1107', 1117.111, 110700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1107]'); insert into test_proxima_be_restart_with_inc_stage values(1108, 'name1108', 1118.111, 110800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1108]'); insert into test_proxima_be_restart_with_inc_stage values(1109, 'name1109', 1119.111, 110900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1109]'); insert into test_proxima_be_restart_with_inc_stage values(1110, 'name1110', 1120.111, 111000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1110]'); insert into test_proxima_be_restart_with_inc_stage values(1111, 'name1111', 1121.111, 111100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1111]'); insert into test_proxima_be_restart_with_inc_stage values(1112, 'name1112', 1122.111, 111200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1112]'); insert into test_proxima_be_restart_with_inc_stage values(1113, 'name1113', 1123.111, 111300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1113]'); insert into test_proxima_be_restart_with_inc_stage values(1114, 'name1114', 1124.111, 111400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1114]'); insert into test_proxima_be_restart_with_inc_stage values(1115, 'name1115', 1125.111, 111500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1115]'); insert into test_proxima_be_restart_with_inc_stage values(1116, 'name1116', 1126.111, 111600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1116]'); insert into test_proxima_be_restart_with_inc_stage values(1117, 'name1117', 1127.111, 111700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1117]'); insert into test_proxima_be_restart_with_inc_stage values(1118, 'name1118', 1128.111, 111800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1118]'); insert into test_proxima_be_restart_with_inc_stage values(1119, 'name1119', 1129.111, 111900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1119]'); insert into test_proxima_be_restart_with_inc_stage values(1120, 'name1120', 1130.111, 112000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1120]'); insert into test_proxima_be_restart_with_inc_stage values(1121, 'name1121', 1131.111, 112100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1121]'); insert into test_proxima_be_restart_with_inc_stage values(1122, 'name1122', 1132.111, 112200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1122]'); insert into test_proxima_be_restart_with_inc_stage values(1123, 'name1123', 1133.111, 112300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1123]'); insert into test_proxima_be_restart_with_inc_stage values(1124, 'name1124', 1134.111, 112400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1124]'); insert into test_proxima_be_restart_with_inc_stage values(1125, 'name1125', 1135.111, 112500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1125]'); insert into test_proxima_be_restart_with_inc_stage values(1126, 'name1126', 1136.111, 112600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1126]'); insert into test_proxima_be_restart_with_inc_stage values(1127, 'name1127', 1137.111, 112700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1127]'); insert into test_proxima_be_restart_with_inc_stage values(1128, 'name1128', 1138.111, 112800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1128]'); insert into test_proxima_be_restart_with_inc_stage values(1129, 'name1129', 1139.111, 112900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1129]'); insert into test_proxima_be_restart_with_inc_stage values(1130, 'name1130', 1140.111, 113000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1130]'); insert into test_proxima_be_restart_with_inc_stage values(1131, 'name1131', 1141.111, 113100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1131]'); insert into test_proxima_be_restart_with_inc_stage values(1132, 'name1132', 1142.111, 113200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1132]'); insert into test_proxima_be_restart_with_inc_stage values(1133, 'name1133', 1143.111, 113300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1133]'); insert into test_proxima_be_restart_with_inc_stage values(1134, 'name1134', 1144.111, 113400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1134]'); insert into test_proxima_be_restart_with_inc_stage values(1135, 'name1135', 1145.111, 113500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1135]'); insert into test_proxima_be_restart_with_inc_stage values(1136, 'name1136', 1146.111, 113600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1136]'); insert into test_proxima_be_restart_with_inc_stage values(1137, 'name1137', 1147.111, 113700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1137]'); insert into test_proxima_be_restart_with_inc_stage values(1138, 'name1138', 1148.111, 113800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1138]'); insert into test_proxima_be_restart_with_inc_stage values(1139, 'name1139', 1149.111, 113900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1139]'); insert into test_proxima_be_restart_with_inc_stage values(1140, 'name1140', 1150.111, 114000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1140]'); insert into test_proxima_be_restart_with_inc_stage values(1141, 'name1141', 1151.111, 114100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1141]'); insert into test_proxima_be_restart_with_inc_stage values(1142, 'name1142', 1152.111, 114200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1142]'); insert into test_proxima_be_restart_with_inc_stage values(1143, 'name1143', 1153.111, 114300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1143]'); insert into test_proxima_be_restart_with_inc_stage values(1144, 'name1144', 1154.111, 114400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1144]'); insert into test_proxima_be_restart_with_inc_stage values(1145, 'name1145', 1155.111, 114500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1145]'); insert into test_proxima_be_restart_with_inc_stage values(1146, 'name1146', 1156.111, 114600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1146]'); insert into test_proxima_be_restart_with_inc_stage values(1147, 'name1147', 1157.111, 114700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1147]'); insert into test_proxima_be_restart_with_inc_stage values(1148, 'name1148', 1158.111, 114800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1148]'); insert into test_proxima_be_restart_with_inc_stage values(1149, 'name1149', 1159.111, 114900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1149]'); insert into test_proxima_be_restart_with_inc_stage values(1150, 'name1150', 1160.111, 115000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1150]'); insert into test_proxima_be_restart_with_inc_stage values(1151, 'name1151', 1161.111, 115100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1151]'); insert into test_proxima_be_restart_with_inc_stage values(1152, 'name1152', 1162.111, 115200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1152]'); insert into test_proxima_be_restart_with_inc_stage values(1153, 'name1153', 1163.111, 115300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1153]'); insert into test_proxima_be_restart_with_inc_stage values(1154, 'name1154', 1164.111, 115400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1154]'); insert into test_proxima_be_restart_with_inc_stage values(1155, 'name1155', 1165.111, 115500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1155]'); insert into test_proxima_be_restart_with_inc_stage values(1156, 'name1156', 1166.111, 115600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1156]'); insert into test_proxima_be_restart_with_inc_stage values(1157, 'name1157', 1167.111, 115700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1157]'); insert into test_proxima_be_restart_with_inc_stage values(1158, 'name1158', 1168.111, 115800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1158]'); insert into test_proxima_be_restart_with_inc_stage values(1159, 'name1159', 1169.111, 115900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1159]'); insert into test_proxima_be_restart_with_inc_stage values(1160, 'name1160', 1170.111, 116000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1160]'); insert into test_proxima_be_restart_with_inc_stage values(1161, 'name1161', 1171.111, 116100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1161]'); insert into test_proxima_be_restart_with_inc_stage values(1162, 'name1162', 1172.111, 116200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1162]'); insert into test_proxima_be_restart_with_inc_stage values(1163, 'name1163', 1173.111, 116300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1163]'); insert into test_proxima_be_restart_with_inc_stage values(1164, 'name1164', 1174.111, 116400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1164]'); insert into test_proxima_be_restart_with_inc_stage values(1165, 'name1165', 1175.111, 116500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1165]'); insert into test_proxima_be_restart_with_inc_stage values(1166, 'name1166', 1176.111, 116600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1166]'); insert into test_proxima_be_restart_with_inc_stage values(1167, 'name1167', 1177.111, 116700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1167]'); insert into test_proxima_be_restart_with_inc_stage values(1168, 'name1168', 1178.111, 116800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1168]'); insert into test_proxima_be_restart_with_inc_stage values(1169, 'name1169', 1179.111, 116900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1169]'); insert into test_proxima_be_restart_with_inc_stage values(1170, 'name1170', 1180.111, 117000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1170]'); insert into test_proxima_be_restart_with_inc_stage values(1171, 'name1171', 1181.111, 117100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1171]'); insert into test_proxima_be_restart_with_inc_stage values(1172, 'name1172', 1182.111, 117200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1172]'); insert into test_proxima_be_restart_with_inc_stage values(1173, 'name1173', 1183.111, 117300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1173]'); insert into test_proxima_be_restart_with_inc_stage values(1174, 'name1174', 1184.111, 117400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1174]'); insert into test_proxima_be_restart_with_inc_stage values(1175, 'name1175', 1185.111, 117500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1175]'); insert into test_proxima_be_restart_with_inc_stage values(1176, 'name1176', 1186.111, 117600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1176]'); insert into test_proxima_be_restart_with_inc_stage values(1177, 'name1177', 1187.111, 117700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1177]'); insert into test_proxima_be_restart_with_inc_stage values(1178, 'name1178', 1188.111, 117800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1178]'); insert into test_proxima_be_restart_with_inc_stage values(1179, 'name1179', 1189.111, 117900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1179]'); insert into test_proxima_be_restart_with_inc_stage values(1180, 'name1180', 1190.111, 118000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1180]'); insert into test_proxima_be_restart_with_inc_stage values(1181, 'name1181', 1191.111, 118100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1181]'); insert into test_proxima_be_restart_with_inc_stage values(1182, 'name1182', 1192.111, 118200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1182]'); insert into test_proxima_be_restart_with_inc_stage values(1183, 'name1183', 1193.111, 118300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1183]'); insert into test_proxima_be_restart_with_inc_stage values(1184, 'name1184', 1194.111, 118400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1184]'); insert into test_proxima_be_restart_with_inc_stage values(1185, 'name1185', 1195.111, 118500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1185]'); insert into test_proxima_be_restart_with_inc_stage values(1186, 'name1186', 1196.111, 118600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1186]'); insert into test_proxima_be_restart_with_inc_stage values(1187, 'name1187', 1197.111, 118700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1187]'); insert into test_proxima_be_restart_with_inc_stage values(1188, 'name1188', 1198.111, 118800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1188]'); insert into test_proxima_be_restart_with_inc_stage values(1189, 'name1189', 1199.111, 118900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1189]'); insert into test_proxima_be_restart_with_inc_stage values(1190, 'name1190', 1200.111, 119000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1190]'); insert into test_proxima_be_restart_with_inc_stage values(1191, 'name1191', 1201.111, 119100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1191]'); insert into test_proxima_be_restart_with_inc_stage values(1192, 'name1192', 1202.111, 119200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1192]'); insert into test_proxima_be_restart_with_inc_stage values(1193, 'name1193', 1203.111, 119300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1193]'); insert into test_proxima_be_restart_with_inc_stage values(1194, 'name1194', 1204.111, 119400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1194]'); insert into test_proxima_be_restart_with_inc_stage values(1195, 'name1195', 1205.111, 119500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1195]'); insert into test_proxima_be_restart_with_inc_stage values(1196, 'name1196', 1206.111, 119600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1196]'); insert into test_proxima_be_restart_with_inc_stage values(1197, 'name1197', 1207.111, 119700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1197]'); insert into test_proxima_be_restart_with_inc_stage values(1198, 'name1198', 1208.111, 119800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1198]'); insert into test_proxima_be_restart_with_inc_stage values(1199, 'name1199', 1209.111, 119900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1199]'); insert into test_proxima_be_restart_with_inc_stage values(1200, 'name1200', 1210.111, 120000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1200]'); insert into test_proxima_be_restart_with_inc_stage values(1201, 'name1201', 1211.111, 120100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1201]'); insert into test_proxima_be_restart_with_inc_stage values(1202, 'name1202', 1212.111, 120200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1202]'); insert into test_proxima_be_restart_with_inc_stage values(1203, 'name1203', 1213.111, 120300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1203]'); insert into test_proxima_be_restart_with_inc_stage values(1204, 'name1204', 1214.111, 120400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1204]'); insert into test_proxima_be_restart_with_inc_stage values(1205, 'name1205', 1215.111, 120500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1205]'); insert into test_proxima_be_restart_with_inc_stage values(1206, 'name1206', 1216.111, 120600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1206]'); insert into test_proxima_be_restart_with_inc_stage values(1207, 'name1207', 1217.111, 120700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1207]'); insert into test_proxima_be_restart_with_inc_stage values(1208, 'name1208', 1218.111, 120800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1208]'); insert into test_proxima_be_restart_with_inc_stage values(1209, 'name1209', 1219.111, 120900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1209]'); insert into test_proxima_be_restart_with_inc_stage values(1210, 'name1210', 1220.111, 121000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1210]'); insert into test_proxima_be_restart_with_inc_stage values(1211, 'name1211', 1221.111, 121100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1211]'); insert into test_proxima_be_restart_with_inc_stage values(1212, 'name1212', 1222.111, 121200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1212]'); insert into test_proxima_be_restart_with_inc_stage values(1213, 'name1213', 1223.111, 121300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1213]'); insert into test_proxima_be_restart_with_inc_stage values(1214, 'name1214', 1224.111, 121400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1214]'); insert into test_proxima_be_restart_with_inc_stage values(1215, 'name1215', 1225.111, 121500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1215]'); insert into test_proxima_be_restart_with_inc_stage values(1216, 'name1216', 1226.111, 121600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1216]'); insert into test_proxima_be_restart_with_inc_stage values(1217, 'name1217', 1227.111, 121700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1217]'); insert into test_proxima_be_restart_with_inc_stage values(1218, 'name1218', 1228.111, 121800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1218]'); insert into test_proxima_be_restart_with_inc_stage values(1219, 'name1219', 1229.111, 121900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1219]'); insert into test_proxima_be_restart_with_inc_stage values(1220, 'name1220', 1230.111, 122000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1220]'); insert into test_proxima_be_restart_with_inc_stage values(1221, 'name1221', 1231.111, 122100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1221]'); insert into test_proxima_be_restart_with_inc_stage values(1222, 'name1222', 1232.111, 122200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1222]'); insert into test_proxima_be_restart_with_inc_stage values(1223, 'name1223', 1233.111, 122300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1223]'); insert into test_proxima_be_restart_with_inc_stage values(1224, 'name1224', 1234.111, 122400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1224]'); insert into test_proxima_be_restart_with_inc_stage values(1225, 'name1225', 1235.111, 122500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1225]'); insert into test_proxima_be_restart_with_inc_stage values(1226, 'name1226', 1236.111, 122600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1226]'); insert into test_proxima_be_restart_with_inc_stage values(1227, 'name1227', 1237.111, 122700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1227]'); insert into test_proxima_be_restart_with_inc_stage values(1228, 'name1228', 1238.111, 122800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1228]'); insert into test_proxima_be_restart_with_inc_stage values(1229, 'name1229', 1239.111, 122900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1229]'); insert into test_proxima_be_restart_with_inc_stage values(1230, 'name1230', 1240.111, 123000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1230]'); insert into test_proxima_be_restart_with_inc_stage values(1231, 'name1231', 1241.111, 123100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1231]'); insert into test_proxima_be_restart_with_inc_stage values(1232, 'name1232', 1242.111, 123200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1232]'); insert into test_proxima_be_restart_with_inc_stage values(1233, 'name1233', 1243.111, 123300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1233]'); insert into test_proxima_be_restart_with_inc_stage values(1234, 'name1234', 1244.111, 123400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1234]'); insert into test_proxima_be_restart_with_inc_stage values(1235, 'name1235', 1245.111, 123500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1235]'); insert into test_proxima_be_restart_with_inc_stage values(1236, 'name1236', 1246.111, 123600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1236]'); insert into test_proxima_be_restart_with_inc_stage values(1237, 'name1237', 1247.111, 123700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1237]'); insert into test_proxima_be_restart_with_inc_stage values(1238, 'name1238', 1248.111, 123800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1238]'); insert into test_proxima_be_restart_with_inc_stage values(1239, 'name1239', 1249.111, 123900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1239]'); insert into test_proxima_be_restart_with_inc_stage values(1240, 'name1240', 1250.111, 124000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1240]'); insert into test_proxima_be_restart_with_inc_stage values(1241, 'name1241', 1251.111, 124100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1241]'); insert into test_proxima_be_restart_with_inc_stage values(1242, 'name1242', 1252.111, 124200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1242]'); insert into test_proxima_be_restart_with_inc_stage values(1243, 'name1243', 1253.111, 124300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1243]'); insert into test_proxima_be_restart_with_inc_stage values(1244, 'name1244', 1254.111, 124400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1244]'); insert into test_proxima_be_restart_with_inc_stage values(1245, 'name1245', 1255.111, 124500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1245]'); insert into test_proxima_be_restart_with_inc_stage values(1246, 'name1246', 1256.111, 124600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1246]'); insert into test_proxima_be_restart_with_inc_stage values(1247, 'name1247', 1257.111, 124700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1247]'); insert into test_proxima_be_restart_with_inc_stage values(1248, 'name1248', 1258.111, 124800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1248]'); insert into test_proxima_be_restart_with_inc_stage values(1249, 'name1249', 1259.111, 124900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1249]'); insert into test_proxima_be_restart_with_inc_stage values(1250, 'name1250', 1260.111, 125000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1250]'); insert into test_proxima_be_restart_with_inc_stage values(1251, 'name1251', 1261.111, 125100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1251]'); insert into test_proxima_be_restart_with_inc_stage values(1252, 'name1252', 1262.111, 125200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1252]'); insert into test_proxima_be_restart_with_inc_stage values(1253, 'name1253', 1263.111, 125300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1253]'); insert into test_proxima_be_restart_with_inc_stage values(1254, 'name1254', 1264.111, 125400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1254]'); insert into test_proxima_be_restart_with_inc_stage values(1255, 'name1255', 1265.111, 125500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1255]'); insert into test_proxima_be_restart_with_inc_stage values(1256, 'name1256', 1266.111, 125600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1256]'); insert into test_proxima_be_restart_with_inc_stage values(1257, 'name1257', 1267.111, 125700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1257]'); insert into test_proxima_be_restart_with_inc_stage values(1258, 'name1258', 1268.111, 125800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1258]'); insert into test_proxima_be_restart_with_inc_stage values(1259, 'name1259', 1269.111, 125900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1259]'); insert into test_proxima_be_restart_with_inc_stage values(1260, 'name1260', 1270.111, 126000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1260]'); insert into test_proxima_be_restart_with_inc_stage values(1261, 'name1261', 1271.111, 126100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1261]'); insert into test_proxima_be_restart_with_inc_stage values(1262, 'name1262', 1272.111, 126200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1262]'); insert into test_proxima_be_restart_with_inc_stage values(1263, 'name1263', 1273.111, 126300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1263]'); insert into test_proxima_be_restart_with_inc_stage values(1264, 'name1264', 1274.111, 126400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1264]'); insert into test_proxima_be_restart_with_inc_stage values(1265, 'name1265', 1275.111, 126500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1265]'); insert into test_proxima_be_restart_with_inc_stage values(1266, 'name1266', 1276.111, 126600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1266]'); insert into test_proxima_be_restart_with_inc_stage values(1267, 'name1267', 1277.111, 126700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1267]'); insert into test_proxima_be_restart_with_inc_stage values(1268, 'name1268', 1278.111, 126800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1268]'); insert into test_proxima_be_restart_with_inc_stage values(1269, 'name1269', 1279.111, 126900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1269]'); insert into test_proxima_be_restart_with_inc_stage values(1270, 'name1270', 1280.111, 127000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1270]'); insert into test_proxima_be_restart_with_inc_stage values(1271, 'name1271', 1281.111, 127100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1271]'); insert into test_proxima_be_restart_with_inc_stage values(1272, 'name1272', 1282.111, 127200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1272]'); insert into test_proxima_be_restart_with_inc_stage values(1273, 'name1273', 1283.111, 127300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1273]'); insert into test_proxima_be_restart_with_inc_stage values(1274, 'name1274', 1284.111, 127400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1274]'); insert into test_proxima_be_restart_with_inc_stage values(1275, 'name1275', 1285.111, 127500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1275]'); insert into test_proxima_be_restart_with_inc_stage values(1276, 'name1276', 1286.111, 127600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1276]'); insert into test_proxima_be_restart_with_inc_stage values(1277, 'name1277', 1287.111, 127700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1277]'); insert into test_proxima_be_restart_with_inc_stage values(1278, 'name1278', 1288.111, 127800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1278]'); insert into test_proxima_be_restart_with_inc_stage values(1279, 'name1279', 1289.111, 127900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1279]'); insert into test_proxima_be_restart_with_inc_stage values(1280, 'name1280', 1290.111, 128000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1280]'); insert into test_proxima_be_restart_with_inc_stage values(1281, 'name1281', 1291.111, 128100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1281]'); insert into test_proxima_be_restart_with_inc_stage values(1282, 'name1282', 1292.111, 128200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1282]'); insert into test_proxima_be_restart_with_inc_stage values(1283, 'name1283', 1293.111, 128300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1283]'); insert into test_proxima_be_restart_with_inc_stage values(1284, 'name1284', 1294.111, 128400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1284]'); insert into test_proxima_be_restart_with_inc_stage values(1285, 'name1285', 1295.111, 128500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1285]'); insert into test_proxima_be_restart_with_inc_stage values(1286, 'name1286', 1296.111, 128600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1286]'); insert into test_proxima_be_restart_with_inc_stage values(1287, 'name1287', 1297.111, 128700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1287]'); insert into test_proxima_be_restart_with_inc_stage values(1288, 'name1288', 1298.111, 128800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1288]'); insert into test_proxima_be_restart_with_inc_stage values(1289, 'name1289', 1299.111, 128900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1289]'); insert into test_proxima_be_restart_with_inc_stage values(1290, 'name1290', 1300.111, 129000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1290]'); insert into test_proxima_be_restart_with_inc_stage values(1291, 'name1291', 1301.111, 129100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1291]'); insert into test_proxima_be_restart_with_inc_stage values(1292, 'name1292', 1302.111, 129200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1292]'); insert into test_proxima_be_restart_with_inc_stage values(1293, 'name1293', 1303.111, 129300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1293]'); insert into test_proxima_be_restart_with_inc_stage values(1294, 'name1294', 1304.111, 129400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1294]'); insert into test_proxima_be_restart_with_inc_stage values(1295, 'name1295', 1305.111, 129500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1295]'); insert into test_proxima_be_restart_with_inc_stage values(1296, 'name1296', 1306.111, 129600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1296]'); insert into test_proxima_be_restart_with_inc_stage values(1297, 'name1297', 1307.111, 129700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1297]'); insert into test_proxima_be_restart_with_inc_stage values(1298, 'name1298', 1308.111, 129800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1298]'); insert into test_proxima_be_restart_with_inc_stage values(1299, 'name1299', 1309.111, 129900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1299]'); insert into test_proxima_be_restart_with_inc_stage values(1300, 'name1300', 1310.111, 130000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1300]'); insert into test_proxima_be_restart_with_inc_stage values(1301, 'name1301', 1311.111, 130100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1301]'); insert into test_proxima_be_restart_with_inc_stage values(1302, 'name1302', 1312.111, 130200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1302]'); insert into test_proxima_be_restart_with_inc_stage values(1303, 'name1303', 1313.111, 130300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1303]'); insert into test_proxima_be_restart_with_inc_stage values(1304, 'name1304', 1314.111, 130400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1304]'); insert into test_proxima_be_restart_with_inc_stage values(1305, 'name1305', 1315.111, 130500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1305]'); insert into test_proxima_be_restart_with_inc_stage values(1306, 'name1306', 1316.111, 130600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1306]'); insert into test_proxima_be_restart_with_inc_stage values(1307, 'name1307', 1317.111, 130700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1307]'); insert into test_proxima_be_restart_with_inc_stage values(1308, 'name1308', 1318.111, 130800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1308]'); insert into test_proxima_be_restart_with_inc_stage values(1309, 'name1309', 1319.111, 130900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1309]'); insert into test_proxima_be_restart_with_inc_stage values(1310, 'name1310', 1320.111, 131000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1310]'); insert into test_proxima_be_restart_with_inc_stage values(1311, 'name1311', 1321.111, 131100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1311]'); insert into test_proxima_be_restart_with_inc_stage values(1312, 'name1312', 1322.111, 131200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1312]'); insert into test_proxima_be_restart_with_inc_stage values(1313, 'name1313', 1323.111, 131300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1313]'); insert into test_proxima_be_restart_with_inc_stage values(1314, 'name1314', 1324.111, 131400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1314]'); insert into test_proxima_be_restart_with_inc_stage values(1315, 'name1315', 1325.111, 131500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1315]'); insert into test_proxima_be_restart_with_inc_stage values(1316, 'name1316', 1326.111, 131600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1316]'); insert into test_proxima_be_restart_with_inc_stage values(1317, 'name1317', 1327.111, 131700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1317]'); insert into test_proxima_be_restart_with_inc_stage values(1318, 'name1318', 1328.111, 131800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1318]'); insert into test_proxima_be_restart_with_inc_stage values(1319, 'name1319', 1329.111, 131900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1319]'); insert into test_proxima_be_restart_with_inc_stage values(1320, 'name1320', 1330.111, 132000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1320]'); insert into test_proxima_be_restart_with_inc_stage values(1321, 'name1321', 1331.111, 132100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1321]'); insert into test_proxima_be_restart_with_inc_stage values(1322, 'name1322', 1332.111, 132200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1322]'); insert into test_proxima_be_restart_with_inc_stage values(1323, 'name1323', 1333.111, 132300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1323]'); insert into test_proxima_be_restart_with_inc_stage values(1324, 'name1324', 1334.111, 132400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1324]'); insert into test_proxima_be_restart_with_inc_stage values(1325, 'name1325', 1335.111, 132500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1325]'); insert into test_proxima_be_restart_with_inc_stage values(1326, 'name1326', 1336.111, 132600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1326]'); insert into test_proxima_be_restart_with_inc_stage values(1327, 'name1327', 1337.111, 132700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1327]'); insert into test_proxima_be_restart_with_inc_stage values(1328, 'name1328', 1338.111, 132800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1328]'); insert into test_proxima_be_restart_with_inc_stage values(1329, 'name1329', 1339.111, 132900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1329]'); insert into test_proxima_be_restart_with_inc_stage values(1330, 'name1330', 1340.111, 133000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1330]'); insert into test_proxima_be_restart_with_inc_stage values(1331, 'name1331', 1341.111, 133100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1331]'); insert into test_proxima_be_restart_with_inc_stage values(1332, 'name1332', 1342.111, 133200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1332]'); insert into test_proxima_be_restart_with_inc_stage values(1333, 'name1333', 1343.111, 133300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1333]'); insert into test_proxima_be_restart_with_inc_stage values(1334, 'name1334', 1344.111, 133400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1334]'); insert into test_proxima_be_restart_with_inc_stage values(1335, 'name1335', 1345.111, 133500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1335]'); insert into test_proxima_be_restart_with_inc_stage values(1336, 'name1336', 1346.111, 133600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1336]'); insert into test_proxima_be_restart_with_inc_stage values(1337, 'name1337', 1347.111, 133700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1337]'); insert into test_proxima_be_restart_with_inc_stage values(1338, 'name1338', 1348.111, 133800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1338]'); insert into test_proxima_be_restart_with_inc_stage values(1339, 'name1339', 1349.111, 133900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1339]'); insert into test_proxima_be_restart_with_inc_stage values(1340, 'name1340', 1350.111, 134000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1340]'); insert into test_proxima_be_restart_with_inc_stage values(1341, 'name1341', 1351.111, 134100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1341]'); insert into test_proxima_be_restart_with_inc_stage values(1342, 'name1342', 1352.111, 134200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1342]'); insert into test_proxima_be_restart_with_inc_stage values(1343, 'name1343', 1353.111, 134300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1343]'); insert into test_proxima_be_restart_with_inc_stage values(1344, 'name1344', 1354.111, 134400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1344]'); insert into test_proxima_be_restart_with_inc_stage values(1345, 'name1345', 1355.111, 134500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1345]'); insert into test_proxima_be_restart_with_inc_stage values(1346, 'name1346', 1356.111, 134600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1346]'); insert into test_proxima_be_restart_with_inc_stage values(1347, 'name1347', 1357.111, 134700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1347]'); insert into test_proxima_be_restart_with_inc_stage values(1348, 'name1348', 1358.111, 134800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1348]'); insert into test_proxima_be_restart_with_inc_stage values(1349, 'name1349', 1359.111, 134900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1349]'); insert into test_proxima_be_restart_with_inc_stage values(1350, 'name1350', 1360.111, 135000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1350]'); insert into test_proxima_be_restart_with_inc_stage values(1351, 'name1351', 1361.111, 135100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1351]'); insert into test_proxima_be_restart_with_inc_stage values(1352, 'name1352', 1362.111, 135200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1352]'); insert into test_proxima_be_restart_with_inc_stage values(1353, 'name1353', 1363.111, 135300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1353]'); insert into test_proxima_be_restart_with_inc_stage values(1354, 'name1354', 1364.111, 135400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1354]'); insert into test_proxima_be_restart_with_inc_stage values(1355, 'name1355', 1365.111, 135500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1355]'); insert into test_proxima_be_restart_with_inc_stage values(1356, 'name1356', 1366.111, 135600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1356]'); insert into test_proxima_be_restart_with_inc_stage values(1357, 'name1357', 1367.111, 135700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1357]'); insert into test_proxima_be_restart_with_inc_stage values(1358, 'name1358', 1368.111, 135800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1358]'); insert into test_proxima_be_restart_with_inc_stage values(1359, 'name1359', 1369.111, 135900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1359]'); insert into test_proxima_be_restart_with_inc_stage values(1360, 'name1360', 1370.111, 136000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1360]'); insert into test_proxima_be_restart_with_inc_stage values(1361, 'name1361', 1371.111, 136100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1361]'); insert into test_proxima_be_restart_with_inc_stage values(1362, 'name1362', 1372.111, 136200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1362]'); insert into test_proxima_be_restart_with_inc_stage values(1363, 'name1363', 1373.111, 136300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1363]'); insert into test_proxima_be_restart_with_inc_stage values(1364, 'name1364', 1374.111, 136400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1364]'); insert into test_proxima_be_restart_with_inc_stage values(1365, 'name1365', 1375.111, 136500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1365]'); insert into test_proxima_be_restart_with_inc_stage values(1366, 'name1366', 1376.111, 136600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1366]'); insert into test_proxima_be_restart_with_inc_stage values(1367, 'name1367', 1377.111, 136700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1367]'); insert into test_proxima_be_restart_with_inc_stage values(1368, 'name1368', 1378.111, 136800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1368]'); insert into test_proxima_be_restart_with_inc_stage values(1369, 'name1369', 1379.111, 136900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1369]'); insert into test_proxima_be_restart_with_inc_stage values(1370, 'name1370', 1380.111, 137000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1370]'); insert into test_proxima_be_restart_with_inc_stage values(1371, 'name1371', 1381.111, 137100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1371]'); insert into test_proxima_be_restart_with_inc_stage values(1372, 'name1372', 1382.111, 137200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1372]'); insert into test_proxima_be_restart_with_inc_stage values(1373, 'name1373', 1383.111, 137300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1373]'); insert into test_proxima_be_restart_with_inc_stage values(1374, 'name1374', 1384.111, 137400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1374]'); insert into test_proxima_be_restart_with_inc_stage values(1375, 'name1375', 1385.111, 137500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1375]'); insert into test_proxima_be_restart_with_inc_stage values(1376, 'name1376', 1386.111, 137600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1376]'); insert into test_proxima_be_restart_with_inc_stage values(1377, 'name1377', 1387.111, 137700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1377]'); insert into test_proxima_be_restart_with_inc_stage values(1378, 'name1378', 1388.111, 137800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1378]'); insert into test_proxima_be_restart_with_inc_stage values(1379, 'name1379', 1389.111, 137900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1379]'); insert into test_proxima_be_restart_with_inc_stage values(1380, 'name1380', 1390.111, 138000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1380]'); insert into test_proxima_be_restart_with_inc_stage values(1381, 'name1381', 1391.111, 138100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1381]'); insert into test_proxima_be_restart_with_inc_stage values(1382, 'name1382', 1392.111, 138200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1382]'); insert into test_proxima_be_restart_with_inc_stage values(1383, 'name1383', 1393.111, 138300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1383]'); insert into test_proxima_be_restart_with_inc_stage values(1384, 'name1384', 1394.111, 138400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1384]'); insert into test_proxima_be_restart_with_inc_stage values(1385, 'name1385', 1395.111, 138500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1385]'); insert into test_proxima_be_restart_with_inc_stage values(1386, 'name1386', 1396.111, 138600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1386]'); insert into test_proxima_be_restart_with_inc_stage values(1387, 'name1387', 1397.111, 138700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1387]'); insert into test_proxima_be_restart_with_inc_stage values(1388, 'name1388', 1398.111, 138800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1388]'); insert into test_proxima_be_restart_with_inc_stage values(1389, 'name1389', 1399.111, 138900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1389]'); insert into test_proxima_be_restart_with_inc_stage values(1390, 'name1390', 1400.111, 139000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1390]'); insert into test_proxima_be_restart_with_inc_stage values(1391, 'name1391', 1401.111, 139100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1391]'); insert into test_proxima_be_restart_with_inc_stage values(1392, 'name1392', 1402.111, 139200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1392]'); insert into test_proxima_be_restart_with_inc_stage values(1393, 'name1393', 1403.111, 139300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1393]'); insert into test_proxima_be_restart_with_inc_stage values(1394, 'name1394', 1404.111, 139400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1394]'); insert into test_proxima_be_restart_with_inc_stage values(1395, 'name1395', 1405.111, 139500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1395]'); insert into test_proxima_be_restart_with_inc_stage values(1396, 'name1396', 1406.111, 139600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1396]'); insert into test_proxima_be_restart_with_inc_stage values(1397, 'name1397', 1407.111, 139700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1397]'); insert into test_proxima_be_restart_with_inc_stage values(1398, 'name1398', 1408.111, 139800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1398]'); insert into test_proxima_be_restart_with_inc_stage values(1399, 'name1399', 1409.111, 139900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1399]'); insert into test_proxima_be_restart_with_inc_stage values(1400, 'name1400', 1410.111, 140000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1400]'); insert into test_proxima_be_restart_with_inc_stage values(1401, 'name1401', 1411.111, 140100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1401]'); insert into test_proxima_be_restart_with_inc_stage values(1402, 'name1402', 1412.111, 140200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1402]'); insert into test_proxima_be_restart_with_inc_stage values(1403, 'name1403', 1413.111, 140300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1403]'); insert into test_proxima_be_restart_with_inc_stage values(1404, 'name1404', 1414.111, 140400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1404]'); insert into test_proxima_be_restart_with_inc_stage values(1405, 'name1405', 1415.111, 140500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1405]'); insert into test_proxima_be_restart_with_inc_stage values(1406, 'name1406', 1416.111, 140600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1406]'); insert into test_proxima_be_restart_with_inc_stage values(1407, 'name1407', 1417.111, 140700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1407]'); insert into test_proxima_be_restart_with_inc_stage values(1408, 'name1408', 1418.111, 140800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1408]'); insert into test_proxima_be_restart_with_inc_stage values(1409, 'name1409', 1419.111, 140900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1409]'); insert into test_proxima_be_restart_with_inc_stage values(1410, 'name1410', 1420.111, 141000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1410]'); insert into test_proxima_be_restart_with_inc_stage values(1411, 'name1411', 1421.111, 141100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1411]'); insert into test_proxima_be_restart_with_inc_stage values(1412, 'name1412', 1422.111, 141200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1412]'); insert into test_proxima_be_restart_with_inc_stage values(1413, 'name1413', 1423.111, 141300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1413]'); insert into test_proxima_be_restart_with_inc_stage values(1414, 'name1414', 1424.111, 141400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1414]'); insert into test_proxima_be_restart_with_inc_stage values(1415, 'name1415', 1425.111, 141500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1415]'); insert into test_proxima_be_restart_with_inc_stage values(1416, 'name1416', 1426.111, 141600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1416]'); insert into test_proxima_be_restart_with_inc_stage values(1417, 'name1417', 1427.111, 141700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1417]'); insert into test_proxima_be_restart_with_inc_stage values(1418, 'name1418', 1428.111, 141800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1418]'); insert into test_proxima_be_restart_with_inc_stage values(1419, 'name1419', 1429.111, 141900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1419]'); insert into test_proxima_be_restart_with_inc_stage values(1420, 'name1420', 1430.111, 142000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1420]'); insert into test_proxima_be_restart_with_inc_stage values(1421, 'name1421', 1431.111, 142100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1421]'); insert into test_proxima_be_restart_with_inc_stage values(1422, 'name1422', 1432.111, 142200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1422]'); insert into test_proxima_be_restart_with_inc_stage values(1423, 'name1423', 1433.111, 142300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1423]'); insert into test_proxima_be_restart_with_inc_stage values(1424, 'name1424', 1434.111, 142400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1424]'); insert into test_proxima_be_restart_with_inc_stage values(1425, 'name1425', 1435.111, 142500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1425]'); insert into test_proxima_be_restart_with_inc_stage values(1426, 'name1426', 1436.111, 142600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1426]'); insert into test_proxima_be_restart_with_inc_stage values(1427, 'name1427', 1437.111, 142700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1427]'); insert into test_proxima_be_restart_with_inc_stage values(1428, 'name1428', 1438.111, 142800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1428]'); insert into test_proxima_be_restart_with_inc_stage values(1429, 'name1429', 1439.111, 142900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1429]'); insert into test_proxima_be_restart_with_inc_stage values(1430, 'name1430', 1440.111, 143000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1430]'); insert into test_proxima_be_restart_with_inc_stage values(1431, 'name1431', 1441.111, 143100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1431]'); insert into test_proxima_be_restart_with_inc_stage values(1432, 'name1432', 1442.111, 143200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1432]'); insert into test_proxima_be_restart_with_inc_stage values(1433, 'name1433', 1443.111, 143300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1433]'); insert into test_proxima_be_restart_with_inc_stage values(1434, 'name1434', 1444.111, 143400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1434]'); insert into test_proxima_be_restart_with_inc_stage values(1435, 'name1435', 1445.111, 143500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1435]'); insert into test_proxima_be_restart_with_inc_stage values(1436, 'name1436', 1446.111, 143600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1436]'); insert into test_proxima_be_restart_with_inc_stage values(1437, 'name1437', 1447.111, 143700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1437]'); insert into test_proxima_be_restart_with_inc_stage values(1438, 'name1438', 1448.111, 143800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1438]'); insert into test_proxima_be_restart_with_inc_stage values(1439, 'name1439', 1449.111, 143900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1439]'); insert into test_proxima_be_restart_with_inc_stage values(1440, 'name1440', 1450.111, 144000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1440]'); insert into test_proxima_be_restart_with_inc_stage values(1441, 'name1441', 1451.111, 144100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1441]'); insert into test_proxima_be_restart_with_inc_stage values(1442, 'name1442', 1452.111, 144200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1442]'); insert into test_proxima_be_restart_with_inc_stage values(1443, 'name1443', 1453.111, 144300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1443]'); insert into test_proxima_be_restart_with_inc_stage values(1444, 'name1444', 1454.111, 144400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1444]'); insert into test_proxima_be_restart_with_inc_stage values(1445, 'name1445', 1455.111, 144500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1445]'); insert into test_proxima_be_restart_with_inc_stage values(1446, 'name1446', 1456.111, 144600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1446]'); insert into test_proxima_be_restart_with_inc_stage values(1447, 'name1447', 1457.111, 144700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1447]'); insert into test_proxima_be_restart_with_inc_stage values(1448, 'name1448', 1458.111, 144800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1448]'); insert into test_proxima_be_restart_with_inc_stage values(1449, 'name1449', 1459.111, 144900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1449]'); insert into test_proxima_be_restart_with_inc_stage values(1450, 'name1450', 1460.111, 145000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1450]'); insert into test_proxima_be_restart_with_inc_stage values(1451, 'name1451', 1461.111, 145100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1451]'); insert into test_proxima_be_restart_with_inc_stage values(1452, 'name1452', 1462.111, 145200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1452]'); insert into test_proxima_be_restart_with_inc_stage values(1453, 'name1453', 1463.111, 145300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1453]'); insert into test_proxima_be_restart_with_inc_stage values(1454, 'name1454', 1464.111, 145400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1454]'); insert into test_proxima_be_restart_with_inc_stage values(1455, 'name1455', 1465.111, 145500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1455]'); insert into test_proxima_be_restart_with_inc_stage values(1456, 'name1456', 1466.111, 145600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1456]'); insert into test_proxima_be_restart_with_inc_stage values(1457, 'name1457', 1467.111, 145700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1457]'); insert into test_proxima_be_restart_with_inc_stage values(1458, 'name1458', 1468.111, 145800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1458]'); insert into test_proxima_be_restart_with_inc_stage values(1459, 'name1459', 1469.111, 145900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1459]'); insert into test_proxima_be_restart_with_inc_stage values(1460, 'name1460', 1470.111, 146000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1460]'); insert into test_proxima_be_restart_with_inc_stage values(1461, 'name1461', 1471.111, 146100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1461]'); insert into test_proxima_be_restart_with_inc_stage values(1462, 'name1462', 1472.111, 146200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1462]'); insert into test_proxima_be_restart_with_inc_stage values(1463, 'name1463', 1473.111, 146300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1463]'); insert into test_proxima_be_restart_with_inc_stage values(1464, 'name1464', 1474.111, 146400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1464]'); insert into test_proxima_be_restart_with_inc_stage values(1465, 'name1465', 1475.111, 146500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1465]'); insert into test_proxima_be_restart_with_inc_stage values(1466, 'name1466', 1476.111, 146600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1466]'); insert into test_proxima_be_restart_with_inc_stage values(1467, 'name1467', 1477.111, 146700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1467]'); insert into test_proxima_be_restart_with_inc_stage values(1468, 'name1468', 1478.111, 146800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1468]'); insert into test_proxima_be_restart_with_inc_stage values(1469, 'name1469', 1479.111, 146900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1469]'); insert into test_proxima_be_restart_with_inc_stage values(1470, 'name1470', 1480.111, 147000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1470]'); insert into test_proxima_be_restart_with_inc_stage values(1471, 'name1471', 1481.111, 147100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1471]'); insert into test_proxima_be_restart_with_inc_stage values(1472, 'name1472', 1482.111, 147200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1472]'); insert into test_proxima_be_restart_with_inc_stage values(1473, 'name1473', 1483.111, 147300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1473]'); insert into test_proxima_be_restart_with_inc_stage values(1474, 'name1474', 1484.111, 147400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1474]'); insert into test_proxima_be_restart_with_inc_stage values(1475, 'name1475', 1485.111, 147500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1475]'); insert into test_proxima_be_restart_with_inc_stage values(1476, 'name1476', 1486.111, 147600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1476]'); insert into test_proxima_be_restart_with_inc_stage values(1477, 'name1477', 1487.111, 147700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1477]'); insert into test_proxima_be_restart_with_inc_stage values(1478, 'name1478', 1488.111, 147800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1478]'); insert into test_proxima_be_restart_with_inc_stage values(1479, 'name1479', 1489.111, 147900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1479]'); insert into test_proxima_be_restart_with_inc_stage values(1480, 'name1480', 1490.111, 148000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1480]'); insert into test_proxima_be_restart_with_inc_stage values(1481, 'name1481', 1491.111, 148100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1481]'); insert into test_proxima_be_restart_with_inc_stage values(1482, 'name1482', 1492.111, 148200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1482]'); insert into test_proxima_be_restart_with_inc_stage values(1483, 'name1483', 1493.111, 148300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1483]'); insert into test_proxima_be_restart_with_inc_stage values(1484, 'name1484', 1494.111, 148400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1484]'); insert into test_proxima_be_restart_with_inc_stage values(1485, 'name1485', 1495.111, 148500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1485]'); insert into test_proxima_be_restart_with_inc_stage values(1486, 'name1486', 1496.111, 148600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1486]'); insert into test_proxima_be_restart_with_inc_stage values(1487, 'name1487', 1497.111, 148700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1487]'); insert into test_proxima_be_restart_with_inc_stage values(1488, 'name1488', 1498.111, 148800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1488]'); insert into test_proxima_be_restart_with_inc_stage values(1489, 'name1489', 1499.111, 148900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1489]'); insert into test_proxima_be_restart_with_inc_stage values(1490, 'name1490', 1500.111, 149000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1490]'); insert into test_proxima_be_restart_with_inc_stage values(1491, 'name1491', 1501.111, 149100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1491]'); insert into test_proxima_be_restart_with_inc_stage values(1492, 'name1492', 1502.111, 149200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1492]'); insert into test_proxima_be_restart_with_inc_stage values(1493, 'name1493', 1503.111, 149300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1493]'); insert into test_proxima_be_restart_with_inc_stage values(1494, 'name1494', 1504.111, 149400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1494]'); insert into test_proxima_be_restart_with_inc_stage values(1495, 'name1495', 1505.111, 149500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1495]'); insert into test_proxima_be_restart_with_inc_stage values(1496, 'name1496', 1506.111, 149600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1496]'); insert into test_proxima_be_restart_with_inc_stage values(1497, 'name1497', 1507.111, 149700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1497]'); insert into test_proxima_be_restart_with_inc_stage values(1498, 'name1498', 1508.111, 149800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1498]'); insert into test_proxima_be_restart_with_inc_stage values(1499, 'name1499', 1509.111, 149900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1499]'); insert into test_proxima_be_restart_with_inc_stage values(1500, 'name1500', 1510.111, 150000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1500]'); insert into test_proxima_be_restart_with_inc_stage values(1501, 'name1501', 1511.111, 150100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1501]'); insert into test_proxima_be_restart_with_inc_stage values(1502, 'name1502', 1512.111, 150200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1502]'); insert into test_proxima_be_restart_with_inc_stage values(1503, 'name1503', 1513.111, 150300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1503]'); insert into test_proxima_be_restart_with_inc_stage values(1504, 'name1504', 1514.111, 150400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1504]'); insert into test_proxima_be_restart_with_inc_stage values(1505, 'name1505', 1515.111, 150500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1505]'); insert into test_proxima_be_restart_with_inc_stage values(1506, 'name1506', 1516.111, 150600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1506]'); insert into test_proxima_be_restart_with_inc_stage values(1507, 'name1507', 1517.111, 150700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1507]'); insert into test_proxima_be_restart_with_inc_stage values(1508, 'name1508', 1518.111, 150800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1508]'); insert into test_proxima_be_restart_with_inc_stage values(1509, 'name1509', 1519.111, 150900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1509]'); insert into test_proxima_be_restart_with_inc_stage values(1510, 'name1510', 1520.111, 151000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1510]'); insert into test_proxima_be_restart_with_inc_stage values(1511, 'name1511', 1521.111, 151100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1511]'); insert into test_proxima_be_restart_with_inc_stage values(1512, 'name1512', 1522.111, 151200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1512]'); insert into test_proxima_be_restart_with_inc_stage values(1513, 'name1513', 1523.111, 151300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1513]'); insert into test_proxima_be_restart_with_inc_stage values(1514, 'name1514', 1524.111, 151400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1514]'); insert into test_proxima_be_restart_with_inc_stage values(1515, 'name1515', 1525.111, 151500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1515]'); insert into test_proxima_be_restart_with_inc_stage values(1516, 'name1516', 1526.111, 151600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1516]'); insert into test_proxima_be_restart_with_inc_stage values(1517, 'name1517', 1527.111, 151700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1517]'); insert into test_proxima_be_restart_with_inc_stage values(1518, 'name1518', 1528.111, 151800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1518]'); insert into test_proxima_be_restart_with_inc_stage values(1519, 'name1519', 1529.111, 151900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1519]'); insert into test_proxima_be_restart_with_inc_stage values(1520, 'name1520', 1530.111, 152000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1520]'); insert into test_proxima_be_restart_with_inc_stage values(1521, 'name1521', 1531.111, 152100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1521]'); insert into test_proxima_be_restart_with_inc_stage values(1522, 'name1522', 1532.111, 152200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1522]'); insert into test_proxima_be_restart_with_inc_stage values(1523, 'name1523', 1533.111, 152300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1523]'); insert into test_proxima_be_restart_with_inc_stage values(1524, 'name1524', 1534.111, 152400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1524]'); insert into test_proxima_be_restart_with_inc_stage values(1525, 'name1525', 1535.111, 152500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1525]'); insert into test_proxima_be_restart_with_inc_stage values(1526, 'name1526', 1536.111, 152600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1526]'); insert into test_proxima_be_restart_with_inc_stage values(1527, 'name1527', 1537.111, 152700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1527]'); insert into test_proxima_be_restart_with_inc_stage values(1528, 'name1528', 1538.111, 152800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1528]'); insert into test_proxima_be_restart_with_inc_stage values(1529, 'name1529', 1539.111, 152900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1529]'); insert into test_proxima_be_restart_with_inc_stage values(1530, 'name1530', 1540.111, 153000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1530]'); insert into test_proxima_be_restart_with_inc_stage values(1531, 'name1531', 1541.111, 153100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1531]'); insert into test_proxima_be_restart_with_inc_stage values(1532, 'name1532', 1542.111, 153200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1532]'); insert into test_proxima_be_restart_with_inc_stage values(1533, 'name1533', 1543.111, 153300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1533]'); insert into test_proxima_be_restart_with_inc_stage values(1534, 'name1534', 1544.111, 153400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1534]'); insert into test_proxima_be_restart_with_inc_stage values(1535, 'name1535', 1545.111, 153500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1535]'); insert into test_proxima_be_restart_with_inc_stage values(1536, 'name1536', 1546.111, 153600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1536]'); insert into test_proxima_be_restart_with_inc_stage values(1537, 'name1537', 1547.111, 153700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1537]'); insert into test_proxima_be_restart_with_inc_stage values(1538, 'name1538', 1548.111, 153800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1538]'); insert into test_proxima_be_restart_with_inc_stage values(1539, 'name1539', 1549.111, 153900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1539]'); insert into test_proxima_be_restart_with_inc_stage values(1540, 'name1540', 1550.111, 154000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1540]'); insert into test_proxima_be_restart_with_inc_stage values(1541, 'name1541', 1551.111, 154100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1541]'); insert into test_proxima_be_restart_with_inc_stage values(1542, 'name1542', 1552.111, 154200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1542]'); insert into test_proxima_be_restart_with_inc_stage values(1543, 'name1543', 1553.111, 154300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1543]'); insert into test_proxima_be_restart_with_inc_stage values(1544, 'name1544', 1554.111, 154400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1544]'); insert into test_proxima_be_restart_with_inc_stage values(1545, 'name1545', 1555.111, 154500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1545]'); insert into test_proxima_be_restart_with_inc_stage values(1546, 'name1546', 1556.111, 154600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1546]'); insert into test_proxima_be_restart_with_inc_stage values(1547, 'name1547', 1557.111, 154700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1547]'); insert into test_proxima_be_restart_with_inc_stage values(1548, 'name1548', 1558.111, 154800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1548]'); insert into test_proxima_be_restart_with_inc_stage values(1549, 'name1549', 1559.111, 154900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1549]'); insert into test_proxima_be_restart_with_inc_stage values(1550, 'name1550', 1560.111, 155000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1550]'); insert into test_proxima_be_restart_with_inc_stage values(1551, 'name1551', 1561.111, 155100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1551]'); insert into test_proxima_be_restart_with_inc_stage values(1552, 'name1552', 1562.111, 155200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1552]'); insert into test_proxima_be_restart_with_inc_stage values(1553, 'name1553', 1563.111, 155300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1553]'); insert into test_proxima_be_restart_with_inc_stage values(1554, 'name1554', 1564.111, 155400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1554]'); insert into test_proxima_be_restart_with_inc_stage values(1555, 'name1555', 1565.111, 155500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1555]'); insert into test_proxima_be_restart_with_inc_stage values(1556, 'name1556', 1566.111, 155600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1556]'); insert into test_proxima_be_restart_with_inc_stage values(1557, 'name1557', 1567.111, 155700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1557]'); insert into test_proxima_be_restart_with_inc_stage values(1558, 'name1558', 1568.111, 155800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1558]'); insert into test_proxima_be_restart_with_inc_stage values(1559, 'name1559', 1569.111, 155900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1559]'); insert into test_proxima_be_restart_with_inc_stage values(1560, 'name1560', 1570.111, 156000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1560]'); insert into test_proxima_be_restart_with_inc_stage values(1561, 'name1561', 1571.111, 156100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1561]'); insert into test_proxima_be_restart_with_inc_stage values(1562, 'name1562', 1572.111, 156200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1562]'); insert into test_proxima_be_restart_with_inc_stage values(1563, 'name1563', 1573.111, 156300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1563]'); insert into test_proxima_be_restart_with_inc_stage values(1564, 'name1564', 1574.111, 156400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1564]'); insert into test_proxima_be_restart_with_inc_stage values(1565, 'name1565', 1575.111, 156500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1565]'); insert into test_proxima_be_restart_with_inc_stage values(1566, 'name1566', 1576.111, 156600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1566]'); insert into test_proxima_be_restart_with_inc_stage values(1567, 'name1567', 1577.111, 156700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1567]'); insert into test_proxima_be_restart_with_inc_stage values(1568, 'name1568', 1578.111, 156800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1568]'); insert into test_proxima_be_restart_with_inc_stage values(1569, 'name1569', 1579.111, 156900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1569]'); insert into test_proxima_be_restart_with_inc_stage values(1570, 'name1570', 1580.111, 157000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1570]'); insert into test_proxima_be_restart_with_inc_stage values(1571, 'name1571', 1581.111, 157100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1571]'); insert into test_proxima_be_restart_with_inc_stage values(1572, 'name1572', 1582.111, 157200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1572]'); insert into test_proxima_be_restart_with_inc_stage values(1573, 'name1573', 1583.111, 157300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1573]'); insert into test_proxima_be_restart_with_inc_stage values(1574, 'name1574', 1584.111, 157400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1574]'); insert into test_proxima_be_restart_with_inc_stage values(1575, 'name1575', 1585.111, 157500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1575]'); insert into test_proxima_be_restart_with_inc_stage values(1576, 'name1576', 1586.111, 157600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1576]'); insert into test_proxima_be_restart_with_inc_stage values(1577, 'name1577', 1587.111, 157700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1577]'); insert into test_proxima_be_restart_with_inc_stage values(1578, 'name1578', 1588.111, 157800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1578]'); insert into test_proxima_be_restart_with_inc_stage values(1579, 'name1579', 1589.111, 157900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1579]'); insert into test_proxima_be_restart_with_inc_stage values(1580, 'name1580', 1590.111, 158000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1580]'); insert into test_proxima_be_restart_with_inc_stage values(1581, 'name1581', 1591.111, 158100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1581]'); insert into test_proxima_be_restart_with_inc_stage values(1582, 'name1582', 1592.111, 158200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1582]'); insert into test_proxima_be_restart_with_inc_stage values(1583, 'name1583', 1593.111, 158300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1583]'); insert into test_proxima_be_restart_with_inc_stage values(1584, 'name1584', 1594.111, 158400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1584]'); insert into test_proxima_be_restart_with_inc_stage values(1585, 'name1585', 1595.111, 158500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1585]'); insert into test_proxima_be_restart_with_inc_stage values(1586, 'name1586', 1596.111, 158600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1586]'); insert into test_proxima_be_restart_with_inc_stage values(1587, 'name1587', 1597.111, 158700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1587]'); insert into test_proxima_be_restart_with_inc_stage values(1588, 'name1588', 1598.111, 158800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1588]'); insert into test_proxima_be_restart_with_inc_stage values(1589, 'name1589', 1599.111, 158900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1589]'); insert into test_proxima_be_restart_with_inc_stage values(1590, 'name1590', 1600.111, 159000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1590]'); insert into test_proxima_be_restart_with_inc_stage values(1591, 'name1591', 1601.111, 159100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1591]'); insert into test_proxima_be_restart_with_inc_stage values(1592, 'name1592', 1602.111, 159200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1592]'); insert into test_proxima_be_restart_with_inc_stage values(1593, 'name1593', 1603.111, 159300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1593]'); insert into test_proxima_be_restart_with_inc_stage values(1594, 'name1594', 1604.111, 159400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1594]'); insert into test_proxima_be_restart_with_inc_stage values(1595, 'name1595', 1605.111, 159500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1595]'); insert into test_proxima_be_restart_with_inc_stage values(1596, 'name1596', 1606.111, 159600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1596]'); insert into test_proxima_be_restart_with_inc_stage values(1597, 'name1597', 1607.111, 159700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1597]'); insert into test_proxima_be_restart_with_inc_stage values(1598, 'name1598', 1608.111, 159800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1598]'); insert into test_proxima_be_restart_with_inc_stage values(1599, 'name1599', 1609.111, 159900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1599]'); insert into test_proxima_be_restart_with_inc_stage values(1600, 'name1600', 1610.111, 160000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1600]'); insert into test_proxima_be_restart_with_inc_stage values(1601, 'name1601', 1611.111, 160100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1601]'); insert into test_proxima_be_restart_with_inc_stage values(1602, 'name1602', 1612.111, 160200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1602]'); insert into test_proxima_be_restart_with_inc_stage values(1603, 'name1603', 1613.111, 160300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1603]'); insert into test_proxima_be_restart_with_inc_stage values(1604, 'name1604', 1614.111, 160400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1604]'); insert into test_proxima_be_restart_with_inc_stage values(1605, 'name1605', 1615.111, 160500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1605]'); insert into test_proxima_be_restart_with_inc_stage values(1606, 'name1606', 1616.111, 160600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1606]'); insert into test_proxima_be_restart_with_inc_stage values(1607, 'name1607', 1617.111, 160700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1607]'); insert into test_proxima_be_restart_with_inc_stage values(1608, 'name1608', 1618.111, 160800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1608]'); insert into test_proxima_be_restart_with_inc_stage values(1609, 'name1609', 1619.111, 160900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1609]'); insert into test_proxima_be_restart_with_inc_stage values(1610, 'name1610', 1620.111, 161000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1610]'); insert into test_proxima_be_restart_with_inc_stage values(1611, 'name1611', 1621.111, 161100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1611]'); insert into test_proxima_be_restart_with_inc_stage values(1612, 'name1612', 1622.111, 161200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1612]'); insert into test_proxima_be_restart_with_inc_stage values(1613, 'name1613', 1623.111, 161300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1613]'); insert into test_proxima_be_restart_with_inc_stage values(1614, 'name1614', 1624.111, 161400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1614]'); insert into test_proxima_be_restart_with_inc_stage values(1615, 'name1615', 1625.111, 161500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1615]'); insert into test_proxima_be_restart_with_inc_stage values(1616, 'name1616', 1626.111, 161600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1616]'); insert into test_proxima_be_restart_with_inc_stage values(1617, 'name1617', 1627.111, 161700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1617]'); insert into test_proxima_be_restart_with_inc_stage values(1618, 'name1618', 1628.111, 161800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1618]'); insert into test_proxima_be_restart_with_inc_stage values(1619, 'name1619', 1629.111, 161900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1619]'); insert into test_proxima_be_restart_with_inc_stage values(1620, 'name1620', 1630.111, 162000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1620]'); insert into test_proxima_be_restart_with_inc_stage values(1621, 'name1621', 1631.111, 162100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1621]'); insert into test_proxima_be_restart_with_inc_stage values(1622, 'name1622', 1632.111, 162200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1622]'); insert into test_proxima_be_restart_with_inc_stage values(1623, 'name1623', 1633.111, 162300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1623]'); insert into test_proxima_be_restart_with_inc_stage values(1624, 'name1624', 1634.111, 162400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1624]'); insert into test_proxima_be_restart_with_inc_stage values(1625, 'name1625', 1635.111, 162500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1625]'); insert into test_proxima_be_restart_with_inc_stage values(1626, 'name1626', 1636.111, 162600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1626]'); insert into test_proxima_be_restart_with_inc_stage values(1627, 'name1627', 1637.111, 162700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1627]'); insert into test_proxima_be_restart_with_inc_stage values(1628, 'name1628', 1638.111, 162800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1628]'); insert into test_proxima_be_restart_with_inc_stage values(1629, 'name1629', 1639.111, 162900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1629]'); insert into test_proxima_be_restart_with_inc_stage values(1630, 'name1630', 1640.111, 163000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1630]'); insert into test_proxima_be_restart_with_inc_stage values(1631, 'name1631', 1641.111, 163100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1631]'); insert into test_proxima_be_restart_with_inc_stage values(1632, 'name1632', 1642.111, 163200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1632]'); insert into test_proxima_be_restart_with_inc_stage values(1633, 'name1633', 1643.111, 163300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1633]'); insert into test_proxima_be_restart_with_inc_stage values(1634, 'name1634', 1644.111, 163400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1634]'); insert into test_proxima_be_restart_with_inc_stage values(1635, 'name1635', 1645.111, 163500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1635]'); insert into test_proxima_be_restart_with_inc_stage values(1636, 'name1636', 1646.111, 163600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1636]'); insert into test_proxima_be_restart_with_inc_stage values(1637, 'name1637', 1647.111, 163700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1637]'); insert into test_proxima_be_restart_with_inc_stage values(1638, 'name1638', 1648.111, 163800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1638]'); insert into test_proxima_be_restart_with_inc_stage values(1639, 'name1639', 1649.111, 163900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1639]'); insert into test_proxima_be_restart_with_inc_stage values(1640, 'name1640', 1650.111, 164000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1640]'); insert into test_proxima_be_restart_with_inc_stage values(1641, 'name1641', 1651.111, 164100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1641]'); insert into test_proxima_be_restart_with_inc_stage values(1642, 'name1642', 1652.111, 164200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1642]'); insert into test_proxima_be_restart_with_inc_stage values(1643, 'name1643', 1653.111, 164300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1643]'); insert into test_proxima_be_restart_with_inc_stage values(1644, 'name1644', 1654.111, 164400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1644]'); insert into test_proxima_be_restart_with_inc_stage values(1645, 'name1645', 1655.111, 164500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1645]'); insert into test_proxima_be_restart_with_inc_stage values(1646, 'name1646', 1656.111, 164600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1646]'); insert into test_proxima_be_restart_with_inc_stage values(1647, 'name1647', 1657.111, 164700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1647]'); insert into test_proxima_be_restart_with_inc_stage values(1648, 'name1648', 1658.111, 164800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1648]'); insert into test_proxima_be_restart_with_inc_stage values(1649, 'name1649', 1659.111, 164900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1649]'); insert into test_proxima_be_restart_with_inc_stage values(1650, 'name1650', 1660.111, 165000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1650]'); insert into test_proxima_be_restart_with_inc_stage values(1651, 'name1651', 1661.111, 165100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1651]'); insert into test_proxima_be_restart_with_inc_stage values(1652, 'name1652', 1662.111, 165200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1652]'); insert into test_proxima_be_restart_with_inc_stage values(1653, 'name1653', 1663.111, 165300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1653]'); insert into test_proxima_be_restart_with_inc_stage values(1654, 'name1654', 1664.111, 165400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1654]'); insert into test_proxima_be_restart_with_inc_stage values(1655, 'name1655', 1665.111, 165500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1655]'); insert into test_proxima_be_restart_with_inc_stage values(1656, 'name1656', 1666.111, 165600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1656]'); insert into test_proxima_be_restart_with_inc_stage values(1657, 'name1657', 1667.111, 165700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1657]'); insert into test_proxima_be_restart_with_inc_stage values(1658, 'name1658', 1668.111, 165800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1658]'); insert into test_proxima_be_restart_with_inc_stage values(1659, 'name1659', 1669.111, 165900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1659]'); insert into test_proxima_be_restart_with_inc_stage values(1660, 'name1660', 1670.111, 166000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1660]'); insert into test_proxima_be_restart_with_inc_stage values(1661, 'name1661', 1671.111, 166100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1661]'); insert into test_proxima_be_restart_with_inc_stage values(1662, 'name1662', 1672.111, 166200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1662]'); insert into test_proxima_be_restart_with_inc_stage values(1663, 'name1663', 1673.111, 166300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1663]'); insert into test_proxima_be_restart_with_inc_stage values(1664, 'name1664', 1674.111, 166400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1664]'); insert into test_proxima_be_restart_with_inc_stage values(1665, 'name1665', 1675.111, 166500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1665]'); insert into test_proxima_be_restart_with_inc_stage values(1666, 'name1666', 1676.111, 166600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1666]'); insert into test_proxima_be_restart_with_inc_stage values(1667, 'name1667', 1677.111, 166700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1667]'); insert into test_proxima_be_restart_with_inc_stage values(1668, 'name1668', 1678.111, 166800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1668]'); insert into test_proxima_be_restart_with_inc_stage values(1669, 'name1669', 1679.111, 166900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1669]'); insert into test_proxima_be_restart_with_inc_stage values(1670, 'name1670', 1680.111, 167000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1670]'); insert into test_proxima_be_restart_with_inc_stage values(1671, 'name1671', 1681.111, 167100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1671]'); insert into test_proxima_be_restart_with_inc_stage values(1672, 'name1672', 1682.111, 167200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1672]'); insert into test_proxima_be_restart_with_inc_stage values(1673, 'name1673', 1683.111, 167300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1673]'); insert into test_proxima_be_restart_with_inc_stage values(1674, 'name1674', 1684.111, 167400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1674]'); insert into test_proxima_be_restart_with_inc_stage values(1675, 'name1675', 1685.111, 167500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1675]'); insert into test_proxima_be_restart_with_inc_stage values(1676, 'name1676', 1686.111, 167600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1676]'); insert into test_proxima_be_restart_with_inc_stage values(1677, 'name1677', 1687.111, 167700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1677]'); insert into test_proxima_be_restart_with_inc_stage values(1678, 'name1678', 1688.111, 167800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1678]'); insert into test_proxima_be_restart_with_inc_stage values(1679, 'name1679', 1689.111, 167900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1679]'); insert into test_proxima_be_restart_with_inc_stage values(1680, 'name1680', 1690.111, 168000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1680]'); insert into test_proxima_be_restart_with_inc_stage values(1681, 'name1681', 1691.111, 168100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1681]'); insert into test_proxima_be_restart_with_inc_stage values(1682, 'name1682', 1692.111, 168200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1682]'); insert into test_proxima_be_restart_with_inc_stage values(1683, 'name1683', 1693.111, 168300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1683]'); insert into test_proxima_be_restart_with_inc_stage values(1684, 'name1684', 1694.111, 168400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1684]'); insert into test_proxima_be_restart_with_inc_stage values(1685, 'name1685', 1695.111, 168500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1685]'); insert into test_proxima_be_restart_with_inc_stage values(1686, 'name1686', 1696.111, 168600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1686]'); insert into test_proxima_be_restart_with_inc_stage values(1687, 'name1687', 1697.111, 168700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1687]'); insert into test_proxima_be_restart_with_inc_stage values(1688, 'name1688', 1698.111, 168800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1688]'); insert into test_proxima_be_restart_with_inc_stage values(1689, 'name1689', 1699.111, 168900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1689]'); insert into test_proxima_be_restart_with_inc_stage values(1690, 'name1690', 1700.111, 169000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1690]'); insert into test_proxima_be_restart_with_inc_stage values(1691, 'name1691', 1701.111, 169100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1691]'); insert into test_proxima_be_restart_with_inc_stage values(1692, 'name1692', 1702.111, 169200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1692]'); insert into test_proxima_be_restart_with_inc_stage values(1693, 'name1693', 1703.111, 169300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1693]'); insert into test_proxima_be_restart_with_inc_stage values(1694, 'name1694', 1704.111, 169400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1694]'); insert into test_proxima_be_restart_with_inc_stage values(1695, 'name1695', 1705.111, 169500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1695]'); insert into test_proxima_be_restart_with_inc_stage values(1696, 'name1696', 1706.111, 169600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1696]'); insert into test_proxima_be_restart_with_inc_stage values(1697, 'name1697', 1707.111, 169700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1697]'); insert into test_proxima_be_restart_with_inc_stage values(1698, 'name1698', 1708.111, 169800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1698]'); insert into test_proxima_be_restart_with_inc_stage values(1699, 'name1699', 1709.111, 169900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1699]'); insert into test_proxima_be_restart_with_inc_stage values(1700, 'name1700', 1710.111, 170000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1700]'); insert into test_proxima_be_restart_with_inc_stage values(1701, 'name1701', 1711.111, 170100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1701]'); insert into test_proxima_be_restart_with_inc_stage values(1702, 'name1702', 1712.111, 170200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1702]'); insert into test_proxima_be_restart_with_inc_stage values(1703, 'name1703', 1713.111, 170300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1703]'); insert into test_proxima_be_restart_with_inc_stage values(1704, 'name1704', 1714.111, 170400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1704]'); insert into test_proxima_be_restart_with_inc_stage values(1705, 'name1705', 1715.111, 170500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1705]'); insert into test_proxima_be_restart_with_inc_stage values(1706, 'name1706', 1716.111, 170600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1706]'); insert into test_proxima_be_restart_with_inc_stage values(1707, 'name1707', 1717.111, 170700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1707]'); insert into test_proxima_be_restart_with_inc_stage values(1708, 'name1708', 1718.111, 170800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1708]'); insert into test_proxima_be_restart_with_inc_stage values(1709, 'name1709', 1719.111, 170900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1709]'); insert into test_proxima_be_restart_with_inc_stage values(1710, 'name1710', 1720.111, 171000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1710]'); insert into test_proxima_be_restart_with_inc_stage values(1711, 'name1711', 1721.111, 171100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1711]'); insert into test_proxima_be_restart_with_inc_stage values(1712, 'name1712', 1722.111, 171200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1712]'); insert into test_proxima_be_restart_with_inc_stage values(1713, 'name1713', 1723.111, 171300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1713]'); insert into test_proxima_be_restart_with_inc_stage values(1714, 'name1714', 1724.111, 171400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1714]'); insert into test_proxima_be_restart_with_inc_stage values(1715, 'name1715', 1725.111, 171500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1715]'); insert into test_proxima_be_restart_with_inc_stage values(1716, 'name1716', 1726.111, 171600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1716]'); insert into test_proxima_be_restart_with_inc_stage values(1717, 'name1717', 1727.111, 171700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1717]'); insert into test_proxima_be_restart_with_inc_stage values(1718, 'name1718', 1728.111, 171800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1718]'); insert into test_proxima_be_restart_with_inc_stage values(1719, 'name1719', 1729.111, 171900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1719]'); insert into test_proxima_be_restart_with_inc_stage values(1720, 'name1720', 1730.111, 172000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1720]'); insert into test_proxima_be_restart_with_inc_stage values(1721, 'name1721', 1731.111, 172100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1721]'); insert into test_proxima_be_restart_with_inc_stage values(1722, 'name1722', 1732.111, 172200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1722]'); insert into test_proxima_be_restart_with_inc_stage values(1723, 'name1723', 1733.111, 172300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1723]'); insert into test_proxima_be_restart_with_inc_stage values(1724, 'name1724', 1734.111, 172400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1724]'); insert into test_proxima_be_restart_with_inc_stage values(1725, 'name1725', 1735.111, 172500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1725]'); insert into test_proxima_be_restart_with_inc_stage values(1726, 'name1726', 1736.111, 172600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1726]'); insert into test_proxima_be_restart_with_inc_stage values(1727, 'name1727', 1737.111, 172700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1727]'); insert into test_proxima_be_restart_with_inc_stage values(1728, 'name1728', 1738.111, 172800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1728]'); insert into test_proxima_be_restart_with_inc_stage values(1729, 'name1729', 1739.111, 172900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1729]'); insert into test_proxima_be_restart_with_inc_stage values(1730, 'name1730', 1740.111, 173000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1730]'); insert into test_proxima_be_restart_with_inc_stage values(1731, 'name1731', 1741.111, 173100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1731]'); insert into test_proxima_be_restart_with_inc_stage values(1732, 'name1732', 1742.111, 173200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1732]'); insert into test_proxima_be_restart_with_inc_stage values(1733, 'name1733', 1743.111, 173300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1733]'); insert into test_proxima_be_restart_with_inc_stage values(1734, 'name1734', 1744.111, 173400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1734]'); insert into test_proxima_be_restart_with_inc_stage values(1735, 'name1735', 1745.111, 173500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1735]'); insert into test_proxima_be_restart_with_inc_stage values(1736, 'name1736', 1746.111, 173600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1736]'); insert into test_proxima_be_restart_with_inc_stage values(1737, 'name1737', 1747.111, 173700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1737]'); insert into test_proxima_be_restart_with_inc_stage values(1738, 'name1738', 1748.111, 173800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1738]'); insert into test_proxima_be_restart_with_inc_stage values(1739, 'name1739', 1749.111, 173900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1739]'); insert into test_proxima_be_restart_with_inc_stage values(1740, 'name1740', 1750.111, 174000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1740]'); insert into test_proxima_be_restart_with_inc_stage values(1741, 'name1741', 1751.111, 174100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1741]'); insert into test_proxima_be_restart_with_inc_stage values(1742, 'name1742', 1752.111, 174200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1742]'); insert into test_proxima_be_restart_with_inc_stage values(1743, 'name1743', 1753.111, 174300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1743]'); insert into test_proxima_be_restart_with_inc_stage values(1744, 'name1744', 1754.111, 174400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1744]'); insert into test_proxima_be_restart_with_inc_stage values(1745, 'name1745', 1755.111, 174500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1745]'); insert into test_proxima_be_restart_with_inc_stage values(1746, 'name1746', 1756.111, 174600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1746]'); insert into test_proxima_be_restart_with_inc_stage values(1747, 'name1747', 1757.111, 174700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1747]'); insert into test_proxima_be_restart_with_inc_stage values(1748, 'name1748', 1758.111, 174800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1748]'); insert into test_proxima_be_restart_with_inc_stage values(1749, 'name1749', 1759.111, 174900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1749]'); insert into test_proxima_be_restart_with_inc_stage values(1750, 'name1750', 1760.111, 175000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1750]'); insert into test_proxima_be_restart_with_inc_stage values(1751, 'name1751', 1761.111, 175100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1751]'); insert into test_proxima_be_restart_with_inc_stage values(1752, 'name1752', 1762.111, 175200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1752]'); insert into test_proxima_be_restart_with_inc_stage values(1753, 'name1753', 1763.111, 175300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1753]'); insert into test_proxima_be_restart_with_inc_stage values(1754, 'name1754', 1764.111, 175400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1754]'); insert into test_proxima_be_restart_with_inc_stage values(1755, 'name1755', 1765.111, 175500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1755]'); insert into test_proxima_be_restart_with_inc_stage values(1756, 'name1756', 1766.111, 175600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1756]'); insert into test_proxima_be_restart_with_inc_stage values(1757, 'name1757', 1767.111, 175700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1757]'); insert into test_proxima_be_restart_with_inc_stage values(1758, 'name1758', 1768.111, 175800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1758]'); insert into test_proxima_be_restart_with_inc_stage values(1759, 'name1759', 1769.111, 175900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1759]'); insert into test_proxima_be_restart_with_inc_stage values(1760, 'name1760', 1770.111, 176000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1760]'); insert into test_proxima_be_restart_with_inc_stage values(1761, 'name1761', 1771.111, 176100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1761]'); insert into test_proxima_be_restart_with_inc_stage values(1762, 'name1762', 1772.111, 176200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1762]'); insert into test_proxima_be_restart_with_inc_stage values(1763, 'name1763', 1773.111, 176300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1763]'); insert into test_proxima_be_restart_with_inc_stage values(1764, 'name1764', 1774.111, 176400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1764]'); insert into test_proxima_be_restart_with_inc_stage values(1765, 'name1765', 1775.111, 176500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1765]'); insert into test_proxima_be_restart_with_inc_stage values(1766, 'name1766', 1776.111, 176600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1766]'); insert into test_proxima_be_restart_with_inc_stage values(1767, 'name1767', 1777.111, 176700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1767]'); insert into test_proxima_be_restart_with_inc_stage values(1768, 'name1768', 1778.111, 176800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1768]'); insert into test_proxima_be_restart_with_inc_stage values(1769, 'name1769', 1779.111, 176900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1769]'); insert into test_proxima_be_restart_with_inc_stage values(1770, 'name1770', 1780.111, 177000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1770]'); insert into test_proxima_be_restart_with_inc_stage values(1771, 'name1771', 1781.111, 177100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1771]'); insert into test_proxima_be_restart_with_inc_stage values(1772, 'name1772', 1782.111, 177200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1772]'); insert into test_proxima_be_restart_with_inc_stage values(1773, 'name1773', 1783.111, 177300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1773]'); insert into test_proxima_be_restart_with_inc_stage values(1774, 'name1774', 1784.111, 177400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1774]'); insert into test_proxima_be_restart_with_inc_stage values(1775, 'name1775', 1785.111, 177500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1775]'); insert into test_proxima_be_restart_with_inc_stage values(1776, 'name1776', 1786.111, 177600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1776]'); insert into test_proxima_be_restart_with_inc_stage values(1777, 'name1777', 1787.111, 177700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1777]'); insert into test_proxima_be_restart_with_inc_stage values(1778, 'name1778', 1788.111, 177800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1778]'); insert into test_proxima_be_restart_with_inc_stage values(1779, 'name1779', 1789.111, 177900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1779]'); insert into test_proxima_be_restart_with_inc_stage values(1780, 'name1780', 1790.111, 178000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1780]'); insert into test_proxima_be_restart_with_inc_stage values(1781, 'name1781', 1791.111, 178100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1781]'); insert into test_proxima_be_restart_with_inc_stage values(1782, 'name1782', 1792.111, 178200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1782]'); insert into test_proxima_be_restart_with_inc_stage values(1783, 'name1783', 1793.111, 178300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1783]'); insert into test_proxima_be_restart_with_inc_stage values(1784, 'name1784', 1794.111, 178400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1784]'); insert into test_proxima_be_restart_with_inc_stage values(1785, 'name1785', 1795.111, 178500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1785]'); insert into test_proxima_be_restart_with_inc_stage values(1786, 'name1786', 1796.111, 178600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1786]'); insert into test_proxima_be_restart_with_inc_stage values(1787, 'name1787', 1797.111, 178700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1787]'); insert into test_proxima_be_restart_with_inc_stage values(1788, 'name1788', 1798.111, 178800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1788]'); insert into test_proxima_be_restart_with_inc_stage values(1789, 'name1789', 1799.111, 178900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1789]'); insert into test_proxima_be_restart_with_inc_stage values(1790, 'name1790', 1800.111, 179000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1790]'); insert into test_proxima_be_restart_with_inc_stage values(1791, 'name1791', 1801.111, 179100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1791]'); insert into test_proxima_be_restart_with_inc_stage values(1792, 'name1792', 1802.111, 179200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1792]'); insert into test_proxima_be_restart_with_inc_stage values(1793, 'name1793', 1803.111, 179300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1793]'); insert into test_proxima_be_restart_with_inc_stage values(1794, 'name1794', 1804.111, 179400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1794]'); insert into test_proxima_be_restart_with_inc_stage values(1795, 'name1795', 1805.111, 179500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1795]'); insert into test_proxima_be_restart_with_inc_stage values(1796, 'name1796', 1806.111, 179600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1796]'); insert into test_proxima_be_restart_with_inc_stage values(1797, 'name1797', 1807.111, 179700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1797]'); insert into test_proxima_be_restart_with_inc_stage values(1798, 'name1798', 1808.111, 179800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1798]'); insert into test_proxima_be_restart_with_inc_stage values(1799, 'name1799', 1809.111, 179900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1799]'); insert into test_proxima_be_restart_with_inc_stage values(1800, 'name1800', 1810.111, 180000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1800]'); insert into test_proxima_be_restart_with_inc_stage values(1801, 'name1801', 1811.111, 180100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1801]'); insert into test_proxima_be_restart_with_inc_stage values(1802, 'name1802', 1812.111, 180200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1802]'); insert into test_proxima_be_restart_with_inc_stage values(1803, 'name1803', 1813.111, 180300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1803]'); insert into test_proxima_be_restart_with_inc_stage values(1804, 'name1804', 1814.111, 180400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1804]'); insert into test_proxima_be_restart_with_inc_stage values(1805, 'name1805', 1815.111, 180500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1805]'); insert into test_proxima_be_restart_with_inc_stage values(1806, 'name1806', 1816.111, 180600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1806]'); insert into test_proxima_be_restart_with_inc_stage values(1807, 'name1807', 1817.111, 180700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1807]'); insert into test_proxima_be_restart_with_inc_stage values(1808, 'name1808', 1818.111, 180800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1808]'); insert into test_proxima_be_restart_with_inc_stage values(1809, 'name1809', 1819.111, 180900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1809]'); insert into test_proxima_be_restart_with_inc_stage values(1810, 'name1810', 1820.111, 181000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1810]'); insert into test_proxima_be_restart_with_inc_stage values(1811, 'name1811', 1821.111, 181100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1811]'); insert into test_proxima_be_restart_with_inc_stage values(1812, 'name1812', 1822.111, 181200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1812]'); insert into test_proxima_be_restart_with_inc_stage values(1813, 'name1813', 1823.111, 181300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1813]'); insert into test_proxima_be_restart_with_inc_stage values(1814, 'name1814', 1824.111, 181400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1814]'); insert into test_proxima_be_restart_with_inc_stage values(1815, 'name1815', 1825.111, 181500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1815]'); insert into test_proxima_be_restart_with_inc_stage values(1816, 'name1816', 1826.111, 181600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1816]'); insert into test_proxima_be_restart_with_inc_stage values(1817, 'name1817', 1827.111, 181700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1817]'); insert into test_proxima_be_restart_with_inc_stage values(1818, 'name1818', 1828.111, 181800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1818]'); insert into test_proxima_be_restart_with_inc_stage values(1819, 'name1819', 1829.111, 181900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1819]'); insert into test_proxima_be_restart_with_inc_stage values(1820, 'name1820', 1830.111, 182000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1820]'); insert into test_proxima_be_restart_with_inc_stage values(1821, 'name1821', 1831.111, 182100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1821]'); insert into test_proxima_be_restart_with_inc_stage values(1822, 'name1822', 1832.111, 182200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1822]'); insert into test_proxima_be_restart_with_inc_stage values(1823, 'name1823', 1833.111, 182300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1823]'); insert into test_proxima_be_restart_with_inc_stage values(1824, 'name1824', 1834.111, 182400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1824]'); insert into test_proxima_be_restart_with_inc_stage values(1825, 'name1825', 1835.111, 182500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1825]'); insert into test_proxima_be_restart_with_inc_stage values(1826, 'name1826', 1836.111, 182600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1826]'); insert into test_proxima_be_restart_with_inc_stage values(1827, 'name1827', 1837.111, 182700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1827]'); insert into test_proxima_be_restart_with_inc_stage values(1828, 'name1828', 1838.111, 182800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1828]'); insert into test_proxima_be_restart_with_inc_stage values(1829, 'name1829', 1839.111, 182900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1829]'); insert into test_proxima_be_restart_with_inc_stage values(1830, 'name1830', 1840.111, 183000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1830]'); insert into test_proxima_be_restart_with_inc_stage values(1831, 'name1831', 1841.111, 183100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1831]'); insert into test_proxima_be_restart_with_inc_stage values(1832, 'name1832', 1842.111, 183200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1832]'); insert into test_proxima_be_restart_with_inc_stage values(1833, 'name1833', 1843.111, 183300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1833]'); insert into test_proxima_be_restart_with_inc_stage values(1834, 'name1834', 1844.111, 183400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1834]'); insert into test_proxima_be_restart_with_inc_stage values(1835, 'name1835', 1845.111, 183500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1835]'); insert into test_proxima_be_restart_with_inc_stage values(1836, 'name1836', 1846.111, 183600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1836]'); insert into test_proxima_be_restart_with_inc_stage values(1837, 'name1837', 1847.111, 183700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1837]'); insert into test_proxima_be_restart_with_inc_stage values(1838, 'name1838', 1848.111, 183800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1838]'); insert into test_proxima_be_restart_with_inc_stage values(1839, 'name1839', 1849.111, 183900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1839]'); insert into test_proxima_be_restart_with_inc_stage values(1840, 'name1840', 1850.111, 184000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1840]'); insert into test_proxima_be_restart_with_inc_stage values(1841, 'name1841', 1851.111, 184100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1841]'); insert into test_proxima_be_restart_with_inc_stage values(1842, 'name1842', 1852.111, 184200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1842]'); insert into test_proxima_be_restart_with_inc_stage values(1843, 'name1843', 1853.111, 184300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1843]'); insert into test_proxima_be_restart_with_inc_stage values(1844, 'name1844', 1854.111, 184400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1844]'); insert into test_proxima_be_restart_with_inc_stage values(1845, 'name1845', 1855.111, 184500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1845]'); insert into test_proxima_be_restart_with_inc_stage values(1846, 'name1846', 1856.111, 184600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1846]'); insert into test_proxima_be_restart_with_inc_stage values(1847, 'name1847', 1857.111, 184700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1847]'); insert into test_proxima_be_restart_with_inc_stage values(1848, 'name1848', 1858.111, 184800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1848]'); insert into test_proxima_be_restart_with_inc_stage values(1849, 'name1849', 1859.111, 184900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1849]'); insert into test_proxima_be_restart_with_inc_stage values(1850, 'name1850', 1860.111, 185000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1850]'); insert into test_proxima_be_restart_with_inc_stage values(1851, 'name1851', 1861.111, 185100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1851]'); insert into test_proxima_be_restart_with_inc_stage values(1852, 'name1852', 1862.111, 185200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1852]'); insert into test_proxima_be_restart_with_inc_stage values(1853, 'name1853', 1863.111, 185300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1853]'); insert into test_proxima_be_restart_with_inc_stage values(1854, 'name1854', 1864.111, 185400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1854]'); insert into test_proxima_be_restart_with_inc_stage values(1855, 'name1855', 1865.111, 185500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1855]'); insert into test_proxima_be_restart_with_inc_stage values(1856, 'name1856', 1866.111, 185600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1856]'); insert into test_proxima_be_restart_with_inc_stage values(1857, 'name1857', 1867.111, 185700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1857]'); insert into test_proxima_be_restart_with_inc_stage values(1858, 'name1858', 1868.111, 185800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1858]'); insert into test_proxima_be_restart_with_inc_stage values(1859, 'name1859', 1869.111, 185900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1859]'); insert into test_proxima_be_restart_with_inc_stage values(1860, 'name1860', 1870.111, 186000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1860]'); insert into test_proxima_be_restart_with_inc_stage values(1861, 'name1861', 1871.111, 186100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1861]'); insert into test_proxima_be_restart_with_inc_stage values(1862, 'name1862', 1872.111, 186200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1862]'); insert into test_proxima_be_restart_with_inc_stage values(1863, 'name1863', 1873.111, 186300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1863]'); insert into test_proxima_be_restart_with_inc_stage values(1864, 'name1864', 1874.111, 186400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1864]'); insert into test_proxima_be_restart_with_inc_stage values(1865, 'name1865', 1875.111, 186500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1865]'); insert into test_proxima_be_restart_with_inc_stage values(1866, 'name1866', 1876.111, 186600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1866]'); insert into test_proxima_be_restart_with_inc_stage values(1867, 'name1867', 1877.111, 186700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1867]'); insert into test_proxima_be_restart_with_inc_stage values(1868, 'name1868', 1878.111, 186800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1868]'); insert into test_proxima_be_restart_with_inc_stage values(1869, 'name1869', 1879.111, 186900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1869]'); insert into test_proxima_be_restart_with_inc_stage values(1870, 'name1870', 1880.111, 187000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1870]'); insert into test_proxima_be_restart_with_inc_stage values(1871, 'name1871', 1881.111, 187100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1871]'); insert into test_proxima_be_restart_with_inc_stage values(1872, 'name1872', 1882.111, 187200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1872]'); insert into test_proxima_be_restart_with_inc_stage values(1873, 'name1873', 1883.111, 187300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1873]'); insert into test_proxima_be_restart_with_inc_stage values(1874, 'name1874', 1884.111, 187400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1874]'); insert into test_proxima_be_restart_with_inc_stage values(1875, 'name1875', 1885.111, 187500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1875]'); insert into test_proxima_be_restart_with_inc_stage values(1876, 'name1876', 1886.111, 187600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1876]'); insert into test_proxima_be_restart_with_inc_stage values(1877, 'name1877', 1887.111, 187700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1877]'); insert into test_proxima_be_restart_with_inc_stage values(1878, 'name1878', 1888.111, 187800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1878]'); insert into test_proxima_be_restart_with_inc_stage values(1879, 'name1879', 1889.111, 187900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1879]'); insert into test_proxima_be_restart_with_inc_stage values(1880, 'name1880', 1890.111, 188000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1880]'); insert into test_proxima_be_restart_with_inc_stage values(1881, 'name1881', 1891.111, 188100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1881]'); insert into test_proxima_be_restart_with_inc_stage values(1882, 'name1882', 1892.111, 188200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1882]'); insert into test_proxima_be_restart_with_inc_stage values(1883, 'name1883', 1893.111, 188300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1883]'); insert into test_proxima_be_restart_with_inc_stage values(1884, 'name1884', 1894.111, 188400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1884]'); insert into test_proxima_be_restart_with_inc_stage values(1885, 'name1885', 1895.111, 188500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1885]'); insert into test_proxima_be_restart_with_inc_stage values(1886, 'name1886', 1896.111, 188600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1886]'); insert into test_proxima_be_restart_with_inc_stage values(1887, 'name1887', 1897.111, 188700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1887]'); insert into test_proxima_be_restart_with_inc_stage values(1888, 'name1888', 1898.111, 188800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1888]'); insert into test_proxima_be_restart_with_inc_stage values(1889, 'name1889', 1899.111, 188900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1889]'); insert into test_proxima_be_restart_with_inc_stage values(1890, 'name1890', 1900.111, 189000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1890]'); insert into test_proxima_be_restart_with_inc_stage values(1891, 'name1891', 1901.111, 189100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1891]'); insert into test_proxima_be_restart_with_inc_stage values(1892, 'name1892', 1902.111, 189200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1892]'); insert into test_proxima_be_restart_with_inc_stage values(1893, 'name1893', 1903.111, 189300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1893]'); insert into test_proxima_be_restart_with_inc_stage values(1894, 'name1894', 1904.111, 189400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1894]'); insert into test_proxima_be_restart_with_inc_stage values(1895, 'name1895', 1905.111, 189500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1895]'); insert into test_proxima_be_restart_with_inc_stage values(1896, 'name1896', 1906.111, 189600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1896]'); insert into test_proxima_be_restart_with_inc_stage values(1897, 'name1897', 1907.111, 189700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1897]'); insert into test_proxima_be_restart_with_inc_stage values(1898, 'name1898', 1908.111, 189800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1898]'); insert into test_proxima_be_restart_with_inc_stage values(1899, 'name1899', 1909.111, 189900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1899]'); insert into test_proxima_be_restart_with_inc_stage values(1900, 'name1900', 1910.111, 190000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1900]'); insert into test_proxima_be_restart_with_inc_stage values(1901, 'name1901', 1911.111, 190100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1901]'); insert into test_proxima_be_restart_with_inc_stage values(1902, 'name1902', 1912.111, 190200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1902]'); insert into test_proxima_be_restart_with_inc_stage values(1903, 'name1903', 1913.111, 190300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1903]'); insert into test_proxima_be_restart_with_inc_stage values(1904, 'name1904', 1914.111, 190400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1904]'); insert into test_proxima_be_restart_with_inc_stage values(1905, 'name1905', 1915.111, 190500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1905]'); insert into test_proxima_be_restart_with_inc_stage values(1906, 'name1906', 1916.111, 190600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1906]'); insert into test_proxima_be_restart_with_inc_stage values(1907, 'name1907', 1917.111, 190700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1907]'); insert into test_proxima_be_restart_with_inc_stage values(1908, 'name1908', 1918.111, 190800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1908]'); insert into test_proxima_be_restart_with_inc_stage values(1909, 'name1909', 1919.111, 190900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1909]'); insert into test_proxima_be_restart_with_inc_stage values(1910, 'name1910', 1920.111, 191000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1910]'); insert into test_proxima_be_restart_with_inc_stage values(1911, 'name1911', 1921.111, 191100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1911]'); insert into test_proxima_be_restart_with_inc_stage values(1912, 'name1912', 1922.111, 191200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1912]'); insert into test_proxima_be_restart_with_inc_stage values(1913, 'name1913', 1923.111, 191300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1913]'); insert into test_proxima_be_restart_with_inc_stage values(1914, 'name1914', 1924.111, 191400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1914]'); insert into test_proxima_be_restart_with_inc_stage values(1915, 'name1915', 1925.111, 191500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1915]'); insert into test_proxima_be_restart_with_inc_stage values(1916, 'name1916', 1926.111, 191600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1916]'); insert into test_proxima_be_restart_with_inc_stage values(1917, 'name1917', 1927.111, 191700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1917]'); insert into test_proxima_be_restart_with_inc_stage values(1918, 'name1918', 1928.111, 191800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1918]'); insert into test_proxima_be_restart_with_inc_stage values(1919, 'name1919', 1929.111, 191900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1919]'); insert into test_proxima_be_restart_with_inc_stage values(1920, 'name1920', 1930.111, 192000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1920]'); insert into test_proxima_be_restart_with_inc_stage values(1921, 'name1921', 1931.111, 192100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1921]'); insert into test_proxima_be_restart_with_inc_stage values(1922, 'name1922', 1932.111, 192200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1922]'); insert into test_proxima_be_restart_with_inc_stage values(1923, 'name1923', 1933.111, 192300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1923]'); insert into test_proxima_be_restart_with_inc_stage values(1924, 'name1924', 1934.111, 192400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1924]'); insert into test_proxima_be_restart_with_inc_stage values(1925, 'name1925', 1935.111, 192500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1925]'); insert into test_proxima_be_restart_with_inc_stage values(1926, 'name1926', 1936.111, 192600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1926]'); insert into test_proxima_be_restart_with_inc_stage values(1927, 'name1927', 1937.111, 192700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1927]'); insert into test_proxima_be_restart_with_inc_stage values(1928, 'name1928', 1938.111, 192800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1928]'); insert into test_proxima_be_restart_with_inc_stage values(1929, 'name1929', 1939.111, 192900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1929]'); insert into test_proxima_be_restart_with_inc_stage values(1930, 'name1930', 1940.111, 193000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1930]'); insert into test_proxima_be_restart_with_inc_stage values(1931, 'name1931', 1941.111, 193100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1931]'); insert into test_proxima_be_restart_with_inc_stage values(1932, 'name1932', 1942.111, 193200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1932]'); insert into test_proxima_be_restart_with_inc_stage values(1933, 'name1933', 1943.111, 193300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1933]'); insert into test_proxima_be_restart_with_inc_stage values(1934, 'name1934', 1944.111, 193400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1934]'); insert into test_proxima_be_restart_with_inc_stage values(1935, 'name1935', 1945.111, 193500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1935]'); insert into test_proxima_be_restart_with_inc_stage values(1936, 'name1936', 1946.111, 193600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1936]'); insert into test_proxima_be_restart_with_inc_stage values(1937, 'name1937', 1947.111, 193700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1937]'); insert into test_proxima_be_restart_with_inc_stage values(1938, 'name1938', 1948.111, 193800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1938]'); insert into test_proxima_be_restart_with_inc_stage values(1939, 'name1939', 1949.111, 193900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1939]'); insert into test_proxima_be_restart_with_inc_stage values(1940, 'name1940', 1950.111, 194000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1940]'); insert into test_proxima_be_restart_with_inc_stage values(1941, 'name1941', 1951.111, 194100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1941]'); insert into test_proxima_be_restart_with_inc_stage values(1942, 'name1942', 1952.111, 194200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1942]'); insert into test_proxima_be_restart_with_inc_stage values(1943, 'name1943', 1953.111, 194300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1943]'); insert into test_proxima_be_restart_with_inc_stage values(1944, 'name1944', 1954.111, 194400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1944]'); insert into test_proxima_be_restart_with_inc_stage values(1945, 'name1945', 1955.111, 194500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1945]'); insert into test_proxima_be_restart_with_inc_stage values(1946, 'name1946', 1956.111, 194600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1946]'); insert into test_proxima_be_restart_with_inc_stage values(1947, 'name1947', 1957.111, 194700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1947]'); insert into test_proxima_be_restart_with_inc_stage values(1948, 'name1948', 1958.111, 194800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1948]'); insert into test_proxima_be_restart_with_inc_stage values(1949, 'name1949', 1959.111, 194900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1949]'); insert into test_proxima_be_restart_with_inc_stage values(1950, 'name1950', 1960.111, 195000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1950]'); insert into test_proxima_be_restart_with_inc_stage values(1951, 'name1951', 1961.111, 195100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1951]'); insert into test_proxima_be_restart_with_inc_stage values(1952, 'name1952', 1962.111, 195200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1952]'); insert into test_proxima_be_restart_with_inc_stage values(1953, 'name1953', 1963.111, 195300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1953]'); insert into test_proxima_be_restart_with_inc_stage values(1954, 'name1954', 1964.111, 195400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1954]'); insert into test_proxima_be_restart_with_inc_stage values(1955, 'name1955', 1965.111, 195500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1955]'); insert into test_proxima_be_restart_with_inc_stage values(1956, 'name1956', 1966.111, 195600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1956]'); insert into test_proxima_be_restart_with_inc_stage values(1957, 'name1957', 1967.111, 195700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1957]'); insert into test_proxima_be_restart_with_inc_stage values(1958, 'name1958', 1968.111, 195800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1958]'); insert into test_proxima_be_restart_with_inc_stage values(1959, 'name1959', 1969.111, 195900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1959]'); insert into test_proxima_be_restart_with_inc_stage values(1960, 'name1960', 1970.111, 196000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1960]'); insert into test_proxima_be_restart_with_inc_stage values(1961, 'name1961', 1971.111, 196100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1961]'); insert into test_proxima_be_restart_with_inc_stage values(1962, 'name1962', 1972.111, 196200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1962]'); insert into test_proxima_be_restart_with_inc_stage values(1963, 'name1963', 1973.111, 196300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1963]'); insert into test_proxima_be_restart_with_inc_stage values(1964, 'name1964', 1974.111, 196400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1964]'); insert into test_proxima_be_restart_with_inc_stage values(1965, 'name1965', 1975.111, 196500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1965]'); insert into test_proxima_be_restart_with_inc_stage values(1966, 'name1966', 1976.111, 196600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1966]'); insert into test_proxima_be_restart_with_inc_stage values(1967, 'name1967', 1977.111, 196700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1967]'); insert into test_proxima_be_restart_with_inc_stage values(1968, 'name1968', 1978.111, 196800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1968]'); insert into test_proxima_be_restart_with_inc_stage values(1969, 'name1969', 1979.111, 196900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1969]'); insert into test_proxima_be_restart_with_inc_stage values(1970, 'name1970', 1980.111, 197000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1970]'); insert into test_proxima_be_restart_with_inc_stage values(1971, 'name1971', 1981.111, 197100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1971]'); insert into test_proxima_be_restart_with_inc_stage values(1972, 'name1972', 1982.111, 197200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1972]'); insert into test_proxima_be_restart_with_inc_stage values(1973, 'name1973', 1983.111, 197300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1973]'); insert into test_proxima_be_restart_with_inc_stage values(1974, 'name1974', 1984.111, 197400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1974]'); insert into test_proxima_be_restart_with_inc_stage values(1975, 'name1975', 1985.111, 197500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1975]'); insert into test_proxima_be_restart_with_inc_stage values(1976, 'name1976', 1986.111, 197600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1976]'); insert into test_proxima_be_restart_with_inc_stage values(1977, 'name1977', 1987.111, 197700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1977]'); insert into test_proxima_be_restart_with_inc_stage values(1978, 'name1978', 1988.111, 197800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1978]'); insert into test_proxima_be_restart_with_inc_stage values(1979, 'name1979', 1989.111, 197900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1979]'); insert into test_proxima_be_restart_with_inc_stage values(1980, 'name1980', 1990.111, 198000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1980]'); insert into test_proxima_be_restart_with_inc_stage values(1981, 'name1981', 1991.111, 198100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1981]'); insert into test_proxima_be_restart_with_inc_stage values(1982, 'name1982', 1992.111, 198200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1982]'); insert into test_proxima_be_restart_with_inc_stage values(1983, 'name1983', 1993.111, 198300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1983]'); insert into test_proxima_be_restart_with_inc_stage values(1984, 'name1984', 1994.111, 198400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1984]'); insert into test_proxima_be_restart_with_inc_stage values(1985, 'name1985', 1995.111, 198500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1985]'); insert into test_proxima_be_restart_with_inc_stage values(1986, 'name1986', 1996.111, 198600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1986]'); insert into test_proxima_be_restart_with_inc_stage values(1987, 'name1987', 1997.111, 198700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1987]'); insert into test_proxima_be_restart_with_inc_stage values(1988, 'name1988', 1998.111, 198800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1988]'); insert into test_proxima_be_restart_with_inc_stage values(1989, 'name1989', 1999.111, 198900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1989]'); insert into test_proxima_be_restart_with_inc_stage values(1990, 'name1990', 2000.111, 199000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1990]'); insert into test_proxima_be_restart_with_inc_stage values(1991, 'name1991', 2001.111, 199100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1991]'); insert into test_proxima_be_restart_with_inc_stage values(1992, 'name1992', 2002.111, 199200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1992]'); insert into test_proxima_be_restart_with_inc_stage values(1993, 'name1993', 2003.111, 199300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1993]'); insert into test_proxima_be_restart_with_inc_stage values(1994, 'name1994', 2004.111, 199400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1994]'); insert into test_proxima_be_restart_with_inc_stage values(1995, 'name1995', 2005.111, 199500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1995]'); insert into test_proxima_be_restart_with_inc_stage values(1996, 'name1996', 2006.111, 199600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1996]'); insert into test_proxima_be_restart_with_inc_stage values(1997, 'name1997', 2007.111, 199700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1997]'); insert into test_proxima_be_restart_with_inc_stage values(1998, 'name1998', 2008.111, 199800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1998]'); insert into test_proxima_be_restart_with_inc_stage values(1999, 'name1999', 2009.111, 199900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1999]'); insert into test_proxima_be_restart_with_inc_stage values(2000, 'name2000', 2010.111, 200000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2000]'); insert into test_proxima_be_restart_with_inc_stage values(2001, 'name2001', 2011.111, 200100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2001]'); insert into test_proxima_be_restart_with_inc_stage values(2002, 'name2002', 2012.111, 200200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2002]'); insert into test_proxima_be_restart_with_inc_stage values(2003, 'name2003', 2013.111, 200300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2003]'); insert into test_proxima_be_restart_with_inc_stage values(2004, 'name2004', 2014.111, 200400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2004]'); insert into test_proxima_be_restart_with_inc_stage values(2005, 'name2005', 2015.111, 200500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2005]'); insert into test_proxima_be_restart_with_inc_stage values(2006, 'name2006', 2016.111, 200600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2006]'); insert into test_proxima_be_restart_with_inc_stage values(2007, 'name2007', 2017.111, 200700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2007]'); insert into test_proxima_be_restart_with_inc_stage values(2008, 'name2008', 2018.111, 200800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2008]'); insert into test_proxima_be_restart_with_inc_stage values(2009, 'name2009', 2019.111, 200900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2009]'); insert into test_proxima_be_restart_with_inc_stage values(2010, 'name2010', 2020.111, 201000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2010]'); insert into test_proxima_be_restart_with_inc_stage values(2011, 'name2011', 2021.111, 201100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2011]'); insert into test_proxima_be_restart_with_inc_stage values(2012, 'name2012', 2022.111, 201200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2012]'); insert into test_proxima_be_restart_with_inc_stage values(2013, 'name2013', 2023.111, 201300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2013]'); insert into test_proxima_be_restart_with_inc_stage values(2014, 'name2014', 2024.111, 201400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2014]'); insert into test_proxima_be_restart_with_inc_stage values(2015, 'name2015', 2025.111, 201500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2015]'); insert into test_proxima_be_restart_with_inc_stage values(2016, 'name2016', 2026.111, 201600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2016]'); insert into test_proxima_be_restart_with_inc_stage values(2017, 'name2017', 2027.111, 201700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2017]'); insert into test_proxima_be_restart_with_inc_stage values(2018, 'name2018', 2028.111, 201800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2018]'); insert into test_proxima_be_restart_with_inc_stage values(2019, 'name2019', 2029.111, 201900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2019]'); insert into test_proxima_be_restart_with_inc_stage values(2020, 'name2020', 2030.111, 202000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2020]'); insert into test_proxima_be_restart_with_inc_stage values(2021, 'name2021', 2031.111, 202100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2021]'); insert into test_proxima_be_restart_with_inc_stage values(2022, 'name2022', 2032.111, 202200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2022]'); insert into test_proxima_be_restart_with_inc_stage values(2023, 'name2023', 2033.111, 202300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2023]'); insert into test_proxima_be_restart_with_inc_stage values(2024, 'name2024', 2034.111, 202400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2024]'); insert into test_proxima_be_restart_with_inc_stage values(2025, 'name2025', 2035.111, 202500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2025]'); insert into test_proxima_be_restart_with_inc_stage values(2026, 'name2026', 2036.111, 202600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2026]'); insert into test_proxima_be_restart_with_inc_stage values(2027, 'name2027', 2037.111, 202700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2027]'); insert into test_proxima_be_restart_with_inc_stage values(2028, 'name2028', 2038.111, 202800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2028]'); insert into test_proxima_be_restart_with_inc_stage values(2029, 'name2029', 2039.111, 202900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2029]'); insert into test_proxima_be_restart_with_inc_stage values(2030, 'name2030', 2040.111, 203000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2030]'); insert into test_proxima_be_restart_with_inc_stage values(2031, 'name2031', 2041.111, 203100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2031]'); insert into test_proxima_be_restart_with_inc_stage values(2032, 'name2032', 2042.111, 203200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2032]'); insert into test_proxima_be_restart_with_inc_stage values(2033, 'name2033', 2043.111, 203300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2033]'); insert into test_proxima_be_restart_with_inc_stage values(2034, 'name2034', 2044.111, 203400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2034]'); insert into test_proxima_be_restart_with_inc_stage values(2035, 'name2035', 2045.111, 203500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2035]'); insert into test_proxima_be_restart_with_inc_stage values(2036, 'name2036', 2046.111, 203600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2036]'); insert into test_proxima_be_restart_with_inc_stage values(2037, 'name2037', 2047.111, 203700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2037]'); insert into test_proxima_be_restart_with_inc_stage values(2038, 'name2038', 2048.111, 203800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2038]'); insert into test_proxima_be_restart_with_inc_stage values(2039, 'name2039', 2049.111, 203900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2039]'); insert into test_proxima_be_restart_with_inc_stage values(2040, 'name2040', 2050.111, 204000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2040]'); insert into test_proxima_be_restart_with_inc_stage values(2041, 'name2041', 2051.111, 204100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2041]'); insert into test_proxima_be_restart_with_inc_stage values(2042, 'name2042', 2052.111, 204200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2042]'); insert into test_proxima_be_restart_with_inc_stage values(2043, 'name2043', 2053.111, 204300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2043]'); insert into test_proxima_be_restart_with_inc_stage values(2044, 'name2044', 2054.111, 204400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2044]'); insert into test_proxima_be_restart_with_inc_stage values(2045, 'name2045', 2055.111, 204500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2045]'); insert into test_proxima_be_restart_with_inc_stage values(2046, 'name2046', 2056.111, 204600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2046]'); insert into test_proxima_be_restart_with_inc_stage values(2047, 'name2047', 2057.111, 204700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2047]'); insert into test_proxima_be_restart_with_inc_stage values(2048, 'name2048', 2058.111, 204800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2048]'); insert into test_proxima_be_restart_with_inc_stage values(2049, 'name2049', 2059.111, 204900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2049]'); insert into test_proxima_be_restart_with_inc_stage values(2050, 'name2050', 2060.111, 205000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2050]'); insert into test_proxima_be_restart_with_inc_stage values(2051, 'name2051', 2061.111, 205100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2051]'); insert into test_proxima_be_restart_with_inc_stage values(2052, 'name2052', 2062.111, 205200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2052]'); insert into test_proxima_be_restart_with_inc_stage values(2053, 'name2053', 2063.111, 205300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2053]'); insert into test_proxima_be_restart_with_inc_stage values(2054, 'name2054', 2064.111, 205400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2054]'); insert into test_proxima_be_restart_with_inc_stage values(2055, 'name2055', 2065.111, 205500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2055]'); insert into test_proxima_be_restart_with_inc_stage values(2056, 'name2056', 2066.111, 205600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2056]'); insert into test_proxima_be_restart_with_inc_stage values(2057, 'name2057', 2067.111, 205700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2057]'); insert into test_proxima_be_restart_with_inc_stage values(2058, 'name2058', 2068.111, 205800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2058]'); insert into test_proxima_be_restart_with_inc_stage values(2059, 'name2059', 2069.111, 205900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2059]'); insert into test_proxima_be_restart_with_inc_stage values(2060, 'name2060', 2070.111, 206000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2060]'); insert into test_proxima_be_restart_with_inc_stage values(2061, 'name2061', 2071.111, 206100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2061]'); insert into test_proxima_be_restart_with_inc_stage values(2062, 'name2062', 2072.111, 206200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2062]'); insert into test_proxima_be_restart_with_inc_stage values(2063, 'name2063', 2073.111, 206300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2063]'); insert into test_proxima_be_restart_with_inc_stage values(2064, 'name2064', 2074.111, 206400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2064]'); insert into test_proxima_be_restart_with_inc_stage values(2065, 'name2065', 2075.111, 206500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2065]'); insert into test_proxima_be_restart_with_inc_stage values(2066, 'name2066', 2076.111, 206600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2066]'); insert into test_proxima_be_restart_with_inc_stage values(2067, 'name2067', 2077.111, 206700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2067]'); insert into test_proxima_be_restart_with_inc_stage values(2068, 'name2068', 2078.111, 206800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2068]'); insert into test_proxima_be_restart_with_inc_stage values(2069, 'name2069', 2079.111, 206900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2069]'); insert into test_proxima_be_restart_with_inc_stage values(2070, 'name2070', 2080.111, 207000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2070]'); insert into test_proxima_be_restart_with_inc_stage values(2071, 'name2071', 2081.111, 207100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2071]'); insert into test_proxima_be_restart_with_inc_stage values(2072, 'name2072', 2082.111, 207200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2072]'); insert into test_proxima_be_restart_with_inc_stage values(2073, 'name2073', 2083.111, 207300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2073]'); insert into test_proxima_be_restart_with_inc_stage values(2074, 'name2074', 2084.111, 207400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2074]'); insert into test_proxima_be_restart_with_inc_stage values(2075, 'name2075', 2085.111, 207500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2075]'); insert into test_proxima_be_restart_with_inc_stage values(2076, 'name2076', 2086.111, 207600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2076]'); insert into test_proxima_be_restart_with_inc_stage values(2077, 'name2077', 2087.111, 207700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2077]'); insert into test_proxima_be_restart_with_inc_stage values(2078, 'name2078', 2088.111, 207800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2078]'); insert into test_proxima_be_restart_with_inc_stage values(2079, 'name2079', 2089.111, 207900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2079]'); insert into test_proxima_be_restart_with_inc_stage values(2080, 'name2080', 2090.111, 208000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2080]'); insert into test_proxima_be_restart_with_inc_stage values(2081, 'name2081', 2091.111, 208100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2081]'); insert into test_proxima_be_restart_with_inc_stage values(2082, 'name2082', 2092.111, 208200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2082]'); insert into test_proxima_be_restart_with_inc_stage values(2083, 'name2083', 2093.111, 208300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2083]'); insert into test_proxima_be_restart_with_inc_stage values(2084, 'name2084', 2094.111, 208400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2084]'); insert into test_proxima_be_restart_with_inc_stage values(2085, 'name2085', 2095.111, 208500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2085]'); insert into test_proxima_be_restart_with_inc_stage values(2086, 'name2086', 2096.111, 208600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2086]'); insert into test_proxima_be_restart_with_inc_stage values(2087, 'name2087', 2097.111, 208700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2087]'); insert into test_proxima_be_restart_with_inc_stage values(2088, 'name2088', 2098.111, 208800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2088]'); insert into test_proxima_be_restart_with_inc_stage values(2089, 'name2089', 2099.111, 208900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2089]'); insert into test_proxima_be_restart_with_inc_stage values(2090, 'name2090', 2100.111, 209000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2090]'); insert into test_proxima_be_restart_with_inc_stage values(2091, 'name2091', 2101.111, 209100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2091]'); insert into test_proxima_be_restart_with_inc_stage values(2092, 'name2092', 2102.111, 209200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2092]'); insert into test_proxima_be_restart_with_inc_stage values(2093, 'name2093', 2103.111, 209300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2093]'); insert into test_proxima_be_restart_with_inc_stage values(2094, 'name2094', 2104.111, 209400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2094]'); insert into test_proxima_be_restart_with_inc_stage values(2095, 'name2095', 2105.111, 209500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2095]'); insert into test_proxima_be_restart_with_inc_stage values(2096, 'name2096', 2106.111, 209600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2096]'); insert into test_proxima_be_restart_with_inc_stage values(2097, 'name2097', 2107.111, 209700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2097]'); insert into test_proxima_be_restart_with_inc_stage values(2098, 'name2098', 2108.111, 209800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2098]'); insert into test_proxima_be_restart_with_inc_stage values(2099, 'name2099', 2109.111, 209900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2099]'); insert into test_proxima_be_restart_with_inc_stage values(2100, 'name2100', 2110.111, 210000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2100]'); insert into test_proxima_be_restart_with_inc_stage values(2101, 'name2101', 2111.111, 210100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2101]'); insert into test_proxima_be_restart_with_inc_stage values(2102, 'name2102', 2112.111, 210200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2102]'); insert into test_proxima_be_restart_with_inc_stage values(2103, 'name2103', 2113.111, 210300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2103]'); insert into test_proxima_be_restart_with_inc_stage values(2104, 'name2104', 2114.111, 210400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2104]'); insert into test_proxima_be_restart_with_inc_stage values(2105, 'name2105', 2115.111, 210500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2105]'); insert into test_proxima_be_restart_with_inc_stage values(2106, 'name2106', 2116.111, 210600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2106]'); insert into test_proxima_be_restart_with_inc_stage values(2107, 'name2107', 2117.111, 210700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2107]'); insert into test_proxima_be_restart_with_inc_stage values(2108, 'name2108', 2118.111, 210800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2108]'); insert into test_proxima_be_restart_with_inc_stage values(2109, 'name2109', 2119.111, 210900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2109]'); insert into test_proxima_be_restart_with_inc_stage values(2110, 'name2110', 2120.111, 211000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2110]'); insert into test_proxima_be_restart_with_inc_stage values(2111, 'name2111', 2121.111, 211100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2111]'); insert into test_proxima_be_restart_with_inc_stage values(2112, 'name2112', 2122.111, 211200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2112]'); insert into test_proxima_be_restart_with_inc_stage values(2113, 'name2113', 2123.111, 211300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2113]'); insert into test_proxima_be_restart_with_inc_stage values(2114, 'name2114', 2124.111, 211400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2114]'); insert into test_proxima_be_restart_with_inc_stage values(2115, 'name2115', 2125.111, 211500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2115]'); insert into test_proxima_be_restart_with_inc_stage values(2116, 'name2116', 2126.111, 211600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2116]'); insert into test_proxima_be_restart_with_inc_stage values(2117, 'name2117', 2127.111, 211700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2117]'); insert into test_proxima_be_restart_with_inc_stage values(2118, 'name2118', 2128.111, 211800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2118]'); insert into test_proxima_be_restart_with_inc_stage values(2119, 'name2119', 2129.111, 211900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2119]'); insert into test_proxima_be_restart_with_inc_stage values(2120, 'name2120', 2130.111, 212000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2120]'); insert into test_proxima_be_restart_with_inc_stage values(2121, 'name2121', 2131.111, 212100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2121]'); insert into test_proxima_be_restart_with_inc_stage values(2122, 'name2122', 2132.111, 212200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2122]'); insert into test_proxima_be_restart_with_inc_stage values(2123, 'name2123', 2133.111, 212300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2123]'); insert into test_proxima_be_restart_with_inc_stage values(2124, 'name2124', 2134.111, 212400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2124]'); insert into test_proxima_be_restart_with_inc_stage values(2125, 'name2125', 2135.111, 212500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2125]'); insert into test_proxima_be_restart_with_inc_stage values(2126, 'name2126', 2136.111, 212600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2126]'); insert into test_proxima_be_restart_with_inc_stage values(2127, 'name2127', 2137.111, 212700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2127]'); insert into test_proxima_be_restart_with_inc_stage values(2128, 'name2128', 2138.111, 212800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2128]'); insert into test_proxima_be_restart_with_inc_stage values(2129, 'name2129', 2139.111, 212900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2129]'); insert into test_proxima_be_restart_with_inc_stage values(2130, 'name2130', 2140.111, 213000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2130]'); insert into test_proxima_be_restart_with_inc_stage values(2131, 'name2131', 2141.111, 213100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2131]'); insert into test_proxima_be_restart_with_inc_stage values(2132, 'name2132', 2142.111, 213200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2132]'); insert into test_proxima_be_restart_with_inc_stage values(2133, 'name2133', 2143.111, 213300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2133]'); insert into test_proxima_be_restart_with_inc_stage values(2134, 'name2134', 2144.111, 213400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2134]'); insert into test_proxima_be_restart_with_inc_stage values(2135, 'name2135', 2145.111, 213500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2135]'); insert into test_proxima_be_restart_with_inc_stage values(2136, 'name2136', 2146.111, 213600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2136]'); insert into test_proxima_be_restart_with_inc_stage values(2137, 'name2137', 2147.111, 213700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2137]'); insert into test_proxima_be_restart_with_inc_stage values(2138, 'name2138', 2148.111, 213800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2138]'); insert into test_proxima_be_restart_with_inc_stage values(2139, 'name2139', 2149.111, 213900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2139]'); insert into test_proxima_be_restart_with_inc_stage values(2140, 'name2140', 2150.111, 214000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2140]'); insert into test_proxima_be_restart_with_inc_stage values(2141, 'name2141', 2151.111, 214100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2141]'); insert into test_proxima_be_restart_with_inc_stage values(2142, 'name2142', 2152.111, 214200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2142]'); insert into test_proxima_be_restart_with_inc_stage values(2143, 'name2143', 2153.111, 214300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2143]'); insert into test_proxima_be_restart_with_inc_stage values(2144, 'name2144', 2154.111, 214400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2144]'); insert into test_proxima_be_restart_with_inc_stage values(2145, 'name2145', 2155.111, 214500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2145]'); insert into test_proxima_be_restart_with_inc_stage values(2146, 'name2146', 2156.111, 214600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2146]'); insert into test_proxima_be_restart_with_inc_stage values(2147, 'name2147', 2157.111, 214700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2147]'); insert into test_proxima_be_restart_with_inc_stage values(2148, 'name2148', 2158.111, 214800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2148]'); insert into test_proxima_be_restart_with_inc_stage values(2149, 'name2149', 2159.111, 214900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2149]'); insert into test_proxima_be_restart_with_inc_stage values(2150, 'name2150', 2160.111, 215000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2150]'); insert into test_proxima_be_restart_with_inc_stage values(2151, 'name2151', 2161.111, 215100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2151]'); insert into test_proxima_be_restart_with_inc_stage values(2152, 'name2152', 2162.111, 215200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2152]'); insert into test_proxima_be_restart_with_inc_stage values(2153, 'name2153', 2163.111, 215300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2153]'); insert into test_proxima_be_restart_with_inc_stage values(2154, 'name2154', 2164.111, 215400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2154]'); insert into test_proxima_be_restart_with_inc_stage values(2155, 'name2155', 2165.111, 215500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2155]'); insert into test_proxima_be_restart_with_inc_stage values(2156, 'name2156', 2166.111, 215600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2156]'); insert into test_proxima_be_restart_with_inc_stage values(2157, 'name2157', 2167.111, 215700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2157]'); insert into test_proxima_be_restart_with_inc_stage values(2158, 'name2158', 2168.111, 215800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2158]'); insert into test_proxima_be_restart_with_inc_stage values(2159, 'name2159', 2169.111, 215900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2159]'); insert into test_proxima_be_restart_with_inc_stage values(2160, 'name2160', 2170.111, 216000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2160]'); insert into test_proxima_be_restart_with_inc_stage values(2161, 'name2161', 2171.111, 216100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2161]'); insert into test_proxima_be_restart_with_inc_stage values(2162, 'name2162', 2172.111, 216200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2162]'); insert into test_proxima_be_restart_with_inc_stage values(2163, 'name2163', 2173.111, 216300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2163]'); insert into test_proxima_be_restart_with_inc_stage values(2164, 'name2164', 2174.111, 216400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2164]'); insert into test_proxima_be_restart_with_inc_stage values(2165, 'name2165', 2175.111, 216500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2165]'); insert into test_proxima_be_restart_with_inc_stage values(2166, 'name2166', 2176.111, 216600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2166]'); insert into test_proxima_be_restart_with_inc_stage values(2167, 'name2167', 2177.111, 216700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2167]'); insert into test_proxima_be_restart_with_inc_stage values(2168, 'name2168', 2178.111, 216800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2168]'); insert into test_proxima_be_restart_with_inc_stage values(2169, 'name2169', 2179.111, 216900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2169]'); insert into test_proxima_be_restart_with_inc_stage values(2170, 'name2170', 2180.111, 217000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2170]'); insert into test_proxima_be_restart_with_inc_stage values(2171, 'name2171', 2181.111, 217100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2171]'); insert into test_proxima_be_restart_with_inc_stage values(2172, 'name2172', 2182.111, 217200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2172]'); insert into test_proxima_be_restart_with_inc_stage values(2173, 'name2173', 2183.111, 217300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2173]'); insert into test_proxima_be_restart_with_inc_stage values(2174, 'name2174', 2184.111, 217400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2174]'); insert into test_proxima_be_restart_with_inc_stage values(2175, 'name2175', 2185.111, 217500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2175]'); insert into test_proxima_be_restart_with_inc_stage values(2176, 'name2176', 2186.111, 217600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2176]'); insert into test_proxima_be_restart_with_inc_stage values(2177, 'name2177', 2187.111, 217700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2177]'); insert into test_proxima_be_restart_with_inc_stage values(2178, 'name2178', 2188.111, 217800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2178]'); insert into test_proxima_be_restart_with_inc_stage values(2179, 'name2179', 2189.111, 217900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2179]'); insert into test_proxima_be_restart_with_inc_stage values(2180, 'name2180', 2190.111, 218000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2180]'); insert into test_proxima_be_restart_with_inc_stage values(2181, 'name2181', 2191.111, 218100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2181]'); insert into test_proxima_be_restart_with_inc_stage values(2182, 'name2182', 2192.111, 218200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2182]'); insert into test_proxima_be_restart_with_inc_stage values(2183, 'name2183', 2193.111, 218300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2183]'); insert into test_proxima_be_restart_with_inc_stage values(2184, 'name2184', 2194.111, 218400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2184]'); insert into test_proxima_be_restart_with_inc_stage values(2185, 'name2185', 2195.111, 218500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2185]'); insert into test_proxima_be_restart_with_inc_stage values(2186, 'name2186', 2196.111, 218600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2186]'); insert into test_proxima_be_restart_with_inc_stage values(2187, 'name2187', 2197.111, 218700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2187]'); insert into test_proxima_be_restart_with_inc_stage values(2188, 'name2188', 2198.111, 218800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2188]'); insert into test_proxima_be_restart_with_inc_stage values(2189, 'name2189', 2199.111, 218900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2189]'); insert into test_proxima_be_restart_with_inc_stage values(2190, 'name2190', 2200.111, 219000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2190]'); insert into test_proxima_be_restart_with_inc_stage values(2191, 'name2191', 2201.111, 219100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2191]'); insert into test_proxima_be_restart_with_inc_stage values(2192, 'name2192', 2202.111, 219200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2192]'); insert into test_proxima_be_restart_with_inc_stage values(2193, 'name2193', 2203.111, 219300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2193]'); insert into test_proxima_be_restart_with_inc_stage values(2194, 'name2194', 2204.111, 219400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2194]'); insert into test_proxima_be_restart_with_inc_stage values(2195, 'name2195', 2205.111, 219500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2195]'); insert into test_proxima_be_restart_with_inc_stage values(2196, 'name2196', 2206.111, 219600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2196]'); insert into test_proxima_be_restart_with_inc_stage values(2197, 'name2197', 2207.111, 219700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2197]'); insert into test_proxima_be_restart_with_inc_stage values(2198, 'name2198', 2208.111, 219800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2198]'); insert into test_proxima_be_restart_with_inc_stage values(2199, 'name2199', 2209.111, 219900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2199]'); insert into test_proxima_be_restart_with_inc_stage values(2200, 'name2200', 2210.111, 220000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2200]'); insert into test_proxima_be_restart_with_inc_stage values(2201, 'name2201', 2211.111, 220100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2201]'); insert into test_proxima_be_restart_with_inc_stage values(2202, 'name2202', 2212.111, 220200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2202]'); insert into test_proxima_be_restart_with_inc_stage values(2203, 'name2203', 2213.111, 220300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2203]'); insert into test_proxima_be_restart_with_inc_stage values(2204, 'name2204', 2214.111, 220400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2204]'); insert into test_proxima_be_restart_with_inc_stage values(2205, 'name2205', 2215.111, 220500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2205]'); insert into test_proxima_be_restart_with_inc_stage values(2206, 'name2206', 2216.111, 220600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2206]'); insert into test_proxima_be_restart_with_inc_stage values(2207, 'name2207', 2217.111, 220700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2207]'); insert into test_proxima_be_restart_with_inc_stage values(2208, 'name2208', 2218.111, 220800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2208]'); insert into test_proxima_be_restart_with_inc_stage values(2209, 'name2209', 2219.111, 220900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2209]'); insert into test_proxima_be_restart_with_inc_stage values(2210, 'name2210', 2220.111, 221000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2210]'); insert into test_proxima_be_restart_with_inc_stage values(2211, 'name2211', 2221.111, 221100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2211]'); insert into test_proxima_be_restart_with_inc_stage values(2212, 'name2212', 2222.111, 221200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2212]'); insert into test_proxima_be_restart_with_inc_stage values(2213, 'name2213', 2223.111, 221300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2213]'); insert into test_proxima_be_restart_with_inc_stage values(2214, 'name2214', 2224.111, 221400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2214]'); insert into test_proxima_be_restart_with_inc_stage values(2215, 'name2215', 2225.111, 221500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2215]'); insert into test_proxima_be_restart_with_inc_stage values(2216, 'name2216', 2226.111, 221600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2216]'); insert into test_proxima_be_restart_with_inc_stage values(2217, 'name2217', 2227.111, 221700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2217]'); insert into test_proxima_be_restart_with_inc_stage values(2218, 'name2218', 2228.111, 221800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2218]'); insert into test_proxima_be_restart_with_inc_stage values(2219, 'name2219', 2229.111, 221900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2219]'); insert into test_proxima_be_restart_with_inc_stage values(2220, 'name2220', 2230.111, 222000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2220]'); insert into test_proxima_be_restart_with_inc_stage values(2221, 'name2221', 2231.111, 222100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2221]'); insert into test_proxima_be_restart_with_inc_stage values(2222, 'name2222', 2232.111, 222200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2222]'); insert into test_proxima_be_restart_with_inc_stage values(2223, 'name2223', 2233.111, 222300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2223]'); insert into test_proxima_be_restart_with_inc_stage values(2224, 'name2224', 2234.111, 222400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2224]'); insert into test_proxima_be_restart_with_inc_stage values(2225, 'name2225', 2235.111, 222500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2225]'); insert into test_proxima_be_restart_with_inc_stage values(2226, 'name2226', 2236.111, 222600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2226]'); insert into test_proxima_be_restart_with_inc_stage values(2227, 'name2227', 2237.111, 222700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2227]'); insert into test_proxima_be_restart_with_inc_stage values(2228, 'name2228', 2238.111, 222800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2228]'); insert into test_proxima_be_restart_with_inc_stage values(2229, 'name2229', 2239.111, 222900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2229]'); insert into test_proxima_be_restart_with_inc_stage values(2230, 'name2230', 2240.111, 223000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2230]'); insert into test_proxima_be_restart_with_inc_stage values(2231, 'name2231', 2241.111, 223100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2231]'); insert into test_proxima_be_restart_with_inc_stage values(2232, 'name2232', 2242.111, 223200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2232]'); insert into test_proxima_be_restart_with_inc_stage values(2233, 'name2233', 2243.111, 223300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2233]'); insert into test_proxima_be_restart_with_inc_stage values(2234, 'name2234', 2244.111, 223400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2234]'); insert into test_proxima_be_restart_with_inc_stage values(2235, 'name2235', 2245.111, 223500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2235]'); insert into test_proxima_be_restart_with_inc_stage values(2236, 'name2236', 2246.111, 223600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2236]'); insert into test_proxima_be_restart_with_inc_stage values(2237, 'name2237', 2247.111, 223700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2237]'); insert into test_proxima_be_restart_with_inc_stage values(2238, 'name2238', 2248.111, 223800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2238]'); insert into test_proxima_be_restart_with_inc_stage values(2239, 'name2239', 2249.111, 223900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2239]'); insert into test_proxima_be_restart_with_inc_stage values(2240, 'name2240', 2250.111, 224000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2240]'); insert into test_proxima_be_restart_with_inc_stage values(2241, 'name2241', 2251.111, 224100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2241]'); insert into test_proxima_be_restart_with_inc_stage values(2242, 'name2242', 2252.111, 224200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2242]'); insert into test_proxima_be_restart_with_inc_stage values(2243, 'name2243', 2253.111, 224300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2243]'); insert into test_proxima_be_restart_with_inc_stage values(2244, 'name2244', 2254.111, 224400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2244]'); insert into test_proxima_be_restart_with_inc_stage values(2245, 'name2245', 2255.111, 224500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2245]'); insert into test_proxima_be_restart_with_inc_stage values(2246, 'name2246', 2256.111, 224600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2246]'); insert into test_proxima_be_restart_with_inc_stage values(2247, 'name2247', 2257.111, 224700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2247]'); insert into test_proxima_be_restart_with_inc_stage values(2248, 'name2248', 2258.111, 224800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2248]'); insert into test_proxima_be_restart_with_inc_stage values(2249, 'name2249', 2259.111, 224900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2249]'); insert into test_proxima_be_restart_with_inc_stage values(2250, 'name2250', 2260.111, 225000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2250]'); insert into test_proxima_be_restart_with_inc_stage values(2251, 'name2251', 2261.111, 225100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2251]'); insert into test_proxima_be_restart_with_inc_stage values(2252, 'name2252', 2262.111, 225200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2252]'); insert into test_proxima_be_restart_with_inc_stage values(2253, 'name2253', 2263.111, 225300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2253]'); insert into test_proxima_be_restart_with_inc_stage values(2254, 'name2254', 2264.111, 225400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2254]'); insert into test_proxima_be_restart_with_inc_stage values(2255, 'name2255', 2265.111, 225500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2255]'); insert into test_proxima_be_restart_with_inc_stage values(2256, 'name2256', 2266.111, 225600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2256]'); insert into test_proxima_be_restart_with_inc_stage values(2257, 'name2257', 2267.111, 225700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2257]'); insert into test_proxima_be_restart_with_inc_stage values(2258, 'name2258', 2268.111, 225800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2258]'); insert into test_proxima_be_restart_with_inc_stage values(2259, 'name2259', 2269.111, 225900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2259]'); insert into test_proxima_be_restart_with_inc_stage values(2260, 'name2260', 2270.111, 226000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2260]'); insert into test_proxima_be_restart_with_inc_stage values(2261, 'name2261', 2271.111, 226100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2261]'); insert into test_proxima_be_restart_with_inc_stage values(2262, 'name2262', 2272.111, 226200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2262]'); insert into test_proxima_be_restart_with_inc_stage values(2263, 'name2263', 2273.111, 226300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2263]'); insert into test_proxima_be_restart_with_inc_stage values(2264, 'name2264', 2274.111, 226400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2264]'); insert into test_proxima_be_restart_with_inc_stage values(2265, 'name2265', 2275.111, 226500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2265]'); insert into test_proxima_be_restart_with_inc_stage values(2266, 'name2266', 2276.111, 226600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2266]'); insert into test_proxima_be_restart_with_inc_stage values(2267, 'name2267', 2277.111, 226700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2267]'); insert into test_proxima_be_restart_with_inc_stage values(2268, 'name2268', 2278.111, 226800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2268]'); insert into test_proxima_be_restart_with_inc_stage values(2269, 'name2269', 2279.111, 226900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2269]'); insert into test_proxima_be_restart_with_inc_stage values(2270, 'name2270', 2280.111, 227000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2270]'); insert into test_proxima_be_restart_with_inc_stage values(2271, 'name2271', 2281.111, 227100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2271]'); insert into test_proxima_be_restart_with_inc_stage values(2272, 'name2272', 2282.111, 227200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2272]'); insert into test_proxima_be_restart_with_inc_stage values(2273, 'name2273', 2283.111, 227300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2273]'); insert into test_proxima_be_restart_with_inc_stage values(2274, 'name2274', 2284.111, 227400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2274]'); insert into test_proxima_be_restart_with_inc_stage values(2275, 'name2275', 2285.111, 227500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2275]'); insert into test_proxima_be_restart_with_inc_stage values(2276, 'name2276', 2286.111, 227600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2276]'); insert into test_proxima_be_restart_with_inc_stage values(2277, 'name2277', 2287.111, 227700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2277]'); insert into test_proxima_be_restart_with_inc_stage values(2278, 'name2278', 2288.111, 227800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2278]'); insert into test_proxima_be_restart_with_inc_stage values(2279, 'name2279', 2289.111, 227900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2279]'); insert into test_proxima_be_restart_with_inc_stage values(2280, 'name2280', 2290.111, 228000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2280]'); insert into test_proxima_be_restart_with_inc_stage values(2281, 'name2281', 2291.111, 228100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2281]'); insert into test_proxima_be_restart_with_inc_stage values(2282, 'name2282', 2292.111, 228200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2282]'); insert into test_proxima_be_restart_with_inc_stage values(2283, 'name2283', 2293.111, 228300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2283]'); insert into test_proxima_be_restart_with_inc_stage values(2284, 'name2284', 2294.111, 228400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2284]'); insert into test_proxima_be_restart_with_inc_stage values(2285, 'name2285', 2295.111, 228500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2285]'); insert into test_proxima_be_restart_with_inc_stage values(2286, 'name2286', 2296.111, 228600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2286]'); insert into test_proxima_be_restart_with_inc_stage values(2287, 'name2287', 2297.111, 228700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2287]'); insert into test_proxima_be_restart_with_inc_stage values(2288, 'name2288', 2298.111, 228800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2288]'); insert into test_proxima_be_restart_with_inc_stage values(2289, 'name2289', 2299.111, 228900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2289]'); insert into test_proxima_be_restart_with_inc_stage values(2290, 'name2290', 2300.111, 229000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2290]'); insert into test_proxima_be_restart_with_inc_stage values(2291, 'name2291', 2301.111, 229100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2291]'); insert into test_proxima_be_restart_with_inc_stage values(2292, 'name2292', 2302.111, 229200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2292]'); insert into test_proxima_be_restart_with_inc_stage values(2293, 'name2293', 2303.111, 229300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2293]'); insert into test_proxima_be_restart_with_inc_stage values(2294, 'name2294', 2304.111, 229400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2294]'); insert into test_proxima_be_restart_with_inc_stage values(2295, 'name2295', 2305.111, 229500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2295]'); insert into test_proxima_be_restart_with_inc_stage values(2296, 'name2296', 2306.111, 229600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2296]'); insert into test_proxima_be_restart_with_inc_stage values(2297, 'name2297', 2307.111, 229700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2297]'); insert into test_proxima_be_restart_with_inc_stage values(2298, 'name2298', 2308.111, 229800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2298]'); insert into test_proxima_be_restart_with_inc_stage values(2299, 'name2299', 2309.111, 229900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2299]'); insert into test_proxima_be_restart_with_inc_stage values(2300, 'name2300', 2310.111, 230000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2300]'); insert into test_proxima_be_restart_with_inc_stage values(2301, 'name2301', 2311.111, 230100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2301]'); insert into test_proxima_be_restart_with_inc_stage values(2302, 'name2302', 2312.111, 230200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2302]'); insert into test_proxima_be_restart_with_inc_stage values(2303, 'name2303', 2313.111, 230300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2303]'); insert into test_proxima_be_restart_with_inc_stage values(2304, 'name2304', 2314.111, 230400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2304]'); insert into test_proxima_be_restart_with_inc_stage values(2305, 'name2305', 2315.111, 230500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2305]'); insert into test_proxima_be_restart_with_inc_stage values(2306, 'name2306', 2316.111, 230600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2306]'); insert into test_proxima_be_restart_with_inc_stage values(2307, 'name2307', 2317.111, 230700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2307]'); insert into test_proxima_be_restart_with_inc_stage values(2308, 'name2308', 2318.111, 230800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2308]'); insert into test_proxima_be_restart_with_inc_stage values(2309, 'name2309', 2319.111, 230900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2309]'); insert into test_proxima_be_restart_with_inc_stage values(2310, 'name2310', 2320.111, 231000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2310]'); insert into test_proxima_be_restart_with_inc_stage values(2311, 'name2311', 2321.111, 231100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2311]'); insert into test_proxima_be_restart_with_inc_stage values(2312, 'name2312', 2322.111, 231200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2312]'); insert into test_proxima_be_restart_with_inc_stage values(2313, 'name2313', 2323.111, 231300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2313]'); insert into test_proxima_be_restart_with_inc_stage values(2314, 'name2314', 2324.111, 231400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2314]'); insert into test_proxima_be_restart_with_inc_stage values(2315, 'name2315', 2325.111, 231500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2315]'); insert into test_proxima_be_restart_with_inc_stage values(2316, 'name2316', 2326.111, 231600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2316]'); insert into test_proxima_be_restart_with_inc_stage values(2317, 'name2317', 2327.111, 231700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2317]'); insert into test_proxima_be_restart_with_inc_stage values(2318, 'name2318', 2328.111, 231800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2318]'); insert into test_proxima_be_restart_with_inc_stage values(2319, 'name2319', 2329.111, 231900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2319]'); insert into test_proxima_be_restart_with_inc_stage values(2320, 'name2320', 2330.111, 232000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2320]'); insert into test_proxima_be_restart_with_inc_stage values(2321, 'name2321', 2331.111, 232100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2321]'); insert into test_proxima_be_restart_with_inc_stage values(2322, 'name2322', 2332.111, 232200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2322]'); insert into test_proxima_be_restart_with_inc_stage values(2323, 'name2323', 2333.111, 232300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2323]'); insert into test_proxima_be_restart_with_inc_stage values(2324, 'name2324', 2334.111, 232400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2324]'); insert into test_proxima_be_restart_with_inc_stage values(2325, 'name2325', 2335.111, 232500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2325]'); insert into test_proxima_be_restart_with_inc_stage values(2326, 'name2326', 2336.111, 232600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2326]'); insert into test_proxima_be_restart_with_inc_stage values(2327, 'name2327', 2337.111, 232700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2327]'); insert into test_proxima_be_restart_with_inc_stage values(2328, 'name2328', 2338.111, 232800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2328]'); insert into test_proxima_be_restart_with_inc_stage values(2329, 'name2329', 2339.111, 232900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2329]'); insert into test_proxima_be_restart_with_inc_stage values(2330, 'name2330', 2340.111, 233000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2330]'); insert into test_proxima_be_restart_with_inc_stage values(2331, 'name2331', 2341.111, 233100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2331]'); insert into test_proxima_be_restart_with_inc_stage values(2332, 'name2332', 2342.111, 233200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2332]'); insert into test_proxima_be_restart_with_inc_stage values(2333, 'name2333', 2343.111, 233300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2333]'); insert into test_proxima_be_restart_with_inc_stage values(2334, 'name2334', 2344.111, 233400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2334]'); insert into test_proxima_be_restart_with_inc_stage values(2335, 'name2335', 2345.111, 233500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2335]'); insert into test_proxima_be_restart_with_inc_stage values(2336, 'name2336', 2346.111, 233600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2336]'); insert into test_proxima_be_restart_with_inc_stage values(2337, 'name2337', 2347.111, 233700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2337]'); insert into test_proxima_be_restart_with_inc_stage values(2338, 'name2338', 2348.111, 233800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2338]'); insert into test_proxima_be_restart_with_inc_stage values(2339, 'name2339', 2349.111, 233900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2339]'); insert into test_proxima_be_restart_with_inc_stage values(2340, 'name2340', 2350.111, 234000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2340]'); insert into test_proxima_be_restart_with_inc_stage values(2341, 'name2341', 2351.111, 234100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2341]'); insert into test_proxima_be_restart_with_inc_stage values(2342, 'name2342', 2352.111, 234200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2342]'); insert into test_proxima_be_restart_with_inc_stage values(2343, 'name2343', 2353.111, 234300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2343]'); insert into test_proxima_be_restart_with_inc_stage values(2344, 'name2344', 2354.111, 234400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2344]'); insert into test_proxima_be_restart_with_inc_stage values(2345, 'name2345', 2355.111, 234500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2345]'); insert into test_proxima_be_restart_with_inc_stage values(2346, 'name2346', 2356.111, 234600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2346]'); insert into test_proxima_be_restart_with_inc_stage values(2347, 'name2347', 2357.111, 234700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2347]'); insert into test_proxima_be_restart_with_inc_stage values(2348, 'name2348', 2358.111, 234800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2348]'); insert into test_proxima_be_restart_with_inc_stage values(2349, 'name2349', 2359.111, 234900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2349]'); insert into test_proxima_be_restart_with_inc_stage values(2350, 'name2350', 2360.111, 235000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2350]'); insert into test_proxima_be_restart_with_inc_stage values(2351, 'name2351', 2361.111, 235100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2351]'); insert into test_proxima_be_restart_with_inc_stage values(2352, 'name2352', 2362.111, 235200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2352]'); insert into test_proxima_be_restart_with_inc_stage values(2353, 'name2353', 2363.111, 235300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2353]'); insert into test_proxima_be_restart_with_inc_stage values(2354, 'name2354', 2364.111, 235400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2354]'); insert into test_proxima_be_restart_with_inc_stage values(2355, 'name2355', 2365.111, 235500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2355]'); insert into test_proxima_be_restart_with_inc_stage values(2356, 'name2356', 2366.111, 235600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2356]'); insert into test_proxima_be_restart_with_inc_stage values(2357, 'name2357', 2367.111, 235700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2357]'); insert into test_proxima_be_restart_with_inc_stage values(2358, 'name2358', 2368.111, 235800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2358]'); insert into test_proxima_be_restart_with_inc_stage values(2359, 'name2359', 2369.111, 235900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2359]'); insert into test_proxima_be_restart_with_inc_stage values(2360, 'name2360', 2370.111, 236000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2360]'); insert into test_proxima_be_restart_with_inc_stage values(2361, 'name2361', 2371.111, 236100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2361]'); insert into test_proxima_be_restart_with_inc_stage values(2362, 'name2362', 2372.111, 236200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2362]'); insert into test_proxima_be_restart_with_inc_stage values(2363, 'name2363', 2373.111, 236300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2363]'); insert into test_proxima_be_restart_with_inc_stage values(2364, 'name2364', 2374.111, 236400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2364]'); insert into test_proxima_be_restart_with_inc_stage values(2365, 'name2365', 2375.111, 236500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2365]'); insert into test_proxima_be_restart_with_inc_stage values(2366, 'name2366', 2376.111, 236600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2366]'); insert into test_proxima_be_restart_with_inc_stage values(2367, 'name2367', 2377.111, 236700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2367]'); insert into test_proxima_be_restart_with_inc_stage values(2368, 'name2368', 2378.111, 236800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2368]'); insert into test_proxima_be_restart_with_inc_stage values(2369, 'name2369', 2379.111, 236900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2369]'); insert into test_proxima_be_restart_with_inc_stage values(2370, 'name2370', 2380.111, 237000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2370]'); insert into test_proxima_be_restart_with_inc_stage values(2371, 'name2371', 2381.111, 237100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2371]'); insert into test_proxima_be_restart_with_inc_stage values(2372, 'name2372', 2382.111, 237200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2372]'); insert into test_proxima_be_restart_with_inc_stage values(2373, 'name2373', 2383.111, 237300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2373]'); insert into test_proxima_be_restart_with_inc_stage values(2374, 'name2374', 2384.111, 237400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2374]'); insert into test_proxima_be_restart_with_inc_stage values(2375, 'name2375', 2385.111, 237500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2375]'); insert into test_proxima_be_restart_with_inc_stage values(2376, 'name2376', 2386.111, 237600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2376]'); insert into test_proxima_be_restart_with_inc_stage values(2377, 'name2377', 2387.111, 237700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2377]'); insert into test_proxima_be_restart_with_inc_stage values(2378, 'name2378', 2388.111, 237800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2378]'); insert into test_proxima_be_restart_with_inc_stage values(2379, 'name2379', 2389.111, 237900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2379]'); insert into test_proxima_be_restart_with_inc_stage values(2380, 'name2380', 2390.111, 238000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2380]'); insert into test_proxima_be_restart_with_inc_stage values(2381, 'name2381', 2391.111, 238100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2381]'); insert into test_proxima_be_restart_with_inc_stage values(2382, 'name2382', 2392.111, 238200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2382]'); insert into test_proxima_be_restart_with_inc_stage values(2383, 'name2383', 2393.111, 238300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2383]'); insert into test_proxima_be_restart_with_inc_stage values(2384, 'name2384', 2394.111, 238400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2384]'); insert into test_proxima_be_restart_with_inc_stage values(2385, 'name2385', 2395.111, 238500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2385]'); insert into test_proxima_be_restart_with_inc_stage values(2386, 'name2386', 2396.111, 238600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2386]'); insert into test_proxima_be_restart_with_inc_stage values(2387, 'name2387', 2397.111, 238700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2387]'); insert into test_proxima_be_restart_with_inc_stage values(2388, 'name2388', 2398.111, 238800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2388]'); insert into test_proxima_be_restart_with_inc_stage values(2389, 'name2389', 2399.111, 238900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2389]'); insert into test_proxima_be_restart_with_inc_stage values(2390, 'name2390', 2400.111, 239000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2390]'); insert into test_proxima_be_restart_with_inc_stage values(2391, 'name2391', 2401.111, 239100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2391]'); insert into test_proxima_be_restart_with_inc_stage values(2392, 'name2392', 2402.111, 239200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2392]'); insert into test_proxima_be_restart_with_inc_stage values(2393, 'name2393', 2403.111, 239300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2393]'); insert into test_proxima_be_restart_with_inc_stage values(2394, 'name2394', 2404.111, 239400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2394]'); insert into test_proxima_be_restart_with_inc_stage values(2395, 'name2395', 2405.111, 239500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2395]'); insert into test_proxima_be_restart_with_inc_stage values(2396, 'name2396', 2406.111, 239600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2396]'); insert into test_proxima_be_restart_with_inc_stage values(2397, 'name2397', 2407.111, 239700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2397]'); insert into test_proxima_be_restart_with_inc_stage values(2398, 'name2398', 2408.111, 239800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2398]'); insert into test_proxima_be_restart_with_inc_stage values(2399, 'name2399', 2409.111, 239900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2399]'); insert into test_proxima_be_restart_with_inc_stage values(2400, 'name2400', 2410.111, 240000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2400]'); insert into test_proxima_be_restart_with_inc_stage values(2401, 'name2401', 2411.111, 240100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2401]'); insert into test_proxima_be_restart_with_inc_stage values(2402, 'name2402', 2412.111, 240200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2402]'); insert into test_proxima_be_restart_with_inc_stage values(2403, 'name2403', 2413.111, 240300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2403]'); insert into test_proxima_be_restart_with_inc_stage values(2404, 'name2404', 2414.111, 240400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2404]'); insert into test_proxima_be_restart_with_inc_stage values(2405, 'name2405', 2415.111, 240500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2405]'); insert into test_proxima_be_restart_with_inc_stage values(2406, 'name2406', 2416.111, 240600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2406]'); insert into test_proxima_be_restart_with_inc_stage values(2407, 'name2407', 2417.111, 240700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2407]'); insert into test_proxima_be_restart_with_inc_stage values(2408, 'name2408', 2418.111, 240800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2408]'); insert into test_proxima_be_restart_with_inc_stage values(2409, 'name2409', 2419.111, 240900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2409]'); insert into test_proxima_be_restart_with_inc_stage values(2410, 'name2410', 2420.111, 241000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2410]'); insert into test_proxima_be_restart_with_inc_stage values(2411, 'name2411', 2421.111, 241100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2411]'); insert into test_proxima_be_restart_with_inc_stage values(2412, 'name2412', 2422.111, 241200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2412]'); insert into test_proxima_be_restart_with_inc_stage values(2413, 'name2413', 2423.111, 241300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2413]'); insert into test_proxima_be_restart_with_inc_stage values(2414, 'name2414', 2424.111, 241400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2414]'); insert into test_proxima_be_restart_with_inc_stage values(2415, 'name2415', 2425.111, 241500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2415]'); insert into test_proxima_be_restart_with_inc_stage values(2416, 'name2416', 2426.111, 241600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2416]'); insert into test_proxima_be_restart_with_inc_stage values(2417, 'name2417', 2427.111, 241700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2417]'); insert into test_proxima_be_restart_with_inc_stage values(2418, 'name2418', 2428.111, 241800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2418]'); insert into test_proxima_be_restart_with_inc_stage values(2419, 'name2419', 2429.111, 241900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2419]'); insert into test_proxima_be_restart_with_inc_stage values(2420, 'name2420', 2430.111, 242000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2420]'); insert into test_proxima_be_restart_with_inc_stage values(2421, 'name2421', 2431.111, 242100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2421]'); insert into test_proxima_be_restart_with_inc_stage values(2422, 'name2422', 2432.111, 242200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2422]'); insert into test_proxima_be_restart_with_inc_stage values(2423, 'name2423', 2433.111, 242300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2423]'); insert into test_proxima_be_restart_with_inc_stage values(2424, 'name2424', 2434.111, 242400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2424]'); insert into test_proxima_be_restart_with_inc_stage values(2425, 'name2425', 2435.111, 242500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2425]'); insert into test_proxima_be_restart_with_inc_stage values(2426, 'name2426', 2436.111, 242600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2426]'); insert into test_proxima_be_restart_with_inc_stage values(2427, 'name2427', 2437.111, 242700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2427]'); insert into test_proxima_be_restart_with_inc_stage values(2428, 'name2428', 2438.111, 242800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2428]'); insert into test_proxima_be_restart_with_inc_stage values(2429, 'name2429', 2439.111, 242900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2429]'); insert into test_proxima_be_restart_with_inc_stage values(2430, 'name2430', 2440.111, 243000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2430]'); insert into test_proxima_be_restart_with_inc_stage values(2431, 'name2431', 2441.111, 243100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2431]'); insert into test_proxima_be_restart_with_inc_stage values(2432, 'name2432', 2442.111, 243200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2432]'); insert into test_proxima_be_restart_with_inc_stage values(2433, 'name2433', 2443.111, 243300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2433]'); insert into test_proxima_be_restart_with_inc_stage values(2434, 'name2434', 2444.111, 243400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2434]'); insert into test_proxima_be_restart_with_inc_stage values(2435, 'name2435', 2445.111, 243500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2435]'); insert into test_proxima_be_restart_with_inc_stage values(2436, 'name2436', 2446.111, 243600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2436]'); insert into test_proxima_be_restart_with_inc_stage values(2437, 'name2437', 2447.111, 243700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2437]'); insert into test_proxima_be_restart_with_inc_stage values(2438, 'name2438', 2448.111, 243800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2438]'); insert into test_proxima_be_restart_with_inc_stage values(2439, 'name2439', 2449.111, 243900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2439]'); insert into test_proxima_be_restart_with_inc_stage values(2440, 'name2440', 2450.111, 244000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2440]'); insert into test_proxima_be_restart_with_inc_stage values(2441, 'name2441', 2451.111, 244100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2441]'); insert into test_proxima_be_restart_with_inc_stage values(2442, 'name2442', 2452.111, 244200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2442]'); insert into test_proxima_be_restart_with_inc_stage values(2443, 'name2443', 2453.111, 244300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2443]'); insert into test_proxima_be_restart_with_inc_stage values(2444, 'name2444', 2454.111, 244400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2444]'); insert into test_proxima_be_restart_with_inc_stage values(2445, 'name2445', 2455.111, 244500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2445]'); insert into test_proxima_be_restart_with_inc_stage values(2446, 'name2446', 2456.111, 244600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2446]'); insert into test_proxima_be_restart_with_inc_stage values(2447, 'name2447', 2457.111, 244700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2447]'); insert into test_proxima_be_restart_with_inc_stage values(2448, 'name2448', 2458.111, 244800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2448]'); insert into test_proxima_be_restart_with_inc_stage values(2449, 'name2449', 2459.111, 244900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2449]'); insert into test_proxima_be_restart_with_inc_stage values(2450, 'name2450', 2460.111, 245000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2450]'); insert into test_proxima_be_restart_with_inc_stage values(2451, 'name2451', 2461.111, 245100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2451]'); insert into test_proxima_be_restart_with_inc_stage values(2452, 'name2452', 2462.111, 245200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2452]'); insert into test_proxima_be_restart_with_inc_stage values(2453, 'name2453', 2463.111, 245300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2453]'); insert into test_proxima_be_restart_with_inc_stage values(2454, 'name2454', 2464.111, 245400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2454]'); insert into test_proxima_be_restart_with_inc_stage values(2455, 'name2455', 2465.111, 245500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2455]'); insert into test_proxima_be_restart_with_inc_stage values(2456, 'name2456', 2466.111, 245600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2456]'); insert into test_proxima_be_restart_with_inc_stage values(2457, 'name2457', 2467.111, 245700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2457]'); insert into test_proxima_be_restart_with_inc_stage values(2458, 'name2458', 2468.111, 245800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2458]'); insert into test_proxima_be_restart_with_inc_stage values(2459, 'name2459', 2469.111, 245900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2459]'); insert into test_proxima_be_restart_with_inc_stage values(2460, 'name2460', 2470.111, 246000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2460]'); insert into test_proxima_be_restart_with_inc_stage values(2461, 'name2461', 2471.111, 246100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2461]'); insert into test_proxima_be_restart_with_inc_stage values(2462, 'name2462', 2472.111, 246200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2462]'); insert into test_proxima_be_restart_with_inc_stage values(2463, 'name2463', 2473.111, 246300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2463]'); insert into test_proxima_be_restart_with_inc_stage values(2464, 'name2464', 2474.111, 246400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2464]'); insert into test_proxima_be_restart_with_inc_stage values(2465, 'name2465', 2475.111, 246500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2465]'); insert into test_proxima_be_restart_with_inc_stage values(2466, 'name2466', 2476.111, 246600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2466]'); insert into test_proxima_be_restart_with_inc_stage values(2467, 'name2467', 2477.111, 246700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2467]'); insert into test_proxima_be_restart_with_inc_stage values(2468, 'name2468', 2478.111, 246800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2468]'); insert into test_proxima_be_restart_with_inc_stage values(2469, 'name2469', 2479.111, 246900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2469]'); insert into test_proxima_be_restart_with_inc_stage values(2470, 'name2470', 2480.111, 247000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2470]'); insert into test_proxima_be_restart_with_inc_stage values(2471, 'name2471', 2481.111, 247100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2471]'); insert into test_proxima_be_restart_with_inc_stage values(2472, 'name2472', 2482.111, 247200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2472]'); insert into test_proxima_be_restart_with_inc_stage values(2473, 'name2473', 2483.111, 247300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2473]'); insert into test_proxima_be_restart_with_inc_stage values(2474, 'name2474', 2484.111, 247400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2474]'); insert into test_proxima_be_restart_with_inc_stage values(2475, 'name2475', 2485.111, 247500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2475]'); insert into test_proxima_be_restart_with_inc_stage values(2476, 'name2476', 2486.111, 247600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2476]'); insert into test_proxima_be_restart_with_inc_stage values(2477, 'name2477', 2487.111, 247700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2477]'); insert into test_proxima_be_restart_with_inc_stage values(2478, 'name2478', 2488.111, 247800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2478]'); insert into test_proxima_be_restart_with_inc_stage values(2479, 'name2479', 2489.111, 247900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2479]'); insert into test_proxima_be_restart_with_inc_stage values(2480, 'name2480', 2490.111, 248000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2480]'); insert into test_proxima_be_restart_with_inc_stage values(2481, 'name2481', 2491.111, 248100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2481]'); insert into test_proxima_be_restart_with_inc_stage values(2482, 'name2482', 2492.111, 248200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2482]'); insert into test_proxima_be_restart_with_inc_stage values(2483, 'name2483', 2493.111, 248300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2483]'); insert into test_proxima_be_restart_with_inc_stage values(2484, 'name2484', 2494.111, 248400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2484]'); insert into test_proxima_be_restart_with_inc_stage values(2485, 'name2485', 2495.111, 248500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2485]'); insert into test_proxima_be_restart_with_inc_stage values(2486, 'name2486', 2496.111, 248600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2486]'); insert into test_proxima_be_restart_with_inc_stage values(2487, 'name2487', 2497.111, 248700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2487]'); insert into test_proxima_be_restart_with_inc_stage values(2488, 'name2488', 2498.111, 248800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2488]'); insert into test_proxima_be_restart_with_inc_stage values(2489, 'name2489', 2499.111, 248900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2489]'); insert into test_proxima_be_restart_with_inc_stage values(2490, 'name2490', 2500.111, 249000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2490]'); insert into test_proxima_be_restart_with_inc_stage values(2491, 'name2491', 2501.111, 249100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2491]'); insert into test_proxima_be_restart_with_inc_stage values(2492, 'name2492', 2502.111, 249200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2492]'); insert into test_proxima_be_restart_with_inc_stage values(2493, 'name2493', 2503.111, 249300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2493]'); insert into test_proxima_be_restart_with_inc_stage values(2494, 'name2494', 2504.111, 249400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2494]'); insert into test_proxima_be_restart_with_inc_stage values(2495, 'name2495', 2505.111, 249500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2495]'); insert into test_proxima_be_restart_with_inc_stage values(2496, 'name2496', 2506.111, 249600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2496]'); insert into test_proxima_be_restart_with_inc_stage values(2497, 'name2497', 2507.111, 249700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2497]'); insert into test_proxima_be_restart_with_inc_stage values(2498, 'name2498', 2508.111, 249800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2498]'); insert into test_proxima_be_restart_with_inc_stage values(2499, 'name2499', 2509.111, 249900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2499]'); insert into test_proxima_be_restart_with_inc_stage values(2500, 'name2500', 2510.111, 250000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2500]'); insert into test_proxima_be_restart_with_inc_stage values(2501, 'name2501', 2511.111, 250100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2501]'); insert into test_proxima_be_restart_with_inc_stage values(2502, 'name2502', 2512.111, 250200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2502]'); insert into test_proxima_be_restart_with_inc_stage values(2503, 'name2503', 2513.111, 250300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2503]'); insert into test_proxima_be_restart_with_inc_stage values(2504, 'name2504', 2514.111, 250400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2504]'); insert into test_proxima_be_restart_with_inc_stage values(2505, 'name2505', 2515.111, 250500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2505]'); insert into test_proxima_be_restart_with_inc_stage values(2506, 'name2506', 2516.111, 250600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2506]'); insert into test_proxima_be_restart_with_inc_stage values(2507, 'name2507', 2517.111, 250700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2507]'); insert into test_proxima_be_restart_with_inc_stage values(2508, 'name2508', 2518.111, 250800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2508]'); insert into test_proxima_be_restart_with_inc_stage values(2509, 'name2509', 2519.111, 250900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2509]'); insert into test_proxima_be_restart_with_inc_stage values(2510, 'name2510', 2520.111, 251000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2510]'); insert into test_proxima_be_restart_with_inc_stage values(2511, 'name2511', 2521.111, 251100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2511]'); insert into test_proxima_be_restart_with_inc_stage values(2512, 'name2512', 2522.111, 251200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2512]'); insert into test_proxima_be_restart_with_inc_stage values(2513, 'name2513', 2523.111, 251300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2513]'); insert into test_proxima_be_restart_with_inc_stage values(2514, 'name2514', 2524.111, 251400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2514]'); insert into test_proxima_be_restart_with_inc_stage values(2515, 'name2515', 2525.111, 251500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2515]'); insert into test_proxima_be_restart_with_inc_stage values(2516, 'name2516', 2526.111, 251600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2516]'); insert into test_proxima_be_restart_with_inc_stage values(2517, 'name2517', 2527.111, 251700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2517]'); insert into test_proxima_be_restart_with_inc_stage values(2518, 'name2518', 2528.111, 251800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2518]'); insert into test_proxima_be_restart_with_inc_stage values(2519, 'name2519', 2529.111, 251900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2519]'); insert into test_proxima_be_restart_with_inc_stage values(2520, 'name2520', 2530.111, 252000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2520]'); insert into test_proxima_be_restart_with_inc_stage values(2521, 'name2521', 2531.111, 252100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2521]'); insert into test_proxima_be_restart_with_inc_stage values(2522, 'name2522', 2532.111, 252200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2522]'); insert into test_proxima_be_restart_with_inc_stage values(2523, 'name2523', 2533.111, 252300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2523]'); insert into test_proxima_be_restart_with_inc_stage values(2524, 'name2524', 2534.111, 252400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2524]'); insert into test_proxima_be_restart_with_inc_stage values(2525, 'name2525', 2535.111, 252500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2525]'); insert into test_proxima_be_restart_with_inc_stage values(2526, 'name2526', 2536.111, 252600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2526]'); insert into test_proxima_be_restart_with_inc_stage values(2527, 'name2527', 2537.111, 252700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2527]'); insert into test_proxima_be_restart_with_inc_stage values(2528, 'name2528', 2538.111, 252800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2528]'); insert into test_proxima_be_restart_with_inc_stage values(2529, 'name2529', 2539.111, 252900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2529]'); insert into test_proxima_be_restart_with_inc_stage values(2530, 'name2530', 2540.111, 253000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2530]'); insert into test_proxima_be_restart_with_inc_stage values(2531, 'name2531', 2541.111, 253100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2531]'); insert into test_proxima_be_restart_with_inc_stage values(2532, 'name2532', 2542.111, 253200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2532]'); insert into test_proxima_be_restart_with_inc_stage values(2533, 'name2533', 2543.111, 253300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2533]'); insert into test_proxima_be_restart_with_inc_stage values(2534, 'name2534', 2544.111, 253400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2534]'); insert into test_proxima_be_restart_with_inc_stage values(2535, 'name2535', 2545.111, 253500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2535]'); insert into test_proxima_be_restart_with_inc_stage values(2536, 'name2536', 2546.111, 253600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2536]'); insert into test_proxima_be_restart_with_inc_stage values(2537, 'name2537', 2547.111, 253700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2537]'); insert into test_proxima_be_restart_with_inc_stage values(2538, 'name2538', 2548.111, 253800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2538]'); insert into test_proxima_be_restart_with_inc_stage values(2539, 'name2539', 2549.111, 253900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2539]'); insert into test_proxima_be_restart_with_inc_stage values(2540, 'name2540', 2550.111, 254000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2540]'); insert into test_proxima_be_restart_with_inc_stage values(2541, 'name2541', 2551.111, 254100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2541]'); insert into test_proxima_be_restart_with_inc_stage values(2542, 'name2542', 2552.111, 254200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2542]'); insert into test_proxima_be_restart_with_inc_stage values(2543, 'name2543', 2553.111, 254300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2543]'); insert into test_proxima_be_restart_with_inc_stage values(2544, 'name2544', 2554.111, 254400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2544]'); insert into test_proxima_be_restart_with_inc_stage values(2545, 'name2545', 2555.111, 254500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2545]'); insert into test_proxima_be_restart_with_inc_stage values(2546, 'name2546', 2556.111, 254600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2546]'); insert into test_proxima_be_restart_with_inc_stage values(2547, 'name2547', 2557.111, 254700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2547]'); insert into test_proxima_be_restart_with_inc_stage values(2548, 'name2548', 2558.111, 254800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2548]'); insert into test_proxima_be_restart_with_inc_stage values(2549, 'name2549', 2559.111, 254900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2549]'); insert into test_proxima_be_restart_with_inc_stage values(2550, 'name2550', 2560.111, 255000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2550]'); insert into test_proxima_be_restart_with_inc_stage values(2551, 'name2551', 2561.111, 255100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2551]'); insert into test_proxima_be_restart_with_inc_stage values(2552, 'name2552', 2562.111, 255200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2552]'); insert into test_proxima_be_restart_with_inc_stage values(2553, 'name2553', 2563.111, 255300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2553]'); insert into test_proxima_be_restart_with_inc_stage values(2554, 'name2554', 2564.111, 255400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2554]'); insert into test_proxima_be_restart_with_inc_stage values(2555, 'name2555', 2565.111, 255500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2555]'); insert into test_proxima_be_restart_with_inc_stage values(2556, 'name2556', 2566.111, 255600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2556]'); insert into test_proxima_be_restart_with_inc_stage values(2557, 'name2557', 2567.111, 255700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2557]'); insert into test_proxima_be_restart_with_inc_stage values(2558, 'name2558', 2568.111, 255800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2558]'); insert into test_proxima_be_restart_with_inc_stage values(2559, 'name2559', 2569.111, 255900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2559]'); insert into test_proxima_be_restart_with_inc_stage values(2560, 'name2560', 2570.111, 256000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2560]'); insert into test_proxima_be_restart_with_inc_stage values(2561, 'name2561', 2571.111, 256100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2561]'); insert into test_proxima_be_restart_with_inc_stage values(2562, 'name2562', 2572.111, 256200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2562]'); insert into test_proxima_be_restart_with_inc_stage values(2563, 'name2563', 2573.111, 256300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2563]'); insert into test_proxima_be_restart_with_inc_stage values(2564, 'name2564', 2574.111, 256400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2564]'); insert into test_proxima_be_restart_with_inc_stage values(2565, 'name2565', 2575.111, 256500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2565]'); insert into test_proxima_be_restart_with_inc_stage values(2566, 'name2566', 2576.111, 256600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2566]'); insert into test_proxima_be_restart_with_inc_stage values(2567, 'name2567', 2577.111, 256700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2567]'); insert into test_proxima_be_restart_with_inc_stage values(2568, 'name2568', 2578.111, 256800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2568]'); insert into test_proxima_be_restart_with_inc_stage values(2569, 'name2569', 2579.111, 256900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2569]'); insert into test_proxima_be_restart_with_inc_stage values(2570, 'name2570', 2580.111, 257000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2570]'); insert into test_proxima_be_restart_with_inc_stage values(2571, 'name2571', 2581.111, 257100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2571]'); insert into test_proxima_be_restart_with_inc_stage values(2572, 'name2572', 2582.111, 257200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2572]'); insert into test_proxima_be_restart_with_inc_stage values(2573, 'name2573', 2583.111, 257300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2573]'); insert into test_proxima_be_restart_with_inc_stage values(2574, 'name2574', 2584.111, 257400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2574]'); insert into test_proxima_be_restart_with_inc_stage values(2575, 'name2575', 2585.111, 257500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2575]'); insert into test_proxima_be_restart_with_inc_stage values(2576, 'name2576', 2586.111, 257600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2576]'); insert into test_proxima_be_restart_with_inc_stage values(2577, 'name2577', 2587.111, 257700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2577]'); insert into test_proxima_be_restart_with_inc_stage values(2578, 'name2578', 2588.111, 257800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2578]'); insert into test_proxima_be_restart_with_inc_stage values(2579, 'name2579', 2589.111, 257900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2579]'); insert into test_proxima_be_restart_with_inc_stage values(2580, 'name2580', 2590.111, 258000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2580]'); insert into test_proxima_be_restart_with_inc_stage values(2581, 'name2581', 2591.111, 258100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2581]'); insert into test_proxima_be_restart_with_inc_stage values(2582, 'name2582', 2592.111, 258200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2582]'); insert into test_proxima_be_restart_with_inc_stage values(2583, 'name2583', 2593.111, 258300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2583]'); insert into test_proxima_be_restart_with_inc_stage values(2584, 'name2584', 2594.111, 258400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2584]'); insert into test_proxima_be_restart_with_inc_stage values(2585, 'name2585', 2595.111, 258500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2585]'); insert into test_proxima_be_restart_with_inc_stage values(2586, 'name2586', 2596.111, 258600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2586]'); insert into test_proxima_be_restart_with_inc_stage values(2587, 'name2587', 2597.111, 258700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2587]'); insert into test_proxima_be_restart_with_inc_stage values(2588, 'name2588', 2598.111, 258800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2588]'); insert into test_proxima_be_restart_with_inc_stage values(2589, 'name2589', 2599.111, 258900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2589]'); insert into test_proxima_be_restart_with_inc_stage values(2590, 'name2590', 2600.111, 259000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2590]'); insert into test_proxima_be_restart_with_inc_stage values(2591, 'name2591', 2601.111, 259100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2591]'); insert into test_proxima_be_restart_with_inc_stage values(2592, 'name2592', 2602.111, 259200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2592]'); insert into test_proxima_be_restart_with_inc_stage values(2593, 'name2593', 2603.111, 259300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2593]'); insert into test_proxima_be_restart_with_inc_stage values(2594, 'name2594', 2604.111, 259400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2594]'); insert into test_proxima_be_restart_with_inc_stage values(2595, 'name2595', 2605.111, 259500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2595]'); insert into test_proxima_be_restart_with_inc_stage values(2596, 'name2596', 2606.111, 259600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2596]'); insert into test_proxima_be_restart_with_inc_stage values(2597, 'name2597', 2607.111, 259700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2597]'); insert into test_proxima_be_restart_with_inc_stage values(2598, 'name2598', 2608.111, 259800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2598]'); insert into test_proxima_be_restart_with_inc_stage values(2599, 'name2599', 2609.111, 259900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2599]'); insert into test_proxima_be_restart_with_inc_stage values(2600, 'name2600', 2610.111, 260000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2600]'); insert into test_proxima_be_restart_with_inc_stage values(2601, 'name2601', 2611.111, 260100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2601]'); insert into test_proxima_be_restart_with_inc_stage values(2602, 'name2602', 2612.111, 260200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2602]'); insert into test_proxima_be_restart_with_inc_stage values(2603, 'name2603', 2613.111, 260300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2603]'); insert into test_proxima_be_restart_with_inc_stage values(2604, 'name2604', 2614.111, 260400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2604]'); insert into test_proxima_be_restart_with_inc_stage values(2605, 'name2605', 2615.111, 260500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2605]'); insert into test_proxima_be_restart_with_inc_stage values(2606, 'name2606', 2616.111, 260600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2606]'); insert into test_proxima_be_restart_with_inc_stage values(2607, 'name2607', 2617.111, 260700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2607]'); insert into test_proxima_be_restart_with_inc_stage values(2608, 'name2608', 2618.111, 260800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2608]'); insert into test_proxima_be_restart_with_inc_stage values(2609, 'name2609', 2619.111, 260900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2609]'); insert into test_proxima_be_restart_with_inc_stage values(2610, 'name2610', 2620.111, 261000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2610]'); select count(*) from test_proxima_be_restart_with_inc_stage; ================================================ FILE: tests/integration/data/test_repository_restart_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_repository_restart; create table if not exists test_repository_restart(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); insert into test_repository_restart values(1, 'name1', 11.111, 100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_repository_restart values(2, 'name2', 12.111, 200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); select count(*) from test_repository_restart; ================================================ FILE: tests/integration/data/test_repository_restart_full_1.sql ================================================ use test_db; insert into test_repository_restart values(3, 'name3', 13.111, 300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_repository_restart values(4, 'name4', 14.111, 400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_repository_restart; ================================================ FILE: tests/integration/data/test_repository_restart_inc.sql ================================================ use test_db; insert into test_repository_restart values(5, 'name5', 15.111, 500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_repository_restart values(6, 'name6', 16.111, 600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); select count(*) from test_repository_restart; ================================================ FILE: tests/integration/data/test_repository_restart_inc_1.sql ================================================ use test_db; insert into test_repository_restart values(7, 'name7', 17.111, 700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); select count(*) from test_repository_restart; ================================================ FILE: tests/integration/data/test_scan_full_table_with_empty_table.sql ================================================ create database if not exists test_db; use test_db; drop table if exists full_table_with_empty_table; create table if not exists full_table_with_empty_table(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); ================================================ FILE: tests/integration/data/test_scan_table.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_scan_full_table; create table if not exists test_scan_full_table(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); insert into test_scan_full_table values(1, 'name1', 11.111, 100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_scan_full_table values(2, 'name2', 12.111, 200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); select count(*) from test_scan_full_table; ================================================ FILE: tests/integration/data/test_suspend_and_resume_collection_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_suspend_and_resume_collection; create table if not exists test_suspend_and_resume_collection(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); insert into test_suspend_and_resume_collection values(1, 'name1', 11.111, 100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_suspend_and_resume_collection values(2, 'name2', 12.111, 200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); insert into test_suspend_and_resume_collection values(3, 'name3', 13.111, 300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_suspend_and_resume_collection values(4, 'name4', 14.111, 400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); insert into test_suspend_and_resume_collection values(5, 'name5', 15.111, 500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,5]'); insert into test_suspend_and_resume_collection values(6, 'name6', 16.111, 600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,6]'); insert into test_suspend_and_resume_collection values(7, 'name7', 17.111, 700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,7]'); insert into test_suspend_and_resume_collection values(8, 'name8', 18.111, 800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,8]'); insert into test_suspend_and_resume_collection values(9, 'name9', 19.111, 900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,9]'); insert into test_suspend_and_resume_collection values(10, 'name10', 20.111, 1000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,10]'); insert into test_suspend_and_resume_collection values(11, 'name11', 21.111, 1100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,11]'); insert into test_suspend_and_resume_collection values(12, 'name12', 22.111, 1200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,12]'); insert into test_suspend_and_resume_collection values(13, 'name13', 23.111, 1300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,13]'); insert into test_suspend_and_resume_collection values(14, 'name14', 24.111, 1400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,14]'); insert into test_suspend_and_resume_collection values(15, 'name15', 25.111, 1500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,15]'); insert into test_suspend_and_resume_collection values(16, 'name16', 26.111, 1600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,16]'); insert into test_suspend_and_resume_collection values(17, 'name17', 27.111, 1700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,17]'); insert into test_suspend_and_resume_collection values(18, 'name18', 28.111, 1800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,18]'); insert into test_suspend_and_resume_collection values(19, 'name19', 29.111, 1900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,19]'); insert into test_suspend_and_resume_collection values(20, 'name20', 30.111, 2000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,20]'); insert into test_suspend_and_resume_collection values(21, 'name21', 31.111, 2100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,21]'); insert into test_suspend_and_resume_collection values(22, 'name22', 32.111, 2200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,22]'); insert into test_suspend_and_resume_collection values(23, 'name23', 33.111, 2300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,23]'); insert into test_suspend_and_resume_collection values(24, 'name24', 34.111, 2400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,24]'); insert into test_suspend_and_resume_collection values(25, 'name25', 35.111, 2500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,25]'); insert into test_suspend_and_resume_collection values(26, 'name26', 36.111, 2600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,26]'); insert into test_suspend_and_resume_collection values(27, 'name27', 37.111, 2700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,27]'); insert into test_suspend_and_resume_collection values(28, 'name28', 38.111, 2800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,28]'); insert into test_suspend_and_resume_collection values(29, 'name29', 39.111, 2900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,29]'); insert into test_suspend_and_resume_collection values(30, 'name30', 40.111, 3000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,30]'); insert into test_suspend_and_resume_collection values(31, 'name31', 41.111, 3100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,31]'); insert into test_suspend_and_resume_collection values(32, 'name32', 42.111, 3200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,32]'); insert into test_suspend_and_resume_collection values(33, 'name33', 43.111, 3300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,33]'); insert into test_suspend_and_resume_collection values(34, 'name34', 44.111, 3400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,34]'); insert into test_suspend_and_resume_collection values(35, 'name35', 45.111, 3500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,35]'); insert into test_suspend_and_resume_collection values(36, 'name36', 46.111, 3600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,36]'); insert into test_suspend_and_resume_collection values(37, 'name37', 47.111, 3700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,37]'); insert into test_suspend_and_resume_collection values(38, 'name38', 48.111, 3800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,38]'); insert into test_suspend_and_resume_collection values(39, 'name39', 49.111, 3900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,39]'); insert into test_suspend_and_resume_collection values(40, 'name40', 50.111, 4000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,40]'); insert into test_suspend_and_resume_collection values(41, 'name41', 51.111, 4100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,41]'); insert into test_suspend_and_resume_collection values(42, 'name42', 52.111, 4200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,42]'); insert into test_suspend_and_resume_collection values(43, 'name43', 53.111, 4300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,43]'); insert into test_suspend_and_resume_collection values(44, 'name44', 54.111, 4400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,44]'); insert into test_suspend_and_resume_collection values(45, 'name45', 55.111, 4500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,45]'); insert into test_suspend_and_resume_collection values(46, 'name46', 56.111, 4600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,46]'); insert into test_suspend_and_resume_collection values(47, 'name47', 57.111, 4700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,47]'); insert into test_suspend_and_resume_collection values(48, 'name48', 58.111, 4800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,48]'); insert into test_suspend_and_resume_collection values(49, 'name49', 59.111, 4900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,49]'); insert into test_suspend_and_resume_collection values(50, 'name50', 60.111, 5000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,50]'); insert into test_suspend_and_resume_collection values(51, 'name51', 61.111, 5100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,51]'); insert into test_suspend_and_resume_collection values(52, 'name52', 62.111, 5200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,52]'); insert into test_suspend_and_resume_collection values(53, 'name53', 63.111, 5300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,53]'); insert into test_suspend_and_resume_collection values(54, 'name54', 64.111, 5400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,54]'); insert into test_suspend_and_resume_collection values(55, 'name55', 65.111, 5500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,55]'); insert into test_suspend_and_resume_collection values(56, 'name56', 66.111, 5600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,56]'); insert into test_suspend_and_resume_collection values(57, 'name57', 67.111, 5700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,57]'); insert into test_suspend_and_resume_collection values(58, 'name58', 68.111, 5800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,58]'); insert into test_suspend_and_resume_collection values(59, 'name59', 69.111, 5900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,59]'); insert into test_suspend_and_resume_collection values(60, 'name60', 70.111, 6000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,60]'); insert into test_suspend_and_resume_collection values(61, 'name61', 71.111, 6100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,61]'); insert into test_suspend_and_resume_collection values(62, 'name62', 72.111, 6200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,62]'); insert into test_suspend_and_resume_collection values(63, 'name63', 73.111, 6300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,63]'); insert into test_suspend_and_resume_collection values(64, 'name64', 74.111, 6400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,64]'); insert into test_suspend_and_resume_collection values(65, 'name65', 75.111, 6500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,65]'); insert into test_suspend_and_resume_collection values(66, 'name66', 76.111, 6600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,66]'); insert into test_suspend_and_resume_collection values(67, 'name67', 77.111, 6700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,67]'); insert into test_suspend_and_resume_collection values(68, 'name68', 78.111, 6800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,68]'); insert into test_suspend_and_resume_collection values(69, 'name69', 79.111, 6900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,69]'); insert into test_suspend_and_resume_collection values(70, 'name70', 80.111, 7000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,70]'); insert into test_suspend_and_resume_collection values(71, 'name71', 81.111, 7100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,71]'); insert into test_suspend_and_resume_collection values(72, 'name72', 82.111, 7200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,72]'); insert into test_suspend_and_resume_collection values(73, 'name73', 83.111, 7300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,73]'); insert into test_suspend_and_resume_collection values(74, 'name74', 84.111, 7400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,74]'); insert into test_suspend_and_resume_collection values(75, 'name75', 85.111, 7500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,75]'); insert into test_suspend_and_resume_collection values(76, 'name76', 86.111, 7600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,76]'); insert into test_suspend_and_resume_collection values(77, 'name77', 87.111, 7700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,77]'); insert into test_suspend_and_resume_collection values(78, 'name78', 88.111, 7800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,78]'); insert into test_suspend_and_resume_collection values(79, 'name79', 89.111, 7900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,79]'); insert into test_suspend_and_resume_collection values(80, 'name80', 90.111, 8000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,80]'); insert into test_suspend_and_resume_collection values(81, 'name81', 91.111, 8100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,81]'); insert into test_suspend_and_resume_collection values(82, 'name82', 92.111, 8200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,82]'); insert into test_suspend_and_resume_collection values(83, 'name83', 93.111, 8300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,83]'); insert into test_suspend_and_resume_collection values(84, 'name84', 94.111, 8400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,84]'); insert into test_suspend_and_resume_collection values(85, 'name85', 95.111, 8500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,85]'); insert into test_suspend_and_resume_collection values(86, 'name86', 96.111, 8600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,86]'); insert into test_suspend_and_resume_collection values(87, 'name87', 97.111, 8700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,87]'); insert into test_suspend_and_resume_collection values(88, 'name88', 98.111, 8800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,88]'); insert into test_suspend_and_resume_collection values(89, 'name89', 99.111, 8900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,89]'); insert into test_suspend_and_resume_collection values(90, 'name90', 100.111, 9000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,90]'); insert into test_suspend_and_resume_collection values(91, 'name91', 101.111, 9100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,91]'); insert into test_suspend_and_resume_collection values(92, 'name92', 102.111, 9200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,92]'); insert into test_suspend_and_resume_collection values(93, 'name93', 103.111, 9300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,93]'); insert into test_suspend_and_resume_collection values(94, 'name94', 104.111, 9400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,94]'); insert into test_suspend_and_resume_collection values(95, 'name95', 105.111, 9500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,95]'); insert into test_suspend_and_resume_collection values(96, 'name96', 106.111, 9600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,96]'); insert into test_suspend_and_resume_collection values(97, 'name97', 107.111, 9700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,97]'); insert into test_suspend_and_resume_collection values(98, 'name98', 108.111, 9800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,98]'); insert into test_suspend_and_resume_collection values(99, 'name99', 109.111, 9900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,99]'); insert into test_suspend_and_resume_collection values(100, 'name100', 110.111, 10000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,100]'); insert into test_suspend_and_resume_collection values(101, 'name101', 111.111, 10100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,101]'); insert into test_suspend_and_resume_collection values(102, 'name102', 112.111, 10200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,102]'); insert into test_suspend_and_resume_collection values(103, 'name103', 113.111, 10300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,103]'); insert into test_suspend_and_resume_collection values(104, 'name104', 114.111, 10400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,104]'); insert into test_suspend_and_resume_collection values(105, 'name105', 115.111, 10500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,105]'); insert into test_suspend_and_resume_collection values(106, 'name106', 116.111, 10600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,106]'); insert into test_suspend_and_resume_collection values(107, 'name107', 117.111, 10700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,107]'); insert into test_suspend_and_resume_collection values(108, 'name108', 118.111, 10800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,108]'); insert into test_suspend_and_resume_collection values(109, 'name109', 119.111, 10900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,109]'); insert into test_suspend_and_resume_collection values(110, 'name110', 120.111, 11000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,110]'); insert into test_suspend_and_resume_collection values(111, 'name111', 121.111, 11100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,111]'); insert into test_suspend_and_resume_collection values(112, 'name112', 122.111, 11200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,112]'); insert into test_suspend_and_resume_collection values(113, 'name113', 123.111, 11300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,113]'); insert into test_suspend_and_resume_collection values(114, 'name114', 124.111, 11400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,114]'); insert into test_suspend_and_resume_collection values(115, 'name115', 125.111, 11500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,115]'); insert into test_suspend_and_resume_collection values(116, 'name116', 126.111, 11600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,116]'); insert into test_suspend_and_resume_collection values(117, 'name117', 127.111, 11700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,117]'); insert into test_suspend_and_resume_collection values(118, 'name118', 128.111, 11800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,118]'); insert into test_suspend_and_resume_collection values(119, 'name119', 129.111, 11900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,119]'); insert into test_suspend_and_resume_collection values(120, 'name120', 130.111, 12000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,120]'); insert into test_suspend_and_resume_collection values(121, 'name121', 131.111, 12100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,121]'); insert into test_suspend_and_resume_collection values(122, 'name122', 132.111, 12200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,122]'); insert into test_suspend_and_resume_collection values(123, 'name123', 133.111, 12300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,123]'); insert into test_suspend_and_resume_collection values(124, 'name124', 134.111, 12400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,124]'); insert into test_suspend_and_resume_collection values(125, 'name125', 135.111, 12500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,125]'); insert into test_suspend_and_resume_collection values(126, 'name126', 136.111, 12600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,126]'); insert into test_suspend_and_resume_collection values(127, 'name127', 137.111, 12700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,127]'); insert into test_suspend_and_resume_collection values(128, 'name128', 138.111, 12800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,128]'); insert into test_suspend_and_resume_collection values(129, 'name129', 139.111, 12900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,129]'); insert into test_suspend_and_resume_collection values(130, 'name130', 140.111, 13000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,130]'); insert into test_suspend_and_resume_collection values(131, 'name131', 141.111, 13100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,131]'); insert into test_suspend_and_resume_collection values(132, 'name132', 142.111, 13200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,132]'); insert into test_suspend_and_resume_collection values(133, 'name133', 143.111, 13300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,133]'); insert into test_suspend_and_resume_collection values(134, 'name134', 144.111, 13400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,134]'); insert into test_suspend_and_resume_collection values(135, 'name135', 145.111, 13500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,135]'); insert into test_suspend_and_resume_collection values(136, 'name136', 146.111, 13600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,136]'); insert into test_suspend_and_resume_collection values(137, 'name137', 147.111, 13700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,137]'); insert into test_suspend_and_resume_collection values(138, 'name138', 148.111, 13800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,138]'); insert into test_suspend_and_resume_collection values(139, 'name139', 149.111, 13900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,139]'); insert into test_suspend_and_resume_collection values(140, 'name140', 150.111, 14000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,140]'); insert into test_suspend_and_resume_collection values(141, 'name141', 151.111, 14100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,141]'); insert into test_suspend_and_resume_collection values(142, 'name142', 152.111, 14200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,142]'); insert into test_suspend_and_resume_collection values(143, 'name143', 153.111, 14300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,143]'); insert into test_suspend_and_resume_collection values(144, 'name144', 154.111, 14400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,144]'); insert into test_suspend_and_resume_collection values(145, 'name145', 155.111, 14500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,145]'); insert into test_suspend_and_resume_collection values(146, 'name146', 156.111, 14600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,146]'); insert into test_suspend_and_resume_collection values(147, 'name147', 157.111, 14700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,147]'); insert into test_suspend_and_resume_collection values(148, 'name148', 158.111, 14800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,148]'); insert into test_suspend_and_resume_collection values(149, 'name149', 159.111, 14900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,149]'); insert into test_suspend_and_resume_collection values(150, 'name150', 160.111, 15000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,150]'); insert into test_suspend_and_resume_collection values(151, 'name151', 161.111, 15100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,151]'); insert into test_suspend_and_resume_collection values(152, 'name152', 162.111, 15200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,152]'); insert into test_suspend_and_resume_collection values(153, 'name153', 163.111, 15300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,153]'); insert into test_suspend_and_resume_collection values(154, 'name154', 164.111, 15400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,154]'); insert into test_suspend_and_resume_collection values(155, 'name155', 165.111, 15500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,155]'); insert into test_suspend_and_resume_collection values(156, 'name156', 166.111, 15600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,156]'); insert into test_suspend_and_resume_collection values(157, 'name157', 167.111, 15700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,157]'); insert into test_suspend_and_resume_collection values(158, 'name158', 168.111, 15800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,158]'); insert into test_suspend_and_resume_collection values(159, 'name159', 169.111, 15900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,159]'); insert into test_suspend_and_resume_collection values(160, 'name160', 170.111, 16000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,160]'); insert into test_suspend_and_resume_collection values(161, 'name161', 171.111, 16100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,161]'); insert into test_suspend_and_resume_collection values(162, 'name162', 172.111, 16200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,162]'); insert into test_suspend_and_resume_collection values(163, 'name163', 173.111, 16300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,163]'); insert into test_suspend_and_resume_collection values(164, 'name164', 174.111, 16400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,164]'); insert into test_suspend_and_resume_collection values(165, 'name165', 175.111, 16500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,165]'); insert into test_suspend_and_resume_collection values(166, 'name166', 176.111, 16600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,166]'); insert into test_suspend_and_resume_collection values(167, 'name167', 177.111, 16700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,167]'); insert into test_suspend_and_resume_collection values(168, 'name168', 178.111, 16800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,168]'); insert into test_suspend_and_resume_collection values(169, 'name169', 179.111, 16900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,169]'); insert into test_suspend_and_resume_collection values(170, 'name170', 180.111, 17000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,170]'); insert into test_suspend_and_resume_collection values(171, 'name171', 181.111, 17100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,171]'); insert into test_suspend_and_resume_collection values(172, 'name172', 182.111, 17200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,172]'); insert into test_suspend_and_resume_collection values(173, 'name173', 183.111, 17300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,173]'); insert into test_suspend_and_resume_collection values(174, 'name174', 184.111, 17400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,174]'); insert into test_suspend_and_resume_collection values(175, 'name175', 185.111, 17500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,175]'); insert into test_suspend_and_resume_collection values(176, 'name176', 186.111, 17600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,176]'); insert into test_suspend_and_resume_collection values(177, 'name177', 187.111, 17700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,177]'); insert into test_suspend_and_resume_collection values(178, 'name178', 188.111, 17800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,178]'); insert into test_suspend_and_resume_collection values(179, 'name179', 189.111, 17900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,179]'); insert into test_suspend_and_resume_collection values(180, 'name180', 190.111, 18000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,180]'); insert into test_suspend_and_resume_collection values(181, 'name181', 191.111, 18100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,181]'); insert into test_suspend_and_resume_collection values(182, 'name182', 192.111, 18200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,182]'); insert into test_suspend_and_resume_collection values(183, 'name183', 193.111, 18300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,183]'); insert into test_suspend_and_resume_collection values(184, 'name184', 194.111, 18400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,184]'); insert into test_suspend_and_resume_collection values(185, 'name185', 195.111, 18500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,185]'); insert into test_suspend_and_resume_collection values(186, 'name186', 196.111, 18600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,186]'); insert into test_suspend_and_resume_collection values(187, 'name187', 197.111, 18700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,187]'); insert into test_suspend_and_resume_collection values(188, 'name188', 198.111, 18800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,188]'); insert into test_suspend_and_resume_collection values(189, 'name189', 199.111, 18900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,189]'); insert into test_suspend_and_resume_collection values(190, 'name190', 200.111, 19000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,190]'); insert into test_suspend_and_resume_collection values(191, 'name191', 201.111, 19100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,191]'); insert into test_suspend_and_resume_collection values(192, 'name192', 202.111, 19200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,192]'); insert into test_suspend_and_resume_collection values(193, 'name193', 203.111, 19300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,193]'); insert into test_suspend_and_resume_collection values(194, 'name194', 204.111, 19400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,194]'); insert into test_suspend_and_resume_collection values(195, 'name195', 205.111, 19500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,195]'); insert into test_suspend_and_resume_collection values(196, 'name196', 206.111, 19600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,196]'); insert into test_suspend_and_resume_collection values(197, 'name197', 207.111, 19700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,197]'); insert into test_suspend_and_resume_collection values(198, 'name198', 208.111, 19800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,198]'); insert into test_suspend_and_resume_collection values(199, 'name199', 209.111, 19900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,199]'); insert into test_suspend_and_resume_collection values(200, 'name200', 210.111, 20000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,200]'); insert into test_suspend_and_resume_collection values(201, 'name201', 211.111, 20100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,201]'); insert into test_suspend_and_resume_collection values(202, 'name202', 212.111, 20200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,202]'); insert into test_suspend_and_resume_collection values(203, 'name203', 213.111, 20300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,203]'); insert into test_suspend_and_resume_collection values(204, 'name204', 214.111, 20400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,204]'); insert into test_suspend_and_resume_collection values(205, 'name205', 215.111, 20500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,205]'); insert into test_suspend_and_resume_collection values(206, 'name206', 216.111, 20600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,206]'); insert into test_suspend_and_resume_collection values(207, 'name207', 217.111, 20700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,207]'); insert into test_suspend_and_resume_collection values(208, 'name208', 218.111, 20800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,208]'); insert into test_suspend_and_resume_collection values(209, 'name209', 219.111, 20900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,209]'); insert into test_suspend_and_resume_collection values(210, 'name210', 220.111, 21000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,210]'); insert into test_suspend_and_resume_collection values(211, 'name211', 221.111, 21100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,211]'); insert into test_suspend_and_resume_collection values(212, 'name212', 222.111, 21200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,212]'); insert into test_suspend_and_resume_collection values(213, 'name213', 223.111, 21300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,213]'); insert into test_suspend_and_resume_collection values(214, 'name214', 224.111, 21400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,214]'); insert into test_suspend_and_resume_collection values(215, 'name215', 225.111, 21500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,215]'); insert into test_suspend_and_resume_collection values(216, 'name216', 226.111, 21600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,216]'); insert into test_suspend_and_resume_collection values(217, 'name217', 227.111, 21700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,217]'); insert into test_suspend_and_resume_collection values(218, 'name218', 228.111, 21800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,218]'); insert into test_suspend_and_resume_collection values(219, 'name219', 229.111, 21900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,219]'); insert into test_suspend_and_resume_collection values(220, 'name220', 230.111, 22000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,220]'); insert into test_suspend_and_resume_collection values(221, 'name221', 231.111, 22100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,221]'); insert into test_suspend_and_resume_collection values(222, 'name222', 232.111, 22200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,222]'); insert into test_suspend_and_resume_collection values(223, 'name223', 233.111, 22300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,223]'); insert into test_suspend_and_resume_collection values(224, 'name224', 234.111, 22400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,224]'); insert into test_suspend_and_resume_collection values(225, 'name225', 235.111, 22500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,225]'); insert into test_suspend_and_resume_collection values(226, 'name226', 236.111, 22600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,226]'); insert into test_suspend_and_resume_collection values(227, 'name227', 237.111, 22700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,227]'); insert into test_suspend_and_resume_collection values(228, 'name228', 238.111, 22800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,228]'); insert into test_suspend_and_resume_collection values(229, 'name229', 239.111, 22900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,229]'); insert into test_suspend_and_resume_collection values(230, 'name230', 240.111, 23000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,230]'); insert into test_suspend_and_resume_collection values(231, 'name231', 241.111, 23100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,231]'); insert into test_suspend_and_resume_collection values(232, 'name232', 242.111, 23200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,232]'); insert into test_suspend_and_resume_collection values(233, 'name233', 243.111, 23300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,233]'); insert into test_suspend_and_resume_collection values(234, 'name234', 244.111, 23400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,234]'); insert into test_suspend_and_resume_collection values(235, 'name235', 245.111, 23500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,235]'); insert into test_suspend_and_resume_collection values(236, 'name236', 246.111, 23600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,236]'); insert into test_suspend_and_resume_collection values(237, 'name237', 247.111, 23700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,237]'); insert into test_suspend_and_resume_collection values(238, 'name238', 248.111, 23800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,238]'); insert into test_suspend_and_resume_collection values(239, 'name239', 249.111, 23900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,239]'); insert into test_suspend_and_resume_collection values(240, 'name240', 250.111, 24000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,240]'); insert into test_suspend_and_resume_collection values(241, 'name241', 251.111, 24100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,241]'); insert into test_suspend_and_resume_collection values(242, 'name242', 252.111, 24200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,242]'); insert into test_suspend_and_resume_collection values(243, 'name243', 253.111, 24300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,243]'); insert into test_suspend_and_resume_collection values(244, 'name244', 254.111, 24400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,244]'); insert into test_suspend_and_resume_collection values(245, 'name245', 255.111, 24500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,245]'); insert into test_suspend_and_resume_collection values(246, 'name246', 256.111, 24600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,246]'); insert into test_suspend_and_resume_collection values(247, 'name247', 257.111, 24700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,247]'); insert into test_suspend_and_resume_collection values(248, 'name248', 258.111, 24800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,248]'); insert into test_suspend_and_resume_collection values(249, 'name249', 259.111, 24900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,249]'); insert into test_suspend_and_resume_collection values(250, 'name250', 260.111, 25000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,250]'); insert into test_suspend_and_resume_collection values(251, 'name251', 261.111, 25100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,251]'); insert into test_suspend_and_resume_collection values(252, 'name252', 262.111, 25200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,252]'); insert into test_suspend_and_resume_collection values(253, 'name253', 263.111, 25300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,253]'); insert into test_suspend_and_resume_collection values(254, 'name254', 264.111, 25400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,254]'); insert into test_suspend_and_resume_collection values(255, 'name255', 265.111, 25500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,255]'); insert into test_suspend_and_resume_collection values(256, 'name256', 266.111, 25600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,256]'); insert into test_suspend_and_resume_collection values(257, 'name257', 267.111, 25700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,257]'); insert into test_suspend_and_resume_collection values(258, 'name258', 268.111, 25800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,258]'); insert into test_suspend_and_resume_collection values(259, 'name259', 269.111, 25900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,259]'); insert into test_suspend_and_resume_collection values(260, 'name260', 270.111, 26000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,260]'); insert into test_suspend_and_resume_collection values(261, 'name261', 271.111, 26100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,261]'); insert into test_suspend_and_resume_collection values(262, 'name262', 272.111, 26200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,262]'); insert into test_suspend_and_resume_collection values(263, 'name263', 273.111, 26300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,263]'); insert into test_suspend_and_resume_collection values(264, 'name264', 274.111, 26400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,264]'); insert into test_suspend_and_resume_collection values(265, 'name265', 275.111, 26500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,265]'); insert into test_suspend_and_resume_collection values(266, 'name266', 276.111, 26600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,266]'); insert into test_suspend_and_resume_collection values(267, 'name267', 277.111, 26700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,267]'); insert into test_suspend_and_resume_collection values(268, 'name268', 278.111, 26800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,268]'); insert into test_suspend_and_resume_collection values(269, 'name269', 279.111, 26900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,269]'); insert into test_suspend_and_resume_collection values(270, 'name270', 280.111, 27000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,270]'); insert into test_suspend_and_resume_collection values(271, 'name271', 281.111, 27100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,271]'); insert into test_suspend_and_resume_collection values(272, 'name272', 282.111, 27200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,272]'); insert into test_suspend_and_resume_collection values(273, 'name273', 283.111, 27300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,273]'); insert into test_suspend_and_resume_collection values(274, 'name274', 284.111, 27400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,274]'); insert into test_suspend_and_resume_collection values(275, 'name275', 285.111, 27500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,275]'); insert into test_suspend_and_resume_collection values(276, 'name276', 286.111, 27600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,276]'); insert into test_suspend_and_resume_collection values(277, 'name277', 287.111, 27700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,277]'); insert into test_suspend_and_resume_collection values(278, 'name278', 288.111, 27800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,278]'); insert into test_suspend_and_resume_collection values(279, 'name279', 289.111, 27900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,279]'); insert into test_suspend_and_resume_collection values(280, 'name280', 290.111, 28000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,280]'); insert into test_suspend_and_resume_collection values(281, 'name281', 291.111, 28100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,281]'); insert into test_suspend_and_resume_collection values(282, 'name282', 292.111, 28200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,282]'); insert into test_suspend_and_resume_collection values(283, 'name283', 293.111, 28300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,283]'); insert into test_suspend_and_resume_collection values(284, 'name284', 294.111, 28400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,284]'); insert into test_suspend_and_resume_collection values(285, 'name285', 295.111, 28500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,285]'); insert into test_suspend_and_resume_collection values(286, 'name286', 296.111, 28600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,286]'); insert into test_suspend_and_resume_collection values(287, 'name287', 297.111, 28700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,287]'); insert into test_suspend_and_resume_collection values(288, 'name288', 298.111, 28800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,288]'); insert into test_suspend_and_resume_collection values(289, 'name289', 299.111, 28900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,289]'); insert into test_suspend_and_resume_collection values(290, 'name290', 300.111, 29000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,290]'); insert into test_suspend_and_resume_collection values(291, 'name291', 301.111, 29100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,291]'); insert into test_suspend_and_resume_collection values(292, 'name292', 302.111, 29200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,292]'); insert into test_suspend_and_resume_collection values(293, 'name293', 303.111, 29300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,293]'); insert into test_suspend_and_resume_collection values(294, 'name294', 304.111, 29400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,294]'); insert into test_suspend_and_resume_collection values(295, 'name295', 305.111, 29500, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,295]'); insert into test_suspend_and_resume_collection values(296, 'name296', 306.111, 29600, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,296]'); insert into test_suspend_and_resume_collection values(297, 'name297', 307.111, 29700, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,297]'); insert into test_suspend_and_resume_collection values(298, 'name298', 308.111, 29800, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,298]'); insert into test_suspend_and_resume_collection values(299, 'name299', 309.111, 29900, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,299]'); insert into test_suspend_and_resume_collection values(300, 'name300', 310.111, 30000, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,300]'); select count(*) from test_suspend_and_resume_collection; ================================================ FILE: tests/integration/data/test_update_collection_full.sql ================================================ create database if not exists test_db; use test_db; drop table if exists test_update_collection; create table if not exists test_update_collection(id int primary key auto_increment, name varchar(10), col_a float, col_b int, column1 varchar(256)); insert into test_update_collection values(1, 'name1', 11.111, 100, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1]'); insert into test_update_collection values(2, 'name2', 12.111, 200, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]'); select count(*) from test_update_collection; ================================================ FILE: tests/integration/data/test_update_collection_inc.sql ================================================ use test_db; insert into test_update_collection values(3, 'name3', 13.111, 300, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]'); insert into test_update_collection values(4, 'name4', 14.111, 400, '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,4]'); select count(*) from test_update_collection; ================================================ FILE: tests/integration/run.sh ================================================ #!/bin/bash mode='docker' if [ $# -eq 1 ] && [ $1 = "local" ]; then mode=$1 fi build_dir_name=`basename $(pwd)` arch=$(uname -m) if [ $arch = "aarch64" ]; then image=ghcr.io/proximabilin/proxima-be-ci-aarch64:latest else image=ghcr.io/proximabilin/proxima-be-ci:latest fi if [ "${mode}" = "docker" ]; then src_path="/v" if [ $# -eq 2 ] || [ $# -ge 1 ] && [ $1 = "docker" ]; then shift fi (sudo docker run -it -v ${PWD}/..:${src_path} --net=none $image bash -x ${src_path}/tests/integration/script/setup_ci.sh ${build_dir_name} ${src_path} $@) || exit 1 # sudo docker run -it -v ${PWD}/..:${src_path} --net=host $image bash else src_path="/drone/src" (sh ${src_path}/tests/integration/script/setup_ci.sh build/${build_dir_name} ${src_path}) || exit 1 fi ================================================ FILE: tests/integration/script/restart_proxima_be.sh ================================================ #!/bin/bash if [ $# -ne 1 ]; then echo 'Usage: $0 build_dir_name' exit 1 fi BUILD_DIR=/v/$1 echo "build_dir: $BUILD_DIR" set -xe SE_DIR=/v RUN_DIR=${BUILD_DIR}/run IT_DIR=${SE_DIR}/tests/integration export PYTHONPATH=${SE_DIR}/python #lsof -i :16000 | grep LISTEN | awk '{print $2}' | xargs kill -s SIGUSR2 ps auxwww | grep proxima_be | grep proxima_be.conf | grep -v grep | awk '{print $2}' | xargs kill -s SIGUSR2 sleep 3 ulimit -c unlimited ${BUILD_DIR}/bin/proxima_be -config ${IT_DIR}/conf/proxima_be.conf > ${RUN_DIR}/start.log 2>&1 & sleep 2 ================================================ FILE: tests/integration/script/restart_repo.sh ================================================ #!/bin/bash if [ $# -ne 1 ]; then echo 'Usage: $0 build_dir_name' exit 1 fi BUILD_DIR=/v/$1 echo "build_dir: $BUILD_DIR" set -xe SE_DIR=/v RUN_DIR=${BUILD_DIR}/run IT_DIR=${SE_DIR}/tests/integration export PYTHONPATH=${SE_DIR}/python ps auxwww | grep 'bin/mysql_repository' | grep -v grep | awk '{print $2}' | xargs kill -s SIGUSR2 sleep 1 ulimit -c unlimited MYSQL_REPO_BIN=${BUILD_DIR}/bin/mysql_repository ${MYSQL_REPO_BIN} -config ${IT_DIR}/conf/mysql_repo.conf > ${RUN_DIR}/repo.log 2>&1 & sleep 2 ================================================ FILE: tests/integration/script/run_test.sh ================================================ # run test # should run in container #!/bin/bash SE_DIR=$1 IT_DIR=${SE_DIR}/tests/integration shift if [ $# -eq 0 ]; then echo "Test all integration test" ((cd $IT_DIR; python3 $IT_DIR/src/run.py $IT_DIR/src) || exit 1) elif [ $# -gt 0 ]; then while [ $# -gt 0 ]; do echo "Test specific integration test $1" ((cd $IT_DIR; python3 $IT_DIR/src/run.py $IT_DIR/src $1) || exit 1) shift done fi ================================================ FILE: tests/integration/script/setup_ci.sh ================================================ #!/bin/bash if [ $# -lt 2 ]; then echo 'Usage: $0 build_dir_name src_path' exit 1 fi BUILD_DIR=${2}"/"$1 echo "build_dir: $BUILD_DIR" set -xe SE_DIR=${2} RUN_DIR=${BUILD_DIR}/run IT_DIR=${SE_DIR}/tests/integration PYPROXIMA_DIR=${SE_DIR}/sdk/python mkdir -p ${RUN_DIR} export SRC_PATH=${2} export BUILD_DIR_NAME=${1} export PYTHONPATH=${PYPROXIMA_DIR} cd $IT_DIR # generate conf (cd $PYPROXIMA_DIR; python3 setup.py bdist_wheel) (cd $IT_DIR; python3 src/case/conf_replacer.py ${IT_DIR}/conf) # start mysql mysqld --defaults-file=${IT_DIR}/conf/my.cnf --initialize --log_error_verbosity --explicit_defaults_for_timestamp > ${RUN_DIR}/mysql.log 2>&1 mysqld --defaults-file=${IT_DIR}/conf/my.cnf --user=root >> ${RUN_DIR}/mysql.log 2>&1 & ulimit -c unlimited # start proxima_be ${BUILD_DIR}/bin/proxima_be -config ${IT_DIR}/conf/proxima_be.conf > ${RUN_DIR}/start.log 2>&1 & sleep 10 # start mysql_repository MYSQL_REPO_BIN=${BUILD_DIR}/bin/mysql_repository ${MYSQL_REPO_BIN} -config ${IT_DIR}/conf/mysql_repo.conf > ${RUN_DIR}/repo.log 2>&1 & sleep 3 # run test shift sh ${IT_DIR}/script/run_test.sh $@ || exit 1 ================================================ FILE: tests/integration/script/start_mysql.sh ================================================ #!/bin/bash if [ $# -ne 2 ]; then echo 'Usage: $0 build_dir_name src_path' exit 1 fi BUILD_DIR=${2}"/"${1} echo "build_dir: $BUILD_DIR" set -xe SE_DIR=${2} RUN_DIR=${BUILD_DIR}/run IT_DIR=${SE_DIR}/tests/integration # start mysql mysqld --defaults-file=${IT_DIR}/conf/my.cnf --user=root >> ${RUN_DIR}/mysql.log 2>&1 & sleep 3 ================================================ FILE: tests/integration/script/start_proxima_be.sh ================================================ #!/bin/bash if [ $# -ne 2 ]; then echo 'Usage: $0 build_dir_name src_path' exit 1 fi BUILD_DIR=${2}"/"${1} echo "build_dir: $BUILD_DIR" set -xe SE_DIR=${2} RUN_DIR=${BUILD_DIR}/run IT_DIR=${SE_DIR}/tests/integration export PYTHONPATH=${SE_DIR}/python ulimit -c unlimited ${BUILD_DIR}/bin/proxima_be -config ${IT_DIR}/conf/proxima_be.conf > ${RUN_DIR}/start.log 2>&1 & sleep 2 ================================================ FILE: tests/integration/script/start_repo.sh ================================================ #!/bin/bash if [ $# -ne 2 ]; then echo 'Usage: $0 build_dir_name src_path' exit 1 fi BUILD_DIR=${2}"/"${1} echo "build_dir: $BUILD_DIR" set -xe SE_DIR=${2} RUN_DIR=${BUILD_DIR}/run IT_DIR=${SE_DIR}/tests/integration export PYTHONPATH=${SE_DIR}/python ulimit -c unlimited MYSQL_REPO_BIN=${BUILD_DIR}/bin/mysql_repository ${MYSQL_REPO_BIN} -config ${IT_DIR}/conf/mysql_repo.conf > ${RUN_DIR}/repo.log 2>&1 & sleep 2 ================================================ FILE: tests/integration/src/case/__init__.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ================================================ FILE: tests/integration/src/case/client_helper.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import random from pyproximabe import Client import logging def get_client(global_conf): handler = random.choice(['grpc', 'http']) logging.info('use %s', handler) host = '127.0.0.1' timeout = None if handler == 'http': client = Client(host, global_conf.http_port(), handler, timeout) else: client = Client(host, global_conf.grpc_port(), handler, timeout) return client ================================================ FILE: tests/integration/src/case/collection_creator.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import sys, time, os, json, random import http.client from pyproximabe import * from google.protobuf.json_format import MessageToJson from global_conf import GlobalConf from log import * class CollectionCreator: def __init__(self): self.gf = GlobalConf() self.user = 'root' self.password = 'root' def generate_collection_name(self, prefix): return prefix + str(random.randint(100000, 1000000)) def get_connection(self, db_name=None): connection = "mysql://127.0.0.1:" + str(self.gf.mysql_port()) + "/" if db_name: return connection + db_name else: return connection + "test_db" def create_schema(self, collection_name, repository_table=None, repository_name=None, forward_columns=None, revision=None, index_columns=None, index_types=None, index_data_types=None, index_dimensions=None, index_measures=None, max_docs_per_segment=100, db_name=None, with_repo=True): db_repo = None if with_repo: connection = self.get_connection(db_name) if not repository_table: repository_table = "test_collection" if not repository_name: repository_name = "test_repo" db_repo = DatabaseRepository(repository_name, connection, repository_table, 'root', 'root') indexes = [] if index_columns: for i in range(0, len(index_columns)): name = index_columns[i] index_type = index_types[i] if index_types is not None else IndexType.PROXIMA_GRAPH_INDEX data_type = index_data_types[i] if index_data_types is not None else DataType.VECTOR_FP32 extra_params = {} if index_measures: extra_params['metric_type'] = str(index_measures[i]) index = IndexColumnParam(name, dimension=index_dimensions[i], index_type=index_type, data_type=data_type, extra_params=extra_params) indexes.append(index) config = CollectionConfig(collection_name=collection_name, index_column_params=indexes, max_docs_per_segment=max_docs_per_segment, forward_column_names=forward_columns, repository_config=db_repo) return config def update_schema(self, schema, json_obj): index_columns = schema.index_columns for i in range(0, len(index_columns)): index_columns[i].uid = json_obj["index_columns"][i]["uid"] schema.uid = json_obj["uid"] def create_dataset_request(self, collection_name, magic_number, index_tuple_metas=None, index_tuple_types=None, forward_tuple_names=None, forward_tuple_types=None, rows=None, with_repo=True): index_column_metas = [] for element in index_tuple_metas: index_column_metas.append(WriteRequest.IndexColumnMeta( element[0], element[1], element[2])) row_meta = WriteRequest.RowMeta( index_column_metas=index_column_metas, forward_column_names=forward_tuple_names, forward_column_types=forward_tuple_types) rows_data = [] for row in rows: index_values=[] if not index_tuple_metas: index_tuple_metas = [['column1', DataType.VECTOR_FP32, 16]] for i in range(0, len(index_tuple_metas)): index_values.append(row[3 + i]) start_position = 3 + len(index_tuple_metas) forward_values=[] for i in range(0, len(forward_tuple_names)): forward_values.append(row[start_position + i]) if with_repo: lsn_context = LsnContext(row[2], "") else: lsn_context = None # if row[1] != OperationType.DELETE: rows_data.append( WriteRequest.Row(primary_key=row[0], operation_type=row[1], index_column_values=index_values, forward_column_values=forward_values, lsn_context=lsn_context)) # else: # rows_data.append( # WriteRequest.Row(primary_key=row[0], # operation_type=row[1])) write_request = WriteRequest(collection_name, rows_data, row_meta=row_meta, magic_number=magic_number) return write_request def __convert_forward_column(self, field_value, field_type): value = common_pb2.GenericValue() if field_type == common_pb2.GenericValueMeta.FieldType.FT_BYTES: value.bytes_value = field_value.encode('UTF-8') elif field_type == common_pb2.GenericValueMeta.FieldType.FT_STRING: value.string_value = field_value elif field_type == common_pb2.GenericValueMeta.FieldType.FT_BOOL: value.bool_value = field_value elif field_type == common_pb2.GenericValueMeta.FieldType.FT_INT32: value.int32_value = field_value elif field_type == common_pb2.GenericValueMeta.FieldType.FT_INT64: value.int64_value = field_value elif field_type == common_pb2.GenericValueMeta.FieldType.FT_UINT32: value.uint32_value = field_value elif field_type == common_pb2.GenericValueMeta.FieldType.FT_UINT64: value.uint64_value = field_value elif field_type == common_pb2.GenericValueMeta.FieldType.FT_FLOAT: value.float_value = field_value elif field_type == common_pb2.GenericValueMeta.FieldType.FT_DOUBLE: value.double_value = field_value return value ================================================ FILE: tests/integration/src/case/conf_replacer.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import sys, time, os, json, configparser import shutil class ConfReplacer: def __init__(self, conf_path): self.conf_path = conf_path self.global_conf = os.path.join(conf_path, 'global.conf') self.cf = configparser.ConfigParser() def init(self): arr = self.cf.read(self.global_conf) if len(arr) == 0: print (self.global_conf) return False self.items = self.cf.items("common") return True def replace(self): files = os.listdir(self.conf_path) for f in files: if f.endswith('.tpl'): src_name = os.path.join(self.conf_path, f) dst_name = src_name[0:-4] shutil.copyfile(src_name, dst_name) for item in self.items: cmd = "sed -i 's#${%s}#%s#g' %s" % (item[0], item[1], dst_name) ret = os.system(cmd) # print (cmd) if ret != 0: print (cmd) return False return True if __name__ == '__main__': if len(sys.argv) != 2: print ('usage: ./conf_replacer.py conf_directory') sys.exit(-1) replacer = ConfReplacer(sys.argv[1]) ret = replacer.init() if not ret: sys.exit(-1) if not replacer.replace(): sys.exit(-1) sys.exit(0) ================================================ FILE: tests/integration/src/case/generate_data.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import struct def generate_features_str(start, dimension, count): i = 0 features = [] while(i < count): current_feature = "[" j = 0 while(j < dimension - 1): current_feature = current_feature + str(start) + "," j = j+1 current_feature = current_feature + str(start) + "]" features.append(current_feature) start += 1 i = i+1 return features def generate_features_bytes(start, dimension, count): i = 0 features = [] while(i < count): j = 0 current_feature = [] while(j < dimension - 1): current_feature.append(start) j = j+1 current_feature.append(start) fea_bytes = [] for f in current_feature: fea_bytes += struct.pack('f', f) features_bytes = bytes(fea_bytes) features.append(features_bytes) start += 1 i = i+1 return features def generate_delete_primary_keys(start, count): i = 0 keys = [] while(i < count): keys.append(start) start += 1 i = i+1 return keys if __name__ == "__main__": pass ================================================ FILE: tests/integration/src/case/global_conf.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import sys, time, os, json, configparser import shutil class GlobalConf: def __init__(self, conf_path=None): if conf_path: self.conf_path = conf_path else: path = './conf/global.conf' if not os.path.exists(path): path = '../conf/global.conf' if not os.path.exists(path): path = '../../conf/global.conf' if not os.path.exists(path): raise Exception("global.conf no exists") self.path = path self.cf = configparser.ConfigParser() arr = self.cf.read(self.path) if len(arr) == 0: print ("Invalid " + self.path) raise Exception("Invalid global.conf") self.items = self.cf.items("common") def mysql_port(self): return self.cf["common"]["mysql_port"] def http_port(self): return self.cf["common"]["http_port"] def grpc_port(self): return self.cf["common"]["grpc_port"] if __name__ == '__main__': gf = GlobalConf() print (gf.mysql_port()) print (gf.http_port()) print (gf.grpc_port()) ================================================ FILE: tests/integration/src/case/log.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import logging root_logger= logging.getLogger() root_logger.setLevel(logging.INFO) handler = logging.FileHandler('it.log', 'a', 'utf-8') formatter = logging.Formatter( '%(levelname)s %(asctime)s %(filename)s:%(lineno)d:%(funcName)s \t%(message)s') handler.setFormatter(formatter) root_logger.addHandler(handler) # logging.basicConfig(level=logging.INFO, filename="it.log", format="%(levelname)s %(asctime)s %(filename)s:%(lineno)d:%(funcName)s \t%(message)s") ================================================ FILE: tests/integration/src/case/mysql_client.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import sys, time, os, json, subprocess, logging from global_conf import GlobalConf class MysqlClient: def __init__(self, user='root', password='root', ip='127.0.0.1', port=None, db = 'test_db', bin_path='/usr/bin/env LANG=en_US.UTF-8 mysql'): self.base_dir = os.path.abspath(os.path.dirname(__file__)) self.user = user self.password = password self.db = db self.ip = ip if not port: gf = GlobalConf() port = gf.mysql_port() self.port = int(port) if not bin_path: self.bin_path = self.base_dir + '/../../../../../deps/thirdparty/mysql/mysql-5.7.31/usr/local/mysql/bin/mysql' else: self.bin_path = bin_path self.command = '%s -u%s -p%s -h %s -P%d < ' % (self.bin_path, self.user, self.password, self.ip, self.port) self.sql_file = '.tmp.sql' def get_connection_uri(self): return "mysql://%s:%s@%s:%d/%s" % (self.user, self.password, self.ip, self.port, self.db) def execute(self, query): f = open(self.sql_file, 'w') f.write(query) f.close() cmd = self.command + self.sql_file logging.info("Cmd: %s" % (cmd)) ret = subprocess.getstatusoutput(cmd) logging.info("%s", ret[1]) return ret[0] def execute_batch_sql(self, sql_file, retry_times=3): i = 0 code = 0 while i < retry_times: cmd = self.command + sql_file logging.info("Cmd: %s" %(cmd)) ret = subprocess.getstatusoutput(cmd) logging.info("%s", ret[1]) code = ret[0] if code != 0: time.sleep(5) else: break i += 1 return code def purge_binlog(self, file_name): arr = file_name.split('.') no = int(arr[1]) + 1 no_str = str(no) pack_len = 6 - len(no_str) no_str = '0' * pack_len + no_str next_file = arr[0] + '.' + no_str cmd = "purge master logs to '" + next_file + "'" return self.execute(cmd) if __name__ == '__main__': client = MysqlClient() # print (client.execute("select * from tt.t1")) print (client.execute_batch_sql('tmp.sql')) ================================================ FILE: tests/integration/src/case/server_utils.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import sys, time, os, json, logging, subprocess import http.client from google.protobuf.json_format import MessageToJson from global_conf import GlobalConf from log import * class ServerUtils: def __init__(self): gf = GlobalConf() self.http_port = gf.http_port() self.grpc_port = gf.grpc_port() self.mysql_port = gf.mysql_port() # SIGKILL -9 | SIGUSR1 -10 | SIGUSR2 -12 def stop_proxima_be(self, signal='SIGUSR2'): logging.info("Begin stop proxima be") cmd = "lsof -i :%s | grep LISTEN | grep proxima | awk '{print $2}' | xargs kill -s %s" % (str(self.http_port), signal) logging.info("stop cmd: %s", cmd) ret = os.system(cmd) if ret != 0: logging.error("execute cmd %s failed.", cmd) return False time.sleep(5) times = 30 cmd = "lsof -i :%s" % (str(self.http_port)) while times > 0: try: output = subprocess.check_output(cmd, shell=True) logging.info("output: %s", output) except: break time.sleep(5) times -= 5 logging.info("End stop proxima be") return True def start_proxima_be(self): logging.info("Begin start proxima be") src_path = os.getenv('SRC_PATH') it_dir = src_path + '/tests/integration/script' build_dir = os.getenv('BUILD_DIR_NAME') cmd = 'sh %s/start_proxima_be.sh %s %s' % (it_dir, build_dir, src_path) logging.info(cmd) ret = os.system(cmd) times = 30 cmd = "lsof -i :%s" % (str(self.http_port)) while times > 0: try: output = subprocess.check_output(cmd, shell=True) logging.info("output: %s", output) break except: time.sleep(1) times -= 1 logging.info("End start proxima be") return ret # SIGKILL -9 | SIGUSR1 -10 | SIGUSR2 -12 def stop_mysql_repo(self, signal='SIGUSR2'): cmd = "ps auxwww | grep 'bin/mysql_repository' | grep -v grep | awk '{print $2}' | xargs kill -s %s" % (signal) logging.info("stop cmd: %s", cmd) ret = os.system(cmd) if ret != 0: logging.error("execute cmd %s failed.", cmd) return False time.sleep(1) return True def start_mysql_repo(self): src_path = os.getenv('SRC_PATH') it_dir = src_path + '/tests/integration/script' build_dir = os.getenv('BUILD_DIR_NAME') cmd = 'sh %s/start_repo.sh %s %s' % (it_dir, build_dir, src_path) logging.info(cmd) ret = os.system(cmd) time.sleep(1) return ret def stop_mysql(self): cmd = 'mysqladmin -u root -proot shutdown' # cmd = "ps auxwww | grep mysqld | grep -v grep | awk '{print $2}' | xarg kill -9" logging.info("stop cmd: %s", cmd) ret = os.system(cmd) if ret != 0: logging.error("execute cmd %s failed.", cmd) return False time.sleep(1) return True def start_mysql(self): src_path = os.getenv('SRC_PATH') it_dir = src_path + '/tests/integration/script' build_dir = os.getenv('BUILD_DIR_NAME') cmd = 'sh %s/start_mysql.sh %s %s' % (it_dir, build_dir, src_path) logging.info(cmd) ret = os.system(cmd) return ret ================================================ FILE: tests/integration/src/case/test_admin_agent.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import unittest import logging import time import random from pyproximabe import * from global_conf import GlobalConf from collection_creator import CollectionCreator import client_helper class TestAdminAgentBase(unittest.TestCase): def setup_client(self): self.client = client_helper.get_client(self.global_conf) def setUp(self): self.global_conf = GlobalConf() self.creator = CollectionCreator() self.setup_client() self.collection_name_list = ["collection1", "collection2", "collection3"] self.clean_env() self.schema_list = [ self.create_collection_config(self.collection_name_list[i], [f"column{str(i)}"], [16 * (i + 1)]) for i in range(3)] self.forward_columns_list = [[], ["col_a"], ["col_a", "col_b"]] self.index_columns_list = [["column0"], ["column1", "column2"]] self.index_dimensions_list = [[16], [16, 16]] self.schema_index_column_list = [ self.create_collection_config(self.collection_name_list[i], self.index_columns_list[i], self.index_dimensions_list[i]) for i in range(len(self.index_columns_list))] self.connection = self.creator.get_connection() def tearDown(self): self.clean_env() def clean_env(self): for collection in self.collection_name_list: status = self.client.drop_collection(collection) def update_schema(self, schema, json_obj): index_columns = schema.index_columns for i in range(0, len(index_columns)): index_columns[i].uid = json_obj["index_columns"][i]["uid"] schema.uid = json_obj["uid"] def create_collection_config(self, collection_name, column_name, dim, forward_columns=["col_a", "col_b"], repository_name="test_repo"): return self.creator.create_schema(collection_name, repository_table="test_collection", repository_name=repository_name, forward_columns=forward_columns, revision=1, index_columns=column_name, index_dimensions=dim, db_name="test_db") def create_collection_succ_and_return(self, schema): status = self.client.create_collection(schema) self.assertTrue(status.ok) status, collection_info = self.client.describe_collection(schema.collection_name) self.assertTrue(status.ok) return collection_info class TestAdminAgent(TestAdminAgentBase): def test_create_collection(self): collection = self.create_collection_succ_and_return(self.schema_list[0]) logging.info("Create collection result: %s", collection) config = collection.collection_config self.assertEqual(config.collection_name, self.collection_name_list[0]) self.assertTrue(config.repository_config is not None) repo_config = config.repository_config self.assertEqual(repo_config.connection_uri, self.connection) self.assertEqual(repo_config.table_name, "test_collection") self.assertEqual(repo_config.repository_name, "test_repo") self.assertEqual(repo_config.user, self.creator.user) self.assertEqual(repo_config.user, self.creator.password) forward_column_names = config.forward_column_names self.assertEqual(len(forward_column_names), 2) self.assertEqual(forward_column_names[0], "col_a") self.assertEqual(forward_column_names[1], "col_b") self.assertEqual(collection.status.name, "SERVING") index_columns = config.index_column_params self.assertEqual(len(index_columns), 1) index_column = index_columns[0] self.assertEqual(index_column.name, "column0") self.assertEqual(index_column.index_type.name, "PROXIMA_GRAPH_INDEX") self.assertEqual(index_column.data_type.name, "VECTOR_FP32") self.assertEqual(index_column.dimension, 16) self.assertFalse(index_column.extra_params) def test_create_multi_collection(self): for idx in range(3): collection = self.create_collection_succ_and_return(self.schema_list[idx]) logging.info("Create collection result: %s", collection) config = collection.collection_config self.assertEqual(config.collection_name, self.collection_name_list[idx]) self.assertTrue(config.repository_config is not None) repo_config = config.repository_config self.assertEqual(repo_config.connection_uri, self.connection) self.assertEqual(repo_config.table_name, "test_collection") self.assertEqual(repo_config.repository_name, "test_repo") self.assertEqual(repo_config.user, self.creator.user) self.assertEqual(repo_config.user, self.creator.password) forward_column_names = config.forward_column_names self.assertEqual(len(forward_column_names), 2) self.assertEqual(forward_column_names[0], "col_a") self.assertEqual(forward_column_names[1], "col_b") self.assertEqual(collection.status.name, "SERVING") index_columns = config.index_column_params self.assertEqual(len(index_columns), 1) index_column = index_columns[0] self.assertEqual(index_column.name, f"column{idx}") self.assertEqual(index_column.index_type.name, "PROXIMA_GRAPH_INDEX") self.assertEqual(index_column.data_type.name, "VECTOR_FP32") self.assertEqual(index_column.dimension, 16 * (idx + 1)) self.assertFalse(index_column.extra_params) def test_create_collection_forward_columns(self): for idx in range(len(self.schema_list)): self.schema_list[idx].forward_column_names[:] = self.forward_columns_list[idx] collection = self.create_collection_succ_and_return(self.schema_list[idx]) logging.info("Create collection result: %s", collection) config = collection.collection_config self.assertEqual(self.forward_columns_list[idx], config.forward_column_names) def test_create_collection_index_columns(self): for idx in range(len(self.schema_index_column_list)): collection = self.create_collection_succ_and_return(self.schema_index_column_list[idx]) logging.info("Create collection result: %s", collection) index_columns = collection.collection_config.index_column_params for column in index_columns: self.assertTrue(column.name in self.index_columns_list[idx]) self.assertEqual(column.index_type.name, "PROXIMA_GRAPH_INDEX") self.assertEqual(column.data_type.name, "VECTOR_FP32") def test_drop_collection(self): # create collection collection = self.create_collection_succ_and_return(self.schema_list[0]) # drop collection status = self.client.drop_collection(self.collection_name_list[0]) self.assertTrue(status.ok()) logging.info("Drop collection result: %s", status) # def test_update_collection(self): # # create collection # code, obj = self.client.create_collection(self.schema_list[0]) # self.assertEqual(code, 200) # self.assertEqual(status.code, 0) # collection = obj["collection"] # logging.info("original collection result: %s", collection) # # # update_collection # self.update_schema(schema=self.schema_list[0], json_obj=obj["collection"]) # self.schema_list[0].forward_columns.append("col_c") # self.schema_list[0].revision = 2 # code, obj = self.client.update_collection(self.schema_list[0]) # collection = obj["collection"] # logging.info("Updated collection result: %s", collection) # # self.assertEqual(collection["name"], self.collection_name_list[0]) # self.assertEqual(collection["connection"], self.connection) # self.assertEqual(collection["repository_table"], "test_collection") # self.assertEqual(collection["repository_name"], "test_repo") # self.assertEqual(len(collection["forward_columns"]), 3) # self.assertEqual(collection["forward_columns"][0], "col_a") # self.assertEqual(collection["forward_columns"][1], "col_b") # self.assertEqual(collection["forward_columns"][2], "col_c") # self.assertEqual(collection["status"], "SERVING") # self.assertEqual(collection["is_current"], True) # self.assertEqual(collection["index_columns"][0]["name"], "column0") # self.assertEqual(collection["index_columns"][0]["alias"], "column0") # self.assertEqual(collection["index_columns"][0]["index_type"], "PROXIMA_GRAPH_INDEX") # self.assertEqual(collection["index_columns"][0]["data_type"], "FT_FP32") # self.assertEqual(len(collection["index_columns"][0]["parameters"]), 1) # self.assertEqual(collection["index_columns"][0]["parameters"][0]["key"], "dimension") # self.assertEqual(collection["index_columns"][0]["parameters"][0]["value"], "16") # # def test_collection_history(self): # # collection not exist # code, obj = self.client.get_collection_history(self.collection_name_list[0]) # self.assertEqual(code, 200) # self.assertEqual(obj['code'], -1001) # # # create collection # code, obj = self.client.create_collection(self.schema_list[0]) # self.assertEqual(code, 200) # self.assertEqual(status.code, 0) # collection = obj["collection"] # logging.info("original collection result: %s", collection) # # code, obj = self.client.get_collection_history(self.collection_name_list[0]) # self.assertEqual(code, 200) # self.assertEqual(obj['code'], 0) # collections = obj['collections'] # self.assertEqual(len(collections), 1) # collection = collections[0] # self.assertEqual(collection["name"], self.collection_name_list[0]) # self.assertEqual(len(collection["forward_columns"]), 2) # self.assertEqual(collection["forward_columns"][0], "col_a") # self.assertEqual(collection["forward_columns"][1], "col_b") # # # update_collection # self.update_schema(schema=self.schema_list[0], json_obj=collection) # self.schema_list[0].forward_columns.append("col_c") # self.schema_list[0].revision = 2 # code, obj = self.client.update_collection(self.schema_list[0]) # collection = obj["collection"] # logging.info("Updated collection result: %s", collection) # # code, obj = self.client.get_collection_history(self.collection_name_list[0]) # self.assertEqual(code, 200) # self.assertEqual(obj['code'], 0) # collections = obj['collections'] # self.assertEqual(len(collections), 2) # v1 = collections[0] # self.assertEqual(v1["name"], self.collection_name_list[0]) # # self.assertEqual(len(v1["forward_columns"]), 3) # self.assertEqual(v1["forward_columns"][0], "col_a") # self.assertEqual(v1["forward_columns"][1], "col_b") # self.assertEqual(v1["forward_columns"][2], "col_c") # # v0 = collections[1] # self.assertEqual(v0["name"], self.collection_name_list[0]) # self.assertEqual(v0['revision'], 0) # self.assertEqual(len(v0["forward_columns"]), 2) # self.assertEqual(v0["forward_columns"][0], "col_a") # self.assertEqual(v0["forward_columns"][1], "col_b") # # def test_remove_index_columns(self): # # create collection # code, obj = self.client.create_collection(self.schema_index_column_list[1]) # self.assertEqual(code, 200) # self.assertEqual(status.code, 0) # collection = obj["collection"] # logging.info("original collection result: %s", collection) # # # update collection # self.update_schema(schema=self.schema_index_column_list[1], json_obj=obj["collection"]) # self.schema_index_column_list[1].index_columns.pop() # code, obj = self.client.update_collection(self.schema_index_column_list[1]) # collection = obj["collection"] # logging.info("Updated collection result: %s", collection) # # self.assertEqual(collection["name"], "collection2") # self.assertEqual(collection["connection"], self.connection) # self.assertEqual(collection["repository_table"], "test_collection") # self.assertEqual(collection["repository_name"], "test_repo") # self.assertEqual(len(collection["forward_columns"]), 2) # self.assertEqual(collection["forward_columns"][0], "col_a") # self.assertEqual(collection["forward_columns"][1], "col_b") # self.assertEqual(collection["status"], "SERVING") # self.assertEqual(collection["is_current"], True) # self.assertEqual(collection["index_columns"][0]["name"], "column1") # self.assertEqual(collection["index_columns"][0]["alias"], "column1") # self.assertEqual(collection["index_columns"][0]["index_type"], "PROXIMA_GRAPH_INDEX") # self.assertEqual(collection["index_columns"][0]["data_type"], "FT_FP32") # self.assertEqual(len(collection["index_columns"][0]["parameters"]), 1) # self.assertEqual(collection["index_columns"][0]["parameters"][0]["key"], "dimension") # self.assertEqual(collection["index_columns"][0]["parameters"][0]["value"], "16") # # def test_remove_all_forward_columns(self): # # create collection # code, obj = self.client.create_collection(self.schema_list[0]) # self.assertEqual(code, 200) # self.assertEqual(status.code, 0) # collection = obj["collection"] # logging.info("original collection result: %s", collection) # # # remove forward columns # self.update_schema(schema=self.schema_list[0], json_obj=obj["collection"]) # self.schema_list[0].forward_columns.remove("col_a") # self.schema_list[0].forward_columns.remove("col_b") # code, obj = self.client.update_collection(self.schema_list[0]) # collection = obj["collection"] # logging.info("Updated collection result: %s", collection) # # self.assertEqual(collection["name"], self.collection_name_list[0]) # self.assertEqual(collection["connection"], self.connection) # self.assertEqual(collection["repository_table"], "test_collection") # self.assertEqual(collection["repository_name"], "test_repo") # self.assertEqual(len(collection["forward_columns"]), 0) # self.assertEqual(collection["status"], "SERVING") # self.assertEqual(collection["is_current"], True) # self.assertEqual(collection["index_columns"][0]["name"], "column0") # self.assertEqual(collection["index_columns"][0]["alias"], "column0") # self.assertEqual(collection["index_columns"][0]["index_type"], "PROXIMA_GRAPH_INDEX") # self.assertEqual(collection["index_columns"][0]["data_type"], "FT_FP32") # self.assertEqual(len(collection["index_columns"][0]["parameters"]), 1) # self.assertEqual(collection["index_columns"][0]["parameters"][0]["key"], "dimension") # self.assertEqual(collection["index_columns"][0]["parameters"][0]["value"], "16") # def test_list_collections(self): for idx in range(3): collection = self.create_collection_succ_and_return(self.schema_list[idx]) logging.info("Create collection result: %s", collection) # list collections status, collections = self.client.list_collections() logging.info("List collection result: %s", collections) self.assertTrue(status.ok()) for idx in range(3): collection = None for c in collections: if c.collection_config.collection_name == self.collection_name_list[idx]: collection = c break self.assertIsNotNone(collection) config = collection.collection_config self.assertEqual(config.collection_name, self.collection_name_list[idx]) self.assertTrue(config.repository_config is not None) repo_config = config.repository_config self.assertEqual(repo_config.connection_uri, self.connection) self.assertEqual(repo_config.table_name, "test_collection") self.assertEqual(repo_config.repository_name, "test_repo") self.assertEqual(repo_config.user, self.creator.user) self.assertEqual(repo_config.user, self.creator.password) forward_column_names = config.forward_column_names self.assertEqual(len(forward_column_names), 2) self.assertEqual(forward_column_names[0], "col_a") self.assertEqual(forward_column_names[1], "col_b") self.assertEqual(collection.status.name, "SERVING") index_columns = config.index_column_params self.assertEqual(len(index_columns), 1) index_column = index_columns[0] self.assertEqual(index_column.name, f"column{idx}") self.assertEqual(index_column.index_type.name, "PROXIMA_GRAPH_INDEX") self.assertEqual(index_column.data_type.name, "VECTOR_FP32") self.assertEqual(index_column.dimension, 16 * (idx + 1)) self.assertFalse(index_column.extra_params) def test_list_collections_with_repo(self): # recreate the schema repo_list = ["test_repo", "test_repo1", "test_repo2"] schema_list = [ self.create_collection_config(self.collection_name_list[i], [f"column{str(i)}"], [16 * (i + 1)], repository_name=repo_list[i]) for i in range(3)] # create multi collection for idx in range(3): status = self.client.create_collection(schema_list[idx]) self.assertTrue(status.ok()) status, collections = self.client.list_collections(repository_name="test_repo") self.assertTrue(status.ok()) self.assertEqual(len(collections), 1) idx = 0 collection = collections[idx] logging.info("Create collection result: %s", collection) # check collection config config = collection.collection_config self.assertEqual(config.collection_name, self.collection_name_list[0]) self.assertTrue(config.repository_config is not None) repo_config = config.repository_config self.assertEqual(repo_config.connection_uri, self.connection) self.assertEqual(repo_config.table_name, "test_collection") self.assertEqual(repo_config.repository_name, "test_repo") forward_column_names = config.forward_column_names self.assertEqual(len(forward_column_names), 2) self.assertEqual(forward_column_names[0], "col_a") self.assertEqual(forward_column_names[1], "col_b") index_columns = config.index_column_params self.assertEqual(len(index_columns), 1) index_column = index_columns[0] self.assertEqual(index_column.name, f"column{str(idx)}") self.assertEqual(index_column.index_type.name, "PROXIMA_GRAPH_INDEX") self.assertEqual(index_column.data_type.name, "VECTOR_FP32") self.assertEqual(index_column.dimension, 16 * (idx + 1)) self.assertFalse(index_column.extra_params) # check status self.assertEqual(collection.status.name, "SERVING") # def test_reload_collections(self): # # create collection # code, obj = self.client.create_collection(self.schema_list[0]) # self.assertEqual(code, 200) # self.assertEqual(status.code, 0) # collection = obj["collection"] # logging.info("original collection result: %s", collection) # # # reload meta # self.client.reload_meta() # # # list_collection # code, obj = self.client.describe_collection(self.collection_name_list[0]) # self.assertEqual(code, 200) # self.assertEqual(status.code, 0) # self.assertEqual(status.reason, '') # collection = obj["collection"] # self.assertEqual(collection["name"], self.collection_name_list[0]) # self.assertEqual(collection["connection"], self.connection) # self.assertEqual(collection["repository_table"], "test_collection") # self.assertEqual(collection["repository_name"], "test_repo") # self.assertEqual(len(collection["forward_columns"]), 2) # self.assertEqual(collection["forward_columns"][0], "col_a") # self.assertEqual(collection["forward_columns"][1], "col_b") # self.assertEqual(collection["status"], "SERVING") # self.assertEqual(collection["is_current"], True) # self.assertEqual(collection["index_columns"][0]["name"], "column0") # self.assertEqual(collection["index_columns"][0]["alias"], "column0") # self.assertEqual(collection["index_columns"][0]["index_type"], "PROXIMA_GRAPH_INDEX") # self.assertEqual(collection["index_columns"][0]["data_type"], "FT_FP32") # self.assertEqual(len(collection["index_columns"][0]["parameters"]), 1) # self.assertEqual(collection["index_columns"][0]["parameters"][0]["key"], "dimension") # self.assertEqual(collection["index_columns"][0]["parameters"][0]["value"], "16") # # logging.info("List collection result: %s", collection) # # def test_suspend_and_resume_collections(self): # # create collection # code, obj = self.client.create_collection(self.schema_list[0]) # self.assertEqual(code, 200) # self.assertEqual(status.code, 0) # collection = obj["collection"] # self.assertEqual(collection["status"], 'SERVING') # logging.info("original collection result: %s", collection) # # # suspend collection # self.client.suspend_collection(collection["name"]) # code, obj = self.client.describe_collection(collection["name"]) # collection = obj["collection"] # self.assertEqual(collection["writable"], False) # logging.info("suspend collection result: %s", collection) # # self.assertEqual(collection["connection"], self.connection) # self.assertEqual(collection["repository_table"], "test_collection") # self.assertEqual(collection["repository_name"], "test_repo") # self.assertEqual(len(collection["forward_columns"]), 2) # self.assertEqual(collection["forward_columns"][0], "col_a") # self.assertEqual(collection["forward_columns"][1], "col_b") # self.assertEqual(collection["is_current"], True) # self.assertEqual(collection["index_columns"][0]["name"], "column0") # self.assertEqual(collection["index_columns"][0]["alias"], "column0") # self.assertEqual(collection["index_columns"][0]["index_type"], "PROXIMA_GRAPH_INDEX") # self.assertEqual(collection["index_columns"][0]["data_type"], "FT_FP32") # self.assertEqual(len(collection["index_columns"][0]["parameters"]), 1) # self.assertEqual(collection["index_columns"][0]["parameters"][0]["key"], "dimension") # self.assertEqual(collection["index_columns"][0]["parameters"][0]["value"], "16") # # # resume collection # self.client.resume_collection(collection["name"]) # code, obj = self.client.describe_collection(collection["name"]) # collection = obj["collection"] # self.assertEqual(collection["status"], 'SERVING') # logging.info("resume collection result: %s", collection) # # self.assertEqual(collection["connection"], self.connection) # self.assertEqual(collection["repository_table"], "test_collection") # self.assertEqual(collection["repository_name"], "test_repo") # self.assertEqual(len(collection["forward_columns"]), 2) # self.assertEqual(collection["forward_columns"][0], "col_a") # self.assertEqual(collection["forward_columns"][1], "col_b") # self.assertEqual(collection["is_current"], True) # self.assertEqual(collection["index_columns"][0]["name"], "column0") # self.assertEqual(collection["index_columns"][0]["alias"], "column0") # self.assertEqual(collection["index_columns"][0]["index_type"], "PROXIMA_GRAPH_INDEX") # self.assertEqual(collection["index_columns"][0]["data_type"], "FT_FP32") # self.assertEqual(len(collection["index_columns"][0]["parameters"]), 1) # self.assertEqual(collection["index_columns"][0]["parameters"][0]["key"], "dimension") # self.assertEqual(collection["index_columns"][0]["parameters"][0]["value"], "16") # # def test_stats_all_collection(self): # for idx in range(3): # code, obj = self.client.create_collection(self.schema_list[idx]) # self.assertEqual(code, 200) # self.assertEqual(status.code, 0) # collection = obj["collection"] # logging.info("Create collection result: %s", collection) # # get all collection stats # code, data = self.client.get_collection_stats('') # stats = data['collection_stats'] # self.assertEqual(code, 200) # self.assertEqual(data["code"], 0) # self.assertTrue(len(stats) == 3) # collection2 = [c for c in stats if c['collection_name'] == 'collection2'][0] # self.assertGreater(int(collection2['total_segment_count']), 0) # self.assertGreater(len(collection2['segment_stats']), 0) def test_stats_collection(self): collection = self.create_collection_succ_and_return(self.schema_list[0]) logging.info("Create collection result: %s", collection) status, stats = self.client.stats_collection(self.collection_name_list[0]) logging.info("Collection stats: %s", stats) self.assertTrue(status.ok()) self.assertGreater(stats.total_segment_count, 0) self.assertGreater(len(stats.segment_stats), 0) def test_stats_invalid_collection(self): status, data = self.client.stats_collection("collection_not_exist") self.assertFalse(status.ok()) self.assertIsNone(data) self.assertEqual(status.code, -4002) self.assertEqual(status.reason, 'Collection Not Exist') # def test_query_service(self): # code, status = self.client.get_query_service_status() # self.assertEqual(code, 200) # self.assertEqual('running', status) # # self.client.stop_query_service() # time.sleep(0.1) # code, status = self.client.get_query_service_status() # self.assertEqual(code, 200) # self.assertEqual('stopped', status) # # self.client.start_query_service() # time.sleep(0.1) # code, status = self.client.get_query_service_status() # self.assertEqual(code, 200) # self.assertEqual('running', status) if __name__ == '__main__': unittest.main() ================================================ FILE: tests/integration/src/case/test_admin_agent_exception.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import logging import time import unittest from pyproximabe import Client from collection_creator import CollectionCreator from server_utils import ServerUtils from test_admin_agent import TestAdminAgentBase class TestAdminAgentException(TestAdminAgentBase): def setUp(self): super().setUp() self.server_utils = ServerUtils() def test_create_duplicate_collection(self): # create collection collection = self.create_collection_succ_and_return(self.schema_list[0]) logging.info("original collection result: %s", collection) # create same collection status = self.client.create_collection(self.schema_list[0]) self.assertFalse(status.ok()) self.assertEqual(status.code, -4000) self.assertEqual(status.reason, 'Duplicate Collection') def test_create_illegal_collection(self): # empty index columns self.schema_list[0].index_column_params.pop() status = self.client.create_collection(self.schema_list[0]) self.assertFalse(status.ok()) self.assertEqual(status.code, -2002) self.assertEqual(status.reason, 'Empty Columns') # todo:add detail reason def test_drop_repeated_collection(self): # create collection collection = self.create_collection_succ_and_return(self.schema_list[0]) logging.info("original collection result: %s", collection) # drop collection status = self.client.drop_collection(self.collection_name_list[0]) self.assertTrue(status.ok()) logging.info("Drop collection result: %s", status) # drop collection repeated status = self.client.drop_collection(self.collection_name_list[0]) self.assertEqual(status.code, -4002) self.assertEqual(status.reason, 'Collection Not Exist') def test_drop_nonexist_collection(self): for idx in range(len(self.collection_name_list)): status = self.client.drop_collection(self.collection_name_list[idx]) self.assertEqual(status.code, -4002) self.assertEqual(status.reason, 'Collection Not Exist') # def test_update_nonexist_collection(self): # # create collection # status = self.client.create_collection(self.schema_list[0]) # self.assertEqual(code, 200) # self.assertEqual(status.code, 0) # collection = obj["collection"] # logging.info("original collection result: %s", collection) # # # update collection with fake name # self.schema_list[0].name = "collection_100" # status = self.client.update_collection(self.schema_list[0]) # self.assertEqual(code, 200) # self.assertEqual(status.code, -1001) # self.assertEqual(status.reason, 'Collection not exist') # # def test_illegal_update_collection(self): # # create collection # status = self.client.create_collection(self.schema_list[0]) # self.assertEqual(code, 200) # self.assertEqual(status.code, 0) # collection = obj["collection"] # logging.info("original collection result: %s", collection) # # self.update_schema(schema=self.schema_list[0], json_obj=obj["collection"]) # # todo: lack detail reason # # update connection # self.schema_list[0].connection = "mysql://root:root@127.0.0.1:4306/fake_db" # status = self.client.update_collection(self.schema_list[0]) # # update repository_name # self.schema_list[0].repository_table = "fake_name" # status = self.client.update_collection(self.schema_list[0]) # # update repository_table # self.schema_list[0].repository_table = "fake_table" # status = self.client.update_collection(self.schema_list[0]) # # update is_current # self.schema_list[0].is_current = False # status = self.client.update_collection(self.schema_list[0]) # # def test_remove_all_index_columns(self): # # create collection # status = self.client.create_collection(self.schema_index_column_list[1]) # self.assertEqual(code, 200) # self.assertEqual(status.code, 0) # collection = obj["collection"] # logging.info("original collection result: %s", collection) # # self.update_schema(schema=self.schema_index_column_list[1], json_obj=obj["collection"]) # # self.schema_index_column_list[1].index_columns.pop() # self.schema_index_column_list[1].index_columns.pop() # # todo: lack detail reason # status = self.client.update_collection(self.schema_index_column_list[1]) def test_restart_server_with_list_collections(self): collection = self.create_collection_succ_and_return(self.schema_list[0]) logging.info("Create collection result: %s", collection) self.assert_collection(collection, 0) time.sleep(5) # restart proxima be self.server_utils.stop_proxima_be('SIGUSR1') self.server_utils.start_proxima_be() time.sleep(2) # resetup self.setup_client() # describe collection status, collection = self.client.describe_collection(self.collection_name_list[0]) logging.info('describe collection, status=[%s], collection=[%s]', status, collection) self.assertTrue(status.ok()) self.assert_collection(collection, 0) def test_restart_server_with_create_collections(self): # create collection collection = self.create_collection_succ_and_return(self.schema_list[0]) logging.info("Create collection result: %s", collection) self.assert_collection(collection, 0) time.sleep(5) # restart proxima be self.server_utils.stop_proxima_be('SIGUSR1') self.server_utils.start_proxima_be() time.sleep(2) # resetup self.setUp() collection = self.create_collection_succ_and_return(self.schema_list[1]) logging.info("Create collection result: %s", collection) self.assert_collection(collection, 1) # def test_restart_server_with_update_collections(self): # # create collection # status = self.client.create_collection(self.schema_list[0]) # self.assertEqual(code, 200) # self.assertEqual(status.code, 0) # collection = obj["collection"] # logging.info("original collection result: %s", collection) # # self.assertEqual(collection["name"], self.collection_name_list[0]) # self.assertEqual(collection["connection"], self.connection) # self.assertEqual(collection["repository_table"], "test_collection") # self.assertEqual(collection["repository_name"], "test_repo") # self.assertEqual(len(collection["forward_columns"]), 2) # self.assertEqual(collection["forward_columns"][0], "col_a") # self.assertEqual(collection["forward_columns"][1], "col_b") # self.assertEqual(collection["status"], "SERVING") # self.assertEqual(collection["is_current"], True) # self.assertEqual(collection["index_columns"][0]["name"], "column0") # self.assertEqual(collection["index_columns"][0]["alias"], "column0") # self.assertEqual(collection["index_columns"][0]["index_type"], "PROXIMA_GRAPH_INDEX") # self.assertEqual(collection["index_columns"][0]["data_type"], "FT_FP32") # self.assertEqual(len(collection["index_columns"][0]["parameters"]), 1) # self.assertEqual(collection["index_columns"][0]["parameters"][0]["key"], "dimension") # self.assertEqual(collection["index_columns"][0]["parameters"][0]["value"], "16") # # self.client.close() # time.sleep(5) # # # restart proxima be # self.server_utils.stop_proxima_be('SIGUSR1') # self.server_utils.start_proxima_be() # time.sleep(2) # # # update collection # self.client = AdminAgentClient() # # # update_collection # self.update_schema(schema=self.schema_list[0], json_obj=obj["collection"]) # self.schema_list[0].forward_columns.append("col_c") # status = self.client.update_collection(self.schema_list[0]) # collection = obj["collection"] # logging.info("Updated collection result: %s", collection) # # self.assertEqual(collection["name"], self.collection_name_list[0]) # self.assertEqual(collection["connection"], self.connection) # self.assertEqual(collection["repository_table"], "test_collection") # self.assertEqual(collection["repository_name"], "test_repo") # self.assertEqual(len(collection["forward_columns"]), 3) # self.assertEqual(collection["forward_columns"][0], "col_a") # self.assertEqual(collection["forward_columns"][1], "col_b") # self.assertEqual(collection["forward_columns"][2], "col_c") # self.assertEqual(collection["status"], "SERVING") # self.assertEqual(collection["is_current"], True) # self.assertEqual(collection["index_columns"][0]["name"], "column0") # self.assertEqual(collection["index_columns"][0]["alias"], "column0") # self.assertEqual(collection["index_columns"][0]["index_type"], "PROXIMA_GRAPH_INDEX") # self.assertEqual(collection["index_columns"][0]["data_type"], "FT_FP32") # self.assertEqual(len(collection["index_columns"][0]["parameters"]), 1) # self.assertEqual(collection["index_columns"][0]["parameters"][0]["key"], "dimension") # self.assertEqual(collection["index_columns"][0]["parameters"][0]["value"], "16") def test_restart_server_with_drop_collections(self): # create collection collection = self.create_collection_succ_and_return(self.schema_list[0]) logging.info("Create collection result: %s", collection) self.assert_collection(collection, 0) time.sleep(5) # restart proxima be self.server_utils.stop_proxima_be('SIGUSR1') self.server_utils.start_proxima_be() time.sleep(2) # resetup self.setup_client() status = self.client.drop_collection(self.collection_name_list[0]) logging.info("Drop collection result: %s", status) self.assertTrue(status.ok()) def assert_collection(self, collection, idx): config = collection.collection_config self.assertEqual(config.collection_name, self.collection_name_list[idx]) self.assertTrue(config.repository_config is not None) repo_config = config.repository_config self.assertEqual(repo_config.connection_uri, self.connection) self.assertEqual(repo_config.table_name, "test_collection") self.assertEqual(repo_config.repository_name, "test_repo") self.assertEqual(repo_config.user, self.creator.user) self.assertEqual(repo_config.user, self.creator.password) forward_column_names = config.forward_column_names self.assertEqual(len(forward_column_names), 2) self.assertEqual(forward_column_names[0], "col_a") self.assertEqual(forward_column_names[1], "col_b") self.assertEqual(collection.status.name, "SERVING") index_columns = config.index_column_params self.assertEqual(len(index_columns), 1) index_column = index_columns[0] self.assertEqual(index_column.name, f"column{idx}") self.assertEqual(index_column.index_type.name, "PROXIMA_GRAPH_INDEX") self.assertEqual(index_column.data_type.name, "VECTOR_FP32") self.assertEqual(index_column.dimension, 16 * (idx + 1)) self.assertFalse(index_column.extra_params) if __name__ == '__main__': unittest.main() ================================================ FILE: tests/integration/src/case/test_index_agent.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import logging import struct import grpc import unittest import time import random from pyproximabe import * from global_conf import GlobalConf from collection_creator import CollectionCreator import client_helper OperationType = WriteRequest.OperationType class TestIndexAgentBase(unittest.TestCase): def setUp(self): self.global_conf = GlobalConf() self.creator = CollectionCreator() self.client = client_helper.get_client(self.global_conf) self.collection_name = "collection1" self.collection_name2 = "collection2" self.repository_name = "test_repo" self.clean_env() self.index_columns = ["column1"] self.index_dimensions = [16] self.schema = self.create_schema(self.collection_name, self.index_columns, self.index_dimensions, with_repo=self.with_repo) status = self.client.create_collection(self.schema) self.assertTrue(status.ok()) self.connection = self.creator.get_connection() def tearDown(self): self.clean_env() def reconnect(self): self.client = client_helper.get_client(self.global_conf) def clean_env(self): status, collections = self.client.list_collections() self.assertTrue(status.ok()) for collection in collections: status = self.client.drop_collection(collection.collection_config.collection_name) self.assertTrue(status.ok()) def create_schema(self, collection_name, column_name, dims, forward_columns=["col_a", "col_b"], repository_name="test_repo", with_repo=True): return self.creator.create_schema(collection_name, repository_table="test_collection", repository_name=repository_name, forward_columns=forward_columns, index_columns=column_name, index_dimensions=dims, db_name="test_db", with_repo=with_repo) def create_schema1(self, collection_name, index_columns=None, dimensions=None, forward_columns=None, with_repo=True): return self.creator.create_schema(collection_name, repository_table="test_collection", repository_name="test_repo", forward_columns=forward_columns, index_columns=index_columns, index_dimensions=dimensions, db_name="test_db", with_repo=with_repo) def create_all_index_data_types_schema(self, collection_name, dim, with_repo=True): index_data_types = [DataType.VECTOR_FP32, DataType.VECTOR_FP16, DataType.VECTOR_INT8, DataType.VECTOR_INT4, DataType.VECTOR_BINARY32, DataType.VECTOR_BINARY64] index_columns = [] index_dimensions = [] for i in range(0, len(index_data_types)): index_columns.append('column_' + str(i)) index_dimensions.append(dim) return self.creator.create_schema(collection_name, repository_table="test_collection", repository_name="test_repo", forward_columns=["col_a", "col_b"], index_columns=index_columns, index_data_types=index_data_types, index_dimensions=index_dimensions, db_name="test_db", with_repo=with_repo) def create_all_forward_data_types_schema(self, collection_name, dim, with_repo=True): index_data_types = [DataType.VECTOR_FP32] index_columns = ['column_0'] index_dimensions = [dim] forward_columns = [] forward_cnt = 9 for i in range(0, forward_cnt): forward_columns.append('forward_' + str(i)) return self.creator.create_schema(collection_name, repository_table="test_collection", repository_name="test_repo", forward_columns=forward_columns, index_columns=index_columns, index_data_types=index_data_types, index_dimensions=index_dimensions, db_name="test_db", with_repo=with_repo) def create_single_request(self, magic_number, operation_type, forwards = [1.234, 'abc'], lsn=10, is_bytes=False, is_vector=False): index_tuple_metas = [['column1', DataType.VECTOR_FP32, self.index_dimensions[0]]] index_tuple_types = ['string'] forward_tuple_names = ['col_a', 'col_b'] forward_tuple_types = [DataType.FLOAT, DataType.STRING] if not is_bytes: feature = "[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]" else: vector = [1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2] values = [] for value in vector: values.append(struct.pack('f', value)) feature = b''.join(values) if is_vector: feature = [1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2] rows = [[1, operation_type, lsn, feature, forwards[0], forwards[1]] ] return self.creator.create_dataset_request(self.collection_name, magic_number, index_tuple_metas = index_tuple_metas, index_tuple_types = index_tuple_types, forward_tuple_names = forward_tuple_names, forward_tuple_types = forward_tuple_types, rows = rows, with_repo=self.with_repo) def create_batch_request(self, magic_number, count, operation_type, forwards=[0.234, 'abc'], lsn = 10, index_value_base = 0): index_tuple_metas = [['column1', DataType.VECTOR_FP32, self.index_dimensions[0]]] index_tuple_types = ['string'] rows = [] forward_tuple_names=['col_a', 'col_b'] forward_tuple_types=[DataType.FLOAT, DataType.STRING] for i in range(1, count + 1): rows.append([i, operation_type, lsn + i, '[' + str(i + index_value_base) + ",1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]", forwards[0] + i, forwards[1]]) return self.creator.create_dataset_request(self.collection_name, magic_number, index_tuple_metas = index_tuple_metas, index_tuple_types = index_tuple_types, forward_tuple_names = forward_tuple_names, forward_tuple_types = forward_tuple_types, rows = rows, with_repo=self.with_repo) def create_one_forward_request(self, collection, magic_number, count, operation_type, forwards=[0.234], lsn = 10, index_value_base = 0): index_tuple_metas = [['column1', DataType.VECTOR_FP32, self.index_dimensions[0]]] index_tuple_types = ['string'] rows = [] forward_tuple_names=['col_a'] forward_tuple_types=[DataType.FLOAT] for i in range(1, count + 1): rows.append([i, operation_type, lsn + i, '[' + str(i + index_value_base) + ",1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]", forwards[0] + i]) return self.creator.create_dataset_request(collection, magic_number, index_tuple_metas = index_tuple_metas, index_tuple_types = index_tuple_types, forward_tuple_names = forward_tuple_names, forward_tuple_types = forward_tuple_types, rows = rows, with_repo=self.with_repo) def create_multi_index_request(self, collection, dim, magic_number, count, operation_type, lsn = 10, index_value_base = 0): index_tuple_metas = [['index2', DataType.VECTOR_FP32, dim], ['index1', DataType.VECTOR_FP32, dim]] index_tuple_names = ['index2', 'index1'] index_tuple_types = ['string', 'string'] rows = [] forward_tuple_names=['col_a', 'index1'] forward_tuple_types=[DataType.FLOAT, DataType.STRING] for i in range(1, count + 1): rows.append([i, operation_type, lsn + i, '[' + str(i + index_value_base) + ",1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]", '[' + str(i + index_value_base) + ",1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]", 0.234 + i, '[' + str(i + index_value_base) + ",1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]"]) return self.creator.create_dataset_request(collection, magic_number, index_tuple_metas = index_tuple_metas, index_tuple_types = index_tuple_types, forward_tuple_names = forward_tuple_names, forward_tuple_types = forward_tuple_types, rows = rows, with_repo=self.with_repo) def create_all_operations_request(self, magic_number, count, operation_types, forwards=[0.234, 'abc'], lsn = 10, index_value_base = 0): index_tuple_metas = [['column1', DataType.VECTOR_FP32, self.index_dimensions[0]]] index_tuple_types = ['string'] forward_tuple_names = ['col_a', 'col_b'] forward_tuple_types = [DataType.FLOAT, DataType.STRING] rows = [] lsn = 1 for i in range(1, count + 1): idx = 1 for operation_type in operation_types: rows.append([i, operation_type, lsn, '[' + str(i + index_value_base) + ",1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]", forwards[0] + idx, forwards[1]]) idx += 1 lsn += 1 return self.creator.create_dataset_request(self.collection_name, magic_number, index_tuple_metas = index_tuple_metas, index_tuple_types = index_tuple_types, forward_tuple_names = forward_tuple_names, forward_tuple_types = forward_tuple_types, rows = rows, with_repo=self.with_repo) def create_all_index_data_types_insert_request(self, magic_number, dim, count): index_tuple_metas = [] index_tuple_types = [] index_data_types = [DataType.VECTOR_FP32, DataType.VECTOR_FP16, DataType.VECTOR_INT8, DataType.VECTOR_INT4, DataType.VECTOR_BINARY32, DataType.VECTOR_BINARY64] total_types = 6 for i in range(0, total_types): index_tuple_metas.append(['column_' + str(i), index_data_types[i], dim]) forward_tuple_names = ['col_a', 'col_b'] forward_tuple_types = [DataType.FLOAT, DataType.STRING] rows = [] for i in range(1, count + 1): row = [i, OperationType.INSERT, 9 + i] for j in range(0, total_types): vec = str(i) if j == 5: vec = str(i) elif j == 4: vec = str(i) + ',' + str(i) else: for k in range(1, dim): vec += ',' + str(i) row.append('[' + vec + ']') row.append(0.234 + i) row.append('abc') rows.append(row) return self.creator.create_dataset_request(self.collection_name2, magic_number, index_tuple_metas = index_tuple_metas, index_tuple_types = None, forward_tuple_names = forward_tuple_names, forward_tuple_types = forward_tuple_types, rows = rows, with_repo=self.with_repo) def create_all_forward_data_types_insert_request(self, magic_number, dim, count): index_tuple_metas = [['column_0', DataType.VECTOR_FP32, dim]] index_tuple_types = ['string'] total_types = 9 forward_tuple_names = [] forward_tuple_types = [DataType.BINARY, DataType.STRING, DataType.BOOL, DataType.INT32, DataType.INT64, DataType.UINT32, DataType.UINT64, DataType.FLOAT, DataType.DOUBLE] for i in range(0, total_types): forward_tuple_names.append('forward_' + str(i)) rows = [] for i in range(1, count + 1): row = [i, OperationType.INSERT, 9 + i] vec = str(i) for k in range(1, dim): vec += ',' + str(i) row.append('[' + vec + ']') row.append(str(i).encode('UTF-8')) row.append(str(i) * i) if i % 2 == 1: row.append(True) else: row.append(False) row.append(i) row.append(i * 10) row.append(i * 100) row.append(i * 1000) row.append(i * 1.0) row.append(i * 10.0) rows.append(row) return self.creator.create_dataset_request(self.collection_name2, magic_number, index_tuple_metas = index_tuple_metas, index_tuple_types = index_tuple_types, forward_tuple_names = forward_tuple_names, forward_tuple_types = forward_tuple_types, rows = rows, with_repo=self.with_repo) def create_request(self, collection_name, magic_number, count, operation_type=None, operation_types=None, forward_tuple_names=['col_a', 'col_b'], forward_tuple_types=None, forwards=[0.234, 'abc'], index_tuple_metas = None, index_tuple_types = ['string'], lsn = 10, index_value_base = 0, vector_exception=False, key_repeated=False, empty_request=False): rows = [] if not index_tuple_metas: index_tuple_metas = [['column1', DataType.VECTOR_FP32, self.index_dimensions[0]]] if not forward_tuple_types: forward_tuple_types=[DataType.FLOAT, DataType.STRING] index_num = len(index_tuple_metas) index_types = [] if index_tuple_types: index_types = index_tuple_types if not operation_types: operation_types = [] for i in range(1, count + 1): operation_types.append(operation_type) for i in range(1, count + 1): row = [] if not key_repeated: row = [i + index_value_base, operation_types[i - 1], lsn + i] else: row = [1, operation_types[i - 1], lsn + i] for j in range(0, index_num): vector = str(i + index_value_base) + ",1,1,1,1,1,1,1,2,2,2,2,2,2,2,2" if vector_exception: vector += "1,1,1" row.append('[' + vector + ']') row.append(forwards[0] + i) row.append(forwards[1]) if not empty_request: rows.append(row) return self.creator.create_dataset_request(collection_name, magic_number, index_tuple_metas = index_tuple_metas, index_tuple_types = index_types, forward_tuple_names = forward_tuple_names, forward_tuple_types = forward_tuple_types, rows = rows) def simple_query(self, topk=10): features = [[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]] return self.client.query(self.collection_name, 'column1', features, data_type=DataType.VECTOR_FP32, dimension=16, batch_count=1, topk=topk) def query(self, index_column, topk, dim, feature_type): features = [] if feature_type == DataType.VECTOR_INT4: dim /= 2 elif feature_type == DataType.VECTOR_BINARY32: dim /= 32 elif feature_type == DataType.VECTOR_BINARY64: dim /= 64 for i in range(0, int(dim)): features.append(1) # for f in features: # if feature_type == common_pb2.FeatureType.FT_FP32: # fea_bytes += struct.pack('f', f) # elif feature_type == common_pb2.FeatureType.FT_FP16: # fea_bytes += struct.pack('h', 0) # elif feature_type == common_pb2.FeatureType.FT_INT8: # fea_bytes += struct.pack('b', f) # elif feature_type == common_pb2.FeatureType.FT_INT4: # fea_bytes += struct.pack('b', 17) # elif feature_type == common_pb2.FeatureType.FT_BINARY32: # fea_bytes += struct.pack('I', f) # elif feature_type == common_pb2.FeatureType.FT_BINARY64: # fea_bytes += struct.pack('L', f) return self.client.query(self.collection_name2, index_column, features, data_type=feature_type, dimension=dim, batch_count=1, topk=topk) def get_magic_number(self, collection_name): status, collection = self.client.describe_collection(collection_name) self.assertTrue(status.ok()) return collection.magic_number class TestIndexAgentDatabase(TestIndexAgentBase): def setUp(self): self.with_repo = True super().setUp() def test_single_insert(self): magic_number = self.get_magic_number(self.collection_name) req = self.create_single_request(magic_number, OperationType.INSERT) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 1) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') def test_single_insert_with_bytes(self): magic_number = self.get_magic_number(self.collection_name) req = self.create_single_request(magic_number, OperationType.INSERT, is_bytes=True) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 1) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') def test_single_insert_with_vector(self): magic_number = self.get_magic_number(self.collection_name) req = self.create_single_request(magic_number, OperationType.INSERT, is_vector=True) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 1) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') def test_batch_insert(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 2 req = self.create_batch_request(magic_number, batch_count, OperationType.INSERT) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 2) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 2.0) self.assertEqual(len(documents[1].forward_column_values), 2) self.assertAlmostEqual(documents[1].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], 'abc') def test_insert_with_all_index_data_types(self): dim = 64 new_schema = self.create_all_index_data_types_schema(self.collection_name2, dim) logging.info("new schema: %s", new_schema) status = self.client.create_collection(new_schema) logging.info("create collection result: %s", status) self.assertTrue(status.ok()) magic_number = self.get_magic_number(self.collection_name2) batch_count = 6 req = self.create_all_index_data_types_insert_request(magic_number, dim, batch_count) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertTrue(response.ok()) time.sleep(1) topk = 5 # data type fp32 status,response = self.query("column_0", topk, dim, DataType.VECTOR_FP32) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), topk) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 0.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 64.0) self.assertEqual(documents[2].primary_key, 3) self.assertEqual(documents[2].score, 256.0) self.assertEqual(documents[3].primary_key, 4) self.assertEqual(documents[3].score, 576.0) self.assertEqual(documents[4].primary_key, 5) self.assertEqual(documents[4].score, 1024.0) # # data type fp16 client not support # status,response = self.query("column_1", topk, dim, DataType.VECTOR_FP16) # self.assertTrue(status.ok()) # logging.info("query result: %s", response) # results = response.results # self.assertEqual(len(results), 1) # documents = results[0] # self.assertEqual(len(documents), topk) # self.assertEqual(documents[0].primary_key, 1) # self.assertEqual(documents[0].score, 64) # self.assertEqual(len(documents[0].forward_column_values), 2) # self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) # self.assertEqual(documents[1].forward_column_values['col_b'], 'abc') # self.assertEqual(documents[1].primary_key, 2) # self.assertEqual(documents[1].score, 256.0) # self.assertEqual(documents[2].primary_key, 3) # self.assertEqual(documents[2].score, 576.0) # self.assertEqual(documents[3].primary_key, 4) # self.assertEqual(documents[3].score, 1024) # self.assertEqual(documents[4].primary_key, 5) # self.assertEqual(documents[4].score, 1600.0) # # data type int8 client not support # status,response = self.query("column_2", topk, dim, DataType.VECTOR_INT8) # self.assertTrue(status.ok()) # logging.info("query result: %s", response) # results = response.results # self.assertEqual(len(results), 1) # documents = results[0] # self.assertEqual(len(documents), topk) # self.assertEqual(documents[0].primary_key, 1) # self.assertEqual(documents[0].score, 0) # self.assertEqual(len(documents[0].forward_column_values), 2) # self.assertEqual(documents[1].primary_key, 2) # self.assertEqual(documents[1].score, 64.0) # self.assertEqual(documents[2].primary_key, 3) # self.assertEqual(documents[2].score, 256.0) # self.assertEqual(documents[3].primary_key, 4) # self.assertEqual(documents[3].score, 576.0) # self.assertEqual(documents[4].primary_key, 5) # self.assertEqual(documents[4].score, 1024.0) # # data type int4 # query = self.create_query("column_3", topk, dim, DataType.INT4) # logging.info("query %s", query) # response = self.client.query(query) # logging.info("query result: %s", response) # self.assertEqual(response.code, 0) # documents = response.entity[0] # self.assertEqual(len(documents), topk) # self.assertEqual(documents[0].primary_key, 1) # self.assertEqual(documents[0].score, 0) # self.assertEqual(len(documents[0].forward), 2) # self.assertEqual(documents[0].forward[0].key, 'col_a') # self.assertAlmostEqual(documents[0].forward[0].value.float_value, 1.234) # self.assertEqual(documents[0].forward[1].key, 'col_b') # self.assertEqual(documents[0].forward[1].value.bytes_value, 'abc'.encode('UTF-8')) # self.assertEqual(documents[1].primary_key, 2) # self.assertEqual(documents[1].score, 64.0) # self.assertEqual(documents[2].primary_key, 3) # self.assertEqual(documents[2].score, 256.0) # self.assertEqual(documents[3].primary_key, 4) # self.assertEqual(documents[3].score, 576.0) # self.assertEqual(documents[4].primary_key, 5) # self.assertEqual(documents[4].score, 1024.0) # # data type binary32 # query = self.create_query("column_4", topk, dim, DataType.BINARY32) # logging.info("query %s", query) # response = self.client.query(query) # logging.info("query result: %s", response) # self.assertEqual(response.code, 0) # documents = response.entity[0] # self.assertEqual(len(documents), topk) # self.assertEqual(documents[0].primary_key, 1) # self.assertEqual(documents[0].score, 0) # self.assertEqual(len(documents[0].forward), 2) # self.assertEqual(documents[0].forward[0].key, 'col_a') # self.assertAlmostEqual(documents[0].forward[0].value.float_value, 1.234) # self.assertEqual(documents[0].forward[1].key, 'col_b') # self.assertEqual(documents[0].forward[1].value.bytes_value, 'abc'.encode('UTF-8')) # self.assertEqual(documents[1].score, 2.0) # self.assertEqual(documents[2].score, 2.0) # self.assertEqual(documents[3].score, 4.0) # self.assertEqual(documents[4].score, 4.0) # # data type binary64 # query = self.create_query("column_5", topk, dim, DataType.BINARY64) # logging.info("query %s", query) # response = self.client.query(query) # logging.info("query result: %s", response) # self.assertEqual(response.code, 0) # documents = response.entity[0] # self.assertEqual(len(documents), topk) # self.assertEqual(documents[0].primary_key, 1) # self.assertEqual(documents[0].score, 0) # self.assertEqual(len(documents[0].forward), 2) # self.assertEqual(documents[0].forward[0].key, 'col_a') # self.assertAlmostEqual(documents[0].forward[0].value.float_value, 1.234) # self.assertEqual(documents[0].forward[1].key, 'col_b') # self.assertEqual(documents[0].forward[1].value.bytes_value, 'abc'.encode('UTF-8')) # self.assertEqual(documents[1].score, 1.0) # self.assertEqual(documents[2].score, 1.0) # self.assertEqual(documents[3].score, 2.0) # self.assertEqual(documents[4].score, 2.0) def test_insert_with_all_forward_data_types(self): dim = 64 new_schema = self.create_all_forward_data_types_schema(self.collection_name2, dim) logging.info("new schema: %s", new_schema) status = self.client.create_collection(new_schema) self.assertTrue(status.ok()) magic_number = self.get_magic_number(self.collection_name2) batch_count = 6 req = self.create_all_forward_data_types_insert_request(magic_number, dim, batch_count) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(status.ok()) time.sleep(1) topk = 5 status,response = self.query("column_0", topk, dim, DataType.VECTOR_FP32) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), topk) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 0.0) self.assertEqual(len(documents[0].forward_column_values), 9) self.assertEqual(documents[0].forward_column_values['forward_0'], '1'.encode('UTF-8')) self.assertEqual(documents[0].forward_column_values['forward_1'], '1') self.assertEqual(documents[0].forward_column_values['forward_2'], True) self.assertEqual(documents[0].forward_column_values['forward_3'], 1) self.assertEqual(documents[0].forward_column_values['forward_4'], 10) self.assertEqual(documents[0].forward_column_values['forward_5'], 100) self.assertEqual(documents[0].forward_column_values['forward_6'], 1000) self.assertEqual(documents[0].forward_column_values['forward_7'], 1.0) self.assertEqual(documents[0].forward_column_values['forward_8'], 10.0) self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 64.0) self.assertEqual(documents[2].primary_key, 3) self.assertEqual(documents[2].score, 256.0) self.assertEqual(documents[3].primary_key, 4) self.assertEqual(documents[3].score, 576.0) self.assertEqual(documents[4].primary_key, 5) self.assertEqual(documents[4].score, 1024.0) def test_single_update(self): magic_number = self.get_magic_number(self.collection_name) forwards = [1.234, 'abc'] req = self.create_single_request(magic_number, OperationType.INSERT, forwards = forwards, lsn = 10) response = self.client.write(req) self.assertTrue(response.ok()) forwards = [2.234, 'def'] req = self.create_single_request(magic_number, OperationType.UPDATE, forwards = forwards, lsn = 11) logging.info("req: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 1) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'def') def test_single_update_with_bytes(self): magic_number = self.get_magic_number(self.collection_name) forwards = [1.234, 'abc'] req = self.create_single_request(magic_number, OperationType.INSERT, forwards = forwards, lsn = 10, is_bytes = True) response = self.client.write(req) self.assertTrue(response.ok()) forwards = [2.234, 'def'] req = self.create_single_request(magic_number, OperationType.UPDATE, forwards = forwards, lsn = 11, is_bytes = True) logging.info("req: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 1) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'def') def test_batch_update(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 6 forwards = [0.234, 'abc'] req = self.create_batch_request(magic_number, batch_count, OperationType.INSERT, forwards = forwards, lsn = 10) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) forwards = [1.234, 'def'] req = self.create_batch_request(magic_number, batch_count, OperationType.UPDATE, forwards = forwards, lsn = 20) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 6) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'def') self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 2.0) self.assertEqual(documents[2].primary_key, 3) self.assertEqual(documents[2].score, 5.0) self.assertEqual(documents[3].primary_key, 4) self.assertEqual(documents[3].score, 10.0) self.assertEqual(documents[4].primary_key, 5) self.assertEqual(documents[4].score, 17.0) self.assertEqual(documents[5].primary_key, 6) self.assertEqual(documents[5].score, 26.0) self.assertEqual(len(documents[5].forward_column_values), 2) self.assertAlmostEqual(documents[5].forward_column_values['col_a'], 7.234, delta=0.000001) self.assertEqual(documents[5].forward_column_values['col_b'], 'def') def test_update_only_index_column(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 2 forwards = [0.234, 'abc'] req = self.create_batch_request(magic_number, batch_count, OperationType.INSERT, forwards = forwards, lsn = 10, index_value_base = 0) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) req = self.create_batch_request(magic_number, batch_count, OperationType.UPDATE, forwards = forwards, lsn = 20, index_value_base = 10) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 2) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 101.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 122.0) self.assertEqual(len(documents[1].forward_column_values), 2) self.assertAlmostEqual(documents[1].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], 'abc') def test_update_both_index_and_forward_column(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 2 forwards = [0.234, 'abc'] req = self.create_batch_request(magic_number, batch_count, OperationType.INSERT, forwards = forwards, lsn = 10, index_value_base = 0) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) forwards = [1.234, 'def'] req = self.create_batch_request(magic_number, batch_count, OperationType.UPDATE, forwards = forwards, lsn = 20, index_value_base = 10) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 2) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 101.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'def') self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 122.0) self.assertEqual(len(documents[1].forward_column_values), 2) self.assertAlmostEqual(documents[1].forward_column_values['col_a'], 3.234, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], 'def') def test_single_delete(self): magic_number = self.get_magic_number(self.collection_name) req = self.create_single_request(magic_number, OperationType.INSERT) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 1) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') req = self.create_single_request(magic_number, OperationType.DELETE) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 0) def test_batch_delete(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 8 req = self.create_batch_request(magic_number, batch_count, OperationType.INSERT) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), batch_count) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 2.0) self.assertEqual(len(documents[1].forward_column_values), 2) self.assertAlmostEqual(documents[1].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], 'abc') req = self.create_batch_request(magic_number, batch_count, OperationType.DELETE) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 0) def test_all_operations(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 5 operation_types = [OperationType.INSERT, OperationType.UPDATE, OperationType.DELETE, OperationType.INSERT, OperationType.UPDATE, OperationType.DELETE, OperationType.INSERT, OperationType.UPDATE, OperationType.UPDATE] req = self.create_all_operations_request(magic_number, batch_count, operation_types=operation_types) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), batch_count) for i in range (1, batch_count + 1): self.assertEqual(documents[i - 1].primary_key, i) self.assertEqual(documents[i - 1].score, (i - 1) * (i - 1) + 1.0) self.assertEqual(len(documents[i - 1].forward_column_values), 2) self.assertAlmostEqual(documents[i - 1].forward_column_values['col_a'], 9.234, delta=0.000001) self.assertEqual(documents[i - 1].forward_column_values['col_b'], 'abc') def test_one_forward_column(self): dim = 16 forwards = ["col_a"] new_schema = self.create_schema(self.collection_name2, ["column1"], [dim], forward_columns=forwards) logging.info("new schema: %s", new_schema) status = self.client.create_collection(new_schema) self.assertTrue(status.ok()) magic_number = self.get_magic_number(self.collection_name2) batch_count = 6 req = self.create_one_forward_request(self.collection_name2, magic_number, batch_count, OperationType.INSERT) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) topk = 5 status,response = self.query("column1", topk, dim, DataType.VECTOR_FP32) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), topk) score = 8.0 for i in range(0, topk): self.assertEqual(documents[i].primary_key, i + 1) if i != 0: score += (i - 1) * 2 + 1 self.assertEqual(documents[i].score, score) self.assertEqual(len(documents[i].forward_column_values), 1) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.000001) def test_one_field_both_index_and_forward(self): dim = 16 forwards = ["col_a", "index1"] new_schema = self.create_schema1(self.collection_name2, index_columns=["index1", "index2"], dimensions=[dim, dim], forward_columns=forwards) logging.info("new schema: %s", new_schema) status = self.client.create_collection(new_schema) self.assertTrue(status.ok()) magic_number = self.get_magic_number(self.collection_name2) batch_count = 6 req = self.create_multi_index_request(self.collection_name2, dim, magic_number, batch_count, OperationType.INSERT) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) topk = 5 status,response = self.query("index1", topk, dim, DataType.VECTOR_FP32) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), topk) score = 8.0 for i in range(0, topk): self.assertEqual(documents[i].primary_key, i + 1) if i != 0: score += (i - 1) * 2 + 1 self.assertEqual(documents[i].score, score) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.000001) str_value = '[' + str(i + 1) + ',1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]' self.assertEqual(documents[i].forward_column_values['index1'], str_value) def test_forward_column_num_mismatched(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 2 forwards_columns = ['col_a'] forward_tuple_types = [DataType.FLOAT] req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.INSERT, forward_tuple_names=forwards_columns, forward_tuple_types=forward_tuple_types) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, 0) time.sleep(1) status,response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 2) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], None) self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 2.0) self.assertEqual(len(documents[1].forward_column_values), 2) self.assertAlmostEqual(documents[1].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], None) class TestIndexAgentDirect(TestIndexAgentBase): def setUp(self): self.with_repo = False super().setUp() def test_single_insert(self): req = self.create_single_request(None, OperationType.INSERT) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 1) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') def test_single_insert_with_bytes(self): req = self.create_single_request(None, OperationType.INSERT) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 1) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') def test_batch_insert(self): batch_count = 2 req = self.create_batch_request(None, batch_count, OperationType.INSERT) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 2) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 2.0) self.assertEqual(len(documents[1].forward_column_values), 2) self.assertAlmostEqual(documents[1].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], 'abc') def test_insert_with_all_forward_data_types(self): dim = 64 new_schema = self.create_all_forward_data_types_schema(self.collection_name2, dim, with_repo=self.with_repo) logging.info("new schema: %s", new_schema) status = self.client.create_collection(new_schema) self.assertTrue(status.ok()) batch_count = 6 req = self.create_all_forward_data_types_insert_request(None, dim, batch_count) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(status.ok()) time.sleep(1) topk = 5 status,response = self.query("column_0", topk, dim, DataType.VECTOR_FP32) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), topk) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 0.0) self.assertEqual(len(documents[0].forward_column_values), 9) self.assertEqual(documents[0].forward_column_values['forward_0'], '1'.encode('UTF-8')) self.assertEqual(documents[0].forward_column_values['forward_1'], '1') self.assertEqual(documents[0].forward_column_values['forward_2'], True) self.assertEqual(documents[0].forward_column_values['forward_3'], 1) self.assertEqual(documents[0].forward_column_values['forward_4'], 10) self.assertEqual(documents[0].forward_column_values['forward_5'], 100) self.assertEqual(documents[0].forward_column_values['forward_6'], 1000) self.assertEqual(documents[0].forward_column_values['forward_7'], 1.0) self.assertEqual(documents[0].forward_column_values['forward_8'], 10.0) self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 64.0) self.assertEqual(documents[2].primary_key, 3) self.assertEqual(documents[2].score, 256.0) self.assertEqual(documents[3].primary_key, 4) self.assertEqual(documents[3].score, 576.0) self.assertEqual(documents[4].primary_key, 5) self.assertEqual(documents[4].score, 1024.0) def test_single_update(self): forwards = [1.234, 'abc'] req = self.create_single_request(None, OperationType.INSERT, forwards = forwards, lsn = 10) response = self.client.write(req) self.assertTrue(response.ok()) forwards = [2.234, 'def'] req = self.create_single_request(None, OperationType.UPDATE, forwards = forwards, lsn = 11) logging.info("req: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 1) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'def') def test_single_update_with_bytes(self): forwards = [1.234, 'abc'] req = self.create_single_request(None, OperationType.INSERT, forwards = forwards, lsn = 10, is_bytes = True) response = self.client.write(req) self.assertTrue(response.ok()) forwards = [2.234, 'def'] req = self.create_single_request(None, OperationType.UPDATE, forwards = forwards, lsn = 11) logging.info("req: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 1) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'def') def test_batch_update(self): batch_count = 6 forwards = [0.234, 'abc'] req = self.create_batch_request(None, batch_count, OperationType.INSERT, forwards = forwards, lsn = 10) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) forwards = [1.234, 'def'] req = self.create_batch_request(None, batch_count, OperationType.UPDATE, forwards = forwards, lsn = 20) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 6) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'def') self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 2.0) self.assertEqual(documents[2].primary_key, 3) self.assertEqual(documents[2].score, 5.0) self.assertEqual(documents[3].primary_key, 4) self.assertEqual(documents[3].score, 10.0) self.assertEqual(documents[4].primary_key, 5) self.assertEqual(documents[4].score, 17.0) self.assertEqual(documents[5].primary_key, 6) self.assertEqual(documents[5].score, 26.0) self.assertEqual(len(documents[5].forward_column_values), 2) self.assertAlmostEqual(documents[5].forward_column_values['col_a'], 7.234, delta=0.000001) self.assertEqual(documents[5].forward_column_values['col_b'], 'def') def test_update_only_index_column(self): batch_count = 2 forwards = [0.234, 'abc'] req = self.create_batch_request(None, batch_count, OperationType.INSERT, forwards = forwards, lsn = 10, index_value_base = 0) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) req = self.create_batch_request(None, batch_count, OperationType.UPDATE, forwards = forwards, lsn = 20, index_value_base = 10) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 2) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 101.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 122.0) self.assertEqual(len(documents[1].forward_column_values), 2) self.assertAlmostEqual(documents[1].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], 'abc') def test_update_both_index_and_forward_column(self): batch_count = 2 forwards = [0.234, 'abc'] req = self.create_batch_request(None, batch_count, OperationType.INSERT, forwards = forwards, lsn = 10, index_value_base = 0) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) forwards = [1.234, 'def'] req = self.create_batch_request(None, batch_count, OperationType.UPDATE, forwards = forwards, lsn = 20, index_value_base = 10) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 2) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 101.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'def') self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 122.0) self.assertEqual(len(documents[1].forward_column_values), 2) self.assertAlmostEqual(documents[1].forward_column_values['col_a'], 3.234, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], 'def') def test_single_delete(self): req = self.create_single_request(None, OperationType.INSERT) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 1) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') req = self.create_single_request(None, OperationType.DELETE) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 0) def test_batch_delete(self): batch_count = 8 req = self.create_batch_request(None, batch_count, OperationType.INSERT) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), batch_count) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 2.0) self.assertEqual(len(documents[1].forward_column_values), 2) self.assertAlmostEqual(documents[1].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], 'abc') req = self.create_batch_request(None, batch_count, OperationType.DELETE) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 0) def test_all_operations(self): batch_count = 5 operation_types = [OperationType.INSERT, OperationType.UPDATE, OperationType.DELETE, OperationType.INSERT, OperationType.UPDATE, OperationType.DELETE, OperationType.INSERT, OperationType.UPDATE, OperationType.UPDATE] req = self.create_all_operations_request(None, batch_count, operation_types=operation_types) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), batch_count) for i in range (1, batch_count + 1): self.assertEqual(documents[i - 1].primary_key, i) self.assertEqual(documents[i - 1].score, (i - 1) * (i - 1) + 1.0) self.assertEqual(len(documents[i - 1].forward_column_values), 2) self.assertAlmostEqual(documents[i - 1].forward_column_values['col_a'], 9.234, delta=0.000001) self.assertEqual(documents[i - 1].forward_column_values['col_b'], 'abc') def test_one_forward_column(self): dim = 16 forwards = ["col_a"] new_schema = self.create_schema(self.collection_name2, ["column1"], [dim], forward_columns=forwards, with_repo = self.with_repo) logging.info("new schema: %s", new_schema) status = self.client.create_collection(new_schema) self.assertTrue(status.ok()) batch_count = 6 req = self.create_one_forward_request(self.collection_name2, None, batch_count, OperationType.INSERT) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) topk = 5 status,response = self.query("column1", topk, dim, DataType.VECTOR_FP32) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), topk) score = 8.0 for i in range(0, topk): self.assertEqual(documents[i].primary_key, i + 1) if i != 0: score += (i - 1) * 2 + 1 self.assertEqual(documents[i].score, score) self.assertEqual(len(documents[i].forward_column_values), 1) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.000001) def test_one_field_both_index_and_forward(self): dim = 16 forwards = ["col_a", "index1"] new_schema = self.create_schema1(self.collection_name2, index_columns=["index1", "index2"], dimensions=[dim, dim], forward_columns=forwards, with_repo = self.with_repo) logging.info("new schema: %s", new_schema) status = self.client.create_collection(new_schema) self.assertTrue(status.ok()) magic_number = self.get_magic_number(self.collection_name2) batch_count = 6 req = self.create_multi_index_request(self.collection_name2, dim, None, batch_count, OperationType.INSERT) logging.info("request: %s", req) response = self.client.write(req) self.assertTrue(response.ok()) time.sleep(1) topk = 5 status,response = self.query("index1", topk, dim, DataType.VECTOR_FP32) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), topk) score = 8.0 for i in range(0, topk): self.assertEqual(documents[i].primary_key, i + 1) if i != 0: score += (i - 1) * 2 + 1 self.assertEqual(documents[i].score, score) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.000001) str_value = '[' + str(i + 1) + ',1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]' self.assertEqual(documents[i].forward_column_values['index1'], str_value) def test_forward_column_num_mismatched(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 2 forwards_columns = ['col_a'] forward_tuple_types = [DataType.FLOAT] req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.INSERT, forward_tuple_names=forwards_columns, forward_tuple_types=forward_tuple_types) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, 0) time.sleep(1) status,response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 2) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], None) self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 2.0) self.assertEqual(len(documents[1].forward_column_values), 2) self.assertAlmostEqual(documents[1].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], None) if __name__ == '__main__': unittest.main() ================================================ FILE: tests/integration/src/case/test_index_agent_exception.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import logging import struct import grpc import unittest import time import json from pyproximabe import * from global_conf import GlobalConf from collection_creator import CollectionCreator from test_index_agent import TestIndexAgentBase from server_utils import ServerUtils OperationType = WriteRequest.OperationType class TestIndexAgentException(TestIndexAgentBase): def setUp(self): self.with_repo = True super().setUp() self.server_utils = ServerUtils() def test_invalid_collection(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 2 collection_name = "invalid_collection"; req = self.create_request(collection_name, magic_number, batch_count, OperationType.INSERT) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, -4002) self.assertEqual(response.reason, "Collection Not Exist") def test_invalid_forward_column(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 2 forwards_columns = ['invalid_forward', 'col_b'] req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.INSERT, forward_tuple_names=forwards_columns) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, -2012) self.assertEqual(response.reason, "Invalid Write Request") def test_invalid_index_column(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 2 index_metas = [['invalid_column', DataType.VECTOR_FP32, self.index_dimensions[0]]] req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.INSERT, index_tuple_metas=index_metas) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, -2012) self.assertEqual(response.reason, "Invalid Write Request") def test_index_columns_num_mismatched(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 2 index_metas = [['invalid_column', DataType.VECTOR_FP32, self.index_dimensions[0]], ['column1', DataType.VECTOR_FP32, self.index_dimensions[0]] ] req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.INSERT, index_tuple_metas=index_metas, index_tuple_types=None) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, -2012) self.assertEqual(response.reason, "Invalid Write Request") def test_invalid_lsn_sequence(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 2 forwards=[0.234, 'abc'] req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.INSERT, forwards=forwards) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, 0) forwards=[1.234, 'def'] req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.UPDATE, forwards=forwards) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, 0) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 2) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 1.0) self.assertEqual(len(documents[0].forward_column_values), 2) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 2.0) self.assertEqual(len(documents[1].forward_column_values), 2) self.assertAlmostEqual(documents[1].forward_column_values['col_a'], 2.234, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], 'abc') def test_invalid_index_vector_data(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 2 req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.INSERT, vector_exception=True) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, -2023) self.assertEqual(response.reason, 'Mismatched Dimension') # def test_request_failed_with_collection_suspend(self): # status, data = self.admin_client.suspend_collection(self.collection_name) # logging.info("suspend collection result: %s", data) # self.assertEqual(status, 200) # self.assertEqual(data['code'], 0) # response = self.client.get_collection(self.collection_name) # logging.info("get collection result: %s", response) # self.assertEqual(response.entity.config.status, 2) # 2 means cs_suspended # magic_number = response.entity.magic_number # batch_count = 2 # req = self.create_request(self.collection_name, magic_number, # batch_count, OperationType.INSERT) # logging.info("request: %s", req) # response = self.client.write(req) # logging.info("process result: %s", response) # self.assertEqual(response.code, -4010) # self.assertEqual(response.reason, "Collection suspended") # # resume collection # status, data = self.admin_client.resume_collection(self.collection_name) # logging.info("resume collection result: %s", data) # self.assertEqual(status, 200) # self.assertEqual(data['code'], 0) # response = self.client.get_collection(self.collection_name) # logging.info("get collection result: %s", response) # self.assertEqual(response.entity.config.status, 1) # 1 means cs_serving # response = self.client.write(req) # logging.info("process result: %s", response) # self.assertEqual(response.code, 0) # self.assertEqual(response.reason, "Success") # time.sleep(1) def test_update_with_key_not_exist(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 2 forwards=[0.234, 'abc'] req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.UPDATE, forwards=forwards) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, 0) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 0) def test_delete_with_key_not_exist(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 2 forwards=[0.234, 'abc'] operation_types = [OperationType.INSERT, OperationType.DELETE] req = self.create_request(self.collection_name, magic_number, batch_count, operation_types=operation_types, forwards=forwards) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, 0) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 1) def test_insert_pk_repeated(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 5 forwards=[0.234, 'abc'] req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.INSERT, forwards=forwards, key_repeated = True) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, 0) time.sleep(1) status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 1) def test_empty_request(self): magic_number = self.get_magic_number(self.collection_name) batch_count = 5 forwards=[0.234, 'abc'] try: req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.INSERT, forwards=forwards, empty_request=True) self.assertTrue(False) except: pass status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 0) def test_magic_number_mismatched(self): magic_number = 0 batch_count = 5 forwards=[0.234, 'abc'] req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.INSERT, forwards=forwards) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, -2021) self.assertEqual(response.reason, "Mismatched Magic Number") # def test_revision_mismatched(self): # response = self.client.get_collection(self.collection_name) # logging.info("get collection result: %s", response) # magic_number = response.entity.magic_number # batch_count = 5 # forwards=[0.234, 'abc'] # req = self.create_request(self.collection_name, magic_number, # batch_count, # OperationType.INSERT, # schema_revision=0, # forwards=forwards) # logging.info("request: %s", req) # response = self.client.write(req) # logging.info("process result: %s", response) # time.sleep(1) # # update collection # self.creator.update_schema(self.schema, self.collection_meta) # status, data = self.admin_client.update_collection(self.schema) # logging.info("update schema: %s", self.schema) # logging.info("update result: %s", data) # self.assertEqual(status, 200) # self.assertEqual(data["code"], 0) # req = self.create_request(self.collection_name, magic_number, # batch_count, # OperationType.UPDATE, # schema_revision=0, # forwards=forwards) # logging.info("request: %s", req) # response = self.client.write(req) # logging.info("process result: %s", response) # self.assertEqual(response.code, -4000) # self.assertEqual(response.reason, "Collection schema revision mismatched") # # get revision # response = self.client.get_collection(self.collection_name) # logging.info("get collection result: %s", response) # revision = response.entity.config.schema_revision # req = self.create_request(self.collection_name, magic_number, # batch_count, # OperationType.UPDATE, # schema_revision=revision, # forwards=forwards) # logging.info("request: %s", req) # response = self.client.write(req) # logging.info("process result: %s", response) # self.assertEqual(response.code, 0) def test_restart_server_with_not_empty_data_flow(self): # 1 send request magic_number = self.get_magic_number(self.collection_name) batch_count = 64 forwards=[0.234, 'abc'] req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.INSERT, forwards=forwards) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, 0) time.sleep(2) # 2 query result status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 10) for i in range(0, len(documents)): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, 1.0 + i * i) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 'abc') # 3 restart proxima be self.server_utils.stop_proxima_be('SIGUSR1') self.server_utils.start_proxima_be() time.sleep(2) # 4 requery the result status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 10) for i in range(0, len(documents)): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, 1.0 + i * i) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 'abc') # 5 send new data request magic_number = self.get_magic_number(self.collection_name) batch_count = 1 req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.INSERT, forwards=forwards, index_value_base=65) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, 0) time.sleep(1) # 5 query the result topk = 65 status, response = self.simple_query(topk=topk) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), topk) def test_restart_server_with_empty_data_flow(self): # 1 create new collection schema = self.create_schema(self.collection_name2, self.index_columns, self.index_dimensions) status= self.client.create_collection(schema) self.assertTrue(status.ok()) # 2 query result status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 0) time.sleep(5) # 3 restart proxima be self.server_utils.stop_proxima_be('SIGUSR1') self.server_utils.start_proxima_be() time.sleep(2) # 4 requery the result status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 0) # 5 send dataset request magic_number = self.get_magic_number(self.collection_name) batch_count = 20 forwards=[0.234, 'abc'] req = self.create_request(self.collection_name, magic_number, batch_count, OperationType.INSERT, forwards=forwards) logging.info("request: %s", req) response = self.client.write(req) logging.info("process result: %s", response) self.assertEqual(response.code, 0) time.sleep(1) # 5 query the result topk = 30 status, response = self.simple_query(topk=topk) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), batch_count) if __name__ == '__main__': unittest.main() ================================================ FILE: tests/integration/src/case/test_mysql_repository.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import logging import struct import grpc import unittest import time import os import random from pyproximabe import * from global_conf import GlobalConf from collection_creator import CollectionCreator from mysql_client import MysqlClient from server_utils import ServerUtils import client_helper class TestMysqlRepository(unittest.TestCase): def setUp(self): self.global_conf = GlobalConf() self.creator = CollectionCreator() self.client = client_helper.get_client(self.global_conf) self.mysql_client = MysqlClient() self.creator = CollectionCreator() self.server_utils = ServerUtils() self.repository_name = "test_repo" self.clean_env() ret = self.mysql_client.execute_batch_sql("data/test_clean_db.sql") self.assertEqual(ret, 0) def tearDown(self): self.clean_env() time.sleep(1) def clean_env(self): status, collections = self.client.list_collections() self.assertTrue(status.ok()) for collection in collections: status = self.client.drop_collection(collection.collection_config.collection_name) self.assertTrue(status.ok()) def get_content(self, file_name): src_path = os.getenv('SRC_PATH') f = open(src_path + '/tests/integration/log/' + file_name, 'r') return f.read() def create_schema(self, collection_name, repository_table="test_collection", forward_columns=["col_a", "col_b"], index_columns=[], index_dimensions=[], index_data_types=None, index_measures=None): return self.creator.create_schema(collection_name, repository_table=repository_table, repository_name="test_repo", forward_columns=forward_columns, index_columns=index_columns, index_dimensions=index_dimensions, index_data_types=index_data_types, index_measures=index_measures, db_name="test_db", with_repo=True) def query(self, collection_name, topk=10, column_name='column1'): features = [1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1] return self.client.query(collection_name, column_name, features, data_type=DataType.VECTOR_FP32, dimension=16, batch_count=1, topk=topk, is_linear=True) def create_query(self, collection_name, topk=10, column_name='column1'): query = query_service_pb2.QueryRequest() query.query_type = query_service_pb2.QueryType.QT_KNN query.collection_name = collection_name query.knn_params.column_name = column_name query.knn_params.topk = topk query.knn_params.dimension = 16 query.knn_params.feature_type = common_pb2.FeatureType.FT_FP32 features = [1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1] fea_bytes = [] for f in features: fea_bytes += struct.pack('f', f) query.knn_params.features = bytes(fea_bytes) query.knn_params.batch_count = 1 query.knn_params.is_linear = True return query def get_latest_lsn(self, collection_name): status, collection = self.client.describe_collection(collection_name) self.assertTrue(status.ok()) return collection.latest_lsn_context def test_scan_full_table(self): collection_name = 'test_scan_full_table' schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) ret = self.mysql_client.execute_batch_sql('data/test_scan_table.sql') self.assertEqual(ret, 0) time.sleep(2) status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 2) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 0.0) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 11.111, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 100) self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 1.0) self.assertAlmostEqual(documents[1].forward_column_values['col_a'], 12.111, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], 200) def test_scan_full_table_with_empty_table(self): collection_name = 'full_table_with_empty_table' schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) ret = self.mysql_client.execute_batch_sql('data/test_scan_full_table_with_empty_table.sql') self.assertEqual(ret, 0) time.sleep(2) status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 0) def test_increment_mode(self): # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_increment_mode_full.sql') self.assertEqual(ret, 0) # create collection collection_name = 'test_increment_mode' schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 2) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 0.0) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 11.111, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 100) self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 1.0) self.assertAlmostEqual(documents[1].forward_column_values['col_a'], 12.111, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], 200) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_increment_mode_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 7) for i in range(0, 7): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) def test_forward_with_numeric(self): collection_name = 'test_forward_with_numeric' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_numeric_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], 121 + i) self.assertEqual(documents[i].forward_column_values['f2'], 20001 + i) self.assertEqual(documents[i].forward_column_values['f3'], 65601 + i) self.assertEqual(documents[i].forward_column_values['f4'], 2000000001 + i) self.assertEqual(documents[i].forward_column_values['f5'], 8000000001 + i) self.assertAlmostEqual(documents[i].forward_column_values['f6'], 1.1234 + i, delta=0.0001) self.assertAlmostEqual(documents[i].forward_column_values['f7'], 1.11223344 + i, delta=0.00001) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_numeric_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(1, total + 1): self.assertEqual(documents[i - 1].primary_key, i + 1) self.assertEqual(documents[i - 1].score, i * i) self.assertEqual(documents[i - 1].forward_column_values['f1'], 121 + i) self.assertEqual(documents[i - 1].forward_column_values['f2'], 20002 + i) self.assertEqual(documents[i - 1].forward_column_values['f3'], 65601 + i) self.assertEqual(documents[i - 1].forward_column_values['f4'], 2000000001 + i) self.assertEqual(documents[i - 1].forward_column_values['f5'], 8000000001 + i) self.assertAlmostEqual(documents[i - 1].forward_column_values['f6'], 1.1234 + i, delta=0.0001) self.assertAlmostEqual(documents[i - 1].forward_column_values['f7'], 1.11223344 + i, delta=0.00001) def test_forward_with_date_and_time(self): collection_name = 'test_forward_with_date_and_time' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_date_and_time_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4', 'f6'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], '2021-01-1' + str(i + 2)) self.assertEqual(documents[i].forward_column_values['f2'], '13:00:0' + str(i + 1)) self.assertEqual(documents[i].forward_column_values['f3'], '2021-01-1%d 13:00:0%d' % (i + 2, i + 1)) self.assertEqual(documents[i].forward_column_values['f4'], '2021-01-1%d 13:00:00' % (i + 2)) self.assertEqual(documents[i].forward_column_values['f6'], '2021') # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_date_and_time_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 7 self.assertEqual(len(documents), total) for i in range(1, total + 1): self.assertEqual(documents[i-1].primary_key, i + 1) self.assertEqual(documents[i-1].score, i * i) self.assertEqual(documents[i-1].forward_column_values['f1'], '2021-01-1' + str(i + 2)) self.assertEqual(documents[i-1].forward_column_values['f2'], '13:00:0' + str(i + 1)) self.assertEqual(documents[i-1].forward_column_values['f3'], '2021-01-1%d 13:00:0%d' % (i + 2, i + 1)) self.assertEqual(documents[i-1].forward_column_values['f4'], '2021-01-1%d 13:00:00' % (i + 2)) self.assertEqual(documents[i-1].forward_column_values['f6'], '2021') def test_forward_with_date_and_time_included_fracation(self): collection_name = 'test_forward_with_date_and_time_frac' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_date_and_time_frac_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4', 'f6'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], '2021-01-1' + str(i + 2)) self.assertEqual(documents[i].forward_column_values['f2'], '13:00:0%d.9' %(i + 1)) self.assertEqual(documents[i].forward_column_values['f3'], '2021-01-1%d 13:00:0%d.123' % (i + 2, i + 1)) self.assertEqual(documents[i].forward_column_values['f4'], '2021-01-1%d 13:00:00.123456' % (i + 2)) self.assertEqual(documents[i].forward_column_values['f6'], '2021') # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_date_and_time_frac_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 7 self.assertEqual(len(documents), total) for i in range(1, total + 1): self.assertEqual(documents[i-1].primary_key, i + 1) self.assertEqual(documents[i-1].score, i * i) self.assertEqual(documents[i-1].forward_column_values['f1'], '2021-01-1' + str(i + 2)) self.assertEqual(documents[i-1].forward_column_values['f2'], '13:00:0%d.9' %(i + 1)) self.assertEqual(documents[i-1].forward_column_values['f3'], '2021-01-1%d 13:00:0%d.123' % (i + 2, i + 1)) self.assertEqual(documents[i-1].forward_column_values['f4'], '2021-01-1%d 13:00:00.123456' % (i + 2)) self.assertEqual(documents[i-1].forward_column_values['f6'], '2021') def test_forward_with_char_and_varchar(self): collection_name = 'test_forward_with_char_and_varchar' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_char_and_varchar_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (str(i + 1) * 16)) self.assertEqual(documents[i].forward_column_values['f2'], (str(i + 1) * 4)) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3)) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257)) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_char_and_varchar_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (str(i + 1) * 16)) self.assertEqual(documents[i].forward_column_values['f2'], (str(i + 1) * 4)) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3)) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257)) def test_forward_with_text(self): collection_name = 'test_forward_with_text' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_text_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (str(i + 1) * 16)) self.assertEqual(documents[i].forward_column_values['f2'], (str(i + 1) * 4)) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3)) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257)) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_text_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (str(i + 1) * 16)) self.assertEqual(documents[i].forward_column_values['f2'], (str(i + 1) * 4)) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3)) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257)) def test_forward_with_text_gbk(self): collection_name = 'test_forward_with_text_gbk' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_text_gbk_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], ('我是向量检索引擎')) self.assertEqual(documents[i].forward_column_values['f2'], (str(i + 1) * 4 + '你')) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3 + '你')) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257 + '你')) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_text_gbk_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], ('我是向量检索引擎')) self.assertEqual(documents[i].forward_column_values['f2'], (str(i + 1) * 4 + '你')) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3 + '你')) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257 + '你')) def test_forward_with_blob(self): collection_name = 'test_forward_with_blob' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_blob_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], ('\xf1\xf2\xf3\xf4').encode('ISO-8859-1')) self.assertEqual(documents[i].forward_column_values['f2'], (str(i + 1) * 4).encode('utf-8')) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3).encode('utf-8')) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257).encode('utf-8')) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_blob_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], ('\xf1\xf2\xf3\xf4').encode('ISO-8859-1')) self.assertEqual(documents[i].forward_column_values['f2'], (str(i + 1) * 4).encode('utf-8')) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3).encode('utf-8')) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257).encode('utf-8')) def test_forward_with_blob_gbk(self): collection_name = 'test_forward_with_blob_gbk' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_blob_gbk_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], ('我').encode('gbk')) self.assertEqual(documents[i].forward_column_values['f2'], ('你' + str(i + 1) * 4).encode('gbk')) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3).encode('gbk')) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257).encode('gbk')) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_blob_gbk_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], ('我').encode('gbk')) self.assertEqual(documents[i].forward_column_values['f2'], ('你' + str(i + 1) * 4).encode('gbk')) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3).encode('gbk')) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257).encode('gbk')) def test_forward_with_bit(self): collection_name = 'test_forward_with_bit' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_bit_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 3 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], i) self.assertEqual(documents[i].forward_column_values['f2'], i + 128) self.assertEqual(documents[i].forward_column_values['f3'], i + 65535) self.assertEqual(documents[i].forward_column_values['f4'], i + 5000000000) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_bit_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], i) self.assertEqual(documents[i].forward_column_values['f2'], i + 128) self.assertEqual(documents[i].forward_column_values['f3'], i + 65535) self.assertEqual(documents[i].forward_column_values['f4'], i + 5000000000) def test_forward_with_binary_and_varbinary(self): collection_name = 'test_forward_with_binary_and_varbinary' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_binary_and_varbinary_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], ('\xf1' + '\x00' * 15).encode('ISO-8859-1')) self.assertEqual(documents[i].forward_column_values['f2'], (str(i + 1) * 4 + '\x00' * 60).encode('utf-8')) self.assertEqual(documents[i].forward_column_values['f3'], ('\xf1' * 3).encode('ISO-8859-1')) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257).encode('utf-8')) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_binary_and_varbinary_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], ('\xf1' + '\x00' * 15).encode('ISO-8859-1')) self.assertEqual(documents[i].forward_column_values['f2'], (str(i + 1) * 4 + '\x00' * 60).encode('utf-8')) self.assertEqual(documents[i].forward_column_values['f3'], ('\xf1' * 3).encode('ISO-8859-1')) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257).encode('utf-8')) def test_forward_with_set_and_enum(self): collection_name = 'test_forward_with_set_and_enum' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_set_and_enum_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (1 << i) + 128) self.assertEqual(documents[i].forward_column_values['f2'], (1 << i)) self.assertEqual(documents[i].forward_column_values['f3'], (i + 1)) self.assertEqual(documents[i].forward_column_values['f4'], (i + 1)) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_set_and_enum_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (1 << i) + 128) self.assertEqual(documents[i].forward_column_values['f2'], (1 << i)) self.assertEqual(documents[i].forward_column_values['f3'], (i + 1)) self.assertEqual(documents[i].forward_column_values['f4'], (i + 1)) def test_forward_with_json(self): collection_name = 'test_forward_with_json' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_json_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (str(i + 1) * 16)) # self.assertEqual(documents[i].forward[1].key, 'f2') # self.assertEqual(documents[i].forward_column_values['f2'], (str(i + 1) * 4).encode('utf-8')) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3)) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257)) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_json_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (str(i + 1) * 16)) # self.assertEqual(documents[i].forward_column_values['f2'], (str(i + 1) * 4).encode('utf-8')) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3)) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257)) def test_forward_with_geometry(self): collection_name = 'test_forward_with_geometry' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_geometry_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (str(i + 1) * 16)) # self.assertEqual(documents[i].forward_column_values['f2'], (str(i + 1) * 4).encode('utf-8')) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3)) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257)) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_geometry_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (str(i + 1) * 16)) # self.assertEqual(documents[i].forward_column_values['f2'], (str(i + 1) * 4).encode('utf-8')) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3)) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257)) def test_forward_with_decimal(self): collection_name = 'test_forward_with_decimal' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_decimal_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (str(i + 1) * 16)) self.assertEqual(documents[i].forward_column_values['f2'], '12345.%d123456789' % (i)) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3)) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257)) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_decimal_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (str(i + 1) * 16)) self.assertEqual(documents[i].forward_column_values['f2'], '12345.%d123456789' % (i)) self.assertEqual(documents[i].forward_column_values['f3'], (str(i + 1) * 3)) self.assertEqual(documents[i].forward_column_values['f4'], (str(i + 1) * 257)) def test_forward_with_types_null(self): collection_name = 'test_forward_with_types_null' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_types_null_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', 'f11', 'f12', 'f13', 'f14', 'f15', 'f16', 'f17', 'f18', 'f19'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["f20"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name, column_name='f20') logging.info("query status: %s", status) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (str(i + 1) * 16)) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_types_null_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name, column_name='f20') self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 7 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 2) self.assertEqual(documents[i].score, (i + 1) * (i + 1)) self.assertEqual(documents[i].forward_column_values['f1'], (str(i + 2) * 16)) def test_forward_with_empty_value(self): collection_name = 'test_forward_with_empty_value' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_empty_value_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', 'f11', 'f12', 'f13', 'f14', 'f15', 'f16', 'f17', 'f18', 'f19'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["f20"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name, column_name='f20') self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], str(i + 1) * 16) self.assertEqual(documents[i].forward_column_values['f2'], "") self.assertEqual(documents[i].forward_column_values['f3'], "") self.assertEqual(documents[i].forward_column_values['f10'], "") self.assertEqual(documents[i].forward_column_values['f11'], "") self.assertEqual(documents[i].forward_column_values['f12'].decode("utf-8"), "") self.assertEqual(documents[i].forward_column_values['f13'], 0) self.assertEqual(documents[i].forward_column_values['f14'].decode("utf-8"), "\x00\x00\x00\x00\x00\x00\x00\x00") self.assertEqual(documents[i].forward_column_values['f15'].decode("utf-8"), "") self.assertEqual(documents[i].forward_column_values['f16'], 0) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_empty_value_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name, column_name='f20') self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 7 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 2) self.assertEqual(documents[i].score, (i + 1) * (i + 1)) self.assertEqual(documents[i].forward_column_values['f1'], str(i + 2) * 16) self.assertEqual(documents[i].forward_column_values['f2'], "") self.assertEqual(documents[i].forward_column_values['f3'], "") self.assertEqual(documents[i].forward_column_values['f10'], "") self.assertEqual(documents[i].forward_column_values['f11'], "") self.assertEqual(documents[i].forward_column_values['f12'].decode("utf-8"), "") self.assertEqual(documents[i].forward_column_values['f13'], 0) self.assertEqual(documents[i].forward_column_values['f14'].decode("utf-8"), "\x00\x00\x00\x00\x00\x00\x00\x00") self.assertEqual(documents[i].forward_column_values['f15'].decode("utf-8"), "") self.assertEqual(documents[i].forward_column_values['f16'], 0) def test_repository_restart(self): # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_repository_restart_full.sql') self.assertEqual(ret, 0) # create collection collection_name = 'test_repository_restart' schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 2 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) # get latest lsn latest_lsn = self.get_latest_lsn(collection_name) self.assertEqual(latest_lsn.lsn, 2) # stop mysql repo self.server_utils.stop_mysql_repo() # prepare table data ret = self.mysql_client.execute_batch_sql('data/test_repository_restart_full_1.sql') self.assertEqual(ret, 0) # start mysql repo self.server_utils.start_mysql_repo() time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 4 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) # get latest lsn latest_lsn = self.get_latest_lsn(collection_name) self.assertEqual(latest_lsn.lsn, 4) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_repository_restart_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 6 for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) # get latest lsn latest_lsn = self.get_latest_lsn(collection_name) self.assertEqual(latest_lsn.lsn, 4) # restart mysql repository self.server_utils.stop_mysql_repo() time.sleep(2) self.server_utils.start_mysql_repo() # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_repository_restart_inc_1.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 7 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) # get latest lsn latest_lsn = self.get_latest_lsn(collection_name) self.assertEqual(latest_lsn.lsn, 4) def test_proxima_be_restart_with_collection_empty(self): # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_proxima_be_restart_with_collection_empty_meta.sql') self.assertEqual(ret, 0) # create collection collection_name = 'test_proxima_be_restart_with_collection_empty' schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # stop the proxima be server self.server_utils.stop_proxima_be() # start the proxima be server self.server_utils.start_proxima_be() time.sleep(5) # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_proxima_be_restart_with_collection_empty_full.sql') self.assertEqual(ret, 0) time.sleep(5) # prepare inc table data ret = self.mysql_client.execute_batch_sql('data/test_proxima_be_restart_with_collection_empty_inc.sql') self.assertEqual(ret, 0) time.sleep(3) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 2 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) # get latest lsn latest_lsn = self.get_latest_lsn(collection_name) self.assertEqual(latest_lsn.lsn, 2) context = latest_lsn.context arr = context.split(';') self.assertEqual(len(arr), 4) self.assertEqual(arr[3].strip(), '1') def test_proxima_be_restart_with_full_stage(self): # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_proxima_be_restart_with_full_stage_full.sql') self.assertEqual(ret, 0) # create collection collection_name = 'test_proxima_be_restart_with_full_stage' schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(1) # stop the proxima be server self.server_utils.stop_proxima_be() # logging.info("<<<<<<<<<<< before mysql_repo >>>>>>>>>>>") # logging.info("%s", self.get_content('mysql_repo.log.INFO')) # logging.info("<<<<<<<<<<< before proxima_be >>>>>>>>>>>") # logging.info("%s", self.get_content('proxima_be.log.INFO')) # start the proxima be server self.server_utils.start_proxima_be() time.sleep(5) # logging.info("<<<<<<<<<<< after mysql_repo >>>>>>>>>>>") # logging.info("%s", self.get_content('mysql_repo.log.INFO')) # logging.info("<<<<<<<<<<< after proxima_be >>>>>>>>>>>") # logging.info("%s", self.get_content('proxima_be.log.INFO')) # query result prev_count = 0 while True: status, response = self.query(collection_name, topk=10000) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 10000 logging.info("actual: %d, prev: %d", len(documents), prev_count) if len(documents) < count and len(documents) > prev_count: prev_count = len(documents) time.sleep(10) continue self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(len(documents[i].forward_column_values), 2) break def test_proxima_be_restart_with_inc_stage(self): # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_proxima_be_restart_with_inc_stage_full.sql') self.assertEqual(ret, 0) # create collection collection_name = 'test_proxima_be_restart_with_inc_stage' schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # prepare inc table data ret = self.mysql_client.execute_batch_sql('data/test_proxima_be_restart_with_inc_stage_inc_1.sql') self.assertEqual(ret, 0) time.sleep(5) # query result prev_count = 0 while True: status, response = self.query(collection_name, topk=10000) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 400 logging.info("actual: %d, prev: %d", len(documents), prev_count) if len(documents) < count and len(documents) > prev_count: prev_count = len(documents) time.sleep(5) continue self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(len(documents[i].forward_column_values), 2) break # stop the proxima be server self.server_utils.stop_proxima_be() # start the proxima be server self.server_utils.start_proxima_be() time.sleep(5) # prepare inc table data ret = self.mysql_client.execute_batch_sql('data/test_proxima_be_restart_with_inc_stage_inc_2.sql') self.assertEqual(ret, 0) time.sleep(5) # query result prev_count = 0 while True: status, response = self.query(collection_name, topk=10000) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 2610 if len(documents) < count and len(documents) > prev_count: prev_count = len(documents) time.sleep(10) continue self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(len(documents[i].forward_column_values), 2) break # def test_update_collection(self): # # prepare full table data # ret = self.mysql_client.execute_batch_sql('data/test_update_collection_full.sql') # self.assertEqual(ret, 0) # # create collection # collection_name = 'test_update_collection' # schema = self.create_schema(collection_name, # repository_table=collection_name, # index_columns=["column1"], # index_dimensions=[16]) # status = self.client.create_collection(schema) # self.assertEqual(status.code, 0) # collection_meta = data["collection"] # time.sleep(5) # # query result # status, response = self.query(collection_name) # self.assertTrue(status.ok()) # logging.info("query result: %s", response) # results = response.results # self.assertEqual(len(results), 1) # documents = results[0] # count = 2 # self.assertEqual(len(documents), count) # for i in range(0, count): # self.assertEqual(documents[i].primary_key, i + 1) # self.assertEqual(documents[i].score, i * i) # self.assertAlmostEqual(documents[i].forward_column_values['col_a'], # 11.111 + i, delta=0.000001) # self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) # # get latest lsn # latest_lsn = self.get_latest_lsn(collection_name) # self.assertEqual(latest_lsn.lsn, 2) # # suspend collection # status = self.client.suspend_collection(collection_name) # logging.info("suspend collection result: %s", data) # self.assertEqual(status.code, 0) # # prepare table data # ret = self.mysql_client.execute_batch_sql('data/test_update_collection_inc.sql') # self.assertEqual(ret, 0) # time.sleep(3) # # update schema # self.creator.update_schema(schema, collection_meta) # status = self.client.update_collection(schema) # logging.info("update schema: %s", schema) # logging.info("update result: %s", data) # self.assertEqual(status.code, 0) # # resume collection # status = self.client.resume_collection(collection_name) # logging.info("resume collection result: %s", data) # self.assertEqual(status.code, 0) # time.sleep(5) # # query result # status, response = self.query(collection_name) # self.assertTrue(status.ok()) # logging.info("query result: %s", response) # results = response.results # self.assertEqual(len(results), 1) # documents = results[0] # count = 4 # self.assertEqual(len(documents), count) # for i in range(0, count): # self.assertEqual(documents[i].primary_key, i + 1) # self.assertEqual(documents[i].score, i * i) # self.assertAlmostEqual(documents[i].forward_column_values['col_a'], # 11.111 + i, delta=0.000001) # self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) # # get latest lsn # latest_lsn = self.get_latest_lsn(collection_name) # self.assertEqual(latest_lsn.lsn, 4) def test_collection_create_and_remove(self): # create collection collection_name = 'test_collection_create_and_remove' schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # send data ret = self.mysql_client.execute_batch_sql('data/test_collection_create_and_remove_full.sql') self.assertEqual(ret, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 2 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) # remove the collection status = self.client.drop_collection(collection_name) self.assertEqual(status.code, 0) time.sleep(2) # recreate the collection status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 2 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) def test_mysql_restart_with_full_mode(self): # send data ret = self.mysql_client.execute_batch_sql('data/test_mysql_restart_with_full_mode_full.sql') self.assertEqual(ret, 0) # create collection collection_name = 'test_mysql_restart_with_full_mode' schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # # suspend collection # status = self.client.suspend_collection(collection_name) # logging.info("suspend collection result: %s", data) # self.assertEqual(status.code, 0) # time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] # stop mysql self.server_utils.stop_mysql() time.sleep(2) # start mysql self.server_utils.start_mysql() time.sleep(2) # # resume collection # status = self.client.resume_collection(collection_name) # logging.info("resume collection result: %s", data) # self.assertEqual(status.code, 0) time.sleep(10) # query result status, response = self.query(collection_name, topk=300) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 300 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) def test_mysql_restart_with_inc_mode(self): # send full data ret = self.mysql_client.execute_batch_sql('data/test_mysql_restart_with_inc_mode_full.sql') self.assertEqual(ret, 0) # create collection collection_name = 'test_mysql_restart_with_inc_mode' schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name, topk=300) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 100 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) # send inc1 data ret = self.mysql_client.execute_batch_sql('data/test_mysql_restart_with_inc_mode_inc_1.sql') self.assertEqual(ret, 0) time.sleep(5) # query result status, response = self.query(collection_name, topk=300) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 200 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) # stop mysql self.server_utils.stop_mysql() time.sleep(2) # start mysql self.server_utils.start_mysql() time.sleep(2) # send inc2 data ret = self.mysql_client.execute_batch_sql('data/test_mysql_restart_with_inc_mode_inc_2.sql') self.assertEqual(ret, 0) time.sleep(5) # query result status, response = self.query(collection_name, topk=300) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 300 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) def test_mysql_restart_with_create_collection(self): # send full data ret = self.mysql_client.execute_batch_sql('data/test_mysql_restart_with_create_collection_full.sql') self.assertEqual(ret, 0) # stop mysql self.server_utils.stop_mysql() time.sleep(2) # create collection collection_name = 'test_mysql_restart_with_create_collection' schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name, topk=300) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 0 self.assertEqual(len(documents), count) # start mysql self.server_utils.start_mysql() time.sleep(5) # query result status, response = self.query(collection_name, topk=300) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 100 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) def test_multi_collections(self): # create collection collections = [] collection_count = 5 repository_table = 'test_multi_collections' for i in range(0, collection_count): collection = 'test_multi_collections_' + str(i) collections.append(collection) schema = self.create_schema(collection, repository_table=repository_table, index_columns=["column1"], index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # send full data ret = self.mysql_client.execute_batch_sql('data/test_multi_collections_full.sql') self.assertEqual(ret, 0) time.sleep(10) # query result topk = 300 for i in range(0, collection_count): collection = 'test_multi_collections_' + str(i) status, response = self.query(collection, topk=topk) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 100 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) # send inc data ret = self.mysql_client.execute_batch_sql('data/test_multi_collections_inc.sql') self.assertEqual(ret, 0) time.sleep(10) # query result topk = 300 for i in range(0, collection_count): collection = 'test_multi_collections_' + str(i) status, response = self.query(collection, topk=topk) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 300 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) # def test_suspend_and_resume_collection(self): # # create collection # collection_name = 'test_mysql_restart_with_full_mode' # schema = self.create_schema(collection_name, # repository_table=collection_name, # index_columns=["column1"], # index_dimensions=[16]) # status = self.client.create_collection(schema) # self.assertEqual(status.code, 0) # # suspend collection # status = self.client.suspend_collection(collection_name) # logging.info("suspend collection result: %s", data) # self.assertEqual(status.code, 0) # # send data # ret = self.mysql_client.execute_batch_sql('data/test_suspend_and_resume_collection_full.sql') # self.assertEqual(ret, 0) # time.sleep(2) # # query result # status, response = self.query(collection_name) # self.assertTrue(status.ok()) # logging.info("query result: %s", response) # results = response.results # self.assertEqual(len(results), 1) # documents = results[0] # self.assertEqual(len(documents), 0) # # resume collection # status = self.client.resume_collection(collection_name) # logging.info("resume collection result: %s", data) # self.assertEqual(status.code, 0) # time.sleep(10) # # query result # query = self.create_query(collection_name, 300) # status, response = self.query(collection_name) # self.assertTrue(status.ok()) # logging.info("query result: %s", response) # results = response.results # self.assertEqual(len(results), 1) # documents = results[0] # count = 300 # self.assertEqual(len(documents), count) # for i in range(0, count): # self.assertEqual(documents[i].primary_key, i + 1) # self.assertEqual(documents[i].score, i * i) # self.assertAlmostEqual(documents[i].forward_column_values['col_a'], # 11.111 + i, delta=0.001) # self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) def test_invalid_lsn_info(self): # send data ret = self.mysql_client.execute_batch_sql('data/test_invalid_lsn_info_full.sql') self.assertEqual(ret, 0) time.sleep(5) # create collection collection_name = 'test_invalid_lsn_info' schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name, topk=300) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 100 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) # get latest lsn latest_lsn = self.get_latest_lsn(collection_name) self.assertEqual(latest_lsn.lsn, 100) file_name = latest_lsn.context.split(';')[0] # stop mysql repository self.server_utils.stop_mysql_repo() # mysql flush logs ret = self.mysql_client.execute("flush logs;flush logs; flush logs;") self.assertEqual(ret, 0) # purge binlog ret = self.mysql_client.purge_binlog(file_name) self.assertEqual(ret, 0) # start mysql repository self.server_utils.start_mysql_repo() # send data ret = self.mysql_client.execute_batch_sql('data/test_invalid_lsn_info_inc.sql') self.assertEqual(ret, 0) time.sleep(5) # query result status, response = self.query(collection_name, topk=300) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] count = 300 self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 11.111 + i, delta=0.001) self.assertEqual(documents[i].forward_column_values['col_b'], 100 * (i + 1)) def test_forward_with_charset_utf8(self): collection_name = 'test_forward_with_charset_utf8' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_charset_utf8_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], ('第一个字段')) self.assertEqual(documents[i].forward_column_values['f2'], ('定长字段')) self.assertEqual(documents[i].forward_column_values['f3'], ('我是谁')) self.assertEqual(documents[i].forward_column_values['f4'], ('第三个字段')) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_charset_utf8_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], ('第一个字段')) self.assertEqual(documents[i].forward_column_values['f2'], ('定长字段')) self.assertEqual(documents[i].forward_column_values['f3'], ('我是谁')) self.assertEqual(documents[i].forward_column_values['f4'], ('第三个字段')) def test_forward_with_charset_gbk(self): collection_name = 'test_forward_with_charset_gbk' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_charset_gbk_full.sql') self.assertEqual(ret, 0) # create collection forward_columns=['f1', 'f2', 'f3', 'f4'] schema = self.create_schema(collection_name, repository_table=collection_name, index_columns=["column1"], forward_columns=forward_columns, index_dimensions=[16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], ('第一个字段')) self.assertEqual(documents[i].forward_column_values['f2'], ('定长字段')) self.assertEqual(documents[i].forward_column_values['f3'], ('我是谁')) self.assertEqual(documents[i].forward_column_values['f4'], ('第三个字段')) # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_forward_with_charset_gbk_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], ('第一个字段')) self.assertEqual(documents[i].forward_column_values['f2'], ('定长字段')) self.assertEqual(documents[i].forward_column_values['f3'], ('我是谁')) self.assertEqual(documents[i].forward_column_values['f4'], ('第三个字段')) def test_one_field_both_index_and_forward(self): collection_name = 'test_one_field_both_index_and_forward' # prepare full table data ret = self.mysql_client.execute_batch_sql('data/test_one_field_both_index_and_forward_full.sql') self.assertEqual(ret, 0) # create collection schema = self.create_schema(collection_name, repository_table=collection_name, forward_columns=["f1", "column1"], index_columns=["column1", "column2"], index_dimensions=[16, 16]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) time.sleep(5) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 4 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (str(i + 1) * 16)) self.assertEqual(documents[i].forward_column_values['column1'], '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,' + str(i + 1) + ']') # prepare increment table data ret = self.mysql_client.execute_batch_sql('data/test_one_field_both_index_and_forward_inc.sql') self.assertEqual(ret, 0) time.sleep(6) # query result status, response = self.query(collection_name) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] total = 6 self.assertEqual(len(documents), total) for i in range(0, total): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(documents[i].forward_column_values['f1'], (str(i + 1) * 16)) self.assertEqual(documents[i].forward_column_values['column1'], '[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,' + str(i + 1) + ']') if __name__ == '__main__': unittest.main() ================================================ FILE: tests/integration/src/case/test_query_agent.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import logging import unittest import time import random import json from pyproximabe import * from global_conf import GlobalConf from collection_creator import CollectionCreator import client_helper OperationType = WriteRequest.OperationType class TestQueryAgentBase(unittest.TestCase): def setUp(self): self.global_conf = GlobalConf() self.creator = CollectionCreator() self.client = client_helper.get_client(self.global_conf) self.collection_name = "collection1" self.collection_name2 = "collection2" self.repository_name = "test_repo" self.clean_env() self.index_columns = ["column1"] self.index_dimensions = [16] self.schema = self.create_schema(self.collection_name, index_columns=self.index_columns, index_dimensions=self.index_dimensions) status = self.client.create_collection(self.schema) self.assertTrue(status.ok()) self.connection = self.creator.get_connection() self.dimension = 16 self.topk = 10 def tearDown(self): self.clean_env() def clean_env(self): status, collections = self.client.list_collections() self.assertTrue(status.ok()) for collection in collections: status = self.client.drop_collection(collection.collection_config.collection_name) self.assertTrue(status.ok()) def create_schema(self, collection_name, forward_columns=["col_a", "col_b"], index_columns=[], index_dimensions=[], index_data_types=None, max_docs_per_segment=100, index_measures=None): return self.creator.create_schema(collection_name, repository_table="test_collection", repository_name="test_repo", forward_columns=forward_columns, index_columns=index_columns, index_dimensions=index_dimensions, index_data_types=index_data_types, index_measures=index_measures, db_name="test_db", with_repo=True) def create_all_forward_data_types_schema(self, collection_name, dim): index_data_types = [DataType.VECTOR_FP32] index_columns = ['column_0'] index_dimensions = [dim] forward_columns = [] forward_cnt = 9 for i in range(0, forward_cnt): forward_columns.append('forward_' + str(i)) return self.creator.create_schema(collection_name, repository_table="test_collection", repository_name="test_repo", forward_columns=forward_columns, index_columns=index_columns, index_data_types=index_data_types, index_dimensions=index_dimensions, db_name="test_db") def create_single_request(self, magic_number, operation_type, forwards = [1.234, 'abc'], lsn=10): index_tuple_names = ['column1'] index_tuple_types = ['string'] forward_tuple_names = ['col_a', 'col_b'] forward_tuple_types = [DataType.FLOAT, DataType.STRING] rows = [[1, operation_type, lsn, "[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]", forwards[0], forwards[1]] ] return self.creator.create_dataset_request(self.collection_name, magic_number, index_tuple_names = index_tuple_names, index_tuple_types = index_tuple_types, forward_tuple_names = forward_tuple_names, forward_tuple_types = forward_tuple_types, rows = rows) def create_batch_request(self, magic_number, count, operation_type, forwards=[0.234, 'abc'], lsn = 10, index_value_base = 0): index_tuple_names = ['column1'] index_tuple_types = ['string'] rows = [] forward_tuple_names=['col_a', 'col_b'] forward_tuple_types=[DataType.FLOAT, DataType.STRING] for i in range(1, count + 1): rows.append([i, operation_type, lsn + i, '[' + str(i + index_value_base) + ",1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]", forwards[0] + i, forwards[1]]) return self.creator.create_dataset_request(self.collection_name, magic_number, index_tuple_names = index_tuple_names, index_tuple_types = index_tuple_types, forward_tuple_names = forward_tuple_names, forward_tuple_types = forward_tuple_types, rows = rows) def create_batch_request(self, collection_name, magic_number, count, operation_type, forwards=None, lsn = 10, index_column_count = 1, index_value_base = 0, key_base=0, index_tuple_names=None, index_data_types=None, index_dimensions=None, forward_tuple_names=['col_a', 'col_b'], same_features=False, generate_multi=False, piece_count=100, forward_tuple_types=[DataType.FLOAT, DataType.STRING]): if not index_tuple_names: index_metas = [[self.index_columns[0], DataType.VECTOR_FP32, self.index_dimensions[0]]] else: index_metas = [] for i in range(0, len(index_tuple_names)): index_name = index_tuple_names[i] if not index_data_types: index_metas.append([index_name, DataType.VECTOR_FP32, self.index_dimensions[0]]) else: index_metas.append([index_name, index_data_types[i], index_dimensions[i]]) index_tuple_types = [] for name in index_metas: index_tuple_types.append("string") rows = [] if forwards is not None and len(forwards) == 0: forward_tuple_names = [] forward_tuple_types = [] for i in range(1, count + 1): row = [key_base + i, operation_type, lsn + i] for j in range(0, index_column_count): if index_data_types: if index_data_types[j] == DataType.VECTOR_BINARY32: row.append('[' + str(i + key_base) + ']') else: if same_features: row.append('[' + str(i + index_value_base) + ",1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]") else: row.append('[' + str(i + index_value_base) + ",1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]") if forwards is None: tmp_forwards=[0.234, 'abc'] row.append(tmp_forwards[0] + i + key_base) row.append(tmp_forwards[1]) else: for f in forwards: row.append(f) rows.append(row) if not generate_multi: return self.creator.create_dataset_request(collection_name, magic_number, index_tuple_metas = index_metas, index_tuple_types = index_tuple_types, forward_tuple_names = forward_tuple_names, forward_tuple_types = forward_tuple_types, rows = rows) else: req_list = [] random.shuffle(rows) for i in range(0, len(rows), piece_count): if i + piece_count > len(rows): piece_count = len(rows) - i req = self.creator.create_dataset_request(collection_name, magic_number, index_tuple_metas = index_metas, index_tuple_types = index_tuple_types, forward_tuple_names = forward_tuple_names, forward_tuple_types = forward_tuple_types, rows = rows[i:i+piece_count]) req_list.append(req) return req_list def create_all_forward_data_types_insert_request(self, magic_number, dim, count): index_tuple_metas = [['column_0', DataType.VECTOR_FP32, dim]] index_tuple_types = ['string'] total_types = 9 forward_tuple_names = [] forward_tuple_types = [DataType.BINARY, DataType.STRING, DataType.BOOL, DataType.INT32, DataType.INT64, DataType.UINT32, DataType.UINT64, DataType.FLOAT, DataType.DOUBLE] for i in range(0, total_types): forward_tuple_names.append('forward_' + str(i)) rows = [] for i in range(1, count + 1): row = [i, OperationType.INSERT, 9 + i] vec = str(i) for k in range(1, dim): vec += ',' + str(i) row.append('[' + vec + ']') row.append(str(i).encode('UTF-8')) row.append(str(i) * i) if i % 2 == 1: row.append(True) else: row.append(False) row.append(i) row.append(i * 10) row.append(i * 100) row.append(i * 1000) row.append(i * 1.0) row.append(i * 10.0) rows.append(row) return self.creator.create_dataset_request(self.collection_name2, magic_number, index_tuple_metas = index_tuple_metas, index_tuple_types = index_tuple_types, forward_tuple_names = forward_tuple_names, forward_tuple_types = forward_tuple_types, rows = rows) def get_magic_number(self, collection_name): status, collection = self.client.describe_collection(collection_name) self.assertTrue(status.ok()) return collection.magic_number def simple_query(self, topk=10): features = [[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3]] return self.client.query(self.collection_name, 'column1', features, data_type=DataType.VECTOR_FP32, dimension=16, batch_count=1, topk=self.topk) def query(self, index_column, topk, dim, feature_type = DataType.VECTOR_FP32, batch_count = 1, radius=None): orig_dim = dim features = [] if feature_type == DataType.VECTOR_INT4: dim /= 2 elif feature_type == DataType.VECTOR_BINARY32: dim /= 32 elif feature_type == DataType.VECTOR_BINARY64: dim /= 64 dim = int(dim) for q in range(1, batch_count + 1): vector = [] for i in range(0, int(dim)): vector.append(q) features.append(vector) # fea_bytes = [] # for f in features: # if feature_type == FeatureType.FT_FP32: # fea_bytes += struct.pack('f', f) # elif feature_type == FeatureType.FT_FP16: # fea_bytes += struct.pack('h', 0) # elif feature_type == FeatureType.FT_INT8: # fea_bytes += struct.pack('b', f) # elif feature_type == FeatureType.FT_INT4: # fea_bytes += struct.pack('b', 17) # elif feature_type == FeatureType.FT_BINARY32: # fea_bytes += struct.pack('I', f) # elif feature_type == FeatureType.FT_BINARY64: # fea_bytes += struct.pack('L', f) return self.client.query(self.collection_name2, index_column, features, data_type=feature_type, dimension=orig_dim, batch_count=batch_count, topk=topk, radius=radius) def matrix_query(self, index_column, topk, dim, feature_type = DataType.VECTOR_FP32, batch_count = 1, radius=None): orig_dim = dim features = [] if feature_type == DataType.VECTOR_INT4: dim /= 2 elif feature_type == DataType.VECTOR_BINARY32: dim /= 32 elif feature_type == DataType.VECTOR_BINARY64: dim /= 64 dim = int(dim) for q in range(1, batch_count + 1): vector = [] for i in range(0, int(dim)): vector.append(q) features.append(vector) return self.client.query(self.collection_name2, index_column, json.dumps(features), data_type=feature_type, dimension=orig_dim, batch_count=batch_count, topk=topk, radius=radius) class TestQueryAgent(TestQueryAgentBase): def test_query_with_single_index_column(self): # 1 send data magic_number = self.get_magic_number(self.collection_name) count = 20 req = self.create_batch_request(self.collection_name, magic_number, count, OperationType.INSERT) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(1) # 2 query status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), self.topk) for i in range(0, self.topk): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, 1.0 + i * i) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 'abc') def test_query_with_multi_index_columns(self): # 1 create collection with multi index columns index_columns = ['ic0', 'ic1', 'ic2'] schema = self.create_schema(self.collection_name2, index_columns=index_columns, index_dimensions=[self.dimension, self.dimension, self.dimension]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # 2 send data magic_number = self.get_magic_number(self.collection_name2) count = 20 index_columns.reverse() req = self.create_batch_request(self.collection_name2, magic_number, count, OperationType.INSERT, index_column_count = 3, index_tuple_names=index_columns) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(1) # 3 query for index in index_columns: status, response = self.query(index, self.topk, self.dimension) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), self.topk) score = 8.0 for i in range(0, self.topk): self.assertEqual(documents[i].primary_key, i + 1) if i == 0: self.assertEqual(documents[i].score, 8.0) else: self.assertEqual(documents[i].score, score) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], 'abc') score += (2 * i + 1) def test_query_with_no_forward_column(self): # 1 create collection with no forward columns index_columns = ['ic0'] schema = self.create_schema(self.collection_name2, index_columns=index_columns, index_dimensions=[self.dimension], forward_columns=[]) logging.info("schema: %s", schema) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # 2 send data magic_number = self.get_magic_number(self.collection_name) count = 20 req = self.create_batch_request(self.collection_name2, magic_number, count, OperationType.INSERT, forwards=[], index_tuple_names=index_columns) logging.info("req: %s", req) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(1) # 3 query status, response = self.query(index_columns[0], self.topk, self.dimension) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), self.topk) score = 8.0 for i in range(0, self.topk): self.assertEqual(documents[i].primary_key, i + 1) if i == 0: self.assertEqual(documents[i].score, 8.0) else: self.assertEqual(documents[i].score, score) self.assertEqual(len(documents[i].forward_column_values), 0) score += (2 * i + 1) def test_query_with_all_forward_data_types(self): dim = 64 new_schema = self.create_all_forward_data_types_schema(self.collection_name2, dim) logging.info("new schema: %s", new_schema) status = self.client.create_collection(new_schema) self.assertEqual(status.code, 0) magic_number = self.get_magic_number(self.collection_name) batch_count = 6 req = self.create_all_forward_data_types_insert_request(magic_number, dim, batch_count) logging.info("request: %s", req) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(1) topk = 5 status, response = self.query("column_0", topk, dim, DataType.VECTOR_FP32) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), topk) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 0.0) self.assertEqual(len(documents[0].forward_column_values), 9) self.assertEqual(documents[0].forward_column_values['forward_0'], '1'.encode('UTF-8')) self.assertEqual(documents[0].forward_column_values['forward_1'], '1') self.assertEqual(documents[0].forward_column_values['forward_2'], True) self.assertEqual(documents[0].forward_column_values['forward_3'], 1) self.assertEqual(documents[0].forward_column_values['forward_4'], 10) self.assertEqual(documents[0].forward_column_values['forward_5'], 100) self.assertEqual(documents[0].forward_column_values['forward_6'], 1000) self.assertAlmostEqual(documents[0].forward_column_values['forward_7'], 1.0, delta=0.000001) self.assertAlmostEqual(documents[0].forward_column_values['forward_8'], 10.0, delta=0.000001) self.assertEqual(documents[1].primary_key, 2) self.assertEqual(documents[1].score, 64.0) self.assertEqual(documents[2].primary_key, 3) self.assertEqual(documents[2].score, 256.0) self.assertEqual(documents[3].primary_key, 4) self.assertEqual(documents[3].score, 576.0) self.assertEqual(documents[4].primary_key, 5) self.assertEqual(documents[4].score, 1024.0) self.assertEqual(len(documents[4].forward_column_values), 9) self.assertEqual(documents[4].forward_column_values['forward_0'], '5'.encode('UTF-8')) self.assertEqual(documents[4].forward_column_values['forward_1'], '55555') self.assertEqual(documents[4].forward_column_values['forward_2'], True) self.assertEqual(documents[4].forward_column_values['forward_3'], 5) self.assertEqual(documents[4].forward_column_values['forward_4'], 50) self.assertEqual(documents[4].forward_column_values['forward_5'], 500) self.assertEqual(documents[4].forward_column_values['forward_6'], 5000) self.assertAlmostEqual(documents[4].forward_column_values['forward_7'], 5.0, delta=0.000001) self.assertAlmostEqual(documents[4].forward_column_values['forward_8'], 50.0, delta=0.000001) def test_query_with_squared_euclidean(self): # 1 create collection index_columns = ['ic0'] schema = self.create_schema(self.collection_name2, index_columns=index_columns, index_dimensions=[self.dimension], index_measures=['SquaredEuclidean']) logging.info("schema: %s", schema) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # 2 send data magic_number = self.get_magic_number(self.collection_name) count = 20 req = self.create_batch_request(self.collection_name2, magic_number, count, OperationType.INSERT, same_features=True, index_tuple_names=index_columns) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(1) # 3 query status, response = self.query(index_columns[0], self.topk, self.dimension) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), self.topk) for i in range(0, self.topk): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 'abc') def test_query_with_euclidean(self): # 1 create collection index_columns = ['ic0'] schema = self.create_schema(self.collection_name2, index_columns=index_columns, index_dimensions=[self.dimension], index_measures=['Euclidean']) logging.info("schema: %s", schema) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # 2 send data magic_number = self.get_magic_number(self.collection_name) count = 20 req = self.create_batch_request(self.collection_name2, magic_number, count, OperationType.INSERT, same_features=True, index_tuple_names=index_columns) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(1) # 3 query status, response = self.query(index_columns[0], self.topk, self.dimension) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), self.topk) for i in range(0, self.topk): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 'abc') def test_query_with_inner_product(self): # 1 create collection index_columns = ['ic0'] schema = self.create_schema(self.collection_name2, index_columns=index_columns, index_dimensions=[self.dimension], index_measures=['InnerProduct']) logging.info("schema: %s", schema) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # 2 send data magic_number = self.get_magic_number(self.collection_name2) count = 20 req = self.create_batch_request(self.collection_name2, magic_number, count, OperationType.INSERT, same_features=True, index_tuple_names=index_columns) logging.info("req: %s", req) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(1) # 3 query status, response = self.query(index_columns[0], self.topk, self.dimension) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), self.topk) for i in range(0, self.topk): self.assertEqual(documents[i].primary_key, count - i) self.assertEqual(documents[i].score, -1.0 * (15 + count - i)) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 0.234 + count - i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 'abc') def test_query_with_hamming(self): # 1 create collection dimension = 32 index_columns = ['ic0'] schema = self.create_schema(self.collection_name2, index_columns=index_columns, index_dimensions=[dimension], index_data_types=[DataType.VECTOR_BINARY32], index_measures=['Hamming']) logging.info("schema: %s", schema) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # 2 send data magic_number = self.get_magic_number(self.collection_name2) count = 20 req = self.create_batch_request(self.collection_name2, magic_number, count, OperationType.INSERT, index_data_types=[DataType.VECTOR_BINARY32], index_tuple_names=index_columns, index_dimensions=[dimension]) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(1) # 3 query n status, response = self.query(index_columns[0], self.topk, dimension, feature_type=DataType.VECTOR_BINARY32) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] scores = [0.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0] self.assertEqual(len(documents), self.topk) for i in range(0, self.topk): self.assertEqual(documents[i].score, scores[i]) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') # def test_query_with_metric_type_different(self): # # 1 create collection # index_columns = ['ic0'] # schema = self.create_schema(self.collection_name2, # index_columns=index_columns, # index_dimensions=[self.dimension], # index_measures=['SquaredEuclidean']) # logging.info("schema: %s", schema) # status, data = self.client.create_collection(schema) # logging.info("data: %s", data) # self.assertEqual(status, 200) # self.assertEqual(data["code"], 0) # self.collection_count += 1 # # 2 send data # response = self.client.get_collection(self.collection_name2) # magic_number = response.entity.magic_number # count = 20 # req = self.create_batch_request(self.collection_name2, magic_number, # count, OperationType.INSERT, # same_features=True, # index_tuple_names=index_columns) # response = self.client.write(req) # self.assertEqual(response.code, 0) # time.sleep(1) # # 3 query # query = self.create_query(index_columns[0], self.topk, self.dimension, # metric_type=MetricType.MT_EUCLIDEAN) # response = self.client.query(query) # logging.info("response: %s", response) # self.assertEqual(response.code, 0) # documents = response.entity[0] # self.assertEqual(len(documents), self.topk) # for i in range(0, self.topk): # self.assertEqual(documents[i].primary_key, i + 1) # self.assertEqual(documents[i].score, i * i) # self.assertEqual(documents[i].forward[0].key, 'col_a') # self.assertAlmostEqual(documents[i].forward[0].value.float_value, # 1.234 + i, delta=0.000001) # self.assertEqual(documents[i].forward[1].key, 'col_b') # self.assertEqual(documents[i].forward[1].value.bytes_value, 'abc'.encode('UTF-8')) def test_query_with_batch(self): # 1 create collection with multi index columns index_columns = ['ic0'] schema = self.create_schema(self.collection_name2, index_columns=index_columns, index_dimensions=[self.dimension]) logging.info("schema: %s", schema) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # 2 send data magic_number = self.get_magic_number(self.collection_name) count = 20 index_columns.reverse() req = self.create_batch_request(self.collection_name2, magic_number, count, OperationType.INSERT, index_column_count = 1, index_tuple_names=index_columns) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(1) # 3 query for index in index_columns: status, response = self.query(index, self.topk, self.dimension, batch_count=2) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 2) documents = results[0] self.assertEqual(len(documents), self.topk) score = 8.0 for i in range(0, self.topk): self.assertEqual(documents[i].primary_key, i + 1) if i == 0: self.assertEqual(documents[i].score, 8.0) else: self.assertEqual(documents[i].score, score) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 'abc') score += (2 * i + 1) documents = results[1] self.assertEqual(len(documents), self.topk) score = 8.0 for i in range(0, self.topk): if i == 0: self.assertEqual(documents[i].primary_key, 2) elif i > 2: self.assertEqual(documents[i].primary_key, i + 1) if i == 0: self.assertEqual(documents[i].score, 7.0) elif i <= 2: self.assertEqual(documents[i].score, 8.0) else: self.assertEqual(documents[i].score, score) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertEqual(documents[i].forward_column_values['col_b'], 'abc') if i >= 2: score += (2 * i - 1) def test_query_with_radius(self): # 1 create collection index_columns = ['ic0'] schema = self.create_schema(self.collection_name2, index_columns=index_columns, index_dimensions=[self.dimension], index_measures=['SquaredEuclidean']) logging.info("schema: %s", schema) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # 2 send data magic_number = self.get_magic_number(self.collection_name) count = 20 req = self.create_batch_request(self.collection_name2, magic_number, count, OperationType.INSERT, same_features=True, index_tuple_names=index_columns) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(1) # 3 query status, response = self.query(index_columns[0], self.topk, self.dimension, radius = 0.9) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 1) self.assertEqual(documents[0].primary_key, 1) self.assertEqual(documents[0].score, 0) self.assertAlmostEqual(documents[0].forward_column_values['col_a'], 1.234, delta=0.000001) self.assertEqual(documents[0].forward_column_values['col_b'], 'abc') def test_query_with_topk(self): # 1 create collection index_columns = ['ic0'] schema = self.create_schema(self.collection_name2, index_columns=index_columns, index_dimensions=[self.dimension], index_measures=['SquaredEuclidean']) logging.info("schema: %s", schema) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # 2 send data magic_number = self.get_magic_number(self.collection_name) count = 20 req = self.create_batch_request(self.collection_name2, magic_number, count, OperationType.INSERT, same_features=True, index_tuple_names=index_columns) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(1) # 3 query # topk > count topks = [100, count, 2, 0] for topk in topks: status, response = self.query(index_columns[0], topk, self.dimension) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] result_count = topk if result_count > count: result_count = count self.assertEqual(len(documents), result_count) for i in range(0, result_count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 'abc') def test_query_with_multi_dump_segment(self): # 1 create collection index_columns = ['ic0'] schema = self.create_schema(self.collection_name2, index_columns=index_columns, index_dimensions=[self.dimension], index_measures=['SquaredEuclidean']) logging.info("schema: %s", schema) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # 2 send data magic_number = self.get_magic_number(self.collection_name) count = 333 req_list = self.create_batch_request(self.collection_name2, magic_number, count, OperationType.INSERT, same_features=True, key_base = 0, index_value_base=0, generate_multi=True, piece_count=100, index_tuple_names=index_columns) for req in req_list: response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(5) # 3 query topk = count status, response = self.query(index_columns[0], topk, self.dimension) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, i * i) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.00001) self.assertEqual(documents[i].forward_column_values['col_b'], 'abc') def test_query_with_empty(self): # 1 query status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 0) def test_query_with_pk_exist(self): # 1 send data magic_number = self.get_magic_number(self.collection_name) count = 220 req = self.create_batch_request(self.collection_name, magic_number, count, OperationType.INSERT) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(2) # 2 query for pk in range(1, count + 1): status, document = self.client.get_document_by_key(self.collection_name, pk) self.assertEqual(status.code, 0) logging.info("query result: %s", document) self.assertEqual(document.primary_key, pk) self.assertEqual(document.score, 0.0) self.assertEqual(len(document.forward_column_values), 2) self.assertAlmostEqual(document.forward_column_values['col_a'], 0.234 + pk, delta=0.00001) self.assertEqual(document.forward_column_values['col_b'], 'abc') def test_query_with_pk_no_exist(self): # 1 send data magic_number = self.get_magic_number(self.collection_name) count = 30 req = self.create_batch_request(self.collection_name, magic_number, count, OperationType.INSERT) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(2) # 2 query pk = 100 status, document = self.client.get_document_by_key(self.collection_name, pk) logging.info("query status: %s", status) self.assertTrue(status.ok()) self.assertIsNone(document) def test_matrix_query_with_multi_index_columns(self): # 1 create collection with multi index columns index_columns = ['ic0', 'ic1', 'ic2'] schema = self.create_schema(self.collection_name2, index_columns=index_columns, index_dimensions=[self.dimension, self.dimension, self.dimension]) status = self.client.create_collection(schema) self.assertEqual(status.code, 0) # 2 send data magic_number = self.get_magic_number(self.collection_name2) count = 20 index_columns.reverse() req = self.create_batch_request(self.collection_name2, magic_number, count, OperationType.INSERT, index_column_count = 3, index_tuple_names=index_columns) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(1) # 3 query for index in index_columns: status, response = self.matrix_query(index, self.topk, self.dimension) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), self.topk) score = 8.0 for i in range(0, self.topk): self.assertEqual(documents[i].primary_key, i + 1) if i == 0: self.assertEqual(documents[i].score, 8.0) else: self.assertEqual(documents[i].score, score) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.000001) self.assertEqual(documents[1].forward_column_values['col_b'], 'abc') score += (2 * i + 1) if __name__ == '__main__': unittest.main() ================================================ FILE: tests/integration/src/case/test_query_agent_exception.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import logging import struct import grpc import unittest import time from pyproximabe import * from global_conf import GlobalConf from collection_creator import CollectionCreator from test_query_agent import TestQueryAgentBase from server_utils import ServerUtils OperationType = WriteRequest.OperationType class TestQueryAgentException(TestQueryAgentBase): def setUp(self): super().setUp() self.server_utils = ServerUtils() # def create_schema(self, collection_name, # forward_columns=["col_a", "col_b"], # index_columns=[], # index_dimensions=[], # index_alias_columns=None, # index_data_types=None, # index_measures=None): # if not index_alias_columns: # index_alias_columns = index_columns # return self.creator.create_schema(collection_name, # repository_table="test_collection", # repository_name="test_repo", # forward_columns=forward_columns, # revision=1, # index_columns=index_columns, # index_alias_columns=index_alias_columns, # index_dimensions=index_dimensions, # index_data_types=index_data_types, # index_measures=index_measures, # db_name="test_db") # def create_all_forward_data_types_schema(self, collection_name, dim): # index_data_types = [common_pb2.FeatureType.FT_FP32] # index_columns = ['column_0'] # index_dimensions = [dim] # forward_columns = [] # forward_cnt = 9 # for i in range(0, forward_cnt): # forward_columns.append('forward_' + str(i)) # return self.creator.create_schema(collection_name, # repository_table="test_collection", # repository_name="test_repo", # forward_columns=forward_columns, # revision=1, # index_columns=index_columns, # index_data_types=index_data_types, # index_alias_columns=index_columns, # index_dimensions=index_dimensions, # db_name="test_db") # def create_single_request(self, agent_timestamp, operation_type, # forwards = [1.234, 'abc'], lsn=10): # index_tuple_names = [self.index_column] # index_tuple_types = [common_pb2.GenericValueMeta.FieldType.FT_BYTES] # forward_tuple_names = ['col_a', 'col_b'] # forward_tuple_types = [common_pb2.GenericValueMeta.FieldType.FT_FLOAT, # common_pb2.GenericValueMeta.FieldType.FT_BYTES] # rows = [[1, operation_type, lsn, "[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]", forwards[0], forwards[1]] # ] # return self.creator.create_dataset_request(self.collection_name, # agent_timestamp, # schema_revision=0, # index_tuple_names = index_tuple_names, # index_tuple_types = index_tuple_types, # forward_tuple_names = forward_tuple_names, # forward_tuple_types = forward_tuple_types, # rows = rows) # def create_batch_request(self, collection_name, agent_timestamp, # count, operation_type, # forwards=None, # lsn = 10, # index_column_count = 1, # index_value_base = 0, # index_tuple_names=None, # index_data_types=None, # forward_tuple_names=['col_a', 'col_b'], # same_features=False, # forward_tuple_types=[common_pb2.GenericValueMeta.FieldType.FT_FLOAT, # common_pb2.GenericValueMeta.FieldType.FT_BYTES]): # if not index_tuple_names: # index_tuple_names = [self.index_column] # index_tuple_types = [] # for name in index_tuple_names: # index_tuple_types.append(common_pb2.GenericValueMeta.FieldType.FT_BYTES) # rows = [] # if forwards is not None and len(forwards) == 0: # forward_tuple_names = [] # forward_tuple_types = [] # for i in range(1, count + 1): # row = [i, operation_type, lsn + i] # for j in range(0, index_column_count): # if index_data_types: # if index_data_types[j] == common_pb2.FeatureType.FT_BINARY32: # row.append('[' + str(i) + ']') # else: # if same_features: # row.append('[' + str(i + index_value_base) + ",1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]") # else: # row.append('[' + str(i + index_value_base) + ",1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]") # if forwards is None: # tmp_forwards=[0.234, 'abc'] # row.append(tmp_forwards[0] + i) # row.append(tmp_forwards[1]) # else: # for f in forwards: # row.append(f) # rows.append(row) # return self.creator.create_dataset_request(collection_name, # agent_timestamp, # schema_revision=0, # index_tuple_names = index_tuple_names, # index_tuple_types = index_tuple_types, # forward_tuple_names = forward_tuple_names, # forward_tuple_types = forward_tuple_types, # rows = rows) # def create_all_forward_data_types_insert_request(self, agent_timestamp, dim, count): # index_tuple_names = ['column_0'] # index_tuple_types = [common_pb2.GenericValueMeta.FieldType.FT_BYTES] # total_types = 9 # forward_tuple_names = [] # forward_tuple_types = [common_pb2.GenericValueMeta.FieldType.FT_BYTES, # common_pb2.GenericValueMeta.FieldType.FT_STRING, # common_pb2.GenericValueMeta.FieldType.FT_BOOL, # common_pb2.GenericValueMeta.FieldType.FT_INT32, # common_pb2.GenericValueMeta.FieldType.FT_INT64, # common_pb2.GenericValueMeta.FieldType.FT_UINT32, # common_pb2.GenericValueMeta.FieldType.FT_UINT64, # common_pb2.GenericValueMeta.FieldType.FT_FLOAT, # common_pb2.GenericValueMeta.FieldType.FT_DOUBLE] # for i in range(0, total_types): # forward_tuple_names.append('forward_' + str(i)) # rows = [] # for i in range(1, count + 1): # row = [i, common_pb2.OperationType.INSERT, 9 + i] # vec = str(i) # for k in range(1, dim): # vec += ',' + str(i) # row.append('[' + vec + ']') # row.append(str(i)) # row.append(str(i) * i) # if i % 2 == 1: # row.append(True) # else: # row.append(False) # row.append(i) # row.append(i * 10) # row.append(i * 100) # row.append(i * 1000) # row.append(i * 1.0) # row.append(i * 10.0) # rows.append(row) # return self.creator.create_dataset_request(self.collection_name2, # agent_timestamp, # schema_revision=0, # index_tuple_names = index_tuple_names, # index_tuple_types = index_tuple_types, # forward_tuple_names = forward_tuple_names, # forward_tuple_types = forward_tuple_types, # rows = rows) def simple_query(self, collection_name=None, index_column='column1', feature_type=DataType.VECTOR_FP32, dimension=16, topk=None, vector_empty=False, invalid_vector_size=False, batch_count=1): if not collection_name: collection_name = self.collection_name if topk is None: topk = self.topk features = [1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3] fea_bytes = [] for f in features: fea_bytes += struct.pack('f', f) if invalid_vector_size: fea_bytes = fea_bytes[0:-3] if feature_type == DataType.VECTOR_FP32 and not vector_empty: features = bytes(fea_bytes) elif not vector_empty: features = bytes(features) else: features = bytes([]) return self.client.query(collection_name, index_column, features, data_type=feature_type, dimension=dimension, batch_count=batch_count, topk=topk) def matrix_query(self, collection_name=None, index_column='column1', feature_type=DataType.VECTOR_FP32, matrix="[]", dimension=16, batch_count=1): if not collection_name: collection_name = self.collection_name topk = self.topk return self.client.query(collection_name, index_column, matrix, data_type=feature_type, dimension=dimension, batch_count=batch_count, topk=topk) # def create_query(self, index_column, topk, dim, # feature_type = common_pb2.FeatureType.FT_FP32, # metric_type = common_pb2.MetricType.MT_SQUARED_EUCLIDEAN, # batch_count = 1, # radius=None): # query = query_bervice_pb2.QueryRequest() # query.query_type = query_bervice_pb2.QueryType.QT_KNN # query.collection_name = self.collection_name2 # query.knn_params.column_name = index_column # query.knn_params.topk = topk # query.knn_params.dimension = dim # query.knn_params.feature_type = feature_type # common_pb2.FeatureType.FT_FP32 # features = [] # if feature_type == common_pb2.FeatureType.FT_INT4: # dim /= 2 # elif feature_type == common_pb2.FeatureType.FT_BINARY32: # dim /= 32 # elif feature_type == common_pb2.FeatureType.FT_BINARY64: # dim /= 64 # for q in range(1, batch_count + 1): # for i in range(0, int(dim)): # features.append(q) # fea_bytes = [] # for f in features: # if feature_type == common_pb2.FeatureType.FT_FP32: # fea_bytes += struct.pack('f', f) # elif feature_type == common_pb2.FeatureType.FT_FP16: # fea_bytes += struct.pack('h', 0) # elif feature_type == common_pb2.FeatureType.FT_INT8: # fea_bytes += struct.pack('b', f) # elif feature_type == common_pb2.FeatureType.FT_INT4: # fea_bytes += struct.pack('b', 17) # elif feature_type == common_pb2.FeatureType.FT_BINARY32: # fea_bytes += struct.pack('I', f) # elif feature_type == common_pb2.FeatureType.FT_BINARY64: # fea_bytes += struct.pack('L', f) # query.knn_params.features = bytes(fea_bytes) # query.knn_params.batch_count = batch_count # if radius: # query.knn_params.radius = radius # return query def test_query_with_invalid_collection(self): status, response = self.simple_query(collection_name='invalid_collection') logging.info("response: %s", status) self.assertEqual(status.code, -4002) self.assertEqual(status.reason, 'Collection Not Exist') def test_query_with_invalid_index_column(self): status, response = self.simple_query(index_column='invalid_index') logging.info("response: %s", status) self.assertEqual(status.code, -4003) self.assertEqual(status.reason, 'Column Not Exist') def test_query_with_invalid_data_type(self): feature_type=DataType.VECTOR_BINARY32 status, response = self.simple_query(feature_type=feature_type) logging.info("response: %s", status) self.assertEqual(status.code, -2024) self.assertEqual(status.reason, 'Mismatched Data Type') def test_query_with_invalid_dimension(self): status, response = self.simple_query(dimension=32) logging.info("response: %s", status) self.assertEqual(status.code, -2010) self.assertEqual(status.reason, 'Invalid Query') def test_query_with_topk_zero(self): # 1 send data magic_number = self.get_magic_number(self.collection_name) count = 20 req = self.create_batch_request(self.collection_name, magic_number, count, OperationType.INSERT) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(1) # 2 query status, response = self.simple_query(topk=0) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), 0) def test_query_with_empty_vector(self): try: status, response = self.simple_query(vector_empty=True) self.assertTrue(False) except core.types.ProximaSeException as e: self.assertEqual(str(e), "Empty features:b''") def test_query_with_invalid_vector_size(self): status, response = self.simple_query(invalid_vector_size=True) logging.info("response: %s", status) self.assertEqual(status.code, -2010) self.assertEqual(status.reason, 'Invalid Query') def test_query_with_invalid_batch_count(self): try: status, response = self.simple_query(batch_count=0) self.assertTrue(False) except core.types.ProximaSeException as e: self.assertEqual(str(e), "Empty dimension[16] or batch_count[0]") def test_query_with_server_restart(self): # 1 send data magic_number = self.get_magic_number(self.collection_name) count = 220 req = self.create_batch_request(self.collection_name, magic_number, count, OperationType.INSERT) response = self.client.write(req) self.assertEqual(response.code, 0) time.sleep(3) # 2 query status, response = self.simple_query() self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), self.topk) for i in range(0, self.topk): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, 1.0 + i * i) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.000001) self.assertEqual(documents[i].forward_column_values['col_b'], 'abc') # 3 restart proxima be self.server_utils.stop_proxima_be('SIGUSR1') self.server_utils.start_proxima_be() # 4 query status, response = self.simple_query(topk=count) self.assertTrue(status.ok()) logging.info("query result: %s", response) results = response.results self.assertEqual(len(results), 1) documents = results[0] self.assertEqual(len(documents), count) for i in range(0, count): self.assertEqual(documents[i].primary_key, i + 1) self.assertEqual(documents[i].score, 1.0 + i * i) self.assertEqual(len(documents[i].forward_column_values), 2) self.assertAlmostEqual(documents[i].forward_column_values['col_a'], 1.234 + i, delta=0.00001) self.assertEqual(documents[i].forward_column_values['col_b'], 'abc') def test_matrix_query_with_invalid_vector_size(self): status, response = self.maxtrix_query(invalid_vector_size=True) logging.info("response: %s", status) self.assertEqual(status.code, -2010) self.assertEqual(status.reason, 'Invalid Query') def test_matrix_query_with_invalid_vector_size(self): matrix = "[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2]" status, response = self.matrix_query(matrix=matrix) logging.info("response: %s", status) self.assertEqual(status.code, -2010) self.assertEqual(status.reason, 'Invalid Query') def test_matrix_query_with_invalid_batch_count(self): matrix = "[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2]" status, response = self.matrix_query(matrix=matrix, batch_count=2) logging.info("response: %s", status) self.assertEqual(status.code, -2010) self.assertEqual(status.reason, 'Invalid Query') def test_matrix_query_with_invalid_matrix(self): matrix = "[[1,1,1,1,1,1,1,1],[2,2,2,2,2,2,2,2],[3]]" status, response = self.matrix_query(matrix=matrix, dimension=8, batch_count=3) logging.info("response: %s", status) self.assertEqual(status.code, -2010) self.assertEqual(status.reason, 'Invalid Query') def test_matrix_query_with_invalid_json_array(self): matrix = "[" status, response = self.matrix_query(matrix=matrix) logging.info("response: %s", status) self.assertEqual(status.code, -2010) self.assertEqual(status.reason, 'Invalid Query') matrix = "[[1,1,1,1,1,1,1,1],[2,2,2,2,2,2,2,2]" status, response = self.matrix_query(matrix=matrix, dimension=8, batch_count=2) logging.info("response: %s", status) self.assertEqual(status.code, -2010) self.assertEqual(status.reason, 'Invalid Query') def test_matrix_query_with_json_object(self): matrix = "{}" status, response = self.matrix_query(matrix=matrix, dimension=8, batch_count=3) logging.info("response: %s", status) self.assertEqual(status.code, -2010) self.assertEqual(status.reason, 'Invalid Query') if __name__ == '__main__': unittest.main() ================================================ FILE: tests/integration/src/requirements.txt ================================================ grpcio grpcio-tools DBUtils==1.3 pymysql==0.10.1 ================================================ FILE: tests/integration/src/run.py ================================================ # Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import os import sys import time import unittest import logging def get_allsuite(path): return unittest.defaultTestLoader.discover(path, pattern="test_*.py") def get_onesuite(path, name): suite = unittest.TestSuite() arr = name.split('.') if len(arr) == 1: pattern = name + ".py" suite = unittest.defaultTestLoader.discover(path, pattern=pattern) elif len(arr) == 2: suite = unittest.defaultTestLoader.discover(path, pattern=name) elif len(arr) == 3: case = unittest.defaultTestLoader.loadTestsFromName(name) tmp_suite = unittest.TestSuite() tmp_suite.addTest(case) suite.addTest(tmp_suite) return suite def get_size(log_file): return os.path.getsize(log_file) def get_content(log_file, offset): f = open(log_file, 'r') f.seek(offset) return f.read() def print_case_status(case, status): print (case, '...', status) logging.info("%s ... %s", str(case), status) if __name__ == '__main__': print("=============================================") path = sys.argv[1] sys.path.append(path) sys.path.append(path + '/case') if(len(sys.argv) == 2): suite = get_allsuite(path + "/case/") elif len(sys.argv) == 3: suite = get_onesuite(path + "/case/", sys.argv[2]) else: print("Wrong argument for run.py") exit() log_file = 'it.log' failures_vec = [] errors_vec = [] totals = [] start = time.time() for su in suite: for case in su: try: tests = vars(case)['_tests'] except Exception as ex: print(vars(case)) print(ex) raise for test in tests: totals.append(test) print_case_status(test, '') offset = get_size(log_file) result = test.run() if len(result.errors) != 0 or len(result.failures) != 0: log_content = get_content(log_file, offset) print (log_content.strip()) if len(result.errors) != 0: for error in result.errors: print (error[1]) print_case_status(test, 'ERROR') errors_vec.append(result.errors) else: for failure in result.failures: print (failure[0], failure[1]) print_case_status(test, 'FAILURE') failures_vec.append(result.failures) else: print_case_status(test, 'OK') cost = time.time() - start print ("\n") for errors in errors_vec: for error in errors: print ("=" * 70) print ("ERROR: %s" % (error[0])) print ("-" * 70) print (error[1]) print (">\n") for failures in failures_vec: for failure in failures: print ("=" * 70) print ("FAILURE: %s" % (failure[0])) print ("-" * 70) print ("%s>\n" % (failure[1])) print ("\nRan %s tests in %.3fs\n" % (len(totals), cost)) if len(errors_vec) != 0 or len(failures_vec) != 0: print ("FAILED (errors=%d, failures=%d)" % (len(errors_vec), len(failures_vec))) sys.exit(1) ================================================ FILE: tests/meta/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Feb 2021 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) if(APPLE) set(APPLE_FRAMEWORK_LIBS -framework CoreFoundation -framework CoreGraphics -framework CoreData -framework CoreText -framework Security -framework Foundation -Wl,-U,_MallocExtension_ReleaseFreeMemory -Wl,-U,_ProfilerStart -Wl,-U,_ProfilerStop -Wl,-U,_RegisterThriftProtocol ) endif() file(GLOB ALL_TEST_SRCS *_test.cc) foreach (CC_SRCS ${ALL_TEST_SRCS}) get_filename_component(CC_TARGET ${CC_SRCS} NAME_WE) cc_gmock( NAME ${CC_TARGET} STRICT LIBS proxima_be_admin proxima_be_agent proxima_be_query proxima_be_index proxima_be_meta proxima_be_common proxima_be_proto proxima ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} SRCS ${CC_SRCS} INCS .. ../../src LDFLAGS ${APPLE_FRAMEWORK_LIBS} ) set_target_properties(${CC_TARGET} PROPERTIES INSTALL_RPATH ${LIB_PATH}) cc_test_suite(proxima_be_meta ${CC_TARGET}) endforeach () ================================================ FILE: tests/meta/collection_impl_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include #include "meta/meta_impl.h" using namespace proxima::be::meta; TEST(CollectionImpl, TestConstructor) { CollectionMeta meta; meta.set_name("name"); meta.set_uid("uid"); meta.mutable_forward_columns()->assign({"forward1", "forward2"}); meta.set_max_docs_per_segment(10); meta.set_revision(10); meta.set_status(CollectionStatus::INITIALIZED); meta.set_current(false); CollectionImplPtr collection = std::make_shared(meta); ASSERT_EQ(meta.name(), collection->name()); ASSERT_EQ(meta.uid(), collection->uid()); ASSERT_EQ("forward1,forward2", collection->forward_columns()); ASSERT_EQ(meta.max_docs_per_segment(), collection->max_docs_per_segment()); ASSERT_EQ(meta.revision(), collection->revision()); ASSERT_EQ(meta.status(), static_cast(collection->status())); ASSERT_EQ(meta.is_current(), collection->current() != 0); } ================================================ FILE: tests/meta/meta_agent_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #include "meta/meta_agent.h" #include #include "meta/meta_impl.h" #include "meta/meta_service_builder.h" #include "mock_meta_service.h" #include "temp_file_inl.h" using namespace proxima::be; using namespace proxima::be::meta; class MetaAgentTest : public testing::Test { protected: // Sets up the test fixture. void SetUp() override { meta_service_ = std::make_shared(); } // Tears down the test fixture. void TearDown() override { meta_service_.reset(); } protected: MockMetaServicePtr meta_service_; }; TEST_F(MetaAgentTest, TestAgentCreate) { MockMetaServicePtr meta_service = nullptr; { auto agent = MetaAgent::Create(meta_service); EXPECT_FALSE(agent); } { meta_service = std::make_shared(); auto agent = MetaAgent::Create(meta_service); EXPECT_TRUE(agent); EXPECT_TRUE(agent->get_service()); } } TEST_F(MetaAgentTest, TestInitializeAndCleanup) { EXPECT_CALL(*meta_service_, init_impl()) .Times(2) .WillOnce(Return(1)) .WillOnce(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*meta_service_, cleanup_impl()) .WillOnce(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*meta_service_, start_impl()) .WillOnce(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*meta_service_, stop_impl()) .WillOnce(Return(0)) .RetiresOnSaturation(); auto agent = MetaAgent::Create(meta_service_); EXPECT_EQ(agent->init(), 1); EXPECT_EQ(agent->init(), 0); EXPECT_EQ(agent->start(), 0); EXPECT_EQ(agent->stop(), 0); EXPECT_EQ(agent->cleanup(), 0); } TEST_F(MetaAgentTest, TestCollectionOperationWithMock) { { // Test Create EXPECT_CALL(*meta_service_, create_collection(_, _)) .WillOnce(Return(0)) .WillOnce(Return(1)) .RetiresOnSaturation(); auto agent = MetaAgent::Create(meta_service_); CollectionBase create_param; EXPECT_EQ(agent->create_collection(create_param, nullptr), 0); EXPECT_EQ(agent->create_collection(create_param, nullptr), 1); } { // Test Update EXPECT_CALL(*meta_service_, update_collection(_, _)) .WillOnce(Return(1)) .WillOnce(Return(0)) .RetiresOnSaturation(); auto agent = MetaAgent::Create(meta_service_); CollectionBase update_param; EXPECT_EQ(agent->update_collection(update_param, nullptr), 1); EXPECT_EQ(agent->update_collection(update_param, nullptr), 0); } { // Test update_status EXPECT_CALL(*meta_service_, update_status(_, _)) .WillOnce(Return(1)) .WillOnce(Return(0)) .RetiresOnSaturation(); auto agent = MetaAgent::Create(meta_service_); std::string name("name"); EXPECT_EQ(agent->update_status(name, CollectionStatus::SERVING), 1); EXPECT_EQ(agent->update_status(name, CollectionStatus::SERVING), 0); } { // Test enable_collection EXPECT_CALL(*meta_service_, enable_collection(_, _, _)) .WillOnce(Return(1)) .WillOnce(Return(0)) .RetiresOnSaturation(); auto agent = MetaAgent::Create(meta_service_); std::string name("name"); EXPECT_EQ(agent->enable_collection(name, 0), 1); EXPECT_EQ(agent->enable_collection(name, 0), 0); } { // Test suspend_collection_read EXPECT_CALL(*meta_service_, suspend_collection_read(_)) .WillOnce(Return(1)) .WillOnce(Return(0)) .RetiresOnSaturation(); auto agent = MetaAgent::Create(meta_service_); std::string name("name"); EXPECT_EQ(agent->suspend_collection_read(name), 1); EXPECT_EQ(agent->suspend_collection_read(name), 0); } { // Test suspend_collection_read EXPECT_CALL(*meta_service_, resume_collection_read(_)) .WillOnce(Return(1)) .WillOnce(Return(0)) .RetiresOnSaturation(); auto agent = MetaAgent::Create(meta_service_); std::string name("name"); EXPECT_EQ(agent->resume_collection_read(name), 1); EXPECT_EQ(agent->resume_collection_read(name), 0); } { // Test suspend_collection_read EXPECT_CALL(*meta_service_, suspend_collection_write(_)) .WillOnce(Return(1)) .WillOnce(Return(0)) .RetiresOnSaturation(); auto agent = MetaAgent::Create(meta_service_); std::string name("name"); EXPECT_EQ(agent->suspend_collection_write(name), 1); EXPECT_EQ(agent->suspend_collection_write(name), 0); } { // Test suspend_collection_read EXPECT_CALL(*meta_service_, resume_collection_write(_)) .WillOnce(Return(1)) .WillOnce(Return(0)) .RetiresOnSaturation(); auto agent = MetaAgent::Create(meta_service_); std::string name("name"); EXPECT_EQ(agent->resume_collection_write(name), 1); EXPECT_EQ(agent->resume_collection_write(name), 0); } { // Test delete_collection EXPECT_CALL(*meta_service_, drop_collection(_)) .WillOnce(Return(1)) .WillOnce(Return(0)) .RetiresOnSaturation(); auto agent = MetaAgent::Create(meta_service_); std::string name; EXPECT_TRUE(agent->delete_collection(name) != 0); name.assign("name"); EXPECT_EQ(agent->delete_collection(name), 1); EXPECT_EQ(agent->delete_collection(name), 0); } { // Test delete_collection EXPECT_CALL(*meta_service_, get_latest_collections(_)) .WillOnce(Return(1)) .WillOnce(Return(0)) .RetiresOnSaturation(); auto agent = MetaAgent::Create(meta_service_); EXPECT_TRUE(agent->list_collections(nullptr) != 0); CollectionMetaPtrList collections; EXPECT_EQ(agent->list_collections(&collections), 1); EXPECT_EQ(agent->list_collections(&collections), 0); } { // Test delete_collection EXPECT_CALL(*meta_service_, get_collections(_, _)) .WillOnce(Return(1)) .WillOnce(Return(0)) .RetiresOnSaturation(); auto agent = MetaAgent::Create(meta_service_); std::string name; CollectionMetaPtrList collections; EXPECT_TRUE(agent->get_collection_history(name, &collections) != 0); name.assign("name"); EXPECT_EQ(agent->get_collection_history(name, &collections), 1); EXPECT_EQ(agent->get_collection_history(name, &collections), 0); } { // Test delete_collection EXPECT_CALL(*meta_service_, get_current_collection(_)) .WillOnce(Return(nullptr)) .RetiresOnSaturation(); auto agent = MetaAgent::Create(meta_service_); std::string name; EXPECT_FALSE(agent->get_collection(name)); name.assign("name"); EXPECT_FALSE(agent->get_collection(name)); } { // Test delete_collection EXPECT_CALL(*meta_service_, exist_collection(_)) .WillOnce(Return(false)) .WillOnce(Return(true)) .RetiresOnSaturation(); auto agent = MetaAgent::Create(meta_service_); std::string name; EXPECT_FALSE(agent->exist_collection(name)); name.assign("name"); EXPECT_FALSE(agent->exist_collection(name)); EXPECT_TRUE(agent->exist_collection(name)); } //// Valid URI // pb_meta.set_connection_uri("mysql://host:8080/connection_uri"); //{ // no index column // EXPECT_CALL(*meta_service_, create_collection(_, _)) // .WillOnce(Return(0)) // .RetiresOnSaturation(); // // auto agent = MetaAgent::Create(meta_service_); // int code = agent->create_collection(pb_meta, nullptr); // EXPECT_TRUE(code != 0); //} //{ // Set Column // auto pb_column = std::make_shared(); // pb_column->set_name("column"); // pb_column->mutable_parameters()->set("key", "10"); // pb_meta.append(pb_column); //} } TEST_F(MetaAgentTest, IntegrationTest) { ScopeFile database(TempFile()); std::string db_uri("sqlite://"); std::cout << "Create temporary file: " << database.file_ << std::endl; auto meta_service = MetaServiceBuilder::Create(db_uri.append(database)); auto agent = MetaAgent::Create(meta_service); { // Check Agent EXPECT_TRUE(agent); EXPECT_TRUE(agent->get_service()); EXPECT_EQ(agent->init(), 0); EXPECT_EQ(agent->start(), 0); } meta::CollectionBase create_param; { create_param.set_name("collection"); create_param.mutable_forward_columns()->push_back("forward1"); create_param.mutable_forward_columns()->push_back("forward2"); create_param.set_max_docs_per_segment(10); auto repo = std::make_shared(); repo->set_name("repo_name"); // Invalid URI repo->set_connection("invalid_connection"); repo->set_user("user"); repo->set_password("password"); repo->set_table_name("table_name"); create_param.set_repository(repo); } { // Test Empty Columns meta::CollectionMetaPtr meta; EXPECT_EQ(agent->create_collection(create_param, &meta), PROXIMA_BE_ERROR_CODE(EmptyColumns)); } { // Set Column 1 auto column = std::make_shared(); column->set_name("column1"); column->mutable_parameters()->set("key", "10"); create_param.append(column); } { // Test undefined data type meta::CollectionMetaPtr meta; EXPECT_EQ(agent->create_collection(create_param, &meta), PROXIMA_BE_ERROR_CODE(InvalidDataType)); create_param.mutable_index_columns()->clear(); auto column = std::make_shared(); column->set_name("column1"); column->set_data_type(DataTypes::VECTOR_INT8); column->mutable_parameters()->set("key", "10"); create_param.append(column); } { // Test Invalid URI meta::CollectionMetaPtr meta; EXPECT_EQ(agent->create_collection(create_param, &meta), PROXIMA_BE_ERROR_CODE(InvalidURI)); RepositoryHelper::Child(create_param.repository()) ->set_connection("mysql://host:8080/connection_uri"); } meta::CollectionMetaPtr meta; EXPECT_EQ(agent->create_collection(create_param, &meta), 0); std::cout << "Create collection" << std::endl; std::cout << " revision: " << meta->revision() << std::endl; std::cout << " uid: " << meta->uid() << std::endl; std::cout << " is_current: " << meta->is_current() << std::endl; std::cout << " readable: " << meta->readable() << std::endl; std::cout << " writable: " << meta->writable() << std::endl; std::cout << " Column: " << std::endl; auto column = meta->index_columns().begin(); std::cout << " uid: " << (*column)->uid() << std::endl; { CollectionBase update_param(create_param); update_param.repository()->set_name("updated"); meta::CollectionMetaPtr meta1; EXPECT_EQ(agent->update_collection(update_param, &meta1), 0); EXPECT_TRUE(meta1); EXPECT_EQ(meta1->revision(), 1); EXPECT_EQ(meta1->repository()->name(), "updated"); EXPECT_EQ(meta1->uid(), meta->uid()); auto left = *meta1->index_columns().begin(); auto right = *meta->index_columns().begin(); std::cout << " readable: " << meta1->readable() << std::endl; std::cout << " writable: " << meta1->writable() << std::endl; EXPECT_EQ(left->uid(), right->uid()); EXPECT_EQ(CollectionStatus::INITIALIZED, meta1->status()); } { // Test List Collection std::string collection("collections2"); CollectionMetaPtrList collections; int code = agent->get_collection_history(collection, &collections); EXPECT_TRUE(code != 0); EXPECT_EQ(collections.size(), 0); collection.assign("collection"); code = agent->get_collection_history(collection, &collections); EXPECT_EQ(code, 0); EXPECT_EQ(collections.size(), 2); collections.clear(); code = agent->list_collections(&collections); EXPECT_EQ(code, 0); EXPECT_EQ(collections.size(), 1); } { // Test update status std::string collection("collection"); EXPECT_EQ(agent->update_status(collection, CollectionStatus::SERVING), 0); auto current = agent->get_collection(collection); EXPECT_EQ(current->status(), CollectionStatus::SERVING); } { // Test enable_collection std::string collection("collection"); auto previous = agent->get_collection(collection); std::cout << previous->revision() << std::endl; // Test not exists revision EXPECT_TRUE(agent->enable_collection(collection, 3) != 0); // Updated revision EXPECT_EQ(agent->enable_collection(collection, 1), 0); auto current = agent->get_collection(collection); std::cout << current->revision() << std::endl; EXPECT_NE(previous->revision(), current->revision()); EXPECT_TRUE(current->writable()); EXPECT_TRUE(current->readable()); EXPECT_EQ(agent->enable_collection(collection, 0), 0); EXPECT_FALSE(current->writable()); EXPECT_FALSE(current->readable()); } { // Test suspend_collection_read and resume_collection_read std::string collection("collection"); EXPECT_EQ(agent->suspend_collection_read(collection), 0); auto current = agent->get_collection(collection); EXPECT_FALSE(current->readable()); EXPECT_EQ(agent->resume_collection_read(collection), 0); current = agent->get_collection(collection); EXPECT_TRUE(current->readable()); // Test does not exist collection collection.assign("abc"); EXPECT_NE(agent->suspend_collection_read(collection), 0); EXPECT_NE(agent->resume_collection_read(collection), 0); } { // Test suspend_collection_write and resume_collection_write std::string collection("collection"); EXPECT_EQ(agent->suspend_collection_write(collection), 0); auto current = agent->get_collection(collection); EXPECT_FALSE(current->writable()); EXPECT_EQ(agent->resume_collection_write(collection), 0); current = agent->get_collection(collection); EXPECT_TRUE(current->writable()); // Test does not exist collection collection.assign("abc"); EXPECT_NE(agent->suspend_collection_write(collection), 0); EXPECT_NE(agent->resume_collection_write(collection), 0); } { // Test exist_collection std::string collection("collection"); EXPECT_TRUE(agent->exist_collection(collection)); collection.assign("abc"); EXPECT_FALSE(agent->exist_collection(collection)); } { // Test Drop Collection std::string collection; int code = agent->delete_collection(collection); EXPECT_TRUE(code != 0); collection.assign("collection"); code = agent->delete_collection(collection); EXPECT_EQ(code, 0); CollectionMetaPtrList collections; code = agent->list_collections(&collections); EXPECT_EQ(code, 0); EXPECT_EQ(collections.size(), 0); collections.clear(); code = agent->get_collection_history(collection, &collections); EXPECT_TRUE(code != 0); EXPECT_EQ(collections.size(), 0); } { // Cleanup agent EXPECT_EQ(agent->stop(), 0); EXPECT_EQ(agent->cleanup(), 0); } } ================================================ FILE: tests/meta/meta_cache_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #include "meta/meta_cache.h" #include #include using namespace proxima::be; using namespace proxima::be::meta; TEST(MetaCacheTest, TestFunction) { MetaCache cache; EXPECT_TRUE(cache.append_column(nullptr) != 0); EXPECT_TRUE(cache.append_collection(nullptr) != 0); CollectionMeta meta; meta.set_name("name"); meta.set_uid("uid"); meta.mutable_forward_columns()->assign({"forward1", "forward2"}); meta.set_max_docs_per_segment(10); meta.set_revision(10); meta.set_status(CollectionStatus::SERVING); meta.set_current(false); CollectionImplPtr collection = std::make_shared(meta); cache.append_collection(collection); EXPECT_TRUE(cache.exist_collection(collection->name())); CollectionMetaPtrList collections; cache.get_collections(&collections); // Only list enabled collection ASSERT_EQ(collections.size(), 0); cache.get_collections(MetaCache::PassAllFilter, &collections); // List all collections ASSERT_EQ(collections.size(), 1); collections.clear(); // List collection with specific name cache.get_collections(collection->name(), &collections); EXPECT_EQ(collections.size(), 1); collections.clear(); cache.get_collections_by_repo("xxx", &collections); EXPECT_EQ(collections.size(), 0); // Only list enabled collection CollectionImplPtr current = cache.get_collection(collection->name()); EXPECT_TRUE(!current); meta.set_current(); meta.set_status(CollectionStatus::SERVING); current = std::make_shared(meta); // Append one enabled collection cache.append_collection(current); current.reset(); current = cache.get_collection(collection->name()); EXPECT_TRUE(current); collections.clear(); cache.get_collections(&collections); // Only list enabled collection EXPECT_EQ(collections.size(), 1); collections.clear(); cache.get_collections(MetaCache::PassAllFilter, &collections); // List all collections EXPECT_EQ(collections.size(), 2); cache.delete_collection(collection->name()); collections.clear(); cache.get_collections(MetaCache::PassAllFilter, &collections); // List all collections EXPECT_EQ(collections.size(), 0); // Test column cache.append_collection(current); collections.clear(); cache.get_collections(MetaCache::PassAllFilter, &collections); // List all collections EXPECT_EQ(collections.size(), 1); EXPECT_TRUE((*collections.begin())->is_current()); ColumnMeta column_meta; column_meta.set_name("name"); column_meta.set_index_type(IndexTypes::UNDEFINED); column_meta.set_data_type(DataTypes::UNDEFINED); ColumnImplPtr column = std::make_shared(column_meta); EXPECT_TRUE(cache.append_column(column) != 0); column->set_collection_uuid(current->uuid()); EXPECT_EQ(cache.append_column(column), 0); current.reset(); current = cache.get_collection(collection->name()); auto &columns = current->columns(); EXPECT_EQ(columns.size(), 1); DatabaseRepositoryMeta repo; repo.set_name("repo"); repo.set_user("user"); auto repo_ptr = std::make_shared( current->uid(), current->uuid(), repo); cache.append_repository(repo_ptr); collections.clear(); cache.get_collections_by_repo(repo.name(), &collections); EXPECT_EQ(collections.size(), 1); } ================================================ FILE: tests/meta/meta_service_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #include #include "common/uuid_helper.h" #include "meta/meta_service_builder.h" #include "temp_file_inl.h" using namespace proxima::be; using namespace proxima::be::meta; using namespace testing; class MetaServiceTest : public Test { public: // Sets up the test fixture. static void SetUpTestSuite() { database_ = TempFile(); std::string uri = "sqlite://" + database_; meta_ = MetaServiceBuilder::Create(uri); EXPECT_TRUE(meta_); EXPECT_EQ(meta_->init(), 0); EXPECT_EQ(meta_->start(), 0); } // Tears down the test fixture. static void TearDownTestSuite() { EXPECT_EQ(meta_->stop(), 0); EXPECT_EQ(meta_->cleanup(), 0); ailego::File::Delete(database_); } protected: static std::string database_; static MetaServicePtr meta_; }; std::string MetaServiceTest::database_; MetaServicePtr MetaServiceTest::meta_; TEST_F(MetaServiceTest, TestMetaServiceFunction) { auto meta_service = meta_; { // TEST Empty MetaService // Drop collection EXPECT_EQ(meta_service->drop_collection("xxx"), 0); // Test none exists collection auto collection = meta_service->get_collection("xxx", 0); EXPECT_FALSE(collection); // Test empty collections CollectionMetaPtrList collections; EXPECT_EQ(meta_service->get_collections(&collections), 0); EXPECT_TRUE(collections.empty()); // Test empty collections EXPECT_TRUE(meta_service->get_collections("xxx", &collections) != 0); EXPECT_TRUE(collections.empty()); // Test empty collections EXPECT_FALSE(meta_service->get_current_collection("xx")); // Test empty collections EXPECT_EQ(meta_service->get_latest_collections(&collections), 0); EXPECT_TRUE(collections.empty()); // Test empty collections EXPECT_EQ(meta_service->get_collections_by_repo("xxx", &collections), 0); EXPECT_TRUE(collections.empty()); // Test update status EXPECT_TRUE( meta_service->update_status("xxx", CollectionStatus::INITIALIZED) != 0); // Test update collection CollectionMetaPtr meta; CollectionBase param; EXPECT_TRUE(meta_service->update_collection(param, &meta) != 0); // Test has collection EXPECT_FALSE(meta_service->exist_collection("does not exist collection")); } { CollectionBase param; { param.set_name("name"); param.mutable_forward_columns()->assign({"forward1", "forward2"}); param.set_max_docs_per_segment(10); auto column1 = std::make_shared(); column1->set_name("column_name"); column1->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); column1->set_data_type(DataTypes::VECTOR_FP32); column1->mutable_parameters()->insert("abc", "abc"); param.append(column1); // For Issue 32264482, create collection with multi-columns auto column2 = std::make_shared(); column2->set_name("column_name_a"); column2->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); column2->set_data_type(DataTypes::VECTOR_FP32); column2->mutable_parameters()->insert("abc", "abc"); param.append(column2); auto db = std::make_shared(); db->set_name("db"); db->set_connection("mysql://host:1234/test_db"); db->set_user("user"); db->set_password("password"); db->set_table_name("table_name"); param.set_repository(db); } CollectionMetaPtr meta; EXPECT_EQ(meta_service->create_collection(param, &meta), 0); // Test has collection EXPECT_TRUE(meta_service->exist_collection(meta->name())); // Issue (32201692): meta should be updated, after create collection. EXPECT_EQ(meta->revision(), 0); EXPECT_TRUE(valid_uuid(meta->uid())); EXPECT_TRUE(meta->is_current()); auto collection = meta_service->get_collection(meta->name(), 0); ASSERT_TRUE(collection); EXPECT_TRUE(collection->readable()); EXPECT_TRUE(collection->writable()); collection = meta_service->get_current_collection(meta->name()); EXPECT_TRUE(collection); CollectionMetaPtrList collections; EXPECT_EQ(meta_service->get_collections(&collections), 0); EXPECT_FALSE(collections.empty()); EXPECT_EQ(collections.size(), 1); CollectionMeta update_param(*collection); update_param.set_uid("updated_uid"); EXPECT_EQ(meta_service->update_collection(update_param, &meta), 0); EXPECT_TRUE(meta->status() == CollectionStatus::INITIALIZED); collections.clear(); EXPECT_EQ(meta_service->get_collections(&collections), 0); EXPECT_FALSE(collections.empty()); EXPECT_EQ(collections.size(), 2); int enabled = 0, disabled = 0; for (auto &c : collections) { if (c->is_current()) { enabled++; } else { disabled++; } } EXPECT_EQ(enabled, 1); EXPECT_EQ(disabled, 1); EXPECT_EQ(meta_service->drop_collection(meta->name()), 0); collections.clear(); EXPECT_EQ(meta_service->get_collections(&collections), 0); EXPECT_TRUE(collections.empty()); EXPECT_FALSE(meta_service->exist_collection(meta->name())); // ------------------- Bug Fix ------------------------ // For issue: #32086561 // Test create - drop - create - get_collections_by_repo failed EXPECT_EQ(meta_service->create_collection(param, &meta), 0); EXPECT_EQ( meta_service->enable_collection(meta->name(), meta->revision(), true), 0); collections.clear(); collection = meta_service->get_current_collection(meta->name()); EXPECT_TRUE(collection); EXPECT_TRUE(collection->repository()); EXPECT_EQ(meta_service->get_collections_by_repo(meta->repository()->name(), &collections), 0); EXPECT_TRUE(!collections.empty()); EXPECT_EQ(meta_service->drop_collection(meta->name()), 0); // For Issue: #32422770 EXPECT_EQ(meta_service->create_collection(param, &meta), 0); { // Test name changed CollectionMeta updated_meta(*meta); updated_meta.set_name("abc"); EXPECT_TRUE(meta_service->update_collection(updated_meta, &meta) != 0); } { // Test column changed CollectionMeta updated_meta(*meta); auto c = *updated_meta.mutable_index_columns()->begin(); c->set_data_type(DataTypes::VECTOR_INT8); EXPECT_TRUE(meta_service->update_collection(updated_meta, &meta) != 0); } { // Test name of column changed, uid should be updated CollectionMeta updated_meta(*meta); auto c = *updated_meta.mutable_index_columns()->begin(); c->set_name("updated_name"); EXPECT_TRUE(meta_service->update_collection(updated_meta, &meta) == 0); auto origin_column = *meta->mutable_index_columns()->begin(); EXPECT_TRUE(c->uid() != origin_column->uid()); } collections.clear(); } } void create_collection_meta(const std::string &name, CollectionBase *meta) { meta->set_name(name); meta->mutable_forward_columns()->assign({"forward1", "forward2"}); meta->set_max_docs_per_segment(10); auto column1 = std::make_shared(); column1->set_name("column_name"); column1->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); column1->set_data_type(DataTypes::VECTOR_FP32); column1->mutable_parameters()->insert("abc", "abc"); meta->append(column1); auto db = std::make_shared(); db->set_name("db"); db->set_connection("mysql://host:1234/test_db"); db->set_user("user"); db->set_password("password"); db->set_table_name("table_name"); meta->set_repository(db); } TEST_F(MetaServiceTest, TestMultiThreads) { auto meta_service = meta_; ailego::ThreadPool thread_pool(10, false); // test multithread insert records for (size_t i = 0; i < 5; i++) { thread_pool.execute( [&meta_service](int i) { for (int j = 0; j < 10; j++) { CollectionBase meta; std::string name = "name_" + std::to_string(j) + "_thread_" + std::to_string(i); create_collection_meta(name, &meta); int code = meta_service->create_collection(meta, nullptr); EXPECT_EQ(code, 0); } }, i); } thread_pool.wait_finish(); } ================================================ FILE: tests/meta/meta_store_factory_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #include "meta/meta_store_factory.h" #include #include using namespace proxima::be; using namespace proxima::be::meta; namespace proxima { namespace be { namespace meta { class TestStore : public MetaStore { //! initialize metastore int initialize(const ailego::Uri *uri) override { return 0; } //! cleanup int cleanup() override { return 0; } //! Create the collection int create_collection(const CollectionObject &collection) override { return 0; } //! Update collection declaration int update_collection(const CollectionObject &collection) override { return 0; } //! Delete collection int delete_collection(const std::string &name) override { return 0; } //! Delete collection int delete_collection_by_uuid(const std::string &name) override { return 0; } //! Retrieve all collections int list_collections(CollectionAllocator allocator) const override { return 0; } /** CRUD of ColumnMeta **/ //! Create column int create_column(const ColumnObject &column) override { return 0; } //! Delete columns int delete_columns_by_uid(const std::string &uid) override { return 0; } //! Delete columns int delete_columns_by_uuid(const std::string &uuid) override { return 0; } //! Retrieve all collections int list_columns(ColumnAllocator allocator) const override { return 0; } //! Create repository int create_repository(const DatabaseRepositoryObject &repository) override { return 0; } //! Delete repositories int delete_repositories_by_uid(const std::string &uid) override { return 0; } //! Delete repositories int delete_repositories_by_uuid(const std::string &uuid) override { return 0; } //! Retrieve all repositories int list_repositories(DatabaseRepositoryAllocator allocator) const override { return 0; } //! Flush all changes to storage int flush() const override { return 0; } }; META_FACTORY_REGISTER_INSTANCE_ALIAS(test, TestStore); } // namespace meta } // namespace be } // namespace proxima TEST(MetaStoreFactoryTest, TestCreate) { ailego::Uri uri; auto ptr = MetaStoreFactory::Instance().create("test", &uri); ASSERT_TRUE(ptr); ptr = MetaStoreFactory::Instance().create("test1", &uri); ASSERT_FALSE(ptr); ptr = MetaStoreFactory::Instance().create("Test", &uri); ASSERT_FALSE(ptr); } ================================================ FILE: tests/meta/mock_meta_service.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #pragma once #include #include "meta/meta_service.h" using namespace proxima::be; using namespace proxima::be::meta; using namespace ::testing; // import ::testing::* //! Predefined class class MockMetaService; //! Alias for MockMetaService using MockMetaServicePtr = std::shared_ptr; //! Mock MetaService Interface class MockMetaService : public MetaService { public: // Destructor ~MockMetaService() override = default; public: // Interfaces in Service MOCK_METHOD(int, init_impl, (), (override)); MOCK_METHOD(int, cleanup_impl, (), (override)); MOCK_METHOD(int, start_impl, (), (override)); MOCK_METHOD(int, stop_impl, (), (override)); public: // Interfaces in MetaService //! Reload meta service MOCK_METHOD(int, reload, (), (override)); //! Create collection and columns MOCK_METHOD(int, create_collection, (const CollectionBase ¶m, CollectionMetaPtr *collection), (override)); //! Update collection and columns, increase revision and copy a new collection MOCK_METHOD(int, update_collection, (const CollectionBase ¶m, CollectionMetaPtr *collection), (override)); //! Enable collection MOCK_METHOD(int, enable_collection, (const std::string &collection, uint32_t revision, bool enable), (override)); //! Update the status of current used collection MOCK_METHOD(int, update_status, (const std::string &collection_name, CollectionStatus status), (override)); //! Suspend reading requests of collection MOCK_METHOD(int, suspend_collection_read, (const std::string &collection_name), (override)); //! Resume reading requests of collection MOCK_METHOD(int, resume_collection_read, (const std::string &collection_name), (override)); //! Suspend writing requests of collection MOCK_METHOD(int, suspend_collection_write, (const std::string &collection_name), (override)); //! Resume writing requests of collection MOCK_METHOD(int, resume_collection_write, (const std::string &collection_name), (override)); //! Drop collection MOCK_METHOD(int, drop_collection, (const std::string &name), (override)); //! Retrieve latest version of collection MOCK_METHOD(CollectionMetaPtr, get_current_collection, (const std::string &name), (const, override)); //! Retrieve latest version of collections MOCK_METHOD(int, get_latest_collections, (CollectionMetaPtrList * collections), (const, override)); //! Retrieve all of collections MOCK_METHOD(int, get_collections, (CollectionMetaPtrList * collections), (const, override)); //! Retrieve collections with specific repository MOCK_METHOD(int, get_collections_by_repo, (const std::string &repository, CollectionMetaPtrList *collections), (const, override)); //! Retrieve collections with specific collection name MOCK_METHOD(int, get_collections, (const std::string &collection, CollectionMetaPtrList *collections), (const, override)); //! Retrieve collection MOCK_METHOD(CollectionMetaPtr, get_collection, (const std::string &collection, uint64_t revision), (const, override)); //! Check collection exists MOCK_METHOD(bool, exist_collection, (const std::string &collection), (const, override)); }; // end of MetaService ================================================ FILE: tests/meta/sqlite_meta_store_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "meta/sqlite/sqlite_meta_store.h" #include #include "meta/meta_impl.h" #include "temp_file_inl.h" using namespace proxima::be; using namespace proxima::be::meta; using namespace proxima::be::meta::sqlite; TEST(SqliteMetaStoreTest, TestInitialize) { SQLiteMetaStore store; ScopeFile database(TempFile()); std::string database_uri("sqlite://"); database_uri.append(database); ailego::Uri uri; // Invalid uri ailego::Uri::Parse("sqlite:./test.sqlite", &uri); // Test Init and Cleanup EXPECT_EQ(store.initialize(&uri), PROXIMA_BE_ERROR_CODE(RuntimeError)); ailego::Uri::Parse(database_uri, &uri); // Test Init and Cleanup EXPECT_EQ(store.initialize(&uri), 0); EXPECT_EQ(store.cleanup(), 0); // Double Init EXPECT_EQ(store.initialize(&uri), 0); EXPECT_EQ(store.initialize(&uri), 0); } TEST(SqliteMetaStoreTest, TestCollectionFunction) { SQLiteMetaStore store; ScopeFile database(TempFile()); std::string database_uri("sqlite://"); ailego::Uri uri(database_uri.append(database)); // Init store EXPECT_EQ(store.initialize(&uri), 0); CollectionMeta meta; meta.set_name("name"); meta.set_uid("uid"); meta.mutable_forward_columns()->assign({"forward1", "forward2"}); meta.set_max_docs_per_segment(10); meta.set_revision(10); meta.set_status(CollectionStatus::INITIALIZED); meta.set_current(false); CollectionImplPtr collection = std::make_shared(meta); EXPECT_EQ(store.create_collection(*collection), 0); CollectionImplPtr collection_record = std::make_shared(); int row_count = 0; EXPECT_EQ(store.list_collections( [&collection_record, &row_count]() -> CollectionObject * { row_count++; return collection_record.get(); }), 0); EXPECT_EQ(row_count, 1); EXPECT_EQ(meta.max_docs_per_segment(), collection_record->max_docs_per_segment()); EXPECT_EQ(meta.revision(), collection_record->revision()); { // Test update collection collection_record->set_status(20); collection_record->set_uid("updated_uid"); EXPECT_EQ(store.update_collection(*collection_record), 0); row_count = 0; CollectionImplPtr collection_updated = std::make_shared(); EXPECT_EQ(store.list_collections( [&collection_updated, &row_count]() -> CollectionObject * { row_count++; return collection_updated.get(); }), 0); EXPECT_EQ(collection_record->uid(), collection_updated->uid()); EXPECT_EQ(collection_record->status(), collection_updated->status()); EXPECT_EQ(collection_record->uuid(), collection_updated->uuid()); EXPECT_EQ(collection_updated->status(), 20); } { // Test Delete Collection CollectionImplPtr collection_insert = std::make_shared(meta); EXPECT_EQ(store.create_collection(*collection_insert), 0); CollectionImplPtr fetch_collection = std::make_shared(); row_count = 0; EXPECT_EQ(store.list_collections( [&fetch_collection, &row_count]() -> CollectionObject * { row_count++; return fetch_collection.get(); }), 0); EXPECT_EQ(row_count, 2); // Delete by uuid EXPECT_EQ(store.delete_collection_by_uuid(collection_insert->uuid()), 0); row_count = 0; EXPECT_EQ(store.list_collections( [&fetch_collection, &row_count]() -> CollectionObject * { row_count++; return fetch_collection.get(); }), 0); EXPECT_EQ(row_count, 1); // Delete by name EXPECT_EQ(store.delete_collection(collection_insert->name()), 0); row_count = 0; EXPECT_EQ(store.list_collections( [&fetch_collection, &row_count]() -> CollectionObject * { row_count++; return fetch_collection.get(); }), 0); EXPECT_EQ(row_count, 0); } } TEST(SqliteMetaStoreTest, TestColumnFunction) { SQLiteMetaStore store; ScopeFile database(TempFile()); std::string database_uri("sqlite://"); ailego::Uri uri(database_uri.append(database)); // Init store EXPECT_EQ(store.initialize(&uri), 0); ColumnMeta meta; meta.set_name("name"); meta.set_data_type(DataTypes::VECTOR_BINARY64); meta.set_index_type(IndexTypes::UNDEFINED); meta.mutable_parameters()->insert("abc", "abc"); ColumnImplPtr column = std::make_shared("uid", "uuid", meta); EXPECT_EQ(store.create_column(*column), 0); EXPECT_EQ(store.delete_columns_by_uid("abc"), 0); EXPECT_EQ(store.delete_columns_by_uuid("abc"), 0); { ColumnImplPtr column_record = std::make_shared(); int row_count = 0; EXPECT_EQ( store.list_columns([&column_record, &row_count]() -> ColumnObject * { row_count++; return column_record.get(); }), 0); EXPECT_EQ(row_count, 1); EXPECT_EQ(column_record->collection_uid(), column->collection_uid()); EXPECT_EQ(column_record->collection_uuid(), column->collection_uuid()); EXPECT_EQ(store.delete_columns_by_uuid(column->collection_uuid()), 0); row_count = 0; EXPECT_EQ( store.list_columns([&column_record, &row_count]() -> ColumnObject * { row_count++; return column_record.get(); }), 0); EXPECT_EQ(row_count, 0); EXPECT_EQ(store.create_column(*column), 0); EXPECT_EQ(store.delete_columns_by_uid(column->collection_uid()), 0); row_count = 0; EXPECT_EQ( store.list_columns([&column_record, &row_count]() -> ColumnObject * { row_count++; return column_record.get(); }), 0); EXPECT_EQ(row_count, 0); } } TEST(SqliteMetaStoreTest, TestRepositoryFunction) { SQLiteMetaStore store; ScopeFile database(TempFile()); std::string database_uri("sqlite://"); ailego::Uri uri(database_uri.append(database)); // Init store EXPECT_EQ(store.initialize(&uri), 0); DatabaseRepositoryMeta meta; meta.set_name("repo_name"); meta.set_user("user"); meta.set_password("password"); meta.set_connection("invalid_uri"); meta.set_table_name("table_name"); auto repo = std::make_shared(meta); EXPECT_FALSE(repo->collection_uid().empty()); EXPECT_FALSE(repo->collection_uuid().empty()); int row_count = 0; { // Test Create and List and Drop by uid EXPECT_EQ(store.create_repository(*repo), 0); auto listed_repo = std::make_shared(); EXPECT_EQ(store.list_repositories( [&listed_repo, &row_count]() -> DatabaseRepositoryObject * { row_count++; return listed_repo.get(); }), 0); // Test List EXPECT_EQ(row_count, 1); EXPECT_EQ(repo->name(), listed_repo->name()); EXPECT_EQ(repo->collection_uid(), listed_repo->collection_uid()); EXPECT_EQ(repo->collection_uuid(), listed_repo->collection_uuid()); EXPECT_EQ(repo->table(), listed_repo->table()); EXPECT_EQ(repo->connection(), listed_repo->connection()); EXPECT_EQ(repo->user(), listed_repo->user()); EXPECT_EQ(repo->password(), listed_repo->password()); EXPECT_EQ(store.delete_repositories_by_uid(repo->collection_uid()), 0); row_count = 0; listed_repo = std::make_shared(); EXPECT_EQ(store.list_repositories( [&listed_repo, &row_count]() -> DatabaseRepositoryObject * { row_count++; return listed_repo.get(); }), 0); // Test List EXPECT_EQ(row_count, 0); } { // Test Create and List and Drop by uuid EXPECT_EQ(store.create_repository(*repo), 0); auto listed_repo = std::make_shared(); EXPECT_EQ(store.list_repositories( [&listed_repo, &row_count]() -> DatabaseRepositoryObject * { row_count++; return listed_repo.get(); }), 0); // Test List EXPECT_EQ(row_count, 1); EXPECT_EQ(store.delete_repositories_by_uuid(repo->collection_uuid()), 0); row_count = 0; EXPECT_EQ(store.list_repositories( [&listed_repo, &row_count]() -> DatabaseRepositoryObject * { row_count++; return listed_repo.get(); }), 0); // Test List EXPECT_EQ(row_count, 0); } { // Test Create and List and Drop by uuid EXPECT_EQ(store.create_repository(*repo), 0); auto listed_repo = std::make_shared(); EXPECT_EQ(store.list_repositories( [&listed_repo, &row_count]() -> DatabaseRepositoryObject * { row_count++; return listed_repo.get(); }), 0); // Test List EXPECT_EQ(row_count, 1); EXPECT_EQ(store.delete_repositories_by_uuid(repo->collection_uuid()), 0); row_count = 0; EXPECT_EQ(store.list_repositories( [&listed_repo, &row_count]() -> DatabaseRepositoryObject * { row_count++; return listed_repo.get(); }), 0); // Test List EXPECT_EQ(row_count, 0); } { // Create multi repositories EXPECT_EQ(store.create_repository(*repo), 0); for (int i = 0; i < 9; i++) { auto create_repo = std::make_shared(meta); create_repo->set_collection_uuid(repo->collection_uuid()); EXPECT_EQ(store.create_repository(*create_repo), 0); } row_count = 0; auto listed_repo = std::make_shared(); EXPECT_EQ(store.list_repositories( [&listed_repo, &row_count]() -> DatabaseRepositoryObject * { row_count++; return listed_repo.get(); }), 0); // Test List EXPECT_EQ(row_count, 10); EXPECT_EQ(store.delete_repositories_by_uid(repo->collection_uid()), 0); row_count = 0; EXPECT_EQ(store.list_repositories( [&listed_repo, &row_count]() -> DatabaseRepositoryObject * { row_count++; return listed_repo.get(); }), 0); // Test List EXPECT_EQ(row_count, 9); EXPECT_EQ(store.delete_repositories_by_uuid(repo->collection_uuid()), 0); row_count = 0; EXPECT_EQ(store.list_repositories( [&listed_repo, &row_count]() -> DatabaseRepositoryObject * { row_count++; return listed_repo.get(); }), 0); // Test List EXPECT_EQ(row_count, 0); } { // Test Create and List and Drop by uid and uuid EXPECT_EQ(store.create_repository(*repo), 0); auto listed_repo = std::make_shared(); EXPECT_EQ(store.list_repositories( [&listed_repo, &row_count]() -> DatabaseRepositoryObject * { row_count++; return listed_repo.get(); }), 0); // Test List EXPECT_EQ(row_count, 1); // Invalid arguments for delete_repositories_by_* EXPECT_EQ(store.delete_repositories_by_uuid("uuid"), 0); EXPECT_EQ(store.delete_repositories_by_uid("uid"), 0); row_count = 0; EXPECT_EQ(store.list_repositories( [&listed_repo, &row_count]() -> DatabaseRepositoryObject * { row_count++; return listed_repo.get(); }), 0); // Test List EXPECT_EQ(row_count, 1); } } ================================================ FILE: tests/meta/statement_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include #include "meta/sqlite/sqlite_statement.h" #include "temp_file_inl.h" using namespace proxima::be::meta::sqlite; TEST(StatementTest, TestCreateTableCollection) { ScopeFile database(TempFile()); Statement statement(database.file_, "CREATE TABLE IF NOT EXISTS columns ( \n" " id INTEGER PRIMARY KEY AUTOINCREMENT, \n" " coll_uid TEXT NOT NULL, \n" " coll_uuid TEXT NOT NULL UNIQUE, \n" " name TEXT NOT NULL, \n" " alias TEXT NOT NULL, \n" " index_type INTEGER, \n" " data_type INTEGER, \n" " parameters TEXT DEFAULT '' \n" ");"); ASSERT_EQ(statement.initialize(), 0); // ASSERT_EQ(statement.exec(), 0); ASSERT_EQ(statement.cleanup(), 0); } TEST(StatementTest, TestCreateTable) { ScopeFile database(TempFile()); Statement statement(database.file_, "CREATE TABLE IF NOT EXISTS columns ( \n" " id INTEGER PRIMARY KEY AUTOINCREMENT, \n" " coll_uid TEXT NOT NULL, \n" " coll_uuid TEXT NOT NULL UNIQUE, \n" " name TEXT NOT NULL, \n" " alias TEXT NOT NULL, \n" " index_type INTEGER, \n" " data_type INTEGER, \n" " parameters TEXT DEFAULT '' \n" ");"); ASSERT_EQ(statement.initialize(), 0); ASSERT_EQ(statement.exec(), 0); { // Can't compile .tables; ASSERT_TRUE(statement.prepare_sql(".tables") != 0); // Wrong table name ASSERT_TRUE(statement.prepare_sql("select * from columns1;") != 0); // Can't exec sql ASSERT_TRUE(statement.exec() != 0); } { ASSERT_EQ(statement.prepare_sql("select * from columns;"), 0); ASSERT_EQ(statement.exec(), 0); } { std::string insert( "INSERT INTO columns(coll_uid, coll_uuid, name, alias, index_type, " "data_type, " "parameters) VALUES('uid', ?1, 'name', 'alias', 1, 2, 'params');"); ASSERT_EQ(statement.prepare_sql(insert), 0); ASSERT_EQ(statement.exec([](sqlite3_stmt *stmt) -> int { sqlite3_bind_text(stmt, 1, "uuid", 4, nullptr); return 0; }), 0); } { std::string insert("update columns set coll_uid = ?1 where name=?2;"); ASSERT_EQ(statement.prepare_sql(insert), 0); ASSERT_EQ(statement.exec([](sqlite3_stmt *stmt) -> int { sqlite3_bind_text(stmt, 1, "uuid1", 5, nullptr); sqlite3_bind_text(stmt, 2, "name", 4, nullptr); return 0; }), 0); } { ASSERT_EQ(statement.prepare_sql("select * from columns;"), 0); int row_count = 0, column_count = 0; int64_t id = 0, data_type = 0; std::string uuid; ASSERT_EQ(statement.exec(nullptr, [&row_count, &column_count, &id, &data_type, &uuid](sqlite3_stmt *stmt) -> int { row_count++; column_count = sqlite3_column_count(stmt); id = sqlite3_column_int64(stmt, 0); data_type = sqlite3_column_int(stmt, 6); uuid.assign(reinterpret_cast( sqlite3_column_text(stmt, 2))); return 0; }), 0); ASSERT_EQ(row_count, 1); ASSERT_EQ(column_count, 8); ASSERT_EQ(id, 1); ASSERT_EQ(data_type, 2); ASSERT_EQ(uuid, "uuid"); } ASSERT_EQ(statement.cleanup(), 0); // Double cleanup ASSERT_EQ(statement.cleanup(), 0); } ================================================ FILE: tests/meta/temp_file_inl.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #pragma once #include #include struct ScopeFile { ScopeFile(const std::string &file, bool open = false) : file_(file) { if (open) { ; } } ~ScopeFile() { ailego::File::Delete(file_); } operator std::string() { return file_; } operator std::string &() { return file_; } std::string file_{}; }; inline std::string TempFile() { std::string work_path; ailego::FileHelper::GetWorkingDirectory(&work_path); work_path.append("/meta.sqlite"); return work_path; } ================================================ FILE: tests/query/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Feb 2021 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) if(APPLE) set(APPLE_FRAMEWORK_LIBS -framework CoreFoundation -framework CoreGraphics -framework CoreData -framework CoreText -framework Security -framework Foundation -Wl,-U,_MallocExtension_ReleaseFreeMemory -Wl,-U,_ProfilerStart -Wl,-U,_ProfilerStop -Wl,-U,_RegisterThriftProtocol ) endif() file(GLOB ALL_TEST_SRCS *_test.cc) foreach (CC_SRCS ${ALL_TEST_SRCS}) get_filename_component(CC_TARGET ${CC_SRCS} NAME_WE) cc_gmock( NAME ${CC_TARGET} STRICT LIBS proxima_be_admin proxima_be_agent proxima_be_query proxima_be_index proxima_be_meta proxima_be_common proxima_be_proto proxima brpc ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} SRCS ${CC_SRCS} INCS .. ../../src LDFLAGS ${APPLE_FRAMEWORK_LIBS} ) set_target_properties(${CC_TARGET} PROPERTIES INSTALL_RPATH ${LIB_PATH}) cc_test_suite(proxima_be_query ${CC_TARGET}) endforeach () ================================================ FILE: tests/query/bthread_queue_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "query/executor/bthread_queue.h" #include #include #include #include "common/error_code.h" #include "task-inl.h" using namespace proxima::be::query; using namespace proxima::be::query::test; const std::string kName("task name"); const int kCode = 0; const int kMillSeconds = 1000; TEST(BThreadQueueTest, TestDefaultContructor) { BThreadQueue queue; ASSERT_EQ(queue.start(), 0); ASSERT_TRUE(queue.started()); ASSERT_EQ(queue.stop(), 0); ASSERT_EQ(queue.join(), 0); ASSERT_FALSE(queue.started()); } TEST(BThreadQueueTest, TestPutOperation) { BThreadQueue queue; ASSERT_EQ(queue.start(), 0); ASSERT_TRUE(queue.started()); TaskPtr task = CreateTask(kName, kCode, kMillSeconds); ASSERT_EQ(queue.put(task), 0); ASSERT_TRUE(task->wait_finish()); ASSERT_EQ(queue.stop(), 0); ASSERT_EQ(queue.join(), 0); ASSERT_FALSE(queue.started()); } TEST(BThreadQueueTest, TestFalseOperation) { BThreadQueue queue; ASSERT_EQ(queue.start(), 0); ASSERT_TRUE(queue.started()); TaskPtr task = CreateTask(kName, kCode, kMillSeconds); ASSERT_TRUE(queue.start() != 0); ASSERT_TRUE(queue.join() != 0); ASSERT_EQ(queue.put(task), 0); // Task should sleep for 100ms, ASSERT_TRUE(static_cast(task->status()) >= static_cast(Task::Status::SCHEDULED)); ASSERT_EQ(queue.stop(), 0); ASSERT_TRUE(queue.start() != 0); ASSERT_EQ(queue.join(), 0); // Can't enqueue task ASSERT_EQ(queue.put(task), PROXIMA_BE_ERROR_CODE(RuntimeError)); ASSERT_FALSE(queue.started()); } ================================================ FILE: tests/query/equal_query_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #include "query/equal_query.h" #include #include #include "index/mock_index_service.h" // for MockIndexService #include "index/mock_segment.h" // for MockSegment #include "meta/mock_meta_service.h" // for MockMetaService #include "mock_executor.h" // for MockExecutor using GetDocumentRequest = proxima::be::proto::GetDocumentRequest; using GetDocumentResponse = proxima::be::proto::GetDocumentResponse; class EqualQueryTest : public Test { protected: // Sets up the test fixture. void SetUp() override { init_request(); init_response(); } // Tears down the test fixture. void TearDown() override { cleanup_request(); cleanup_response(); } private: void init_request() { request_ = new (std::nothrow) GetDocumentRequest(); request_->set_collection_name(collection_); request_->set_debug_mode(false); request_->set_primary_key(1); } void init_response() { response_ = new (std::nothrow) GetDocumentResponse(); } template void delete_pointer_if(Pointer *ptr) { delete ptr; ptr = nullptr; } void cleanup_request() { delete_pointer_if(request_); } void cleanup_response() { delete_pointer_if(response_); } protected: GetDocumentRequest *request_{nullptr}; GetDocumentResponse *response_{nullptr}; std::string collection_{"unittest"}; }; TEST_F(EqualQueryTest, TestBaseFunctional) { // Test invalid params auto query = std::make_shared(0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); EXPECT_EQ(query->mode(), IOMode::READONLY); EXPECT_EQ(query->type(), QueryType::EQUAL); EXPECT_EQ(query->id(), 0); } TEST_F(EqualQueryTest, TestValidate) { auto executor = std::make_shared(); auto meta_service = std::make_shared(); auto index_service = std::make_shared(); auto meta = std::make_shared(meta_service); // Test invalid params auto query = std::make_shared( 0, nullptr, index_service, meta, executor, std::make_shared(false), response_); EXPECT_TRUE(query->validate() != 0); query.reset(new (std::nothrow) EqualQuery( 0, request_, index_service, meta, nullptr, std::make_shared(false), response_)); EXPECT_TRUE(query->validate() != 0); // Return 0, with invalid collection meta EXPECT_CALL(*meta_service, get_current_collection(_)) .WillOnce(Invoke( [](const std::string &) -> CollectionMetaPtr { return nullptr; })) .RetiresOnSaturation(); // success query.reset(new (std::nothrow) EqualQuery( 0, request_, index_service, meta, executor, std::make_shared(false), nullptr)); EXPECT_TRUE(query->validate() != 0); CollectionMeta collection_meta; collection_meta.mutable_forward_columns()->push_back("forward1"); collection_meta.mutable_forward_columns()->push_back("forward2"); auto column1 = std::make_shared(); collection_meta.append(column1); CollectionImplPtr collection = std::make_shared(collection_meta); // Return 0, with invalid collection meta EXPECT_CALL(*meta_service, get_current_collection(_)) .WillOnce(Invoke( [](const std::string &) -> CollectionMetaPtr { return nullptr; })) .RetiresOnSaturation(); // success // Set all right arguments query.reset(new (std::nothrow) EqualQuery( 0, request_, index_service, meta, executor, std::make_shared(false), response_)); // Can't valid column from meta wrapper EXPECT_TRUE(query->validate() != 0); // Return collection EXPECT_CALL(*meta_service, get_current_collection("unittest")) .WillOnce(Invoke([&collection](const std::string &) -> CollectionMetaPtr { return collection->meta(); })) .RetiresOnSaturation(); // success EXPECT_EQ(query->validate(), 0); } TEST_F(EqualQueryTest, TestPrepare) { auto executor = std::make_shared(); auto meta_service = std::make_shared(); auto index_service = std::make_shared(); auto meta = std::make_shared(meta_service); EXPECT_CALL(*index_service, list_segments(collection_, _)) .WillOnce(Return(1)) .WillOnce(Return(0)) // Success but no available segments .RetiresOnSaturation(); auto query = std::make_shared( 0, request_, index_service, meta, executor, std::make_shared(false), response_); EXPECT_TRUE(query->prepare() != 0); EXPECT_TRUE(query->prepare() != 0); } TEST_F(EqualQueryTest, TestEvaluate) { auto executor = std::make_shared(); auto meta_service = std::make_shared(); auto index_service = std::make_shared(); auto meta = std::make_shared(meta_service); auto segment = std::make_shared(); EXPECT_CALL(*index_service, list_segments(_, _)) .WillOnce(Invoke([&segment](const std::string &, index::SegmentPtrList *segments) -> int { segments->push_back(segment); return 0; })) .RetiresOnSaturation(); CollectionImplPtr collection_impl = nullptr; { // Init collection CollectionMeta cmeta; cmeta.mutable_forward_columns()->push_back("forward1"); cmeta.mutable_forward_columns()->push_back("forward2"); cmeta.set_revision(10); collection_impl.reset(new CollectionImpl(cmeta)); } EXPECT_CALL(*meta_service, get_collection(_, _)) .WillRepeatedly( Invoke([this, &collection_impl](const std::string &collection, uint64_t revision) { EXPECT_EQ(collection_, collection); EXPECT_EQ(revision, 10); return collection_impl->meta(); })) .RetiresOnSaturation(); auto query = std::make_shared( 0, request_, index_service, meta, executor, std::make_shared(false), response_); EXPECT_EQ(query->prepare(), 0); { // evaluate failed with fake execute EXPECT_CALL(*executor, execute_tasks(_)) .WillOnce(Return(0)) .RetiresOnSaturation(); // Success, but with no results EXPECT_EQ(query->evaluate(), 0); } { // Evaluate success, but no enough values // Execute task EXPECT_CALL(*executor, execute_tasks(_)) .WillOnce(Invoke([](const TaskPtrList &tasks) { for (auto &task : tasks) { task->status(Task::Status::SCHEDULED); task->run(); } return 0; })) // Fake Execute .RetiresOnSaturation(); // Set results EXPECT_CALL(*segment, kv_search(_, _)) .WillOnce(Invoke([](uint64_t primary_key, QueryResult *result) { EXPECT_EQ(primary_key, 1); result->primary_key = 1; result->revision = 10; return 0; })) .RetiresOnSaturation(); // Expect mismatch error EXPECT_EQ(query->evaluate(), PROXIMA_BE_ERROR_CODE(MismatchedForward)); } response_->Clear(); { // Test serialize EXPECT_CALL(*executor, execute_tasks(_)) .WillOnce(Invoke([](const TaskPtrList &tasks) { for (auto &task : tasks) { task->status(Task::Status::SCHEDULED); task->run(); } return 0; })) // Fake Execute .RetiresOnSaturation(); // Set results EXPECT_CALL(*segment, kv_search(_, _)) .WillOnce(Invoke([](uint64_t primary_key, QueryResult *result) { EXPECT_EQ(primary_key, 1); result->primary_key = 1U; result->lsn = 1U; result->revision = 10; result->score = 0.95f; proxima::be::proto::GenericValueList values; auto value = values.add_values(); value->set_int32_value(10); value = values.add_values(); value->set_string_value("strvalue"); // Forward result->forward_data.assign(values.SerializeAsString()); return 0; })) .RetiresOnSaturation(); // Expect 0 EXPECT_EQ(query->evaluate(), 0); EXPECT_EQ(response_->document().primary_key(), 1U); EXPECT_EQ(response_->document().forward_column_values_size(), 2); auto &kv = response_->document().forward_column_values(0); EXPECT_EQ(kv.key(), "forward1"); EXPECT_EQ(kv.value().int32_value(), 10); auto &kv1 = response_->document().forward_column_values(1); EXPECT_EQ(kv1.key(), "forward2"); EXPECT_EQ(kv1.value().string_value(), "strvalue"); } response_->Clear(); } TEST_F(EqualQueryTest, TestFinalize) { auto executor = std::make_shared(); auto meta_service = std::make_shared(); auto index_service = std::make_shared(); auto meta = std::make_shared(meta_service); auto query = std::make_shared( 0, request_, index_service, meta, executor, std::make_shared(false), response_); EXPECT_EQ(query->finalize(), 0); } ================================================ FILE: tests/query/equal_task_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #include "query/equal_task.h" #include #include "index/mock_segment.h" // for MockSegment #include "mock_query_context.h" // for Mock*Context TEST(EqualTaskTest, TestTaskRun) { { // Test Invalid arguments MockEqualQueryContext context; EqualTask task(nullptr, &context); ASSERT_TRUE(task.run() != 0); EqualTask task1(nullptr, nullptr); ASSERT_TRUE(task1.run() != 0); EqualTask task2(std::make_shared(), nullptr); ASSERT_TRUE(task2.run() != 0); } { MockEqualQueryContext context; EXPECT_CALL(context, primary_key()).WillRepeatedly(Return(1u)); auto segment = std::make_shared(); { // Failed EXPECT_CALL(*segment, kv_search(_, _)) .WillOnce(Return(1)) .RetiresOnSaturation(); EqualTask task(segment, &context); task.status(Task::Status::SCHEDULED); EXPECT_EQ(task.run(), 1); EXPECT_EQ(task.exit_code(), 1); } { EXPECT_CALL(*segment, kv_search(_, _)) .WillOnce(Return(0)) .RetiresOnSaturation(); EqualTask task(segment, &context); task.status(Task::Status::SCHEDULED); EXPECT_EQ(task.run(), 0); EXPECT_EQ(task.exit_code(), 0); EXPECT_TRUE(task.wait_finish()); EXPECT_TRUE(task.finished()); // EXPECT_TRUE(task.forward()); } { EXPECT_CALL(*segment, kv_search(_, _)) .WillOnce(Invoke([](uint64_t primary_key, QueryResult *result) { EXPECT_EQ(primary_key, 1); result->primary_key = 1; result->revision = 2; return 0; })) .RetiresOnSaturation(); EqualTask task(segment, &context); task.status(Task::Status::SCHEDULED); EXPECT_EQ(task.run(), 0); EXPECT_EQ(task.exit_code(), 0); EXPECT_TRUE(task.wait_finish()); EXPECT_TRUE(task.finished()); EXPECT_EQ(task.hit(), 1); EXPECT_EQ(task.forward().primary_key, 1); EXPECT_EQ(task.forward().revision, 2); } } } ================================================ FILE: tests/query/knn_query_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #include "query/knn_query.h" #include #include #include "index/mock_index_service.h" // for MockIndexService #include "index/mock_segment.h" // for MockSegment #include "meta/mock_meta_service.h" // for MockMetaService #include "mock_executor.h" // for MockExecutor #include "mock_query_context.h" // for Mock*Context using QueryRequest = proxima::be::proto::QueryRequest; using QueryResponse = proxima::be::proto::QueryResponse; using KnnParam = proxima::be::proto::QueryRequest::KnnQueryParam; class KNNQueryTest : public Test { protected: // Sets up the test fixture. void SetUp() override { init_request(); init_response(); } // Tears down the test fixture. void TearDown() override { cleanup_request(); cleanup_response(); } private: void init_request() { request_ = new (std::nothrow) QueryRequest(); request_->set_query_type(proxima::be::proto::QueryRequest_QueryType_QT_KNN); request_->set_collection_name(collection_); // not supported yet request_->set_debug_mode(false); // Allocate KNN Param param_ = request_->mutable_knn_param(); param_->set_column_name("column_name"); param_->set_topk(3); param_->set_dimension(10); param_->set_data_type(proto::DataType::DT_VECTOR_FP16); param_->set_features("features"); param_->set_batch_count(1); param_->set_radius(0.1f); auto kv = param_->add_extra_params(); kv->set_key("string_key1"); kv->set_value("value1"); kv = param_->add_extra_params(); kv->set_key("int_key1"); kv->set_value("10"); } void init_response() { response_ = new (std::nothrow) QueryResponse(); } template void delete_pointer_if(Pointer *ptr) { delete ptr; ptr = nullptr; } void cleanup_request() { delete_pointer_if(request_); } void cleanup_response() { delete_pointer_if(response_); } protected: QueryRequest *request_{nullptr}; KnnParam *param_{nullptr}; QueryResponse *response_{nullptr}; std::string collection_{"unittest"}; }; TEST_F(KNNQueryTest, TestBaseFunctional) { auto meta_service = std::make_shared(); auto meta = std::make_shared(meta_service); // Test invalid params auto knn = std::make_shared(0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); EXPECT_EQ(knn->mode(), IOMode::READONLY); EXPECT_EQ(knn->type(), QueryType::KNN); EXPECT_EQ(knn->id(), 0); } TEST_F(KNNQueryTest, TestValidate) { auto executor = std::make_shared(); auto meta_service = std::make_shared(); auto index_service = std::make_shared(); auto meta = std::make_shared(meta_service); // Test invalid params auto knn = std::make_shared( 0, nullptr, index_service, meta, executor, std::make_shared(false), response_); EXPECT_TRUE(knn->validate() != 0); knn.reset(new (std::nothrow) KNNQuery( 0, request_, index_service, meta, nullptr, std::make_shared(false), response_)); EXPECT_TRUE(knn->validate() != 0); knn.reset(new (std::nothrow) KNNQuery( 0, request_, index_service, meta, executor, std::make_shared(false), nullptr)); EXPECT_TRUE(knn->validate() != 0); CollectionMeta collection_meta; collection_meta.mutable_forward_columns()->push_back("forward1"); collection_meta.mutable_forward_columns()->push_back("forward2"); auto column1 = std::make_shared("column_name"); collection_meta.append(column1); CollectionImplPtr collection = std::make_shared(collection_meta); // Return 0, with invalid collection meta EXPECT_CALL(*meta_service, get_current_collection(_)) .WillOnce(Invoke( [](const std::string &) -> CollectionMetaPtr { return nullptr; })) .RetiresOnSaturation(); // success // Set all right arguments knn.reset(new (std::nothrow) KNNQuery( 0, request_, index_service, meta, executor, std::make_shared(false), response_)); // Can't valid column from meta wrapper EXPECT_TRUE(knn->validate() != 0); // Return collection EXPECT_CALL(*meta_service, get_current_collection("unittest")) .WillOnce(Invoke([&collection](const std::string &) -> CollectionMetaPtr { return collection->meta(); })) .RetiresOnSaturation(); // success EXPECT_EQ(knn->validate(), 0); EXPECT_EQ(knn->column(), "column_name"); EXPECT_EQ(knn->batch_count(), 1); } TEST_F(KNNQueryTest, TestPrepare) { auto executor = std::make_shared(); auto meta_service = std::make_shared(); auto index_service = std::make_shared(); EXPECT_CALL(*index_service, list_segments(collection_, _)) .WillOnce(Return(1)) .WillOnce(Return(0)) // Success but no available segments .RetiresOnSaturation(); auto meta = std::make_shared(meta_service); auto knn = std::make_shared( 0, request_, index_service, meta, executor, std::make_shared(false), response_); EXPECT_TRUE(knn->prepare() != 0); EXPECT_TRUE(knn->prepare() != 0); } TEST_F(KNNQueryTest, TestEvaluate) { auto executor = std::make_shared(); auto meta_service = std::make_shared(); auto index_service = std::make_shared(); auto segment = std::make_shared(); EXPECT_CALL(*index_service, list_segments(_, _)) .WillRepeatedly( Invoke([&segment](const std::string &, index::SegmentPtrList *segments) -> int { EXPECT_TRUE(segments != nullptr); segments->push_back(segment); return 0; })); CollectionMeta collection_meta; collection_meta.mutable_forward_columns()->push_back("forward1"); collection_meta.mutable_forward_columns()->push_back("forward2"); auto column1 = std::make_shared("column_name"); column1->set_data_type(DataTypes::VECTOR_FP16); collection_meta.append(column1); CollectionImplPtr collection = std::make_shared(collection_meta); EXPECT_CALL(*meta_service, get_current_collection(_)) .WillOnce(Invoke( [](const std::string &) -> CollectionMetaPtr { return nullptr; })) .WillOnce(Invoke([&collection](const std::string &) -> CollectionMetaPtr { return collection->meta(); })) .RetiresOnSaturation(); // success auto meta = std::make_shared(meta_service); auto knn = std::make_shared( 0, request_, index_service, meta, executor, std::make_shared(false), response_); EXPECT_EQ(knn->prepare(), PROXIMA_BE_ERROR_CODE(MismatchedDataType)); EXPECT_EQ(knn->prepare(), 0); { // evaluate failed with fake execute EXPECT_CALL(*executor, execute_tasks(_)) .WillOnce(Return(0)) .RetiresOnSaturation(); EXPECT_TRUE(knn->evaluate() != 0); } { // Evaluate success, but no enough values // Execute task EXPECT_CALL(*executor, execute_tasks(_)) .WillOnce(Invoke([](const TaskPtrList &tasks) { for (auto &task : tasks) { task->status(Task::Status::SCHEDULED); task->run(); } return 0; })) // Fake Execute .RetiresOnSaturation(); // Set results EXPECT_CALL(*segment, knn_search(_, _, _, _, _)) .WillRepeatedly(Invoke([](const std::string &, const std::string &, const QueryParams &, uint32_t batch, std::vector *results) { EXPECT_EQ(batch, 1); results->push_back({}); return 0; })) .RetiresOnSaturation(); // No enough results EXPECT_EQ(knn->evaluate(), 0); } response_->Clear(); { // Test serialize EXPECT_CALL(*executor, execute_tasks(_)) .WillRepeatedly(Invoke([](const TaskPtrList &tasks) { for (auto &task : tasks) { task->status(Task::Status::SCHEDULED); task->run(); } return 0; })) // Fake Execute .RetiresOnSaturation(); CollectionImplPtr collection_impl = nullptr; { // Init collection CollectionMeta temp_meta; temp_meta.mutable_forward_columns()->push_back("forward1"); temp_meta.mutable_forward_columns()->push_back("forward2"); collection_impl.reset(new CollectionImpl(temp_meta)); } testing::Mock::AllowLeak(static_cast(meta_service.get())); EXPECT_CALL(*meta_service, get_collection(_, _)) .WillRepeatedly(Invoke([&collection_impl](const std::string &collection, uint64_t revision) { EXPECT_EQ(revision, 1u); return collection_impl->meta(); })) .RetiresOnSaturation(); // Set results EXPECT_CALL(*segment, knn_search(_, _, _, _, _)) .WillRepeatedly(Invoke([](const std::string &, const std::string &, const QueryParams &, uint32_t batch, std::vector *results) { results->clear(); EXPECT_EQ(batch, 1); { QueryResult result95; result95.primary_key = 1U; result95.lsn = 1U; result95.revision = 1; result95.score = 0.95f; { proxima::be::proto::GenericValueList values; auto value = values.add_values(); value->set_int32_value(10); value = values.add_values(); value->set_string_value("strvalue"); // Forward result95.forward_data.assign(values.SerializeAsString()); } QueryResult result96; result96.primary_key = 2U; result96.lsn = 1U; result96.revision = 1; result96.score = 0.96f; { proxima::be::proto::GenericValueList values; auto value = values.add_values(); value->set_int32_value(10); value = values.add_values(); value->set_string_value("strvalue"); // Forward result96.forward_data.assign(values.SerializeAsString()); } QueryResult result93; result93.primary_key = 3U; result93.lsn = 1U; result93.revision = 1; result93.score = 0.93f; { proxima::be::proto::GenericValueList values; auto value = values.add_values(); value->set_int32_value(10); value = values.add_values(); value->set_string_value("strvalue"); // Forward result93.forward_data.assign(values.SerializeAsString()); } results->push_back({result93, result95, result96}); } return 0; })) .RetiresOnSaturation(); // No enough results EXPECT_EQ(knn->evaluate(), 0); EXPECT_EQ(response_->results_size(), 1); EXPECT_EQ(response_->results(0).documents_size(), 3); EXPECT_EQ(response_->results(0).documents(0).primary_key(), 3U); EXPECT_EQ(response_->results(0).documents(0).forward_column_values_size(), 2); auto &kv = response_->results(0).documents(0).forward_column_values(0); EXPECT_EQ(kv.key(), "forward1"); EXPECT_EQ(kv.value().int32_value(), 10); auto &kv1 = response_->results(0).documents(0).forward_column_values(1); EXPECT_EQ(kv1.key(), "forward2"); EXPECT_EQ(kv1.value().string_value(), "strvalue"); EXPECT_EQ(response_->results(0).documents(1).primary_key(), 3U); EXPECT_EQ(response_->results(0).documents(2).primary_key(), 1U); } response_->Clear(); } TEST_F(KNNQueryTest, TestFinalize) { auto executor = std::make_shared(); auto meta_service = std::make_shared(); auto index_service = std::make_shared(); auto meta = std::make_shared(meta_service); auto knn = std::make_shared( 0, request_, index_service, meta, executor, std::make_shared(false), response_); EXPECT_EQ(knn->finalize(), 0); } ================================================ FILE: tests/query/knn_task_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "query/knn_task.h" #include #include "index/mock_segment.h" // for MockSegment #include "mock_query_context.h" // for Mock*Context TEST(KNNTaskTest, TestTaskRun) { { // Test Invalid arguments MockKNNQueryContext context; KNNTask task(nullptr, &context); ASSERT_TRUE(task.run() != 0); KNNTask task1(nullptr, nullptr); ASSERT_TRUE(task1.run() != 0); KNNTask task2(std::make_shared(), nullptr); ASSERT_TRUE(task2.run() != 0); } { std::string column{"column"}; std::string features{"features"}; QueryParams param; MockKNNQueryContext context; EXPECT_CALL(context, column()).WillRepeatedly(ReturnRef(column)); EXPECT_CALL(context, features()).WillRepeatedly(ReturnRef(features)); EXPECT_CALL(context, query_params()).WillRepeatedly(ReturnRef(param)); EXPECT_CALL(context, batch_count()).WillRepeatedly(Return(1)); auto segment = std::make_shared(); // Specific batch knn_search EXPECT_CALL(*segment, knn_search(_, _, _, _, _)) .Times(1) .WillOnce(Return(1)) .RetiresOnSaturation(); { // Failed KNNTask task(segment, &context); task.status(Task::Status::SCHEDULED); EXPECT_EQ(task.run(), 1); EXPECT_EQ(task.exit_code(), 1); EXPECT_TRUE(task.result().empty()); } EXPECT_CALL(*segment, knn_search(_, _, _, _, _)) .Times(1) .WillOnce(Return(0)) .RetiresOnSaturation(); { KNNTask task(segment, &context); task.status(Task::Status::SCHEDULED); EXPECT_EQ(task.run(), 0); EXPECT_EQ(task.exit_code(), 0); EXPECT_TRUE(task.wait_finish()); EXPECT_TRUE(task.finished()); EXPECT_TRUE(task.result().empty()); } } } ================================================ FILE: tests/query/meta_wrapper_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "query/meta_wrapper.h" #include #include "meta/meta_impl.h" #include "meta/mock_meta_service.h" using namespace proxima::be::query; using namespace proxima::be::meta; TEST(MetaWrapperTest, TestValidate) { { // TestMetaService error auto meta_service = std::make_shared(); EXPECT_CALL(*meta_service, get_current_collection(_)) .WillOnce(Return(nullptr)) // Failed .RetiresOnSaturation(); MetaWrapper meta(meta_service); std::string collection; ColumnNameList columns{"", ""}; EXPECT_TRUE(meta.validate(collection, columns) != 0); } { // TestMetaService success with invalid collection pointer auto meta_service = std::make_shared(); EXPECT_CALL(*meta_service, get_current_collection(_)) .WillOnce(Return(nullptr)) // Failed .RetiresOnSaturation(); MetaWrapper meta(meta_service); std::string collection; ColumnNameList columns{"", ""}; EXPECT_TRUE(meta.validate(collection, columns) != 0); } { // TestMetaService success with valid collection pointer CollectionMeta meta; meta.mutable_forward_columns()->push_back("forward1"); meta.mutable_forward_columns()->push_back("forward2"); auto column1 = std::make_shared("column1"); auto column2 = std::make_shared("column2"); meta.append(column1); meta.append(column2); CollectionImplPtr collection = std::make_shared(meta); auto meta_service = std::make_shared(); EXPECT_CALL(*meta_service, get_current_collection(_)) .WillRepeatedly( Invoke([&collection](const std::string &) -> CollectionMetaPtr { return collection->meta(); })); // success MetaWrapper meta_wrapper(meta_service); std::string name{"name"}; ColumnNameList columns{"column1", "column2"}; // True EXPECT_EQ(meta_wrapper.validate(name, columns), 0); // False columns.push_back("column3"); EXPECT_TRUE(meta_wrapper.validate(name, columns) != 0); // Test validate_column EXPECT_EQ(meta_wrapper.validate_column(name, "column1"), 0); EXPECT_TRUE(meta_wrapper.validate_column(name, "column3") != 0); // Get collection failed EXPECT_CALL(*meta_service, get_collection(_, _)) .WillOnce(Return(nullptr)) .WillOnce(Return(collection->meta())); columns.clear(); EXPECT_TRUE(meta_wrapper.list_columns("", 1, &columns) != 0); EXPECT_EQ(meta_wrapper.list_columns(name, 1, &columns), 0); EXPECT_EQ(columns.size(), 2); EXPECT_EQ(columns.front().compare("forward1"), 0); EXPECT_EQ(columns.back().compare("forward2"), 0); } { // TestMetaService validate collection CollectionMeta meta; meta.set_name("name"); auto column1 = std::make_shared(); auto column2 = std::make_shared(); meta.append(column1); meta.append(column2); CollectionImplPtr collection = std::make_shared(meta); auto meta_service = std::make_shared(); EXPECT_CALL(*meta_service, get_current_collection("name")) .WillOnce( Invoke([&collection](const std::string &) -> CollectionMetaPtr { return collection->meta(); })) .RetiresOnSaturation(); MetaWrapper meta_wrapper(meta_service); std::string name{"name"}; // True EXPECT_EQ(meta_wrapper.validate_collection(name), 0); EXPECT_CALL(*meta_service, get_current_collection(_)) .WillOnce(Return(nullptr)) .RetiresOnSaturation(); EXPECT_TRUE(meta_wrapper.validate_collection(name) != 0); } } ================================================ FILE: tests/query/mock_executor.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #pragma once #include #include "query/executor/executor.h" using namespace proxima::be::query; class MockExecutor : public Executor { public: ~MockExecutor() override = default; public: //! Execute one task MOCK_METHOD(int, execute_task, (const TaskPtr &task), (override)); //! Execute tasks MOCK_METHOD(int, execute_tasks, (const TaskPtrList &tasks), (override)); }; MATCHER(TaskPtrMatcher, "") { return typeid(arg) == typeid(TaskPtr); } MATCHER(TaskListMatcher, "") { return typeid(arg) == typeid(TaskPtrList); } using MockExecutorPtr = std::shared_ptr; ================================================ FILE: tests/query/mock_query_context.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #pragma once #include #include "query/context.h" using namespace proxima::be; using namespace proxima::be::query; using namespace ::testing; // for testing::* using QueryRequest = proxima::be::proto::QueryRequest; using QueryResponse = proxima::be::proto::QueryResponse; //! QueryContext which store request and response class MockQueryContext : public QueryContext { public: ~MockQueryContext() override = default; //! Retrieve the PB request of query MOCK_METHOD(const QueryRequest *, request, (), (const, override)); //! Retrieve the PB response of query MOCK_METHOD(const QueryResponse *, response, (), (const, override)); //! Retrieve the PB response of query MOCK_METHOD(QueryResponse *, mutable_response, (), (override)); }; //! CollectionQueryContext provide the collection of query class MockCollectionQueryContext : public CollectionQueryContext { public: //! Destructor ~MockCollectionQueryContext() override = default; public: //! Retrieve collection name MOCK_METHOD(const std::string &, collection, (), (const, override)); }; //! KNNQueryContext: Provide all the params needed for invoke segment.knn_search class MockKNNQueryContext : public KNNQueryContext { public: //! Destructor ~MockKNNQueryContext() override = default; public: //! Retrieve column name MOCK_METHOD(const std::string &, column, (), (const, override)); //! Retrieve features field MOCK_METHOD(const std::string &, features, (), (const, override)); //! Retrieve batch_count field MOCK_METHOD(uint32_t, batch_count, (), (const, override)); //! Retrieve QueryParams MOCK_METHOD(const index::QueryParams &, query_params, (), (const, override)); }; //! EqualQueryContext class MockEqualQueryContext : public QueryKeyContext { public: //! Destructor ~MockEqualQueryContext() override = default; public: //! Retrieve primary_key MOCK_METHOD(uint64_t, primary_key, (), (const, override)); }; ================================================ FILE: tests/query/parallel_executor_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "query/executor/parallel_executor.h" #include #include "task-inl.h" using namespace proxima::be::query; using namespace proxima::be::query::test; const std::string kName("task name"); const int kCode = -1; const int kMillSeconds = 100; TEST(SchedulerTest, TestScheduler) { SchedulerPtr scheduler = Scheduler::Default(); uint32_t concurrency = Scheduler::HostConcurrency(); ASSERT_EQ(scheduler->concurrency(concurrency), concurrency); ExecutorPtr executor = ExecutorPtr(new ParallelExecutor(scheduler)); TaskPtr task = CreateTask(kName, kCode, kMillSeconds); TaskPtr task2 = CreateTask(kName, kCode, kMillSeconds); // invoke task->run in current routine ASSERT_EQ(executor->execute_task(task), kCode); ASSERT_TRUE(task->finished()); TaskPtrList tasks = {task2, CreateTask(kName, kCode, kMillSeconds), CreateTask(kName, kCode, kMillSeconds)}; executor->execute_tasks(tasks); ASSERT_TRUE(task2->finished()); } ================================================ FILE: tests/query/query_factory_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #include "query/query_factory.h" #include using namespace proxima::be::query; using QueryRequest = proxima::be::proto::QueryRequest; using QueryResponse = proxima::be::proto::QueryResponse; using GetDocumentRequest = proxima::be::proto::GetDocumentRequest; using GetDocumentResponse = proxima::be::proto::GetDocumentResponse; TEST(QueryBuilerTest, TestDummyQuery) { QueryRequest request; request.set_query_type( proxima::be::proto:: QueryRequest_QueryType_QueryRequest_QueryType_INT_MIN_SENTINEL_DO_NOT_USE_); // Dummy query auto query = QueryFactory::Create(&request, nullptr, nullptr, nullptr, nullptr, nullptr); EXPECT_EQ(query->mode(), IOMode::READONLY); EXPECT_EQ(query->type(), QueryType::UNDEFINED); EXPECT_TRUE(query->validate() != 0); EXPECT_TRUE(query->prepare() != 0); EXPECT_TRUE(query->evaluate() != 0); EXPECT_TRUE(query->finalize() != 0); } TEST(QueryBuilerTest, TestValidQuery) { { QueryRequest request; request.set_query_type(proxima::be::proto::QueryRequest_QueryType_QT_KNN); // KNN query auto query = QueryFactory::Create(&request, nullptr, nullptr, nullptr, nullptr, nullptr); EXPECT_EQ(query->mode(), IOMode::READONLY); EXPECT_EQ(query->type(), QueryType::KNN); EXPECT_EQ(query->id(), 1); } { GetDocumentRequest request; // Equal query auto query = QueryFactory::Create(&request, nullptr, nullptr, nullptr, nullptr, nullptr); EXPECT_EQ(query->mode(), IOMode::READONLY); EXPECT_EQ(query->type(), QueryType::EQUAL); EXPECT_EQ(query->id(), 2); } } ================================================ FILE: tests/query/query_service_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Dec 2020 * \brief */ #include #include #include #include "index/mock_index_service.h" // for MockIndexService #include "index/mock_segment.h" // for MockSegment #include "meta/mock_meta_service.h" // for MockMetaService #include "query/query_service_builder.h" using QueryRequest = proxima::be::proto::QueryRequest; using QueryResponse = proxima::be::proto::QueryResponse; using GetDocumentRequest = proxima::be::proto::GetDocumentRequest; using GetDocumentResponse = proxima::be::proto::GetDocumentResponse; using KnnParam = proxima::be::proto::QueryRequest::KnnQueryParam; class QueryServiceTest : public Test { protected: // Sets up the test fixture. void SetUp() override { meta_service_ = std::make_shared(); index_service_ = std::make_shared(); init_request(); init_response(); } // Tears down the test fixture. void TearDown() override { meta_service_.reset(); index_service_.reset(); } private: void init_request() { request_.reset(new (std::nothrow) QueryRequest()); request_->set_query_type(proxima::be::proto::QueryRequest_QueryType_QT_KNN); request_->set_collection_name(collection_); // not supported yet request_->set_debug_mode(false); // Allocate KNN Param param_ = request_->mutable_knn_param(); param_->set_column_name("column_name"); param_->set_topk(1); param_->set_dimension(10); param_->set_data_type(proxima::be::proto::DataType::DT_VECTOR_FP16); param_->set_features("features"); param_->set_batch_count(1); param_->set_radius(0.1f); auto kv = param_->add_extra_params(); kv->set_key("string_key1"); kv->set_value("value1"); kv = param_->add_extra_params(); kv->set_key("int_key1"); kv->set_value("10"); equal_request_.reset(new (std::nothrow) GetDocumentRequest()); equal_request_->set_collection_name(collection_); // not supported yet equal_request_->set_debug_mode(false); equal_request_->set_primary_key(1); } void init_response() { response_.reset(new (std::nothrow) QueryResponse()); } protected: MockMetaServicePtr meta_service_{nullptr}; MockIndexServicePtr index_service_{nullptr}; std::unique_ptr request_{nullptr}; std::unique_ptr response_{nullptr}; KnnParam *param_{nullptr}; std::unique_ptr equal_request_{nullptr}; // std::unique_ptr equal_response_{nullptr}; std::string collection_{"unittest"}; }; using QueryService = proxima::be::query::QueryService; using QueryServiceBuilder = proxima::be::query::QueryServiceBuilder; TEST_F(QueryServiceTest, TestInitialize) { EXPECT_FALSE(QueryServiceBuilder::Create(nullptr, meta_service_, 1)); EXPECT_FALSE(QueryServiceBuilder::Create(nullptr, nullptr, 1)); EXPECT_FALSE(QueryServiceBuilder::Create(index_service_, nullptr, 1)); auto svc = QueryServiceBuilder::Create(index_service_, meta_service_, 1); EXPECT_TRUE(svc); EXPECT_TRUE(svc->initialized()); EXPECT_TRUE(svc->cleanup() == 0); } TEST_F(QueryServiceTest, TestSearch) { { // Invalid params auto svc = QueryServiceBuilder::Create(index_service_, meta_service_, 1); EXPECT_TRUE(svc); EXPECT_TRUE(svc->initialized()); EXPECT_TRUE(svc->search(nullptr, nullptr, nullptr) != 0); QueryRequest request; request.set_query_type( proxima::be::proto:: QueryRequest_QueryType_QueryRequest_QueryType_INT_MIN_SENTINEL_DO_NOT_USE_); EXPECT_TRUE(svc->search(&request, nullptr, nullptr) != 0); QueryResponse response; EXPECT_TRUE(svc->search(nullptr, &response, nullptr) != 0); svc->cleanup(); } { // Valid KNN Search // Mock Meta CollectionMeta collection_meta; collection_meta.mutable_forward_columns()->push_back("forward1"); collection_meta.mutable_forward_columns()->push_back("forward2"); auto column1 = std::make_shared("column_name"); column1->set_data_type(DataTypes::VECTOR_FP16); collection_meta.append(column1); CollectionImplPtr collection = std::make_shared(collection_meta); // Return collection EXPECT_CALL(*meta_service_, get_current_collection(_)) .WillRepeatedly( Invoke([&collection](const std::string &) -> CollectionMetaPtr { return collection->meta(); })) .RetiresOnSaturation(); // success EXPECT_CALL(*meta_service_, get_collection(_, _)) .WillOnce(Invoke([&collection](const std::string &, uint64_t revision) { EXPECT_EQ(revision, 1u); return collection->meta(); })) .RetiresOnSaturation(); auto segment = std::make_shared(); testing::Mock::AllowLeak(static_cast(segment.get())); // Set results EXPECT_CALL(*segment, knn_search(_, _, _, _, _)) .WillOnce(Invoke([](const std::string &, const std::string &query, const QueryParams &, uint32_t batch, std::vector *results) { results->clear(); EXPECT_EQ(batch, 1); EXPECT_EQ(query, "features"); QueryResult result; result.primary_key = 1U; result.lsn = 1U; result.revision = 1; result.score = 0.95f; proxima::be::proto::GenericValueList values; auto value = values.add_values(); value->set_int32_value(10); value = values.add_values(); value->set_string_value("str_value"); // Forward result.forward_data.assign(values.SerializeAsString()); results->push_back({result}); return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*index_service_, list_segments(_, _)) .WillOnce(Invoke([&segment](const std::string &, index::SegmentPtrList *segments) -> int { segments->push_back(segment); return 0; })) .RetiresOnSaturation(); auto svc = QueryServiceBuilder::Create(index_service_, meta_service_, 1); EXPECT_TRUE(svc); auto profiler = std::make_shared(false); EXPECT_EQ(svc->search(request_.get(), response_.get(), profiler), 0); EXPECT_EQ(response_->results_size(), 1); EXPECT_EQ(response_->results(0).documents_size(), 1); EXPECT_EQ(response_->results(0).documents(0).primary_key(), 1U); EXPECT_EQ(response_->results(0).documents(0).forward_column_values_size(), 2); auto &kv = response_->results(0).documents(0).forward_column_values(0); EXPECT_EQ(kv.key(), "forward1"); EXPECT_EQ(kv.value().int32_value(), 10); auto &kv1 = response_->results(0).documents(0).forward_column_values(1); EXPECT_EQ(kv1.key(), "forward2"); EXPECT_EQ(kv1.value().string_value(), "str_value"); response_->Clear(); } //{ // Valid Equal Search // // failed, no mocks with meta service // EXPECT_TRUE(svc.search(equal_request_, response_) != 0); // response_->Clear(); //} } ================================================ FILE: tests/query/scheduler_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include "query/executor/scheduler.h" #include #include "task-inl.h" using namespace proxima::be::query; using namespace proxima::be::query::test; const std::string kName("task name"); const int kCode = 0; const int kMillSeconds = 100; TEST(SchedulerTest, TestScheduler) { SchedulerPtr scheduler = Scheduler::Default(); TaskPtr task = CreateTask(kName, kCode, kMillSeconds); ASSERT_EQ(scheduler->concurrency(), 0); // Can't schedule an task before set concurrency ASSERT_TRUE(scheduler->schedule(task) != 0); uint32_t concurrency = Scheduler::HostConcurrency(); ASSERT_EQ(scheduler->concurrency(concurrency), concurrency); ASSERT_EQ(scheduler->schedule(task), 0); ASSERT_TRUE(task->wait_finish()); } ================================================ FILE: tests/query/task-inl.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #pragma once #include #include #include "query/executor/bthread_task.h" namespace proxima { namespace be { namespace query { namespace test { class TaskImpl : public query::BthreadTask { public: TaskImpl(const std::string &name, int code, int millseconds = 0) : query::BthreadTask(name), ret_code_(code), sleep_(millseconds) {} virtual ~TaskImpl() {} private: virtual int do_run() { if (sleep_) { std::this_thread::sleep_for(std::chrono::milliseconds(sleep_)); } return ret_code_; } private: int ret_code_; int sleep_; }; static TaskPtr CreateTask(const std::string &name, int code, int millseconds = 0) { return std::make_shared(name, code, millseconds); } } // namespace test } // namespace query } // namespace be } // namespace proxima ================================================ FILE: tests/query/task_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author guonix * \date Nov 2020 * \brief */ #include #include #include "task-inl.h" using namespace proxima::be::query; using namespace proxima::be::query::test; const std::string kName("task name"); const int kCode = 0; const int kMillSeconds = 100; TEST(TaskTest, TestDefaultContructor) { TaskImpl task(kName, kCode); ASSERT_EQ(task.name(), kName); ASSERT_EQ(task.status(), Task::Status::INITIALIZED); ASSERT_FALSE(task.running()); ASSERT_FALSE(task.finished()); } TEST(TaskTest, TestExitCode) { TaskImpl task(kName, kCode); task.status(Task::Status::SCHEDULED); ASSERT_EQ(task.run(), kCode); ASSERT_EQ(task.exit_code(), kCode); ASSERT_TRUE(task.finished()); ASSERT_TRUE(task.wait_finish()); } TEST(TaskTest, TestAsyncRun) { TaskPtr task = CreateTask(kName, kCode, kMillSeconds); ASSERT_EQ(task->status(), Task::Status::INITIALIZED); { auto begin = std::chrono::steady_clock::now(); // Async run task std::thread runner( [](TaskPtr task) { task->status(Task::Status::SCHEDULED); task->run(); }, task); // Wait finish ASSERT_TRUE(task->wait_finish()); auto end = std::chrono::steady_clock::now(); auto comsuption = std::chrono::duration_cast(end - begin); ASSERT_TRUE(comsuption.count() >= kMillSeconds); ASSERT_TRUE(task->finished()); runner.join(); } } ================================================ FILE: tests/repository/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Feb 2021 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) if(APPLE) set(APPLE_FRAMEWORK_LIBS -framework CoreFoundation -framework CoreGraphics -framework CoreData -framework CoreText -framework Security -framework Foundation -Wl,-U,_MallocExtension_ReleaseFreeMemory -Wl,-U,_ProfilerStart -Wl,-U,_ProfilerStop -Wl,-U,_RegisterThriftProtocol ) endif() file(GLOB ALL_TEST_SRCS *_test.cc) foreach (CC_SRCS ${ALL_TEST_SRCS}) get_filename_component(CC_TARGET ${CC_SRCS} NAME_WE) cc_gmock( NAME ${CC_TARGET} STRICT LIBS OpenSSL.SSL OpenSSL.Crypto mysql_repository_lib proxima_be_proto ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} SRCS ${CC_SRCS} INCS .. ../../src LDFLAGS ${APPLE_FRAMEWORK_LIBS} ) set_target_properties(${CC_TARGET} PROPERTIES INSTALL_RPATH ${LIB_PATH}) cc_test_suite(proxima_be_repository ${CC_TARGET}) endforeach () ================================================ FILE: tests/repository/binlog_event_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author hongqing.hu * \date Dec 2020 * \brief */ #include #include #define private public #include "repository/binlog/binlog_event.h" #undef private #include "common/error_code.h" #include "proto/common.pb.h" #include "event_builder.h" using namespace ::proxima::be; using namespace proxima::be::repository; class BinlogEventTest : public testing::Test { protected: void SetUp() {} void TearDown() {} protected: }; TEST_F(BinlogEventTest, TestTableMapEvent) { uint64_t table_id = 1000; std::string db("test_db"); std::string table_name("table1"); { size_t column_count = 1; std::vector column_nulls(column_count, false); std::vector column_types(column_count, MYSQL_TYPE_LONG); std::vector column_metas(column_count, 0); std::string table_map = EventBuilder::BuildTableMapEvent( table_id, db, table_name, column_types, column_metas, column_nulls); TableMapEventPtr event = std::make_shared(table_map.c_str(), table_map.size()); ASSERT_TRUE(event->is_valid()); } } TEST_F(BinlogEventTest, TestDecodeMetaData) { char buf[1024]; TableMapEvent event(buf, 1); std::vector &columns = event.column_info_; std::vector types = { MYSQL_TYPE_TINY_BLOB, MYSQL_TYPE_BLOB, MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_LONG_BLOB, MYSQL_TYPE_DOUBLE, MYSQL_TYPE_FLOAT, MYSQL_TYPE_GEOMETRY, MYSQL_TYPE_JSON, MYSQL_TYPE_SET, MYSQL_TYPE_ENUM, MYSQL_TYPE_STRING, MYSQL_TYPE_BIT, MYSQL_TYPE_VARCHAR, MYSQL_TYPE_NEWDECIMAL, MYSQL_TYPE_TIME2, MYSQL_TYPE_DATETIME2, MYSQL_TYPE_TIMESTAMP2, MYSQL_TYPE_LONG}; columns.resize(types.size()); for (size_t i = 0; i < types.size(); ++i) { columns[i].type = types[i]; columns[i].meta = 0; } event.column_count_ = columns.size(); std::vector values; for (size_t i = 0; i < 8; ++i) { values.emplace_back(i + 1); } // string values.emplace_back(1); values.emplace_back(1); // bit values.emplace_back(2); values.emplace_back(1); // varchar values.emplace_back(1); values.emplace_back(2); // new decimal values.emplace_back(2); values.emplace_back(2); // time/datatime/timestamp values.emplace_back(1); values.emplace_back(1); values.emplace_back(1); event.decode_meta_data((const char *)values.data()); for (size_t i = 0; i < 8; ++i) { ASSERT_EQ(columns[i].meta, i + 1); } ASSERT_EQ(columns[8].meta, 0); ASSERT_EQ(columns[9].meta, 0); ASSERT_EQ(columns[10].meta, 257); ASSERT_EQ(columns[11].meta, 258); ASSERT_EQ(columns[12].meta, 513); ASSERT_EQ(columns[13].meta, 514); ASSERT_EQ(columns[14].meta, 1); ASSERT_EQ(columns[15].meta, 1); ASSERT_EQ(columns[16].meta, 1); ASSERT_EQ(columns[17].meta, 0); } ================================================ FILE: tests/repository/binlog_reader_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author hongqing.hu * \date Dec 2020 * \brief */ #include #define private public #include "repository/binlog/binlog_reader.h" #include "repository/binlog/info_fetcher.h" #include "repository/binlog/rows_event_parser.h" #include "mock_mysql_connector.h" #undef private #include "repository/repository_common/error_code.h" #include "event_builder.h" #include "mysql_result_builder.h" using namespace ::proxima::be; using namespace proxima::be::repository; class BinlogReaderTest : public testing::Test { protected: void SetUp() { mgr_ = std::make_shared(); ASSERT_TRUE(mgr_); connector1_ = std::make_shared(); ASSERT_TRUE(connector1_); mgr_->put(connector1_); connector2_ = std::make_shared(); ASSERT_TRUE(connector2_); mgr_->put(connector2_); InitTableSchema(); ctx_.position = 4; ctx_.file_name = "binlog.000004"; table_name_ = builder_.table_name_; } void TearDown() {} void InitTableSchema() { builder_.BuildCollectionConfig(); // init ailego::Uri test_uri = builder_.uri_; EXPECT_CALL(*connector1_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); fetcher_ = std::make_shared(builder_.config_, mgr_); int ret = fetcher_->init(); ASSERT_EQ(ret, 0); } std::string BuildNoMoreDataEvent() { std::string str(1, (char)254); return str; } std::string BuildQueryEventStr(const std::string &query) { return " " + EventBuilder::BuildQueryEvent(builder_.db_, query); } std::string BuildRotateEventStr(const std::string &file, bool has_crc) { return " " + EventBuilder::BuildRotateEvent(file, 4, has_crc); } protected: MysqlConnectorManagerPtr mgr_{}; MockMysqlConnectorPtr connector1_{}; MockMysqlConnectorPtr connector2_{}; std::string table_name_{}; InfoFetcherPtr fetcher_{}; TableSchemaPtr schema_; LsnContext ctx_; MysqlResultBuilder builder_{}; }; TEST_F(BinlogReaderTest, TestSimple) { BinlogReader reader(table_name_, fetcher_, mgr_); MockMysqlResultWrapperPtr result = builder_.BuildQuerySchemaResult(); MockMysqlResultWrapperPtr result1 = builder_.BuildQueryCollationResult(); // init table schema EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce(Invoke([&result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result; return 0; })) .RetiresOnSaturation(); int ret = reader.init(); ASSERT_EQ(ret, 0); // first set check sum EXPECT_CALL(*connector2_, execute_query(_, _, _)) .Times(2) .WillOnce(::testing::Return(0)) .WillOnce(::testing::Return(0)) .RetiresOnSaturation(); // second request dump EXPECT_CALL(*connector2_, execute_simple_command(_, _, _)) .WillOnce(::testing::Return(0)) .RetiresOnSaturation(); ret = reader.start(ctx_); ASSERT_EQ(ret, 0); // fetch data std::string table_map_str = builder_.BuildTableMapEventStr(); std::vector values = {"1", "name1", "30", "123.456", "1,2,3,4", "1,2,3,5", "1,2,3,6"}; std::string write_rows_str = builder_.BuildWriteRowsEventStr(values); EXPECT_CALL(*connector2_, client_safe_read(_)) .Times(2) .WillOnce(Invoke([&table_map_str](unsigned long *len) -> int { *len = table_map_str.size(); return 0; })) .WillOnce(Invoke([&write_rows_str](unsigned long *len) -> int { *len = write_rows_str.size(); return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*connector2_, data()) .Times(2) .WillOnce(Invoke([&table_map_str]() -> unsigned char * { return (unsigned char *)table_map_str.c_str(); })) .WillOnce(Invoke([&write_rows_str]() -> unsigned char * { return (unsigned char *)write_rows_str.c_str(); })) .RetiresOnSaturation(); WriteRequest::Row row_data; LsnContext context; ret = reader.get_next_row_data(&row_data, &context); ASSERT_EQ(ret, 0); ASSERT_EQ(context.status, RowDataStatus::NORMAL); ASSERT_EQ(row_data.primary_key(), (uint64_t)1); ASSERT_EQ(row_data.forward_column_values().values(0).string_value(), "name1"); ASSERT_EQ(row_data.forward_column_values().values(1).int32_value(), 30); ASSERT_EQ(row_data.index_column_values().values(0).string_value(), "1,2,3,4"); ASSERT_EQ(row_data.index_column_values().values(1).string_value(), "1,2,3,5"); } TEST_F(BinlogReaderTest, TestGetNextRowData) { BinlogReader reader(table_name_, fetcher_, mgr_); MockMysqlResultWrapperPtr result = builder_.BuildQuerySchemaResult(); MockMysqlResultWrapperPtr result1 = builder_.BuildQueryCollationResult(); // init table schema EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce(Invoke([&result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result; return 0; })) .RetiresOnSaturation(); int ret = reader.init(); ASSERT_EQ(ret, 0); // first set check sum EXPECT_CALL(*connector2_, execute_query(_, _, _)) .Times(2) .WillOnce(::testing::Return(0)) .WillOnce(::testing::Return(0)) .RetiresOnSaturation(); // second request dump EXPECT_CALL(*connector2_, execute_simple_command(_, _, _)) .WillOnce(::testing::Return(0)) .RetiresOnSaturation(); ret = reader.start(ctx_); ASSERT_EQ(ret, 0); // fetch data std::string rotate_event_str = BuildRotateEventStr(ctx_.file_name, false); std::string rotate_event_str1 = BuildRotateEventStr(ctx_.file_name, true); std::string query_event_str = BuildQueryEventStr("query event"); std::string query_event_str1 = BuildQueryEventStr("alter table mytest."); std::string table_map_str = builder_.BuildTableMapEventStr(); std::vector values = {"1", "name1", "30", "123.456", "1,2,3,4", "1,2,3,5", "1,2,3,6"}; size_t rows_count = 2; std::string write_rows_str = builder_.BuildWriteRowsEventStr(values, rows_count); EXPECT_CALL(*connector2_, client_safe_read(_)) .Times(5) .WillOnce(Invoke([&rotate_event_str](unsigned long *len) -> int { *len = rotate_event_str.size(); return 0; })) .WillOnce(Invoke([&query_event_str](unsigned long *len) -> int { *len = query_event_str.size(); return 0; })) .WillOnce(Invoke([&rotate_event_str1](unsigned long *len) -> int { *len = rotate_event_str1.size(); return 0; })) .WillOnce(Invoke([&table_map_str](unsigned long *len) -> int { *len = table_map_str.size(); return 0; })) .WillOnce(Invoke([&write_rows_str](unsigned long *len) -> int { *len = write_rows_str.size(); return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*connector2_, data()) .Times(5) .WillOnce(Invoke([&rotate_event_str]() -> unsigned char * { return (unsigned char *)rotate_event_str.c_str(); })) .WillOnce(Invoke([&query_event_str]() -> unsigned char * { return (unsigned char *)query_event_str.c_str(); })) .WillOnce(Invoke([&rotate_event_str1]() -> unsigned char * { return (unsigned char *)rotate_event_str1.c_str(); })) .WillOnce(Invoke([&table_map_str]() -> unsigned char * { return (unsigned char *)table_map_str.c_str(); })) .WillOnce(Invoke([&write_rows_str]() -> unsigned char * { return (unsigned char *)write_rows_str.c_str(); })) .RetiresOnSaturation(); for (size_t i = 0; i < rows_count; ++i) { WriteRequest::Row row_data; LsnContext context; ret = reader.get_next_row_data(&row_data, &context); ASSERT_EQ(ret, 0); ASSERT_EQ(context.status, RowDataStatus::NORMAL); ASSERT_EQ(row_data.primary_key(), (uint64_t)1); ASSERT_EQ(row_data.forward_column_values().values(0).string_value(), "name1"); ASSERT_EQ(row_data.forward_column_values().values(1).int32_value(), 30); ASSERT_EQ(row_data.index_column_values().values(0).string_value(), "1,2,3,4"); ASSERT_EQ(row_data.index_column_values().values(1).string_value(), "1,2,3,5"); } EXPECT_CALL(*connector2_, client_safe_read(_)) .WillOnce(Invoke([&query_event_str1](unsigned long *len) -> int { *len = query_event_str1.size(); return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*connector2_, data()) .WillOnce(Invoke([&query_event_str1]() -> unsigned char * { return (unsigned char *)query_event_str1.c_str(); })) .RetiresOnSaturation(); result1->reset(); EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce(Invoke([&result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result; return ErrorCode_ExecuteMysql; })) .RetiresOnSaturation(); WriteRequest::Row row_data; LsnContext context; ret = reader.get_next_row_data(&row_data, &context); ASSERT_EQ(ret, ErrorCode_ExecuteMysql); result1->reset(); EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce(Invoke([&result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result; return 0; })) .RetiresOnSaturation(); ret = reader.get_next_row_data(&row_data, &context); ASSERT_EQ(ret, 0); ASSERT_EQ(context.status, RowDataStatus::SCHEMA_CHANGED); } TEST_F(BinlogReaderTest, TestInitWithGetTableSchemaFailed) { BinlogReader reader(table_name_, fetcher_, mgr_); // init table schema EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(1) .WillOnce(testing::Return(1)) .RetiresOnSaturation(); int ret = reader.init(); ASSERT_EQ(ret, ErrorCode_ExecuteMysql); } TEST_F(BinlogReaderTest, TestStartWithInitEventFetcherFailed) { BinlogReader reader(table_name_, fetcher_, mgr_); MockMysqlResultWrapperPtr result = builder_.BuildQuerySchemaResult(); MockMysqlResultWrapperPtr result1 = builder_.BuildQueryCollationResult(); // init table schema EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce(Invoke([&result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result; return 0; })) .RetiresOnSaturation(); int ret = reader.init(); ASSERT_EQ(ret, 0); // first set check sum EXPECT_CALL(*connector2_, execute_query(_, _, _)) .WillOnce(::testing::Return(1)) .RetiresOnSaturation(); ret = reader.start(ctx_); ASSERT_EQ(ret, 1); } TEST_F(BinlogReaderTest, TestGetNextRowDataWithNoMoreData) { BinlogReader reader(table_name_, fetcher_, mgr_); MockMysqlResultWrapperPtr result = builder_.BuildQuerySchemaResult(); MockMysqlResultWrapperPtr result1 = builder_.BuildQueryCollationResult(); // init table schema EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce(Invoke([&result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result; return 0; })) .RetiresOnSaturation(); int ret = reader.init(); ASSERT_EQ(ret, 0); // first set check sum EXPECT_CALL(*connector2_, execute_query(_, _, _)) .Times(2) .WillOnce(::testing::Return(0)) .WillOnce(::testing::Return(0)) .RetiresOnSaturation(); // second request dump EXPECT_CALL(*connector2_, execute_simple_command(_, _, _)) .WillOnce(::testing::Return(0)) .RetiresOnSaturation(); ret = reader.start(ctx_); ASSERT_EQ(ret, 0); // fetch data std::string no_more_event = BuildNoMoreDataEvent(); EXPECT_CALL(*connector2_, client_safe_read(_)) .WillOnce(Invoke([&no_more_event](unsigned long *len) -> int { *len = no_more_event.size(); return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*connector2_, data()) .WillOnce(Invoke([&no_more_event]() -> unsigned char * { return (unsigned char *)no_more_event.c_str(); })) .RetiresOnSaturation(); WriteRequest::Row row_data; LsnContext context; ret = reader.get_next_row_data(&row_data, &context); ASSERT_EQ(ret, 0); ASSERT_EQ(context.status, RowDataStatus::NO_MORE_DATA); } ================================================ FILE: tests/repository/collection_manager_create_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Dec 2020 * \brief */ #include "fake_collection.h" #include "mock_collection_creator.h" #include "port_helper.h" #define private public #define protected public #include "repository/collection_manager.h" #include "repository/repository_common/config.h" #undef private #undef protected #include "mock_index_agent_server.h" using namespace proxima::be::repository; static int PORT = 8010; static int PID = 0; int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } class CollectionManagerCreateTest : public ::testing::Test { protected: CollectionManagerCreateTest() {} ~CollectionManagerCreateTest() {} void SetUp() { PortHelper::GetPort(&PORT, &PID); std::cout << "Server port: " << PORT << std::endl; std::string index_uri = "127.0.0.1:" + std::to_string(PORT); proxima::be::repository::Config::Instance() .repository_config_.mutable_repository_config() ->set_index_agent_addr(index_uri); std::cout << "Set index addr: " << index_uri << std::endl; } void TearDown() { PortHelper::RemovePortFile(PID); } }; TEST_F(CollectionManagerCreateTest, TestCreate) { brpc::Server server_; MockProximaServiceImpl svc_; brpc::ServerOptions options; ASSERT_EQ(0, server_.AddService(&svc_, brpc::SERVER_DOESNT_OWN_SERVICE)); ASSERT_EQ(0, server_.Start(PORT, &options)); { MockCollectionCreatorPtr collection_creator = std::make_shared(); EXPECT_CALL(*collection_creator, create(_)) .WillRepeatedly(Invoke([](const CollectionInfo &info) -> CollectionPtr { std::string collection_name = info.config().collection_name(); MysqlHandlerPtr mysql_handler = std::make_shared(info.config()); return std::make_shared(info.config(), mysql_handler); })); CollectionManagerPtr collection_manager = std::make_shared(collection_creator); int ret = collection_manager->init(); ASSERT_EQ(0, ret); CollectionInfo info1; CollectionInfo info2; CollectionInfo info3; info1.mutable_config()->set_collection_name("collection1"); info1.set_uuid("collection1-uuid"); info2.mutable_config()->set_collection_name("collection2"); info2.set_uuid("collection2-uuid"); info3.mutable_config()->set_collection_name("collection3"); info3.set_uuid("collection3-uuid"); std::vector collection_infos{info1, info2, info3}; std::vector new_collections; std::vector old_collections; std::vector expired_collections; collection_manager->classify_collections(collection_infos, &new_collections, &old_collections, &expired_collections); EXPECT_EQ(3, new_collections.size()); EXPECT_EQ(0, old_collections.size()); EXPECT_EQ(0, expired_collections.size()); EXPECT_EQ(std::any_of(new_collections.begin(), new_collections.end(), [](const CollectionInfo &info) { return info.config().collection_name() == "collection1" && info.uuid() == "collection1-uuid"; }), true); EXPECT_EQ(std::any_of(new_collections.begin(), new_collections.end(), [](const CollectionInfo &info) { return info.config().collection_name() == "collection2" && info.uuid() == "collection2-uuid"; }), true); EXPECT_EQ(std::any_of(new_collections.begin(), new_collections.end(), [](const CollectionInfo &info) { return info.config().collection_name() == "collection3" && info.uuid() == "collection3-uuid"; }), true); collection_manager->create_collections(new_collections); size_t count = 0; auto created_collection = svc_.get_created_collections(); auto collections_name = svc_.get_collections_name(); while (count < 5) { // in order to sleep enough time if (created_collection.size() == collections_name.size()) { break; } std::this_thread::sleep_for(std::chrono::milliseconds(1000)); created_collection = svc_.get_created_collections(); collections_name = svc_.get_collections_name(); count++; } EXPECT_EQ(created_collection.size(), collection_manager->collections_.size()); EXPECT_EQ(3, collection_manager->collections_.size()); EXPECT_EQ(1, collection_manager->collections_.count("collection1-uuid")); EXPECT_EQ(1, collection_manager->collections_.count("collection2-uuid")); EXPECT_EQ(1, collection_manager->collections_.count("collection3-uuid")); ret = collection_manager->stop(); EXPECT_EQ(ret, 0); } ASSERT_EQ(0, server_.Stop(0)); ASSERT_EQ(0, server_.Join()); } ================================================ FILE: tests/repository/collection_manager_drop_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Dec 2020 * \brief */ #include "fake_collection.h" #include "mock_collection_creator.h" #include "port_helper.h" #define private public #define protected public #include "repository/collection_manager.h" #include "repository/repository_common/config.h" #undef private #undef protected #include "mock_index_agent_server.h" using namespace proxima::be::repository; static int PORT = 8010; static int PID = 0; int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } class CollectionManagerDropTest : public ::testing::Test { protected: CollectionManagerDropTest() {} ~CollectionManagerDropTest() {} void SetUp() { PortHelper::GetPort(&PORT, &PID); std::cout << "Server port: " << PORT << std::endl; std::string index_uri = "127.0.0.1:" + std::to_string(PORT); proxima::be::repository::Config::Instance() .repository_config_.mutable_repository_config() ->set_index_agent_addr(index_uri); std::cout << "Set index addr: " << index_uri << std::endl; } void TearDown() { PortHelper::RemovePortFile(PID); } }; TEST_F(CollectionManagerDropTest, TestDrop) { brpc::Server server_; MockProximaServiceImpl svc_; brpc::ServerOptions options; ASSERT_EQ(0, server_.AddService(&svc_, brpc::SERVER_DOESNT_OWN_SERVICE)); ASSERT_EQ(0, server_.Start(PORT, &options)); { MockCollectionCreatorPtr collection_creator = std::make_shared(); EXPECT_CALL(*collection_creator, create(_)) .WillRepeatedly(Invoke([](const CollectionInfo &info) -> CollectionPtr { std::string collection_name = info.config().collection_name(); MysqlHandlerPtr mysql_handler = std::make_shared(info.config()); return std::make_shared(info.config(), mysql_handler); })); CollectionManagerPtr collection_manager = std::make_shared(collection_creator); int ret = collection_manager->init(); ASSERT_EQ(0, ret); CollectionInfo info1; CollectionInfo info2; CollectionInfo info3; info1.mutable_config()->set_collection_name("collection1"); info1.set_uuid("collection1-uuid"); info2.mutable_config()->set_collection_name("collection2"); info2.set_uuid("collection2-uuid"); info3.mutable_config()->set_collection_name("collection3"); info3.set_uuid("collection3-uuid"); std::vector collection_infos{info1, info2, info3}; std::vector new_collections; std::vector old_collections; std::vector expired_collections; collection_manager->classify_collections(collection_infos, &new_collections, &old_collections, &expired_collections); EXPECT_EQ(3, new_collections.size()); EXPECT_EQ(0, old_collections.size()); EXPECT_EQ(0, expired_collections.size()); EXPECT_EQ(std::any_of(new_collections.begin(), new_collections.end(), [](const CollectionInfo &info) { return info.config().collection_name() == "collection1" && info.uuid() == "collection1-uuid"; }), true); EXPECT_EQ(std::any_of(new_collections.begin(), new_collections.end(), [](const CollectionInfo &info) { return info.config().collection_name() == "collection2" && info.uuid() == "collection2-uuid"; }), true); EXPECT_EQ(std::any_of(new_collections.begin(), new_collections.end(), [](const CollectionInfo &info) { return info.config().collection_name() == "collection3" && info.uuid() == "collection3-uuid"; }), true); collection_manager->create_collections(new_collections); size_t count = 0; auto created_collection = svc_.get_created_collections(); auto collections_name = svc_.get_collections_name(); while (count < 5) { // in order to sleep enough time if (created_collection.size() == collections_name.size()) { break; } std::this_thread::sleep_for(std::chrono::milliseconds(1000)); created_collection = svc_.get_created_collections(); collections_name = svc_.get_collections_name(); count++; } EXPECT_EQ(created_collection.size(), collection_manager->collections_.size()); collection_manager->update_collections(old_collections); collection_manager->drop_collections(expired_collections); EXPECT_EQ(3, collection_manager->collections_.size()); EXPECT_EQ(1, collection_manager->collections_.count("collection1-uuid")); EXPECT_EQ(1, collection_manager->collections_.count("collection2-uuid")); EXPECT_EQ(1, collection_manager->collections_.count("collection3-uuid")); // Drop collection_infos.clear(); new_collections.clear(); old_collections.clear(); expired_collections.clear(); collection_manager->classify_collections(collection_infos, &new_collections, &old_collections, &expired_collections); EXPECT_EQ(0, new_collections.size()); EXPECT_EQ(0, old_collections.size()); EXPECT_EQ(3, expired_collections.size()); EXPECT_EQ( std::any_of( expired_collections.begin(), expired_collections.end(), [](const std::string &name) { return name == "collection1-uuid"; }), true); EXPECT_EQ( std::any_of( expired_collections.begin(), expired_collections.end(), [](const std::string &name) { return name == "collection2-uuid"; }), true); EXPECT_EQ( std::any_of( expired_collections.begin(), expired_collections.end(), [](const std::string &name) { return name == "collection3-uuid"; }), true); collection_manager->create_collections(new_collections); collection_manager->update_collections(old_collections); collection_manager->drop_collections(expired_collections); collection_manager->clean_invalid_collections(); EXPECT_EQ(0, collection_manager->collections_.size()); ret = collection_manager->stop(); EXPECT_EQ(ret, 0); } ASSERT_EQ(0, server_.Stop(0)); ASSERT_EQ(0, server_.Join()); } ================================================ FILE: tests/repository/collection_manager_filter_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Dec 2020 * \brief */ #include "fake_collection.h" #include "mock_collection_creator.h" #include "port_helper.h" #define private public #define protected public #include "repository/collection_manager.h" #include "repository/repository_common/config.h" #undef private #undef protected #include "mock_index_agent_server.h" using namespace proxima::be::repository; static int PORT = 8010; static int PID = 0; int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } class CollectionManagerFilterTest : public ::testing::Test { protected: CollectionManagerFilterTest() {} ~CollectionManagerFilterTest() {} void SetUp() { PortHelper::GetPort(&PORT, &PID); std::cout << "Server port: " << PORT << std::endl; std::string index_uri = "127.0.0.1:" + std::to_string(PORT); proxima::be::repository::Config::Instance() .repository_config_.mutable_repository_config() ->set_index_agent_addr(index_uri); std::cout << "Set index addr: " << index_uri << std::endl; } void TearDown() { PortHelper::RemovePortFile(PID); } }; TEST_F(CollectionManagerFilterTest, TestDrop) { brpc::Server server_; MockProximaServiceImpl svc_; brpc::ServerOptions options; ASSERT_EQ(0, server_.AddService(&svc_, brpc::SERVER_DOESNT_OWN_SERVICE)); ASSERT_EQ(0, server_.Start(PORT, &options)); { MockCollectionCreatorPtr collection_creator = std::make_shared(); EXPECT_CALL(*collection_creator, create(_)) .WillRepeatedly(Invoke([](const CollectionInfo &info) -> CollectionPtr { std::string collection_name = info.config().collection_name(); MysqlHandlerPtr mysql_handler = std::make_shared(info.config()); return std::make_shared(info.config(), mysql_handler); })); CollectionManagerPtr collection_manager = std::make_shared(collection_creator); int ret = collection_manager->init(); ASSERT_EQ(0, ret); CollectionInfo info1; CollectionInfo info2; CollectionInfo info3; info1.mutable_config()->set_collection_name("collection1"); info1.set_uuid("collection1-uuid"); info2.mutable_config()->set_collection_name("collection2"); info2.set_uuid("collection2-uuid"); info3.mutable_config()->set_collection_name("collection3"); info3.set_uuid("collection3-uuid"); std::vector collection_infos{info1, info2, info3}; std::vector new_collections; std::vector old_collections; std::vector expired_collections; collection_manager->classify_collections(collection_infos, &new_collections, &old_collections, &expired_collections); EXPECT_EQ(3, new_collections.size()); EXPECT_EQ(0, old_collections.size()); EXPECT_EQ(0, expired_collections.size()); EXPECT_EQ(std::any_of(new_collections.begin(), new_collections.end(), [](const CollectionInfo &info) { return info.config().collection_name() == "collection1" && info.uuid() == "collection1-uuid"; }), true); EXPECT_EQ(std::any_of(new_collections.begin(), new_collections.end(), [](const CollectionInfo &info) { return info.config().collection_name() == "collection2" && info.uuid() == "collection2-uuid"; }), true); EXPECT_EQ(std::any_of(new_collections.begin(), new_collections.end(), [](const CollectionInfo &info) { return info.config().collection_name() == "collection3" && info.uuid() == "collection3-uuid"; }), true); collection_manager->create_collections(new_collections); size_t count = 0; auto created_collection = svc_.get_created_collections(); auto collections_name = svc_.get_collections_name(); while (count < 5) { // in order to sleep enough time if (created_collection.size() == collections_name.size()) { break; } std::this_thread::sleep_for(std::chrono::milliseconds(1000)); created_collection = svc_.get_created_collections(); collections_name = svc_.get_collections_name(); count++; } EXPECT_EQ(created_collection.size(), collection_manager->collections_.size()); collection_manager->update_collections(old_collections); collection_manager->drop_collections(expired_collections); EXPECT_EQ(3, collection_manager->collections_.size()); EXPECT_EQ(1, collection_manager->collections_.count("collection1-uuid")); EXPECT_EQ(1, collection_manager->collections_.count("collection2-uuid")); EXPECT_EQ(1, collection_manager->collections_.count("collection3-uuid")); // Drop collection_infos.clear(); new_collections.clear(); old_collections.clear(); expired_collections.clear(); collection_manager->classify_collections(collection_infos, &new_collections, &old_collections, &expired_collections); EXPECT_EQ(0, new_collections.size()); EXPECT_EQ(0, old_collections.size()); EXPECT_EQ(3, expired_collections.size()); EXPECT_EQ( std::any_of( expired_collections.begin(), expired_collections.end(), [](const std::string &name) { return name == "collection1-uuid"; }), true); EXPECT_EQ( std::any_of( expired_collections.begin(), expired_collections.end(), [](const std::string &name) { return name == "collection2-uuid"; }), true); EXPECT_EQ( std::any_of( expired_collections.begin(), expired_collections.end(), [](const std::string &name) { return name == "collection3-uuid"; }), true); collection_manager->create_collections(new_collections); collection_manager->update_collections(old_collections); collection_manager->drop_collections(expired_collections); collection_manager->clean_invalid_collections(); EXPECT_EQ(0, collection_manager->collections_.size()); ret = collection_manager->stop(); EXPECT_EQ(ret, 0); } ASSERT_EQ(0, server_.Stop(0)); ASSERT_EQ(0, server_.Join()); } ================================================ FILE: tests/repository/collection_manager_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Dec 2020 * \brief */ #include "fake_collection.h" #include "mock_collection_creator.h" #include "port_helper.h" #define private public #define protected public #include "repository/collection_manager.h" #include "repository/repository_common/config.h" #undef private #undef protected #include "mock_index_agent_server.h" using namespace proxima::be::repository; static int PORT = 8010; static int PID = 0; int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } class CollectionManagerTest : public ::testing::Test { protected: CollectionManagerTest() {} ~CollectionManagerTest() {} void SetUp() { PortHelper::GetPort(&PORT, &PID); std::cout << "Server port: " << PORT << std::endl; std::string index_uri = "127.0.0.1:" + std::to_string(PORT); proxima::be::repository::Config::Instance() .repository_config_.mutable_repository_config() ->set_index_agent_addr(index_uri); std::cout << "Set index addr: " << index_uri << std::endl; } void TearDown() { PortHelper::RemovePortFile(PID); } }; TEST_F(CollectionManagerTest, TestGeneral) { brpc::Server server_; MockProximaServiceImpl svc_; brpc::ServerOptions options; ASSERT_EQ(0, server_.AddService(&svc_, brpc::SERVER_DOESNT_OWN_SERVICE)); ASSERT_EQ(0, server_.Start(PORT, &options)); { MockCollectionCreatorPtr collection_creator = std::make_shared(); EXPECT_CALL(*collection_creator, create(_)) .WillRepeatedly(Invoke([](const CollectionInfo &info) -> CollectionPtr { std::string collection_name = info.config().collection_name(); MysqlHandlerPtr mysql_handler = std::make_shared(info.config()); return std::make_shared(info.config(), mysql_handler); })); CollectionManagerPtr collection_manager = std::make_shared(collection_creator); int ret = collection_manager->init(); ASSERT_EQ(0, ret); std::thread start_thread([&] { collection_manager->start(); }); size_t count = 0; auto created_collection = svc_.get_created_collections(); auto collections_name = svc_.get_collections_name(); while (count < 5) { // in order to sleep enough time if (created_collection.size() == collections_name.size()) { break; } std::this_thread::sleep_for(std::chrono::milliseconds(1000)); created_collection = svc_.get_created_collections(); collections_name = svc_.get_collections_name(); count++; } EXPECT_EQ(created_collection.size(), 3); ret = collection_manager->stop(); sleep(2); start_thread.join(); EXPECT_EQ(0, ret); EXPECT_EQ(created_collection.count("collection1"), 1); EXPECT_EQ(created_collection.count("collection2"), 1); EXPECT_EQ(created_collection.count("collection3"), 1); } ASSERT_EQ(0, server_.Stop(0)); ASSERT_EQ(0, server_.Join()); } // todo: Add update test when support update // TEST_F(CollectionManagerTest, TestUpdate) { // MockCollectionCreatorPtr collection_creator = // std::make_shared(); // EXPECT_CALL(*collection_creator, create(_)) // .WillRepeatedly( // Invoke([](const CollectionConfig &config) -> CollectionPtr { // std::string collection_name = config.collection_name(); // MysqlHandlerPtr mysql_handler = // std::make_shared(config); // return std::make_shared(config, // mysql_handler); // })); // CollectionManagerPtr collection_manager = // std::make_shared(collection_creator); // int ret = collection_manager->init(); // ASSERT_EQ(0, ret); // CollectionInfo info1; // CollectionInfo info2; // CollectionInfo info3; // info1.mutable_config()->set_collection_name("collection1"); // info1.set_uuid("collection1-uuid"); // info2.mutable_config()->set_collection_name("collection2"); // info2.set_uuid("collection2-uuid"); // info3.mutable_config()->set_collection_name("collection3"); // info3.set_uuid("collection3-uuid"); // std::vector collection_infos{info1, info2, info3}; // std::vector new_collections; // std::vector old_collections; // std::vector expired_collections; // collection_manager->classify_collections(collection_infos, // &new_collections, // &old_collections, // &expired_collections); // EXPECT_EQ(3, new_collections.size()); // EXPECT_EQ(0, old_collections.size()); // EXPECT_EQ(0, expired_collections.size()); // EXPECT_EQ(std::any_of(new_collections.begin(), new_collections.end(), // [](const CollectionInfo &info) { // return info.config().collection_name() == // "collection1" && // info.uuid() == // "collection1-uuid"; // }), // true); // EXPECT_EQ(std::any_of(new_collections.begin(), new_collections.end(), // [](const CollectionInfo &info) { // return info.config().collection_name() == // "collection2" && // info.uuid() == // "collection2-uuid"; // }), // true); // EXPECT_EQ(std::any_of(new_collections.begin(), new_collections.end(), // [](const CollectionInfo &info) { // return info.config().collection_name() == // "collection3" && // info.uuid() == // "collection3-uuid"; // }), // true); // // collection_manager->create_collections(new_collections); // std::thread worker( // [&]() { collection_manager->create_collections(new_collections); }); // size_t count = 0; // auto created_collection = svc_.get_created_collections(); // auto collections_name = svc_.get_collections_name(); // while (count < 5) { // in order to sleep enough time // if (created_collection.size() == collections_name.size()) { // break; // } // std::this_thread::sleep_for(std::chrono::milliseconds(1000)); // created_collection = svc_.get_created_collections(); // collections_name = svc_.get_collections_name(); // count++; // } // EXPECT_EQ(created_collection.size(), // collection_manager->collections_.size()); // collection_manager->update_collections(old_collections); // collection_manager->drop_collections(expired_collections); // EXPECT_EQ(3, collection_manager->collections_.size()); // EXPECT_EQ(1, collection_manager->collections_.count("collection1-uuid")); // EXPECT_EQ(1, collection_manager->collections_.count("collection2-uuid")); // EXPECT_EQ(1, collection_manager->collections_.count("collection3-uuid")); // // Update // collections_config[0].set_schema_revision(1); // collections_config[1].set_schema_revision(2); // collections_config[2].set_schema_revision(2); // new_collections.clear(); // old_collections.clear(); // expired_collections.clear(); // collection_manager->classify_collections(collections_config, // &new_collections, // &old_collections, // &expired_collections); // EXPECT_EQ(0, new_collections.size()); // EXPECT_EQ(2, old_collections.size()); // EXPECT_EQ(0, expired_collections.size()); // EXPECT_EQ(std::any_of(old_collections.begin(), old_collections.end(), // [](const std::string &name) { // return name == "collection2-uuid"; // }), // true); // EXPECT_EQ(std::any_of(old_collections.begin(), old_collections.end(), // [](const std::string &name) { // return name == "collection3-uuid"; // }), // true); // collection_manager->create_collections(new_collections); // collection_manager->update_collections(old_collections); // collection_manager->drop_collections(expired_collections); // EXPECT_EQ(1, collection_manager->collections_.count("collection1-uuid")); // EXPECT_EQ(1, collection_manager->collections_.count("collection2-uuid")); // EXPECT_EQ(1, collection_manager->collections_.count("collection3-uuid")); // EXPECT_EQ( // 1, // collection_manager->collections_["collection1-uuid"]->schema_revision()); // EXPECT_EQ( // 2, // collection_manager->collections_["collection2-uuid"]->schema_revision()); // EXPECT_EQ( // 2, // collection_manager->collections_["collection3-uuid"]->schema_revision()); // ret = collection_manager->stop(); // EXPECT_EQ(ret, 0); // worker.join(); // ASSERT_EQ(0, server_.Stop(0)); // ASSERT_EQ(0, server_.Join()); // } ================================================ FILE: tests/repository/event_builder.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author DianZhang.Chen * \date Oct 2020 * \brief Mysql Mysql interface definition for bilin engine */ #pragma once //!!! undef VERSION must be after include my_global.h #include #include #include #undef VERSION #include #include "repository/binlog/binlog_event.h" using namespace proxima::be::repository; using namespace ::testing; namespace proxima { namespace be { namespace repository { /*! EventBuilder */ class EventBuilder { public: static void BuildBasicEvent(EventType type, uchar **data) { uchar *buf = *data; uint32_t timestamp = (uint32_t)std::time(nullptr); int4store(buf, timestamp); buf += 4; *buf = (uchar)type; buf += 1; uint32_t server_id = 10000; int4store(buf, server_id); buf += 4; uint32_t event_size = 0; int4store(buf, event_size); buf += 4; uint32_t log_pos = 0; int4store(buf, log_pos); buf += 4; uint16_t flags = 0; int2store(buf, flags); buf += 2; *data = buf; } static std::string BuildQueryEvent(const std::string &db, const std::string &query) { std::string buffer(10240, 0); uchar *data = (uchar *)(&(buffer[0])); uchar *start = data; BuildBasicEvent(QUERY_EVENT, &data); data += 8; // slave_proxy_id + execution time uint8_t schema_length = (uint8_t)db.size(); *data = (uchar)schema_length; data += 1; data += 2; // error-code uint16_t status_var_len = 0; int2store(data, status_var_len); data += 2; data += status_var_len; // status vars memcpy(data, db.data(), db.size()); data += schema_length; *data = '\0'; data += 1; memcpy(data, query.data(), query.size()); data += query.size(); data += 4; // crc size_t len = data - start; buffer.resize(len); return buffer; } static std::string BuildRotateEvent(const std::string &file_name, uint64_t position, bool has_crc = true) { std::string buffer(10240, 0); uchar *data = (uchar *)(&(buffer[0])); uchar *start = data; BuildBasicEvent(ROTATE_EVENT, &data); int8store(data, position); data += 8; memcpy(data, file_name.data(), file_name.size()); data += file_name.size(); if (has_crc) { data += 4; } size_t len = data - start; buffer.resize(len); return buffer; } static void SaveColumnMeta(uchar **data, const std::vector &column_types, const std::vector &column_metas) { std::string buffer(1024, 0); uchar *ptr = (uchar *)(&(buffer[0])); uchar *start = ptr; for (size_t i = 0; i < column_types.size(); ++i) { switch (column_types[i]) { case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_BLOB: case MYSQL_TYPE_MEDIUM_BLOB: case MYSQL_TYPE_LONG_BLOB: case MYSQL_TYPE_DOUBLE: case MYSQL_TYPE_FLOAT: case MYSQL_TYPE_GEOMETRY: case MYSQL_TYPE_JSON: *ptr = (uchar)column_metas[i]; ptr += 1; break; case MYSQL_TYPE_STRING: *(ptr + 1) = (uchar)column_metas[i]; ptr += 2; break; case MYSQL_TYPE_BIT: int2store(ptr, (uint16_t)column_metas[i]); ptr += 2; break; case MYSQL_TYPE_VARCHAR: case MYSQL_TYPE_VAR_STRING: int2store(ptr, (uint16_t)column_metas[i]); ptr += 2; break; case MYSQL_TYPE_NEWDECIMAL: int2store(ptr, (uint16_t)column_metas[i]); ptr += 2; break; case MYSQL_TYPE_TIME2: case MYSQL_TYPE_DATETIME2: case MYSQL_TYPE_TIMESTAMP2: *ptr = (uchar)column_metas[i]; ptr += 1; break; default: break; } } uint32_t meta_len = ptr - start; uchar *cur = *data; *cur = (uchar)meta_len; cur += 1; memcpy(cur, start, meta_len); *data = cur + meta_len; } static std::string BuildTableMapEvent( uint64_t table_id, const std::string &db, const std::string &table, std::vector &column_types, std::vector &column_metas, std::vector &column_nullables) { std::string buffer(10240, 0); uchar *data = (uchar *)(&(buffer[0])); uchar *start = data; BuildBasicEvent(TABLE_MAP_EVENT, &data); // table id int4store(data, (uint32_t)table_id); data += 4; int2store(data, (uint16_t)(table_id >> 32)); data += 2; // flags data += 2; // db *data = (uchar)db.size(); data += 1; memcpy(data, db.data(), db.size()); data += db.size(); data += 1; // table *data = (uchar)table.size(); data += 1; memcpy(data, table.data(), table.size()); data += table.size(); data += 1; // column count *data = (uchar)column_types.size(); data += 1; // column types memcpy(data, column_types.data(), column_types.size()); data += column_types.size(); // column meta SaveColumnMeta(&data, column_types, column_metas); uint32_t null_bytes = (column_nullables.size() + 7) / 8; memset(data, 0, null_bytes); for (size_t i = 0; i < column_nullables.size(); ++i) { if (column_nullables[i]) { *(data + i / 8) = *(data + i / 8) & (0x01 << (i % 8)); } } data += null_bytes; // crc data += 4; size_t len = data - start; buffer.resize(len); return buffer; } static void BuildFieldsValue( const std::vector &column_null, const std::vector &column_types, const std::vector &column_values, const TableMapEventPtr &table_map, uchar **data) { uchar *ptr = *data; // null bits uint32_t bytes = (column_null.size() + 7) / 8; memset(ptr, 0, bytes); uint32_t column_count = column_null.size(); for (uint32_t i = 0; i < column_count; ++i) { if (column_null[i]) { *(ptr + i / 8) = *(ptr + i / 8) & (0x01 << (i % 8)); } } ptr += bytes; for (size_t i = 0; i < column_types.size(); ++i) { int32_t meta = table_map->column_info(i).meta; if (column_values[i].empty()) { continue; } switch (column_types[i]) { case MYSQL_TYPE_TINY: { int8_t value; ailego::StringHelper::ToInt8(column_values[i], &value); *((int8_t *)ptr) = value; ptr += 1; } break; case MYSQL_TYPE_SHORT: { int16_t value; ailego::StringHelper::ToInt16(column_values[i], &value); int2store(ptr, (uint16_t)value); ptr += 2; } break; case MYSQL_TYPE_LONG: { int32_t value; ailego::StringHelper::ToInt32(column_values[i], &value); int4store(ptr, (uint32_t)value); ptr += 4; } break; case MYSQL_TYPE_FLOAT: { float value; ailego::StringHelper::ToFloat(column_values[i], &value); *(float *)ptr = value; ptr += 4; } break; case MYSQL_TYPE_DOUBLE: { double value; ailego::StringHelper::ToDouble(column_values[i], &value); *(double *)ptr = value; ptr += 8; } break; case MYSQL_TYPE_TIMESTAMP: case MYSQL_TYPE_TIMESTAMP2: { uint32_t value; ailego::StringHelper::ToUint32(column_values[i], &value); mi_int4store(ptr, value); ptr += 4; } break; case MYSQL_TYPE_LONGLONG: { int64_t value; ailego::StringHelper::ToInt64(column_values[i], &value); int8store(ptr, value); ptr += 8; } break; case MYSQL_TYPE_INT24: { int32_t value; ailego::StringHelper::ToInt32(column_values[i], &value); int2store(ptr, (uint16_t)value); *(ptr + 2) = (uchar)(((uint32_t)value) >> 16); ptr += 3; } break; case MYSQL_TYPE_DATE: { uint32_t value; ailego::StringHelper::ToUint32(column_values[i], &value); int2store(ptr, (uint16_t)value); *(ptr + 2) = (uchar)(value >> 16); ptr += 3; } break; case MYSQL_TYPE_TIME: case MYSQL_TYPE_TIME2: { int64_t value; ailego::StringHelper::ToInt64(column_values[i], &value); value += TIME_INT_OFS; mi_int3store(ptr, value); ptr += 3; } break; case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_DATETIME2: { int64_t value; ailego::StringHelper::ToInt64(column_values[i], &value); value += DATETIMEF_INT_OFS; mi_int5store(ptr, value); ptr += 5; } break; case MYSQL_TYPE_YEAR: { uint8_t value; ailego::StringHelper::ToUint8(column_values[i], &value); *(uint8_t *)ptr = value; ptr += 1; } break; case MYSQL_TYPE_BIT: break; case MYSQL_TYPE_JSON: break; case MYSQL_TYPE_NEWDECIMAL: break; case MYSQL_TYPE_BLOB: break; case MYSQL_TYPE_VARCHAR: case MYSQL_TYPE_VAR_STRING: { if (meta < 256) { *(uint8_t *)ptr = (uint8_t)column_values[i].size(); ptr += 1; } else { int2store(ptr, (uint16_t)column_values[i].size()); ptr += 2; } memcpy(ptr, column_values[i].data(), column_values[i].size()); ptr += column_values[i].size(); } break; case MYSQL_TYPE_STRING: { memcpy(ptr, column_values[i].data(), column_values[i].size()); ptr += column_values[i].size(); } break; case MYSQL_TYPE_GEOMETRY: break; default: break; } } *data = ptr; } static std::string BuildWriteRowsEvent( uint64_t table_id, const std::vector &column_null, const std::vector &column_types, const std::vector &column_values, const TableMapEventPtr &table_map, EventType event_type = WRITE_ROWS_EVENT_V1, size_t rows_count = 1) { std::string buffer(10240, 0); uchar *data = (uchar *)(&(buffer[0])); uchar *start = data; BuildBasicEvent(event_type, &data); // table id int4store(data, (uint32_t)table_id); data += 4; int2store(data, (uint16_t)(table_id >> 32)); data += 2; // flags data += 2; // extra data int2store(data, (uint16_t)2); data += 2; // columns count uint32_t column_count = column_null.size(); *data = (uchar)column_count; data += 1; // present columns uint32_t bytes = (column_count + 7) / 8; for (uint32_t i = 0; i < bytes; ++i) { *(data + i) = 0xFF; } data += bytes; // rows buffer for (size_t i = 0; i < rows_count; ++i) { BuildFieldsValue(column_null, column_types, column_values, table_map, &data); } // crc data += 4; size_t len = data - start; buffer.resize(len); return buffer; } static std::string BuildDeleteRowsEvent( uint64_t table_id, const std::vector &column_null, const std::vector &column_types, const std::vector &values, const TableMapEventPtr &table_map) { return BuildWriteRowsEvent(table_id, column_null, column_types, values, table_map, DELETE_ROWS_EVENT_V1); } static std::string BuildUpdateRowsEvent( uint64_t table_id, const std::vector &column_null, const std::vector &column_types, const std::vector &old_values, const std::vector &new_values, const TableMapEventPtr &table_map) { std::string buffer(10240, 0); uchar *data = (uchar *)(&(buffer[0])); uchar *start = data; BuildBasicEvent(UPDATE_ROWS_EVENT_V1, &data); // table id int4store(data, (uint32_t)table_id); data += 4; int2store(data, (uint16_t)(table_id >> 32)); data += 2; // flags data += 2; // extra data int2store(data, (uint16_t)2); data += 2; // columns count uint32_t column_count = column_null.size(); *data = (uchar)column_count; data += 1; // present columns update uint32_t bytes = (column_count + 7) / 8; for (uint32_t i = 0; i < bytes; ++i) { *(data + i) = 0xFF; } data += bytes; for (uint32_t i = 0; i < bytes; ++i) { *(data + i) = 0xFF; } data += bytes; // rows buffer BuildFieldsValue(column_null, column_types, old_values, table_map, &data); BuildFieldsValue(column_null, column_types, new_values, table_map, &data); // crc data += 4; size_t len = data - start; buffer.resize(len); return buffer; } static std::string BuildOtherEvent(EventType type) { std::string buffer(10240, 0); uchar *data = (uchar *)(&(buffer[0])); uchar *start = data; BuildBasicEvent(type, &data); data += 4; size_t len = data - start; buffer.resize(len); return buffer; } private: const static int64_t TIME_INT_OFS = 0x800000; const static uint64_t DATETIMEF_INT_OFS = 0x8000000000; }; } // namespace repository } // namespace be } // namespace proxima ================================================ FILE: tests/repository/event_fetcher_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author hongqing.hu * \date Dec 2020 * \brief */ #include #define private public #include "repository/binlog/event_fetcher.h" #include "event_builder.h" #include "mock_mysql_connector.h" #include "mysql_result_builder.h" #undef private #include "repository/repository_common/error_code.h" #include "event_builder.h" using namespace ::proxima::be; using namespace proxima::be::repository; class EventFetcherTest : public testing::Test { protected: void SetUp() { mgr_ = std::make_shared(); ASSERT_TRUE(mgr_); connector_ = std::make_shared(); ASSERT_TRUE(connector_); mgr_->put(connector_); connection_uri_ = "mysql://root:root@127.0.0.1:3306/mytest"; ASSERT_TRUE(ailego::Uri::Parse(connection_uri_.c_str(), &uri_)); table_name_ = "table"; db_ = "mytest"; file_name_ = "binlog.000004"; BuildSchemaInfo(); table_id_ = 1000; } void TearDown() {} void BuildSchemaInfo() { column_types_.push_back(MYSQL_TYPE_LONG); column_types_.push_back(MYSQL_TYPE_VAR_STRING); column_types_.push_back(MYSQL_TYPE_LONG); column_types_.push_back(MYSQL_TYPE_FLOAT); column_types_.push_back(MYSQL_TYPE_VAR_STRING); column_types_.push_back(MYSQL_TYPE_VAR_STRING); column_types_.push_back(MYSQL_TYPE_VAR_STRING); column_metas_.push_back(0); column_metas_.push_back(2); column_metas_.push_back(0); column_metas_.push_back(0); column_metas_.push_back(2); column_metas_.push_back(2); column_metas_.push_back(2); } void InitFetcher() { // init fetcher_ = std::make_shared(mgr_); // set checksum EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(2) .WillOnce(testing::Return(0)) .WillOnce(testing::Return(0)) .RetiresOnSaturation(); // request dump EXPECT_CALL(*connector_, execute_simple_command(_, _, _)) .WillOnce(testing::Return(0)) .RetiresOnSaturation(); int ret = fetcher_->init(file_name_, 4); ASSERT_EQ(ret, 0); } std::string BuildTableMapEventStr() { std::vector column_nulls(column_types_.size(), false); column_nulls[column_types_.size() - 1] = true; std::string table_map = EventBuilder::BuildTableMapEvent( table_id_, db_, table_name_, column_types_, column_metas_, column_nulls); return " " + table_map; } std::string BuildNoMoreDataEvent() { std::string str(1, (char)254); return str; } std::string BuildOtherEventStr(EventType type) { return " " + EventBuilder::BuildOtherEvent(type); } std::string BuildQueryEventStr(const std::string &query) { return " " + EventBuilder::BuildQueryEvent(db_, query); } std::string BuildRotateEventStr(const std::string &file, bool has_crc) { return " " + EventBuilder::BuildRotateEvent(file, 4, has_crc); } std::string BuildWriteRowsEventStr(std::vector &column_values) { std::string event_str = BuildTableMapEventStr(); TableMapEventPtr table_map = std::make_shared( event_str.substr(1).c_str(), event_str.size() - 1); std::vector column_nulls(column_types_.size(), false); std::string rows_str = EventBuilder::BuildWriteRowsEvent( table_id_, column_nulls, column_types_, column_values, table_map); return " " + rows_str; } protected: MysqlConnectorManagerPtr mgr_{}; MockMysqlConnectorPtr connector_{}; std::string connection_uri_{}; ailego::Uri uri_{}; std::string table_name_{}; EventFetcherPtr fetcher_{}; std::string file_name_{}; std::string db_{}; uint64_t table_id_{0}; std::vector column_types_{}; std::vector column_metas_{}; }; TEST_F(EventFetcherTest, TestGeneral) { InitFetcher(); std::string table_map_str = BuildTableMapEventStr(); BasicEventPtr event; EXPECT_CALL(*connector_, client_safe_read(_)) .WillOnce(Invoke([&table_map_str](unsigned long *len) -> int { *len = table_map_str.size(); return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*connector_, data()) .WillOnce(Invoke([&table_map_str]() -> unsigned char * { return (unsigned char *)table_map_str.c_str(); })) .RetiresOnSaturation(); int ret = fetcher_->fetch(&event); ASSERT_EQ(ret, 0); ASSERT_EQ(event->type(), TABLE_MAP_EVENT); } // TEST_F(EventFetcherTest, TestFetchWithReadDataFailed) { // InitFetcher(); // fetcher_->need_reconnect_ = true; // BasicEventPtr event; // EXPECT_CALL(*connector_, reconnect()) // .Times(1) // .WillOnce(testing::Return(false)) // .RetiresOnSaturation(); // int ret = fetcher_->fetch(&event); // ASSERT_EQ(ret, ErrorCode_ConnectMysql); // } // TEST_F(EventFetcherTest, TestFetchWithNoMoreData) { // InitFetcher(); // std::string event_str = BuildNoMoreDataEvent(); // BasicEventPtr event; // EXPECT_CALL(*connector_, client_safe_read(_)) // .WillOnce(Invoke([&event_str](unsigned long *len) -> int { // *len = event_str.size(); // return 0; // })) // .RetiresOnSaturation(); // EXPECT_CALL(*connector_, data()) // .WillOnce(Invoke([&event_str]() -> unsigned char * { // return (unsigned char *)event_str.c_str(); // })) // .RetiresOnSaturation(); // int ret = fetcher_->fetch(&event); // ASSERT_EQ(ret, ErrorCode_BinlogNoMoreData); // } // TEST_F(EventFetcherTest, TestFetchWithQueryEvent) { // InitFetcher(); // std::string event_str = BuildQueryEventStr("test query"); // BasicEventPtr event; // EXPECT_CALL(*connector_, client_safe_read(_)) // .WillOnce(Invoke([&event_str](unsigned long *len) -> int { // *len = event_str.size(); // return 0; // })) // .RetiresOnSaturation(); // EXPECT_CALL(*connector_, data()) // .WillOnce(Invoke([&event_str]() -> unsigned char * { // return (unsigned char *)event_str.c_str(); // })) // .RetiresOnSaturation(); // int ret = fetcher_->fetch(&event); // ASSERT_EQ(ret, 0); // ASSERT_EQ(event->type(), QUERY_EVENT); // } // TEST_F(EventFetcherTest, TestFetchWithRotateEvent) { // InitFetcher(); // std::string event_str = BuildRotateEventStr(file_name_, true); // BasicEventPtr event; // EXPECT_CALL(*connector_, client_safe_read(_)) // .WillOnce(Invoke([&event_str](unsigned long *len) -> int { // *len = event_str.size(); // return 0; // })) // .RetiresOnSaturation(); // EXPECT_CALL(*connector_, data()) // .WillOnce(Invoke([&event_str]() -> unsigned char * { // return (unsigned char *)event_str.c_str(); // })) // .RetiresOnSaturation(); // int ret = fetcher_->fetch(&event); // ASSERT_EQ(ret, 0); // ASSERT_EQ(event->type(), ROTATE_EVENT); // } // TEST_F(EventFetcherTest, TestFetchWithTableMapEvent) { // InitFetcher(); // std::string event_str = BuildTableMapEventStr(); // BasicEventPtr event; // EXPECT_CALL(*connector_, client_safe_read(_)) // .WillOnce(Invoke([&event_str](unsigned long *len) -> int { // *len = event_str.size(); // return 0; // })) // .RetiresOnSaturation(); // EXPECT_CALL(*connector_, data()) // .WillOnce(Invoke([&event_str]() -> unsigned char * { // return (unsigned char *)event_str.c_str(); // })) // .RetiresOnSaturation(); // int ret = fetcher_->fetch(&event); // ASSERT_EQ(ret, 0); // ASSERT_EQ(event->type(), TABLE_MAP_EVENT); // } // TEST_F(EventFetcherTest, TestFetchWithWriteRowsEvent) { // InitFetcher(); // std::vector values = {"1", "name1", "30", "123.456", // "1,2,3,4", "1,2,3,5", "1,2,3,6"}; // std::string event_str = BuildWriteRowsEventStr(values); // BasicEventPtr event; // EXPECT_CALL(*connector_, client_safe_read(_)) // .WillOnce(Invoke([&event_str](unsigned long *len) -> int { // *len = event_str.size(); // return 0; // })) // .RetiresOnSaturation(); // EXPECT_CALL(*connector_, data()) // .WillOnce(Invoke([&event_str]() -> unsigned char * { // return (unsigned char *)event_str.c_str(); // })) // .RetiresOnSaturation(); // int ret = fetcher_->fetch(&event); // ASSERT_EQ(ret, 0); // ASSERT_EQ(event->type(), WRITE_ROWS_EVENT_V1); // } // TEST_F(EventFetcherTest, TestFetchWithOtherEvent) { // InitFetcher(); // std::string event_str = BuildOtherEventStr(HEARTBEAT_LOG_EVENT); // BasicEventPtr event; // EXPECT_CALL(*connector_, client_safe_read(_)) // .WillOnce(Invoke([&event_str](unsigned long *len) -> int { // *len = event_str.size(); // return 0; // })) // .RetiresOnSaturation(); // EXPECT_CALL(*connector_, data()) // .WillOnce(Invoke([&event_str]() -> unsigned char * { // return (unsigned char *)event_str.c_str(); // })) // .RetiresOnSaturation(); // int ret = fetcher_->fetch(&event); // ASSERT_EQ(ret, 0); // ASSERT_EQ(event->type(), HEARTBEAT_LOG_EVENT); // } // TEST_F(EventFetcherTest, TestUpdateLsnInfo) { // InitFetcher(); // std::string file_name("binlog.000001"); // uint64_t position = 4; // // lsn valid // EXPECT_CALL(*connector_, execute_query(_, _, _)) // .Times(1) // .WillOnce(testing::Return(0)) // .RetiresOnSaturation(); // int ret = fetcher_->update_lsn_info(file_name, position); // ASSERT_EQ(ret, 0); // ASSERT_EQ(fetcher_->file_name_, file_name); // ASSERT_EQ(fetcher_->position_, position); // MysqlResultBuilder builder; // MysqlResultWrapperPtr result = builder.BuildShowBinaryLogsResult(); // // lsn invalid // EXPECT_CALL(*connector_, execute_query(_, _, _)) // .Times(2) // .WillOnce(testing::Return(1)) // .WillOnce(Invoke([&result](const std::string &, // MysqlResultWrapperPtr *out, bool) -> int { // *out = result; // return 0; // })) // .RetiresOnSaturation(); // ret = fetcher_->update_lsn_info(file_name, position); // ASSERT_EQ(ret, 0); // ASSERT_EQ(fetcher_->file_name_, "binlog.000004"); // ASSERT_EQ(fetcher_->position_, 4); // } ================================================ FILE: tests/repository/fake_collection.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Jan 2021 * \brief Definition of fake collection */ #pragma once #include #include #define private public #define protected public #include "repository/repository_common/config.h" #undef private #undef protected #include "repository/binlog/mysql_handler.h" #include "repository/collection.h" #include "repository/common_types.h" #include "repository/repository_common/error_code.h" namespace proxima { namespace be { namespace repository { class FakeMysqlCollection; using FakeMysqlCollectionPtr = std::shared_ptr; /*! Mysql Collection */ class FakeMysqlCollection : public Collection { public: //! Constructor FakeMysqlCollection(const proto::CollectionConfig &config, MysqlHandlerPtr mysql_handler) : config_(config), mysql_handler_(std::move(mysql_handler)) {} //! Destructor virtual ~FakeMysqlCollection() { if (work_thread_.joinable()) { work_thread_.join(); } } public: //! Initialize MySQL Collection int init() override; //! Start Collection void run() override; //! Update Collection void update() override; //! Drop Collection void drop() override; //! Get collection state CollectionStatus state() const override; //! Stop collection void stop() override; //! Get collection schema revision uint32_t schema_revision() const override; //! Check if collection is finished bool finished() const override; protected: int init_brpc(); void work_impl(); bool is_valid(); private: std::atomic state_{CollectionStatus::INIT}; proto::CollectionConfig config_; MysqlHandlerPtr mysql_handler_; brpc::Channel channel_; std::shared_ptr stub_; std::thread work_thread_; }; void FakeMysqlCollection::run() { LOG_INFO("Start Fake Mysql Collection. name[%s]", config_.collection_name().c_str()); work_thread_ = std::thread(&FakeMysqlCollection::work_impl, this); } void FakeMysqlCollection::work_impl() { while (is_valid()) { std::this_thread::sleep_for(std::chrono::microseconds(1)); proto::Status response; proto::WriteRequest request; request.set_collection_name(config_.collection_name()); brpc::Controller cntl; stub_->write(&cntl, &request, &response, NULL); } } bool FakeMysqlCollection::is_valid() { if (state_.load() == CollectionStatus::FINISHED) { return false; } return true; } bool FakeMysqlCollection::finished() const { return state() == CollectionStatus::FINISHED; } void FakeMysqlCollection::update() { state_.store(CollectionStatus::UPDATING); // Just fake: ++schema_revision when update collection // real logic should update from brpc // auto current_schema_revision = config_.schema_revision(); // config_.set_schema_revision(++current_schema_revision); } void FakeMysqlCollection::drop() { state_.store(CollectionStatus::FINISHED); } int FakeMysqlCollection::init() { LOG_INFO("Init Fake Mysql Collection. name[%s]", config_.collection_name().c_str()); int ret = init_brpc(); if (ret != 0) { return ret; } proto::CollectionName request; proto::DescribeCollectionResponse response; brpc::Controller cntl; request.set_collection_name(config_.collection_name()); stub_->describe_collection(&cntl, &request, &response, NULL); return 0; } int FakeMysqlCollection::init_brpc() { brpc::ChannelOptions options; auto index_uri = proxima::be::repository::Config::Instance().get_index_agent_uri(); int ret = channel_.Init(index_uri.c_str(), "", &options); if (ret != 0) { LOG_ERROR("Failed to initialize channel"); return ErrorCode_InitChannel; } stub_.reset(new (std::nothrow) proto::ProximaService_Stub(&channel_)); return 0; } CollectionStatus FakeMysqlCollection::state() const { CollectionStatus state = state_.load(); return state; } void FakeMysqlCollection::stop() { LOG_INFO("Stop Fake Mysql Collection. name[%s]", config_.collection_name().c_str()); state_.store(CollectionStatus::FINISHED); if (work_thread_.joinable()) { work_thread_.join(); } } uint32_t FakeMysqlCollection::schema_revision() const { return 0; } } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: tests/repository/field_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author hongqing.hu * \date Dec 2020 * \brief */ #include //!!! undef VERSION must be after include my_global.h #include #undef VERSION extern "C" { #include } #define private public #include "repository/binlog/field.h" #undef private #include "proto/common.pb.h" #include "repository/repository_common/error_code.h" using namespace ::proxima::be; using namespace proxima::be::repository; class FieldTest : public testing::Test { protected: void SetUp() {} void TearDown() {} FieldAttr *CreateFieldAttr(const char *field_name, enum_field_types field_type, unsigned int field_length, unsigned int field_decimals, unsigned int field_flags, bool is_gbk = false) { auto meta = std::make_shared( field_name, field_type, field_length, field_decimals, field_flags); std::string collation("utf8_general_ci"); if (is_gbk) { collation = "gbk_chinese_ci"; } FieldAttr *attr = new FieldAttr(true, true, collation, meta); return attr; } protected: std::string field_name_{"f1"}; }; #define TEST_CREATE_FIELD_TYPE(field_type, field_length, field_decimals, \ field_flags) \ { \ FieldAttr *attr = \ CreateFieldAttr(field_name_.c_str(), field_type, field_length, \ field_decimals, field_flags); \ auto field = FieldFactory::Create(field_name_, *attr); \ delete attr; \ ASSERT_TRUE(field != nullptr); \ } #define CREATE_FIELD(field_type, field_length, field_decimals, field_flags) \ { \ FieldAttr *attr = \ CreateFieldAttr(field_name_.c_str(), field_type, field_length, \ field_decimals, field_flags); \ field = FieldFactory::Create(field_name_, *attr); \ delete attr; \ ASSERT_TRUE(field != nullptr); \ } #define CREATE_FIELD2(field_type, field_length, field_decimals, field_flags, \ gbk) \ { \ FieldAttr *attr = \ CreateFieldAttr(field_name_.c_str(), field_type, field_length, \ field_decimals, field_flags, gbk); \ field = FieldFactory::Create(field_name_, *attr); \ delete attr; \ ASSERT_TRUE(field != nullptr); \ } TEST_F(FieldTest, TestCreateField) { TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_TINY, 1, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_SHORT, 2, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_LONG, 4, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_FLOAT, 4, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_DOUBLE, 8, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_TIMESTAMP, 4, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_TIMESTAMP2, 4, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_LONGLONG, 8, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_INT24, 3, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_DATE, 4, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_TIME, 3, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_TIME2, 3, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_DATETIME, 8, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_DATETIME2, 8, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_YEAR, 1, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_BIT, 8, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_JSON, 16, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_NEWDECIMAL, 20, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_BLOB, 256, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_VARCHAR, 16, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_VAR_STRING, 10, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_STRING, 10, 0, 0); TEST_CREATE_FIELD_TYPE(MYSQL_TYPE_GEOMETRY, 16, 0, 0); } TEST_F(FieldTest, TestFieldTiny) { FieldPtr field; // signed text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_TINY, 1, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("-127", 4, &value)); ASSERT_EQ(value.int32_value(), -127); ASSERT_TRUE(field->unpack_text("127", 3, &value)); ASSERT_EQ(value.int32_value(), 127); } // unsigned text { unsigned int flags = UNSIGNED_FLAG; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_TINY, 1, 0, flags); ASSERT_TRUE(field->unpack_text("6", 1, &value)); ASSERT_EQ(value.uint32_value(), 6); ASSERT_TRUE(field->unpack_text("255", 3, &value)); ASSERT_EQ(value.uint32_value(), 255); } // signed binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; uint8_t data[2] = {(uint8_t)(-10)}; CREATE_FIELD(MYSQL_TYPE_TINY, 1, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 1, info, &value)); ASSERT_EQ(value.int32_value(), -10); } // unsigned binary { unsigned int flags = UNSIGNED_FLAG; proto::GenericValue value; ColumnInfo info; uint8_t data[2] = {255}; CREATE_FIELD(MYSQL_TYPE_TINY, 1, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 1, info, &value)); ASSERT_EQ(value.uint32_value(), 255); } } TEST_F(FieldTest, TestFieldShort) { FieldPtr field; // signed text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_SHORT, 2, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("-128", 4, &value)); ASSERT_EQ(value.int32_value(), -128); ASSERT_TRUE(field->unpack_text("32765", 5, &value)); ASSERT_EQ(value.int32_value(), 32765); } // unsigned text { unsigned int flags = UNSIGNED_FLAG; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_SHORT, 2, 0, flags); ASSERT_TRUE(field->unpack_text("6", 1, &value)); ASSERT_EQ(value.uint32_value(), 6); ASSERT_TRUE(field->unpack_text("65535", 5, &value)); ASSERT_EQ(value.uint32_value(), 65535); } // signed binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; uint8_t data[3] = {1, 2}; CREATE_FIELD(MYSQL_TYPE_SHORT, 2, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 2, info, &value)); ASSERT_EQ(value.int32_value(), 513); } // unsigned binary { unsigned int flags = UNSIGNED_FLAG; proto::GenericValue value; ColumnInfo info; uint8_t data[3] = {2, 1}; CREATE_FIELD(MYSQL_TYPE_SHORT, 2, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 2, info, &value)); ASSERT_EQ(value.uint32_value(), 258); } } TEST_F(FieldTest, TestFieldInt24) { FieldPtr field; // signed text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_INT24, 3, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("-65536", 6, &value)); ASSERT_EQ(value.int32_value(), -65536); ASSERT_TRUE(field->unpack_text("100000", 6, &value)); ASSERT_EQ(value.int32_value(), 100000); } // unsigned text { unsigned int flags = UNSIGNED_FLAG; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_INT24, 3, 0, flags); ASSERT_TRUE(field->unpack_text("100", 3, &value)); ASSERT_EQ(value.uint32_value(), 100); ASSERT_TRUE(field->unpack_text("1234567", 7, &value)); ASSERT_EQ(value.uint32_value(), 1234567); } // signed binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; uint8_t data[3] = {1, 2, 0}; CREATE_FIELD(MYSQL_TYPE_INT24, 3, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 3, info, &value)); ASSERT_EQ(value.int32_value(), 513); } // unsigned binary { unsigned int flags = UNSIGNED_FLAG; proto::GenericValue value; ColumnInfo info; uint8_t data[3] = {2, 1, 0}; CREATE_FIELD(MYSQL_TYPE_INT24, 3, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 3, info, &value)); ASSERT_EQ(value.uint32_value(), 258); } } TEST_F(FieldTest, TestFieldLong) { FieldPtr field; // signed text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_LONG, 4, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("-65536", 6, &value)); ASSERT_EQ(value.int32_value(), -65536); ASSERT_TRUE(field->unpack_text("2000000000", 10, &value)); ASSERT_EQ(value.int32_value(), 2000000000); } // unsigned text { unsigned int flags = UNSIGNED_FLAG; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_LONG, 4, 0, flags); ASSERT_TRUE(field->unpack_text("100", 3, &value)); ASSERT_EQ(value.uint32_value(), 100); ASSERT_TRUE(field->unpack_text("4000000000", 10, &value)); ASSERT_EQ(value.uint32_value(), 4000000000); } // signed binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; uint8_t data[4] = {1, 2, 0, 1}; CREATE_FIELD(MYSQL_TYPE_LONG, 4, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 4, info, &value)); ASSERT_EQ(value.int32_value(), 16777729); } // unsigned binary { unsigned int flags = UNSIGNED_FLAG; proto::GenericValue value; ColumnInfo info; uint8_t data[4] = {2, 1, 0, 255}; CREATE_FIELD(MYSQL_TYPE_LONG, 4, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 4, info, &value)); ASSERT_EQ(value.uint32_value(), 4278190338); } } TEST_F(FieldTest, TestFieldLongLong) { FieldPtr field; // signed text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_LONGLONG, 8, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("-65536", 6, &value)); ASSERT_EQ(value.int64_value(), -65536); ASSERT_TRUE(field->unpack_text("8000000000", 10, &value)); ASSERT_EQ(value.int64_value(), 8000000000); } // unsigned text { unsigned int flags = UNSIGNED_FLAG; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_LONGLONG, 8, 0, flags); ASSERT_TRUE(field->unpack_text("100", 3, &value)); ASSERT_EQ(value.uint64_value(), 100); ASSERT_TRUE(field->unpack_text("8000000000", 10, &value)); ASSERT_EQ(value.uint64_value(), 8000000000); } // signed binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; uint8_t data[8] = {1, 2, 0, 1, 0, 0, 0, 0}; CREATE_FIELD(MYSQL_TYPE_LONGLONG, 8, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 8, info, &value)); ASSERT_EQ(value.int64_value(), 16777729); } // unsigned binary { unsigned int flags = UNSIGNED_FLAG; proto::GenericValue value; ColumnInfo info; uint8_t data[8] = {2, 1, 0, 255, 0, 0, 0, 0}; CREATE_FIELD(MYSQL_TYPE_LONGLONG, 8, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 8, info, &value)); ASSERT_EQ(value.uint64_value(), 4278190338); } } TEST_F(FieldTest, TestFieldFloat) { FieldPtr field; // text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_FLOAT, 4, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("-123.456", 8, &value)); ASSERT_FLOAT_EQ(value.float_value(), -123.456); ASSERT_TRUE(field->unpack_text("2000000000", 10, &value)); ASSERT_EQ(value.float_value(), 2000000000); } // binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; float val = 0.123456; uint8_t *data = (uint8_t *)(&val); CREATE_FIELD(MYSQL_TYPE_FLOAT, 4, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 4, info, &value)); ASSERT_FLOAT_EQ(value.float_value(), 0.123456); } } TEST_F(FieldTest, TestFieldDouble) { FieldPtr field; // text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_DOUBLE, 8, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("-123.456", 8, &value)); ASSERT_DOUBLE_EQ(value.double_value(), -123.456); ASSERT_TRUE(field->unpack_text("2000000000", 10, &value)); ASSERT_EQ(value.double_value(), 2000000000); } // binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; double val = 1234.123456; uint8_t *data = (uint8_t *)(&val); CREATE_FIELD(MYSQL_TYPE_DOUBLE, 8, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 8, info, &value)); ASSERT_DOUBLE_EQ(value.double_value(), 1234.123456); } } TEST_F(FieldTest, TestFieldDecimal) { FieldPtr field; // text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_NEWDECIMAL, 8, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("111.11", 6, &value)); ASSERT_EQ(value.string_value(), "111.11"); } // binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; info.meta = (15 << 8) + 10; uint8_t data[12] = {128, 48, 57, 24, 147, 229, 78, 9}; CREATE_FIELD(MYSQL_TYPE_NEWDECIMAL, 8, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 12, info, &value)); ASSERT_EQ(value.string_value(), "12345.4123456789"); } } TEST_F(FieldTest, TestFieldBit) { FieldPtr field; // text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_BIT, 8, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("65534", 5, &value)); ASSERT_DOUBLE_EQ(value.uint64_value(), 65534); } // binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; uint8_t data[8] = {1, 2, 3, 4, 5, 6, 7, 8}; info.meta = 4; CREATE_FIELD(MYSQL_TYPE_BIT, 8, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); { ASSERT_TRUE(field->unpack_binary(data, data + 1, info, &value)); ASSERT_DOUBLE_EQ(value.uint64_value(), 1); } { info.meta += 256; ASSERT_TRUE(field->unpack_binary(data, data + 2, info, &value)); ASSERT_DOUBLE_EQ(value.uint64_value(), 258); } { info.meta += 256; ASSERT_TRUE(field->unpack_binary(data, data + 3, info, &value)); ASSERT_DOUBLE_EQ(value.uint64_value(), 66051); } { info.meta += 256; ASSERT_TRUE(field->unpack_binary(data, data + 4, info, &value)); ASSERT_DOUBLE_EQ(value.uint64_value(), 16909060); } { info.meta += 256; ASSERT_TRUE(field->unpack_binary(data, data + 5, info, &value)); ASSERT_DOUBLE_EQ(value.uint64_value(), 4328719365); } { info.meta += 256; ASSERT_TRUE(field->unpack_binary(data, data + 6, info, &value)); ASSERT_DOUBLE_EQ(value.uint64_value(), 1108152157446); } { info.meta += 256; ASSERT_TRUE(field->unpack_binary(data, data + 7, info, &value)); ASSERT_DOUBLE_EQ(value.uint64_value(), 283686952306183); } { info.meta += 256; ASSERT_TRUE(field->unpack_binary(data, data + 8, info, &value)); ASSERT_DOUBLE_EQ(value.uint64_value(), 72623859790382856); } } } TEST_F(FieldTest, TestFieldDatetime) { FieldPtr field; // text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_DATETIME, 8, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("2021-01-13 12:12:30.123456", 26, &value)); ASSERT_EQ(value.string_value(), "2021-01-13 12:12:30.123456"); } // binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; uint8_t data[8] = {0x99, 0x81, 0x21, 0x01, 0x01, 0x02, 0x01, 0x01}; info.meta = 0; CREATE_FIELD(MYSQL_TYPE_DATETIME, 8, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); { ASSERT_TRUE(field->unpack_binary(data, data + 5, info, &value)); ASSERT_EQ(value.string_value(), "2008-12-16 16:04:01"); } { info.meta = 1; ASSERT_TRUE(field->unpack_binary(data, data + 6, info, &value)); ASSERT_EQ(value.string_value(), "2008-12-16 16:04:01.0"); } { info.meta = 2; ASSERT_TRUE(field->unpack_binary(data, data + 6, info, &value)); ASSERT_EQ(value.string_value(), "2008-12-16 16:04:01.02"); } { info.meta = 3; ASSERT_TRUE(field->unpack_binary(data, data + 7, info, &value)); ASSERT_EQ(value.string_value(), "2008-12-16 16:04:01.051"); } { info.meta = 4; ASSERT_TRUE(field->unpack_binary(data, data + 7, info, &value)); ASSERT_EQ(value.string_value(), "2008-12-16 16:04:01.0513"); } { info.meta = 5; ASSERT_TRUE(field->unpack_binary(data, data + 8, info, &value)); ASSERT_EQ(value.string_value(), "2008-12-16 16:04:01.13132"); } { info.meta = 6; ASSERT_TRUE(field->unpack_binary(data, data + 8, info, &value)); ASSERT_EQ(value.string_value(), "2008-12-16 16:04:01.131329"); } data[0] = 0x80; for (size_t i = 1; i < 8; ++i) { data[i] = 0x0; } { info.meta = 6; ASSERT_TRUE(field->unpack_binary(data, data + 8, info, &value)); ASSERT_EQ(value.string_value(), "0000-00-00 00:00:00"); } } } TEST_F(FieldTest, TestFieldTimestamp) { FieldPtr field; // text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_TIMESTAMP, 8, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("2021-01-13 12:12:30.123456", 26, &value)); ASSERT_EQ(value.string_value(), "2021-01-13 12:12:30.123456"); } // binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; uint8_t data[8] = {0x60, 0x81, 0x21, 0x01, 0x01, 0x02, 0x01, 0x0}; info.meta = 0; CREATE_FIELD(MYSQL_TYPE_TIMESTAMP, 7, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); { ASSERT_TRUE(field->unpack_binary(data, data + 4, info, &value)); ASSERT_EQ(value.string_value(), "2021-04-22 15:08:49"); } { info.meta = 1; ASSERT_TRUE(field->unpack_binary(data, data + 5, info, &value)); ASSERT_EQ(value.string_value(), "2021-04-22 15:08:49.0"); } { info.meta = 2; ASSERT_TRUE(field->unpack_binary(data, data + 5, info, &value)); ASSERT_EQ(value.string_value(), "2021-04-22 15:08:49.01"); } { info.meta = 3; ASSERT_TRUE(field->unpack_binary(data, data + 6, info, &value)); ASSERT_EQ(value.string_value(), "2021-04-22 15:08:49.025"); } { info.meta = 4; ASSERT_TRUE(field->unpack_binary(data, data + 6, info, &value)); ASSERT_EQ(value.string_value(), "2021-04-22 15:08:49.0258"); } { info.meta = 5; ASSERT_TRUE(field->unpack_binary(data, data + 7, info, &value)); ASSERT_EQ(value.string_value(), "2021-04-22 15:08:49.06604"); } { info.meta = 6; ASSERT_TRUE(field->unpack_binary(data, data + 7, info, &value)); ASSERT_EQ(value.string_value(), "2021-04-22 15:08:49.066049"); } data[0] = 0x0; for (size_t i = 1; i < 8; ++i) { data[i] = 0x0; } { info.meta = 6; ASSERT_TRUE(field->unpack_binary(data, data + 7, info, &value)); ASSERT_EQ(value.string_value(), "0000-00-00 00:00:00.000000"); } } } TEST_F(FieldTest, TestFieldTime) { FieldPtr field; // text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_TIME, 6, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("12:12:30.123456", 15, &value)); ASSERT_EQ(value.string_value(), "12:12:30.123456"); } // binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; uint8_t data[8] = {0x80, 0xe1, 0x21, 0x01, 0x01, 0x02, 0x0, 0x0}; info.meta = 0; CREATE_FIELD(MYSQL_TYPE_TIME, 6, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); { ASSERT_TRUE(field->unpack_binary(data, data + 3, info, &value)); ASSERT_EQ(value.string_value(), "14:04:33"); } { info.meta = 1; ASSERT_TRUE(field->unpack_binary(data, data + 4, info, &value)); ASSERT_EQ(value.string_value(), "14:04:33.0"); } { info.meta = 2; ASSERT_TRUE(field->unpack_binary(data, data + 4, info, &value)); ASSERT_EQ(value.string_value(), "14:04:33.01"); } { info.meta = 3; ASSERT_TRUE(field->unpack_binary(data, data + 5, info, &value)); ASSERT_EQ(value.string_value(), "14:04:33.025"); } { info.meta = 4; ASSERT_TRUE(field->unpack_binary(data, data + 5, info, &value)); ASSERT_EQ(value.string_value(), "14:04:33.0257"); } { info.meta = 5; ASSERT_TRUE(field->unpack_binary(data, data + 6, info, &value)); ASSERT_EQ(value.string_value(), "14:04:33.06579"); } { info.meta = 6; ASSERT_TRUE(field->unpack_binary(data, data + 6, info, &value)); ASSERT_EQ(value.string_value(), "14:04:33.065794"); } data[0] = 0x80; for (size_t i = 1; i < 8; ++i) { data[i] = 0x0; } { info.meta = 6; ASSERT_TRUE(field->unpack_binary(data, data + 6, info, &value)); ASSERT_EQ(value.string_value(), "00:00:00.000000"); } data[0] = 0x70; { info.meta = 6; ASSERT_TRUE(field->unpack_binary(data, data + 6, info, &value)); ASSERT_EQ(value.string_value(), "-256:00:00.000000"); } } } TEST_F(FieldTest, TestFieldDate) { FieldPtr field; // text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_DATE, 3, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("2021-01-13", 10, &value)); ASSERT_EQ(value.string_value(), "2021-01-13"); } // binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; uint8_t data[3] = {0x99, 0x81, 0x10}; info.meta = 0; CREATE_FIELD(MYSQL_TYPE_DATE, 3, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); { ASSERT_TRUE(field->unpack_binary(data, data + 3, info, &value)); ASSERT_EQ(value.string_value(), "2112-12-25"); } for (size_t i = 0; i < 3; ++i) { data[i] = 0x0; } { ASSERT_TRUE(field->unpack_binary(data, data + 3, info, &value)); ASSERT_EQ(value.string_value(), "0000-00-00"); } } } TEST_F(FieldTest, TestFieldYear) { FieldPtr field; // text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_YEAR, 1, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("2021", 4, &value)); ASSERT_EQ(value.string_value(), "2021"); } // binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; uint8_t data[1] = {111}; CREATE_FIELD(MYSQL_TYPE_YEAR, 1, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); { ASSERT_TRUE(field->unpack_binary(data, data + 1, info, &value)); ASSERT_EQ(value.string_value(), "2011"); } for (size_t i = 0; i < 1; ++i) { data[i] = 0x0; } { ASSERT_TRUE(field->unpack_binary(data, data + 1, info, &value)); ASSERT_EQ(value.string_value(), "0000"); } } } TEST_F(FieldTest, TestFieldBlob) { FieldPtr field; // unpack_text { // blob unsigned int flags = BINARY_FLAG; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_BLOB, 8, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("313233343536373839", 18, &value)); ASSERT_EQ(value.bytes_value(), "123456789"); // text flags = 0; CREATE_FIELD(MYSQL_TYPE_BLOB, 8, 0, flags); ASSERT_TRUE(field->unpack_text("123456789", 9, &value)); ASSERT_EQ(value.string_value(), "123456789"); } // unpack_binary (blob) { unsigned int flags = BINARY_FLAG; proto::GenericValue value; ColumnInfo info; uint8_t data[8] = {0x00, 0x00, 0x00, 0x00, 0x30, 0x31, 0x32, 0x33}; info.meta = 0; CREATE_FIELD(MYSQL_TYPE_BLOB, 8, 0, flags); ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); { ASSERT_FALSE(field->unpack_binary(data, data + 4, info, &value)); } { info.meta = 1; data[3] = 0x04; ASSERT_TRUE(field->unpack_binary(data + 3, data + 8, info, &value)); ASSERT_EQ(value.bytes_value(), "0123"); data[3] = 0x00; } { info.meta = 2; data[2] = 0x04; ASSERT_TRUE(field->unpack_binary(data + 2, data + 8, info, &value)); ASSERT_EQ(value.bytes_value(), "0123"); data[2] = 0x00; } { info.meta = 3; data[1] = 0x04; ASSERT_TRUE(field->unpack_binary(data + 1, data + 8, info, &value)); ASSERT_EQ(value.bytes_value(), "0123"); data[1] = 0x00; } { info.meta = 4; data[0] = 0x04; ASSERT_TRUE(field->unpack_binary(data + 0, data + 8, info, &value)); ASSERT_EQ(value.bytes_value(), "0123"); data[0] = 0x00; } { info.meta = 4; data[0] = 0x04; ASSERT_FALSE(field->unpack_binary(data + 0, data + 7, info, &value)); data[0] = 0x00; } } // unpack_binary (text no need convert) { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; uint8_t data[8] = {0x00, 0x00, 0x00, 0x00, 0x30, 0x31, 0x32, 0x33}; info.meta = 0; CREATE_FIELD2(MYSQL_TYPE_BLOB, 8, 0, flags, false); { info.meta = 1; data[3] = 0x04; ASSERT_TRUE(field->unpack_binary(data + 3, data + 8, info, &value)); ASSERT_EQ(value.string_value(), "0123"); data[3] = 0x00; } } // unpack_binary (text need convert) { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; uint8_t data[8] = {0x00, 0x00, 0x00, 0x00, 0xce, 0xd2, 0x32, 0x33}; info.meta = 0; CREATE_FIELD2(MYSQL_TYPE_BLOB, 8, 0, flags, true); { info.meta = 1; data[3] = 0x04; ASSERT_TRUE(field->unpack_binary(data + 3, data + 8, info, &value)); ASSERT_EQ(value.string_value(), "我23"); data[3] = 0x00; } } } TEST_F(FieldTest, TestFieldVarString) { FieldPtr field; // unpack_text (varchar) { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD2(MYSQL_TYPE_VAR_STRING, 8, 0, flags, false); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("123456789", 9, &value)); ASSERT_EQ(value.string_value(), "123456789"); } // unpack_text (varbinary) { unsigned int flags = BINARY_FLAG; proto::GenericValue value; CREATE_FIELD2(MYSQL_TYPE_VAR_STRING, 8, 0, flags, false); ASSERT_TRUE(field->unpack_text("313233343536373839", 18, &value)); ASSERT_EQ(value.bytes_value(), "123456789"); } // unpack_binary (varbinary) { unsigned int flags = BINARY_FLAG; proto::GenericValue value; ColumnInfo info; CREATE_FIELD2(MYSQL_TYPE_VAR_STRING, 8, 0, flags, false); { info.meta = 1; uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x30, 0x31, 0x32, 0x33}; ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 2, info, &value)); ASSERT_EQ(value.bytes_value(), "0"); } { info.meta = 256; uint8_t data[258] = {0x00, 0x01}; std::string result(""); for (size_t i = 2; i < 258; ++i) { data[i] = 0x30; result.append("0"); } ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_FALSE(field->unpack_binary(data, data + 4, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 258, info, &value)); ASSERT_EQ(value.bytes_value(), result); } } // unpack_binary (varchar no need convert) { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; CREATE_FIELD2(MYSQL_TYPE_VAR_STRING, 8, 0, flags, false); { info.meta = 1; uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x30, 0x31, 0x32, 0x33}; ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 2, info, &value)); ASSERT_EQ(value.string_value(), "0"); } } // unpack_binary (varchar need convert) { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; CREATE_FIELD2(MYSQL_TYPE_VAR_STRING, 8, 0, flags, true); { info.meta = 1; uint8_t data[8] = {0x03, 0xce, 0xd2, 0x30, 0x00, 0x00, 0x30, 0x31}; ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 4, info, &value)); ASSERT_EQ(value.string_value(), "我0"); } } } TEST_F(FieldTest, TestFieldString) { FieldPtr field; // unpack_text { // string (char(xx)) unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_STRING, 8, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("123456789", 9, &value)); ASSERT_EQ(value.string_value(), "123456789"); // string (binary(xx)) flags = BINARY_FLAG; CREATE_FIELD(MYSQL_TYPE_STRING, 8, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("313233343536373839", 18, &value)); ASSERT_EQ(value.bytes_value(), "123456789"); // enum flags = ENUM_FLAG; CREATE_FIELD(MYSQL_TYPE_STRING, 8, 0, flags); ASSERT_TRUE(field->unpack_text("1255", 4, &value)); ASSERT_EQ(value.int32_value(), 1255); // set flags = SET_FLAG; CREATE_FIELD(MYSQL_TYPE_STRING, 8, 0, flags); ASSERT_TRUE(field->unpack_text("255", 9, &value)); ASSERT_EQ(value.uint64_value(), 255); } // unpack_binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; CREATE_FIELD(MYSQL_TYPE_STRING, 8, 0, flags); { info.meta = 1; uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x30, 0x31, 0x32, 0x33}; ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 2, info, &value)); ASSERT_EQ(value.string_value(), "0"); } // string { info.meta = 1 | (MYSQL_TYPE_STRING << 8); uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x30, 0x31, 0x32, 0x33}; ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 2, info, &value)); ASSERT_EQ(value.string_value(), "0"); } // set { info.meta = 1 | (MYSQL_TYPE_SET << 8); uint8_t data[2] = {0x01, 0x00}; ASSERT_TRUE(field->unpack_binary(data, data + 2, info, &value)); ASSERT_EQ(value.uint64_value(), 1); } // enum len 1 { info.meta = 1 | (MYSQL_TYPE_ENUM << 8); uint8_t data[2] = {0x01, 0x00}; ASSERT_TRUE(field->unpack_binary(data, data + 2, info, &value)); ASSERT_EQ(value.int32_value(), 1); } // enum len 2 { info.meta = 2 | (MYSQL_TYPE_ENUM << 8); uint8_t data[2] = {0x01, 0x00}; ASSERT_TRUE(field->unpack_binary(data, data + 2, info, &value)); ASSERT_EQ(value.int32_value(), 1); } // enum len 3 { info.meta = 3 | (MYSQL_TYPE_ENUM << 8); uint8_t data[3] = {0x01, 0x00}; ASSERT_FALSE(field->unpack_binary(data, data + 3, info, &value)); } } } TEST_F(FieldTest, TestFieldStringWithParseStringValue) { FieldPtr field; // binary { unsigned int flags = BINARY_FLAG; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_STRING, 256, 0, flags); FieldString *field1 = (FieldString *)field.get(); // len < 256 { uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x30, 0x31, 0x32, 0x33}; ASSERT_FALSE(field1->parse_string_value(data, data, 1, &value)); ASSERT_TRUE(field1->parse_string_value(data, data + 2, 1, &value)); std::string result("0"); result.resize(256); for (size_t i = 0; i < 255; ++i) { result[i + 1] = '\0'; } ASSERT_EQ(value.bytes_value(), result); } // len >= 256 { std::string result; result.resize(256); uint8_t data[258] = {0x00, 0x01}; for (size_t i = 2; i < 258; ++i) { data[i] = 0x30; result[i - 2] = '0'; } ASSERT_FALSE(field1->parse_string_value(data, data, 256, &value)); ASSERT_FALSE(field1->parse_string_value(data, data + 20, 256, &value)); ASSERT_TRUE(field1->parse_string_value(data, data + 258, 256, &value)); ASSERT_EQ(value.bytes_value(), result); } } // string (no need convert) { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD2(MYSQL_TYPE_STRING, 256, 0, flags, false); FieldString *field1 = (FieldString *)field.get(); // len < 256 { uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x30, 0x31, 0x32, 0x33}; ASSERT_FALSE(field1->parse_string_value(data, data, 1, &value)); ASSERT_TRUE(field1->parse_string_value(data, data + 2, 1, &value)); std::string result("0"); ASSERT_EQ(value.string_value(), result); } // len >= 256 { std::string result; result.resize(256); uint8_t data[258] = {0x00, 0x01}; for (size_t i = 2; i < 258; ++i) { data[i] = 0x30; result[i - 2] = '0'; } ASSERT_FALSE(field1->parse_string_value(data, data, 256, &value)); ASSERT_FALSE(field1->parse_string_value(data, data + 20, 256, &value)); ASSERT_TRUE(field1->parse_string_value(data, data + 258, 256, &value)); ASSERT_EQ(value.string_value(), result); } } // string (need convert) { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD2(MYSQL_TYPE_STRING, 256, 0, flags, true); FieldString *field1 = (FieldString *)field.get(); // len < 256 { uint8_t data[8] = {0x03, 0xce, 0xd2, 0x30, 0x00, 0x00, 0x30, 0x31}; ASSERT_FALSE(field1->parse_string_value(data, data, 64, &value)); ASSERT_TRUE(field1->parse_string_value(data, data + 4, 64, &value)); std::string result("我0"); ASSERT_EQ(value.string_value(), result); } } } TEST_F(FieldTest, TestFieldStringWithParseSetValue) { FieldPtr field; { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_STRING, 8, 0, flags); FieldString *field1 = (FieldString *)field.get(); int32_t meta = 0; // len = 1 { meta = 1; uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x30, 0x31, 0x32, 0x33}; ASSERT_FALSE(field1->parse_set_value(data, data, meta, &value)); ASSERT_TRUE(field1->parse_set_value(data, data + 2, meta, &value)); ASSERT_EQ(value.uint64_value(), 1); } // len = 2 { meta = 2; uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x30, 0x31, 0x32, 0x33}; ASSERT_TRUE(field1->parse_set_value(data, data + meta, meta, &value)); ASSERT_EQ(value.uint64_value(), 0x3001); } // len = 3 { meta = 3; uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x30, 0x31, 0x32, 0x33}; ASSERT_TRUE(field1->parse_set_value(data, data + meta, meta, &value)); ASSERT_EQ(value.uint64_value(), 0x3001); } // len = 4 { meta = 4; uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x30, 0x31, 0x32, 0x33}; ASSERT_TRUE(field1->parse_set_value(data, data + meta, meta, &value)); ASSERT_EQ(value.uint64_value(), 0x3001); } // len = 5 { meta = 5; uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04}; ASSERT_TRUE(field1->parse_set_value(data, data + meta, meta, &value)); ASSERT_EQ(value.uint64_value(), 0x0100003001); } // len = 6 { meta = 6; uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04}; ASSERT_TRUE(field1->parse_set_value(data, data + meta, meta, &value)); ASSERT_EQ(value.uint64_value(), 0x020100003001); } // len = 7 { meta = 7; uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04}; ASSERT_TRUE(field1->parse_set_value(data, data + meta, meta, &value)); ASSERT_EQ(value.uint64_value(), 0x03020100003001); } // len = 8 { meta = 8; uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04}; ASSERT_TRUE(field1->parse_set_value(data, data + meta, meta, &value)); ASSERT_EQ(value.uint64_value(), 0x0403020100003001); } // len = 9 { meta = 9; uint8_t data[9] = {0x01, 0x30, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04}; ASSERT_FALSE(field1->parse_set_value(data, data + meta, meta, &value)); } } } TEST_F(FieldTest, TestFieldJson) { FieldPtr field; // text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_JSON, 8, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("[1,2,3,4]", 9, &value)); ASSERT_EQ(value.bytes_value(), "[1,2,3,4]"); } // binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; CREATE_FIELD(MYSQL_TYPE_JSON, 8, 0, flags); { info.meta = 1; uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x30, 0x31, 0x32, 0x33}; ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 2, info, &value)); ASSERT_EQ(value.bytes_value(), "0"); } { info.meta = 2; uint8_t data[8] = {0x02, 0x00, 0x30, 0x30, 0x30, 0x31, 0x32, 0x33}; ASSERT_TRUE(field->unpack_binary(data, data + 8, info, &value)); ASSERT_EQ(value.bytes_value(), "00"); } { info.meta = 3; uint8_t data[8] = {0x03, 0x00, 0x00, 0x30, 0x30, 0x30, 0x32, 0x33}; ASSERT_TRUE(field->unpack_binary(data, data + 8, info, &value)); ASSERT_EQ(value.bytes_value(), "000"); } { info.meta = 4; uint8_t data[8] = {0x04, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30}; ASSERT_TRUE(field->unpack_binary(data, data + 8, info, &value)); ASSERT_EQ(value.bytes_value(), "0000"); } { info.meta = 5; uint8_t data[8] = {0x04, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30}; ASSERT_FALSE(field->unpack_binary(data, data + 8, info, &value)); } } } TEST_F(FieldTest, TestFieldGeometry) { FieldPtr field; // text { unsigned int flags = 0; proto::GenericValue value; CREATE_FIELD(MYSQL_TYPE_GEOMETRY, 8, 0, flags); ASSERT_FALSE(field->unpack_text(nullptr, 0, &value)); ASSERT_TRUE(field->unpack_text("POINT(108.23 34.12)", 19, &value)); ASSERT_EQ(value.bytes_value(), "POINT(108.23 34.12)"); } // binary { unsigned int flags = 0; proto::GenericValue value; ColumnInfo info; CREATE_FIELD(MYSQL_TYPE_GEOMETRY, 8, 0, flags); { info.meta = 1; uint8_t data[8] = {0x01, 0x30, 0x00, 0x00, 0x30, 0x31, 0x32, 0x33}; ASSERT_FALSE(field->unpack_binary(data, data, info, &value)); ASSERT_TRUE(field->unpack_binary(data, data + 2, info, &value)); ASSERT_EQ(value.bytes_value(), "0"); } { info.meta = 2; uint8_t data[8] = {0x02, 0x00, 0x30, 0x30, 0x30, 0x31, 0x32, 0x33}; ASSERT_TRUE(field->unpack_binary(data, data + 8, info, &value)); ASSERT_EQ(value.bytes_value(), "00"); } { info.meta = 3; uint8_t data[8] = {0x03, 0x00, 0x00, 0x30, 0x30, 0x30, 0x32, 0x33}; ASSERT_TRUE(field->unpack_binary(data, data + 8, info, &value)); ASSERT_EQ(value.bytes_value(), "000"); } { info.meta = 4; uint8_t data[8] = {0x04, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30}; ASSERT_TRUE(field->unpack_binary(data, data + 8, info, &value)); ASSERT_EQ(value.bytes_value(), "0000"); } { info.meta = 5; uint8_t data[8] = {0x04, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30}; ASSERT_FALSE(field->unpack_binary(data, data + 8, info, &value)); } } } ================================================ FILE: tests/repository/info_fetcher_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author hongqing.hu * \date Dec 2020 * \brief */ #include #define private public #include "repository/binlog/info_fetcher.h" #include "mock_mysql_connector.h" #undef private #include "repository/repository_common/error_code.h" using namespace ::proxima::be; using namespace proxima::be::repository; class InfoFetcherTest : public testing::Test { protected: void SetUp() { mgr_ = std::make_shared(); ASSERT_TRUE(mgr_); connector_ = std::make_shared(); ASSERT_TRUE(connector_); mgr_->put(connector_); connection_uri_ = "mysql://root:root@127.0.0.1:3306/mytest"; user_ = "root"; password_ = "root"; ASSERT_TRUE(ailego::Uri::Parse(connection_uri_.c_str(), &uri_)); table_name_ = "table"; InitFetcher(); } void TearDown() {} MockMysqlResultWrapperPtr BuildQuerySchemaResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("id", MYSQL_TYPE_LONG, 11, 0, AUTO_INCREMENT_FLAG); result->append_field_meta("name", MYSQL_TYPE_VAR_STRING, 100); result->append_field_meta("age", MYSQL_TYPE_LONG, 11); result->append_field_meta("score", MYSQL_TYPE_FLOAT, 12); result->append_field_meta("vector1", MYSQL_TYPE_VAR_STRING, 1024); result->append_field_meta("vector2", MYSQL_TYPE_VAR_STRING, 1024); result->append_field_meta("vector3", MYSQL_TYPE_VAR_STRING, 1024); std::vector values1 = { "1", "name1", "18", "123.456", "1,2,3,4", "1,2,3,5", "1,2,3,6"}; result->append_row_values(values1); std::vector values2 = { "2", "name2", "19", "223.456", "2,2,3,4", "2,2,3,5", "2,2,3,6"}; result->append_row_values(values2); std::vector values3 = { "3", "name3", "29", "323.456", "3,2,3,4", "3,2,3,5", "3,2,3,6"}; result->append_row_values(values3); return result; } MockMysqlResultWrapperPtr BuildQueryCollationResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("Field", MYSQL_TYPE_VAR_STRING, 11); result->append_field_meta("Type", MYSQL_TYPE_VAR_STRING, 100); result->append_field_meta("Collation", MYSQL_TYPE_VAR_STRING, 11); std::vector values1 = {"id", "", ""}; result->append_row_values(values1); std::vector values2 = {"name", "", "utf8_general_ci"}; result->append_row_values(values2); std::vector values3 = {"age", "", ""}; result->append_row_values(values3); std::vector values4 = {"score", "", "utf8_general_ci"}; result->append_row_values(values4); std::vector values5 = {"vector1", "", "utf8_general_ci"}; result->append_row_values(values5); std::vector values6 = {"vector2", "", "utf8_general_ci"}; result->append_row_values(values6); std::vector values7 = {"vector3", "", "utf8_general_ci"}; result->append_row_values(values7); return result; } MockMysqlResultWrapperPtr BuildInvalidQueryCollationResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("Field", MYSQL_TYPE_VAR_STRING, 11); result->append_field_meta("invalid", MYSQL_TYPE_VAR_STRING, 100); result->append_field_meta("Type", MYSQL_TYPE_VAR_STRING, 100); result->append_field_meta("Collation", MYSQL_TYPE_VAR_STRING, 11); std::vector values1 = {"id", "", "", ""}; result->append_row_values(values1); std::vector values2 = {"name", "", "", "utf8_general_ci"}; result->append_row_values(values2); std::vector values3 = {"age", "", "", ""}; result->append_row_values(values3); std::vector values4 = {"score", "", "", "utf8_general_ci"}; result->append_row_values(values4); std::vector values5 = {"vector1", "", "", "utf8_general_ci"}; result->append_row_values(values5); std::vector values6 = {"vector2", "", "", "utf8_general_ci"}; result->append_row_values(values6); std::vector values7 = {"vector3", "", "", "utf8_general_ci"}; result->append_row_values(values7); return result; } MockMysqlResultWrapperPtr BuildSnapshotResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("File"); result->append_field_meta("Position"); result->append_field_meta("Binlog_Do_DB"); result->append_field_meta("Binlog_Ignore_DB"); result->append_field_meta("Executed_Gtid_Set"); std::vector values1 = {"binlog.000001", "10240", "", "", ""}; result->append_row_values(values1); return result; } MockMysqlResultWrapperPtr BuildInvalidRowsSnapshotResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("File"); result->append_field_meta("Position"); result->append_field_meta("Binlog_Do_DB"); result->append_field_meta("Binlog_Ignore_DB"); result->append_field_meta("Executed_Gtid_Set"); return result; } MockMysqlResultWrapperPtr BuildEmptySnapshotResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("File"); result->append_field_meta("Position"); result->append_field_meta("Binlog_Do_DB"); result->append_field_meta("Binlog_Ignore_DB"); result->append_field_meta("Executed_Gtid_Set"); return result; } MockMysqlResultWrapperPtr BuildInvalidFieldSnapshotResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("File"); result->append_field_meta("Position"); result->append_field_meta("Binlog_Do_DB"); result->append_field_meta("Binlog_Ignore_DB"); // result->append_field_meta("Executed_Gtid_Set"); std::vector values1 = {"binlog.000001", "10240", "", ""}; result->append_row_values(values1); return result; } MockMysqlResultWrapperPtr BuildInvalidSnapshotResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("Invalid"); result->append_field_meta("Position"); result->append_field_meta("Binlog_Do_DB"); result->append_field_meta("Binlog_Ignore_DB"); result->append_field_meta("Executed_Gtid_Set"); std::vector values1 = {"binlog.000001", "10240", "", "", ""}; result->append_row_values(values1); return result; } void BuildCollectionConfig(CollectionConfig &config) { auto *repo = config.mutable_repository_config(); repo->set_repository_type(CollectionConfig::RepositoryConfig::RT_DATABASE); repo->set_repository_name(table_name_); auto *database = repo->mutable_database(); database->set_connection_uri(connection_uri_); database->set_table_name(table_name_); database->set_user(user_); database->set_password(password_); config.add_forward_column_names("name"); config.add_forward_column_names("age"); auto *index1 = config.add_index_column_params(); index1->set_column_name("vector1"); auto *index2 = config.add_index_column_params(); index2->set_column_name("vector2"); } void InitFetcher() { CollectionConfig config; BuildCollectionConfig(config); // init ailego::Uri test_uri = uri_; EXPECT_CALL(*connector_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); fetcher_ = std::make_shared(config, mgr_); int ret = fetcher_->init(); ASSERT_EQ(ret, 0); ASSERT_EQ(fetcher_->database(), "mytest"); } protected: MysqlConnectorManagerPtr mgr_{}; MockMysqlConnectorPtr connector_{}; std::string connection_uri_{}; std::string user_{}; std::string password_{}; ailego::Uri uri_{}; std::string table_name_{}; InfoFetcherPtr fetcher_{}; }; TEST_F(InfoFetcherTest, TestSimple) { // build schema result MockMysqlResultWrapperPtr result1 = BuildQueryCollationResult(); MockMysqlResultWrapperPtr result = BuildQuerySchemaResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce(Invoke([&result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result; return 0; })) .RetiresOnSaturation(); // get table schema TableSchemaPtr schema; int ret = fetcher_->get_table_schema(table_name_, &schema); ASSERT_EQ(ret, 0); auto &forward_ids = schema->selected_forward_ids(); ASSERT_EQ(forward_ids.size(), (size_t)2); ASSERT_EQ(forward_ids[0], (size_t)1); ASSERT_EQ(forward_ids[1], (size_t)2); auto &index_ids = schema->selected_index_ids(); ASSERT_EQ(index_ids.size(), (size_t)2); ASSERT_EQ(index_ids[0], (size_t)4); ASSERT_EQ(index_ids[1], (size_t)5); // get table snapshot MysqlResultWrapperPtr snapshot_result = BuildSnapshotResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(3) .WillOnce(testing::Return(0)) .WillOnce( Invoke([&snapshot_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = snapshot_result; return 0; })) .WillOnce(testing::Return(0)) .RetiresOnSaturation(); std::string file_name; uint64_t position; ret = fetcher_->get_table_snapshot(table_name_, &file_name, &position); ASSERT_EQ(ret, 0); ASSERT_EQ(file_name, "binlog.000001"); ASSERT_EQ(position, (uint64_t)10240); } TEST_F(InfoFetcherTest, TestGetTableSchemaWithExecuteQueryFailed) { // build schema result MockMysqlResultWrapperPtr result1 = BuildQueryCollationResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce(Invoke([](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { return 1; })) .RetiresOnSaturation(); // execute query failed TableSchemaPtr schema; int ret = fetcher_->get_table_schema(table_name_, &schema); ASSERT_EQ(ret, 1); } TEST_F(InfoFetcherTest, TestGetTableSchemaWithGetCollationInfoFailed) { // build schema result MockMysqlResultWrapperPtr result1 = BuildQueryCollationResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(1) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 1; })) .RetiresOnSaturation(); // execute query failed TableSchemaPtr schema; int ret = fetcher_->get_table_schema(table_name_, &schema); ASSERT_EQ(ret, ErrorCode_ExecuteMysql); } TEST_F(InfoFetcherTest, TestGetTableSchemaWithParseTableSchemaFailed) { MockMysqlResultWrapperPtr result = BuildQuerySchemaResult(); MockMysqlResultWrapperPtr result1 = BuildQueryCollationResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce(Invoke([&result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result; return 0; })) .RetiresOnSaturation(); // parse table schema failed TableSchemaPtr schema; fetcher_->selected_fields_->index_fields_.push_back("invalid_column"); int ret = fetcher_->get_table_schema(table_name_, &schema); ASSERT_EQ(ret, ErrorCode_InvalidCollectionConfig); } TEST_F(InfoFetcherTest, TestGetTableSchemaSuccess) { MockMysqlResultWrapperPtr result1 = BuildQueryCollationResult(); MockMysqlResultWrapperPtr result = BuildQuerySchemaResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce(Invoke([&result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result; return 0; })) .RetiresOnSaturation(); // success TableSchemaPtr schema; int ret = fetcher_->get_table_schema(table_name_, &schema); ASSERT_EQ(ret, 0); } TEST_F(InfoFetcherTest, TestGetCollationInfoSuccess) { MockMysqlResultWrapperPtr result1 = BuildQueryCollationResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(1) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .RetiresOnSaturation(); std::map kv; int ret = fetcher_->get_collation_info("t1", kv); ASSERT_EQ(ret, 0); EXPECT_EQ(kv.size(), (size_t)7); EXPECT_EQ(kv["id"], ""); EXPECT_EQ(kv["name"], "utf8_general_ci"); EXPECT_EQ(kv["age"], ""); EXPECT_EQ(kv["score"], "utf8_general_ci"); EXPECT_EQ(kv["vector1"], "utf8_general_ci"); EXPECT_EQ(kv["vector2"], "utf8_general_ci"); EXPECT_EQ(kv["vector3"], "utf8_general_ci"); } TEST_F(InfoFetcherTest, TestGetCollationInfoWithExecuteFailed) { MockMysqlResultWrapperPtr result1 = BuildQueryCollationResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(1) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 1; })) .RetiresOnSaturation(); std::map kv; int ret = fetcher_->get_collation_info("t1", kv); ASSERT_EQ(ret, ErrorCode_ExecuteMysql); } TEST_F(InfoFetcherTest, TestGetCollationInfoWithInvalidResultFailed) { MockMysqlResultWrapperPtr result1 = BuildInvalidQueryCollationResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(1) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .RetiresOnSaturation(); std::map kv; int ret = fetcher_->get_collation_info("t1", kv); ASSERT_EQ(ret, ErrorCode_InvalidMysqlResult); } TEST_F(InfoFetcherTest, TestGetTableSnapshotSuccess) { // get table snapshot MysqlResultWrapperPtr snapshot_result = BuildSnapshotResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(3) .WillOnce(testing::Return(0)) .WillOnce( Invoke([&snapshot_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = snapshot_result; return 0; })) .WillOnce(testing::Return(0)) .RetiresOnSaturation(); std::string file_name; uint64_t position; int ret = fetcher_->get_table_snapshot(table_name_, &file_name, &position); ASSERT_EQ(ret, 0); ASSERT_EQ(file_name, "binlog.000001"); ASSERT_EQ(position, (uint64_t)10240); } TEST_F(InfoFetcherTest, TestGetTableSnapshotWithLockTableFailed) { // get table snapshot EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(1) .WillOnce(testing::Return(1)) .RetiresOnSaturation(); std::string file_name; uint64_t position; int ret = fetcher_->get_table_snapshot(table_name_, &file_name, &position); ASSERT_EQ(ret, ErrorCode_ExecuteMysql); } TEST_F(InfoFetcherTest, TestGetTableSnapshotWithGetInternalFailed) { // get table snapshot MysqlResultWrapperPtr snapshot_result = BuildSnapshotResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(3) .WillOnce(testing::Return(0)) .WillOnce( Invoke([&snapshot_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = snapshot_result; return 1; })) .WillOnce(testing::Return(0)) .RetiresOnSaturation(); std::string file_name; uint64_t position; int ret = fetcher_->get_table_snapshot(table_name_, &file_name, &position); ASSERT_EQ(ret, ErrorCode_ExecuteMysql); } TEST_F(InfoFetcherTest, TestGetTableSnapshotInternalSuccess) { // get table snapshot MysqlResultWrapperPtr snapshot_result = BuildSnapshotResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(1) .WillOnce( Invoke([&snapshot_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = snapshot_result; return 0; })) .RetiresOnSaturation(); std::string file_name; uint64_t position; int ret = fetcher_->get_table_snapshot_internal(&file_name, &position); ASSERT_EQ(ret, 0); ASSERT_EQ(file_name, "binlog.000001"); ASSERT_EQ(position, (uint64_t)10240); } TEST_F(InfoFetcherTest, TestGetTableSnapshotInternalWithExecuteQueryFailed) { // get table snapshot MysqlResultWrapperPtr snapshot_result = BuildSnapshotResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(1) .WillOnce( Invoke([&snapshot_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = snapshot_result; return 1; })) .RetiresOnSaturation(); std::string file_name; uint64_t position; int ret = fetcher_->get_table_snapshot_internal(&file_name, &position); ASSERT_EQ(ret, ErrorCode_ExecuteMysql); } TEST_F(InfoFetcherTest, TestGetTableSnapshotInternalWithInvaildRowsResult) { // get table snapshot MysqlResultWrapperPtr snapshot_result = BuildInvalidRowsSnapshotResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(1) .WillOnce( Invoke([&snapshot_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = snapshot_result; return 0; })) .RetiresOnSaturation(); std::string file_name; uint64_t position; int ret = fetcher_->get_table_snapshot_internal(&file_name, &position); ASSERT_EQ(ret, ErrorCode_InvalidMysqlResult); } TEST_F(InfoFetcherTest, TestGetTableSnapshotInternalWithEmptyRow) { // get table snapshot MysqlResultWrapperPtr snapshot_result = BuildEmptySnapshotResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(1) .WillOnce( Invoke([&snapshot_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = snapshot_result; return 0; })) .RetiresOnSaturation(); std::string file_name; uint64_t position; int ret = fetcher_->get_table_snapshot_internal(&file_name, &position); ASSERT_EQ(ret, ErrorCode_InvalidMysqlResult); } TEST_F(InfoFetcherTest, TestGetTableSnapshotInternalWithInvalidFieldsNum) { // get table snapshot MysqlResultWrapperPtr snapshot_result = BuildInvalidFieldSnapshotResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(1) .WillOnce( Invoke([&snapshot_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = snapshot_result; return 0; })) .RetiresOnSaturation(); std::string file_name; uint64_t position; int ret = fetcher_->get_table_snapshot_internal(&file_name, &position); ASSERT_EQ(ret, ErrorCode_InvalidMysqlResult); } TEST_F(InfoFetcherTest, TestGetTableSnapshotInternalWithInvalidResult) { // get table snapshot MysqlResultWrapperPtr snapshot_result = BuildInvalidSnapshotResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(1) .WillOnce( Invoke([&snapshot_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = snapshot_result; return 0; })) .RetiresOnSaturation(); std::string file_name; uint64_t position; int ret = fetcher_->get_table_snapshot_internal(&file_name, &position); ASSERT_EQ(ret, ErrorCode_InvalidMysqlResult); } ================================================ FILE: tests/repository/lsn_context_format_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Apr 2021 * \brief */ #include "repository/lsn_context_format.h" #include using namespace proxima::be::repository; int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } class LsnContextFormatTest : public ::testing::Test { protected: LsnContextFormatTest() {} ~LsnContextFormatTest() {} void SetUp() {} void TearDown() {} }; TEST_F(LsnContextFormatTest, TestGeneral) { std::string lsn_str = "binlog;123456789;123;0"; auto lsn_context = LsnContextFormat(); lsn_context.parse_from_string(lsn_str); auto filename = lsn_context.file_name(); auto position = lsn_context.position(); auto seq_id = lsn_context.seq_id(); auto mode = lsn_context.mode(); EXPECT_EQ(filename, "binlog"); EXPECT_EQ(position, 123456789); EXPECT_EQ(seq_id, 123); EXPECT_EQ(mode, ScanMode::FULL); lsn_str = "binlog2;87654321;123;1"; lsn_context = LsnContextFormat(); lsn_context.parse_from_string(lsn_str); filename = lsn_context.file_name(); position = lsn_context.position(); seq_id = lsn_context.seq_id(); mode = lsn_context.mode(); EXPECT_EQ(filename, "binlog2"); EXPECT_EQ(position, 87654321); EXPECT_EQ(seq_id, 123); EXPECT_EQ(mode, ScanMode::INCREMENTAL); lsn_context = LsnContextFormat("binlog2", 87654321, 123, ScanMode::INCREMENTAL); auto lsn_str2 = lsn_context.convert_to_string(); EXPECT_EQ(lsn_str, lsn_str2); } ================================================ FILE: tests/repository/mock_collection_creator.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Jan 2021 * \brief Interface of mock collection creator */ #pragma once #include #include "repository/collection_creator.h" using namespace proxima::be::repository; using namespace ::testing; namespace proxima { namespace be { namespace repository { class MockCollectionCreator; using MockCollectionCreatorPtr = std::shared_ptr; /*! Mysql Handler */ class MockCollectionCreator : public CollectionCreator { public: //! Constructor MockCollectionCreator() = default; //! Destructor ~MockCollectionCreator() = default; //! Init Mysql Handler MOCK_METHOD(CollectionPtr, create, (const CollectionInfo &info), (const override)); }; } // namespace repository } // namespace be } // namespace proxima ================================================ FILE: tests/repository/mock_index_agent_server.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Jan 2021 * \brief Definition of mock index agent server */ #include #include #include #include #include #include #include "proto/proxima_be.pb.h" #include "repository/repository_common/error_code.h" #include "repository/repository_common/logger.h" #include "repository/repository_common/version.h" using namespace proxima::be; using namespace ::testing; ///////////////////////////////////// class MockGeneralProximaServiceImpl : public ::proxima::be::proto::ProximaService { public: void create_collection(google::protobuf::RpcController *controller, const ::proxima::be::proto::CollectionConfig *request, ::proxima::be::proto::Status *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->set_code(::proxima::be::repository::ErrorCode_Success.value()); } void drop_collection(google::protobuf::RpcController *controller, const ::proxima::be::proto::CollectionName *request, ::proxima::be::proto::Status *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->set_code(::proxima::be::repository::ErrorCode_Success.value()); } void describe_collection( google::protobuf::RpcController *controller, const ::proxima::be::proto::CollectionName *request, ::proxima::be::proto::DescribeCollectionResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); std::unique_lock ul(server_lock_); auto *info = response->mutable_collection(); auto *config = info->mutable_config(); config->set_collection_name(request->collection_name()); auto lsn_context = info->mutable_latest_lsn_context(); if (!mock_context_store_.empty()) { auto last_lsn_context = mock_context_store_.back(); lsn_context->set_lsn(last_lsn_context.lsn()); lsn_context->set_context(last_lsn_context.context()); } else { lsn_context->set_lsn(0); lsn_context->set_context(""); } response->mutable_status()->set_code( ::proxima::be::repository::ErrorCode_Success.value()); } void list_collections(google::protobuf::RpcController *controller, const ::proxima::be::proto::ListCondition *request, ::proxima::be::proto::ListCollectionsResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->mutable_status()->set_code( ::proxima::be::repository::ErrorCode_Success.value()); } void stats_collection(google::protobuf::RpcController *controller, const ::proxima::be::proto::CollectionName *request, ::proxima::be::proto::StatsCollectionResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->mutable_status()->set_code( ::proxima::be::repository::ErrorCode_Success.value()); } void write(google::protobuf::RpcController *controller, const ::proxima::be::proto::WriteRequest *request, ::proxima::be::proto::Status *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); std::unique_lock ul(server_lock_); LOG_INFO("Mock General ProximaService received request[%s]", request->ShortDebugString().c_str()); auto row_size = request->rows_size(); for (int i = 0; i < row_size; i++) { auto current_row_context = request->rows(i).lsn_context(); mock_context_store_.push_back(current_row_context); } std::string request_string = ""; request->SerializeToString(&request_string); request_strings_.push_back(request_string); server_called_++; response->set_code(::proxima::be::repository::ErrorCode_Success.value()); } void query(google::protobuf::RpcController *controller, const ::proxima::be::proto::QueryRequest *request, ::proxima::be::proto::QueryResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->mutable_status()->set_code( ::proxima::be::repository::ErrorCode_Success.value()); } void get_version(::google::protobuf::RpcController * /* controller */, const proto::GetVersionRequest * /* request */, proto::GetVersionResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->set_version(repository::Version::String()); response->mutable_status()->set_code(0); response->mutable_status()->set_reason(repository::ErrorCode::What(0)); } std::string get_request_string(int idx) { std::unique_lock ul(server_lock_); if ((int)server_called_ <= idx) { return ""; } std::string ret = request_strings_[idx]; return ret; } size_t get_server_called_count() { std::unique_lock ul(server_lock_); return server_called_; } private: std::vector request_strings_; std::vector mock_context_store_; size_t server_called_{0}; std::mutex server_lock_; }; ///////////////////////////////////// // todo: don't use :: class MockRandomProximaServiceImpl : public ::proxima::be::proto::ProximaService { public: void create_collection(google::protobuf::RpcController *controller, const ::proxima::be::proto::CollectionConfig *request, ::proxima::be::proto::Status *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->set_code(::proxima::be::repository::ErrorCode_Success.value()); } void drop_collection(google::protobuf::RpcController *controller, const ::proxima::be::proto::CollectionName *request, ::proxima::be::proto::Status *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->set_code(::proxima::be::repository::ErrorCode_Success.value()); } void describe_collection( google::protobuf::RpcController *controller, const ::proxima::be::proto::CollectionName *request, ::proxima::be::proto::DescribeCollectionResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); std::unique_lock ul(server_lock_); auto next = (expect_ >> 1); auto *info = response->mutable_collection(); auto *config = info->mutable_config(); config->set_collection_name(request->collection_name()); auto lsn_context = info->mutable_latest_lsn_context(); lsn_context->set_lsn(next); for (auto it = mock_context_store_.rbegin(); it != mock_context_store_.rend(); it++) { if (it->lsn() == next) { lsn_context->set_context(it->context()); } } expect_ = next + 1; LOG_INFO("expect_: [%zu]", (size_t)expect_); response->mutable_status()->set_code( ::proxima::be::repository::ErrorCode_Success.value()); } void list_collections(google::protobuf::RpcController *controller, const ::proxima::be::proto::ListCondition *request, ::proxima::be::proto::ListCollectionsResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->mutable_status()->set_code( ::proxima::be::repository::ErrorCode_Success.value()); } void stats_collection(google::protobuf::RpcController *controller, const ::proxima::be::proto::CollectionName *request, ::proxima::be::proto::StatsCollectionResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->mutable_status()->set_code( ::proxima::be::repository::ErrorCode_Success.value()); } void write(google::protobuf::RpcController *controller, const ::proxima::be::proto::WriteRequest *request, ::proxima::be::proto::Status *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); std::unique_lock ul(server_lock_); LOG_INFO("Mock General ProximaService received request[%s]", request->ShortDebugString().c_str()); auto row = request->rows(); uint64_t last_lsn = 0; for (auto it = row.begin(); it != row.end(); it++) { if (it == row.begin()) { first_lsn_ = it->lsn_context().lsn(); EXPECT_EQ(it->lsn_context().lsn(), expect_); } auto current_row_context = it->lsn_context(); mock_context_store_.push_back(current_row_context); last_lsn = current_row_context.lsn(); records_count_++; } server_called_ = true; expect_ = last_lsn + 1; std::mt19937 gen((std::random_device())()); auto temp = (std::uniform_int_distribution(0, 10))(gen); int result = 0; if (temp < 7) { result = ::proxima::be::repository::ErrorCode_Success.value(); } else if (temp < 9) { result = ::proxima::be::repository::ErrorCode_ExceedRateLimit.value(); expect_ = first_lsn_; } else { // todo: Add ErrorCode_MismatchedSchema when support update // result = // ::proxima::be::repository::ErrorCode_MismatchedSchema.value(); result = ::proxima::be::repository::ErrorCode_Success.value(); } LOG_INFO("expect_: [%zu]", (size_t)expect_); response->set_code(result); } void query(google::protobuf::RpcController *controller, const ::proxima::be::proto::QueryRequest *request, ::proxima::be::proto::QueryResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->mutable_status()->set_code( ::proxima::be::repository::ErrorCode_Success.value()); } bool is_server_called() { std::unique_lock ul(server_lock_); return server_called_; } uint64_t get_records_count() { std::unique_lock ul(server_lock_); return records_count_; } void get_version(::google::protobuf::RpcController * /* controller */, const proto::GetVersionRequest * /* request */, proto::GetVersionResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->set_version(repository::Version::String()); response->mutable_status()->set_code(0); response->mutable_status()->set_reason(repository::ErrorCode::What(0)); } private: uint64_t expect_{1}; uint64_t first_lsn_{1}; bool server_called_{false}; uint64_t records_count_{0}; std::vector mock_context_store_; std::mutex server_lock_; }; // Use for manager test class MockProximaServiceImpl : public ::proxima::be::proto::ProximaService { public: void create_collection(google::protobuf::RpcController *controller, const ::proxima::be::proto::CollectionConfig *request, ::proxima::be::proto::Status *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->set_code(::proxima::be::repository::ErrorCode_Success.value()); } void drop_collection(google::protobuf::RpcController *controller, const ::proxima::be::proto::CollectionName *request, ::proxima::be::proto::Status *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->set_code(::proxima::be::repository::ErrorCode_Success.value()); } void describe_collection( google::protobuf::RpcController *controller, const ::proxima::be::proto::CollectionName *request, ::proxima::be::proto::DescribeCollectionResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); std::unique_lock ul(server_lock_); created_collection_.insert(request->collection_name()); auto *info = response->mutable_collection(); auto *config = info->mutable_config(); config->set_collection_name(request->collection_name()); response->mutable_status()->set_code( ::proxima::be::repository::ErrorCode_Success.value()); } void list_collections(google::protobuf::RpcController *controller, const ::proxima::be::proto::ListCondition *request, ::proxima::be::proto::ListCollectionsResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); for (size_t i = 0; i < collections_name_.size(); i++) { auto *current_collection_info = response->add_collections(); // current_config->set_collection_name(collections_name[i]); current_collection_info->set_uuid(collections_uuid_[i]); current_collection_info->set_status( proxima::be::proto::CollectionInfo::CS_SERVING); auto *current_config = current_collection_info->mutable_config(); current_config->set_collection_name(collections_name_[i]); // current_config->set_schema_revision(1); } response->mutable_status()->set_code( ::proxima::be::repository::ErrorCode_Success.value()); } void stats_collection(google::protobuf::RpcController *controller, const ::proxima::be::proto::CollectionName *request, ::proxima::be::proto::StatsCollectionResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->mutable_status()->set_code( ::proxima::be::repository::ErrorCode_Success.value()); } void write(google::protobuf::RpcController *controller, const ::proxima::be::proto::WriteRequest *request, ::proxima::be::proto::Status *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->set_code(::proxima::be::repository::ErrorCode_Success.value()); } void query(google::protobuf::RpcController *controller, const ::proxima::be::proto::QueryRequest *request, ::proxima::be::proto::QueryResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->mutable_status()->set_code( ::proxima::be::repository::ErrorCode_Success.value()); } void get_version(::google::protobuf::RpcController * /* controller */, const proto::GetVersionRequest * /* request */, proto::GetVersionResponse *response, ::google::protobuf::Closure *done) { brpc::ClosureGuard done_guard(done); response->set_version(repository::Version::String()); response->mutable_status()->set_code(0); response->mutable_status()->set_reason(repository::ErrorCode::What(0)); } std::unordered_set get_created_collections() { std::unique_lock ul(server_lock_); return created_collection_; } std::vector get_collections_name() { return collections_name_; } private: std::vector collections_name_{"collection1", "collection2", "collection3"}; std::vector collections_uuid_{ "collection1-uuid", "collection2-uuid", "collection3-uuid"}; std::unordered_set created_collection_{}; std::mutex server_lock_; }; ================================================ FILE: tests/repository/mock_mysql_connector.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author hongqing.hu * \date Dec 2020 * \brief Mock mysql connector interface definition for proxima search engine */ #pragma once #include #include "repository/binlog/mysql_connector.h" using namespace proxima::be::repository; using namespace ::testing; namespace proxima { namespace be { namespace repository { /*! Mock Mysql Connector */ class MockMysqlConnector : public MysqlConnector { public: //! Constructor MockMysqlConnector(){}; //! Destructor virtual ~MockMysqlConnector() {} //! Init Mysql Connector MOCK_METHOD3(init, int(const ailego::Uri &uri, const std::string &user, const std::string &password)); //! Reconnect MOCK_METHOD0(reconnect, bool()); //! Get uri MOCK_CONST_METHOD0(uri, const ailego::Uri &()); //! Get data MOCK_CONST_METHOD0(data, const void *()); //! Execute query MOCK_METHOD3(execute_query, int(const std::string &sql, MysqlResultWrapperPtr *result, bool sync_fetch)); //! Execute simple command MOCK_METHOD3(execute_simple_command, int(enum_server_command command, const unsigned char *arg, size_t arg_length)); //! Client safe read MOCK_METHOD1(client_safe_read, int(unsigned long *len)); }; using MockMysqlConnectorPtr = std::shared_ptr; class MockMysqlResultWrapper : public MysqlResultWrapper { public: //! Constructor MockMysqlResultWrapper() : MysqlResultWrapper(nullptr, nullptr) {} //! Destructor virtual ~MockMysqlResultWrapper() { for (size_t i = 0; i < buffers_.size(); ++i) { delete[] lengths_[i]; for (size_t j = 0; j < fields_num_; ++j) { delete[] buffers_[i][j]; } delete[] buffers_[i]; } buffers_.clear(); } int init() override { return init_value_; } MysqlRow *next() override { if (cur_idx_ < rows_.size()) { MysqlRow *row = &(rows_[cur_idx_]); cur_idx_++; return row; } return nullptr; } bool has_error() override { return has_error_; } void set_has_error(bool has_error) { has_error_ = has_error; } uint32_t fields_num() const override { return fields_num_; } uint32_t rows_num() const override { return (uint32_t)rows_.size(); } const FieldMetaPtr &field_meta(unsigned int i) const override { return fields_[i]; } void append_field_meta(const char *field_name, enum_field_types field_type = MYSQL_TYPE_VAR_STRING, unsigned int field_length = 0, unsigned int field_decimals = 0, unsigned int field_flags = 0) { FieldMetaPtr meta = std::make_shared( field_name, field_type, field_length, field_decimals, field_flags); fields_.emplace_back(meta); fields_num_ = (unsigned int)fields_.size(); } void append_row_values(std::vector &values) { MYSQL_ROW row = new char *[fields_num_]; unsigned long *length = new unsigned long[fields_num_]; for (size_t i = 0; i < values.size(); ++i) { row[i] = new char[values[i].size() + 1]; length[i] = values[i].size(); memcpy(row[i], values[i].data(), length[i]); row[i][length[i]] = '\0'; } MysqlRow mysql_row(fields_num_); mysql_row.reset(row, length); rows_.emplace_back(mysql_row); buffers_.emplace_back(row); lengths_.emplace_back(length); } void reset() { cur_idx_ = 0; } private: bool has_error_{false}; int init_value_{0}; size_t cur_idx_{0}; std::vector rows_{}; std::vector buffers_{}; std::vector lengths_{}; }; using MockMysqlResultWrapperPtr = std::shared_ptr; } // namespace repository } // namespace be } // namespace proxima ================================================ FILE: tests/repository/mock_mysql_handler.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author DianZhang.Chen * \date Oct 2020 * \brief Mysql Mysql interface definition for bilin engine */ #pragma once #include #include "repository/binlog/mysql_handler.h" using namespace proxima::be::repository; using namespace ::testing; namespace proxima { namespace be { namespace repository { class MockMysqlHandler; using MockMysqlHandlerPtr = std::shared_ptr; /*! Mysql Handler */ class MockMysqlHandler : public MysqlHandler { public: //! Constructor MockMysqlHandler(const CollectionConfig &config) : MysqlHandler(config){}; //! Destructor virtual ~MockMysqlHandler() = default; //! Init Mysql Handler MOCK_METHOD1(init, int(ScanMode mode)); //! Start Mysql Handler MOCK_METHOD1(start, int(const LsnContext &context)); //! Reset binlog reader status MOCK_METHOD3(reset_status, int(ScanMode mode, const CollectionConfig &config, const LsnContext &context)); //! Get fields meta MOCK_METHOD2(get_fields_meta, int(GenericValueMetaList *index_tuples, GenericValueMetaList *forward_tuples)); //! Get row data from binlog MOCK_METHOD2(get_next_row_data, int(WriteRequest::Row *row_data, LsnContext *context)); //! Get fields meta MOCK_METHOD1(get_fields_meta, int(WriteRequest::RowMeta *meta)); //! Get table snapshot MOCK_METHOD2(get_table_snapshot, int(std::string *binlog_file, uint64_t *position)); }; } // namespace repository } // namespace be } // namespace proxima ================================================ FILE: tests/repository/mysql_collection_random_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Dec 2020 * \brief */ #include #define private public #define protected public #include "repository/repository_common/config.h" #undef private #undef protected #include "repository/mysql_collection.h" #include "mock_index_agent_server.h" #include "mock_mysql_handler.h" #include "port_helper.h" const std::string collection_name = "mysql_collection_test.info"; static int PORT = 8010; static int PID = 0; //////////////////////////////////////////////////////////////////// class MysqlCollectionRandomTest2 : public ::testing::Test { protected: MysqlCollectionRandomTest2() {} ~MysqlCollectionRandomTest2() {} void SetUp() { PortHelper::GetPort(&PORT, &PID); std::cout << "Server port: " << PORT << std::endl; std::string index_uri = "127.0.0.1:" + std::to_string(PORT); proxima::be::repository::Config::Instance() .repository_config_.mutable_repository_config() ->set_index_agent_addr(index_uri); std::cout << "Set index addr: " << index_uri << std::endl; proxima::be::repository::Config::Instance() .repository_config_.mutable_repository_config() ->set_batch_interval(1000000); std::cout << "Set batch_interval to 1s" << std::endl; } void TearDown() { PortHelper::RemovePortFile(PID); } }; TEST_F(MysqlCollectionRandomTest2, TestGeneral) { brpc::Server server_; MockRandomProximaServiceImpl svc_; brpc::ServerOptions options; ASSERT_EQ(0, server_.AddService(&svc_, brpc::SERVER_DOESNT_OWN_SERVICE)); ASSERT_EQ(0, server_.Start(PORT, &options)); { proto::CollectionConfig config; config.set_collection_name(collection_name); CollectionPtr collection{nullptr}; MockMysqlHandlerPtr mysql_handler = std::make_shared(config); EXPECT_CALL(*mysql_handler, init(_)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, start(_)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, get_next_row_data(Matcher(_), Matcher(_))) .WillRepeatedly(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(1); context->status = RowDataStatus::NORMAL; return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, reset_status(Matcher(_), Matcher(_), Matcher(_))) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, get_fields_meta(_)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, get_table_snapshot(_, _)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); collection.reset(new (std::nothrow) MysqlCollection(config, mysql_handler)); int ret = collection->init(); ASSERT_EQ(ret, 0); CollectionStatus current_state = collection->state(); ASSERT_EQ(current_state, CollectionStatus::INIT); collection->run(); sleep(3); // check value ASSERT_EQ(svc_.is_server_called(), true); LOG_INFO("[test]: Server received records count [%zu]", (size_t)svc_.get_records_count()); current_state = collection->state(); ASSERT_NE(current_state, CollectionStatus::INIT); collection->drop(); sleep(3); current_state = collection->state(); ASSERT_EQ(current_state, CollectionStatus::FINISHED); collection->stop(); sleep(3); LOG_INFO("[test]: Server received records count [%zu]", (size_t)svc_.get_records_count()); } ASSERT_EQ(0, server_.Stop(0)); ASSERT_EQ(0, server_.Join()); } ================================================ FILE: tests/repository/mysql_collection_scan_mode_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Dec 2020 * \brief */ #include #define private public #define protected public #include "repository/repository_common/config.h" #undef private #undef protected #include "repository/mysql_collection.h" #include "mock_index_agent_server.h" #include "mock_mysql_handler.h" #include "port_helper.h" const std::string collection_name = "mysql_collection_test.info"; static int PORT = 8010; static int PID = 0; //////////////////////////////////////////////////////////////////// class MysqlCollectionScanTest2 : public ::testing::Test { protected: MysqlCollectionScanTest2() {} ~MysqlCollectionScanTest2() {} void SetUp() { PortHelper::GetPort(&PORT, &PID); std::cout << "Server port: " << PORT << std::endl; std::string index_uri = "127.0.0.1:" + std::to_string(PORT); proxima::be::repository::Config::Instance() .repository_config_.mutable_repository_config() ->set_index_agent_addr(index_uri); std::cout << "Set index addr: " << index_uri << std::endl; proxima::be::repository::Config::Instance() .repository_config_.mutable_repository_config() ->set_batch_interval(1000000); std::cout << "Set batch_interval to 1s" << std::endl; } void TearDown() { PortHelper::RemovePortFile(PID); } }; TEST_F(MysqlCollectionScanTest2, TestGeneral) { brpc::Server server_; MockGeneralProximaServiceImpl svc_; brpc::ServerOptions options; ASSERT_EQ(0, server_.AddService(&svc_, brpc::SERVER_DOESNT_OWN_SERVICE)); ASSERT_EQ(0, server_.Start(PORT, &options)); { proto::CollectionConfig config; config.set_collection_name(collection_name); CollectionPtr collection{nullptr}; MockMysqlHandlerPtr mysql_handler = std::make_shared(config); EXPECT_CALL(*mysql_handler, init(_)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, start(_)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, get_next_row_data(Matcher(_), Matcher(_))) .WillOnce(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(1); row_data->mutable_lsn_context()->set_lsn(1); context->status = RowDataStatus::NORMAL; return 0; })) .WillOnce(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(2); row_data->mutable_lsn_context()->set_lsn(2); context->status = RowDataStatus::NORMAL; return 0; })) .WillOnce(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(3); context->status = RowDataStatus::NO_MORE_DATA; return 0; })) .WillOnce(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(3); row_data->mutable_lsn_context()->set_lsn(3); context->status = RowDataStatus::NORMAL; return 0; })) .WillOnce(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(4); row_data->mutable_lsn_context()->set_lsn(4); context->status = RowDataStatus::NORMAL; return 0; })) .WillRepeatedly(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(3); context->status = RowDataStatus::SCHEMA_CHANGED; return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, reset_status(Matcher(_), Matcher(_), Matcher(_))) // EXPECT_CALL(*mysql_handler, reset_status(_, _, _)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, get_fields_meta(_)) .WillRepeatedly(Invoke([](proto::WriteRequest::RowMeta *meta) -> int { meta->add_index_column_metas()->set_column_name("index1"); meta->add_index_column_metas()->set_column_name("index2"); meta->add_forward_column_names("forward1"); meta->add_forward_column_names("forward2"); return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, get_table_snapshot(_, _)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); collection.reset(new (std::nothrow) MysqlCollection(config, mysql_handler)); int ret = collection->init(); ASSERT_EQ(ret, 0); CollectionStatus current_state = collection->state(); ASSERT_EQ(current_state, CollectionStatus::INIT); collection->run(); sleep(1); // check value ASSERT_EQ(svc_.get_server_called_count(), 2); proto::WriteRequest request; std::string request_str = svc_.get_request_string(0); ASSERT_EQ(request_str.empty(), false); ret = request.ParseFromString(request_str); ASSERT_EQ(ret, true); auto rows = request.rows(); ASSERT_EQ(rows.size(), 2); auto row1 = rows[0]; auto row2 = rows[1]; // row1 ASSERT_EQ(row1.primary_key(), 1); ASSERT_EQ(row1.lsn_context().lsn(), 1); // row2 ASSERT_EQ(row2.primary_key(), 2); ASSERT_EQ(row2.lsn_context().lsn(), 2); // meta auto meta = request.row_meta(); ASSERT_EQ(meta.index_column_metas_size(), 2); auto index_column_metas = meta.index_column_metas(); ASSERT_EQ(index_column_metas[0].column_name(), "index1"); ASSERT_EQ(index_column_metas[1].column_name(), "index2"); ASSERT_EQ(meta.index_column_metas_size(), 2); auto forward_column_names = meta.forward_column_names(); ASSERT_EQ(forward_column_names[0], "forward1"); ASSERT_EQ(forward_column_names[1], "forward2"); proto::WriteRequest request2; request_str = svc_.get_request_string(1); ASSERT_EQ(request_str.empty(), false); ret = request.ParseFromString(request_str); ASSERT_EQ(ret, true); rows = request.rows(); ASSERT_EQ(rows.size(), 2); row1 = rows[0]; row2 = rows[1]; // row1 ASSERT_EQ(row1.primary_key(), 3); ASSERT_EQ(row1.lsn_context().lsn(), 3); // row2 ASSERT_EQ(row2.primary_key(), 4); ASSERT_EQ(row2.lsn_context().lsn(), 4); // meta meta = request.row_meta(); ASSERT_EQ(meta.index_column_metas_size(), 2); index_column_metas = meta.index_column_metas(); ASSERT_EQ(index_column_metas[0].column_name(), "index1"); ASSERT_EQ(index_column_metas[1].column_name(), "index2"); ASSERT_EQ(meta.index_column_metas_size(), 2); forward_column_names = meta.forward_column_names(); ASSERT_EQ(forward_column_names[0], "forward1"); ASSERT_EQ(forward_column_names[1], "forward2"); // exit collection->stop(); sleep(2); LOG_INFO("MysqlCollectionTest2::TestGeneral PASS"); } ASSERT_EQ(0, server_.Stop(0)); ASSERT_EQ(0, server_.Join()); } ================================================ FILE: tests/repository/mysql_collection_schema_change_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Dec 2020 * \brief */ #include #define private public #define protected public #include "repository/repository_common/config.h" #undef private #undef protected #include "repository/mysql_collection.h" #include "mock_index_agent_server.h" #include "mock_mysql_handler.h" #include "port_helper.h" const std::string collection_name = "mysql_collection_test.info"; static int PORT = 8010; static int PID = 0; //////////////////////////////////////////////////////////////////// class MysqlCollectionSchemaChangeTest2 : public ::testing::Test { protected: MysqlCollectionSchemaChangeTest2() {} ~MysqlCollectionSchemaChangeTest2() {} void SetUp() { PortHelper::GetPort(&PORT, &PID); std::cout << "Server port: " << PORT << std::endl; std::string index_uri = "127.0.0.1:" + std::to_string(PORT); proxima::be::repository::Config::Instance() .repository_config_.mutable_repository_config() ->set_index_agent_addr(index_uri); std::cout << "Set index addr: " << index_uri << std::endl; proxima::be::repository::Config::Instance() .repository_config_.mutable_repository_config() ->set_batch_interval(1000000); std::cout << "Set batch_interval to 1s" << std::endl; } void TearDown() { PortHelper::RemovePortFile(PID); } }; TEST_F(MysqlCollectionSchemaChangeTest2, TestGeneral) { brpc::Server server_; MockGeneralProximaServiceImpl svc_; brpc::ServerOptions options; ASSERT_EQ(0, server_.AddService(&svc_, brpc::SERVER_DOESNT_OWN_SERVICE)); ASSERT_EQ(0, server_.Start(PORT, &options)); { proto::CollectionConfig config; config.set_collection_name(collection_name); CollectionPtr collection{nullptr}; MockMysqlHandlerPtr mysql_handler = std::make_shared(config); EXPECT_CALL(*mysql_handler, init(_)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, start(_)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, get_next_row_data(Matcher(_), Matcher(_))) .WillOnce(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(1); row_data->mutable_lsn_context()->set_lsn(1); context->status = RowDataStatus::NORMAL; return 0; })) .WillOnce(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(2); row_data->mutable_lsn_context()->set_lsn(2); context->status = RowDataStatus::NORMAL; return 0; })) .WillOnce(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(3); context->status = RowDataStatus::SCHEMA_CHANGED; return 0; })) .WillOnce(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(3); row_data->mutable_lsn_context()->set_lsn(3); context->status = RowDataStatus::NORMAL; return 0; })) .WillOnce(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(4); row_data->mutable_lsn_context()->set_lsn(4); context->status = RowDataStatus::NORMAL; return 0; })) .WillRepeatedly(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(3); context->status = RowDataStatus::NO_MORE_DATA; return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, reset_status(Matcher(_), Matcher(_), Matcher(_))) // EXPECT_CALL(*mysql_handler, reset_status(_, _, _)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, get_fields_meta(_)) .WillOnce(Invoke([](proto::WriteRequest::RowMeta *meta) -> int { meta->add_index_column_metas()->set_column_name("index1"); meta->add_index_column_metas()->set_column_name("index2"); meta->add_forward_column_names("forward1"); meta->add_forward_column_names("forward2"); return 0; })) .WillOnce(Invoke([](proto::WriteRequest::RowMeta *meta) -> int { meta->add_index_column_metas()->set_column_name("new-index1"); meta->add_index_column_metas()->set_column_name("new-index2"); meta->add_forward_column_names("new-forward1"); meta->add_forward_column_names("new-forward2"); return 0; })) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, get_table_snapshot(_, _)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); collection.reset(new (std::nothrow) MysqlCollection(config, mysql_handler)); int ret = collection->init(); ASSERT_EQ(ret, 0); CollectionStatus current_state = collection->state(); ASSERT_EQ(current_state, CollectionStatus::INIT); collection->run(); sleep(1); // check value ASSERT_EQ(svc_.get_server_called_count(), 2); proto::WriteRequest request; std::string request_str = svc_.get_request_string(0); ASSERT_EQ(request_str.empty(), false); ret = request.ParseFromString(request_str); ASSERT_EQ(ret, true); auto rows = request.rows(); ASSERT_EQ(rows.size(), 2); auto row1 = rows[0]; auto row2 = rows[1]; // row1 ASSERT_EQ(row1.primary_key(), 1); ASSERT_EQ(row1.lsn_context().lsn(), 1); // row2 ASSERT_EQ(row2.primary_key(), 2); ASSERT_EQ(row2.lsn_context().lsn(), 2); // meta auto meta = request.row_meta(); auto index_column_metas = meta.index_column_metas(); ASSERT_EQ(index_column_metas[0].column_name(), "index1"); ASSERT_EQ(index_column_metas[1].column_name(), "index2"); ASSERT_EQ(meta.index_column_metas_size(), 2); auto forward_column_names = meta.forward_column_names(); ASSERT_EQ(forward_column_names[0], "forward1"); ASSERT_EQ(forward_column_names[1], "forward2"); proto::WriteRequest request2; request_str = svc_.get_request_string(1); ASSERT_EQ(request_str.empty(), false); ret = request.ParseFromString(request_str); ASSERT_EQ(ret, true); rows = request.rows(); ASSERT_EQ(rows.size(), 2); row1 = rows[0]; row2 = rows[1]; // row1 ASSERT_EQ(row1.primary_key(), 3); ASSERT_EQ(row1.lsn_context().lsn(), 3); // row2 ASSERT_EQ(row2.primary_key(), 4); ASSERT_EQ(row2.lsn_context().lsn(), 4); // meta meta = request.row_meta(); index_column_metas = meta.index_column_metas(); ASSERT_EQ(index_column_metas[0].column_name(), "new-index1"); ASSERT_EQ(index_column_metas[1].column_name(), "new-index2"); ASSERT_EQ(meta.index_column_metas_size(), 2); forward_column_names = meta.forward_column_names(); ASSERT_EQ(forward_column_names[0], "new-forward1"); ASSERT_EQ(forward_column_names[1], "new-forward2"); // exit collection->stop(); sleep(2); LOG_INFO("MysqlCollectionTest2::TestGeneral PASS"); } ASSERT_EQ(0, server_.Stop(0)); ASSERT_EQ(0, server_.Join()); } ================================================ FILE: tests/repository/mysql_collection_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Dec 2020 * \brief */ #include #define private public #define protected public #include "repository/repository_common/config.h" #undef private #undef protected #include "repository/mysql_collection.h" #include "mock_index_agent_server.h" #include "mock_mysql_handler.h" #include "port_helper.h" const std::string collection_name = "mysql_collection_test.info"; static int PORT = 8010; static int PID = 0; //////////////////////////////////////////////////////////////////// class MysqlCollectionTest2 : public ::testing::Test { protected: MysqlCollectionTest2() {} ~MysqlCollectionTest2() {} void SetUp() { PortHelper::GetPort(&PORT, &PID); std::cout << "Server port: " << PORT << std::endl; std::string index_uri = "127.0.0.1:" + std::to_string(PORT); proxima::be::repository::Config::Instance() .repository_config_.mutable_repository_config() ->set_index_agent_addr(index_uri); std::cout << "Set index addr: " << index_uri << std::endl; proxima::be::repository::Config::Instance() .repository_config_.mutable_repository_config() ->set_batch_interval(1000000); std::cout << "Set batch_interval to 1s" << std::endl; } void TearDown() { PortHelper::RemovePortFile(PID); } }; TEST_F(MysqlCollectionTest2, TestGeneral) { brpc::Server server_; MockGeneralProximaServiceImpl svc_; brpc::ServerOptions options; ASSERT_EQ(0, server_.AddService(&svc_, brpc::SERVER_DOESNT_OWN_SERVICE)); ASSERT_EQ(0, server_.Start(PORT, &options)); { proto::CollectionConfig config; config.set_collection_name(collection_name); CollectionPtr collection{nullptr}; MockMysqlHandlerPtr mysql_handler = std::make_shared(config); EXPECT_CALL(*mysql_handler, init(_)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, start(_)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, get_next_row_data(Matcher(_), Matcher(_))) // EXPECT_CALL(*mysql_handler, get_next_row_data(_, _)) .WillOnce(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(1); row_data->mutable_lsn_context()->set_lsn(1); row_data->set_operation_type( proxima::be::proto::OperationType::OP_INSERT); row_data->mutable_index_column_values() ->add_values() ->set_string_value("index_column1"); row_data->mutable_index_column_values() ->add_values() ->set_double_value(3.1415926); row_data->mutable_forward_column_values() ->add_values() ->set_string_value("forward_column1"); row_data->mutable_forward_column_values() ->add_values() ->set_double_value(3.1415926); context->status = RowDataStatus::NORMAL; return 0; })) .WillOnce(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(2); row_data->mutable_lsn_context()->set_lsn(2); row_data->set_operation_type( proxima::be::proto::OperationType::OP_UPDATE); row_data->mutable_index_column_values() ->add_values() ->set_string_value("index_column1"); row_data->mutable_index_column_values() ->add_values() ->set_double_value(3.1415926); row_data->mutable_forward_column_values() ->add_values() ->set_string_value("forward_column1"); row_data->mutable_forward_column_values() ->add_values() ->set_double_value(3.1415926); context->status = RowDataStatus::NORMAL; return 0; })) .WillRepeatedly(Invoke( [](proto::WriteRequest::Row *row_data, LsnContext *context) -> int { row_data->set_primary_key(3); context->status = RowDataStatus::NO_MORE_DATA; return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, reset_status(Matcher(_), Matcher(_), Matcher(_))) // EXPECT_CALL(*mysql_handler, reset_status(_, _, _)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, get_fields_meta(_)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); EXPECT_CALL(*mysql_handler, get_table_snapshot(_, _)) .WillRepeatedly(Return(0)) .RetiresOnSaturation(); collection.reset(new (std::nothrow) MysqlCollection(config, mysql_handler)); int ret = collection->init(); ASSERT_EQ(ret, 0); CollectionStatus current_state = collection->state(); ASSERT_EQ(current_state, CollectionStatus::INIT); collection->run(); sleep(1); // check value ASSERT_EQ(svc_.get_server_called_count(), 1); proto::WriteRequest request; std::string request_str = svc_.get_request_string(0); ASSERT_EQ(request_str.empty(), false); ret = request.ParseFromString(request_str); ASSERT_EQ(ret, true); auto rows = request.rows(); ASSERT_EQ(rows.size(), 2); auto row1 = rows[0]; auto row2 = rows[1]; // row1 ASSERT_EQ(row1.primary_key(), 1); ASSERT_EQ(row1.operation_type(), proxima::be::proto::OperationType::OP_INSERT); ASSERT_EQ(row1.lsn_context().lsn(), 1); ASSERT_EQ(row1.index_column_values().values_size(), 2); auto row1_index_columns = row1.index_column_values().values(); auto row1_index_column1 = row1_index_columns[0]; auto row1_index_column2 = row1_index_columns[1]; ASSERT_EQ(row1_index_column1.value_oneof_case(), row1_index_column1.kStringValue); ASSERT_EQ(row1_index_column2.value_oneof_case(), row1_index_column2.kDoubleValue); ASSERT_EQ(row1_index_column1.string_value(), "index_column1"); ASSERT_EQ(row1_index_column2.double_value(), 3.1415926); ASSERT_EQ(row1.forward_column_values().values_size(), 2); auto row1_forward_columns = row1.forward_column_values().values(); auto row1_forward_column1 = row1_forward_columns[0]; auto row1_forward_column2 = row1_forward_columns[1]; ASSERT_EQ(row1_forward_column1.value_oneof_case(), row1_forward_column1.kStringValue); ASSERT_EQ(row1_forward_column2.value_oneof_case(), row1_forward_column2.kDoubleValue); ASSERT_EQ(row1_forward_column1.string_value(), "forward_column1"); ASSERT_EQ(row1_forward_column2.double_value(), 3.1415926); // row2 ASSERT_EQ(row2.primary_key(), 2); ASSERT_EQ(row2.operation_type(), proxima::be::proto::OperationType::OP_UPDATE); ASSERT_EQ(row2.lsn_context().lsn(), 2); ASSERT_EQ(row2.index_column_values().values_size(), 2); auto row2_index_columns = row2.index_column_values().values(); auto row2_index_column1 = row2_index_columns[0]; auto row2_index_column2 = row2_index_columns[1]; ASSERT_EQ(row2_index_column1.value_oneof_case(), row2_index_column1.kStringValue); ASSERT_EQ(row2_index_column2.value_oneof_case(), row2_index_column2.kDoubleValue); ASSERT_EQ(row2_index_column1.string_value(), "index_column1"); ASSERT_EQ(row2_index_column2.double_value(), 3.1415926); ASSERT_EQ(row2.forward_column_values().values_size(), 2); auto row2_forward_columns = row2.forward_column_values().values(); auto row2_forward_column1 = row2_forward_columns[0]; auto row2_forward_column2 = row2_forward_columns[1]; ASSERT_EQ(row2_forward_column1.value_oneof_case(), row2_forward_column1.kStringValue); ASSERT_EQ(row2_forward_column2.value_oneof_case(), row2_forward_column2.kDoubleValue); ASSERT_EQ(row2_forward_column1.string_value(), "forward_column1"); ASSERT_EQ(row2_forward_column2.double_value(), 3.1415926); // exit collection->stop(); sleep(2); LOG_INFO("MysqlCollectionTest2::TestGeneral PASS"); } ASSERT_EQ(0, server_.Stop(0)); ASSERT_EQ(0, server_.Join()); } ================================================ FILE: tests/repository/mysql_handler_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author hongqing.hu * \date Dec 2020 * \brief */ #include #define private public #include "repository/binlog/mysql_handler.h" #include "repository/binlog/table_reader.h" #include "repository/repository_common/error_code.h" #include "event_builder.h" #include "mock_mysql_connector.h" #include "mysql_result_builder.h" #undef private using namespace proxima::be; using namespace proxima::be::repository; class MysqlHandlerTest : public testing::Test { protected: void SetUp() { mgr_ = std::make_shared(); ASSERT_TRUE(mgr_); connector1_ = std::make_shared(); ASSERT_TRUE(connector1_); mgr_->put(connector1_); connector2_ = std::make_shared(); ASSERT_TRUE(connector2_); mgr_->put(connector2_); ctx_.seq_id = 1; InitHandler(); } void TearDown() {} void InitHandler() { builder_.BuildCollectionConfig(); handler_ = std::make_shared(builder_.config_, mgr_); } MockMysqlResultWrapperPtr BuildSnapshotResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("File"); result->append_field_meta("Position"); result->append_field_meta("Binlog_Do_DB"); result->append_field_meta("Binlog_Ignore_DB"); result->append_field_meta("Executed_Gtid_Set"); std::vector values1 = {"binlog.000001", "10240", "", "", ""}; result->append_row_values(values1); return result; } protected: MysqlHandlerPtr handler_{}; MysqlConnectorManagerPtr mgr_{}; MockMysqlConnectorPtr connector1_{}; MockMysqlConnectorPtr connector2_{}; InfoFetcherPtr fetcher_{}; std::vector column_types_{}; std::vector column_metas_{}; LsnContext ctx_; MysqlResultBuilder builder_{}; }; TEST_F(MysqlHandlerTest, TestGeneral) { ScanMode mode = ScanMode::FULL; // for validator MockMysqlResultWrapperPtr version_result = builder_.BuildSelectVersionResult(); MockMysqlResultWrapperPtr binlog_result = builder_.BuildShowBinlogResult(); MockMysqlResultWrapperPtr schema_result = builder_.BuildQuerySchemaResult(); MockMysqlResultWrapperPtr result1 = builder_.BuildQueryCollationResult(); MockMysqlResultWrapperPtr db_result = builder_.BuildSelectDbResult(); MockMysqlResultWrapperPtr scan_result = builder_.BuildScanTableResult(); // for fetcher ailego::Uri test_uri = builder_.uri_; EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(3) .WillOnce( Invoke([&version_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = version_result; return 0; })) .WillOnce( Invoke([&binlog_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = binlog_result; return 0; })) .WillOnce(Invoke([&db_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = db_result; return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*connector1_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); EXPECT_CALL(*connector2_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); EXPECT_CALL(*connector2_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce( Invoke([&schema_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = schema_result; return 0; })) .RetiresOnSaturation(); int ret = handler_->init(mode); ASSERT_EQ(ret, 0); EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(1) .WillOnce(Invoke([&scan_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = scan_result; return 0; })) .RetiresOnSaturation(); ret = handler_->start(ctx_); ASSERT_EQ(ret, 0); // RowData row_data; proto::WriteRequest::Row row_data; LsnContext ctx; ret = handler_->get_next_row_data(&row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(row_data.primary_key(), (uint64_t)1); ASSERT_EQ(ctx.status, RowDataStatus::NORMAL); row_data.Clear(); ret = handler_->get_next_row_data(&row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(row_data.primary_key(), (uint64_t)2); ASSERT_EQ(ctx.status, RowDataStatus::NORMAL); row_data.Clear(); ret = handler_->get_next_row_data(&row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(ctx.status, RowDataStatus::NO_MORE_DATA); row_data.Clear(); // proxima::be::agent::proto::CollectionDataset dataset; proto::WriteRequest::RowMeta meta; ret = handler_->get_fields_meta(&meta); ASSERT_EQ(ret, 0); // ASSERT_EQ(dataset.index_tuples_size(), 2); // ASSERT_EQ(dataset.index_tuples(0).field_name(), "vector1"); // ASSERT_EQ(dataset.index_tuples(0).field_type(), // GenericValueMeta::FT_STRING); // ASSERT_EQ(dataset.index_tuples(1).field_name(), "vector2"); // ASSERT_EQ(dataset.index_tuples(1).field_type(), // GenericValueMeta::FT_STRING); ASSERT_EQ(dataset.forward_tuples_size(), 2); // ASSERT_EQ(dataset.forward_tuples(0).field_name(), "name"); // ASSERT_EQ(dataset.forward_tuples(1).field_name(), "age"); ASSERT_EQ(meta.forward_column_names(0), "name"); ASSERT_EQ(meta.forward_column_names(1), "age"); ASSERT_EQ(meta.index_column_metas(0).column_name(), "vector1"); ASSERT_EQ(meta.index_column_metas(1).column_name(), "vector2"); // reset status EXPECT_CALL(*connector2_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); result1->reset(); EXPECT_CALL(*connector2_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce( Invoke([&schema_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = schema_result; return 0; })) .RetiresOnSaturation(); // first set check sum and update lsn info EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(2) .WillOnce(::testing::Return(0)) .WillOnce(::testing::Return(0)) .RetiresOnSaturation(); // second request dump EXPECT_CALL(*connector1_, execute_simple_command(_, _, _)) .WillOnce(::testing::Return(0)) .RetiresOnSaturation(); mode = ScanMode::INCREMENTAL; ctx_.file_name = "binlog.000003"; ctx_.position = 4; ret = handler_->reset_status(mode, builder_.config_, ctx_); ASSERT_EQ(ret, 0); // fetch data std::string table_map_str = builder_.BuildTableMapEventStr(); std::vector values = {"1", "name1", "30", "123.456", "1,2,3,4", "1,2,3,5", "1,2,3,6"}; std::string write_rows_str = builder_.BuildWriteRowsEventStr(values); EXPECT_CALL(*connector1_, client_safe_read(_)) .Times(2) .WillOnce(Invoke([&table_map_str](unsigned long *len) -> int { *len = table_map_str.size(); return 0; })) .WillOnce(Invoke([&write_rows_str](unsigned long *len) -> int { *len = write_rows_str.size(); return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*connector1_, data()) .Times(2) .WillOnce(Invoke([&table_map_str]() -> const void * { return (const void *)table_map_str.c_str(); })) .WillOnce(Invoke([&write_rows_str]() -> const void * { return (const void *)write_rows_str.c_str(); })) .RetiresOnSaturation(); row_data.Clear(); ret = handler_->get_next_row_data(&row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(ctx.status, RowDataStatus::NORMAL); ASSERT_EQ(row_data.primary_key(), (uint64_t)1); ASSERT_EQ(row_data.forward_column_values().values(0).string_value(), "name1"); ASSERT_EQ(row_data.forward_column_values().values(1).int32_value(), 30); ASSERT_EQ(row_data.index_column_values().values(0).string_value(), "1,2,3,4"); ASSERT_EQ(row_data.index_column_values().values(1).string_value(), "1,2,3,5"); } TEST_F(MysqlHandlerTest, TestInit) { ScanMode mode = ScanMode::FULL; // connection manager init failed { auto config1 = builder_.config_; config1.mutable_repository_config()->mutable_database()->set_connection_uri( "invalid"); MysqlHandlerPtr handler = std::make_shared(config1); int ret = handler->init(mode); ASSERT_EQ(ret, ErrorCode_InvalidArgument); } // validate mysql failed { MysqlHandlerPtr handler = std::make_shared(builder_.config_); int ret = handler->init(mode); ASSERT_EQ(ret, ErrorCode_RuntimeError); } // success { MysqlHandlerPtr handler = std::make_shared(builder_.config_, mgr_); // for validator MockMysqlResultWrapperPtr version_result = builder_.BuildSelectVersionResult(); MockMysqlResultWrapperPtr binlog_result = builder_.BuildShowBinlogResult(); MockMysqlResultWrapperPtr db_result = builder_.BuildSelectDbResult(); MockMysqlResultWrapperPtr schema_result = builder_.BuildQuerySchemaResult(); MockMysqlResultWrapperPtr result1 = builder_.BuildQueryCollationResult(); // for fetcher ailego::Uri test_uri = builder_.uri_; EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(3) .WillOnce( Invoke([&version_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = version_result; return 0; })) .WillOnce( Invoke([&binlog_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = binlog_result; return 0; })) .WillOnce(Invoke([&db_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = db_result; return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*connector1_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); EXPECT_CALL(*connector2_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); EXPECT_CALL(*connector2_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce( Invoke([&schema_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = schema_result; return 0; })) .RetiresOnSaturation(); int ret = handler_->init(mode); ASSERT_EQ(ret, 0); ret = handler_->init(mode); ASSERT_EQ(ret, ErrorCode_RepeatedInitialized); } } TEST_F(MysqlHandlerTest, TestStart) { ScanMode mode = ScanMode::FULL; // connection manager init failed { auto config1 = builder_.config_; config1.mutable_repository_config()->mutable_database()->set_connection_uri( "invalid"); MysqlHandlerPtr handler = std::make_shared(config1); int ret = handler->init(mode); ASSERT_EQ(ret, ErrorCode_InvalidArgument); } // validate mysql failed { MysqlHandlerPtr handler = std::make_shared(builder_.config_); int ret = handler->init(mode); ASSERT_EQ(ret, ErrorCode_RuntimeError); } // success { MysqlHandlerPtr handler = std::make_shared(builder_.config_, mgr_); // for validator MockMysqlResultWrapperPtr version_result = builder_.BuildSelectVersionResult(); MockMysqlResultWrapperPtr binlog_result = builder_.BuildShowBinlogResult(); MockMysqlResultWrapperPtr db_result = builder_.BuildSelectDbResult(); MockMysqlResultWrapperPtr schema_result = builder_.BuildQuerySchemaResult(); MockMysqlResultWrapperPtr result1 = builder_.BuildQueryCollationResult(); MockMysqlResultWrapperPtr scan_result = builder_.BuildScanTableResult(); // for fetcher ailego::Uri test_uri = builder_.uri_; EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(3) .WillOnce( Invoke([&version_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = version_result; return 0; })) .WillOnce( Invoke([&binlog_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = binlog_result; return 0; })) .WillOnce(Invoke([&db_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = db_result; return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*connector1_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); EXPECT_CALL(*connector2_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); EXPECT_CALL(*connector2_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce( Invoke([&schema_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = schema_result; return 0; })) .RetiresOnSaturation(); int ret = handler_->init(mode); ASSERT_EQ(ret, 0); EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(1) .WillOnce( Invoke([&scan_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = scan_result; return 0; })) .RetiresOnSaturation(); ret = handler_->start(ctx_); ASSERT_EQ(ret, 0); } } TEST_F(MysqlHandlerTest, TestValidateMysql) { // validator init failed MysqlConnectorManagerPtr mgr; MysqlHandler handler1(builder_.config_, mgr); int ret = handler1.validate_mysql(); ASSERT_EQ(ret, ErrorCode_RuntimeError); MysqlHandler handler(builder_.config_, mgr_); MockMysqlResultWrapperPtr version_result = builder_.BuildSelectVersionResult(); MockMysqlResultWrapperPtr binlog_result = builder_.BuildShowBinlogResult(); MockMysqlResultWrapperPtr db_result = builder_.BuildSelectDbResult(); // validate version failed { EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(1) .WillOnce(testing::Return(1)) .RetiresOnSaturation(); ret = handler.validate_mysql(); ASSERT_EQ(ret, ErrorCode_UnsupportedMysqlVersion); } // validate binlog format failed { EXPECT_CALL(*connector2_, execute_query(_, _, _)) .Times(2) .WillOnce( Invoke([&version_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = version_result; return 0; })) .WillOnce( Invoke([&binlog_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = binlog_result; return 2; })) .RetiresOnSaturation(); ret = handler.validate_mysql(); ASSERT_EQ(ret, ErrorCode_UnsupportedBinlogFormat); } // validate database exist failed ailego::Uri test_uri = builder_.uri_; EXPECT_CALL(*connector1_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); { version_result->reset(); binlog_result->reset(); EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(3) .WillOnce( Invoke([&version_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = version_result; return 0; })) .WillOnce( Invoke([&binlog_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = binlog_result; return 0; })) .WillOnce(Invoke([&db_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = db_result; return 3; })) .RetiresOnSaturation(); ret = handler.validate_mysql(); ASSERT_EQ(ret, ErrorCode_InvalidCollectionConfig); } // success version_result->reset(); binlog_result->reset(); db_result->reset(); EXPECT_CALL(*connector2_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); EXPECT_CALL(*connector2_, execute_query(_, _, _)) .Times(3) .WillOnce( Invoke([&version_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = version_result; return 0; })) .WillOnce( Invoke([&binlog_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = binlog_result; return 0; })) .WillOnce(Invoke([&db_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = db_result; return 0; })) .RetiresOnSaturation(); ret = handler.validate_mysql(); ASSERT_EQ(ret, 0); } TEST_F(MysqlHandlerTest, TestGetTableSnapshot) { // not init std::string binlog_file; uint64_t position; int ret = handler_->get_table_snapshot(&binlog_file, &position); ASSERT_EQ(ret, ErrorCode_NoInitialized); // // for validator MockMysqlResultWrapperPtr version_result = builder_.BuildSelectVersionResult(); MockMysqlResultWrapperPtr binlog_result = builder_.BuildShowBinlogResult(); MockMysqlResultWrapperPtr schema_result = builder_.BuildQuerySchemaResult(); MockMysqlResultWrapperPtr result1 = builder_.BuildQueryCollationResult(); MockMysqlResultWrapperPtr db_result = builder_.BuildSelectDbResult(); MockMysqlResultWrapperPtr scan_result = builder_.BuildScanTableResult(); // for fetcher ailego::Uri test_uri = builder_.uri_; EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(3) .WillOnce( Invoke([&version_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = version_result; return 0; })) .WillOnce( Invoke([&binlog_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = binlog_result; return 0; })) .WillOnce(Invoke([&db_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = db_result; return 0; })) .RetiresOnSaturation(); EXPECT_CALL(*connector1_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); EXPECT_CALL(*connector2_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); EXPECT_CALL(*connector2_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce( Invoke([&schema_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = schema_result; return 0; })) .RetiresOnSaturation(); ret = handler_->init(ScanMode::FULL); ASSERT_EQ(ret, 0); EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(1) .WillOnce(Invoke([&scan_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = scan_result; return 0; })) .RetiresOnSaturation(); ret = handler_->start(ctx_); ASSERT_EQ(ret, 0); // get table snapshot MysqlResultWrapperPtr snapshot_result = BuildSnapshotResult(); EXPECT_CALL(*connector2_, execute_query(_, _, _)) .Times(3) .WillOnce(testing::Return(0)) .WillOnce( Invoke([&snapshot_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = snapshot_result; return 0; })) .WillOnce(testing::Return(0)) .RetiresOnSaturation(); // success ret = handler_->get_table_snapshot(&binlog_file, &position); ASSERT_EQ(ret, 0); ASSERT_EQ(binlog_file, "binlog.000001"); ASSERT_EQ(position, (uint64_t)10240); // get info fetcher failed TableReader *reader = (TableReader *)((MysqlHandler *)handler_.get())->mysql_reader_.get(); reader->info_fetcher_ = nullptr; ret = handler_->get_table_snapshot(&binlog_file, &position); ASSERT_EQ(ret, ErrorCode_RuntimeError); } ///////////////////////////////// // TEST_F(MysqlHandlerTest, TestSimple) { // bool flag = true; // CollectionConfig config; // config.set_connection_uri("mysql://root:root@11.139.203.151:3306/mytest"); // config.set_repository_table("mt933"); // config.add_forward_columns("name"); // config.add_forward_columns("age"); // config.add_forward_columns("score"); // config.add_forward_columns("f1"); // config.add_forward_columns("f2"); // config.add_forward_columns("f3"); // config.add_forward_columns("f4"); // config.add_forward_columns("f5"); // config.add_forward_columns("f6"); // config.add_forward_columns("f10"); // config.add_forward_columns("f11"); // config.add_forward_columns("f12"); // config.add_forward_columns("f13"); // if (flag) { // config.add_forward_columns("f14"); // } // config.add_index_columns("f9"); // MysqlHandler handler(config); // LsnContext ctx; // ctx.seq_id = 0; // int ret = handler.init(ScanMode::FULL, ctx); // ASSERT_EQ(ret, 0); // ret = handler.get_table_snapshot(&(ctx.file_name), &(ctx.position)); // printf("BinLog: %s %lu\n", ctx.file_name.c_str(), ctx.position); // uint64_t idx = 1; // while (true) { // RowData row_data; // ret = handler.get_next_row_data(&row_data, &ctx); // ASSERT_EQ(ret, 0); // if (ctx.status == RowDataStatus::NORMAL) { // EXPECT_EQ(row_data.primary_key(), idx); // EXPECT_EQ(ctx.seq_id, idx); // printf("seq_id: %lu\n", ctx.seq_id); // idx += 1; // } else { // break; // } // printf("%s\n", row_data.ShortDebugString().c_str()); // } // ctx.position = 4; // ctx.file_name = "binlog.000001"; // ret = handler.reset_status(ScanMode::INCREMENTAL, config, ctx); // ASSERT_EQ(ret, 0); // printf("////////////////////////////////////\n"); // idx = 12; // int32_t retry_times = 3; // int32_t times = 0; // while (true) { // RowData row_data; // ret = handler.get_next_row_data(&row_data, &ctx); // if (ret != 0) { // continue; // } // ASSERT_EQ(ret, 0); // if (ctx.status == RowDataStatus::NORMAL) { // EXPECT_EQ(row_data.primary_key(), idx); // printf("file_name: %s position: %lu\n", // ctx.file_name.c_str(), ctx.position); // idx += 1; // } else if (ctx.status == RowDataStatus::SCHEMA_CHANGED) { // continue; // } else { // // sleep(1); // // printf("sleep...\n"); // // // if (++times < retry_times) { // // continue; // // // } else { // // // break; // // // } // // break; // continue; // } // // printf("%s\n", row_data.ShortDebugString().c_str()); // // printf("primary_key: %lu, %s %d %f %s %d %lf %s %s %d %s %s %s %s // %u %s\n", // // row_data.primary_key(), // // row_data.forward_columns().values(0).bytes_value().c_str(), // // row_data.forward_columns().values(1).int32_value(), // // row_data.forward_columns().values(2).float_value(), // // row_data.forward_columns().values(3).bytes_value().c_str(), // // row_data.forward_columns().values(4).int32_value(), // // row_data.forward_columns().values(5).double_value(), // // row_data.forward_columns().values(6).string_value().c_str(), // // row_data.forward_columns().values(7).string_value().c_str(), // // row_data.forward_columns().values(8).int32_value(), // // row_data.forward_columns().values(9).string_value().c_str(), // // row_data.forward_columns().values(10).string_value().c_str(), // // row_data.forward_columns().values(11).string_value().c_str(), // // row_data.forward_columns().values(12).string_value().c_str(), // // row_data.forward_columns().values(13).uint32_value(), // // row_data.index_columns(0).bytes_value().c_str()); // } // } ================================================ FILE: tests/repository/mysql_result_builder.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author DianZhang.Chen * \date Oct 2020 * \brief Mysql result builder interface definition for bilin engine */ #pragma once #include #include "proto/proxima_be.pb.h" #include "event_builder.h" #include "mock_mysql_connector.h" using namespace proxima::be::repository; using namespace ::testing; namespace proxima { namespace be { namespace repository { class MysqlResultBuilder; using MysqlResultBuilderPtr = std::shared_ptr; /*! */ class MysqlResultBuilder { public: //! Constructor MysqlResultBuilder() { connection_uri_ = "mysql://root:root@1.0.0.1:3306/mytest"; user_ = "root"; password_ = "root"; ailego::Uri::Parse(connection_uri_.c_str(), &uri_); table_name_ = "table"; db_ = "mytest"; table_id_ = 1000; } //! Destructor ~MysqlResultBuilder() = default; public: void BuildCollectionConfig() { auto *repo = config_.mutable_repository_config(); repo->set_repository_type( proto::CollectionConfig::RepositoryConfig::RT_DATABASE); repo->set_repository_name(table_name_); auto *database = repo->mutable_database(); database->set_connection_uri(connection_uri_); database->set_table_name(table_name_); database->set_user(user_); database->set_password(password_); config_.add_forward_column_names("name"); config_.add_forward_column_names("age"); auto *index1 = config_.add_index_column_params(); index1->set_column_name("vector1"); auto *index2 = config_.add_index_column_params(); index2->set_column_name("vector2"); } MockMysqlResultWrapperPtr BuildSelectVersionResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("VERSION()"); std::vector values1 = {"5.7.10-log"}; result->append_row_values(values1); return result; } MockMysqlResultWrapperPtr BuildShowBinlogResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("Variable_name"); result->append_field_meta("Value"); std::vector values1 = {"binlog_format", "ROW"}; result->append_row_values(values1); return result; } MockMysqlResultWrapperPtr BuildShowBinaryLogsResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("Log_name"); result->append_field_meta("File_size"); std::vector values1 = {"binlog.000000", "12345"}; result->append_row_values(values1); std::vector values2 = {"binlog.000004", "12345"}; result->append_row_values(values2); return result; } std::string BuildTableMapEventStr() { std::vector column_nulls(column_types_.size(), false); column_nulls[column_types_.size() - 1] = true; std::string table_map = EventBuilder::BuildTableMapEvent( table_id_, db_, table_name_, column_types_, column_metas_, column_nulls); return " " + table_map; } TableMapEventPtr BuildTableMapEvent() { std::string event_str = BuildTableMapEventStr(); return std::make_shared(event_str.substr(1).c_str(), event_str.size() - 1); } std::string BuildWriteRowsEventStr(std::vector &column_values, size_t rows_count = 1) { TableMapEventPtr table_map = BuildTableMapEvent(); std::vector column_nulls(column_types_.size(), false); std::string rows_str = EventBuilder::BuildWriteRowsEvent( table_id_, column_nulls, column_types_, column_values, table_map, WRITE_ROWS_EVENT_V1, rows_count); return " " + rows_str; } MockMysqlResultWrapperPtr BuildQuerySchemaResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("id", MYSQL_TYPE_LONG, 11, 0, AUTO_INCREMENT_FLAG); result->append_field_meta("name", MYSQL_TYPE_VAR_STRING, 100); result->append_field_meta("age", MYSQL_TYPE_LONG, 11); result->append_field_meta("score", MYSQL_TYPE_FLOAT, 12); result->append_field_meta("vector1", MYSQL_TYPE_VAR_STRING, 1024); result->append_field_meta("vector2", MYSQL_TYPE_VAR_STRING, 1024); result->append_field_meta("vector3", MYSQL_TYPE_VAR_STRING, 1024); column_types_.push_back(MYSQL_TYPE_LONG); column_types_.push_back(MYSQL_TYPE_VAR_STRING); column_types_.push_back(MYSQL_TYPE_LONG); column_types_.push_back(MYSQL_TYPE_FLOAT); column_types_.push_back(MYSQL_TYPE_VAR_STRING); column_types_.push_back(MYSQL_TYPE_VAR_STRING); column_types_.push_back(MYSQL_TYPE_VAR_STRING); column_metas_.push_back(0); column_metas_.push_back(2); column_metas_.push_back(0); column_metas_.push_back(0); column_metas_.push_back(2); column_metas_.push_back(2); column_metas_.push_back(2); return result; } MockMysqlResultWrapperPtr BuildQueryCollationResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("Field", MYSQL_TYPE_VAR_STRING, 11); result->append_field_meta("Type", MYSQL_TYPE_VAR_STRING, 100); result->append_field_meta("Collation", MYSQL_TYPE_VAR_STRING, 11); std::vector values1 = {"id", "", ""}; result->append_row_values(values1); std::vector values2 = {"name", "", "utf8_general_ci"}; result->append_row_values(values2); std::vector values3 = {"age", "", ""}; result->append_row_values(values3); std::vector values4 = {"score", "", "utf8_general_ci"}; result->append_row_values(values4); std::vector values5 = {"vector1", "", "utf8_general_ci"}; result->append_row_values(values5); std::vector values6 = {"vector2", "", "utf8_general_ci"}; result->append_row_values(values6); std::vector values7 = {"vector3", "", "utf8_general_ci"}; result->append_row_values(values7); return result; } MockMysqlResultWrapperPtr BuildScanTableResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("id", MYSQL_TYPE_LONG, 11, 0, AUTO_INCREMENT_FLAG); result->append_field_meta("name", MYSQL_TYPE_VAR_STRING, 100); result->append_field_meta("age", MYSQL_TYPE_LONG, 11); result->append_field_meta("vector1", MYSQL_TYPE_VAR_STRING, 1024); result->append_field_meta("vector2", MYSQL_TYPE_VAR_STRING, 1024); std::vector values1 = {"1", "1,2,3,4", "1,2,3,5", "name1", "18"}; result->append_row_values(values1); std::vector values2 = {"2", "2,2,3,4", "2,2,3,5", "name2", "19"}; result->append_row_values(values2); return result; } MockMysqlResultWrapperPtr BuildSelectDbResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("id", MYSQL_TYPE_LONG, 11, 0, AUTO_INCREMENT_FLAG); std::vector values1 = {"1"}; result->append_row_values(values1); return result; } public: proto::CollectionConfig config_; // agent::proto::CollectionConfig config_; std::string connection_uri_{}; std::string user_{}; std::string password_{}; ailego::Uri uri_{}; std::string table_name_{}; std::string db_{}; uint64_t table_id_{0}; std::vector column_types_{}; std::vector column_metas_{}; }; } // namespace repository } // namespace be } // namespace proxima ================================================ FILE: tests/repository/mysql_validator_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author hongqing.hu * \date Dec 2020 * \brief */ #include #define private public #include "repository/binlog/mysql_validator.h" #include "mock_mysql_connector.h" #undef private #include "repository/repository_common/error_code.h" using namespace ::proxima::be; using namespace proxima::be::repository; class MysqlValidatorTest : public testing::Test { protected: void SetUp() { mgr_ = std::make_shared(); ASSERT_TRUE(mgr_); connector_ = std::make_shared(); ASSERT_TRUE(connector_); mgr_->put(connector_); } void TearDown() {} MockMysqlResultWrapperPtr BuildSelectVersionResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("VERSION()"); std::vector values1 = {"5.7.10-log"}; result->append_row_values(values1); return result; } MockMysqlResultWrapperPtr BuildShowBinlogResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("Variable_name"); result->append_field_meta("Value"); std::vector values1 = {"binlog_format", "ROW"}; result->append_row_values(values1); return result; } MockMysqlResultWrapperPtr BuildSelectDbResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("SCHEMA_NAME"); std::vector values1 = {"mytest"}; result->append_row_values(values1); return result; } protected: MysqlConnectorManagerPtr mgr_{}; MockMysqlConnectorPtr connector_{}; }; TEST_F(MysqlValidatorTest, TestSimple) { MysqlValidator validator(mgr_); int ret = validator.init(); ASSERT_EQ(ret, 0); MockMysqlResultWrapperPtr result = BuildSelectVersionResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .WillOnce(Invoke([&result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result; return 0; })) .RetiresOnSaturation(); ASSERT_TRUE(validator.validate_version()); MockMysqlResultWrapperPtr result1 = BuildShowBinlogResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .RetiresOnSaturation(); ASSERT_TRUE(validator.validate_binlog_format()); const std::string connection_uri = "mysql://root:root@127.0.0.1:3306/mytest"; ailego::Uri uri; ailego::Uri::Parse(connection_uri.c_str(), &uri); MockMysqlResultWrapperPtr result2 = BuildSelectDbResult(); EXPECT_CALL(*connector_, uri()) .WillOnce(Invoke([&uri]() -> const ailego::Uri & { return uri; })) .RetiresOnSaturation(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .WillOnce(Invoke([&result2](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result2; return 0; })) .RetiresOnSaturation(); ASSERT_TRUE(validator.validate_database_exist()); } ================================================ FILE: tests/repository/port_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Feb 2021 * \brief PortHelper definition */ #pragma once #include #include #include namespace proxima { namespace be { namespace repository { class PortHelper { public: static void GetPort(int *port, int *pid) { *pid = getpid(); static std::string cmd = "export PORT=$(python -c 'import socket; s=socket.socket(); " "s.bind((\"\", 0)); print(s.getsockname()[1]); s.close()')" "&& echo ${PORT} >> %s.txt"; char cmd_buf[1024]; snprintf(cmd_buf, 1024, cmd.c_str(), std::to_string(*pid).c_str()); system(cmd_buf); char filename_buf[1024]; snprintf(filename_buf, 1024, "%s.txt", std::to_string(*pid).c_str()); std::string filename = std::string(filename_buf); std::ifstream infile(filename); std::string port_str; std::getline(infile, port_str); *port = std::stoi(port_str); } static void RemovePortFile(int pid) { static std::string cmd = "rm %s.txt"; char cmd_buf[1024]; snprintf(cmd_buf, 1024, cmd.c_str(), std::to_string(pid).c_str()); std::cout << "Execute: " << std::string(cmd_buf) << std::endl; system(cmd_buf); } }; } // end namespace repository } // namespace be } // end namespace proxima ================================================ FILE: tests/repository/repository_test.conf ================================================ repository_config { prefix_path: "./test_path" } ================================================ FILE: tests/repository/rows_event_parser_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author hongqing.hu * \date Dec 2020 * \brief */ #include #define private public #include "repository/binlog/info_fetcher.h" #include "repository/binlog/rows_event_parser.h" #include "mock_mysql_connector.h" #undef private #include "repository/repository_common/error_code.h" #include "event_builder.h" using namespace ::proxima::be; using namespace proxima::be::repository; class RowsEventParserTest : public testing::Test { protected: void SetUp() { mgr_ = std::make_shared(); ASSERT_TRUE(mgr_); connector_ = std::make_shared(); ASSERT_TRUE(connector_); mgr_->put(connector_); connection_uri_ = "mysql://127.0.0.1:3306/mytest"; user_ = "root"; password_ = "root"; table_name_ = "table"; db_ = "mytest"; InitTableSchema(); table_id_ = 1000; } void TearDown() {} MockMysqlResultWrapperPtr BuildQuerySchemaResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("id", MYSQL_TYPE_LONG, 11, 0, AUTO_INCREMENT_FLAG); result->append_field_meta("name", MYSQL_TYPE_VAR_STRING, 100); result->append_field_meta("age", MYSQL_TYPE_LONG, 11); result->append_field_meta("score", MYSQL_TYPE_FLOAT, 12); result->append_field_meta("vector1", MYSQL_TYPE_VAR_STRING, 1024); result->append_field_meta("vector2", MYSQL_TYPE_VAR_STRING, 1024); result->append_field_meta("vector3", MYSQL_TYPE_VAR_STRING, 1024); column_types_.push_back(MYSQL_TYPE_LONG); column_types_.push_back(MYSQL_TYPE_VAR_STRING); column_types_.push_back(MYSQL_TYPE_LONG); column_types_.push_back(MYSQL_TYPE_FLOAT); column_types_.push_back(MYSQL_TYPE_VAR_STRING); column_types_.push_back(MYSQL_TYPE_VAR_STRING); column_types_.push_back(MYSQL_TYPE_VAR_STRING); column_metas_.push_back(0); column_metas_.push_back(2); column_metas_.push_back(0); column_metas_.push_back(0); column_metas_.push_back(2); column_metas_.push_back(2); column_metas_.push_back(2); return result; } MockMysqlResultWrapperPtr BuildQueryCollationResult() { MockMysqlResultWrapperPtr result = std::make_shared(); result->append_field_meta("Field", MYSQL_TYPE_VAR_STRING, 11); result->append_field_meta("Type", MYSQL_TYPE_VAR_STRING, 100); result->append_field_meta("Collation", MYSQL_TYPE_VAR_STRING, 11); std::vector values1 = {"id", "", ""}; result->append_row_values(values1); std::vector values2 = {"name", "", "utf8_general_ci"}; result->append_row_values(values2); std::vector values3 = {"age", "", ""}; result->append_row_values(values3); std::vector values4 = {"score", "", "utf8_general_ci"}; result->append_row_values(values4); std::vector values5 = {"vector1", "", "utf8_general_ci"}; result->append_row_values(values5); std::vector values6 = {"vector2", "", "utf8_general_ci"}; result->append_row_values(values6); std::vector values7 = {"vector3", "", "utf8_general_ci"}; result->append_row_values(values7); return result; } void BuildCollectionConfig(CollectionConfig &config) { auto *repo = config.mutable_repository_config(); repo->set_repository_type(CollectionConfig::RepositoryConfig::RT_DATABASE); repo->set_repository_name(table_name_); auto *database = repo->mutable_database(); database->set_connection_uri(connection_uri_); database->set_table_name(table_name_); database->set_user(user_); database->set_password(password_); config.add_forward_column_names("name"); config.add_forward_column_names("age"); auto *index1 = config.add_index_column_params(); index1->set_column_name("vector1"); auto *index2 = config.add_index_column_params(); index2->set_column_name("vector2"); } void InitTableSchema() { CollectionConfig config; BuildCollectionConfig(config); // init ailego::Uri test_uri; ASSERT_TRUE(ailego::Uri::Parse(connection_uri_.c_str(), &test_uri)); EXPECT_CALL(*connector_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); fetcher_ = std::make_shared(config, mgr_); int ret = fetcher_->init(); ASSERT_EQ(ret, 0); MockMysqlResultWrapperPtr result1 = BuildQueryCollationResult(); MockMysqlResultWrapperPtr result = BuildQuerySchemaResult(); EXPECT_CALL(*connector_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce(Invoke([&result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result; return 0; })) .RetiresOnSaturation(); // get table schema ret = fetcher_->get_table_schema(table_name_, &schema_); ASSERT_EQ(ret, 0); } TableMapEventPtr BuildTableMapEvent() { std::vector column_nulls(column_types_.size(), false); column_nulls[column_types_.size() - 1] = true; std::string table_map = EventBuilder::BuildTableMapEvent( table_id_, db_, table_name_, column_types_, column_metas_, column_nulls); return std::make_shared(table_map.data(), table_map.size()); } RowsEventPtr BuildWriteRowsEvent(std::vector &column_values, const TableMapEventPtr &table_map) { std::vector column_nulls(column_types_.size(), false); std::string rows_str = EventBuilder::BuildWriteRowsEvent( table_id_, column_nulls, column_types_, column_values, table_map); return std::make_shared(rows_str.data(), rows_str.size()); } RowsEventPtr BuildDeleteRowsEvent(std::vector &column_values, const TableMapEventPtr &table_map) { std::vector column_nulls(column_types_.size(), false); std::string rows_str = EventBuilder::BuildDeleteRowsEvent( table_id_, column_nulls, column_types_, column_values, table_map); return std::make_shared(rows_str.data(), rows_str.size()); } RowsEventPtr BuildUpdateRowsEvent(std::vector &old_values, std::vector &new_values, const TableMapEventPtr &table_map) { std::vector column_nulls(column_types_.size(), false); std::string rows_str = EventBuilder::BuildUpdateRowsEvent( table_id_, column_nulls, column_types_, old_values, new_values, table_map); return std::make_shared(rows_str.data(), rows_str.size()); } protected: MysqlConnectorManagerPtr mgr_{}; MockMysqlConnectorPtr connector_{}; std::string connection_uri_{}; std::string user_{}; std::string password_{}; std::string table_name_{}; std::string db_{}; InfoFetcherPtr fetcher_{}; TableSchemaPtr schema_; uint64_t table_id_{0}; std::vector column_types_{}; std::vector column_metas_{}; }; TEST_F(RowsEventParserTest, TestSimple) { RowsEventParser parser(schema_); TableMapEventPtr table_map = BuildTableMapEvent(); std::vector values = {"1", "name1", "30", "123.456", "1,2,3,4", "1,2,3,5", "1,2,3,6"}; RowsEventPtr event = BuildWriteRowsEvent(values, table_map); ASSERT_TRUE(event); event->table_map_ = table_map; WriteRequest::Row row_data; LsnContext ctx; int ret = parser.parse(event.get(), &row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(row_data.primary_key(), (uint64_t)1); ASSERT_EQ(row_data.forward_column_values().values(0).string_value(), "name1"); ASSERT_EQ(row_data.forward_column_values().values(1).int32_value(), 30); ASSERT_EQ(row_data.index_column_values().values(0).string_value(), "1,2,3,4"); ASSERT_EQ(row_data.index_column_values().values(1).string_value(), "1,2,3,5"); } TEST_F(RowsEventParserTest, TestParseWriteEventSuccess) { RowsEventParser parser(schema_); TableMapEventPtr table_map = BuildTableMapEvent(); std::vector values = {"1", "name1", "30", "123.456", "1,2,3,4", "1,2,3,5", "1,2,3,6"}; RowsEventPtr event = BuildWriteRowsEvent(values, table_map); ASSERT_TRUE(event); event->table_map_ = table_map; WriteRequest::Row row_data; LsnContext ctx; int ret = parser.parse(event.get(), &row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(row_data.primary_key(), (uint64_t)1); ASSERT_EQ(row_data.operation_type(), proto::OP_INSERT); ASSERT_EQ(row_data.forward_column_values().values(0).string_value(), "name1"); ASSERT_EQ(row_data.forward_column_values().values(1).int32_value(), 30); ASSERT_EQ(row_data.index_column_values().values(0).string_value(), "1,2,3,4"); ASSERT_EQ(row_data.index_column_values().values(1).string_value(), "1,2,3,5"); } TEST_F(RowsEventParserTest, TestParseDeleteEventSuccess) { RowsEventParser parser(schema_); TableMapEventPtr table_map = BuildTableMapEvent(); std::vector values = {"1", "name1", "30", "123.456", "1,2,3,4", "1,2,3,5", "1,2,3,6"}; RowsEventPtr event = BuildDeleteRowsEvent(values, table_map); ASSERT_TRUE(event); event->table_map_ = table_map; WriteRequest::Row row_data; LsnContext ctx; int ret = parser.parse(event.get(), &row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(row_data.primary_key(), (uint64_t)1); ASSERT_EQ(row_data.operation_type(), proto::OP_DELETE); } TEST_F(RowsEventParserTest, TestParseUpdateEventSuccess) { RowsEventParser parser(schema_); TableMapEventPtr table_map = BuildTableMapEvent(); std::vector old_values = { "1", "name1", "30", "123.456", "1,2,3,4", "1,2,3,5", "1,2,3,6"}; std::vector new_values = { "1", "name2", "40", "123.456", "2,2,3,4", "2,2,3,5", "1,2,3,6"}; RowsEventPtr event = BuildUpdateRowsEvent(old_values, new_values, table_map); ASSERT_TRUE(event); event->table_map_ = table_map; WriteRequest::Row row_data; LsnContext ctx; int ret = parser.parse(event.get(), &row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(row_data.primary_key(), (uint64_t)1); ASSERT_EQ(row_data.forward_column_values().values(0).string_value(), "name2"); ASSERT_EQ(row_data.forward_column_values().values(1).int32_value(), 40); ASSERT_EQ(row_data.index_column_values().values(0).string_value(), "2,2,3,4"); ASSERT_EQ(row_data.index_column_values().values(1).string_value(), "2,2,3,5"); } TEST_F(RowsEventParserTest, TestParseFailedWithSchemaMismatched) { schema_->add_field(FieldPtr()); RowsEventParser parser(schema_); TableMapEventPtr table_map = BuildTableMapEvent(); std::vector old_values = { "1", "name1", "30", "123.456", "1,2,3,4", "1,2,3,5", "1,2,3,6"}; std::vector new_values = { "1", "name2", "40", "123.456", "2,2,3,4", "2,2,3,5", "1,2,3,6"}; RowsEventPtr event = BuildUpdateRowsEvent(old_values, new_values, table_map); ASSERT_TRUE(event); event->table_map_ = table_map; WriteRequest::Row row_data; LsnContext ctx; int ret = parser.parse(event.get(), &row_data, &ctx); ASSERT_EQ(ret, ErrorCode_InvalidRowData); } TEST_F(RowsEventParserTest, TestParseFailedWithParseRowData) { RowsEventParser parser(schema_); TableMapEventPtr table_map = BuildTableMapEvent(); std::vector values = {"1", "name1", "30", "123.456", "1,2,3,4", "1,2,3,5", "1,2,3,6"}; RowsEventPtr event = BuildDeleteRowsEvent(values, table_map); ASSERT_TRUE(event); event->cur_buf_ = nullptr; event->table_map_ = table_map; WriteRequest::Row row_data; LsnContext ctx; int ret = parser.parse(event.get(), &row_data, &ctx); ASSERT_EQ(ret, ErrorCode_InvalidRowData); } TEST_F(RowsEventParserTest, TestGetAutoIncrementId) { RowsEventParser parser(schema_); uint64_t id; GenericValue value; { value.set_int32_value(100); id = parser.get_auto_increment_id(value); ASSERT_EQ(id, 100); } { value.set_int64_value(1000); id = parser.get_auto_increment_id(value); ASSERT_EQ(id, 1000); } { value.set_uint32_value(100); id = parser.get_auto_increment_id(value); ASSERT_EQ(id, 100); } { value.set_uint64_value(100); id = parser.get_auto_increment_id(value); ASSERT_EQ(id, 100); } { value.set_bytes_value("100"); id = parser.get_auto_increment_id(value); ASSERT_EQ(id, INVALID_PRIMARY_KEY); } } ================================================ FILE: tests/repository/table_reader_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \author hongqing.hu * \date Dec 2020 * \brief */ #include #define private public #include "repository/binlog/table_reader.h" #include "mock_mysql_connector.h" #include "mysql_result_builder.h" #undef private #include "repository/repository_common/error_code.h" using namespace ::proxima::be; using namespace proxima::be::repository; class TableReaderTest : public testing::Test { protected: void SetUp() { mgr_ = std::make_shared(); ASSERT_TRUE(mgr_); connector1_ = std::make_shared(); ASSERT_TRUE(connector1_); mgr_->put(connector1_); connector2_ = std::make_shared(); ASSERT_TRUE(connector2_); mgr_->put(connector2_); table_name_ = builder_.table_name_; ctx_.seq_id = 1; InitFetcher(); } void TearDown() {} void InitFetcher() { builder_.BuildCollectionConfig(); // init ailego::Uri test_uri = builder_.uri_; EXPECT_CALL(*connector1_, uri()) .WillOnce( Invoke([&test_uri]() -> const ailego::Uri & { return test_uri; })) .RetiresOnSaturation(); fetcher_ = std::make_shared(builder_.config_, mgr_); int ret = fetcher_->init(); ASSERT_EQ(ret, 0); ASSERT_EQ(fetcher_->database(), "mytest"); } protected: MysqlConnectorManagerPtr mgr_{}; MockMysqlConnectorPtr connector1_{}; MockMysqlConnectorPtr connector2_{}; std::string table_name_{}; InfoFetcherPtr fetcher_{}; LsnContext ctx_; MysqlResultBuilder builder_{}; }; TEST_F(TableReaderTest, TestGeneral) { TableReader reader(table_name_, fetcher_, mgr_); // build schema result MockMysqlResultWrapperPtr schema_result = builder_.BuildQuerySchemaResult(); MockMysqlResultWrapperPtr result1 = builder_.BuildQueryCollationResult(); EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce( Invoke([&schema_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = schema_result; return 0; })) .RetiresOnSaturation(); // init table reader int ret = reader.init(); ASSERT_EQ(ret, 0); // build scan table result MockMysqlResultWrapperPtr scan_result = builder_.BuildScanTableResult(); EXPECT_CALL(*connector2_, execute_query(_, _, _)) .WillOnce(Invoke([&scan_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = scan_result; return 0; })) .RetiresOnSaturation(); ret = reader.start(ctx_); ASSERT_EQ(ret, 0); // get next row data WriteRequest::Row row_data; LsnContext ctx; ret = reader.get_next_row_data(&row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(ctx.seq_id, (uint64_t)1); ASSERT_EQ(ctx.status, RowDataStatus::NORMAL); ASSERT_EQ(row_data.primary_key(), (uint64_t)1); ASSERT_EQ(row_data.operation_type(), ::proxima::be::proto::OP_INSERT); ASSERT_EQ(row_data.forward_column_values().values(0).string_value(), "name1"); ASSERT_EQ(row_data.forward_column_values().values(1).int32_value(), 18); ASSERT_EQ(row_data.index_column_values().values(0).string_value(), "1,2,3,4"); ASSERT_EQ(row_data.index_column_values().values(1).string_value(), "1,2,3,5"); row_data.Clear(); ret = reader.get_next_row_data(&row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(ctx.status, RowDataStatus::NORMAL); ASSERT_EQ(ctx.seq_id, (uint64_t)2); ASSERT_EQ(row_data.primary_key(), (uint64_t)2); ASSERT_EQ(row_data.operation_type(), ::proxima::be::proto::OP_INSERT); ASSERT_EQ(row_data.forward_column_values().values(0).string_value(), "name2"); ASSERT_EQ(row_data.forward_column_values().values(1).int32_value(), 19); ASSERT_EQ(row_data.index_column_values().values(0).string_value(), "2,2,3,4"); ASSERT_EQ(row_data.index_column_values().values(1).string_value(), "2,2,3,5"); row_data.Clear(); ret = reader.get_next_row_data(&row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(ctx.status, RowDataStatus::NO_MORE_DATA); } TEST_F(TableReaderTest, TestInitSuccess) { TableReader reader(table_name_, fetcher_, mgr_); // build schema result MockMysqlResultWrapperPtr schema_result = builder_.BuildQuerySchemaResult(); MockMysqlResultWrapperPtr result1 = builder_.BuildQueryCollationResult(); EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce( Invoke([&schema_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = schema_result; return 0; })) .RetiresOnSaturation(); // init table reader int ret = reader.init(); ASSERT_EQ(ret, 0); // build scan table result MockMysqlResultWrapperPtr scan_result = builder_.BuildScanTableResult(); EXPECT_CALL(*connector2_, execute_query(_, _, _)) .WillOnce(Invoke([&scan_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = scan_result; return 0; })) .RetiresOnSaturation(); ret = reader.start(ctx_); ASSERT_EQ(ret, 0); } TEST_F(TableReaderTest, TestInitFailedWithGetConnector) { MysqlConnectorManagerPtr mgr = std::make_shared(); MysqlConnectorPtr connector; mgr->put(connector); TableReader reader(table_name_, fetcher_, mgr); int ret = reader.init(); ASSERT_EQ(ret, ErrorCode_RuntimeError); } TEST_F(TableReaderTest, TestInitFailedWithGetTableSchema) { TableReader reader(table_name_, fetcher_, mgr_); // build schema result MockMysqlResultWrapperPtr schema_result = builder_.BuildQuerySchemaResult(); EXPECT_CALL(*connector1_, execute_query(_, _, _)) .WillOnce( Invoke([&schema_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = schema_result; return ErrorCode_ExecuteMysql; })) .RetiresOnSaturation(); // init table reader int ret = reader.init(); ASSERT_EQ(ret, ErrorCode_ExecuteMysql); } TEST_F(TableReaderTest, TestStartFailedWithPrepareReader) { TableReader reader(table_name_, fetcher_, mgr_); // build schema result MockMysqlResultWrapperPtr schema_result = builder_.BuildQuerySchemaResult(); MockMysqlResultWrapperPtr result1 = builder_.BuildQueryCollationResult(); EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce( Invoke([&schema_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = schema_result; return 0; })) .RetiresOnSaturation(); // init table reader int ret = reader.init(); ASSERT_EQ(ret, 0); // build scan table result MockMysqlResultWrapperPtr scan_result = builder_.BuildScanTableResult(); EXPECT_CALL(*connector2_, execute_query(_, _, _)) .WillOnce(Invoke([&scan_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = scan_result; return ErrorCode_ExecuteMysql; })) .RetiresOnSaturation(); ret = reader.start(ctx_); ASSERT_EQ(ret, ErrorCode_ExecuteMysql); } TEST_F(TableReaderTest, TestGetNextRowDataSuccess) { TableReader reader(table_name_, fetcher_, mgr_); // build schema result MockMysqlResultWrapperPtr schema_result = builder_.BuildQuerySchemaResult(); MockMysqlResultWrapperPtr result1 = builder_.BuildQueryCollationResult(); EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce( Invoke([&schema_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = schema_result; return 0; })) .RetiresOnSaturation(); // init table reader int ret = reader.init(); ASSERT_EQ(ret, 0); // build scan table result MockMysqlResultWrapperPtr scan_result = builder_.BuildScanTableResult(); EXPECT_CALL(*connector2_, execute_query(_, _, _)) .WillOnce(Invoke([&scan_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = scan_result; return 0; })) .RetiresOnSaturation(); ret = reader.start(ctx_); ASSERT_EQ(ret, 0); // get next row data WriteRequest::Row row_data; LsnContext ctx; ret = reader.get_next_row_data(&row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(ctx.seq_id, (uint64_t)1); ASSERT_EQ(ctx.status, RowDataStatus::NORMAL); ASSERT_EQ(row_data.primary_key(), (uint64_t)1); ASSERT_EQ(row_data.operation_type(), ::proxima::be::proto::OP_INSERT); ASSERT_EQ(row_data.forward_column_values().values(0).string_value(), "name1"); ASSERT_EQ(row_data.forward_column_values().values(1).int32_value(), 18); ASSERT_EQ(row_data.index_column_values().values(0).string_value(), "1,2,3,4"); ASSERT_EQ(row_data.index_column_values().values(1).string_value(), "1,2,3,5"); row_data.Clear(); ret = reader.get_next_row_data(&row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(ctx.status, RowDataStatus::NORMAL); ASSERT_EQ(ctx.seq_id, (uint64_t)2); ASSERT_EQ(row_data.primary_key(), (uint64_t)2); ASSERT_EQ(row_data.operation_type(), ::proxima::be::proto::OP_INSERT); ASSERT_EQ(row_data.forward_column_values().values(0).string_value(), "name2"); ASSERT_EQ(row_data.forward_column_values().values(1).int32_value(), 19); ASSERT_EQ(row_data.index_column_values().values(0).string_value(), "2,2,3,4"); ASSERT_EQ(row_data.index_column_values().values(1).string_value(), "2,2,3,5"); row_data.Clear(); ret = reader.get_next_row_data(&row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(ctx.status, RowDataStatus::NO_MORE_DATA); } TEST_F(TableReaderTest, TestGetNextRowDataFailed) { TableReader reader(table_name_, fetcher_, mgr_); // build schema result MockMysqlResultWrapperPtr schema_result = builder_.BuildQuerySchemaResult(); MockMysqlResultWrapperPtr result1 = builder_.BuildQueryCollationResult(); EXPECT_CALL(*connector1_, execute_query(_, _, _)) .Times(2) .WillOnce(Invoke([&result1](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = result1; return 0; })) .WillOnce( Invoke([&schema_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = schema_result; return 0; })) .RetiresOnSaturation(); // init table reader int ret = reader.init(); ASSERT_EQ(ret, 0); // build scan table result MockMysqlResultWrapperPtr scan_result = builder_.BuildScanTableResult(); EXPECT_CALL(*connector2_, execute_query(_, _, _)) .WillOnce(Invoke([&scan_result](const std::string &, MysqlResultWrapperPtr *out, bool) -> int { *out = scan_result; return 0; })) .RetiresOnSaturation(); ret = reader.start(ctx_); ASSERT_EQ(ret, 0); // get next row data WriteRequest::Row row_data; LsnContext ctx; ret = reader.get_next_row_data(&row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(ctx.seq_id, (uint64_t)1); ASSERT_EQ(ctx.status, RowDataStatus::NORMAL); ASSERT_EQ(row_data.primary_key(), (uint64_t)1); ASSERT_EQ(row_data.operation_type(), ::proxima::be::proto::OP_INSERT); ASSERT_EQ(row_data.forward_column_values().values(0).string_value(), "name1"); ASSERT_EQ(row_data.forward_column_values().values(1).int32_value(), 18); ASSERT_EQ(row_data.index_column_values().values(0).string_value(), "1,2,3,4"); ASSERT_EQ(row_data.index_column_values().values(1).string_value(), "1,2,3,5"); row_data.Clear(); ret = reader.get_next_row_data(&row_data, &ctx); ASSERT_EQ(ret, 0); ASSERT_EQ(ctx.status, RowDataStatus::NORMAL); ASSERT_EQ(ctx.seq_id, (uint64_t)2); ASSERT_EQ(row_data.primary_key(), (uint64_t)2); ASSERT_EQ(row_data.operation_type(), ::proxima::be::proto::OP_INSERT); ASSERT_EQ(row_data.forward_column_values().values(0).string_value(), "name2"); ASSERT_EQ(row_data.forward_column_values().values(1).int32_value(), 19); ASSERT_EQ(row_data.index_column_values().values(0).string_value(), "2,2,3,4"); ASSERT_EQ(row_data.index_column_values().values(1).string_value(), "2,2,3,5"); row_data.Clear(); scan_result->set_has_error(true); ret = reader.get_next_row_data(&row_data, &ctx); ASSERT_EQ(ret, ErrorCode_FetchMysqlResult); } ================================================ FILE: tests/server/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author hechong.xyf ## \date Feb 2021 ## \brief Detail cmake build script ## include(../../cmake/bazel.cmake) include(../../cmake/option.cmake) if(APPLE) set(APPLE_FRAMEWORK_LIBS -framework CoreFoundation -framework CoreGraphics -framework CoreData -framework CoreText -framework Security -framework Foundation -Wl,-U,_MallocExtension_ReleaseFreeMemory -Wl,-U,_ProfilerStart -Wl,-U,_ProfilerStop -Wl,-U,_RegisterThriftProtocol ) endif() git_version(PROXIMA_BE_VERSION ${CMAKE_CURRENT_SOURCE_DIR}) file(GLOB ALL_TEST_SRCS *_test.cc) foreach (CC_SRCS ${ALL_TEST_SRCS}) get_filename_component(CC_TARGET ${CC_SRCS} NAME_WE) cc_gmock( NAME ${CC_TARGET} STRICT LIBS proxima_be_server proxima_be_agent proxima_be_index proxima_be_meta proxima_be_common proxima_be_proto proxima_search_client_static proxima ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} SRCS ${CC_SRCS} INCS .. ../../sdk/cpp/include/ ../../src LDFLAGS ${APPLE_FRAMEWORK_LIBS} VERSION "${PROXIMA_BE_VERSION}" ) set_target_properties(${CC_TARGET} PROPERTIES INSTALL_RPATH ${LIB_PATH}) cc_test_suite(proxima_be_server ${CC_TARGET}) endforeach () ================================================ FILE: tests/server/http_client_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define private public #define protected public #include "common/config.h" #undef private #undef protected #include #include #include "common/defer.h" #include "server/proxima_search_engine.h" #include "port_helper.h" #include "proxima_search_client.h" #ifdef http_client_test_VERSION #define PROXIMA_BE_VERSION_STRING http_client_test_VERSION #else #define PROXIMA_BE_VERSION_STRING "unknown" #endif using namespace proxima::be; using namespace proxima::be::server; class HttpClientTest : public ::testing::Test { protected: virtual void SetUp() { ailego::FileHelper::RemoveDirectory("./test_proxima_be/"); int pid; PortHelper::GetPort(&grpc_port_, &pid); PortHelper::GetPort(&http_port_, &pid); PortHelper::RemovePortFile(pid); auto &config = Config::Instance(); config.config_.mutable_common_config()->set_logger_type("ConsoleLogger"); config.config_.mutable_common_config()->set_log_directory( "./test_proxima_be/log/"); config.config_.mutable_common_config()->set_protocol("http"); config.config_.mutable_common_config()->set_grpc_listen_port(grpc_port_); config.config_.mutable_common_config()->set_http_listen_port(http_port_); config.config_.mutable_index_config()->set_index_directory( "./test_proxima_be/index_data/"); std::string work_directory; ailego::FileHelper::GetWorkingDirectory(&work_directory); std::string meta_uri = "sqlite://" + work_directory + "/test_proxima_be/proxima_be_meta.sqlite"; config.config_.mutable_meta_config()->set_meta_uri(meta_uri); } virtual void TearDown() {} protected: int grpc_port_; int http_port_; }; TEST_F(HttpClientTest, TestClient) { auto &engine = ProximaSearchEngine::Instance(); int ret = engine.init(false, ""); ASSERT_EQ(ret, 0); Defer defer([&engine] { engine.stop(); engine.cleanup(); }); engine.set_version(PROXIMA_BE_VERSION_STRING); ret = engine.start(); ASSERT_EQ(ret, 0); // Create a client ProximaSearchClientPtr client = ProximaSearchClient::Create("HttpClient"); ASSERT_TRUE(client != nullptr); // Connect to server ChannelOptions options(std::string("127.0.0.1:") + std::to_string(http_port_)); options.timeout_ms = 60000U; Status status = client->connect(options); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); // Create collection CollectionConfig config; config.collection_name = "test_collection"; config.forward_columns = {"fwd_column1", "fwd_column2", "fwd_column3", "fwd_column4"}; config.index_columns = { IndexColumnParam("test_column", DataType::VECTOR_FP32, 8)}; status = client->create_collection(config); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); // Describe collection CollectionInfo collection_info; status = client->describe_collection("test_collection", &collection_info); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); ASSERT_EQ(collection_info.collection_name, "test_collection"); ASSERT_EQ(collection_info.forward_columns.size(), 4); ASSERT_EQ(collection_info.forward_columns[0], "fwd_column1"); ASSERT_EQ(collection_info.forward_columns[1], "fwd_column2"); ASSERT_EQ(collection_info.forward_columns[2], "fwd_column3"); ASSERT_EQ(collection_info.forward_columns[3], "fwd_column4"); ASSERT_EQ(collection_info.index_columns.size(), 1); ASSERT_EQ(collection_info.index_columns[0].column_name, "test_column"); ASSERT_EQ(collection_info.index_columns[0].index_type, IndexType::PROXIMA_GRAPH_INDEX); ASSERT_EQ(collection_info.index_columns[0].data_type, DataType::VECTOR_FP32); ASSERT_EQ(collection_info.index_columns[0].dimension, 8); // Insert records WriteRequestPtr write_request = WriteRequest::Create(); write_request->set_collection_name("test_collection"); write_request->add_forward_columns( {"fwd_column1", "fwd_column2", "fwd_column3", "fwd_column4"}); write_request->add_index_column("test_column", DataType::VECTOR_FP32, 8); for (int i = 0; i < 10; i++) { WriteRequest::RowPtr row = write_request->add_row(); row->set_primary_key(i); row->set_operation_type(OperationType::INSERT); row->add_index_value({i + 0.1f, i + 0.2f, i + 0.3f, i + 0.4f, i + 0.5f, i + 0.6f, i + 0.7f, i + 0.8f}); // "test_column" row->add_forward_value("hello" + std::to_string(i)); // "fwd_column1" row->add_forward_value((int64_t)i); // "fwd_column2" row->add_forward_value((float)i); // "fwd_column3" row->add_forward_value((double)i); // "fwd_column4" } status = client->write(*write_request); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); // Stats collection CollectionStats collection_stats; status = client->stats_collection("test_collection", &collection_stats); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); ASSERT_EQ(collection_stats.collection_name, "test_collection"); ASSERT_EQ(collection_stats.total_doc_count, 10); ASSERT_EQ(collection_stats.total_segment_count, 1); ASSERT_EQ(collection_stats.segment_stats.size(), 1); ASSERT_EQ(collection_stats.segment_stats[0].doc_count, 10); ASSERT_EQ(collection_stats.segment_stats[0].min_primary_key, 0); ASSERT_EQ(collection_stats.segment_stats[0].max_primary_key, 9); // Query records QueryRequestPtr query_request = QueryRequest::Create(); QueryResponsePtr query_response = QueryResponse::Create(); query_request->set_collection_name("test_collection"); QueryRequest::KnnQueryParamPtr knn_param = query_request->add_knn_query_param(); knn_param->set_column_name("test_column"); knn_param->set_topk(10); knn_param->set_features({0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8}); status = client->query(*query_request, query_response.get()); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); ASSERT_EQ(query_response->result_count(), 1); auto result = query_response->result(0); ASSERT_EQ(result->document_count(), 10); for (size_t i = 0; i < result->document_count(); i++) { auto doc = result->document(i); ASSERT_EQ(doc->primary_key(), i); std::string fwd_val1; int64_t fwd_val2; float fwd_val3; double fwd_val4; doc->get_forward_value("fwd_column1", &fwd_val1); doc->get_forward_value("fwd_column2", &fwd_val2); doc->get_forward_value("fwd_column3", &fwd_val3); doc->get_forward_value("fwd_column4", &fwd_val4); ASSERT_EQ(fwd_val1, "hello" + std::to_string(i)); ASSERT_EQ(fwd_val2, (int64_t)i); ASSERT_EQ(fwd_val3, (float)i); ASSERT_EQ(fwd_val4, (double)i); } // test wrong forward auto doc = result->document(3); uint32_t wrong_type_fwd_value1; doc->get_forward_value("fwd_column4", &wrong_type_fwd_value1); ASSERT_EQ(wrong_type_fwd_value1, 0); uint64_t wrong_type_fwd_value2; doc->get_forward_value("fwd_column3", &wrong_type_fwd_value2); ASSERT_EQ(wrong_type_fwd_value2, 0); bool wrong_type_fwd_value3; doc->get_forward_value("fwd_column2", &wrong_type_fwd_value3); ASSERT_EQ(wrong_type_fwd_value3, false); // test insert json format WriteRequestPtr write_request2 = WriteRequest::Create(); write_request2->set_collection_name("test_collection"); write_request2->add_forward_columns( {"fwd_column1", "fwd_column2", "fwd_column3", "fwd_column4"}); write_request2->add_index_column("test_column", DataType::VECTOR_FP32, 8); WriteRequest::RowPtr row = write_request2->add_row(); row->set_primary_key(10); row->set_operation_type(OperationType::INSERT); row->add_index_value_by_json( "[10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8]"); row->add_forward_value("hello" + std::to_string(10)); row->add_forward_value((int64_t)10); row->add_forward_value((float)10); row->add_forward_value((double)10); status = client->write(*write_request2); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); // test query json format QueryRequestPtr query_request2 = QueryRequest::Create(); QueryResponsePtr query_response2 = QueryResponse::Create(); query_request2->set_collection_name("test_collection"); auto knn_param2 = query_request2->add_knn_query_param(); knn_param2->set_column_name("test_column"); knn_param2->set_topk(10); knn_param2->set_features_by_json( "[10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8]"); knn_param2->set_data_type(DataType::VECTOR_FP32); knn_param2->set_dimension(8); status = client->query(*query_request2, query_response2.get()); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); ASSERT_EQ(query_response2->result_count(), 1); auto result2 = query_response2->result(0); ASSERT_EQ(result2->document_count(), 10); { auto doc = result2->document(0); ASSERT_EQ(doc->primary_key(), 10); ASSERT_EQ(doc->score(), 0.0f); std::string fwd_val1; int64_t fwd_val2; float fwd_val3; double fwd_val4; doc->get_forward_value("fwd_column1", &fwd_val1); doc->get_forward_value("fwd_column2", &fwd_val2); doc->get_forward_value("fwd_column3", &fwd_val3); doc->get_forward_value("fwd_column4", &fwd_val4); ASSERT_EQ(fwd_val1, "hello10"); ASSERT_EQ(fwd_val2, (int64_t)10); ASSERT_EQ(fwd_val3, (float)10); ASSERT_EQ(fwd_val4, (double)10); } // Drop collection status = client->drop_collection("test_collection"); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); ret = engine.stop(); ASSERT_EQ(ret, 0); ret = engine.cleanup(); ASSERT_EQ(ret, 0); } ================================================ FILE: tests/server/port_helper.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Dianzhang.Chen * \date Feb 2021 * \brief PortHelper definition */ #pragma once #include #include #include namespace proxima { namespace be { class PortHelper { public: static void GetPort(int *port, int *pid) { *pid = getpid(); static std::string cmd = "export PORT=$(python -c 'import socket; s=socket.socket(); " "s.bind((\"\", 0)); print(s.getsockname()[1]); s.close()')" "&& echo ${PORT} > %s.txt"; char cmd_buf[1024]; snprintf(cmd_buf, 1024, cmd.c_str(), std::to_string(*pid).c_str()); system(cmd_buf); char filename_buf[1024]; snprintf(filename_buf, 1024, "%s.txt", std::to_string(*pid).c_str()); std::string filename = std::string(filename_buf); std::ifstream infile(filename); std::string port_str; std::getline(infile, port_str); *port = std::stoi(port_str); } static void RemovePortFile(int pid) { static std::string cmd = "rm %s.txt"; char cmd_buf[1024]; snprintf(cmd_buf, 1024, cmd.c_str(), std::to_string(pid).c_str()); std::cout << "Execute: " << std::string(cmd_buf) << std::endl; system(cmd_buf); } }; } // namespace be } // end namespace proxima ================================================ FILE: tests/server/proto_converter_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include #define private public #include "server/proto_converter.h" #undef private #include using namespace proxima::be; using namespace proxima::be::server; class ProtoConverterTest : public testing::Test { protected: void SetUp() {} void TearDown() {} }; TEST_F(ProtoConverterTest, TestConvertIndexDataSuccessWithJson) { std::string index_value("[1,2,3,4,5,6]"); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_FP32); meta->set_dimension(6); meta->set_name("field1"); int dimension = 6; aitheta2::IndexParams *params = meta->mutable_parameters(); params->set("dimension", dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_FP32); index::ColumnData column_data; int ret = ProtoConverter::ConvertIndexData(index_value, *meta, proto_meta, false, &column_data); ASSERT_EQ(ret, 0); ASSERT_EQ(column_data.column_name, "field1"); ASSERT_EQ(column_data.data_type, DataTypes::VECTOR_FP32); ASSERT_EQ(column_data.dimension, 6); const float *data = (const float *)(&(column_data.data[0])); for (uint32_t i = 1; i <= column_data.dimension; ++i) { ASSERT_FLOAT_EQ(1.0f * i, data[i - 1]); } } TEST_F(ProtoConverterTest, TestConvertIndexDataSuccessWithBytes) { std::vector vectors = {1, 2, 3, 4, 5, 6}; std::string index_value((const char *)vectors.data(), vectors.size() * sizeof(float)); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_FP32); int dimension = 6; meta->set_dimension(dimension); meta->set_name("field1"); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_FP32); index::ColumnData column_data; int ret = ProtoConverter::ConvertIndexData(index_value, *meta, proto_meta, true, &column_data); ASSERT_EQ(ret, 0); ASSERT_EQ(column_data.column_name, "field1"); ASSERT_EQ(column_data.data_type, DataTypes::VECTOR_FP32); ASSERT_EQ(column_data.dimension, 6); const float *data = (const float *)(&(column_data.data[0])); for (uint32_t i = 1; i <= column_data.dimension; ++i) { ASSERT_FLOAT_EQ(1.0f * i, data[i - 1]); } } TEST_F(ProtoConverterTest, TestConvertIndexDataWithParseFailed) { std::string index_value("[1,2,3,4,5]"); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_FP32); int dimension = 6; meta->set_dimension(6); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_FP32); index::ColumnData column_data; int ret = ProtoConverter::ConvertIndexData(index_value, *meta, proto_meta, false, &column_data); ASSERT_EQ(ret, ErrorCode_MismatchedDimension); } TEST_F(ProtoConverterTest, TestConvertIndexDataWithUnsupportedIndexType) { std::string index_value("[1,2,3,4,5,6]"); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::UNDEFINED); meta->set_data_type(DataTypes::VECTOR_FP32); int dimension = 6; meta->set_dimension(dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_FP32); index::ColumnData column_data; int ret = ProtoConverter::ConvertIndexData(index_value, *meta, proto_meta, false, &column_data); ASSERT_EQ(ret, ErrorCode_InvalidIndexType); } TEST_F(ProtoConverterTest, TestParseJsonIndexColumnValueaFp32) { std::string index_value("[1,2,3,4,5,6]"); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_FP32); uint32_t dimension = 6; meta->set_dimension(dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_FP32); std::string output_value; int ret = ProtoConverter::ParseJsonIndexColumnValue( index_value, *meta, proto_meta, &output_value); ASSERT_EQ(ret, 0); const float *data = (const float *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension; ++i) { ASSERT_FLOAT_EQ(1.0f * i, data[i - 1]); } } TEST_F(ProtoConverterTest, TestParseJsonIndexColumnValueaFp32WithTransformNoSupport) { std::string index_value("[1,2,3,4,5,6]"); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_FP32); uint32_t dimension = 6; meta->set_dimension(dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_INT8); std::string output_value; int ret = ProtoConverter::ParseJsonIndexColumnValue( index_value, *meta, proto_meta, &output_value); ASSERT_EQ(ret, ErrorCode_MismatchedDataType); } TEST_F(ProtoConverterTest, TestParseJsonIndexColumnValueaFp32WithTransformSuccess) { std::string index_value("[1,2,3,4,5,6]"); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_FP16); uint32_t dimension = 6; meta->set_dimension(dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_FP32); std::string output_value; int ret = ProtoConverter::ParseJsonIndexColumnValue( index_value, *meta, proto_meta, &output_value); ASSERT_EQ(ret, 0); const uint16_t *data = (const uint16_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension; ++i) { ASSERT_FLOAT_EQ(1.0f * i, ailego::FloatHelper::ToFP32(data[i - 1])); } } TEST_F(ProtoConverterTest, TestParseJsonIndexColumnValueaFp16) { std::string index_value("[1,2,3,4,5,6]"); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_FP16); uint32_t dimension = 6; meta->set_dimension(dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_FP16); std::string output_value; int ret = ProtoConverter::ParseJsonIndexColumnValue( index_value, *meta, proto_meta, &output_value); ASSERT_EQ(ret, 0); const uint16_t *data = (const uint16_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension; ++i) { ASSERT_FLOAT_EQ(1.0f * i, ailego::FloatHelper::ToFP32(data[i - 1])); } } TEST_F(ProtoConverterTest, TestParseJsonIndexColumnValueaInt16) { std::string index_value("[1,2,3,4,5,6]"); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_INT16); uint32_t dimension = 6; meta->set_dimension(dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_INT16); std::string output_value; int ret = ProtoConverter::ParseJsonIndexColumnValue( index_value, *meta, proto_meta, &output_value); ASSERT_EQ(ret, 0); const int16_t *data = (const int16_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension; ++i) { ASSERT_FLOAT_EQ((int16_t)i, data[i - 1]); } } TEST_F(ProtoConverterTest, TestParseJsonIndexColumnValueaInt8) { std::string index_value("[1,2,3,4,5,6]"); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_INT8); uint32_t dimension = 6; meta->set_dimension(dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_INT8); std::string output_value; int ret = ProtoConverter::ParseJsonIndexColumnValue( index_value, *meta, proto_meta, &output_value); ASSERT_EQ(ret, 0); const int8_t *data = (const int8_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension; ++i) { ASSERT_FLOAT_EQ((int8_t)i, data[i - 1]); } } TEST_F(ProtoConverterTest, TestParseJsonIndexColumnValueaInt4) { std::string index_value("[1,2,3,4,5,6]"); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_INT4); uint32_t dimension = 6; meta->set_dimension(dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_INT4); std::string output_value; int ret = ProtoConverter::ParseJsonIndexColumnValue( index_value, *meta, proto_meta, &output_value); ASSERT_EQ(ret, 0); const uint8_t *data = (const uint8_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension / 2; ++i) { ASSERT_FLOAT_EQ((int8_t)(2 * i - 1), (int8_t)(data[i - 1] & 0xf)); ASSERT_FLOAT_EQ((uint8_t)(2 * i), (int8_t)(data[i - 1] >> 4)); } } TEST_F(ProtoConverterTest, TestParseJsonIndexColumnValueaBinary32) { std::string index_value("[1,2,3,4,5,6,7,8]"); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_BINARY32); uint32_t dimension = 256; meta->set_dimension(dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_BINARY32); std::string output_value; int ret = ProtoConverter::ParseJsonIndexColumnValue( index_value, *meta, proto_meta, &output_value); ASSERT_EQ(ret, 0); const uint32_t *data = (const uint32_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension / 32; ++i) { ASSERT_FLOAT_EQ((uint32_t)i, data[i - 1]); } } TEST_F(ProtoConverterTest, TestParseJsonIndexColumnValueaBinary64) { std::string index_value("[1,2,3,4,5,6,7,8]"); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_BINARY64); uint32_t dimension = 512; meta->set_dimension(dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_BINARY64); std::string output_value; int ret = ProtoConverter::ParseJsonIndexColumnValue( index_value, *meta, proto_meta, &output_value); ASSERT_EQ(ret, 0); const uint64_t *data = (const uint64_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension / 64; ++i) { ASSERT_FLOAT_EQ((uint64_t)i, data[i - 1]); } } TEST_F(ProtoConverterTest, TestParseBytesIndexColumnValueWithoutTransform) { std::vector vectors = {1, 2, 3, 4, 5, 6}; std::string index_value((const char *)vectors.data(), vectors.size() * sizeof(float)); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_FP32); uint32_t dimension = 6; meta->set_dimension(dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_FP32); std::string output_value; int ret = ProtoConverter::ParseBytesIndexColumnValue( index_value, *meta, proto_meta, &output_value); ASSERT_EQ(ret, 0); const float *data = (const float *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension; ++i) { ASSERT_FLOAT_EQ(1.0f * i, data[i - 1]); } } TEST_F(ProtoConverterTest, TestParseBytesIndexColumnValueWithTransform) { std::vector vectors = {1, 2, 3, 4, 5, 6}; std::string index_value((const char *)vectors.data(), vectors.size() * sizeof(float)); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_FP16); uint32_t dimension = 6; meta->set_dimension(dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_FP32); std::string output_value; int ret = ProtoConverter::ParseBytesIndexColumnValue( index_value, *meta, proto_meta, &output_value); ASSERT_EQ(ret, 0); const uint16_t *data = (const uint16_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension; ++i) { ASSERT_FLOAT_EQ(1.0f * i, ailego::FloatHelper::ToFP32(data[i - 1])); } } TEST_F(ProtoConverterTest, TestParseBytesIndexColumnValueWithTransformFailed) { std::vector vectors = {1, 2, 3, 4, 5, 6}; std::string index_value((const char *)vectors.data(), vectors.size() * sizeof(float)); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_FP16); uint32_t dimension = 6; meta->set_dimension(dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_INT16); std::string output_value; int ret = ProtoConverter::ParseBytesIndexColumnValue( index_value, *meta, proto_meta, &output_value); ASSERT_EQ(ret, ErrorCode_MismatchedDataType); } TEST_F(ProtoConverterTest, TestCopyBytesIndexColumnValueFp32) { std::vector vectors = {1, 2, 3, 4, 5, 6}; std::string index_value((const char *)vectors.data(), vectors.size() * sizeof(float)); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_FP32); uint32_t dimension = 6; meta->set_dimension(dimension); std::string output_value; int ret = ProtoConverter::CopyBytesIndexColumnValue(index_value, *meta, &output_value); ASSERT_EQ(ret, 0); const float *data = (const float *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension; ++i) { ASSERT_FLOAT_EQ(1.0f * i, data[i - 1]); } } TEST_F(ProtoConverterTest, TestCopyBytesIndexColumnValueaFp16) { std::vector vectors = {1, 2, 3, 4, 5, 6}; std::string index_value; index_value.resize(12); ailego::FloatHelper::ToFP16(reinterpret_cast(vectors.data()), vectors.size(), reinterpret_cast(&index_value[0])); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_FP16); uint32_t dimension = 6; meta->set_dimension(dimension); std::string output_value; int ret = ProtoConverter::CopyBytesIndexColumnValue(index_value, *meta, &output_value); ASSERT_EQ(ret, 0); const uint16_t *data = (const uint16_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension; ++i) { ASSERT_FLOAT_EQ(1.0f * i, ailego::FloatHelper::ToFP32(data[i - 1])); } } TEST_F(ProtoConverterTest, TestCopyBytesIndexColumnValueaInt16) { std::vector vectors = {1, 2, 3, 4, 5, 6}; std::string index_value((const char *)vectors.data(), vectors.size() * sizeof(int16_t)); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_INT16); uint32_t dimension = 6; meta->set_dimension(dimension); std::string output_value; int ret = ProtoConverter::CopyBytesIndexColumnValue(index_value, *meta, &output_value); ASSERT_EQ(ret, 0); const int16_t *data = (const int16_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension; ++i) { ASSERT_FLOAT_EQ((int16_t)i, data[i - 1]); } } TEST_F(ProtoConverterTest, TestCopyBytesIndexColumnValueaInt8) { std::vector vectors = {1, 2, 3, 4, 5, 6}; std::string index_value((const char *)vectors.data(), vectors.size() * sizeof(int8_t)); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_INT8); uint32_t dimension = 6; meta->set_dimension(dimension); std::string output_value; int ret = ProtoConverter::CopyBytesIndexColumnValue(index_value, *meta, &output_value); ASSERT_EQ(ret, 0); const int8_t *data = (const int8_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension; ++i) { ASSERT_FLOAT_EQ((int8_t)i, data[i - 1]); } } TEST_F(ProtoConverterTest, TestCopyBytesIndexColumnValueaInt4) { std::vector vectors = {1, 2, 3, 4, 5, 6}; std::string index_value; index_value.resize(3); uint8_t *out = reinterpret_cast(&index_value[0]); for (size_t i = 0; i < vectors.size(); i += 2) { out[i / 2] = (static_cast(vectors[i + 1]) << 4) | (static_cast(vectors[i]) & 0xF); } meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_INT4); uint32_t dimension = 6; meta->set_dimension(dimension); std::string output_value; int ret = ProtoConverter::CopyBytesIndexColumnValue(index_value, *meta, &output_value); ASSERT_EQ(ret, 0); const uint8_t *data = (const uint8_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension / 2; ++i) { ASSERT_FLOAT_EQ((int8_t)(2 * i - 1), (int8_t)(data[i - 1] & 0xf)); ASSERT_FLOAT_EQ((uint8_t)(2 * i), (int8_t)(data[i - 1] >> 4)); } } TEST_F(ProtoConverterTest, TestCopyBytesIndexColumnValueaBinary32) { std::vector vectors = {1, 2, 3, 4, 5, 6, 7, 8}; std::string index_value((const char *)vectors.data(), vectors.size() * sizeof(uint32_t)); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_BINARY32); uint32_t dimension = 256; meta->set_dimension(dimension); std::string output_value; int ret = ProtoConverter::CopyBytesIndexColumnValue(index_value, *meta, &output_value); ASSERT_EQ(ret, 0); const uint32_t *data = (const uint32_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension / 32; ++i) { ASSERT_FLOAT_EQ((uint32_t)i, data[i - 1]); } } TEST_F(ProtoConverterTest, TestCopyBytesIndexColumnValueaBinary64) { std::vector vectors = {1, 2, 3, 4, 5, 6, 7, 8}; std::string index_value((const char *)vectors.data(), vectors.size() * sizeof(uint64_t)); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_BINARY64); uint32_t dimension = 512; meta->set_dimension(dimension); std::string output_value; int ret = ProtoConverter::CopyBytesIndexColumnValue(index_value, *meta, &output_value); ASSERT_EQ(ret, 0); const uint64_t *data = (const uint64_t *)(&(output_value[0])); for (uint32_t i = 1; i <= dimension / 64; ++i) { ASSERT_FLOAT_EQ((uint64_t)i, data[i - 1]); } } TEST_F(ProtoConverterTest, TestParseIndexColumnFailedWithParseJsonVector) { std::string index_value("[1,2,3,4,5,6,7,8"); meta::ColumnMetaPtr meta = std::make_shared(); meta->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); meta->set_data_type(DataTypes::VECTOR_BINARY64); uint32_t dimension = 512; meta->set_dimension(dimension); proto::WriteRequest::IndexColumnMeta proto_meta; proto_meta.set_dimension(dimension); proto_meta.set_data_type(proto::DataType::DT_VECTOR_BINARY64); std::string output_value; int ret = ProtoConverter::ParseJsonIndexColumnValue( index_value, *meta, proto_meta, &output_value); ASSERT_EQ(ret, ErrorCode_MismatchedDimension); } // TEST_F(ProtoConverterTest, TestCompare) { // std::vector vectors; // size_t count = 100000; // size_t dimension = 512; // std::cout << "Begin generate data: " << std::endl; // for (size_t i = 0; i < count; ++i) { // std::ostringstream oss; // oss << 1.0 / (i + 1); // for (size_t j = 1; j < dimension; ++j) { // oss << "," << 1.0 / (i + 1 + j); // } // vectors.emplace_back(oss.str()); // } // std::cout << "End generate data: " << std::endl; // std::cout << "Begin process data: " << std::endl; // uint64_t start = ailego::Monotime::MilliSeconds(); // for (size_t i = 0; i < count; ++i) { // std::vector vector; // ailego::StringHelper::Split(vectors[i], ",", &vector); // if (vector.empty()) { // std::cout << "Failed " << i << std::endl; // continue; // } // } // uint64_t end = ailego::Monotime::MilliSeconds(); // std::cout << "End process data: " << std::endl; // float qps = count * 1000.0 / (end - start); // std::cout << "total cost:" << (end - start) / 1000.0 << "s, qps: " << qps // << std::endl; // } // TEST_F(ProtoConverterTest, TestCompare1) { // std::vector vectors; // size_t count = 100000; // size_t dimension = 512; // std::cout << "Begin generate data: " << std::endl; // for (size_t i = 0; i < count; ++i) { // std::ostringstream oss; // oss << "[" << 1.0 / (i + 1); // for (size_t j = 1; j < dimension; ++j) { // oss << "," << 1.0 / (i + 1 + j); // } // oss << "]"; // vectors.emplace_back(oss.str()); // } // std::cout << "End generate data: " << std::endl; // std::cout << "Begin process data: " << std::endl; // uint64_t start = ailego::Monotime::MilliSeconds(); // for (size_t i = 0; i < count; ++i) { // std::vector vector; // ailego::JsonValue root_node; // if (!root_node.parse(vectors[i].c_str())) { // std::cout << "Parse failed " << i << std::endl; // continue; // } // ailego::JsonArray &array = root_node.as_array(); // for (auto it = array.begin(); it != array.end(); ++it) { // vector.emplace_back(it->as_float()); // } // if (vector.size() != dimension) { // std::cout << "Failed " << i << std::endl; // continue; // } // } // uint64_t end = ailego::Monotime::MilliSeconds(); // std::cout << "End process data: " << std::endl; // float qps = count * 1000.0 / (end - start); // std::cout << "total cost:" << (end - start) / 1000.0 << "s, qps: " << qps // << std::endl; // } ================================================ FILE: tests/server/proxima_search_engine_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define private public #define protected public #include "common/config.h" #undef private #undef protected #include #include #include "common/defer.h" #include "server/proxima_search_engine.h" #include "port_helper.h" #include "proxima_search_client.h" #ifdef proxima_search_engine_test_VERSION #define PROXIMA_BE_VERSION_STRING proxima_search_engine_test_VERSION #else #define PROXIMA_BE_VERSION_STRING "unknown" #endif using namespace proxima::be; using namespace proxima::be::server; class ProximaSearchEngineTest : public ::testing::Test { protected: virtual void SetUp() { ailego::FileHelper::RemoveDirectory("./test_proxima_be/"); int pid; PortHelper::GetPort(&grpc_port_, &pid); PortHelper::GetPort(&http_port_, &pid); PortHelper::RemovePortFile(pid); auto &config = Config::Instance(); config.config_.mutable_common_config()->set_logger_type("ConsoleLogger"); config.config_.mutable_common_config()->set_log_directory( "./test_proxima_be/log/"); config.config_.mutable_common_config()->set_protocol("grpc"); config.config_.mutable_common_config()->set_grpc_listen_port(grpc_port_); config.config_.mutable_common_config()->set_http_listen_port(http_port_); config.config_.mutable_index_config()->set_index_directory( "./test_proxima_be/index_data/"); std::string work_directory; ailego::FileHelper::GetWorkingDirectory(&work_directory); std::string meta_uri = "sqlite://" + work_directory + "/test_proxima_be/proxima_be_meta.sqlite"; config.config_.mutable_meta_config()->set_meta_uri(meta_uri); } virtual void TearDown() {} protected: int grpc_port_; int http_port_; }; TEST_F(ProximaSearchEngineTest, TestClient) { auto &engine = ProximaSearchEngine::Instance(); int ret = engine.init(false, ""); ASSERT_EQ(ret, 0); Defer defer([&engine] { engine.stop(); engine.cleanup(); }); engine.set_version(PROXIMA_BE_VERSION_STRING); ret = engine.start(); ASSERT_EQ(ret, 0); // Create a client ProximaSearchClientPtr client = ProximaSearchClient::Create(); ASSERT_TRUE(client != nullptr); // Connect to server ChannelOptions options(std::string("127.0.0.1:") + std::to_string(grpc_port_)); options.timeout_ms = 60000U; Status status = client->connect(options); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); // Create collection CollectionConfig config; config.collection_name = "test_collection"; config.forward_columns = {"fwd_column1", "fwd_column2", "fwd_column3", "fwd_column4"}; config.index_columns = { IndexColumnParam("test_column", DataType::VECTOR_FP32, 8)}; status = client->create_collection(config); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); // Describe collection CollectionInfo collection_info; status = client->describe_collection("test_collection", &collection_info); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); ASSERT_EQ(collection_info.collection_name, "test_collection"); ASSERT_EQ(collection_info.forward_columns.size(), 4); ASSERT_EQ(collection_info.forward_columns[0], "fwd_column1"); ASSERT_EQ(collection_info.forward_columns[1], "fwd_column2"); ASSERT_EQ(collection_info.forward_columns[2], "fwd_column3"); ASSERT_EQ(collection_info.forward_columns[3], "fwd_column4"); ASSERT_EQ(collection_info.index_columns.size(), 1); ASSERT_EQ(collection_info.index_columns[0].column_name, "test_column"); ASSERT_EQ(collection_info.index_columns[0].index_type, IndexType::PROXIMA_GRAPH_INDEX); ASSERT_EQ(collection_info.index_columns[0].data_type, DataType::VECTOR_FP32); ASSERT_EQ(collection_info.index_columns[0].dimension, 8); // Insert records WriteRequestPtr write_request = WriteRequest::Create(); write_request->set_collection_name("test_collection"); write_request->add_forward_columns( {"fwd_column1", "fwd_column2", "fwd_column3", "fwd_column4"}); write_request->add_index_column("test_column", DataType::VECTOR_FP32, 8); for (int i = 0; i < 10; i++) { WriteRequest::RowPtr row = write_request->add_row(); row->set_primary_key(i); row->set_operation_type(OperationType::INSERT); row->add_index_value({i + 0.1f, i + 0.2f, i + 0.3f, i + 0.4f, i + 0.5f, i + 0.6f, i + 0.7f, i + 0.8f}); // "test_column" row->add_forward_value("hello" + std::to_string(i)); // "fwd_column1" row->add_forward_value((int64_t)i); // "fwd_column2" row->add_forward_value((float)i); // "fwd_column3" row->add_forward_value((double)i); // "fwd_column4" } status = client->write(*write_request); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); // Stats collection CollectionStats collection_stats; status = client->stats_collection("test_collection", &collection_stats); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); ASSERT_EQ(collection_stats.collection_name, "test_collection"); ASSERT_EQ(collection_stats.total_doc_count, 10); ASSERT_EQ(collection_stats.total_segment_count, 1); ASSERT_EQ(collection_stats.segment_stats.size(), 1); ASSERT_EQ(collection_stats.segment_stats[0].doc_count, 10); ASSERT_EQ(collection_stats.segment_stats[0].min_primary_key, 0); ASSERT_EQ(collection_stats.segment_stats[0].max_primary_key, 9); // Query records QueryRequestPtr query_request = QueryRequest::Create(); QueryResponsePtr query_response = QueryResponse::Create(); query_request->set_collection_name("test_collection"); QueryRequest::KnnQueryParamPtr knn_param = query_request->add_knn_query_param(); knn_param->set_column_name("test_column"); knn_param->set_topk(10); knn_param->set_features({0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8}); status = client->query(*query_request, query_response.get()); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); ASSERT_EQ(query_response->result_count(), 1); auto result = query_response->result(0); ASSERT_EQ(result->document_count(), 10); for (size_t i = 0; i < result->document_count(); i++) { auto doc = result->document(i); ASSERT_EQ(doc->primary_key(), i); std::string fwd_val1; int64_t fwd_val2; float fwd_val3; double fwd_val4; doc->get_forward_value("fwd_column1", &fwd_val1); doc->get_forward_value("fwd_column2", &fwd_val2); doc->get_forward_value("fwd_column3", &fwd_val3); doc->get_forward_value("fwd_column4", &fwd_val4); ASSERT_EQ(fwd_val1, "hello" + std::to_string(i)); ASSERT_EQ(fwd_val2, (int64_t)i); ASSERT_EQ(fwd_val3, (float)i); ASSERT_EQ(fwd_val4, (double)i); } // test wrong forward auto doc = result->document(3); uint32_t wrong_type_fwd_value1; doc->get_forward_value("fwd_column4", &wrong_type_fwd_value1); ASSERT_EQ(wrong_type_fwd_value1, 0); uint64_t wrong_type_fwd_value2; doc->get_forward_value("fwd_column3", &wrong_type_fwd_value2); ASSERT_EQ(wrong_type_fwd_value2, 0); bool wrong_type_fwd_value3; doc->get_forward_value("fwd_column2", &wrong_type_fwd_value3); ASSERT_EQ(wrong_type_fwd_value3, false); // test insert json format WriteRequestPtr write_request2 = WriteRequest::Create(); write_request2->set_collection_name("test_collection"); write_request2->add_forward_columns( {"fwd_column1", "fwd_column2", "fwd_column3", "fwd_column4"}); write_request2->add_index_column("test_column", DataType::VECTOR_FP32, 8); WriteRequest::RowPtr row = write_request2->add_row(); row->set_primary_key(10); row->set_operation_type(OperationType::INSERT); row->add_index_value_by_json( "[10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8]"); row->add_forward_value("hello" + std::to_string(10)); row->add_forward_value((int64_t)10); row->add_forward_value((float)10); row->add_forward_value((double)10); status = client->write(*write_request2); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); // test query json format QueryRequestPtr query_request2 = QueryRequest::Create(); QueryResponsePtr query_response2 = QueryResponse::Create(); query_request2->set_collection_name("test_collection"); auto knn_param2 = query_request2->add_knn_query_param(); knn_param2->set_column_name("test_column"); knn_param2->set_topk(10); knn_param2->set_features_by_json( "[10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8]"); knn_param2->set_data_type(DataType::VECTOR_FP32); knn_param2->set_dimension(8); status = client->query(*query_request2, query_response2.get()); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); ASSERT_EQ(query_response2->result_count(), 1); auto result2 = query_response2->result(0); ASSERT_EQ(result2->document_count(), 10); { auto doc = result2->document(0); ASSERT_EQ(doc->primary_key(), 10); ASSERT_EQ(doc->score(), 0.0f); std::string fwd_val1; int64_t fwd_val2; float fwd_val3; double fwd_val4; doc->get_forward_value("fwd_column1", &fwd_val1); doc->get_forward_value("fwd_column2", &fwd_val2); doc->get_forward_value("fwd_column3", &fwd_val3); doc->get_forward_value("fwd_column4", &fwd_val4); ASSERT_EQ(fwd_val1, "hello10"); ASSERT_EQ(fwd_val2, (int64_t)10); ASSERT_EQ(fwd_val3, (float)10); ASSERT_EQ(fwd_val4, (double)10); } // Drop collection status = client->drop_collection("test_collection"); ASSERT_EQ(status.reason, "Success"); ASSERT_EQ(status.code, 0); ret = engine.stop(); ASSERT_EQ(ret, 0); ret = engine.cleanup(); ASSERT_EQ(ret, 0); } ================================================ FILE: tests/server/write_request_builder_test.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define private public #include "server/write_request_builder.h" #undef private #include #include "common/error_code.h" using namespace ::proxima::be; using namespace ::proxima::be::server; class WriteRequestBuilderTest : public testing::Test { protected: void SetUp() {} void TearDown() {} }; void fill_collection_info(proto::WriteRequest &request, meta::CollectionMetaPtr *meta, agent::ColumnOrderMapPtr *order_map, bool with_repo = true, bool is_bytes = false) { request.set_request_id("00000000"); if (with_repo) { request.set_magic_number(140140140); } int dim = 4; request.set_collection_name("mytest"); auto *row_meta = request.mutable_row_meta(); auto *column_meta = row_meta->add_index_column_metas(); column_meta->set_column_name("field1"); column_meta->set_data_type(proto::DataType::DT_VECTOR_FP32); column_meta->set_dimension(dim); ; row_meta->add_forward_column_names("forward_f1"); row_meta->add_forward_column_names("forward_f2"); auto *row1 = request.add_rows(); row1->set_primary_key(1000); row1->set_operation_type(::proxima::be::proto::OP_INSERT); if (with_repo) { auto *ctx = row1->mutable_lsn_context(); ctx->set_lsn(1); ctx->set_context("binlog:123"); } if (!is_bytes) { row1->mutable_index_column_values()->add_values()->set_string_value( "[1,2,3,4]"); } else { std::vector vectors = {1.0, 2.0, 3.0, 4.0}; row1->mutable_index_column_values()->add_values()->set_bytes_value( (const void *)vectors.data(), vectors.size() * sizeof(float)); } row1->mutable_forward_column_values()->add_values()->set_float_value(10.0); row1->mutable_forward_column_values()->add_values()->set_int32_value(20); *meta = std::make_shared(); (*meta)->set_name("mytest"); if (with_repo) { meta::RepositoryBasePtr repo = std::make_shared(); repo->set_name("mytest"); (*meta)->set_repository(repo); } (*meta)->mutable_forward_columns()->emplace_back("forward_f1"); (*meta)->mutable_forward_columns()->emplace_back("forward_f2"); auto *index_columns = (*meta)->mutable_index_columns(); meta::ColumnMetaPtr column_meta1 = std::make_shared(); column_meta1->set_index_type(IndexTypes::PROXIMA_GRAPH_INDEX); column_meta1->set_name("field1"); column_meta1->set_data_type(DataTypes::VECTOR_FP32); column_meta1->set_dimension(4); index_columns->emplace_back(column_meta1); *order_map = std::make_shared(); (*order_map)->add_column_order(**meta); } int create_write_request(const proto::WriteRequest &request, const meta::CollectionMetaPtr &meta, agent::ColumnOrderMapPtr &order_map, agent::WriteRequest *write_request) { auto column_order = order_map->get_column_order(request.collection_name()); return WriteRequestBuilder::build(*meta, *column_order, request, write_request); } TEST_F(WriteRequestBuilderTest, TestCreateSuccessWithProxyWrite) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; fill_collection_info(request, &meta, &order_map, true); agent::WriteRequest write_request; int ret = create_write_request(request, meta, order_map, &write_request); ASSERT_EQ(ret, 0); ASSERT_EQ(write_request.magic_number(), 140140140); ASSERT_EQ(write_request.collection_name(), "mytest"); auto &records = write_request.get_collection_dataset(); ASSERT_EQ(records.size(), (size_t)1); ASSERT_EQ(records[0]->size(), (size_t)1); ASSERT_EQ(records[0]->schema_revision_, 0); auto &raw_data = records[0]->get(0); ASSERT_EQ(raw_data.primary_key, 1000); ASSERT_EQ(raw_data.operation_type, OperationTypes::INSERT); ASSERT_EQ(raw_data.lsn, 1); ASSERT_EQ(raw_data.lsn_context, "binlog:123"); ::proxima::be::proto::GenericValueList forward_list; forward_list.add_values()->set_float_value(10.0); forward_list.add_values()->set_int32_value(20); std::string expected_forward_str; forward_list.SerializeToString(&expected_forward_str); ASSERT_EQ(raw_data.forward_data, expected_forward_str); auto &column_datas = raw_data.column_datas; ASSERT_EQ(column_datas.size(), (size_t)1); ASSERT_EQ(column_datas[0].column_name, "field1"); ASSERT_EQ(column_datas[0].data_type, DataTypes::VECTOR_FP32); ASSERT_EQ(column_datas[0].dimension, (uint32_t)4); ASSERT_EQ(column_datas[0].data.size(), (size_t)16); const float *vector_data = (const float *)column_datas[0].data.data(); ASSERT_FLOAT_EQ(vector_data[0], 1.0); ASSERT_FLOAT_EQ(vector_data[1], 2.0); ASSERT_FLOAT_EQ(vector_data[2], 3.0); ASSERT_FLOAT_EQ(vector_data[3], 4.0); } TEST_F(WriteRequestBuilderTest, TestCreateSuccessWithDirectWrite) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; fill_collection_info(request, &meta, &order_map, false); agent::WriteRequest write_request; int ret = create_write_request(request, meta, order_map, &write_request); ASSERT_EQ(ret, 0); ASSERT_EQ(write_request.magic_number(), 0); ASSERT_EQ(write_request.collection_name(), "mytest"); auto &records = write_request.get_collection_dataset(); ASSERT_EQ(records.size(), (size_t)1); auto &record = records[0]; ASSERT_EQ(record->schema_revision_, 0); auto &raw_data = record->get(0); ASSERT_EQ(raw_data.primary_key, 1000); ASSERT_EQ(raw_data.lsn_check, false); ASSERT_EQ(raw_data.operation_type, OperationTypes::INSERT); ::proxima::be::proto::GenericValueList forward_list; forward_list.add_values()->set_float_value(10.0); forward_list.add_values()->set_int32_value(20); std::string expected_forward_str; forward_list.SerializeToString(&expected_forward_str); ASSERT_EQ(raw_data.forward_data, expected_forward_str); auto &column_datas = raw_data.column_datas; ASSERT_EQ(column_datas.size(), (size_t)1); ASSERT_EQ(column_datas[0].column_name, "field1"); ASSERT_EQ(column_datas[0].data_type, DataTypes::VECTOR_FP32); ASSERT_EQ(column_datas[0].dimension, (uint32_t)4); ASSERT_EQ(column_datas[0].data.size(), (size_t)16); const float *vector_data = (const float *)column_datas[0].data.data(); ASSERT_FLOAT_EQ(vector_data[0], 1.0); ASSERT_FLOAT_EQ(vector_data[1], 2.0); ASSERT_FLOAT_EQ(vector_data[2], 3.0); ASSERT_FLOAT_EQ(vector_data[3], 4.0); } TEST_F(WriteRequestBuilderTest, TestCreateFailedWithDimensionMismatched) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; fill_collection_info(request, &meta, &order_map, true); request.mutable_row_meta()->mutable_index_column_metas(0)->set_dimension(100); agent::WriteRequest write_request; int ret = create_write_request(request, meta, order_map, &write_request); ASSERT_EQ(ret, ErrorCode_InvalidWriteRequest); } TEST_F(WriteRequestBuilderTest, TestCreateFailedWithValidate) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; fill_collection_info(request, &meta, &order_map, true); agent::WriteRequest write_request; proto::WriteRequest tmp_request; int ret = create_write_request(tmp_request, meta, order_map, &write_request); ASSERT_EQ(ret, ErrorCode_InvalidWriteRequest); } TEST_F(WriteRequestBuilderTest, TestCreateFailedWithBuildProxyRequest) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; agent::WriteRequest write_request; fill_collection_info(request, &meta, &order_map, true); request.mutable_rows(0)->clear_lsn_context(); int ret = create_write_request(request, meta, order_map, &write_request); ASSERT_EQ(ret, ErrorCode_EmptyLsnContext); } TEST_F(WriteRequestBuilderTest, TestCreateFailedWithBuildDirectRequest) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; agent::WriteRequest write_request; fill_collection_info(request, &meta, &order_map, false); request.mutable_rows(0) ->mutable_index_column_values() ->mutable_values(0) ->set_string_value("invalid vector"); int ret = create_write_request(request, meta, order_map, &write_request); ASSERT_EQ(ret, ErrorCode_MismatchedDimension); } TEST_F(WriteRequestBuilderTest, TestGetIndexAndForwardModeWithFullMatch) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; agent::WriteRequest write_request; fill_collection_info(request, &meta, &order_map, false); bool index_full_match; bool forward_full_match; WriteRequestBuilder::get_index_and_forward_mode( request, *meta, &index_full_match, &forward_full_match); ASSERT_TRUE(index_full_match); ASSERT_TRUE(forward_full_match); } TEST_F(WriteRequestBuilderTest, TestGetIndexAndForwardModeWithNotFullMatch) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; agent::WriteRequest write_request; fill_collection_info(request, &meta, &order_map, false); request.mutable_row_meta()->set_forward_column_names(0, "invalid"); auto *index_meta = request.mutable_row_meta()->mutable_index_column_metas(0); index_meta->set_column_name("invalid"); bool index_full_match; bool forward_full_match; WriteRequestBuilder::get_index_and_forward_mode( request, *meta, &index_full_match, &forward_full_match); ASSERT_FALSE(index_full_match); ASSERT_FALSE(forward_full_match); } TEST_F(WriteRequestBuilderTest, TestValidateRequest) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; agent::WriteRequest write_request; fill_collection_info(request, &meta, &order_map, true); agent::ColumnOrderPtr column_order = order_map->get_column_order("mytest"); int ret = WriteRequestBuilder::validate_request(request, *meta, *column_order, true, true); ASSERT_EQ(ret, 0); } TEST_F(WriteRequestBuilderTest, TestValidateRequestFailedWithIndexColumnSize) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; agent::WriteRequest write_request; fill_collection_info(request, &meta, &order_map, true); agent::ColumnOrderPtr column_order = order_map->get_column_order("mytest"); request.mutable_row_meta()->add_index_column_metas(); int ret = WriteRequestBuilder::validate_request(request, *meta, *column_order, true, true); ASSERT_EQ(ret, ErrorCode_InvalidWriteRequest); } TEST_F(WriteRequestBuilderTest, TestValidateRequestFailedWithIndexColumnName) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; agent::WriteRequest write_request; fill_collection_info(request, &meta, &order_map, true); agent::ColumnOrderPtr column_order = order_map->get_column_order("mytest"); auto *index_meta = request.mutable_row_meta()->mutable_index_column_metas(0); index_meta->set_column_name("invalid"); int ret = WriteRequestBuilder::validate_request(request, *meta, *column_order, false, true); ASSERT_EQ(ret, ErrorCode_InvalidWriteRequest); } TEST_F(WriteRequestBuilderTest, TestValidateRequestFailedWithForwardColumnSize) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; agent::WriteRequest write_request; fill_collection_info(request, &meta, &order_map, true); agent::ColumnOrderPtr column_order = order_map->get_column_order("mytest"); request.mutable_row_meta()->add_forward_column_names("invalid"); int ret = WriteRequestBuilder::validate_request(request, *meta, *column_order, true, false); ASSERT_EQ(ret, ErrorCode_InvalidWriteRequest); } TEST_F(WriteRequestBuilderTest, TestValidateRequestFailedWithForwardColumnName) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; agent::WriteRequest write_request; fill_collection_info(request, &meta, &order_map, true); agent::ColumnOrderPtr column_order = order_map->get_column_order("mytest"); request.mutable_row_meta()->set_forward_column_names(0, "invalid"); int ret = WriteRequestBuilder::validate_request(request, *meta, *column_order, true, false); ASSERT_EQ(ret, ErrorCode_InvalidWriteRequest); } TEST_F(WriteRequestBuilderTest, TestValidateRequestFailedWithIndexColumnSizeZero) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; agent::WriteRequest write_request; fill_collection_info(request, &meta, &order_map, true); agent::ColumnOrderPtr column_order = order_map->get_column_order("mytest"); request.mutable_row_meta()->clear_index_column_metas(); int ret = WriteRequestBuilder::validate_request(request, *meta, *column_order, true, false); ASSERT_EQ(ret, ErrorCode_InvalidWriteRequest); } TEST_F(WriteRequestBuilderTest, TestValidateRequestFailedWithIndexColumnSizeMismatched) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; agent::WriteRequest write_request; fill_collection_info(request, &meta, &order_map, true); agent::ColumnOrderPtr column_order = order_map->get_column_order("mytest"); request.mutable_rows(0)->clear_index_column_values(); int ret = WriteRequestBuilder::validate_request(request, *meta, *column_order, true, false); ASSERT_EQ(ret, ErrorCode_InvalidWriteRequest); } TEST_F(WriteRequestBuilderTest, TestValidateRequestFailedWithForwardColumnSizeMismatched) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; agent::WriteRequest write_request; fill_collection_info(request, &meta, &order_map, true); agent::ColumnOrderPtr column_order = order_map->get_column_order("mytest"); request.mutable_rows(0)->clear_forward_column_values(); int ret = WriteRequestBuilder::validate_request(request, *meta, *column_order, true, false); ASSERT_EQ(ret, ErrorCode_InvalidWriteRequest); } TEST_F(WriteRequestBuilderTest, TestBuildForwardsDataWithFull) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; fill_collection_info(request, &meta, &order_map, true); agent::ColumnOrderPtr column_order = order_map->get_column_order("mytest"); auto *row = request.mutable_rows(0); auto &row_meta = request.row_meta(); index::CollectionDataset::RowData row_data; bool forward_full_match = true; int ret = WriteRequestBuilder::build_forwards_data( *row, row_meta, *column_order, *meta, forward_full_match, &row_data); ASSERT_EQ(ret, 0); } TEST_F(WriteRequestBuilderTest, TestBuildForwardsDataWithNotFull) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; fill_collection_info(request, &meta, &order_map, true); agent::ColumnOrderPtr column_order = order_map->get_column_order("mytest"); auto *row = request.mutable_rows(0); auto &row_meta = request.row_meta(); index::CollectionDataset::RowData row_data; bool forward_full_match = false; int ret = WriteRequestBuilder::build_forwards_data( *row, row_meta, *column_order, *meta, forward_full_match, &row_data); ASSERT_EQ(ret, 0); } TEST_F(WriteRequestBuilderTest, TestBuildForwardsDataWithInvalidForwardColumn) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; fill_collection_info(request, &meta, &order_map, true); agent::ColumnOrderPtr column_order = order_map->get_column_order("mytest"); auto *row = request.mutable_rows(0); auto *row_meta = request.mutable_row_meta(); row_meta->set_forward_column_names(0, "invalid"); index::CollectionDataset::RowData row_data; bool forward_full_match = false; int ret = WriteRequestBuilder::build_forwards_data( *row, *row_meta, *column_order, *meta, forward_full_match, &row_data); ASSERT_EQ(ret, ErrorCode_InvalidWriteRequest); } TEST_F(WriteRequestBuilderTest, TestBuildIndexesDataWithFull) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; fill_collection_info(request, &meta, &order_map, true); auto *row = request.mutable_rows(0); auto &row_meta = request.row_meta(); index::CollectionDataset::RowData row_data; bool index_full_match = true; int ret = WriteRequestBuilder::build_indexes_data( *row, row_meta, *meta, index_full_match, &row_data); ASSERT_EQ(ret, 0); } TEST_F(WriteRequestBuilderTest, TestBuildIndexesDataWithNotFull) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; fill_collection_info(request, &meta, &order_map, true); auto *row = request.mutable_rows(0); auto &row_meta = request.row_meta(); index::CollectionDataset::RowData row_data; bool index_full_match = false; int ret = WriteRequestBuilder::build_indexes_data( *row, row_meta, *meta, index_full_match, &row_data); ASSERT_EQ(ret, 0); } TEST_F(WriteRequestBuilderTest, TestBuildIndexesDataWithIndexColumnNameInvalid) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; fill_collection_info(request, &meta, &order_map, true); auto *row = request.mutable_rows(0); auto *row_meta = request.mutable_row_meta(); auto *index_meta = request.mutable_row_meta()->mutable_index_column_metas(0); index_meta->set_column_name("invalid"); index::CollectionDataset::RowData row_data; bool index_full_match = false; int ret = WriteRequestBuilder::build_indexes_data( *row, *row_meta, *meta, index_full_match, &row_data); ASSERT_EQ(ret, ErrorCode_MismatchedIndexColumn); } TEST_F(WriteRequestBuilderTest, TestBuildIndexesDataWithIndexColumnTypeInvalid) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; fill_collection_info(request, &meta, &order_map, true); auto *row = request.mutable_rows(0); auto *row_meta = request.mutable_row_meta(); row->mutable_index_column_values()->mutable_values(0)->set_float_value( 123.456); index::CollectionDataset::RowData row_data; bool index_full_match = false; int ret = WriteRequestBuilder::build_indexes_data( *row, *row_meta, *meta, index_full_match, &row_data); ASSERT_EQ(ret, ErrorCode_MismatchedIndexColumn); } TEST_F(WriteRequestBuilderTest, TestBuildIndexesDataWithIndexTypeBytes) { proto::WriteRequest request; meta::CollectionMetaPtr meta; agent::ColumnOrderMapPtr order_map; fill_collection_info(request, &meta, &order_map, true, true); auto *row = request.mutable_rows(0); auto *row_meta = request.mutable_row_meta(); index::CollectionDataset::RowData row_data; bool index_full_match = false; int ret = WriteRequestBuilder::build_indexes_data( *row, *row_meta, *meta, index_full_match, &row_data); ASSERT_EQ(ret, 0); } ================================================ FILE: tools/CMakeLists.txt ================================================ ## ## Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ## \author haichao.chc ## \date Oct 2020 ## \brief CMakeLists.txt for tools include(../cmake/bazel.cmake) include(../cmake/option.cmake) if(APPLE) set(APPLE_FRAMEWORK_LIBS -framework CoreFoundation -framework CoreGraphics -framework CoreData -framework CoreText -framework Security -framework Foundation -Wl,-U,_MallocExtension_ReleaseFreeMemory -Wl,-U,_ProfilerStart -Wl,-U,_ProfilerStop -Wl,-U,_RegisterThriftProtocol ) endif() cc_binary( NAME bench_client PACKED SRCS bench_client.cc LIBS proxima_search_client proxima_be_common proxima brpc ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} INCS ../src/ ../sdk/cpp/include/ LDFLAGS ${APPLE_FRAMEWORK_LIBS} ) set_target_properties(bench_client PROPERTIES INSTALL_RPATH ${LIB_PATH}) cc_binary( NAME admin_client PACKED SRCS admin_client.cc LIBS proxima_be_proto proxima_be_common proxima brpc ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} INCS ../src/ LDFLAGS ${APPLE_FRAMEWORK_LIBS} ) set_target_properties(admin_client PROPERTIES INSTALL_RPATH ${LIB_PATH}) cc_binary( NAME index_builder PACKED SRCS index_builder.cc LIBS proxima_be_proto proxima_be_common proxima_be_index proxima brpc ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} INCS ../src/ LDFLAGS ${APPLE_FRAMEWORK_LIBS} ) set_target_properties(index_builder PROPERTIES INSTALL_RPATH ${LIB_PATH}) ================================================ FILE: tools/admin_client.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Client tool which can connect & operate remote * collections of proxima be */ #include #include #include #include #include #include #include #include "common/logger.h" #include "common/version.h" #include "proto/proxima_be.pb.h" DEFINE_string(command, "", "Command type: create | drop"); DEFINE_string(host, "", "The host of proxima be"); DEFINE_string(collection, "", "Collection name"); DEFINE_string(schema, "", "Collection schema"); static bool ValidateNotEmpty(const char *flagname, const std::string &value) { return !value.empty(); } DEFINE_validator(command, ValidateNotEmpty); DEFINE_validator(host, ValidateNotEmpty); DEFINE_validator(collection, ValidateNotEmpty); static inline void PrintUsage() { std::cout << "Usage:" << std::endl; std::cout << " admin_client " << std::endl << std::endl; std::cout << "Args: " << std::endl; std::cout << " --command Command type: create | drop" << std::endl; std::cout << " --host The host of proxima be" << std::endl; std::cout << " --collection Specify collection name" << std::endl; std::cout << " --schema Specify collection schema format" << std::endl; std::cout << " --help, -h Display help info" << std::endl; std::cout << " --version, -v Dipslay version info" << std::endl; } static brpc::Channel g_client_channel; static bool InitClientChannel() { brpc::ChannelOptions options; options.protocol = "http"; options.timeout_ms = 60000; options.max_retry = 2; if (g_client_channel.Init(FLAGS_host.c_str(), "", &options) != 0) { LOG_ERROR("Init client channel failed."); return false; } return true; } static void CreateCollection() { if (FLAGS_schema.empty()) { LOG_ERROR("Input schema can't be empty"); exit(1); } char url[2048] = {0}; snprintf(url, sizeof(url), "%s/v1/collection/%s", FLAGS_host.c_str(), FLAGS_collection.c_str()); ailego::ElapsedTime timer; brpc::Controller cntl; cntl.http_request().uri() = url; cntl.http_request().set_method(brpc::HTTP_METHOD_POST); cntl.request_attachment().append(FLAGS_schema); g_client_channel.CallMethod(nullptr, &cntl, nullptr, nullptr, nullptr); if (!cntl.Failed()) { google::protobuf::util::JsonParseOptions options; options.ignore_unknown_fields = true; proxima::be::proto::Status response; std::string resp_body = cntl.response_attachment().to_string(); auto status = google::protobuf::util::JsonStringToMessage( resp_body, &response, options); if (status.ok() && response.code() == 0) { LOG_INFO("Create collection success. collection[%s] rt[%zums]", FLAGS_collection.c_str(), (size_t)timer.milli_seconds()); } else { LOG_ERROR("Create collection error. code[%d] reason[%s]", response.code(), response.reason().c_str()); } } else { LOG_ERROR("Create collection error. error_msg[%s]", cntl.ErrorText().c_str()); } } static void DropCollection() { char url[2048] = {0}; snprintf(url, sizeof(url), "%s/v1/collection/%s", FLAGS_host.c_str(), FLAGS_collection.c_str()); ailego::ElapsedTime timer; brpc::Controller cntl; cntl.http_request().uri() = url; cntl.http_request().set_method(brpc::HTTP_METHOD_DELETE); g_client_channel.CallMethod(nullptr, &cntl, nullptr, nullptr, nullptr); if (!cntl.Failed()) { google::protobuf::util::JsonParseOptions options; options.ignore_unknown_fields = true; proxima::be::proto::Status response; std::string resp_body = cntl.response_attachment().to_string(); auto status = google::protobuf::util::JsonStringToMessage( resp_body, &response, options); if (status.ok() && response.code() == 0) { LOG_INFO("Drop collection success. collection[%s] rt[%zums]", FLAGS_collection.c_str(), (size_t)timer.milli_seconds()); } else { LOG_ERROR("Drop collection error. code[%d] reason[%s]", response.code(), response.reason().c_str()); } } else { LOG_ERROR("Drop collection error. error_msg[%s]", cntl.ErrorText().c_str()); } } int main(int argc, char **argv) { // Parse arguments for (int i = 1; i < argc; ++i) { const char *arg = argv[i]; if (!strcmp(arg, "-help") || !strcmp(arg, "--help") || !strcmp(arg, "-h")) { PrintUsage(); exit(0); } else if (!strcmp(arg, "-version") || !strcmp(arg, "--version") || !strcmp(arg, "-v")) { std::cout << proxima::be::Version::Details() << std::endl; exit(0); } } gflags::ParseCommandLineNonHelpFlags(&argc, &argv, false); // Init client channel if (!InitClientChannel()) { LOG_ERROR("Init client channel failed. host[%s]", FLAGS_host.c_str()); exit(1); } // Register commands std::map> collection_ops = { {"create", CreateCollection}, {"drop", DropCollection}}; if (collection_ops.find(FLAGS_command) != collection_ops.end()) { collection_ops[FLAGS_command](); } else { LOG_ERROR("Unsupported command type: %s", FLAGS_command.c_str()); exit(1); } return 0; } ================================================ FILE: tools/bench_client.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Client tool that can send benchmark requests * to remote proxima be server */ #include #include #include #include #include #include #include #include #include #include "common/logger.h" #include "common/protobuf_helper.h" #include "common/version.h" #include "proxima_search_client.h" #include "vecs_reader.h" using namespace proxima::be; DEFINE_string(command, "", "Command type: search/insert/delete/update"); DEFINE_string(host, "", "The host of proxima search engine"); DEFINE_string(collection, "", "Collection name"); DEFINE_string(column, "", "Column name"); DEFINE_string(file, "", "Input file path"); DEFINE_string(protocol, "grpc", "Protocol http or grpc"); DEFINE_string(data_type, "float", "Input data type"); DEFINE_uint32(concurrency, 10, "Concurrency connection to server(default 10)"); DEFINE_uint32(topk, 10, "Query topk results(default 10)"); DEFINE_bool(perf, false, "Output perf result"); DEFINE_uint32(rows, 0, "Limit loaded records count"); static bool ValidateNotEmpty(const char *flagname, const std::string &value) { return !value.empty(); } DEFINE_validator(command, ValidateNotEmpty); DEFINE_validator(host, ValidateNotEmpty); DEFINE_validator(collection, ValidateNotEmpty); DEFINE_validator(file, ValidateNotEmpty); static inline void PrintUsage() { std::cout << "Usage:" << std::endl; std::cout << " bench_client " << std::endl << std::endl; std::cout << "Args: " << std::endl; std::cout << " --command Command type: search|insert|delete|update|recall" << std::endl; std::cout << " --host The host of proxima be" << std::endl; std::cout << " --collection Specify collection name" << std::endl; std::cout << " --column Specify column name" << std::endl; std::cout << " --file Read input data from file" << std::endl; std::cout << " --protocol Protocol http or grpc" << std::endl; std::cout << " --data_type Support float/binary now (default float)" << std::endl; std::cout << " --concurrency Send concurrency (default 10)" << std::endl; std::cout << " --topk Topk results (default 10)" << std::endl; std::cout << " --perf Output perf result (default false)" << std::endl; std::cout << " --rows Limit loaded rows count" << std::endl; std::cout << " --help, -h Display help info" << std::endl; std::cout << " --version, -v Display version info" << std::endl; } // Global storage struct Record { uint64_t key; std::string vector; std::string attributes; uint32_t dimension; }; // Global varibles for recall statistics static std::atomic g_top1_total_count(0U); static std::atomic g_top1_hit_count(0U); static std::atomic g_top10_total_count(0U); static std::atomic g_top10_hit_count(0U); static std::atomic g_top50_total_count(0U); static std::atomic g_top50_hit_count(0U); static std::atomic g_top100_total_count(0U); static std::atomic g_top100_hit_count(0U); static std::atomic g_topk_total_count(0U); static std::atomic g_topk_hit_count(0U); // Global varibles for qps statistics static std::atomic g_running(false); static uint64_t g_min_insert_qps(-1U); static uint64_t g_max_insert_qps(0U); static uint64_t g_min_search_qps(-1U); static uint64_t g_max_search_qps(0U); static uint64_t g_min_update_qps(-1U); static uint64_t g_max_update_qps(0U); static uint64_t g_min_delete_qps(-1U); static uint64_t g_max_delete_qps(0U); static std::vector g_record_list; static ProximaSearchClientPtr g_client; static bvar::LatencyRecorder g_insert_latency_recorder; static bvar::LatencyRecorder g_search_latency_recorder; static bvar::LatencyRecorder g_update_latency_recorder; static bvar::LatencyRecorder g_delete_latency_recorder; static bool LoadFromTextFile() { std::ifstream file_stream(FLAGS_file); if (!file_stream.is_open()) { LOG_ERROR("Can't open input file %s", FLAGS_file.c_str()); return false; } std::string line; while (std::getline(file_stream, line)) { line.erase(line.find_last_not_of('\n') + 1); if (line.empty()) { continue; } std::vector res; ailego::StringHelper::Split(line, ';', &res); if (res.size() < 1) { LOG_ERROR("Bad input line"); continue; } Record record; // Parse key uint64_t key = std::stoull(res[0]); record.key = key; // Parse feature if (res.size() >= 2) { if (FLAGS_data_type == "binary") { std::vector vec; ailego::StringHelper::Split(res[1], ' ', &vec); if (vec.size() == 0 || vec.size() % 32 != 0) { LOG_ERROR("Bad feature field"); continue; } std::vector tmp; for (size_t i = 0; i < vec.size(); i += 8) { uint8_t v = 0; v |= (vec[i] & 0x01) << 7; v |= (vec[i + 1] & 0x01) << 6; v |= (vec[i + 2] & 0x01) << 5; v |= (vec[i + 3] & 0x01) << 4; v |= (vec[i + 4] & 0x01) << 3; v |= (vec[i + 5] & 0x01) << 2; v |= (vec[i + 6] & 0x01) << 1; v |= (vec[i + 7] & 0x01) << 0; tmp.push_back(v); } record.vector = std::string((const char *)tmp.data(), tmp.size() * sizeof(uint8_t)); record.dimension = vec.size(); } else { std::vector feature; ailego::StringHelper::Split(res[1], ' ', &feature); if (feature.size() == 0) { LOG_ERROR("Bad feature field"); continue; } record.vector = std::string((const char *)feature.data(), feature.size() * sizeof(float)); record.dimension = feature.size(); } } // Parse attributes if (res.size() >= 3) { record.attributes = res[2]; } g_record_list.emplace_back(record); // Limit rows count if (FLAGS_rows > 0 && g_record_list.size() >= FLAGS_rows) { break; } } file_stream.close(); return true; } static bool LoadFromVecsFile() { tools::VecsReader reader; if (!reader.load(FLAGS_file)) { LOG_ERROR("Load vecs file failed."); return false; } for (uint32_t i = 0; i < reader.num_vecs(); i++) { Record new_record; uint64_t key = reader.get_key(i); const char *feature = (const char *)reader.get_vector(i); new_record.key = key; new_record.vector.append(feature, reader.index_meta().element_size()); new_record.dimension = reader.index_meta().dimension(); g_record_list.emplace_back(new_record); // Limit rows count if (FLAGS_rows > 0 && g_record_list.size() >= FLAGS_rows) { break; } } return true; } static bool LoadRecords() { bool ret; if (FLAGS_file.find(".vecs") != std::string::npos) { ret = LoadFromVecsFile(); } else { ret = LoadFromTextFile(); } return ret; } static bool InitClient() { if (FLAGS_protocol == "http") { g_client = ProximaSearchClient::Create("HttpClient"); } else if (FLAGS_protocol == "grpc") { g_client = ProximaSearchClient::Create("GrpcClient"); } else { LOG_ERROR("Unknown protocol, only support http or grpc now. protocol[%s]", FLAGS_protocol.c_str()); return false; } proxima::be::ChannelOptions options(FLAGS_host); options.connection_count = FLAGS_concurrency; options.timeout_ms = 60000; Status status = g_client->connect(options); if (status.code != 0) { LOG_ERROR("Connect failed. code[%d] reason[%s]", status.code, status.reason.c_str()); return false; } return true; } static void DoSearchProxima(Record *record) { ailego::ElapsedTime timer; QueryRequestPtr request = QueryRequest::Create(); request->set_collection_name(FLAGS_collection); auto knn_param = request->add_knn_query_param(); knn_param->set_column_name(FLAGS_column); knn_param->set_topk(FLAGS_topk); knn_param->set_features(record->vector.c_str(), record->vector.size(), 1); if (FLAGS_data_type == "binary") { knn_param->set_data_type(DataType::VECTOR_BINARY32); } else { knn_param->set_data_type(DataType::VECTOR_FP32); } knn_param->set_dimension(record->dimension); QueryResponsePtr response = QueryResponse::Create(); Status status = g_client->query(*request, response.get()); if (status.code != 0) { LOG_ERROR("Search records failed. query_id[%zu] code[%d] reason[%s] ", (size_t)record->key, status.code, status.reason.c_str()); return; } auto result = response->result(0); std::string result_str; for (size_t i = 0; i < result->document_count(); i++) { auto doc = result->document(i); std::string attr; doc->get_forward_value("forward", &attr); if (attr.empty()) { ailego::StringHelper::Append(&result_str, " ", doc->primary_key(), ":", doc->score()); } else { ailego::StringHelper::Append(&result_str, " ", doc->primary_key(), ":", doc->score(), ":", attr); } } uint64_t latency_us = timer.micro_seconds(); g_search_latency_recorder << latency_us; if (!FLAGS_perf) { LOG_INFO( "Search records success. query_id[%zu] res_num[%zu] results[%s] " "rt[%zuus]", (size_t)record->key, result->document_count(), result_str.c_str(), (size_t)latency_us); } } static void DoInsertProxima(Record *record) { ailego::ElapsedTime timer; WriteRequestPtr request = WriteRequest::Create(); request->set_collection_name(FLAGS_collection); if (FLAGS_data_type == "binary") { request->add_index_column(FLAGS_column, DataType::VECTOR_BINARY32, record->dimension); } else { request->add_index_column(FLAGS_column, DataType::VECTOR_FP32, record->dimension); } // Support forward column temporarily if (!record->attributes.empty()) { request->add_forward_column("forward"); } auto row = request->add_row(); row->set_operation_type(OperationType::INSERT); row->set_primary_key(record->key); row->add_index_value(record->vector.c_str(), record->vector.size()); // Support forward column temporarily if (!record->attributes.empty()) { row->add_forward_value(record->attributes); } Status status = g_client->write(*request); if (status.code != 0) { LOG_ERROR("Insert record failed. key[%zu] code[%d] reason[%s]", (size_t)record->key, status.code, status.reason.c_str()); return; } uint64_t latency_us = timer.micro_seconds(); g_insert_latency_recorder << latency_us; if (!FLAGS_perf) { LOG_INFO("Insert record success. key[%zu] rt[%zuus]", (size_t)record->key, (size_t)latency_us); } } static void DoDeleteProxima(Record *record) { ailego::ElapsedTime timer; WriteRequestPtr request = WriteRequest::Create(); request->set_collection_name(FLAGS_collection); auto row = request->add_row(); row->set_operation_type(OperationType::DELETE); row->set_primary_key(record->key); row->add_index_value(record->vector.c_str(), record->vector.size()); Status status = g_client->write(*request); if (status.code != 0) { LOG_ERROR("Delete record failed. key[%zu] code[%d] reason[%s]", (size_t)record->key, status.code, status.reason.c_str()); return; } uint64_t latency_us = timer.micro_seconds(); g_delete_latency_recorder << latency_us; if (!FLAGS_perf) { LOG_INFO("Delete record success. key[%zu] rt[%zuus]", (size_t)record->key, (size_t)latency_us); } } static void DoUpdateProxima(Record *record) { ailego::ElapsedTime timer; WriteRequestPtr request = WriteRequest::Create(); request->set_collection_name(FLAGS_collection); if (FLAGS_data_type == "binary") { request->add_index_column(FLAGS_column, DataType::VECTOR_BINARY32, record->dimension); } else { request->add_index_column(FLAGS_column, DataType::VECTOR_FP32, record->dimension); } auto row = request->add_row(); row->set_operation_type(OperationType::UPDATE); row->set_primary_key(record->key); row->add_index_value(record->vector.c_str(), record->vector.size()); Status status = g_client->write(*request); if (status.code != 0) { LOG_ERROR("Update record failed. key[%zu] code[%d] reason[%s]", (size_t)record->key, status.code, status.reason.c_str()); return; } uint64_t latency_us = timer.micro_seconds(); g_update_latency_recorder << latency_us; if (!FLAGS_perf) { LOG_INFO("Update record success. key[%zu] rt[%zuus]", (size_t)record->key, (size_t)latency_us); } } #define ADD_RECALL_COUNT(topk, total_count, hit_count) \ for (size_t i = 0; i < topk && i < result1->document_count(); i++) { \ total_count++; \ auto doc1 = result1->document(i); \ for (size_t j = 0; j < topk && j < result2->document_count(); j++) { \ auto doc2 = result2->document(j); \ if (doc1->primary_key() == doc2->primary_key() || \ doc1->score() == doc2->score()) { \ hit_count++; \ break; \ } \ } \ } static void DoRecallProxima(Record *record) { QueryRequestPtr request = QueryRequest::Create(); request->set_collection_name(FLAGS_collection); auto knn_param = request->add_knn_query_param(); knn_param->set_column_name(FLAGS_column); knn_param->set_topk(FLAGS_topk); knn_param->set_features(record->vector.c_str(), record->vector.size(), 1); if (FLAGS_data_type == "binary") { knn_param->set_data_type(DataType::VECTOR_BINARY32); } else { knn_param->set_data_type(DataType::VECTOR_FP32); } knn_param->set_dimension(record->dimension); // 1. get knn results auto response1 = QueryResponse::Create(); Status status = g_client->query(*request, response1.get()); if (status.code != 0) { LOG_ERROR("Knn search records failed. query_id[%zu] code[%d] reason[%s] ", (size_t)record->key, status.code, status.reason.c_str()); return; } auto result1 = response1->result(0); // 2. get linear knn results knn_param->set_linear(true); auto response2 = QueryResponse::Create(); status = g_client->query(*request, response2.get()); if (status.code != 0) { LOG_ERROR( "Linear search records failed. query_id[%zu] code[%d] reason[%s] ", (size_t)record->key, status.code, status.reason.c_str()); return; } auto result2 = response2->result(0); if (result1->document_count() != result2->document_count()) { LOG_ERROR( "Knn search results count mismatch linear search results. result1[%lu] " "result2[%lu]", result1->document_count(), result2->document_count()); return; } if (FLAGS_topk > 1) { ADD_RECALL_COUNT(1, g_top1_total_count, g_top1_hit_count); } if (FLAGS_topk > 10) { ADD_RECALL_COUNT(10, g_top10_total_count, g_top10_hit_count); } if (FLAGS_topk > 50) { ADD_RECALL_COUNT(50, g_top50_total_count, g_top50_hit_count); } if (FLAGS_topk > 100) { ADD_RECALL_COUNT(100, g_top100_total_count, g_top100_hit_count); } ADD_RECALL_COUNT(FLAGS_topk, g_topk_total_count, g_topk_hit_count); } #define OUTPUT_PERF_RESULT(recorder, max_qps, min_qps) \ std::cout << "====================PERFORMANCE======================" \ << std::endl; \ std::cout << "Process count : " << recorder.count() << std::endl; \ std::cout << "Average qps : " << recorder.qps() << "/s" << std::endl; \ std::cout << "Maximum qps : " << max_qps << "/s" << std::endl; \ std::cout << "Minimum qps : " << min_qps << "/s" << std::endl; \ std::cout << "Average latency: " << recorder.latency() << "us" << std::endl; \ std::cout << "Maximum latency: " << recorder.max_latency() << "us" \ << std::endl; \ std::cout << "Percentile @1 : " << recorder.latency_percentile(0.01) \ << "us" << std::endl; \ std::cout << "Percentile @10 : " << recorder.latency_percentile(0.10) \ << "us" << std::endl; \ std::cout << "Percentile @25 : " << recorder.latency_percentile(0.25) \ << "us" << std::endl; \ std::cout << "Percentile @50 : " << recorder.latency_percentile(0.50) \ << "us" << std::endl; \ std::cout << "Percentile @75 : " << recorder.latency_percentile(0.75) \ << "us" << std::endl; \ std::cout << "Percentile @90 : " << recorder.latency_percentile(0.90) \ << "us" << std::endl; \ std::cout << "Percentile @95 : " << recorder.latency_percentile(0.95) \ << "us" << std::endl; \ std::cout << "Percentile @99 : " << recorder.latency_percentile(0.99) \ << "us" << std::endl; static void SearchRecords() { if (FLAGS_column.empty()) { LOG_ERROR("Input argument column can't be emtpy"); return; } ailego::ThreadPool thread_pool(FLAGS_concurrency, false); for (size_t i = 0; i < g_record_list.size(); i++) { thread_pool.execute(DoSearchProxima, &g_record_list[i]); while (thread_pool.pending_count() > 1000) { usleep(1000); thread_pool.wake_all(); } } thread_pool.wait_finish(); if (FLAGS_perf) { OUTPUT_PERF_RESULT(g_search_latency_recorder, g_max_search_qps, g_min_search_qps); } } static void InsertRecords() { if (FLAGS_column.empty()) { LOG_ERROR("Input argument column can't be emtpy"); return; } ailego::ThreadPool thread_pool(FLAGS_concurrency, false); for (size_t i = 0; i < g_record_list.size(); i++) { thread_pool.execute(DoInsertProxima, &g_record_list[i]); while (thread_pool.pending_count() > 1000) { usleep(1000); thread_pool.wake_all(); } } thread_pool.wait_finish(); if (FLAGS_perf) { OUTPUT_PERF_RESULT(g_insert_latency_recorder, g_max_insert_qps, g_min_insert_qps); } } static void DeleteRecords() { ailego::ThreadPool thread_pool(FLAGS_concurrency, false); for (size_t i = 0; i < g_record_list.size(); i++) { thread_pool.execute(DoDeleteProxima, &g_record_list[i]); while (thread_pool.pending_count() > 1000) { usleep(1000); thread_pool.wake_all(); } } thread_pool.wait_finish(); if (FLAGS_perf) { OUTPUT_PERF_RESULT(g_delete_latency_recorder, g_max_delete_qps, g_min_delete_qps); } } static void UpdateRecords() { if (FLAGS_column.empty()) { LOG_ERROR("Input argument column can't be emtpy"); return; } ailego::ThreadPool thread_pool(FLAGS_concurrency, false); for (size_t i = 0; i < g_record_list.size(); i++) { thread_pool.execute(DoUpdateProxima, &g_record_list[i]); while (thread_pool.pending_count() > 1000) { usleep(1000); thread_pool.wake_all(); } } thread_pool.wait_finish(); if (FLAGS_perf) { OUTPUT_PERF_RESULT(g_update_latency_recorder, g_max_update_qps, g_min_update_qps); } } static void RecallRecords() { if (FLAGS_column.empty()) { LOG_ERROR("Input argument column can't be emtpy"); return; } ailego::ThreadPool thread_pool(FLAGS_concurrency, false); for (size_t i = 0; i < g_record_list.size(); i++) { thread_pool.execute(DoRecallProxima, &g_record_list[i]); while (thread_pool.pending_count() > 1000) { usleep(1000); thread_pool.wake_all(); } } thread_pool.wait_finish(); // Output recall ratio if (FLAGS_topk > 1) { double top1_hit_ratio = g_top1_total_count > 0 ? (double)g_top1_hit_count / g_top1_total_count : 0.0f; std::cout << "Recall @1: " << top1_hit_ratio << std::endl; } if (FLAGS_topk > 10) { double top10_hit_ratio = g_top10_total_count > 0 ? (double)g_top10_hit_count / g_top10_total_count : 0.0f; std::cout << "Recall @10: " << top10_hit_ratio << std::endl; } if (FLAGS_topk > 50) { double top50_hit_ratio = g_top50_total_count > 0 ? (double)g_top50_hit_count / g_top50_total_count : 0.0f; std::cout << "Recall @50: " << top50_hit_ratio << std::endl; } if (FLAGS_topk > 100) { double top100_hit_ratio = g_top100_total_count > 0 ? (double)g_top100_hit_count / g_top100_total_count : 0.0f; std::cout << "Recall @100: " << top100_hit_ratio << std::endl; } double topk_hit_ratio = g_topk_total_count > 0 ? (double)g_topk_hit_count / g_topk_total_count : 0.0f; std::cout << "Recall @" << FLAGS_topk << ": " << topk_hit_ratio << std::endl; } static void Monitor() { std::this_thread::sleep_for(std::chrono::seconds(5)); while (g_running) { std::this_thread::sleep_for(std::chrono::seconds(1)); if (FLAGS_command == "search") { uint64_t qps = (uint64_t)g_search_latency_recorder.qps(1); if (qps > g_max_search_qps) { g_max_search_qps = qps; } if (qps < g_min_search_qps) { g_min_search_qps = qps; } } else if (FLAGS_command == "insert") { uint64_t qps = (uint64_t)g_insert_latency_recorder.qps(1); if (qps > g_max_insert_qps) { g_max_insert_qps = qps; } if (qps < g_min_insert_qps) { g_min_insert_qps = qps; } } else if (FLAGS_command == "update") { uint64_t qps = (uint64_t)g_update_latency_recorder.qps(1); if (qps > g_max_update_qps) { g_max_update_qps = qps; } if (qps < g_min_update_qps) { g_min_update_qps = qps; } } else if (FLAGS_command == "delete") { uint64_t qps = (uint64_t)g_delete_latency_recorder.qps(1); if (qps > g_max_delete_qps) { g_max_delete_qps = qps; } if (qps < g_min_delete_qps) { g_min_delete_qps = qps; } } } } int main(int argc, char **argv) { // Parse arguments for (int i = 1; i < argc; ++i) { const char *arg = argv[i]; if (!strcmp(arg, "-help") || !strcmp(arg, "--help") || !strcmp(arg, "-h")) { PrintUsage(); exit(0); } else if (!strcmp(arg, "-version") || !strcmp(arg, "--version") || !strcmp(arg, "-v")) { std::cout << proxima::be::Version::Details() << std::endl; exit(0); } } gflags::ParseCommandLineNonHelpFlags(&argc, &argv, false); // Init client channel if (!InitClient()) { LOG_ERROR("Init client failed. host[%s]", FLAGS_host.c_str()); exit(1); } // Load data from input file if (!LoadRecords()) { LOG_ERROR("Load data from file failed. file[%s]", FLAGS_file.c_str()); exit(1); } std::cout << "Load data complete. num[" << g_record_list.size() << "]" << std::endl; g_running = true; // Add monitor thread std::thread *monitor_thread = nullptr; if (FLAGS_perf) { monitor_thread = new std::thread(Monitor); } // Register commands std::map> record_ops = { {"search", SearchRecords}, {"insert", InsertRecords}, {"update", UpdateRecords}, {"delete", DeleteRecords}, {"recall", RecallRecords}}; if (record_ops.find(FLAGS_command) != record_ops.end()) { record_ops[FLAGS_command](); } else { LOG_ERROR("Unsupported command type: %s", FLAGS_command.c_str()); exit(1); } g_running = false; if (monitor_thread) { monitor_thread->join(); delete monitor_thread; } return 0; } #undef OUTPUT_PERF_RESULT ================================================ FILE: tools/index_builder.cc ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Jun 2021 * \brief Index builder tool can create collection index * from text or vecs file */ #include #include #include #include "common/logger.h" #include "common/protobuf_helper.h" #include "common/types.h" #include "common/version.h" #include "index/collection.h" #include "index/typedef.h" #include "meta/meta.h" #include "proto/proxima_be.pb.h" #include "vecs_reader.h" using namespace proxima::be; DEFINE_string(schema, "", "Specify the schema of collection"); DEFINE_string(file, "", "Specify input data file"); DEFINE_string(output, "./", "Sepecify output index directory"); DEFINE_uint32(concurrency, 10, "Threads count for building index"); static bool ValidateNotEmpty(const char *flagname, const std::string &value) { return !value.empty(); } DEFINE_validator(schema, ValidateNotEmpty); DEFINE_validator(file, ValidateNotEmpty); struct Record { uint64_t key; std::string vector; std::string attributes; uint32_t dimension; }; meta::CollectionMetaPtr g_collection_meta; static inline void PrintUsage() { std::cout << "Usage:" << std::endl; std::cout << " index_builder " << std::endl << std::endl; std::cout << "Args: " << std::endl; std::cout << " --schema Specify the schema of collection" << std::endl; std::cout << " --file Specify input data file" << std::endl; std::cout << " --output Sepecify output index directory(default ./)" << std::endl; std::cout << " --concurrency Sepecify threads count for building " "index(default 10)" << std::endl; std::cout << " --help, -h Dipslay help info" << std::endl; std::cout << " --version, -v Dipslay version info" << std::endl; } static bool ParseSchema() { // Parse protobuf object from input json ProtobufHelper::JsonParseOptions options; options.ignore_unknown_fields = true; proto::CollectionConfig collection_config; if (!ProtobufHelper::JsonToMessage(FLAGS_schema, &collection_config)) { LOG_ERROR("JsonToMessage failed. schema[%s]", FLAGS_schema.c_str()); return false; } std::string converted_json; ProtobufHelper::MessageToJson(collection_config, &converted_json); // Check input schema format if (collection_config.collection_name().empty()) { LOG_ERROR("Collection name can't be empty. schema[%s]", converted_json.c_str()); return false; } if (collection_config.index_column_params_size() != 1) { LOG_ERROR("Schema must contain an index column. schema[%s]", converted_json.c_str()); return false; } auto *index_column_schema = collection_config.mutable_index_column_params(0); if (index_column_schema->column_name().empty()) { LOG_ERROR("Schema index column name can't be empty. schema[%s]", converted_json.c_str()); return false; } if (index_column_schema->index_type() == proto::IndexType::IT_UNDEFINED) { index_column_schema->set_index_type( proto::IndexType::IT_PROXIMA_GRAPH_INDEX); } if (index_column_schema->data_type() == proto::DataType::DT_UNDEFINED) { index_column_schema->set_data_type(proto::DataType::DT_VECTOR_FP32); } if (index_column_schema->dimension() == 0U) { LOG_ERROR("Schema index column dimension must be set. schema[%s]", converted_json.c_str()); return false; } if (collection_config.forward_column_names_size() > 1) { LOG_ERROR("Schema can contain a forward column at most. schema[%s]", converted_json.c_str()); return false; } // Generate collection meta from schema g_collection_meta = std::make_shared(); g_collection_meta->set_name(collection_config.collection_name()); // Set forward column if (collection_config.forward_column_names_size() > 0) { g_collection_meta->mutable_forward_columns()->emplace_back( collection_config.forward_column_names(0)); } // Set index column auto &column_param = collection_config.index_column_params(0); auto new_column_meta = std::make_shared(); new_column_meta->set_name(column_param.column_name()); new_column_meta->set_index_type((IndexTypes)column_param.index_type()); new_column_meta->set_data_type((DataTypes)column_param.data_type()); new_column_meta->set_dimension(column_param.dimension()); for (int j = 0; j < column_param.extra_params_size(); j++) { auto &kvpair = column_param.extra_params(j); new_column_meta->mutable_parameters()->set(kvpair.key(), kvpair.value()); } g_collection_meta->append(new_column_meta); std::cout << "Parse collection schema success. schema[" << FLAGS_schema << "]" << std::endl; return true; } static void DoInsertCollection(index::Collection *collection, const Record &record) { index::CollectionDataset records(0); auto *row = records.add_row_data(); row->operation_type = OperationTypes::INSERT; row->primary_key = record.key; // Serialize forward data to pb format if (g_collection_meta->forward_columns().size() > 0) { proto::GenericValueList value_list; auto *value = value_list.add_values(); value->set_string_value(record.attributes); value_list.SerializeToString(&row->forward_data); } // Append index column data auto &index_column_schema = g_collection_meta->index_columns().at(0); index::ColumnData index_column; index_column.column_name = index_column_schema->name(); index_column.data_type = (DataTypes)index_column_schema->data_type(); index_column.dimension = record.dimension; index_column.data = record.vector; row->column_datas.emplace_back(index_column); collection->write_records(records); } static bool LoadFromVecsFile(aitheta2::IndexThreads::TaskGroup *group, index::Collection *collection) { tools::VecsReader reader; if (!reader.load(FLAGS_file)) { LOG_ERROR("Load vecs file failed."); return false; } for (uint32_t i = 0; i < reader.num_vecs(); i++) { Record record; uint64_t key = reader.get_key(i); const char *feature = (const char *)reader.get_vector(i); record.key = key; record.vector.append(feature, reader.index_meta().element_size()); record.dimension = reader.index_meta().dimension(); group->submit(ailego::Closure::New(DoInsertCollection, collection, record)); } return true; } static bool LoadFromTextFile(aitheta2::IndexThreads::TaskGroup *group, index::Collection *collection) { std::ifstream file_stream(FLAGS_file); if (!file_stream.is_open()) { LOG_ERROR("Can't open input file[%s]", FLAGS_file.c_str()); return false; } std::string line; while (std::getline(file_stream, line)) { line.erase(line.find_last_not_of('\n') + 1); if (line.empty()) { continue; } std::vector res; ailego::StringHelper::Split(line, ';', &res); if (res.size() < 2) { LOG_ERROR("Bad input line, format[key;vector(1 2 3 4...);attributes]"); continue; } Record record; // Parse key uint64_t key = std::stoull(res[0]); record.key = key; // Parse feature if (res.size() >= 2) { auto data_type = g_collection_meta->index_columns().at(0)->data_type(); if (data_type == DataTypes::VECTOR_BINARY32) { std::vector vec; ailego::StringHelper::Split(res[1], ' ', &vec); if (vec.size() == 0 || vec.size() % 32 != 0) { LOG_ERROR("Bad feature field"); continue; } std::vector tmp; for (size_t i = 0; i < vec.size(); i += 8) { uint8_t v = 0; v |= (vec[i] & 0x01) << 7; v |= (vec[i + 1] & 0x01) << 6; v |= (vec[i + 2] & 0x01) << 5; v |= (vec[i + 3] & 0x01) << 4; v |= (vec[i + 4] & 0x01) << 3; v |= (vec[i + 5] & 0x01) << 2; v |= (vec[i + 6] & 0x01) << 1; v |= (vec[i + 7] & 0x01) << 0; tmp.push_back(v); } record.vector = std::string((const char *)tmp.data(), tmp.size() * sizeof(uint8_t)); record.dimension = vec.size(); } else { if (data_type == DataTypes::VECTOR_FP32) { std::vector feature; ailego::StringHelper::Split(res[1], ' ', &feature); if (feature.size() == 0) { LOG_ERROR("Bad feature field"); continue; } record.vector = std::string((const char *)feature.data(), feature.size() * sizeof(float)); record.dimension = feature.size(); } else if (data_type == DataTypes::VECTOR_INT8) { std::vector feature; ailego::StringHelper::Split(res[1], ' ', &feature); if (feature.size() == 0) { LOG_ERROR("Bad feature field"); continue; } record.vector = std::string((const char *)feature.data(), feature.size() * sizeof(int8_t)); record.dimension = feature.size(); } } } // Parse attributes if (res.size() >= 3) { record.attributes = res[2]; } group->submit(ailego::Closure::New(DoInsertCollection, collection, record)); } file_stream.close(); return true; } static bool BuildIndex() { index::ThreadPool thread_pool(FLAGS_concurrency, false); // Create and open new collection index::CollectionPtr new_collection; index::ReadOptions read_options; read_options.use_mmap = true; read_options.create_new = true; int ret = index::Collection::CreateAndOpen( g_collection_meta->name(), FLAGS_output, g_collection_meta, FLAGS_concurrency, &thread_pool, read_options, &new_collection); if (ret != 0) { return false; } std::cout << "Create collection complete. collection[" << g_collection_meta->name() << "]" << std::endl; // Writing into collection in parallel auto group = thread_pool.make_group(); if (FLAGS_file.find(".vecs") != std::string::npos) { if (!LoadFromVecsFile(group.get(), new_collection.get())) { return false; } } else { if (!LoadFromTextFile(group.get(), new_collection.get())) { return false; } } group->wait_finish(); std::cout << "Build index complete. collection[" << g_collection_meta->name() << "]" << std::endl; // Dump to disk ret = new_collection->dump(); if (ret != 0) { return false; } ret = new_collection->close(); if (ret != 0) { return false; } std::cout << "Dump index complete. collection[" << g_collection_meta->name() << "]" << std::endl; return true; } int main(int argc, char **argv) { // Parse arguments for (int i = 1; i < argc; ++i) { const char *arg = argv[i]; if (!strcmp(arg, "-help") || !strcmp(arg, "--help") || !strcmp(arg, "-h")) { PrintUsage(); exit(0); } else if (!strcmp(arg, "-version") || !strcmp(arg, "--version") || !strcmp(arg, "-v")) { std::cout << proxima::be::Version::Details() << std::endl; exit(0); } } gflags::ParseCommandLineNonHelpFlags(&argc, &argv, false); // Adjust log level to prevent print too many logs aitheta2::IndexLoggerBroker::SetLevel(aitheta2::IndexLogger::LEVEL_WARN); // Parse schema if (!ParseSchema()) { LOG_ERROR("Parse schema failed."); exit(1); } // Start to build index if (!BuildIndex()) { LOG_ERROR("Build index error."); exit(1); } } ================================================ FILE: tools/vecs_reader.h ================================================ /** * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * \author Haichao.chc * \date Oct 2020 * \brief Vecs file reader */ #pragma once #include #include #include #include namespace proxima { namespace be { namespace tools { #pragma pack(4) struct VecsHeader { uint64_t num_vecs; uint32_t meta_size; uint8_t meta_buf[0]; }; #pragma pack() class VecsReader { public: VecsReader() : mmap_file_(), index_meta_(), num_vecs_(0), vector_base_(nullptr), key_base_(nullptr) {} void set_measure(const std::string &name, const aitheta2::IndexParams ¶ms) { index_meta_.set_measure(name, 0, params); } bool load(const std::string &fname) { return load(fname.c_str()); } bool load(const char *fname) { if (!fname) { std::cerr << "Load fname is nullptr" << std::endl; return false; } if (!mmap_file_.open(fname, true)) { std::cerr << "Open file error: " << fname << std::endl; return false; } if (mmap_file_.size() < sizeof(VecsHeader)) { std::cerr << "File size is too small: " << mmap_file_.size() << std::endl; return false; } const VecsHeader *header = reinterpret_cast(mmap_file_.region()); // check num_vecs_ = header->num_vecs; if ((mmap_file_.size() - sizeof(*header) - header->meta_size) % num_vecs_ != 0) { std::cerr << "input file foramt check error." << std::endl; return false; } // deserialize bool bret = index_meta_.deserialize(&header->meta_buf, header->meta_size); if (!bret) { std::cerr << "deserialize index meta error." << std::endl; return false; } vector_base_ = reinterpret_cast(header + 1) + header->meta_size; key_base_ = reinterpret_cast( vector_base_ + num_vecs_ * index_meta_.element_size()); return true; } template bool write_vecs_output(const aitheta2::IndexMeta &meta, const std::vector &keys, const std::vector> &features) { if (keys.empty()) { std::cerr << "keys is empty." << std::endl; return false; } if (keys.size() != features.size()) { std::cerr << "keys's size(" << keys.size() << ") is not equal to features's size(" << features.size() << ")." << std::endl; return false; } FILE *wfp = fopen("my.vecs", "wb"); if (!wfp) { std::cerr << "Open file my.vecs error. " << std::endl; return false; } // write header VecsHeader header; header.num_vecs = keys.size(); std::string meta_buf; meta.serialize(&meta_buf); header.meta_size = meta_buf.size(); size_t wret = fwrite(&header, sizeof(header), 1, wfp); if (wret != 1) { std::cerr << "Write header error" << std::endl; fclose(wfp); return false; } wret = fwrite(meta_buf.c_str(), meta_buf.size(), 1, wfp); if (wret != 1) { std::cerr << "Write header meta_buf error" << std::endl; fclose(wfp); return false; } size_t nx = keys.size(); for (size_t i = 0; i < nx; ++i) { auto &feature = features[i]; wret = fwrite(&feature[0], sizeof(T), feature.size(), wfp); if (wret != feature.size()) { std::cerr << "Write feature error. " << std::endl; fclose(wfp); return false; } } for (size_t i = 0; i < nx; ++i) { uint64_t key = keys[i]; wret = fwrite(&key, sizeof(key), 1, wfp); if (wret != 1) { std::cerr << "Write key error. key:" << key << std::endl; fclose(wfp); return false; } } fclose(wfp); return true; } size_t num_vecs() const { return num_vecs_; } const void *vector_base() const { return vector_base_; } const uint64_t *key_base() const { return key_base_; } const aitheta2::IndexMeta &index_meta() const { return index_meta_; } uint64_t get_key(size_t index) const { return key_base_[index]; } const void *get_vector(size_t index) const { return vector_base_ + index * index_meta_.element_size(); } private: ailego::MMapFile mmap_file_; aitheta2::IndexMeta index_meta_; size_t num_vecs_{0U}; const char *vector_base_{nullptr}; const uint64_t *key_base_{nullptr}; }; } // end namespace tools } // end namespace be } // end namespace proxima