Marko,
are you seeing the message, when you double click the library in your pictures folder to open it?
You may indeed have been using a different library, if Photos is warning you that you are opening the library for the first time. To see, where the library is, that you have been using recently, launch Photos by double-clicking the Photos.app in the Dock or in Applications. After Photos launches, open the Preferences: "Photos > Preferences > General". Look at the first line of the Preferences panel. It will tell you the path to the Photos Library. You can also click the button "Show n Finder". Does that show you the library in your Pictures folder or another library?
If Photos is really opening the library for the first time and you are using iCloud Photos, the library will be uploaded again to merge it into the existing library. That will always happen, after the library has been repaired or the library has been restored from a backup or moved to a different volume. It will not create duplicates in iCloud, just cause a lot of network traffic and take a long time.