How does Multiple shards per module support works in ODL nitrogen

懵懂的女人 提交于 2019-12-13 04:44:42

问题


The module-shards.conf file mentions the following :

For Helium we support only one shard per module. Beyond Helium we will support more than 1

Have ODL Nitrogen and trying to use "module-shards.conf" like the following :

module-shards = [
    {
        name = "default"
        shards = [
            {
                name="default1"
                replicas = [
                    "member-1"
                ]
            },
            {
                name="default2"
                replicas = [
                    "member-1"
                ]
            }
        ]
    }
]

That seems to be working as karaf shows the 2 shards successfully created for the same module "default". But how the data is distributed among the 2 shards is not clear, can application control/decide which data goes in which of the module shards.

I am not clear how the application config tree data and the operational tree data for a given module be stored under different shards for the same module. If there are multiple shards for the same module, can application decide/control which shard to use for storing a particular type of data. For example, can application decide to store the config tree in "default1" shard and operational tree in "default2" shard for the same module "default" ?

Is it possible to disable operational tree component for one of the shards of a given module, say disable operational tree component for shard "default2" of module "default" with 2 shards namely "default1" and "default2" ?


回答1:


While it says for Helium only one shard per module is supported, that is still the case - support for more than 1 was never implemented. There hasn't been a use case for that. The shards are created but transactions are only routed to one of them (ie picks the first one that is found).



来源:https://stackoverflow.com/questions/48895621/how-does-multiple-shards-per-module-support-works-in-odl-nitrogen

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!