Hostile behaviour can occur with dogs that do not have behavioural problems, often when establishing hierarchy, defending the territory, food or partner; even female which is not i heat can be cause of a conflict among dogs.
Meeting of two confident dogs should end quickly, where everyone goes their own way. If you linger at the place where greeting dance ritual happened, it can come to domination ritual and conflict, especially if there is a reason more for it, such as one more dog (specially female), some food, water or one of the dogs is on the other's territory.
When meeting of owned dogs happens, if they are both off the leash, owners can play key role. Dogs should not be approached – on the contrary. Calmly start moving away in opposite directions and without panic, calmly calling out for your dog. In dog's mind – on the condition it considers you its leader – this will mean that the pack it belongs to does not want a conflict and it will follow the leader. Opposite of this, by approaching, raising your voice, panicking lines that ask for them to calm down actually encourages them to fight. In dog's mind that means that the whole pack decides to attack (the whole pack is you and your dog), because approaching means joining in, and a lot of speech, especially the high pitched, represents excitement to a dog.
If both dogs are on the leash when meeting, it is imperative to loosen it. If you notice that both are confident while sniffing each other, do not linger on but command your dog to continue the walk or do the short pull on the side and walk away.
If one is on the leash, and the other off when it approaches, you must not pull your dog away in panic because it will create tension, and the free dog will be able to react. This is why you should turn around and move away, with proper hand movement do not let your dog turn back but keep guiding it where you started heading to.