A dishwasher that leaves dishes gritty or smells musty usually just needs maintenance, not replacement. A few simple habits keep it running well for years.
Clean the filter
Most dishwashers have a removable filter at the bottom that traps food debris. Pull it out and rinse it monthly — a clogged filter is the top reason for poor cleaning and odours. Many people don't know it exists.
Clear the spray arms
Food and mineral deposits clog the spray-arm holes, weakening the wash. Remove the arms periodically and clear the holes with a toothpick or thin wire so water sprays freely.
Run a cleaning cycle
Run an empty hot cycle with a dishwasher cleaner or a cup of vinegar monthly to cut grease and mineral buildup. Wipe the door seals and edges where grime and mould collect.