Merge "STOPSHIP - add illegalStateException to catch potential deadlocks in db"