Projects tigase _server server-core Issues #1349
CertificateRepository - only single node should write the certificate to the repository (#1349)
Wojciech Kapcia (Tigase) opened 3 years ago

To avoid any collisions (or locks) and lower impact on the repository, in cluster deployments, only single node CertificateRepository should be responsible for writing certificate to the repository.

  • Wojciech Kapcia (Tigase) commented 3 years ago

    Changes from comit:8319c936482363b242bf766d451da91e984d8669 should probably address the issue...

  • Wojciech Kapcia (Tigase) batch edited 2 years ago
    Name Previous Value Current Value
    Iterations
    empty
    tigase-server-8.4.0
  • Wojciech Kapcia (Tigase) batch edited 2 years ago
    Name Previous Value Current Value
    Iterations
    tigase-server-8.4.0
    tigase-server-8.5.0
    Version
    tigase-server-8.4.0
    tigase-server-8.5.0
  • Wojciech Kapcia (Tigase) batch edited 7 months ago
    Name Previous Value Current Value
    Version
    tigase-server-8.5.0
    8.5.0
  • Andrzej Wójcik (Tigase) commented 2 days ago

    I've reviewed the code, and following lines:

    	@HandleEvent
    	public void certificateChange(CertificateChange event) {
    		if (event.isLocal()) {
    			return;
    		}
    		boolean saveToDisk = repository == null;
    		try {
    			addCertificate(event.getAlias(), event.getPemCertificate(), saveToDisk, false);
    		} catch (CertificateParsingException ex) {
    			log.log(Level.WARNING, "Failed to update certificate for " + event.getAlias(), ex);
    		}
    		if (repository != null) {
    			repository.reload();
    		}
    	}
    

    especially boolean saveToDisk = repository == null; makes sure that if certificate repository is active, only first processing node (the one that initially received the request) will store new certificate to the repository.

  • Andrzej Wójcik (Tigase) changed state to 'In QA' 2 days ago
    Previous Value Current Value
    Open
    In QA
  • Wojciech Kapcia (Tigase) commented 2 days ago

    OK, so it was already fixed :)

  • Wojciech Kapcia (Tigase) changed state to 'Closed' 2 days ago
    Previous Value Current Value
    In QA
    Closed
issue 1 of 1
Type
New Feature
Priority
If you are bored
Assignee
Version
8.5.0
Iterations
Issue Votes (0)
Watchers (3)
Reference
tigase/_server/server-core#1349
Please wait...
Page is in error, reload to recover