Fix orchagent hang problem caused by erase operation on empty map #348
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Jipan Yang jipan.yang@alibaba-inc.com
Please also provide the following information in this pull request:
-->
What I did
Fix orchagent hang problem caused erase operation on empty map
Why I did it
#347
How I verified it
After the change, switch attributes may be set without problem.
swss.rec:
2017-10-13.06:00:03.019460|SWITCH_TABLE:SWITCH_ATTR|SET|fdb_unicast_miss_packet_action:drop|fdb_multicast_miss_packet_action:forward|fdb_broadcast_miss_packet_action:forward
2017-10-13.06:00:21.739177|SWITCH_TABLE:SWITCH_ATTR|SET|fdb_unicast_miss_packet_action:forward|fdb_multicast_miss_packet_action:forward|fdb_broadcast_miss_packet_action:drop
sairedis.rec:
017-10-13.06:00:03.019580|s|SAI_OBJECT_TYPE_SWITCH:oid:0x21000000000000|SAI_SWITCH_ATTR_FDB_UNICAST_MISS_PACKET_ACTION=SAI_PACKET_ACTION_DROP
2017-10-13.06:00:03.020214|s|SAI_OBJECT_TYPE_SWITCH:oid:0x21000000000000|SAI_SWITCH_ATTR_FDB_MULTICAST_MISS_PACKET_ACTION=SAI_PACKET_ACTION_FORWARD
2017-10-13.06:00:03.020597|s|SAI_OBJECT_TYPE_SWITCH:oid:0x21000000000000|SAI_SWITCH_ATTR_FDB_BROADCAST_MISS_PACKET_ACTION=SAI_PACKET_ACTION_FORWARD
2017-10-13.06:00:21.739453|s|SAI_OBJECT_TYPE_SWITCH:oid:0x21000000000000|SAI_SWITCH_ATTR_FDB_UNICAST_MISS_PACKET_ACTION=SAI_PACKET_ACTION_FORWARD
2017-10-13.06:00:21.740932|s|SAI_OBJECT_TYPE_SWITCH:oid:0x21000000000000|SAI_SWITCH_ATTR_FDB_MULTICAST_MISS_PACKET_ACTION=SAI_PACKET_ACTION_FORWARD
2017-10-13.06:00:21.742227|s|SAI_OBJECT_TYPE_SWITCH:oid:0x21000000000000|SAI_SWITCH_ATTR_FDB_BROADCAST_MISS_PACKET_ACTION=SAI_PACKET_ACTION_DROP
Details if related