nucliadb 6.2.1.post2971__py3-none-any.whl → 6.2.1.post2972__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. nucliadb/common/cluster/manager.py +33 -331
  2. nucliadb/common/cluster/rebalance.py +2 -2
  3. nucliadb/common/cluster/rollover.py +12 -71
  4. nucliadb/common/cluster/standalone/utils.py +0 -43
  5. nucliadb/common/cluster/utils.py +0 -16
  6. nucliadb/common/nidx.py +21 -23
  7. nucliadb/health.py +0 -7
  8. nucliadb/ingest/app.py +0 -8
  9. nucliadb/ingest/consumer/auditing.py +1 -1
  10. nucliadb/ingest/consumer/shard_creator.py +1 -1
  11. nucliadb/ingest/orm/entities.py +3 -6
  12. nucliadb/purge/orphan_shards.py +6 -4
  13. nucliadb/search/api/v1/knowledgebox.py +1 -5
  14. nucliadb/search/requesters/utils.py +1 -2
  15. nucliadb/search/search/shards.py +19 -0
  16. nucliadb/standalone/introspect.py +0 -25
  17. nucliadb/train/lifecycle.py +0 -6
  18. nucliadb/train/nodes.py +1 -5
  19. nucliadb/writer/back_pressure.py +17 -46
  20. nucliadb/writer/settings.py +2 -2
  21. {nucliadb-6.2.1.post2971.dist-info → nucliadb-6.2.1.post2972.dist-info}/METADATA +5 -7
  22. {nucliadb-6.2.1.post2971.dist-info → nucliadb-6.2.1.post2972.dist-info}/RECORD +26 -36
  23. nucliadb/common/cluster/discovery/__init__.py +0 -19
  24. nucliadb/common/cluster/discovery/base.py +0 -178
  25. nucliadb/common/cluster/discovery/k8s.py +0 -301
  26. nucliadb/common/cluster/discovery/manual.py +0 -57
  27. nucliadb/common/cluster/discovery/single.py +0 -51
  28. nucliadb/common/cluster/discovery/types.py +0 -32
  29. nucliadb/common/cluster/discovery/utils.py +0 -67
  30. nucliadb/common/cluster/standalone/grpc_node_binding.py +0 -349
  31. nucliadb/common/cluster/standalone/index_node.py +0 -123
  32. nucliadb/common/cluster/standalone/service.py +0 -84
  33. {nucliadb-6.2.1.post2971.dist-info → nucliadb-6.2.1.post2972.dist-info}/WHEEL +0 -0
  34. {nucliadb-6.2.1.post2971.dist-info → nucliadb-6.2.1.post2972.dist-info}/entry_points.txt +0 -0
  35. {nucliadb-6.2.1.post2971.dist-info → nucliadb-6.2.1.post2972.dist-info}/top_level.txt +0 -0
  36. {nucliadb-6.2.1.post2971.dist-info → nucliadb-6.2.1.post2972.dist-info}/zip-safe +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nucliadb
3
- Version: 6.2.1.post2971
3
+ Version: 6.2.1.post2972
4
4
  Home-page: https://docs.nuclia.dev/docs/management/nucliadb/intro
5
5
  Author: NucliaDB Community
6
6
  Author-email: nucliadb@nuclia.com
@@ -22,12 +22,11 @@ Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Programming Language :: Python :: 3 :: Only
23
23
  Requires-Python: >=3.9, <4
24
24
  Description-Content-Type: text/markdown
25
- Requires-Dist: nucliadb-telemetry[all]>=6.2.1.post2971
26
- Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.2.1.post2971
27
- Requires-Dist: nucliadb-protos>=6.2.1.post2971
28
- Requires-Dist: nucliadb-models>=6.2.1.post2971
25
+ Requires-Dist: nucliadb-telemetry[all]>=6.2.1.post2972
26
+ Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.2.1.post2972
27
+ Requires-Dist: nucliadb-protos>=6.2.1.post2972
28
+ Requires-Dist: nucliadb-models>=6.2.1.post2972
29
29
  Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
30
- Requires-Dist: nucliadb-node-binding>=2.26.0
31
30
  Requires-Dist: nuclia-models>=0.24.2
32
31
  Requires-Dist: uvicorn
33
32
  Requires-Dist: argdantic
@@ -78,7 +77,6 @@ Requires-Dist: async_lru>=2.0.4
78
77
  Requires-Dist: async-timeout>=4.0.3
79
78
  Requires-Dist: cachetools>=5.3.2
80
79
  Requires-Dist: types-cachetools>=5.3.0.5
81
- Requires-Dist: kubernetes_asyncio<30.0.0
82
80
  Provides-Extra: redis
83
81
  Requires-Dist: redis>=4.3.4; extra == "redis"
84
82
  Dynamic: author
