You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Marton Szasz (Jira)" <ji...@apache.org> on 2023/06/30 15:00:00 UTC
[jira] [Resolved] (MINIFICPP-2020) Fix the code which is supposed to stop two MiNiFi instances from interfering with each other
[ https://issues.apache.org/jira/browse/MINIFICPP-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marton Szasz resolved MINIFICPP-2020.
-------------------------------------
Resolution: Fixed
> Fix the code which is supposed to stop two MiNiFi instances from interfering with each other
> --------------------------------------------------------------------------------------------
>
> Key: MINIFICPP-2020
> URL: https://issues.apache.org/jira/browse/MINIFICPP-2020
> Project: Apache NiFi MiNiFi C++
> Issue Type: Bug
> Reporter: Ferenc Gerlits
> Assignee: Adam Debreceni
> Priority: Minor
> Time Spent: 4h 40m
> Remaining Estimate: 0h
>
> On Windows,
> * (x) if MiNiFi is already running as a service and you try to start another instance from the console, then the second instance will exit with %errorlevel% == -1, but without any message printed to either the console or the log file, because GetTerminationEventHandle returns a null pointer;
> * (/) if MiNiFi is not running as a service, you can start up two instances with different MINIFI_HOMES from the console;
> * (?) if you start up a MiNiFi instance from the console, then you start the MiNiFi service, that works (assuming their MINIFI_HOMEs are different).
> On Linux,
> * (/) you can start up two instances as long as their MINIFI_HOMEs are different.
> On both,
> * (?) if you try to start up two MiNiFi instances with the same MINIFI_HOME, it will fail, as long as some repositories are RocksDB, because RocksDB can't open the repo if another process has it open already.
>
> In theory, the process semaphore should stop the last case before trying to open the DBs, but it doesn't, because we open the semaphore in non-exclusive mode. Opening the process semaphore in exclusive mode (with no other changes) would be a bad solution, because in the case of a crash or a kill signal, the stale semaphore would stop the user from starting a new MiNiFi instance and would have to be removed manually.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)