The short answer is that in most cases a QDRO is used and the manager in charge of the retirement benefits gives a share of the payment to the other spouse. The portion of benefits that accrued during marriage in proportion to the total length of time at the job. I don't know for sure what you mean by "retirement" so it may not be a QDRO but in most cases it boils down to a certain share of the retirement benefit is attributed to marital earnings with rights attaching to the other spouse and pro rata distributions made to each spouse upon retirement of the employed spouse.
Retirement benefits are treated the same as income. In California, a spouse has a community property interest in those benefits earned during marriage. If ALL of the benefits were earned during the marriage, it’s an easy enough calculation – your spouse gets half. However, if you earned some before marriage and some after marriage or some during OTHER marriages, then it gets more complicated. But the answer to the question you asked is a spouse in California is entitled to some interest in retirement benefits earned during any length of marriage.
Sometimes couples do property “swaps” to equalize division without messing about with QDROs and the like. Or, you simply serve an order on your plan and the administrator has to do the math. Either way, you ought to consult an attorney.
Best of luck to you.
If you found this answer helpful, let me know by clicking the "thumbs-up" button at the bottom of this answer. It’s easy and appreciated.
This response is intended to be a general statement of law, should not be relied upon as legal advice, does not create an attorney/client relationship and does not create a right to continuing email exchanges.
If the plan is a defined contribution plan like a 401k, then your spouse if entitled to one half of the contributions during marriage together with earnings and appreciation on that share. if it's a defined benefit plan like a pension, then your spouse is entitled to one half of the married years in the plan divided by the total number of credited years in the plan from the inception to date of eligibility to retire, times the monthly benefit. consults an attorney to draft a Domestic Relations Order to divide these plans.