@@ -31,7 +31,7 @@ migrations/pg/0002_catalog.py,sha256=Rsleecu351Ty19kYZgOpqX5G3MEAY8nMxCJrAeuS2Mw
31
31
  migrations/pg/0003_catalog_kbid_index.py,sha256=uKq_vtnuf73GVf0mtl2rhzdk_czAoEU1UdiVKVZpA0M,1044
32
32
  migrations/pg/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
33
33
  nucliadb/__init__.py,sha256=_abCmDJ_0ku483Os4UAjPX7Nywm39cQgAV_DiyjsKeQ,891
34
- nucliadb/health.py,sha256=f2UqyxTcziOOPe9oAlB0XVAKEhYWJM6wDPVJ0cFEhzE,3695
34
+ nucliadb/health.py,sha256=UIxxA4oms4HIsCRZM_SZsdkIZIlgzmOxw-qSHLlWuak,3465
35
35
  nucliadb/learning_proxy.py,sha256=LxsGbYD-kwCY6wlZWOhGv2kiDJKGz623J7WDfL38yHw,19359
36
36
  nucliadb/metrics_exporter.py,sha256=Rz6G7V_C_GTZCFzd0xEtIfixtZgUuffnr4rDKCbXXWM,5595
37
37
  nucliadb/openapi.py,sha256=wDiw0dVEvTpJvbatkJ0JZLkKm9RItZT5PWRHjqRfqTA,2272
@@ -41,29 +41,19 @@ nucliadb/common/constants.py,sha256=QpigxJh_CtD85Evy0PtV5cVq6x0U_f9xfIcXz1ymkUg,
41
41
  nucliadb/common/counters.py,sha256=yhJEmmrglTSrDmB8OjaFLkZ__TwhTxayyQrtacnB55I,957
42
42
  nucliadb/common/ids.py,sha256=HMb213Kz9HaY4IsBwaQJFhUErntKWV-29s0UHaGcf1E,8004
43
43
  nucliadb/common/locking.py,sha256=RL0CabZVPzxHZyUjYeUyLvsJTm7W3J9o4fEgsY_ufNc,5896
44
- nucliadb/common/nidx.py,sha256=D74oNdniWjbc6gBBDwZP74NH-egTIORHhbfzgIto8DE,8667
44
+ nucliadb/common/nidx.py,sha256=56fimZcR-__SOfbgU72GEZqPPjYhEsz5DHurAef72XE,8823
45
45
  nucliadb/common/cluster/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
46
46
  nucliadb/common/cluster/base.py,sha256=kklDqyvsubNX0W494ttl9f3E58lGaX6AXqAd8XX8ZHE,5522
47
47
  nucliadb/common/cluster/exceptions.py,sha256=V3c_fgH00GyJ-a5CaGLhwTuhwhUNR9YAGvS5jaRuc_Y,1495
48
48
  nucliadb/common/cluster/grpc_node_dummy.py,sha256=L85wBnfab7Rev0CfsfUjPxQC6DiHPsETKrZAOLx9XHg,3510
49
49
  nucliadb/common/cluster/index_node.py,sha256=g38H1kiAliF3Y6et_CWYInpn_xPxf7THAFJ7RtgLNZo,3246
50
- nucliadb/common/cluster/manager.py,sha256=cKC7ZZdI-abD9Ha5wIRlLxm4cVaF2xeZ0exMaY0s75c,27365
51
- nucliadb/common/cluster/rebalance.py,sha256=ZlMuGRYfWQeGAAH6vbt8R9Yg80sJ_epVNPRj2cCEaM4,9167
52
- nucliadb/common/cluster/rollover.py,sha256=Z_KILOi0uC_qEQ7Nc-9u2veoYkonL7nqQZmIB9gtG_w,28458
50
+ nucliadb/common/cluster/manager.py,sha256=3UnYwVb-ZykYfLndxM7TLw7-2T_vxqoFXMu0Pzxh5-A,15327
51
+ nucliadb/common/cluster/rebalance.py,sha256=jSEYsPgs_Dobv3FOaKl5arBko4s8JlWkahm8LOzgNnE,9135
52
+ nucliadb/common/cluster/rollover.py,sha256=dx6AF9ywKP10iBNlcoJgRV40921fOPpVWaCUU54hztE,25823
53
53
  nucliadb/common/cluster/settings.py,sha256=RqIMJNyNcn5aV5PifUflkn4zDVX-Ruo36PXGP1CV1mc,3263
