Skip to content

Commit 987d142

Browse files
committed
Merge branch 'main' into 1.0.0_dev
* main: Adjust docs for 1.1.0 (#212) Update README.md (#211) Update README.md (#210) Update to 1.1.0 (#209) # Conflicts: # aios/sql/iquan/java/iquan_core/src/main/java/com/taobao/search/iquan/core/catalog/GlobalCatalog.java # aios/sql/python/sql_config_loader.py # aios/sql/resource/Ha3TableInfoR.cpp # aios/suez_navi/search/NaviSearchManager.cpp # docs/havenask_docs/sql/guide/quickstart.md
2 parents 6cf851c + f5c4fec commit 987d142

File tree

7,823 files changed

+229487
-190542
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,823 files changed

+229487
-190542
lines changed

.bazelrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,4 @@ build:havenask --test_tag_filters=-not_for_opensource
101101
build:havenask --define disable_catalog_mongodb=true
102102
test --test_tag_filters=-slow_case,-codegen_case,-one_box --test_env CHECK_CASE_TIMEOUT=false
103103
build:havenask --distdir=/external/__distdir__
104-
build:havenask --define cpu_avx512=false
105104
build --config=havenask

.gitignore

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ bep.json*
77
.DS_Store
88
__pycache__
99
*.pyc
10-
*.rpm
1110
rpm/*.log
12-
*.tgz
13-
*.tar
14-
*.so
15-
hape/conf/generated
16-
11+
*.bak
12+
hape/conf/generated

BUILD

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,13 @@ config_setting(
6161
visibility=['//visibility:public']
6262
)
6363
config_setting(
64-
name='cpu_with_avx512',
65-
define_values={'cpu_avx512': 'true'},
66-
visibility=['//visibility:public']
67-
)
68-
config_setting(
69-
name='cpu_without_avx512',
70-
define_values={'cpu_avx512': 'false'},
64+
name='hack_get_set_env',
65+
define_values={'hack_get_set_env': 'true'},
7166
visibility=['//visibility:public']
7267
)
7368
config_setting(
74-
name='hack_get_set_env',
75-
define_values={'hack_get_set_env': 'true'},
69+
name='glibc_2_17_compatible',
70+
define_values={'glibc_2_17_compatible': 'true'},
7671
visibility=['//visibility:public']
7772
)
7873
bool_flag(name='using_cuda', build_setting_default=False)
@@ -101,7 +96,6 @@ config_setting(
10196
},
10297
visibility=['//visibility:public']
10398
)
104-
10599
config_setting(
106100
name='disable_catalog_mongodb',
107101
values={'define': 'disable_catalog_mongodb=true'},

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Note
22
> old version:
3+
> [1.0.0](https://github.com/alibaba/havenask/tree/1.0.0),
34
> [1.0.0-beta](https://github.com/alibaba/havenask/tree/1.0.0-beta),
45
> [main-stable-0.4](https://github.com/alibaba/havenask/tree/main-stable-0.4)<br>
56
> The new and old main branches have a significant difference, and if the sync code branch produces errors, please make them consistent with the current main branch.
@@ -28,18 +29,18 @@ Havenask delivers the following benefits:
2829

2930

3031
## Documentation
31-
* Havenask Wiki: https://github.com/alibaba/havenask/wiki
32+
* Havenask Wiki: [https://havenask.net](https://havenask.net)
3233

3334
## Get Started
3435

3536
* Havenask Docker images (image platform: amd64)
3637
* <strong>ha3_runtime</strong>: runtime image allows you to quickly start a search service without compiling.
37-
* <strong>ha3_dev </strong>: development image includes all libraries necessary for compiling havenask. [QuickStart](docs/havenask_docs/快速开始.md)
38+
* <strong>ha3_dev </strong>: development image includes all libraries necessary for compiling havenask. [QuickStart](https://havenask.net/#/doc/sql/guide/quickstart)
3839
* Requirements
3940
* Runtime: cpu > 2 cores, memory > 4G, disk > 20G
4041
* Dev: cpu > 2 cores, memory > 10G, disk > 50G
4142
* Install and Start Docker
42-
* Check that you can ssh to the localhost without a passphrase, ref[passphraseless ssh](docs/havenask_docs/Hape单机模式.md)
43+
* Check that you can ssh to the localhost without a passphrase, ref [Local Mode](https://havenask.net/#/doc/sql/petool/localmode)
4344

4445
## Start Havenask Service
4546
* Create the container
@@ -63,7 +64,7 @@ docker pull registry.cn-hangzhou.aliyuncs.com/havenask/ha3_runtime:latest
6364
```
6465
* Create table
6566
```
66-
/ha3_install/hape create table -t in0 -s /ha3_install/hape_conf/example/cases/normal/in0_schema.json -p 1
67+
/ha3_install/hape create table -t in0 -s /ha3_install/example/cases/normal/in0_schema.json -p 1
6768
```
6869

6970
* Insert data
@@ -105,17 +106,17 @@ Havenask 的核心能力与优势,有以下几点:
105106
* <strong>支持向量检索</strong>:可通过与插件配合实现多模态搜索,满足更多场景的搜索服务搭建需求。
106107

107108
## 相关文档
108-
* Havenask Wiki: [https://github.com/alibaba/havenask/wiki](https://github.com/alibaba/havenask/wiki)
109+
* Havenask Wiki: [https://havenask.net](https://havenask.net)
109110

110111
## 开始使用
111112
* 镜像介绍(镜像平台: amd64)
112113
* ha3_runtime:可直接运行的镜像,无需编译代码,包含了问天引擎的可执行文件。
113-
* ha3_dev:用于开发测试的镜像,里面包含了开发测试时需要的各种依赖库和头文件,如何编译问天引擎请参考[快速开始](docs/havenask_docs/快速开始.md)
114+
* ha3_dev:用于开发测试的镜像,里面包含了开发测试时需要的各种依赖库和头文件,如何编译问天引擎请参考[QuickStart](https://havenask.net/#/doc/sql/guide/quickstart)
114115
* 环境要求
115116
* 运行镜像:确保机器内存大于4G,cpu大于2核,磁盘大小大于20G。
116117
* 开发镜像:确保机器内存大于10G,cpu大于2核,磁盘大小大于50G。
117118
* 使用前确保设备已经安装和启动Docker服务。
118-
* 单机模式需要确保本机能免密ssh登录自己,详情参考[免密ssh](docs/havenask_docs/Hape单机模式.md)
119+
* 单机模式需要确保本机能免密ssh登录自己,详情参考[单机模式](https://havenask.net/#/doc/sql/petool/localmode)
119120

120121
## 启动服务
121122

@@ -140,7 +141,7 @@ docker pull registry.cn-hangzhou.aliyuncs.com/havenask/ha3_runtime:latest
140141
```
141142
* 创建表
142143
```
143-
/ha3_install/hape create table -t in0 -s /ha3_install/hape_conf/example/cases/normal/in0_schema.json -p 1
144+
/ha3_install/hape create table -t in0 -s /ha3_install/example/cases/normal/in0_schema.json -p 1
144145
```
145146

146147
* 写入数据

WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
workspace(name='com_taobao_aios')
2-
load('//:workspace.bzl', 'aios_workspace')
2+
load('//bazel:workspace.bzl', 'aios_workspace')
33
aios_workspace()

aios/alog/BUILD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
cc_library(
22
name='alog',
3-
visibility=['//visibility:public'],
43
srcs=glob(['src/cpp/*.cpp', 'src/cpp/*.h']),
54
hdrs=glob(['include/alog/*.h']),
6-
deps=['@zlib_archive//:zlib'],
75
copts=['-Wformat-truncation=0'],
8-
strip_include_prefix='include'
6+
strip_include_prefix='include',
7+
visibility=['//visibility:public'],
8+
deps=['@zlib_archive//:zlib']
99
)

aios/alog/include/alog/Logger.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ class Logger {
101101
*@brief flush all logger's message.
102102
*/
103103
static void flushAll();
104+
/**
105+
*@brief flush cache value after `fork`
106+
*/
107+
static void flushCachedPidTid();
104108

105109
/**
106110
*@brief set trash directory.

aios/alog/src/cpp/Logger.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ void Logger::flushAll()
8585
}
8686
}
8787

88+
void Logger::flushCachedPidTid() {
89+
sysPid = getpid();
90+
sysTid = (long)syscall(SYS_gettid);
91+
}
92+
8893
void Logger::shutdown()
8994
{
9095
// Stop the I/O worker thread of gEventBase if it is started
@@ -230,7 +235,7 @@ void Logger::logVaList(uint32_t level, const char *format, va_list ap) {
230235
LoggingEvent event(m_loggerName, msg, level);
231236

232237
_log(event);
233-
238+
234239
}
235240
void Logger::logVaList(uint32_t level, const char * file, int line, const char * func, const char* fmt, va_list ap)
236241
{

aios/apps/facility/build_service/BUILD

Lines changed: 66 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ cc_library(
103103
strip_include_prefix='build_service',
104104
deps=[
105105
':bs_basic', ':bs_task_target', ':proto_cc_proto',
106-
'//aios/autil:range_util', '//aios/network/http_arpc'
106+
'//aios/autil:base64', '//aios/autil:range_util',
107+
'//aios/network/http_arpc'
107108
],
108109
alwayslink=True
109110
)
@@ -281,14 +282,6 @@ cc_test(
281282
data=glob(['testdata/**']),
282283
deps=[':bs_io', ':bs_testbase']
283284
)
284-
cc_library(
285-
name='bs_plugin_config',
286-
hdrs=['build_service/plugin/ModuleInfo.h'],
287-
include_prefix='build_service',
288-
strip_include_prefix='build_service',
289-
visibility=['//visibility:public'],
290-
deps=['//aios/storage/indexlib/indexlib:indexlib_plugin_config']
291-
)
292285
cc_library(
293286
name='bs_config',
294287
srcs=glob(['build_service/config/*.cpp'],
@@ -297,19 +290,20 @@ cc_library(
297290
'build_service/config/HashMode.cpp',
298291
'build_service/config/CLIOptionNames.cpp'
299292
]),
300-
hdrs=glob(['build_service/config/*.h'],
293+
hdrs=glob(['build_service/config/*.h', 'build_service/plugin/ModuleInfo.h'],
301294
exclude=['build_service/config/TaskTarget.h']),
302295
include_prefix='build_service',
303296
strip_include_prefix='build_service',
304297
visibility=['//visibility:public'],
305298
deps=[
306-
':bs_hashmode', ':bs_plugin_config', ':bs_proto', ':bs_task_target',
307-
':bs_util', '//aios/filesystem/fslib:fslib-framework',
299+
':bs_hashmode', ':bs_proto', ':bs_task_target', ':bs_util',
300+
'//aios/filesystem/fslib:fslib-framework',
308301
'//aios/storage/indexlib/config:options',
309302
'//aios/storage/indexlib/config:schema',
310303
'//aios/storage/indexlib/framework:tablet_factory',
311304
'//aios/storage/indexlib/framework:tablet_schema_loader',
312-
'//aios/storage/indexlib/indexlib/config'
305+
'//aios/storage/indexlib/indexlib/config',
306+
'//aios/storage/indexlib/legacy/config:module_info'
313307
],
314308
alwayslink=True
315309
)
@@ -324,7 +318,10 @@ cc_library(
324318
)
325319
cc_test(
326320
name='bs_config_test',
327-
srcs=glob(['build_service/config/test/*.cpp']),
321+
srcs=glob(['build_service/config/test/*.cpp'],
322+
exclude=[
323+
'build_service/config/test/FakeRealtimeSchemaListKeeper.cpp'
324+
]),
328325
copts=['-fno-access-control'],
329326
data=glob(['testdata/**']),
330327
deps=[
@@ -358,7 +355,7 @@ cc_library(
358355
'//aios/plugins/havenask_plugins/bs_reader_plugins:__subpackages__'
359356
],
360357
deps=[
361-
':bs_config', ':bs_proto',
358+
':bs_config', ':bs_proto', '//aios/autil:resource_container',
362359
'//aios/storage/indexlib/framework/index_task:task_execute',
363360
'//aios/storage/indexlib/indexlib',
364361
'//aios/storage/indexlib/table/normal_table/index_task:document_reclaim',
@@ -468,7 +465,7 @@ cc_library(
468465
cc_test(
469466
name='bs_document_test',
470467
srcs=glob(['build_service/document/test/*.cpp']),
471-
copts=[],
468+
copts=['-fno-access-control'],
472469
data=glob(['testdata/**']),
473470
deps=[':bs_document', ':bs_document_test_helper', ':bs_testbase']
474471
)
@@ -532,12 +529,21 @@ cc_library(
532529
strip_include_prefix='build_service',
533530
deps=[':bs_testbase', ':bs_worker']
534531
)
532+
cc_library(
533+
name='bs_config_test_helper',
534+
srcs=glob(['build_service/config/test/Fake*.cpp']),
535+
hdrs=glob(['build_service/config/test/Fake*.h']),
536+
include_prefix='build_service',
537+
strip_include_prefix='build_service',
538+
deps=[':bs_common_test_helper']
539+
)
535540
cc_library(
536541
name='bs_admin_test_helper',
537542
srcs=glob([
538543
'build_service/admin/test/Mock*.cpp',
539544
'build_service/admin/test/Fake*.cpp',
540545
'build_service/admin/test/GenerationTaskStateMachine.cpp',
546+
'build_service/admin/test/BuilderV2Node.cpp',
541547
'build_service/admin/test/SoReplaceGenerationTask.cpp'
542548
]),
543549
hdrs=(
@@ -547,15 +553,16 @@ cc_library(
547553
]) + [
548554
'build_service/admin/test/FileUtilForTest.h',
549555
'build_service/admin/test/GenerationTaskStateMachine.h',
556+
'build_service/admin/test/BuilderV2Node.h',
550557
'build_service/admin/test/SoReplaceGenerationTask.h',
551558
'build_service/admin/test/FakeZkState.cpp'
552559
]
553560
),
554561
include_prefix='build_service',
555562
strip_include_prefix='build_service',
556563
deps=[
557-
':bs_admin', ':bs_common_test_helper', ':bs_proto_test_helper',
558-
':bs_testbase', ':bs_worker'
564+
':bs_admin', ':bs_common_test_helper', ':bs_config_test_helper',
565+
':bs_proto_test_helper', ':bs_testbase', ':bs_worker'
559566
]
560567
)
561568
cc_library(
@@ -592,6 +599,34 @@ cc_library(
592599
] + ['//aios/future_lite/future_lite/executors:simple_async_io_executor']),
593600
alwayslink=True
594601
)
602+
cc_library(
603+
name='bs_builder_test_helper',
604+
srcs=[
605+
'build_service/builder/test/FakeThread.cpp',
606+
'build_service/builder/test/IndexBuilderCreator.cpp'
607+
],
608+
hdrs=glob(['build_service/builder/test/*.h']),
609+
copts=[],
610+
include_prefix='build_service',
611+
strip_include_prefix='build_service',
612+
deps=[':bs_builder', ':bs_testbase']
613+
)
614+
cc_test(
615+
name='bs_builder_test',
616+
srcs=glob(['build_service/builder/test/*Test.cpp'],
617+
exclude=['build_service/builder/test/BuilderRangeTest.cpp']),
618+
copts=['-fno-access-control'],
619+
data=glob(['testdata/**']),
620+
shard_count=5,
621+
deps=[
622+
':bs_builder', ':bs_builder_test_helper', ':bs_document_test_helper',
623+
':bs_testbase',
624+
'//aios/storage/indexlib/document/test:KVDocumentBatchMaker',
625+
'//aios/storage/indexlib/framework/mock:tablet',
626+
'//aios/storage/indexlib/indexlib:indexlib_testlib',
627+
'//aios/storage/indexlib/indexlib/test:document'
628+
]
629+
)
595630
cc_library(
596631
name='bs_workflow',
597632
srcs=glob(['build_service/workflow/*.cpp']),
@@ -675,9 +710,9 @@ cc_library(
675710
strip_include_prefix='build_service',
676711
visibility=['//visibility:public'],
677712
deps=[
678-
':bs_basic', ':bs_common', ':bs_config', ':bs_merge', ':bs_task_base',
679-
':bs_util', '//aios/autil:env_util', '//aios/future_lite',
680-
'//aios/storage/indexlib/config:options',
713+
':bs_basic', ':bs_common', ':bs_config', ':bs_general_task',
714+
':bs_merge', ':bs_task_base', ':bs_util', '//aios/autil:env_util',
715+
'//aios/future_lite', '//aios/storage/indexlib/config:options',
681716
'//aios/storage/indexlib/config:schema',
682717
'//aios/storage/indexlib/framework:tablet',
683718
'//aios/storage/indexlib/framework:version_cleaner',
@@ -713,6 +748,14 @@ cc_library(
713748
visibility=['//visibility:public'],
714749
deps=[':bs_processor']
715750
)
751+
cc_library(
752+
name='mock_raw_document_rewriter',
753+
hdrs=['build_service/workflow/test/MockRawDocumentRewriter.h'],
754+
include_prefix='build_service',
755+
strip_include_prefix='build_service',
756+
visibility=['//visibility:public'],
757+
deps=[':bs_workflow']
758+
)
716759
cc_library(
717760
name='mock_builder_v2',
718761
hdrs=['build_service/builder/test/MockBuilderV2.h'],
@@ -763,6 +806,7 @@ cc_library(
763806
cc_binary(
764807
name='bs_admin_worker',
765808
srcs=glob(['build_service/admin/AdminWorker.cpp']),
809+
tags=['fuse-keep-symbol', 'manual', 'no-remote-exec'],
766810
visibility=['//visibility:public'],
767811
deps=[
768812
':bs_admin', '//aios/worker_framework:worker_base_main', '@gperftools'
@@ -771,6 +815,7 @@ cc_binary(
771815
cc_binary(
772816
name='build_service_worker',
773817
srcs=['@com_google_protobuf//:protobuf'],
818+
tags=['fuse-keep-symbol', 'manual', 'no-remote-exec'],
774819
visibility=['//visibility:public'],
775820
deps=[
776821
':bs_worker', '//aios/network/gig:multi_call',

0 commit comments

Comments
 (0)