What’s new in v23.1LTS-patch20231025
New builtins
New service
General changes
- DB SchemaをSDK側で自動変更しないようにする起動パラメーター
--disable_ddl_execution
(default:False)を追加しました。
Warning
--disable_ddl_execution=True
を指定した場合、DB側のschemaについてはplugin開発者側でメンテナンスする必要があります。
DB側のschemaとpluginで定義しているclass/modelschema間のO/RマッピングによりSDK側でschema差分を検出した場合、plugin install時にHotspotExceptionの例外が送出されます。
エラーログ例:
[I 231027 04:35:41 factory:1475] >>> Detected table model schema change (SampleClass)
[E 231027 04:35:41 ioloop:760] Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f4754958e50>>, <Task finished name='Task-224' coro=<PluginsInstaller.install() done, defined at /root/axis-stable/axis/lib/installer.py:518> exception=Unable to resolve schema mismatch because disable_ddl_execution=True>)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/tornado/ioloop.py", line 740, in _run_callback
ret = callback()
File "/usr/local/lib/python3.10/site-packages/tornado/ioloop.py", line 764, in _discard_future_result
future.result()
File "/root/axis-stable/axis/lib/installer.py", line 541, in install
await self.context.rebuildAtomRoutings()
File "/root/axis-stable/axis/boot/context.py", line 619, in rebuildAtomRoutings
[await cls._sync_table_schema() for clsname, cls in self.__atoms__.items()]
File "/root/axis-stable/axis/boot/context.py", line 619, in <listcomp>
[await cls._sync_table_schema() for clsname, cls in self.__atoms__.items()]
File "/root/axis-stable/axis/hotspot/factory.py", line 1477, in _sync_table_schema
await SystemContext.getinstance().update_table(schema, force=True)
File "/root/axis-stable/axis/boot/context.py", line 1289, in update_table
raise HotspotException(
axis.hotspot.exceptions.HotspotException: Unable to resolve schema mismatch because disable_ddl_execution=True