54
- nucliadb/common/cluster/utils.py,sha256=tDYx7owJrIKWsaRFSdw2YPSZF82CQIS0eFyY0AJJWEo,6402
55
- nucliadb/common/cluster/discovery/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
56
- nucliadb/common/cluster/discovery/base.py,sha256=-iKxLF8CSDO9dyT0DGiR_Hi8MiwxTN_0hqfNAcHNc1c,6473
57
- nucliadb/common/cluster/discovery/k8s.py,sha256=etU8uSlgr6UwniWC0BeOfJvYL4iJkLbzl4PPyQM45OM,12282
58
- nucliadb/common/cluster/discovery/manual.py,sha256=ZryMjHD45WdIJlEPIoyouAljkLw3ZO_SGGmv3oJnBf4,1919
59
- nucliadb/common/cluster/discovery/single.py,sha256=2BhcencPKQQIfVitmTPJZm3TkBHyY9ZMcr-Clh8k2tM,1737
60
- nucliadb/common/cluster/discovery/types.py,sha256=vs-K790rofjZ4FWYaMkgjkZZqMvIvd_0eSw3shuiLwA,1139
61
- nucliadb/common/cluster/discovery/utils.py,sha256=OWQ3NewGX7PlIGOWuS7M5wxDMb96kQj-Ll53qiv0QcE,2526
54
+ nucliadb/common/cluster/utils.py,sha256=Vu0f6026EBELe-ff3d5B0ihD0HtjSWKDCr4dy7LmKqg,5848
62
55
  nucliadb/common/cluster/standalone/__init__.py,sha256=itSI7dtTwFP55YMX4iK7JzdMHS5CQVUiB1XzQu4UBh8,833
63
- nucliadb/common/cluster/standalone/grpc_node_binding.py,sha256=oTqzHgowO3A-N891Th8P--0VHcE0gXj2GltjGpATUCo,12221
64
- nucliadb/common/cluster/standalone/index_node.py,sha256=QuxAjx3NguLeK8X91f8xtl54Q7-ynrqJEoB-KgssTIQ,4578
65
- nucliadb/common/cluster/standalone/service.py,sha256=A9VSTkBW0scGuNIQi1JiGTzFXhHuEK7KJ1SqPcgO0gM,3416
66
- nucliadb/common/cluster/standalone/utils.py,sha256=T6pJ7pWt14i0cVzJ1upw2texM6pophOYJYTdekJppLI,3501
56
+ nucliadb/common/cluster/standalone/utils.py,sha256=af3r-x_GF7A6dwIAhZLR-r-SZQEVxsFrDKeMfUTA6G0,1908
67
57
  nucliadb/common/context/__init__.py,sha256=gPwX1cZHPV9r-fLl3ZCZMYBTAwo6Q_xvSlQtd4qPd4c,3592
68
58
  nucliadb/common/context/fastapi.py,sha256=j3HZ3lne6mIfw1eEar2het8RWzv6UruUZpXaKieSLOs,1527
69
59
  nucliadb/common/datamanagers/__init__.py,sha256=U1cg-KvqbfzN5AnL_tFFrERmPb81w_0MNiTmxObmla4,2062
@@ -110,7 +100,7 @@ nucliadb/export_import/models.py,sha256=dbjScNkiMRv4X3Ktudy1JRliD25bfoDTy3JmEZgQ
110
100
  nucliadb/export_import/tasks.py,sha256=fpCBeFYPReyLIdk38LDM9Tpnw_VczeMrobT4n1RAIp4,2507
111
101
  nucliadb/export_import/utils.py,sha256=zrNrkkc9i3uT-R6Ju4J_0WNrzayln3KuQFCz-_qIaIA,19613
112
102
  nucliadb/ingest/__init__.py,sha256=fsw3C38VP50km3R-nHL775LNGPpJ4JxqXJ2Ib1f5SqE,1011
113
- nucliadb/ingest/app.py,sha256=L8MDbURnSdD6yI4yCnSbmnNccsnha-zJEkKSaGk1xMg,7612
103
+ nucliadb/ingest/app.py,sha256=kZ8RgZNumzVEssVGnSZIh8jyCYKYotGhxBYz3EWx6Cc,7361
114
104
  nucliadb/ingest/cache.py,sha256=w7jMMzamOmQ7gwXna6Dqm6isRNBVv6l5BTBlTxaYWjE,1005
115
105
  nucliadb/ingest/partitions.py,sha256=2NIhMYbNT0TNBL6bX1UMSi7vxFGICstCKEqsB0TXHOE,2410
116
106
  nucliadb/ingest/processing.py,sha256=gg1DqbMFwqdOsmCSGsZc2abRdYz86xOZJun9vrHOCzs,20618
@@ -119,13 +109,13 @@ nucliadb/ingest/serialize.py,sha256=13NcAP0Tw0zxMsjdudnSnedsg1YpiqFrA-TTIxQA6Ww,
119
109
  nucliadb/ingest/settings.py,sha256=0B-wQNa8FLqtNcQgRzh-fuIuGptM816XHcbH1NQKfmE,3050
120
110
  nucliadb/ingest/utils.py,sha256=l1myURu3r8oA11dx3GpHw-gNTUc1AFX8xdPm9Lgl2rA,2275
121
111
  nucliadb/ingest/consumer/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
