According to Wikipedia, King Janamejaya’s ancestor Shantanu, the king of Hastinapura, has a short-lived marriage with the goddess Ganga and has a son, Devavrata (later to be called Bhishma, a great warrior), who becomes the heir apparent.
Many years later, when King Shantanu goes hunting, he sees Satyavati, the daughter of the chief of fisherman, and asks her father for her hand.
Her father refuses to consent to the marriage unless Shantanu promises to make any future son of Satyavati the king upon his death. To resolve his father’s dilemma, Devavrata agrees to relinquish his right to the throne.
As the fisherman is not sure about the prince’s children honouring the promise, Devavrata also takes a vow of lifelong celibacy to guarantee his father’s promise.
Moral of the Story:
Some people make life long sacrifices and they remain committed to what they promise.