Let $$f = u + iv$$
Then, $$u(x, y) = \frac{x}{x^2+y^2}, v(x, y) = \frac{y}{x^2+y^2}$$
Hence, $$\frac{\partial u}{\partial x} = \frac{-(x^2-y^2)}{(x^2+y^2)^2}, \frac{\partial u}{\partial y} = \frac{-2xy}{(x^2+y^2)2}$$
And
$$\frac{\partial v}{\partial x} = \frac{-2xy}{(x^2+y^2)^2}, \frac{\partial v}{\partial y} = \frac{(x^2 - y^2)}{(x^2+y^2)^2}$$
And,
$$\frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} = 0, \frac{\partial v}{\partial x} + \frac{\partial u}{\partial y} = 0$$ This means that our function is locally sourceless and irrotational flux on domain D that does not include the origin (where our function is not defined).
Now note that our function can be written as $$f(z) = \frac{1}{\overline{z}}$$
Since $$\frac{1}{\overline{z}} = \frac{x}{x^2+y^2} + i\frac{y}{x^2+y^2}$$
Now, lets take a look on the circle $$|z| = 1$$
The normal component of f is $$f\cdot n = \cos{\theta}\cos{\theta} + \sin{\theta}sin{\theta}$$
Since $$f(z) = \frac {\cos{\theta} +i\sin{\theta}}{r}, r = 1, \theta = arg(\frac{1}{\overline{z}})$$
And $$n = \cos{\theta} - i\sin{\theta}$$
Then,
$$\int_{|z| =1} f\cdot n ds = 1\int_{|z| = 1} ds = 2\pi$$
Hence, our function is locally sourceless and irrotational flow but is not globally sourceless.