Juan Hernandez has posted comments on this change. Change subject: core: Add BLOB servlet ......................................................................
Patch Set 2: (4 inline comments) .................................................... File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/blob/BlobRegistry.java Line 12: * be used to download files. Servers capable od doing this conversion can Done Line 28: private List<BlobServer> servers = new ArrayList<BlobServer>(1); I used the constructor with argument 1 because I don't expect more than one server (the BLOB servlet) and the default constructor of ArrayList reserves space for 10. In fact the whole idea of having more than one server is probably an unnecessary complication. I could change that to the following: private BlobServer server; Or this, to handle synchronization without synchronized methods: private AtomicReference<BlobServer> serverReference = new AtomicReference<BlobServer>(); Line 41: public synchronized void registerServer(BlobServer server) { There is only one server: the BLOB servlet, and it will register only once during the startup of the application. Line 55: public synchronized URL registerBlob(File file) { In this case we will have more calls: one for each ovirt-node re-installation. That is not a lot of calls, but concurrency is possible even with just two simultaneous re-installations. I went for the simple solution. I don't see a need for anything more complicated than that, unless we want to use this servlet for other use cases with more load. -- To view, visit http://gerrit.ovirt.org/6484 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4726aa4084ebb8f93caf0616aceab10957c16b90 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches