We also found that niacin significantly inhibited mastitis and enhanced the blood milk barrier, but these effects disappeared after GPR109A was knocked out, suggesting that niacin could alleviate inflammation and enhance the blood milk barrier by activating GPR109A. This evidence concerns the gene HCAR2 and mastitis.