122
- nucliadb/ingest/consumer/auditing.py,sha256=EJoqRRr4dk2eUMK0GOY6b9xHO0YLQ0LjoP_xZBLACZo,7280
112
+ nucliadb/ingest/consumer/auditing.py,sha256=QLffHz49oz9h9P080oBB7eTBL4cqWI-JTTDeg3SmFQ8,7264
123
113
  nucliadb/ingest/consumer/consumer.py,sha256=Lej1d6jqmaeR3vjzD0mnfKcVzZTT4TQ3lb1DOfyNWM4,14117
124
114
  nucliadb/ingest/consumer/materializer.py,sha256=7ofLbwjldJA8TWXDRZRM4U5EviZt3qNSQ8oadmkzS0Y,3840
125
115
  nucliadb/ingest/consumer/metrics.py,sha256=ji1l_4cKiHJthQd8YNem1ft4iMbw9KThmVvJmLcv3Xg,1075
126
116
  nucliadb/ingest/consumer/pull.py,sha256=EYT0ImngMQgatStG68p2GSrPQBbJxeuq8nFm8DdAbwk,9280
127
117
  nucliadb/ingest/consumer/service.py,sha256=EZM1sABW_7bj6j2UgKUHUuK-EGIEYnLdtPAn8agfWz0,7110
128
- nucliadb/ingest/consumer/shard_creator.py,sha256=19wf-Bu_9hb_muCDVblamWuvLr09e5dMu9Id5I4-rGw,4324
118
+ nucliadb/ingest/consumer/shard_creator.py,sha256=8SotMc-o_G8XZU52gR4Aay7tcigTdIXgz8YtxqHmJ1Q,4309
129
119
  nucliadb/ingest/consumer/utils.py,sha256=jpX8D4lKzuPCpArQLZeX_Zczq3pfen_zAf8sPJfOEZU,2642
130
120
  nucliadb/ingest/fields/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
131
121
  nucliadb/ingest/fields/base.py,sha256=b6QpVPsCiDirDiYG3-yOCMaSNznJSHmQB0z6J_eDIyw,20657
@@ -138,7 +128,7 @@ nucliadb/ingest/fields/text.py,sha256=tFvSQJAe0W7ePpp2_WDfLiE2yglR1OTU0Zht9acvOF
138
128
  nucliadb/ingest/orm/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
139
129
  nucliadb/ingest/orm/brain.py,sha256=UND5EsNUdd7XdjScYqRqg4r_xCx3l-My8alGw5M9CWg,28398
140
130
  nucliadb/ingest/orm/broker_message.py,sha256=ZEMueoGuuRKO4tHgzc0P0AM1Ls1TTYey_4UvRQf0BpY,6915
141
- nucliadb/ingest/orm/entities.py,sha256=2PslT1FZ6yCvJtjR0UpKTSzxJrtS-C_gZx4ZTWHunTc,15759
131
+ nucliadb/ingest/orm/entities.py,sha256=5d6Gfo-Yz-rns_mNJeRqiGaPeWpUMgSKZnmWIGMLCKo,15537
142
132
  nucliadb/ingest/orm/exceptions.py,sha256=k4Esv4NtL4TrGTcsQpwrSfDhPQpiYcRbB1SpYmBX5MY,1432
143
133
  nucliadb/ingest/orm/knowledgebox.py,sha256=XefDz6YsA0DLMS6T5W8P3VMFTkwr13bIae2ot7wAFpE,25259
144
134
  nucliadb/ingest/orm/metrics.py,sha256=OkwMSPKLZcKba0ZTwtTiIxwBgaLMX5ydhGieKvi2y7E,1096
@@ -166,7 +156,7 @@ nucliadb/migrator/utils.py,sha256=NgUreUvON8_nWEzTxELBMWlfV7E6-6qi-g0DMEbVEz4,28
166
156
  nucliadb/models/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
167
157
  nucliadb/models/responses.py,sha256=qnuOoc7TrVSUnpikfTwHLKez47_DE4mSFzpxrwtqijA,1599
168
158
  nucliadb/purge/__init__.py,sha256=ijcigiWz38ohXmVVwDU87aCki1BkmAIQRjDoNQ3LPRM,11647
169
- nucliadb/purge/orphan_shards.py,sha256=fA5yqRRN-M50OIk8dkAi1_ShFVjwDYEYqzMA9dYP0eU,9227
159
+ nucliadb/purge/orphan_shards.py,sha256=7Qm5PFscGr5ihcn5YZ9BaDh6shagkYouv8Z_tTzLuM8,9222
170
160
  nucliadb/reader/__init__.py,sha256=C5Efic7WlGm2U2C5WOyquMFbIj2Pojwe_8mwzVYnOzE,1304
171
161
  nucliadb/reader/app.py,sha256=Se-BFTE6d1v1msLzQn4q5XIhjnSxa2ckDSHdvm7NRf8,3096
