edgeHub v1.4.3: System.NotImplementedException: The method or operation is not implemented.
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 473
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 7
Description
https://github.com/Azure/iotedge/blob/e11cd923604284e7d3541978574aa41930c8d539/edge-util/src/Microsoft.Azure.Devices.Edge.Storage/InMemoryDbStore.cs#L125
In v1.4.3 edgeHub I've encountered the following call-stack (because of previous IO-errors the edgeHub switched from RocksDB to InMemory-store), nonetheless this should never result in a NotImplementedException.
My hope is that it is relatively easy to spot from the callstack how the "not implemented" part could be reached - and maybe how this could be implemented or avoided. Also as far as I can see the code hasn't changed much since v1.4.3 and I haven't found matching issues, so my guess is that this can also happen with the latest v1.4.8 (but to be honest I haven't verified that).
```
<6> 2023-02-11 17:35:01.974 +00:00 [INF] - Starting periodic operation Get EdgeHub config...
<6> 2023-02-11 17:35:02.312 +00:00 [INF] - Obtained edge hub config from module twin
<4> 2023-02-11 17:35:02.315 +00:00 [WRN] - Error getting edge hub configuration.
System.NotImplementedException: The method or operation is not implemented.
at Microsoft.Azure.Devices.Edge.Storage.InMemoryDbStore.GetCountFromOffset(Byte[] offset) in /mnt/vss/_work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Storage/InMemoryDbStore.cs:line 125
at Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore.GetMessageCountFromOffset(String endpointId, Int64 offset) in /mnt/vss/_work/1/s/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/storage/MessageStore.cs:line 141
at Microsoft.Azure.Devices.Routing.Core.Endpoints.StoringAsyncEndpointExecutor.UpdatePriorities(IList`1 priorities, Option`1 newEndpoint) in /mnt/vss/_work/1/s/edge-hub/core/src/Microsoft.Azure.Devices.Routing.Core/endpoints/StoringAsyncEndpointExecutor.cs:line 174
at Microsoft.Azure.Devices.Routing.Core.Endpoints.StoringAsyncEndpointExecutorFactory.CreateAsync(Endpoint endpoint, IList`1 priorities, ICheckpointerFactory checkpointerFactory, EndpointExecutorConfig endpointExecutorConfig) in /mnt/vss/_work/1/s/edge-hub/core/src/Microsoft.Azure.Devices.Routing.Core/endpoints/StoringAsyncEndpointExecutorFactory.cs:line 35
at Microsoft.Azure.Devices.Routing.Core.Dispatcher.SetEndpointInternal(Endpoint endpoint, IList`1 priorities) in /mnt/vss/_work/1/s/edge-hub/core/src/Microsoft.Azure.Devices.Routing.Core/Dispatcher.cs:line 237
at Microsoft.Azure.Devices.Routing.Core.Dispatcher.ReplaceEndpoints(IDictionary`2 endpointsWithPriorities) in /mnt/vss/_work/1/s/edge-hub/core/src/Microsoft.Azure.Devices.Routing.Core/Dispatcher.cs:line 164
at Microsoft.Azure.Devices.Routing.Core.Router.ReplaceRoutes(ISet`1 newRoutes) in /mnt/vss/_work/1/s/edge-hub/core/src/Microsoft.Azure.Devices.Routing.Core/Router.cs:line 165
at Microsoft.Azure.Devices.Edge.Hub.Core.Config.ConfigUpdater.UpdateRoutes(IReadOnlyDictionary`2 routes, Boolean replaceExisting) in /mnt/vss/_work/1/s/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/config/ConfigUpdater.cs:line 149
at Microsoft.Azure.Devices.Edge.Hub.Core.Config.ConfigUpdater.b__11_0(EdgeHubConfig ehc) in /mnt/vss/_work/1/s/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/config/ConfigUpdater.cs:line 124
at Microsoft.Azure.Devices.Edge.Hub.Core.Config.ConfigUpdater.UpdateConfig(Option`1 edgeHubConfig) in /mnt/vss/_work/1/s/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/config/ConfigUpdater.cs:line 126
at Microsoft.Azure.Devices.Edge.Hub.Core.Config.ConfigUpdater.PullConfig(Func`2 configGetter) in /mnt/vss/_work/1/s/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Core/config/ConfigUpdater.cs:line 107
<6> 2023-02-11 17:35:02.316 +00:00 [INF] - Successfully completed periodic operation Get EdgeHub config
<6> 2023-02-11 17:35:02.697 +00:00 [INF] - Updated reported properties for szh2vm0020/$edgeHub
```
The logs before and after this section have different timestamps - so this seems to be the complete log-section that this behavior exposes.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.