def get_all_descendants(db, parent):
    """Return all (non-retired) descendants of the parent.

    Parameters
    ----------
    db : MongoDatabase
        The Mongo database from which request document data can be
        retrieved.

    parent : str
        The parent for which all descendants are desired.

    Returns
    -------
    list(str): The descendants of the parent.

    Throws
    ------
    ValueError: If there is no request document corresponding to the
    specified parent.

    """
    current_request = db.requests.find_one({"_id": parent})
    if not current_request:
        raise ValueError(parent + " has no request document")

    descendants = []
    if current_request.get("children"):
        for child in current_request["children"]:
            if not db.requests.find_one({"_id": child}).get("retired"):
                descendants.append(child)
                descendants += get_all_descendants(db, child)

    # Remove duplicates
    return list(set(descendants))