172
162
  nucliadb/reader/lifecycle.py,sha256=5jYyzMD1tpIh-OYbQoNMjKZ0-3D9KFnULa3B_Vf2xyY,1740
@@ -200,7 +190,7 @@ nucliadb/search/api/v1/ask.py,sha256=Od2U_gaOZK6dJZ1eDGQQJ3xUVnbBih58VPYVAsQErOw
200
190
  nucliadb/search/api/v1/catalog.py,sha256=ubYPS1wmPHzOgH9LR0qJmmV-9ELZPtHRSs5TYJ1pA9A,7117
201
191
  nucliadb/search/api/v1/feedback.py,sha256=kNLc4dHz2SXHzV0PwC1WiRAwY88fDptPcP-kO0q-FrQ,2620
202
192
  nucliadb/search/api/v1/find.py,sha256=DsnWkySu_cFajDWJIxN8DYvLL_Rm2yiCjHD8TsqPfRk,9304
203
- nucliadb/search/api/v1/knowledgebox.py,sha256=uPaMF5c1168Owd6fy_x7IUlcTBzDp2Qm6i_aiz6pa-s,8805
193
+ nucliadb/search/api/v1/knowledgebox.py,sha256=Hrt2h-28DDlwN3AdjMZPTYI6om0RMy9bmJvqVHvw8sE,8620
204
194
  nucliadb/search/api/v1/predict_proxy.py,sha256=QrGzo0hKjtmyGZ6pjlJHYAh4hxwVUIOTcVcerRCw7eE,3047
205
195
  nucliadb/search/api/v1/router.py,sha256=mtT07rBZcVfpa49doaw9b1tj3sdi3qLH0gn9Io6NYM0,988
206
196
  nucliadb/search/api/v1/search.py,sha256=vCj5V9kozoti0JrgU_XJhTcBucWzI4SY1B0yCSj9EQw,13638
@@ -211,7 +201,7 @@ nucliadb/search/api/v1/resource/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV
211
201
  nucliadb/search/api/v1/resource/ask.py,sha256=XMEP9_Uwy37yaXLcIYKMXGiZYNASD8RTByzQGjd9LPQ,3847
212
202
  nucliadb/search/api/v1/resource/search.py,sha256=X0rQU14r_s4_CPpoE2sc84AJPX68gvCftcP4bosWHhA,4812
213
203
  nucliadb/search/requesters/__init__.py,sha256=itSI7dtTwFP55YMX4iK7JzdMHS5CQVUiB1XzQu4UBh8,833
214
- nucliadb/search/requesters/utils.py,sha256=7ovWSGzhLpZGTMi9x9nMOi7QNCgt2qah-7Kam-cIvUg,8468
204
+ nucliadb/search/requesters/utils.py,sha256=ZTiWDkDihJ7rcvs7itCe8hr6OclVcvu_2EAPFeyGhF4,8389
215
205
  nucliadb/search/search/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
216
206
  nucliadb/search/search/cache.py,sha256=n9vkN6Y6Xnr2RBJyoH0WzjzGTJOMfKekU9tfPTWWCPc,6810
217
207
  nucliadb/search/search/cut.py,sha256=ytY0_GY7ocNjfxTb4aosxEp4ZfhQNDP--JkhEMGD298,1153
@@ -230,7 +220,7 @@ nucliadb/search/search/predict_proxy.py,sha256=xBlh6kjuQpWRq7KsBx4pEl2PtnwljjQIi
230
220
  nucliadb/search/search/query.py,sha256=CbCLdkBgD1XRVXN5qgT1rforf28cLNXvKbjbZzQYmUA,38051
231
221
  nucliadb/search/search/rank_fusion.py,sha256=tRGo_KlsFsVx1CQEy1iqQ6f0T1Dq1kf0axDXHuuzvvM,6946
232
222
  nucliadb/search/search/rerankers.py,sha256=0kAHES9X_FKkP7KSN9NRETFmRPKzwrFAo_54MbyvM7Q,9051
233
- nucliadb/search/search/shards.py,sha256=mM2aCHWhl_gwkCENXDShPukS-_qnB5tFS3UAJuzM9qA,2182
223
+ nucliadb/search/search/shards.py,sha256=JSRSrHgHcF4sXyuZZoJdMfK0v_LHpoSRf1lCr5-K5ko,2742
234
224
  nucliadb/search/search/summarize.py,sha256=ksmYPubEQvAQgfPdZHfzB_rR19B2ci4IYZ6jLdHxZo8,4996
235
225
  nucliadb/search/search/utils.py,sha256=iF2tbBA56gRMJH1TlE2hMrqeXqjoeOPt4KgRdp2m9Ek,3313
236
226
  nucliadb/search/search/chat/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
@@ -248,7 +238,7 @@ nucliadb/standalone/api_router.py,sha256=zR03TQ-Pd2kXx1jeV83Puw19112Z8Jhln7p1cAn
248
238
  nucliadb/standalone/app.py,sha256=mAApNK_iVsQgJyd-mtwCeZq5csSimwnXmlQGH9a70pE,5586
