The end of a novel needs to be satisfactory to the reader. Most readers love a happy ending, but there are those endings that feel "right" even when they aren't textbook "happy" in terms of their content. I think my favorite ending that isn't happy is that in "The Thorn Birds" because it's right. It's about a love that lasts a lifetime and the book spans a lifetime in its study of generations of families.
I do remember not feeling completely happy at the end of "The Count of Monte Cristo" when Dantes doesn't go after his first love Mercedes (because his character has grown and he's a better person!) Totally shallow of me, but I wanted to see him get his love back -- even though she's too shallow for him and she's regressed I suppose.
What book, even one that you loved, did you want to fix the ending of?