for those saying the officers have a legal duty to, this is complicated since obviously they also are released from this if hey are in mortal danger, and I believe the case law is that they do not have to risk injury. Now sure they can still be fired in some cases, if they don't follow policy, but they are not required to put themselves in mortal danger. It is not the military.
I think the much bigger failure in this case were before the shooting, with local law enforcement and FBi headquarters having concrete and actionable information. Their actions before this occurred, were incredibly incompetent.
But I would say the more important point to keep in mind is that we need to avoid looking at specific cases since:
a) all of them have different sets of circumstances and all of different sets or weights of variables or measures that would reduce risk of occurrence.
b) they are statistically trivial in homicide. (now sure you can't say that without a backlash, but it is a fact).
The issue with police in schools, armed guards in Schools, or trained and armed staff where being armed would be secondary, is not a binary of success=total prevention of violence in schools, or not, but questions of reduction and deterrence. I will go with the data.. When one looks at equal demographic schools with similar local area violent crime rates, armed personnel at schools result in less assault's, aggravated assaults, robberies, sexual assaults and homicides in the school.
When the NRA made the suggestion after Sandy Hook, NRA was mocked by media and gun lobby using stats that compared police presence in schools in places like Compton to 90210 type schools with no armed personnel. That is a ludicrous comparison. comparisons of similar crime rate areas show armed personnel they do reduce crime.
We also ought to consider, and this is utterly lost in the discussion, that homicide rate of school age children in the US has not been lower in 40 years. Despite some of us felling like murder of kids is up due to wall to wall, if it bleeds it leads coverage , it is down to half of the rate of 25 years ago.