249
239
  nucliadb/standalone/auth.py,sha256=UwMv-TywhMZabvVg3anQLeCRdoHDnWf2o3luvnoNBjs,7670
250
240
  nucliadb/standalone/config.py,sha256=g9JBJQfyw87TYZ3yuy0O9WFVLd_MmCJxSRSI0E8FwZE,5396
251
- nucliadb/standalone/introspect.py,sha256=KJ91JYGaxMJ62lNe6Ji9NFfyEyks6lVJcGTmqfPjtp0,6986
241
+ nucliadb/standalone/introspect.py,sha256=xHdHV-CB0Vy5cp1MQAodu0Pc8izpzl_lX2ARJJwL3RI,6083
252
242
  nucliadb/standalone/lifecycle.py,sha256=rdKLG-oOLN4rfd2VGG_2vlDUWYneWSCiuEhoeiFKfnM,2343
253
243
  nucliadb/standalone/migrations.py,sha256=s9-3RSZ-O3bjEw2TnBe_YWLUEKbub0bARUxi1gA3yuY,1950
254
244
  nucliadb/standalone/purge.py,sha256=ZY-cebb214FFiPG7OFmXZGg0G3CK5Amw0FLLm9WJhKE,1343
@@ -272,9 +262,9 @@ nucliadb/tests/vectors.py,sha256=CcNKx-E8LPpyvRyljbmb-Tn_wST9Juw2CBoogWrKiTk,628
272
262
  nucliadb/train/__init__.py,sha256=NVwe5yULoHXb80itIJT8YJYEz2xbiOPQ7_OMys6XJw8,1301
273
263
  nucliadb/train/app.py,sha256=TiRttTvekLuZdIvi46E4HyuumDTkR4G4Luqq3fEdjes,2824
274
264
  nucliadb/train/generator.py,sha256=0_zqWsLUHmJZl0lXhGorO5CWSkl42-k78dqb1slZ5h0,3904
275
- nucliadb/train/lifecycle.py,sha256=aCNaRURu0ZOUJaWLTZuEjwTstnB9MuLtzxOMztQoGxc,1773
265
+ nucliadb/train/lifecycle.py,sha256=dWnFuo-nYaWd6uayregmakQaZbQFdtVJReJONhYAQYI,1581
276
266
  nucliadb/train/models.py,sha256=BmgmMjDsu_1Ih5JDAqo6whhume90q0ASJcDP9dkMQm8,1198
277
- nucliadb/train/nodes.py,sha256=_89ZIpBb0HnR2jejvuO6aPsgHVSGbasPWz0lkGmVnvU,5925
267
+ nucliadb/train/nodes.py,sha256=HROQMRw2g5sJTnuBagh3B0id3iWonRJ68tg3skOme9k,5748
278
268
  nucliadb/train/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
279
269
  nucliadb/train/resource.py,sha256=3qQ_9Zdt5JAbtD-wpmt7OeDGRNKS-fQdKAuIQfznZm0,16219
280
270
  nucliadb/train/run.py,sha256=evz6CKVfJOzkbHMoaYz2mTMlKjJnNOb1O8zBBWMpeBw,1400
@@ -302,13 +292,13 @@ nucliadb/train/generators/token_classifier.py,sha256=Vl14aaWoqrgYPijmvM62OjxDdAN
302
292
  nucliadb/train/generators/utils.py,sha256=1uSELmM4CpKy9jWp6j_u7_n_KR-udRNkes4UmPMOCcI,3907
303
293
  nucliadb/writer/__init__.py,sha256=S298mrZL3vr62OrBqi97mdLxgR5cReMlRJgnaQHZV7s,1304
304
294
  nucliadb/writer/app.py,sha256=ABBO8-u4pDAa61b3mCdD0TFhuHAYcxMkgpZSGgWARuE,2736
305
- nucliadb/writer/back_pressure.py,sha256=s3Z8ZLD8s0xApUkt3BRZmOFzgVJ5FDqljJFpAYeI5LU,19194
295
+ nucliadb/writer/back_pressure.py,sha256=JaiC2JAugVA92gDHzABZFiuQexiOKZC9C-3Jn9VF-M0,17898
306
296
  nucliadb/writer/exceptions.py,sha256=-Z7LW--eid7PNeKFuzo9kAlbLEBMUosxE-UVIgGD3SA,929
307
297
  nucliadb/writer/lifecycle.py,sha256=OYyhUZ1ejlybPzO-O_EsInjdifKiPiEzooy2d_2DW3k,2550
308
298
  nucliadb/writer/openapi.py,sha256=thqCO1ht_RJgOkXs-aIsv8aXJrU5z8wo2n05l2_LqMs,1032
309
299
  nucliadb/writer/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
