Normal bundle and small contraction in threefolds

Let $$f:X \to \mathbb{A}^1$$ be a smooth, projective morphism of relative dimension $$2$$. Suppose that the fiber $$X_0:=f^{-1}(0)$$ contains an irreducible rational curve, say $$C$$ such that the restriction of the canonical bundle $$K_{X_0}$$ of $$X_0$$ to $$C$$ is trivial. Suppose that there exists a proper, birational morphism $$g:X \to Y$$ contracting $$C$$ i.e., $$g$$ induces an isomorphism (onto its image) when restricted to the complement $$X \backslash C$$ and $$C$$ maps to a point in $$Y$$ (one can assume that the image of $$C$$ is an ordinary double point in $$Y$$). As $$C$$ is rational, we know that $$N_{C|X}$$ is of the form $$\mathcal{O}_C(a) \oplus \mathcal{O}_C(b)$$. What can we say about $$a$$ and $$b$$? Is there some standard technique to compute $$a$$ and $$b$$? I will be very interested to know references/literatures which study similar questions (in short normal bundles of contractible rational curves in threefolds).

The exact sequence $$0 \to N_{C/X_0} \to N_{C/X} \to N_{X_0/X}\vert_C \to 0$$ in this case reads as $$0 \to \mathcal{O}_C(-2) \to N_{C/X} \to \mathcal{O}_C \to 0$$ which means that either $$(a,b) = (0,-2)$$ (if the extension class is trivial) or $$(a,b) = (-1,-1)$$ (if the extension class is nontrivial).