310
300
  nucliadb/writer/run.py,sha256=euVZ_rtHDXs-O1kB-Pt1Id8eft9CYVpWH3zJzEoEqls,1448
311
- nucliadb/writer/settings.py,sha256=32Umt2SqeIL8PW4_C6hkuq01QT1YmcROiWpmoy1D5Wk,3286
301
+ nucliadb/writer/settings.py,sha256=pA9aMAvY8H6zvsxAOdGY8SZLrThDvJ8KLhluGI0GxnQ,3288
312
302
  nucliadb/writer/utilities.py,sha256=AZ5qEny1Xm0IDsFtH13oJa2usvJZK8f0FdgF1LrnLCw,1036
313
303
  nucliadb/writer/vectorsets.py,sha256=18XJvsyi0-tePQWig8dl5qaNPaufEZb0-uD22IAOTa0,5648
314
304
  nucliadb/writer/api/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
@@ -340,9 +330,9 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
340
330
  nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
341
331
  nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
342
332
  nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
343
- nucliadb-6.2.1.post2971.dist-info/METADATA,sha256=Ftcrf80Q8tp56jdibzPDOdTJq2jG0aEGuC-bMD-4418,4689
344
- nucliadb-6.2.1.post2971.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
345
- nucliadb-6.2.1.post2971.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
346
- nucliadb-6.2.1.post2971.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
347
- nucliadb-6.2.1.post2971.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
348
- nucliadb-6.2.1.post2971.dist-info/RECORD,,
333
+ nucliadb-6.2.1.post2972.dist-info/METADATA,sha256=YnrbW19LMC5vJsf6nRuyDwUNVBFivf8KQJnvl2xeMro,4603
334
+ nucliadb-6.2.1.post2972.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
335
+ nucliadb-6.2.1.post2972.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
336
+ nucliadb-6.2.1.post2972.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
337
+ nucliadb-6.2.1.post2972.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
338
+ nucliadb-6.2.1.post2972.dist-info/RECORD,,
@@ -1,19 +0,0 @@
1
- # Copyright (C) 2021 Bosutech XXI S.L.
2
- #
3
- # nucliadb is offered under the AGPL v3.0 and as commercial software.
4
- # For commercial licensing, contact us at info@nuclia.com.
5
- #
6
- # AGPL:
7
- # This program is free software: you can redistribute it and/or modify
8
- # it under the terms of the GNU Affero General Public License as
9
- # published by the Free Software Foundation, either version 3 of the
10
- # License, or (at your option) any later version.
11
- #
12
- # This program is distributed in the hope that it will be useful,
13
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- # GNU Affero General Public License for more details.
16
- #
17
- # You should have received a copy of the GNU Affero General Public License
18
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
- #
@@ -1,178 +0,0 @@
1
- # Copyright (C) 2021 Bosutech XXI S.L.
2
- #
3
- # nucliadb is offered under the AGPL v3.0 and as commercial software.
4
- # For commercial licensing, contact us at info@nuclia.com.
5
- #
6
- # AGPL:
7
- # This program is free software: you can redistribute it and/or modify
8
- # it under the terms of the GNU Affero General Public License as
9
- # published by the Free Software Foundation, either version 3 of the
10
- # License, or (at your option) any later version.
11
- #
12
- # This program is distributed in the hope that it will be useful,
13
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- # GNU Affero General Public License for more details.
16
- #
17
- # You should have received a copy of the GNU Affero General Public License
18
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
- #
20
- import abc
21
- import asyncio
22
- import logging
23
-
24
- import backoff
25
- from grpc.aio import AioRpcError
26
-
27
- from nucliadb.common.cluster import manager
28
- from nucliadb.common.cluster.discovery.types import IndexNodeMetadata
29
- from nucliadb.common.cluster.exceptions import NodeConnectionError
30
- from nucliadb.common.cluster.settings import Settings
31
- from nucliadb_protos import (
32
- noderesources_pb2,
33
- nodewriter_pb2,
34
- nodewriter_pb2_grpc,
35
- replication_pb2_grpc,
36
- standalone_pb2,
37
- standalone_pb2_grpc,
38
- )
39
- from nucliadb_telemetry import metrics
40
- from nucliadb_utils.grpc import get_traced_grpc_channel
41
-
42
- logger = logging.getLogger(__name__)
43
-
44
- AVAILABLE_NODES = metrics.Gauge("nucliadb_nodes_available")
45
-
46
-
47
- def update_members(members: list[IndexNodeMetadata]) -> None:
48
- # First add new nodes or update existing ones
49
- valid_ids = []
50
- for member in members:
51
- valid_ids.append(member.node_id)
52
-
53
- shard_count = member.shard_count
54
- if shard_count is None:
55
- shard_count = 0
56
- logger.warning(f"Node {member.node_id} has no shard_count")
57
-
58
- node = manager.get_index_node(member.node_id)
59
- if node is None:
60
- logger.debug(f"{member.node_id} add {member.address}")
61
- manager.add_index_node(
62
- id=member.node_id,
63
- address=member.address,
64
- shard_count=shard_count,
65
- available_disk=member.available_disk,
66
- primary_id=member.primary_id,
67
- )
68
- logger.debug("Node added")
69
- else:
70
- logger.debug(f"{member.node_id} update")
71
- node.address = member.address
72
- node.shard_count = shard_count
73
- node.available_disk = member.available_disk
74
- logger.debug("Node updated")
75
-
76
- # Then cleanup nodes that are no longer reported
77
- node_ids = [x.id for x in manager.get_index_nodes()]
78
- removed_node_ids = []
79
- for key in node_ids:
80
- if key not in valid_ids:
81
- node = manager.get_index_node(key)
82
- if node is not None:
83
- removed_node_ids.append(key)
84
- logger.warning(f"{key} remove {node.address}")
85
- manager.remove_index_node(key, node.primary_id)
86
-
87
- if len(removed_node_ids) > 1:
88
- logger.warning(
89
- f"{len(removed_node_ids)} nodes are down simultaneously. This should never happen!"
90
- )
91
-
92
- AVAILABLE_NODES.set(len(manager.get_index_nodes()))
93
-
94
-
95
- @backoff.on_exception(backoff.constant, (Exception,), interval=0.5, max_tries=2)
96
- async def _get_index_node_metadata(
97
- settings: Settings, address: str, read_replica: bool = False
98
- ) -> IndexNodeMetadata:
99
- """
100
- Get node metadata directly from the writer.
101
-
102
- Establishes a new connection on every try on purpose to avoid long lived connections
103
- and dns caching issues.
104
-
105
- This method should be used carefully and results should be cached.
106
- """
107
- if address in settings.writer_port_map:
108
- # test wiring
109
- port = settings.writer_port_map[address]
110
- grpc_address = f"localhost:{port}"
111
- else:
112
- grpc_address = f"{address}:{settings.node_writer_port}"
113
- channel = get_traced_grpc_channel(grpc_address, "discovery", variant="_writer")
114
- if read_replica:
115
- # on a read replica, we need to use the replication service
116
- stub = replication_pb2_grpc.ReplicationServiceStub(channel)
117
- else:
118
- stub = nodewriter_pb2_grpc.NodeWriterStub(channel) # type: ignore
119
- try:
120
- metadata: nodewriter_pb2.NodeMetadata = await stub.GetMetadata(noderesources_pb2.EmptyQuery()) # type: ignore
121
- except AioRpcError as exc:
122
- raise NodeConnectionError() from exc
123
-
124
- primary_id = (
125
- getattr(metadata, "primary_node_id", None)
126
- # the or None here is important because the proto returns an empty string
127
- or None
128
- )
129
- if read_replica and primary_id is None:
130
- raise Exception("Primary node id not found when it is expected to be a read replica")
131
-
132
- return IndexNodeMetadata(
133
- node_id=metadata.node_id,
134
- name=metadata.node_id,
135
- address=address,
136
- shard_count=metadata.shard_count,
137
- primary_id=primary_id,
138
- available_disk=metadata.available_disk,
139
- )
140
-
141
-
142
- @backoff.on_exception(backoff.expo, (Exception,), jitter=backoff.random_jitter, max_tries=4)
143
- async def _get_standalone_index_node_metadata(settings: Settings, address: str) -> IndexNodeMetadata:
144
- if ":" not in address:
145
- grpc_address = f"{address}:{settings.standalone_node_port}"
146
- else:
147
- grpc_address = address
148
- channel = get_traced_grpc_channel(grpc_address, "standalone_proxy")
149
- stub = standalone_pb2_grpc.StandaloneClusterServiceStub(channel)
150
- resp: standalone_pb2.NodeInfoResponse = await stub.NodeInfo(standalone_pb2.NodeInfoRequest()) # type: ignore
151
- return IndexNodeMetadata(
152
- node_id=resp.id,
153
- name=resp.id,
154
- address=address,
155
- shard_count=resp.shard_count,
156
- available_disk=resp.available_disk,
157
- )
158
-
159
-
160
- class AbstractClusterDiscovery(abc.ABC):
161
- task: asyncio.Task
162
-
163
- def __init__(self, settings: Settings):
164
- self.settings = settings
165
-
166
- @abc.abstractmethod
167
- async def initialize(self) -> None:
168
- """ """
169
-
170
- @abc.abstractmethod
171
- async def finalize(self) -> None:
172
- """ """
173
-
174
- async def _query_node_metadata(self, address: str, read_replica: bool = False) -> IndexNodeMetadata:
175
- if self.settings.standalone_mode:
176
- return await _get_standalone_index_node_metadata(self.settings, address)
177
- else:
178
- return await _get_index_node_metadata(self.settings, address, read_replica)